/* Global Header & Navigation — All Pages */
:root {
    --bg-0: #05070a;
    --cyan-1: #67e8f9;
    --violet-1: #8b5cf6;
    --violet-2: #a78bfa;
    --blue-1: #38bdf8;
    --blue-2: #2563eb;
    --text-strong: rgba(255, 255, 255, 0.96);
    --text-soft: rgba(255, 255, 255, 0.72);
    --text-dim: rgba(255, 255, 255, 0.52);
    --line-soft: rgba(255, 255, 255, 0.08);
}

/* Navigation */
.nav {
    height: 72px;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(5, 7, 10, 0.95);
    backdrop-filter: blur(24px) saturate(1.2);
    -webkit-backdrop-filter: blur(24px) saturate(1.2);
    border-bottom: 1px solid var(--line-soft);
}

.nav-logo {
    text-decoration: none;
    display: flex;
    align-items: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.7rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

@media (min-width: 601px) {
    .nav-logo { font-size: 1.9rem; }
}

.nav-logo .prompt { color: rgba(255, 255, 255, 0.75); }
.nav-logo .run { color: rgba(255, 255, 255, 0.95); }
.nav-logo .lucio {
    background: linear-gradient(90deg, #67e8f9 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-style: italic;
}

.nav-links {
    display: flex;
    gap: 24px;
    align-items: center;
}

.nav-links a {
    color: var(--text-soft);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--text-strong);
}

.nav-cta-link {
    height: 36px;
    padding: 0 18px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(103, 232, 249, 0.22), rgba(56, 189, 248, 0.16)), linear-gradient(90deg, #22d3ee, #3b82f6 55%, #8b5cf6);
    color: white !important;
    font-weight: 600 !important;
    font-size: 0.8rem !important;
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(103, 232, 249, 0.24);
    box-shadow: 0 4px 16px rgba(56, 189, 248, 0.2);
    transition: transform 0.2s, box-shadow 0.2s;
}

.nav-cta-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(56, 189, 248, 0.3);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 8px;
    gap: 4px;
    background: none;
    border: none;
}

.hamburger span {
    width: 20px;
    height: 2px;
    background: white;
    border-radius: 1px;
    transition: all 0.3s;
}

.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(6px, 6px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }

/* Mobile Navigation */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    padding: 80px 30px 30px;
    transition: right 0.3s ease;
}

.mobile-nav.active { right: 0; }

.mobile-nav a {
    display: block;
    padding: 16px 0;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: color 0.2s;
}

.mobile-nav a:hover { color: var(--cyan-1); }

.mobile-cta {
    margin-top: 30px;
    padding: 14px 20px;
    background: linear-gradient(135deg, #67e8f9, #3b82f6);
    color: white !important;
    border-radius: 8px;
    text-align: center;
    font-weight: 600 !important;
    display: block !important;
    border: none !important;
}

/* Mobile Overlay */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile Breakpoint */
@media (max-width: 600px) {
    .nav { padding: 0 20px; height: 64px; }
    .nav-links { display: none; }
    .hamburger { display: flex; }
}

/* Navigation Script */
<script>
(function() {
    const hamburger = document.getElementById('hamburger');
    const mobileNav = document.getElementById('mobileNav');
    const mobileOverlay = document.getElementById('mobileOverlay');

    if (hamburger) {
        function toggleMobileNav() {
            hamburger.classList.toggle('active');
            mobileNav.classList.toggle('active');
            mobileOverlay.classList.toggle('active');
            document.body.style.overflow = mobileNav.classList.contains('active') ? 'hidden' : '';
        }

        hamburger.addEventListener('click', toggleMobileNav);
        mobileOverlay.addEventListener('click', toggleMobileNav);

        // Close mobile nav when clicking a link
        mobileNav.addEventListener('click', (e) => {
            if (e.target.tagName === 'A') {
                toggleMobileNav();
            }
        });

        // Close on ESC
        document.addEventListener('keydown', (e) => {
            if (e.key === 'Escape' && mobileNav.classList.contains('active')) {
                toggleMobileNav();
            }
        });
    }
})();
</script>
