:root {
    /* Core palette - Solarpunk Bio-Futuristic */
    --color-bg: #050505;
    --color-bg-elevated: #0a0f0a;
    --color-surface: rgba(144, 238, 144, 0.03);
    --color-border: rgba(144, 238, 144, 0.08);

    /* Accent colors - Mycelial greens */
    --color-primary: #9ff79a;
    --color-accent: #56b54d;
    --color-glow: rgba(159, 247, 154, 0.4);
    --color-primary-dim: rgba(159, 247, 154, 0.1);

    /* Text hierarchy */
    --color-text: #f0f0f0;
    --color-text-dim: #a0b0a0;
    --color-text-muted: #809080;

    /* Functional */
    --color-error: #f87171;
    --color-success: #9ff79a;

    /* Overlay backgrounds */
    --color-overlay: #000000a6;
    --color-navbar-bg: #000000ad;

    /* Typography — primary */
    --font-display: 'Bicubik', sans-serif;
    --font-body: 'Inconsolata', monospace;
    --font-accent: 'Struktur', sans-serif;
    --font-ui: 'Exo', sans-serif;

    /* Typography — extended */
    --font-mono: 'Inconsolata', monospace;
    --font-condensed: 'Futura Condensed', 'Futura', sans-serif;
    --font-belt: 'The Belt', serif;

    /* Glassmorphism */
    --glass-bg: rgba(5, 5, 5, 0.55);
    --glass-bg-dense: rgba(5, 5, 5, 0.78);
    --glass-border: rgba(159, 247, 154, 0.12);
    --glass-blur: 20px;

    /* Z-index layers */
    --z-neural: -2;
    --z-neural-overlay: -1;
    --z-content: 1;
    --z-glass: 10;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 5rem;
    --space-4xl: 8rem;

    /* Layout */
    --container-max: 1400px;
    --container-narrow: 940px;
    --nav-height: 80px;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}
/* ==========================================
   Navigation
   ========================================== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: 100;
    background: linear-gradient(to bottom, rgba(5, 5, 5, 0.6) 0%, transparent 100%);
    overflow: visible;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

.nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.nav-logo img {
    height: clamp(85px, 14vw, 110px);
    width: auto;
}

.nav-menu {
    display: flex;
    gap: var(--space-xl);
    list-style: none;
}

.nav-link {
    font-family: var(--font-display);
    font-size: 0.85rem;
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-primary);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-sm);
}

.hamburger {
    display: block;
    width: 28px;
    height: 2px;
    background: var(--color-text);
    position: relative;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 28px;
    height: 2px;
    background: var(--color-text);
    left: 0;
    transition: var(--transition-base);
}

.hamburger::before { top: -9px; }
.hamburger::after { top: 9px; }

.nav-toggle.active .hamburger { background: transparent; }
.nav-toggle.active .hamburger::before { top: 0; transform: rotate(45deg); }
.nav-toggle.active .hamburger::after { top: 0; transform: rotate(-45deg); }

/* ---- Nav Dropdown (desktop) ---- */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    /* Reset button defaults, match .nav-link */
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-display);
    font-size: 0.85rem;
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: var(--transition-fast);
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
}

.nav-dropdown-toggle:hover,
.nav-dropdown-toggle.active {
    color: var(--color-primary);
}

/* Chevron */
.nav-dropdown-toggle::after {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform var(--transition-fast);
}

.nav-dropdown-toggle.active::after {
    transform: rotate(-135deg) translateY(-2px);
}

/* Dropdown menu panel */
.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 200px;
    list-style: none;
    background: var(--glass-bg-dense);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    padding: var(--space-sm) 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity var(--transition-base), visibility var(--transition-base);
}

/* Invisible bridge to cover gap between toggle and menu */
.nav-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    height: 10px;
}

.nav-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.nav-dropdown-menu li {
    list-style: none;
}

.nav-dropdown-menu a {
    display: block;
    padding: var(--space-md) var(--space-xl);
    font-family: var(--font-condensed);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-text-dim);
    transition: color var(--transition-fast), background var(--transition-fast);
    white-space: nowrap;
}

.nav-dropdown-menu a:hover {
    color: var(--color-primary);
    background: rgba(159, 247, 154, 0.05);
}

@media (max-width: 1150px) {
    .nav {
        mix-blend-mode: normal;
        background: rgba(5, 5, 5, 0.95);
    }
    .nav-toggle { display: block; }

    .nav-menu {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(180deg,
            rgba(10, 15, 10, 0.98) 0%,
            rgba(5, 8, 5, 0.99) 100%
        );
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: var(--space-2xl);
        transform: translateX(100%);
        transition: var(--transition-slow);
        border-top: 2px solid rgba(80, 100, 80, 0.3);
    }

    .nav-menu.active { transform: translateX(0); }

    .nav-link {
        font-size: 1.25rem;
        padding-bottom: 6px;
    }
    .nav-dropdown-toggle { font-size: 1.25rem; }

    /* LED dots slightly larger on mobile */
    .nav-link::before {
        box-shadow: 0 0 6px var(--color-primary);
    }
    .nav-link:hover::before,
    .nav-link.active::before {
        width: 6px;
        height: 6px;
        margin-right: 8px;
    }

    /* Mobile: accordion instead of hover */
    .nav-dropdown {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .nav-dropdown-menu {
        position: static;
        transform: none;
        min-width: 0;
        background: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        border: none;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transition: max-height 0.4s ease;
    }

    .nav-dropdown-toggle.active + .nav-dropdown-menu,
    .nav-dropdown-menu.show {
        max-height: 300px;
    }

    .nav-dropdown-toggle.active + .nav-dropdown-menu {
        max-height: 300px;
    }

    /* Dropdown chevron — indicate expandable */
    .nav-dropdown-toggle::after {
        border-color: var(--color-text-dim);
        width: 7px;
        height: 7px;
    }

    .nav-dropdown-menu a {
        text-align: center;
        padding: var(--space-sm) var(--space-lg);
        font-size: 1rem;
        color: var(--color-text-dim);
        transition: color var(--transition-fast);
    }

    .nav-dropdown-menu a:hover,
    .nav-dropdown-menu a:active {
        color: var(--color-primary);
    }
}

/* ---- Nav Y2K Chrome Enhancements ---- */

/* Smooth transition for scroll state */
.nav {
    transition: background var(--transition-base), box-shadow var(--transition-base);
}

/* 1. Chrome bottom edge bezel */
.nav::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%, #404540 15%, #707570 35%,
        #a0a5a0 50%,
        #707570 65%, #404540 85%, transparent 100%
    );
    opacity: 0.4;
    transition: opacity var(--transition-base), background var(--transition-base);
    z-index: 1;
}

/* 7. Scrolled state — chrome toolbar */
.nav.scrolled {
    background: linear-gradient(180deg,
        rgba(20, 25, 20, 0.96) 0%,
        rgba(12, 16, 12, 0.94) 100%
    );
    box-shadow:
        0 2px 0 0 rgba(80, 100, 80, 0.25),
        0 4px 16px rgba(0, 0, 0, 0.4);
}

.nav.scrolled::after {
    opacity: 0.8;
    background: linear-gradient(90deg,
        transparent 0%, #304030 15%, #508050 30%, #70b070 45%,
        #9ff79a 50%,
        #70b070 55%, #508050 70%, #304030 85%, transparent 100%
    );
}

/* 2 & 4. Nav link LED + chrome underline */
.nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding-bottom: 4px;
    background-image: linear-gradient(90deg,
        transparent, #505550, #808880, #a0a8a0, #808880, #505550, transparent
    );
    background-position: bottom center;
    background-size: 0% 2px;
    background-repeat: no-repeat;
    transition: color 150ms ease, background-size 300ms ease;
}

.nav-link:hover,
.nav-link.active {
    background-size: 100% 2px;
}

/* LED indicator dot */
.nav-link::before {
    content: '';
    width: 0;
    height: 0;
    border-radius: 50%;
    background: var(--color-primary);
    box-shadow: 0 0 4px var(--color-primary);
    margin-right: 0;
    transition: width 150ms ease, height 150ms ease, margin 150ms ease;
    flex-shrink: 0;
}

.nav-link:hover::before {
    width: 5px;
    height: 5px;
    margin-right: 6px;
    animation: led-blink 1.2s infinite;
}

.nav-link.active::before {
    width: 5px;
    height: 5px;
    margin-right: 6px;
    animation: none;
}

/* 3. Chrome-panel dropdown */
.nav-dropdown-menu {
    background: linear-gradient(180deg, #151a15 0%, #0a0f0a 100%);
    border: 2px solid #505850;
    border-top-color: #687068;
    border-left-color: #586058;
    border-right-color: #485048;
    border-bottom-color: #384038;
    box-shadow:
        inset 0 1px 0 rgba(159, 247, 154, 0.06),
        0 8px 24px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    z-index: 100;
}

.nav-dropdown-menu a:hover {
    background: rgba(159, 247, 154, 0.06);
    color: var(--color-primary);
}

/* 5. Logo status lights */
.nav-status {
    display: none;
    align-items: center;
    gap: 5px;
    margin-left: var(--space-md);
    opacity: 0.55;
    transition: opacity var(--transition-base);
}

.nav.scrolled .nav-status {
    opacity: 0.85;
}

.nav-status .y2k-status-label {
    font-size: 0.5rem;
    letter-spacing: 0.1em;
}

.nav-status .y2k-status-light {
    width: 5px;
    height: 5px;
}

/* 6. Chrome hamburger + mobile overrides */
@media (max-width: 1150px) {
    .nav-toggle {
        width: 44px;
        height: 44px;
        padding: 0;
        border-radius: 50%;
        border: 2px solid #505850;
        background: linear-gradient(145deg, #252a25 0%, #151a15 100%);
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.06),
            0 2px 6px rgba(0, 0, 0, 0.3);
        display: flex;
        align-items: center;
        justify-content: center;
        transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    }

    .nav-toggle:active {
        box-shadow:
            inset 0 2px 4px rgba(0, 0, 0, 0.4),
            0 1px 2px rgba(0, 0, 0, 0.2);
    }

    .nav-toggle.active {
        border-color: var(--color-primary);
        box-shadow:
            0 0 8px rgba(159, 247, 154, 0.2),
            inset 0 1px 0 rgba(159, 247, 154, 0.1);
    }

    .nav-status {
        display: none;
    }

    /* Mobile dropdown — improved accordion */
    .nav-dropdown-menu {
        background: none;
        border: none;
        box-shadow: none;
        border-radius: 0;
        margin-top: var(--space-sm);
    }

    .nav-dropdown-menu a {
        position: relative;
        padding: var(--space-sm) var(--space-lg);
        font-size: 0.95rem;
        color: var(--color-text-dim);
        text-align: center;
        border-left: 2px solid transparent;
        transition: color var(--transition-fast), border-color var(--transition-fast);
    }

    .nav-dropdown-menu a:hover,
    .nav-dropdown-menu a:active {
        color: var(--color-primary);
        border-left-color: var(--color-primary);
    }

    .nav.scrolled {
        background: rgba(12, 16, 12, 0.96);
    }
}

@media (min-width: 1151px) and (max-width: 1280px) {
    .nav-status .y2k-status-label {
        display: none;
    }
}

/* nav-logo uses clamp() for fluid sizing — no breakpoint overrides needed */

.y2k-status-light {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(60, 80, 60, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.15);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4), 0 1px 0 rgba(255, 255, 255, 0.15);
    margin-left: 10px;
}

.y2k-status-light:first-child {
    margin-left: 0;
}

.y2k-status-light.on {
    background: radial-gradient(circle at 35% 35%, #eeffee, #4a8a3a);
    box-shadow: 0 0 10px rgba(159, 247, 154, 0.8), 0 0 20px rgba(159, 247, 154, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.5);
}

.y2k-status-light.blink {
    background: radial-gradient(circle at 35% 35%, #ffffcc, #8a8a3a);
    box-shadow: 0 0 8px rgba(247, 247, 154, 0.7), 0 0 16px rgba(247, 247, 154, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.4);
    animation: y2k-blink 2s ease-in-out infinite;
}

@keyframes y2k-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.y2k-status-label {
    font-family: var(--font-accent);
    font-size: 0.55rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(5, 15, 5, 0.55);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Model label */
.y2k-model-label {
    text-align: center;
    font-family: var(--font-accent);
    font-size: clamp(0.45rem, 1.2vw, 0.6rem);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: rgba(5, 15, 5, 0.5);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
    padding-top: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

