/* Responsive images */
img { max-width: 100%; height: auto; }
/* 02 — 
BLUEPRINT : DESIGN SYSTEM */
:root {
    --bg-primary: hsl(222, 47%, 5%); --bg-secondary: hsl(222, 35%, 9%); --bg-tertiary: hsl(222, 25%, 13%);
    --accent-primary: #00E5FF; --accent-secondary: hsl(271, 91%, 65%);
    --neon-glow-color: rgba(0, 229, 255, 0.8);
    --blueprint-grid-color: #00E5FF;
    --text-primary: hsl(0, 0%, 96%); --text-secondary: hsl(222, 20%, 60%); --border-color: rgba(255, 255, 255, 0.07);
    --font-heading: 'Space Grotesk', sans-serif; --font-body: 'Inter', sans-serif;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1); --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1); --radius: 12px;
}
*, *::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;
}

/* NOISE GRAIN OVERLAY */
body::before {
    content: "";
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    pointer-events: none;
    z-index: 99999;
    opacity: 0.04;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}
a { color: var(--accent-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-secondary); }

/* NAVBAR (Technical Floating Panel) */
.navbar {
    position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 1000;
    width: 90%; max-width: 900px;
    background: rgba(10, 15, 25, 0.7);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 240, 255, 0.3);
    border-radius: 4px;
    padding: 12px 24px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.6), inset 0 0 12px rgba(0, 240, 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: 130px 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.8rem, 7vw, 4.2rem); font-weight: 800; line-height: 1.12; margin-bottom: 12px; letter-spacing: -0.05em; text-shadow: 0 0 20px rgba(255, 255, 255, 0.1); }
.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.4s var(--ease-spring), box-shadow 0.4s var(--ease-spring); text-decoration: none; display: inline-flex; align-items: center; gap: 8px;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0, 229, 255, 0.4), inset 0 0 10px rgba(255, 255, 255, 0.4); 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, 0.02); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, 0.05); border-radius: var(--radius); padding: 32px; margin-bottom: 32px; box-shadow: 0 20px 40px -10px rgba(0,0,0,0.5); }
.section-title { font-family: var(--font-heading); font-size: 1.6rem; color: var(--accent-primary); margin-bottom: 20px; letter-spacing: -0.03em; text-shadow: 0 0 10px rgba(0, 229, 255, 0.3); }

/* 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); border: 1px solid var(--border-color); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); padding: 24px; border-radius: var(--radius);
    transition: all 0.4s var(--ease-spring);
}
.project-card:hover { border-color: var(--accent-primary); transform: translateY(-6px); box-shadow: 0 15px 35px rgba(0, 229, 255, 0.15), inset 0 0 15px rgba(0, 229, 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(0, 229, 255, 0.1); 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); border: 1px solid var(--border-color); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, 0.05); padding: 20px; border-radius: var(--radius); transition: all 0.4s var(--ease-spring); }
.contact-card:hover { border-color: var(--accent-primary); transform: translateY(-4px); box-shadow: 0 15px 35px rgba(0, 229, 255, 0.15), inset 0 0 15px rgba(0, 229, 255, 0.05); }
.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(0, 229, 255, 0.1); color: var(--accent-primary); border-color: #FFA72644; }

@media (max-width: 768px) {
    .navbar {
        background: rgba(10, 15, 25, 0.92);
        backdrop-filter: blur(24px) saturate(180%);
        -webkit-backdrop-filter: blur(24px) saturate(180%);
    }
    .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(7, 9, 18, 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);
}


/* ==========================================
   BLUEPRINT DESIGN MONSTER (X-RAY & PLOTTER)
   ========================================== */

/* 1. X-Ray Hover Effect on Project Images */
.project-card .project-image img {
    transition: filter 0.5s cubic-bezier(0.25, 1, 0.5, 1), transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    transform-origin: center;
}
.project-card:hover .project-image img {
    /* Create a blueprint/technical negative look */
    filter: invert(1) hue-rotate(180deg) sepia(0.8) saturate(3) contrast(1.5) brightness(0.9);
    transform: scale(1.05);
}

/* 2. Plotter Draw-In Animation */
@keyframes plotterDrawX {
    0% { transform: scaleX(0); }
    100% { transform: scaleX(1); }
}
@keyframes plotterDrawY {
    0% { transform: scaleY(0); }
    100% { transform: scaleY(1); }
}
@keyframes plotterText {
    0% { opacity: 0; clip-path: polygon(0 0, 0 0, 0 100%, 0% 100%); }
    100% { opacity: 1; clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%); }
}

/* Apply plotter animation on load to main structural elements */
.hero-content {
    animation: plotterText 1.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.project-card, .skill-category, .contact-card {
    position: relative;
    overflow: hidden;
}

/* The frame lines drawing themselves */
.project-card::before, .skill-category::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: var(--accent-primary);
    transform-origin: left;
    animation: plotterDrawX 1s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    z-index: 10;
}
.project-card::after, .skill-category::after {
    content: '';
    position: absolute;
    top: 0; bottom: 0; left: 0;
    width: 1px;
    background: var(--accent-primary);
    transform-origin: top;
    animation: plotterDrawY 1s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    z-index: 10;
}


/* ==========================================
   BLUEPRINT PLASTIC & LIQUID METAL
   ========================================== */
.project-card, .btn, .skill-category, .contact-card {
    position: relative;
    z-index: 1;
    overflow: visible !important; /* Allow liquid metal to overflow */
    border: none !important;
}

/* 1. Plastic Glassmorphism */
.project-card::after, .skill-category::after, .contact-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.1), 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: -1;
    pointer-events: none;
}
[data-theme-mode="light"] .project-card::after, [data-theme-mode="light"] .skill-category::after, [data-theme-mode="light"] .contact-card::after {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.5), 0 10px 30px rgba(0, 0, 0, 0.05);
}

/* 2. Liquid Metal Border */
.project-card::before, .skill-category::before, .contact-card::before, .btn::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    /* Blueprint theme colors for metal */
    background: linear-gradient(90deg, var(--accent-primary), #ffffff, 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.9;
    pointer-events: none;
}
.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 {
    background: var(--bg-secondary);
}

.project-card > *, .skill-category > *, .contact-card > *, .btn > * {
    position: relative;
    z-index: 2;
}

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


/* ==========================================
   LIQUID GLASS & METAL NAVBAR (BLUEPRINT)
   ========================================== */
.navbar {
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(12px) saturate(150%) !important;
    -webkit-backdrop-filter: blur(12px) saturate(150%) !important;
    border-bottom: none !important;
    position: relative;
    box-shadow: inset 0 -1px 0 rgba(255,255,255,0.2), 0 10px 30px rgba(0,0,0,0.3) !important;
}

[data-theme-mode="light"] .navbar {
    background: rgba(255, 255, 255, 0.45) !important;
    box-shadow: inset 0 -1px 0 rgba(255,255,255,0.6), 0 10px 30px rgba(0,0,0,0.1) !important;
}

.navbar::before {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-primary), #ffffff, var(--accent-secondary), #ffffff, var(--accent-primary));
    background-size: 300% 300%;
    animation: liquidMetalNav 4s infinite linear;
    z-index: -1;
    filter: blur(1px);
    opacity: 0.9;
}

@keyframes liquidMetalNav {
    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;
    }
}
