#mainNav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: min(860px, calc(100% - 40px));
    background: rgba(10, 15, 30, 0.82);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--navy-line);
    border-radius: 50px;
    padding: 0 28px;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: box-shadow 0.3s;
}

#mainNav.scrolled {
    box-shadow: 0 8px 40px rgba(37, 99, 235, 0.18);
    border-color: rgba(37, 99, 235, 0.3);
}

.nav-brand {
    font-family: var(--mono), sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-brand .dot {
    width: 8px;
    height: 8px;
    background: var(--accent-lt);
    border-radius: 50%;
    animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.5);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(59, 130, 246, 0);
    }
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
    height: 100%;
}

.nav-links li {
    display: flex;
    align-items: center;
}

.nav-links a {
    font-family: var(--sans), sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    padding: 7px 14px;
    border-radius: 30px;
    border: 1px solid transparent;
    transition: color 0.25s, border-color 0.25s, background 0.25s;
}

.nav-links a:hover {
    color: var(--text);
    border-color: var(--navy-line);
    background: rgba(255, 255, 255, 0.04);
}

.nav-links a.active {
    color: var(--accent-lt);
    border-color: rgba(59, 130, 246, 0.35);
    background: rgba(37, 99, 235, 0.1);
}

.nav-cta {
    font-family: var(--mono), sans-serif;
    font-size: 0.8rem;
    background: var(--accent);
    color: #fff !important;
    border: none !important;
    padding: 8px 18px !important;
    transition: background 0.25s, box-shadow 0.25s !important;
}

.nav-cta:hover {
    background: var(--accent-lt) !important;
    box-shadow: 0 0 16px rgba(59, 130, 246, 0.45) !important;
}

/* Hamburger */
.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--navy-line);
    border-radius: 8px;
    width: 38px;
    height: 38px;
    color: var(--text);
    font-size: 1.1rem;
    cursor: pointer;
    transition: border-color 0.2s;
    align-items: center;
    justify-content: center;
}

.nav-toggle:hover {
    border-color: var(--accent-lt);
}

/* Mobile menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: calc(var(--nav-h) + 28px);
    left: 50%;
    transform: translateX(-50%);
    width: min(860px, calc(100% - 40px));
    background: rgba(10, 15, 30, 0.96);
    backdrop-filter: blur(20px);
    border: 1px solid var(--navy-line);
    border-radius: 20px;
    padding: 20px;
    z-index: 999;
    flex-direction: column;
    gap: 4px;
}

.mobile-menu.open {
    display: flex;
}

.mobile-menu a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    padding: 12px 16px;
    border-radius: 10px;
    transition: background 0.2s, color 0.2s;
}

.mobile-menu a:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
}