/* =========================
   Header / Navbar
========================= */

.site-header {
    border-bottom: 1px solid var(--border);
    background: var(--nav-bg);
    position: sticky;
    isolation: isolate;
    top: 0;
    z-index: 1000;
    width: 100vw;
    margin-left: calc(50% - 50vw);
}

.nav-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0.65rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

/* Logo */

.logo {
    font-size: 1.4rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--text);
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.logo-icon {
    width: 1.3rem;
    height: 1.3rem;
    object-fit: contain;
}

/* Nav Links */

.nav-links {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.nav-links a {
    margin-left: 1.5rem;
    font-size: 0.9rem;
    text-decoration: none;
    color: var(--text-muted);
    position: relative;
    transition: color 0.2s ease;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0%;
    height: 2px;
    background: var(--text);
    transition: width 0.25s ease;
}

.nav-links a:hover       { color: var(--text); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active      { color: var(--text); font-weight: 500; }

/* Nav right group */

.nav-right {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* Dark mode toggle */

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.2rem;
    display: flex;
    align-items: center;
    margin-left: 1rem;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.theme-toggle:hover { opacity: 1; }

.theme-toggle img {
    width: 1.3rem;
    height: 1.3rem;
    object-fit: contain;
}

/* Hamburger — hidden on desktop */

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.2rem;
    margin-left: 0.75rem;
    flex-shrink: 0;
}

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.25s ease;
    transform-origin: center;
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
