/* ============================================
   GLOBAL + SMOOTH SCROLL + THEME ROOT
============================================ */

html {
    scroll-behavior: smooth;
}

:root {
    /* DARK THEME */
    --bg-main: #0D1B2A;
    --bg-card: #1B263B;
    --bg-nav: #415A77;
    --text-main: #E0E1DD;
    --accent: #778DA9;
    --border: #415A77;
    --glow: rgba(119, 141, 169, 0.7);
    --shadow-soft: rgba(0, 0, 0, 0.4);
}

/* LIGHT THEME */
:root.light-mode {
    --bg-main: #E9EEF3;
    --bg-card: #F7FAFD;
    --bg-nav: #E6EBF2;
    --text-main: #0F1A27;
    --accent: #6C85A3;
    --border: #C7D3E0;
    --glow: rgba(65, 90, 119, 0.25);
    --shadow-soft: rgba(0, 0, 0, 0.1);
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    transition: background-color 0.35s ease, color 0.35s ease;
}

/* ============================================
   HEADER
============================================ */

header {
    background: var(--bg-card);
    padding: 30px 0;
    border-bottom: 2px solid var(--border);
    transition: background 0.35s ease, border-color 0.35s ease;
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

header h1 {
    margin: 0;
    font-size: 2.5rem;
    color: var(--accent);
}

header h2 {
    margin: 5px 0 0 0;
    color: var(--text-main);
}

/* ============================================
   THEME TOGGLE (CYBER SLIDER)
============================================ */

.theme-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.theme-label {
    font-size: 0.85rem;
    opacity: 0.8;
}

#theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.toggle-track {
    width: 60px;
    height: 26px;
    border-radius: 999px;
    background: linear-gradient(135deg, #1B263B, #415A77);
    box-shadow: 0 0 12px var(--glow);
    padding: 3px;
    display: flex;
    align-items: center;
    transition: box-shadow 0.35s ease, background 0.35s ease;
}

.toggle-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #E0E1DD;
    box-shadow: 0 0 10px var(--glow);
    transform: translateX(0);
    transition: transform 0.35s ease, box-shadow 0.35s ease, background 0.35s ease;
}

:root.light-mode .toggle-thumb {
    transform: translateX(0);
    box-shadow: 0 0 4px var(--shadow-soft);
    background: #FFFFFF;
}

:root.dark-mode .toggle-thumb {
    transform: translateX(32px);
    box-shadow: 0 0 12px var(--glow);
    background: #E0E1DD;
}

/* ============================================
   NAVIGATION
============================================ */

nav {
    background: var(--bg-nav);
    padding: 10px 0;
    transition: background 0.35s ease;
}

.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;

    display: flex;
    justify-content: space-between;
    align-items: center;
}

.desktop-nav {
    list-style: none;
    display: flex;
    gap: 30px;
    margin: 0;
    padding: 0;
}

.desktop-nav a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: bold;
    position: relative;
    transition: color 0.25s ease;
}

.desktop-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.25s ease;
}

.desktop-nav a:hover {
    color: var(--accent);
}

.desktop-nav a:hover::after {
    width: 100%;
}

/* ============================================
   ANIMATED HAMBURGER ICON
============================================ */

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    background: none;
    border: none;
}

.menu-toggle .bar {
    width: 28px;
    height: 3px;
    background: var(--text-main);
    transition: 0.3s;
}

.menu-toggle.open .bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.menu-toggle.open .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.open .bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

/* ============================================
   GLASS SIDEBAR MENU
============================================ */

#mobile-sidebar {
    position: fixed;
    top: 0;
    left: -260px;
    width: 260px;
    height: 100%;
    backdrop-filter: blur(12px);
    background: rgba(65, 90, 119, 0.35);
    border-right: 1px solid rgba(224, 225, 221, 0.2);
    padding-top: 80px;
    transition: left 0.4s ease, opacity 0.3s ease;
    z-index: 999;

    opacity: 0;
    pointer-events: none;
}

#mobile-sidebar.open {
    left: 0;
    opacity: 1;
    pointer-events: auto;
}

#mobile-sidebar.fade-out {
    opacity: 0;
}

#mobile-sidebar ul {
    list-style: none;
    padding: 0;
    text-align: center;
    margin: 0;
}

#mobile-sidebar a {
    display: block;
    padding: 15px 0;
    color: #E0E1DD;
    text-decoration: none;
    font-size: 1.1rem;
    transition: background 0.25s ease;
}

#mobile-sidebar a:hover {
    background: rgba(224, 225, 221, 0.1);
}

/* ============================================
   CONTENT SECTIONS
============================================ */

.content-section {
    padding: 40px 20px;
    max-width: 1100px;
    margin: auto;
}

h2 {
    color: var(--accent);
    border-bottom: 2px solid var(--border);
    padding-bottom: 10px;
    margin-bottom: 20px;
    transition: color 0.35s ease, border-color 0.35s ease;
}

.subheading {
    margin-top: 30px;
    margin-bottom: 15px;
    color: var(--accent);
}

/* ============================================
   CARDS + CYBER GLOW
============================================ */

.blog-post,
.cert-card,
.edu-card {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
}

.cyber-glow:hover {
    transform: translateY(-4px);
    box-shadow: 0 0 14px var(--glow);
}

.cert-grid {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.cert-card img {
    width: 150px;
    margin-bottom: 10px;
}

/* ============================================
   STACKABLE CERTIFICATIONS
============================================ */

.stackable-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 10px;
}

.stackable-column {
    flex: 1 1 250px;
}

.stackable-column h4 {
    margin-bottom: 8px;
    color: var(--accent);
}

.stackable-column ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.stackable-column li {
    margin-bottom: 6px;
}

/* ============================================
   SKILLS
============================================ */

.skills-list {
    padding-left: 20px;
}

.skills-list li {
    margin-bottom: 8px;
}

/* ============================================
   BUTTONS
============================================ */

.linkedin-button {
    display: inline-block;
    margin-top: 15px;
    padding: 12px 20px;
    background-color: var(--bg-nav);
    color: var(--text-main);
    text-decoration: none;
    font-weight: bold;
    border-radius: 6px;
    transition: 0.3s;
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
}

.linkedin-button:hover {
    background-color: var(--accent);
    box-shadow: 0 0 14px var(--glow);
}

/* ============================================
   FOOTER
============================================ */

footer {
    background: var(--bg-card);
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    border-top: 2px solid var(--border);
    transition: background 0.35s ease, border-color 0.35s ease;
}

/* ============================================
   FADE‑INS
============================================ */

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   BACK TO TOP BUTTON
============================================ */

#back-to-top {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: none;
    background: var(--bg-nav);
    color: var(--text-main);
    cursor: pointer;
    box-shadow: 0 0 10px var(--shadow-soft);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    z-index: 998;
}

#back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}

#back-to-top:hover {
    box-shadow: 0 0 14px var(--glow);
}

/* ============================================
   RESPONSIVE BREAKPOINTS
============================================ */

@media (max-width: 900px) {
    .desktop-nav {
        display: none;
    }
    .menu-toggle {
        display: flex;
    }
}

@media (max-width: 768px) {
    .cert-card img {
        width: 120px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }
    .cert-card img {
        width: 100px;
    }
}

