/* ============================================
   Navigation — Glassmorphism Navbar
   ============================================ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    background: rgba(9, 9, 11, 0.72);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.navbar.scrolled {
    background: rgba(9, 9, 11, 0.92);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-inner {
    max-width: 1140px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo */
.nav-logo {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.2s;
}
.nav-logo:hover {
    opacity: 0.8;
}
.nav-logo-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: #fff;
    font-weight: 800;
}

/* Links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
}
.nav-links a {
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text2);
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
    text-decoration: none;
    position: relative;
}
.nav-links a:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
}
.nav-links a.active {
    color: var(--accent);
    background: rgba(129, 140, 248, 0.08);
}
.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 2px;
    border-radius: 2px;
    background: var(--accent);
}

/* Accent button (Slides) */
.nav-links a.nav-accent {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: #fff;
    font-weight: 600;
    padding: 8px 20px;
}
.nav-links a.nav-accent:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(129, 140, 248, 0.3);
}
.nav-links a.nav-accent.active {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: #fff;
}
.nav-links a.nav-accent.active::after {
    display: none;
}

/* Burger */
.nav-burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    border: none;
    background: none;
    z-index: 1001;
}
.nav-burger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.3s var(--ease);
    transform-origin: center;
}

.nav-burger.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.nav-burger.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.nav-burger.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile menu */
@media (max-width: 768px) {
    .nav-burger {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        width: 280px;
        height: 100vh;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 80px 24px 32px;
        background: rgba(9, 9, 11, 0.96);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-left: 1px solid rgba(255, 255, 255, 0.06);
        transform: translateX(100%);
        transition: transform 0.35s var(--ease);
    }

    .nav-links.open {
        transform: translateX(0);
    }

    .nav-links a {
        padding: 14px 16px;
        font-size: 1rem;
        border-radius: 10px;
    }

    .nav-links a.nav-accent {
        margin-top: 12px;
        text-align: center;
        padding: 14px 20px;
    }
}

/* Overlay */
.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s var(--ease);
    z-index: 999;
}
.nav-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

/* ============ TOUR PROGRESS BAR ============ */
.tour-bar {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    z-index: 998;
    height: 40px;
    background: rgba(9, 9, 11, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    display: none;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s var(--ease);
}
.tour-bar.visible {
    display: flex;
}
.tour-inner {
    display: flex;
    align-items: center;
    gap: 0;
    max-width: 520px;
    width: 100%;
    padding: 0 24px;
}
.tour-step {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s var(--ease);
    flex-shrink: 0;
}
.tour-step:hover {
    background: rgba(255, 255, 255, 0.04);
}
.tour-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s var(--ease);
    flex-shrink: 0;
}
.tour-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text2);
    white-space: nowrap;
    transition: color 0.2s;
}
/* Visited step */
.tour-step.visited .tour-dot {
    background: var(--accent2);
    border-color: var(--accent2);
}
.tour-step.visited .tour-label {
    color: var(--accent2);
}
/* Active step */
.tour-step.active .tour-dot {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 8px rgba(129, 140, 248, 0.4);
    width: 10px;
    height: 10px;
}
.tour-step.active .tour-label {
    color: var(--accent);
}
/* Connector lines */
.tour-line {
    flex: 1;
    height: 2px;
    background: rgba(255, 255, 255, 0.08);
    min-width: 16px;
    position: relative;
}
.tour-line.filled {
    background: var(--accent2);
}

/* "Next" button */
.tour-next {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    max-width: 480px;
    margin: 48px auto 0;
    padding: 16px 32px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s var(--ease);
}
.tour-next:hover {
    border-color: rgba(129, 140, 248, 0.3);
    background: var(--card-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
.tour-next-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text2);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.tour-next-title {
    color: var(--accent);
}
.tour-next-arrow {
    font-size: 1.2rem;
    color: var(--accent);
}

@media (max-width: 768px) {
    .tour-bar {
        height: 36px;
    }
    .tour-label {
        font-size: 0.65rem;
    }
    .tour-step {
        gap: 4px;
        padding: 4px 4px;
    }
    .tour-next {
        margin: 32px 16px 0;
    }
}

/* Body offset for fixed navbar */
body.has-navbar {
    padding-top: 64px;
}
body.has-navbar.has-tour {
    padding-top: 104px;
}
