/* Responsive images */
img { max-width: 100%; height: auto; }
/* 03 — 
MOTION STACK : DESIGN SYSTEM */
:root {
    --bg-primary: hsl(270, 25%, 5%); --bg-secondary: hsl(270, 18%, 9%); --bg-tertiary: hsl(270, 14%, 13%);
    --accent-primary: hsl(270, 90%, 70%); --accent-secondary: hsl(320, 85%, 65%);
    --text-primary: hsl(280, 10%, 96%); --text-secondary: hsl(270, 15%, 58%); --border-color: rgba(180, 130, 255, 0.08);
    --font-heading: 'Space Grotesk', sans-serif; --font-body: 'Inter', sans-serif;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1); --radius: 12px;
    --morph-words: "Motion Stack","Full-Stack Dev","UI Architect","Creative Coder";
    --mesh-blob-enable: true;
    --card-stack-angle: 3;
    --card-stack-z: 40;
    --marquee-speed: 30s;
}
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; background: var(--bg-primary); }
body {
    background: transparent; color: var(--text-primary);
    font-family: var(--font-body); line-height: 1.7; overflow-x: hidden;
}
a { color: var(--accent-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-secondary); }

/* NAVBAR (Floating Pill) */
.navbar {
    position: fixed; top: 24px; left: 50%; transform: translateX(-50%); z-index: 1000;
    width: 90%; max-width: 900px;
    background: rgba(255, 255, 255, var(--glass-opacity, 0.03));
    backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border-color); border-radius: 100px;
    padding: 14px 28px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.05);
}
.nav-container { max-width: 100%; margin: 0; padding: 0; display: flex; justify-content: space-between; align-items: center; }
.brand-logo, .nav-logo {
    font-family: var(--font-heading); font-weight: 800; font-size: 1.3rem;
    color: var(--text-primary); text-decoration: none; user-select: none; cursor: pointer;
}
.logo-title { color: var(--accent-primary); }
.nav-links { display: flex; gap: 20px; align-items: center; }
.nav-link {
    font-size: 0.88rem; font-weight: 500; color: var(--text-secondary);
    padding: 6px 12px; border-radius: 6px; transition: all 0.2s;
}
.nav-link:hover { color: var(--accent-primary); background: rgba(255,255,255,0.06); }
.nav-link.active { color: var(--accent-primary); background: rgba(255,255,255,0.08); }

/* PAGE CONTENT */
.page-content { max-width: 1000px; margin: 0 auto; padding: 140px 24px 80px 24px; }

/* HERO */
.hero-section { text-align: center; margin-bottom: 64px; }
.hero-label { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent-primary); margin-bottom: 16px; }
.hero-name { font-family: var(--font-heading); font-size: clamp(2.4rem, 6vw, 3.6rem); font-weight: 800; line-height: 1.12; margin-bottom: 12px; }
.hero-subtitle { font-size: 1.15rem; color: var(--text-secondary); margin-bottom: 32px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* BUTTONS */
.btn-primary {
    background: var(--accent-primary); color: #000;
    font-family: var(--font-heading); font-weight: 700; padding: 13px 26px;
    border-radius: var(--radius); border: none; cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s; text-decoration: none; display: inline-flex; align-items: center; gap: 8px;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(180, 130, 255, 0.4), inset 0 0 10px rgba(255, 255, 255, 0.2); color: #000; }
.btn-secondary {
    background: transparent; color: var(--text-primary); border: 1px solid var(--border-color);
    font-weight: 600; padding: 13px 26px; border-radius: var(--radius); cursor: pointer;
    transition: all var(--transition); text-decoration: none;
}
.btn-secondary:hover { border-color: var(--accent-primary); color: var(--accent-primary); }

/* CONTENT SECTIONS */
.content-section { background: rgba(255, 255, 255, var(--glass-opacity, 0.03)); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid var(--border-color); border-radius: var(--radius); padding: 32px; box-shadow: 0 10px 30px rgba(0,0,0,0.3); margin-bottom: 32px; }
.section-title { font-family: var(--font-heading); font-size: 1.4rem; color: var(--accent-primary); margin-bottom: 20px; }

/* PROJECTS */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.project-card {
    background: rgba(255, 255, 255, 0.02); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid var(--border-color); padding: 24px; border-radius: var(--radius);
    transition: all var(--transition);
}
.project-card:hover { border-color: var(--accent-primary); transform: translateY(-4px); box-shadow: 0 15px 35px rgba(180, 130, 255, 0.15), inset 0 0 15px rgba(180, 130, 255, 0.05); }
.project-title { font-family: var(--font-heading); font-size: 1.1rem; color: var(--accent-primary); margin-bottom: 8px; }
.project-desc { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 12px; }
.project-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.tag { font-size: 0.75rem; background: rgba(180, 130, 255, 0.15); color: var(--accent-primary); padding: 3px 10px; border-radius: 4px; }
.project-links { display: flex; gap: 12px; }
.project-links a { font-size: 0.85rem; color: var(--accent-secondary); }
.view-all-link { display: block; font-size: 0.88rem; color: var(--accent-primary); margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border-color); }

/* SKILLS */
.skill-category { margin-bottom: 24px; }
.skill-category h3 { font-size: 0.95rem; color: var(--accent-secondary); margin-bottom: 14px; }
.skill-item { margin-bottom: 12px; }
.skill-header { display: flex; justify-content: space-between; font-size: 0.88rem; margin-bottom: 6px; }
.skill-bar-bg { height: 6px; background: var(--bg-primary); border-radius: 3px; overflow: hidden; }
.skill-bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary)); border-radius: 3px; width: 0; transition: width 1.2s ease; }

/* EXPERIENCE */
.experience-item { border-left: 2px solid var(--accent-primary); padding-left: 20px; margin-bottom: 24px; position: relative; }
.experience-item::before { content: ''; position: absolute; left: -6px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent-primary); }
.exp-role { color: var(--accent-primary); font-weight: 600; }
.exp-company { font-weight: 600; }
.exp-date { font-size: 0.82rem; color: var(--text-secondary); }
.exp-desc { font-size: 0.9rem; color: var(--text-secondary); margin-top: 4px; }

/* CONTACT */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.contact-card { min-width: 0; width: 100%; box-sizing: border-box; background: rgba(255, 255, 255, 0.02); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid var(--border-color); padding: 20px; border-radius: var(--radius); transition: all var(--transition); }
.contact-card:hover { border-color: var(--accent-primary); transform: translateY(-2px); }
.contact-label { font-size: 0.78rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px; }
.contact-value { overflow-wrap: anywhere; word-break: break-all; white-space: normal; font-size: 0.95rem; color: var(--accent-primary); word-break: break-all; }

/* FOOTER */
footer { border-top: 1px solid var(--border-color); padding: 24px; text-align: center; color: var(--text-secondary); font-size: 0.85rem; }

/* ADMIN THEMING */
.admin-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.8); backdrop-filter: blur(8px); z-index: 9999; display: none; justify-content: center; align-items: center; padding: 20px; }
.admin-modal-overlay.active { display: flex; }
.admin-modal-card { background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 12px; width: 100%; max-width: 680px; max-height: 90vh; overflow-y: auto; }
.admin-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 24px; border-bottom: 1px solid var(--border-color); background: var(--bg-tertiary); }
.admin-title { font-family: var(--font-heading); font-weight: 700; color: var(--accent-primary); }
.btn-close-modal { background: none; border: none; color: var(--text-secondary); font-size: 1.2rem; cursor: pointer; }
.admin-body { padding: 20px 24px; }
.admin-form-group { margin-bottom: 16px; }
.admin-form-group label { display: block; font-size: 0.82rem; color: var(--text-secondary); margin-bottom: 6px; }
.admin-input, .admin-textarea { width: 100%; background: var(--bg-primary); border: 1px solid var(--border-color); color: var(--text-primary); font-size: 0.88rem; padding: 10px 14px; border-radius: 6px; outline: none; }
.admin-input:focus, .admin-textarea:focus { border-color: var(--accent-primary); }
.btn-admin-action { font-weight: 600; font-size: 0.88rem; padding: 10px 18px; border-radius: 6px; border: 1px solid var(--border-color); background: var(--bg-tertiary); color: var(--text-primary); cursor: pointer; }
.btn-admin-primary { background: var(--accent-primary) !important; color: #000 !important; border-color: var(--accent-primary) !important; }
.adm-tab-btn { font-size: 0.78rem; padding: 6px 14px; background: transparent; border: 1px solid transparent; color: var(--text-secondary); border-radius: 4px; cursor: pointer; }
.adm-tab-btn.active { background: rgba(180, 130, 255, 0.15); color: var(--accent-primary); border-color: #7C3AED44; }

@media (max-width: 768px) {
    .nav-links { display: none; }
    .projects-grid { grid-template-columns: 1fr; }
    .hero-name { font-size: 2rem; }
}

/* HAMBURGER MENU MOBILE */
.hamburger {
    display: none; flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer;
    padding: 8px; z-index: 200;
}
.hamburger span {
    display: block; width: 24px; height: 2px;
    background: var(--text-primary, #F4F4F5);
    border-radius: 2px; transition: transform 0.3s, opacity 0.3s;
}
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 768px) {
    .hamburger { display: flex; }
    .nav-links {
        display: none !important;
        position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
        background: rgba(13, 11, 24, 0.96);
        backdrop-filter: blur(20px) saturate(140%);
        -webkit-backdrop-filter: blur(20px) saturate(140%);
        flex-direction: column; align-items: center; justify-content: center;
        gap: 24px; z-index: 199;
    }
    .nav-links.open { display: flex !important; }
    .nav-link { font-size: 1.2rem; padding: 12px 24px; }
}
/* Small phones */
@media (max-width: 480px) {
    .page-content { padding: 24px 16px 60px; }
    .hero-name { font-size: 1.6rem; }
    .hero-subtitle { font-size: 0.9rem; }
    .contact-grid { grid-template-columns: 1fr; }
    .section-title { font-size: 1.2rem; }
    .hero-actions { flex-direction: column; align-items: center; }
}

/* Profile photo */
.about-photo { display: none;  width: 100px; height: 100px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 2px solid var(--accent-primary); }
@media (max-width: 480px) { .about-photo { width: 80px; height: 80px; } }

/* Touch-friendly */
* { -webkit-tap-highlight-color: transparent; }


/* ==========================================
   INVERTED THEME (LIGHT)
   ========================================== */
html[data-theme-mode="light"] {

    --bg-primary: #FAFAFA;
    --bg-secondary: #F4F4F5;
    --bg-tertiary: #E4E4E7;
    --text-primary: #09090B;
    --text-secondary: #71717A;
    --border-color: #E4E4E7;

}

/* ==========================================
   THEME SWITCHER WIDGET
   ========================================== */
.kadre-theme-switcher {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(128, 128, 128, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(128, 128, 128, 0.2);
    padding: 0.25rem;
    border-radius: 2rem;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.2);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.kadre-theme-switcher:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.3);
}
.theme-btn {
    position: relative;
    z-index: 2;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color 0.3s ease;
}
.theme-btn svg {
    width: 1.2rem;
    height: 1.2rem;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.theme-btn:hover { color: var(--text-primary); }
.theme-btn:hover svg { transform: scale(1.1); }
.theme-btn.active { color: var(--bg-primary); }
.theme-active-indicator {
    position: absolute;
    top: 0.25rem;
    left: 0.25rem;
    width: 2.5rem;
    height: 2.5rem;
    background: var(--text-primary);
    border-radius: 50%;
    z-index: 1;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ==========================================
   WAHOO EFFECTS: CUSTOM CURSOR
   ========================================== */
@media (pointer: fine) {
    @media (pointer: fine) { body, a, button, input, textarea, select { cursor: none !important; } }
    #cursor-dot, #cursor-outline { 
        position: fixed; top: 0; left: 0; 
        transform: translate(-50%, -50%); 
        border-radius: 50%; z-index: 99999; pointer-events: none; 
    }
    #cursor-dot { 
        width: 8px; height: 8px; 
        background-color: var(--accent-primary); 
    }
    #cursor-outline { 
        width: 40px; height: 40px; 
        border: 2px solid var(--accent-secondary); 
        transition: border-color 0.2s, background-color 0.2s; 
    }
}

/* ==========================================
   MONSTER EFFECTS
   ========================================== */
.cursor-glow {
    position: fixed;
    top: 0; left: 0;
    width: 600px; height: 600px;
    background: radial-gradient(circle, var(--accent-primary) 0%, transparent 60%);
    opacity: 0.15;
    pointer-events: none;
    z-index: -1;
    will-change: transform;
    /* Mix blend mode looks amazing for glow */
    mix-blend-mode: screen;
}
[data-theme-mode="light"] .cursor-glow {
    mix-blend-mode: multiply;
    opacity: 0.2;
}

/* Ensure glass elements have transform-style for 3D */
.project-card, .feature-card, .glass-card {
    transform-style: preserve-3d;
    will-change: transform;
}
/* Enhance glass effect to show glow behind it better */
.project-card {
    background: rgba(255, 255, 255, 0.03) !important;
    backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
}
[data-theme-mode="light"] .project-card {
    background: rgba(255, 255, 255, 0.6) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
}

/* ==========================================
   ULTIMATE GLASS & METAL
   ========================================== */

/* LIQUID GLASS SPHERES */
.liquid-glass-spheres {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -2; pointer-events: none; overflow: hidden;
}
.lgs-1, .lgs-2, .lgs-3 {
    position: absolute;
    backdrop-filter: blur(25px);
    background: rgba(255,255,255, 0.03);
    border: 1px solid rgba(255,255,255, 0.1);
    box-shadow: inset 20px 20px 40px rgba(255,255,255,0.05), inset -20px -20px 40px rgba(0,0,0,0.1), 0 20px 40px rgba(0,0,0,0.1);
    animation: morphGlass 15s infinite alternate ease-in-out;
    will-change: transform, border-radius;
}
[data-theme-mode="light"] .lgs-1, [data-theme-mode="light"] .lgs-2, [data-theme-mode="light"] .lgs-3 {
    background: rgba(255,255,255, 0.4);
    border: 1px solid rgba(255,255,255, 0.6);
    box-shadow: inset 20px 20px 40px rgba(255,255,255,0.5), inset -20px -20px 40px rgba(0,0,0,0.05), 0 20px 40px rgba(0,0,0,0.05);
}
.lgs-1 { width: 45vw; height: 45vw; max-width: 600px; max-height: 600px; top: 10%; left: 5%; animation-delay: 0s; }
.lgs-2 { width: 60vw; height: 60vw; max-width: 800px; max-height: 800px; top: 40%; right: -5%; animation-delay: -5s; }
.lgs-3 { width: 30vw; height: 30vw; max-width: 400px; max-height: 400px; bottom: 5%; left: 20%; animation-delay: -10s; }

@keyframes morphGlass {
    0% { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; transform: translate(0,0) rotate(0deg); }
    50% { border-radius: 70% 30% 50% 50% / 30% 30% 70% 70%; transform: translate(3vw, -3vw) rotate(90deg); }
    100% { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; transform: translate(-3vw, 3vw) rotate(180deg); }
}

/* LIQUID METAL CURSOR */
#liquid-cursor {
    position: fixed; top: 0; left: 0; width: 24px; height: 24px;
    background: linear-gradient(135deg, #e0e0e0, #888, #fff);
    pointer-events: none;
    z-index: 10000;
    mix-blend-mode: exclusion;
    animation: cursorMorph 3s infinite alternate ease-in-out;
    box-shadow: 0 0 15px rgba(255,255,255,0.8), inset 2px 2px 5px #fff;
    transition: width 0.3s cubic-bezier(0.25, 1, 0.5, 1), height 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
}
#liquid-cursor.hover {
    width: 60px; height: 60px;
    mix-blend-mode: normal;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary), #fff);
}
@keyframes cursorMorph {
    0% { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; }
    50% { border-radius: 70% 30% 50% 50% / 30% 30% 70% 70%; }
    100% { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; }
}

/* LIQUID METAL BUTTON BORDERS & CARDS */
.btn, .project-card, .feature-card, .glass-card, .submit-btn {
    position: relative;
    z-index: 1;
}

/* 1. LIQUID METAL GLOW BORDER */
.btn::before, .project-card::before, .feature-card::before, .glass-card::before, .submit-btn::before {
    content: '';
    position: absolute;
    inset: -2px; /* Thinner border for cards to look elegant */
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent-primary), #fff, var(--accent-secondary), var(--accent-primary));
    background-size: 300% 300%;
    animation: liquidMetalBorder var(--metal-speed, 4s) infinite linear;
    z-index: -2;
    filter: blur(2px);
    opacity: 0.8;
    pointer-events: none;
}

/* 2. INNER CONTENT BACKGROUND */
.btn::after, .submit-btn::after {
    content: '';
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    background: var(--bg-primary);
    z-index: -1;
    transition: background 0.3s;
    pointer-events: none;
}
.btn:hover::after, .submit-btn:hover::after {
    background: var(--bg-secondary);
}

.project-card::after, .feature-card::after, .glass-card::after {
    content: '';
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    background: rgba(255, 255, 255, var(--glass-opacity, 0.03));
    backdrop-filter: blur(15px);
    z-index: -1;
    pointer-events: none;
}
[data-theme-mode="light"] .project-card::after, [data-theme-mode="light"] .feature-card::after, [data-theme-mode="light"] .glass-card::after {
    background: rgba(255, 255, 255, 0.6);
}

/* Fix text and content z-index so it stays above the ::after background */
.project-card > *, .feature-card > *, .glass-card > *, .btn > *, .submit-btn > * {
    position: relative;
    z-index: 2;
}

@keyframes liquidMetalBorder {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

/* ===================================================================
   KADRE RESPONSIVE SYSTEM — Enhanced Mobile & Tablet Support
   ================================================================= */

/* ── Tablet ── */
@media (max-width: 1024px) {
    .projects-grid,
    .skills-grid,
    .experience-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .hero-layout,
    .hero-section > * {
        text-align: center;
    }
    .about-layout {
        flex-direction: column;
        align-items: center;
    }
}

/* ── Mobile ── */
@media (max-width: 768px) {
    /* Typography scale */
    :root {
        font-size: 15px;
    }
    .hero-name,
    .page-title,
    h1 {
        font-size: clamp(1.8rem, 8vw, 2.5rem) !important;
    }
    .hero-subtitle,
    .section-subtitle,
    p {
        font-size: clamp(0.88rem, 4vw, 1rem);
    }

    /* Layout */
    .projects-grid,
    .skills-grid,
    .experience-grid,
    .cards-grid,
    .contact-grid {
        grid-template-columns: 1fr !important;
    }
    .hero-layout,
    .hero-section {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 24px !important;
    }
    .hero-3d-col {
        width: 220px !important;
        height: 220px !important;
        flex: 0 0 220px !important;
    }
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    .about-photo {
        width: 80px;
        height: 80px;
    }

    /* Spacing */
    .section,
    section,
    .page-section {
        padding: 48px 16px !important;
    }
    .page-content {
        padding: 20px 16px 60px !important;
    }
    .container {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    /* Nav */
    .navbar,
    .terminal-header,
    header {
        padding: 12px 16px !important;
    }
    .nav-logo {
        font-size: 0.9rem !important;
    }

    /* Misc */
    .tags-list { flex-wrap: wrap; gap: 6px; }
    .tag { font-size: 0.72rem !important; }
}

/* ── Small Phones ── */
@media (max-width: 480px) {
    h1, .hero-name { font-size: clamp(1.5rem, 7vw, 2rem) !important; }
    .btn-terminal, .btn-primary, .btn-secondary {
        font-size: 0.82rem;
        padding: 10px 20px;
    }
}

/* ===================================================================
   KADRE LIQUID GLASS MOBILE MENU — Premium Frosted Metal Dropdown
   ================================================================= */
@media (max-width: 768px) {
    .nav-links {
        /* Reset any override to fullscreen */
        position: absolute !important;
        top: calc(100% + 12px) !important;
        right: 16px !important;
        left: auto !important;
        width: 260px !important;
        height: auto !important;
        transform: translateY(-10px) scale(0.97) !important;
        /* Opaque frosted glass — much more readable on mobile */
        background: rgba(20, 16, 13, 0.92) !important;
        backdrop-filter: blur(40px) saturate(1.8) brightness(1.05) !important;
        -webkit-backdrop-filter: blur(40px) saturate(1.8) brightness(1.05) !important;
        border: 1px solid rgba(255, 255, 255, 0.14) !important;
        border-top: 1px solid rgba(255, 255, 255, 0.22) !important;
        border-bottom: 1px solid rgba(0, 0, 0, 0.4) !important;
        border-radius: 18px !important;
        padding: 18px 20px !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;
        gap: 4px !important;
        /* Strong shadow */
        box-shadow: 
            0 32px 64px rgba(0, 0, 0, 0.7),
            0 0 0 0.5px rgba(255, 255, 255, 0.08) inset,
            0 1px 0 0 rgba(255, 255, 255, 0.18) inset !important;
        /* Animation */
        opacity: 0 !important;
        visibility: hidden !important;
        transition:
            opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1),
            transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
            visibility 0.25s ease !important;
        z-index: 999 !important;
    }
    .nav-links.open {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateY(0) scale(1) !important;
    }
    .nav-links a,
    .nav-link {
        width: 100% !important;
        padding: 10px 12px !important;
        border-radius: 10px !important;
        font-size: 0.92rem !important;
        letter-spacing: 0.02em !important;
        border-bottom: none !important;
        color: rgba(255,255,255,0.9) !important;
        text-shadow: none !important;
        transition: background 0.15s ease, color 0.15s ease !important;
    }
    .nav-links a:hover,
    .nav-link:hover {
        background: rgba(255, 255, 255, 0.1) !important;
        color: #fff !important;
    }
    /* Light mode */
    [data-theme-mode="light"] .nav-links {
        background: rgba(255, 252, 248, 0.96) !important;
        border-color: rgba(0,0,0,0.12) !important;
        box-shadow: 0 32px 64px rgba(0,0,0,0.18) !important;
    }
    [data-theme-mode="light"] .nav-links a,
    [data-theme-mode="light"] .nav-link {
        color: var(--text-primary) !important;
    }
}

/* ── Header: anchor for absolute mobile dropdown ── */
header,
.navbar,
.terminal-header,
.bp-header,
.site-header {
    position: relative;
}

/* ==========================================================================
   ACCESSIBILITY: REDUCED MOTION (WCAG)
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  canvas {
    opacity: 0.1 !important;
    pointer-events: none !important;
  }
}

/* ==========================================================================
   MOBILE NAV & PERFORMANCE FIXES
   ========================================================================== */
@media (max-width: 768px) {
    .nav-links {
        background: rgba(10, 10, 15, 0.98) !important;
        backdrop-filter: blur(12px) saturate(180%) !important;
        -webkit-backdrop-filter: blur(12px) saturate(180%) !important;
        box-shadow: 0 20px 40px rgba(0,0,0,0.8) !important;
        border-bottom: 1px solid rgba(255,255,255,0.1) !important;
    }
    [data-theme-mode="light"] .nav-links,
    body[data-theme="light"] .nav-links {
        background: rgba(250, 250, 250, 0.98) !important;
        box-shadow: 0 20px 40px rgba(0,0,0,0.1) !important;
        border-bottom: 1px solid rgba(0,0,0,0.1) !important;
    }
}

/* ==========================================================================
   MOBILE CURSOR FIX
   ========================================================================== */
@media (pointer: coarse), (hover: none) {
    #cursor-dot, #cursor-outline, #liquid-cursor, #custom-cursor, #gallery-cursor, .cursor-glow {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
    }
    body, a, button, input, textarea, select {
        cursor: auto !important;
    }
}

/* MOBILE NAV BLUR FIX */
@media (max-width: 768px) {
    .terminal-header, .navbar, .header, .glass-header {
        background: rgba(10, 10, 10, 0.95) !important;
        backdrop-filter: blur(12px) saturate(200%) !important;
        -webkit-backdrop-filter: blur(12px) saturate(200%) !important;
    }
}
