:root {
    --site-header-height: 68px;
    --site-logo-height: 96px;
    --site-logo-overhang: 32px;
}

html {
    scroll-padding-top: calc(var(--site-header-height) + var(--site-logo-overhang) + 12px);
}

.site-header,
.site-header * {
    box-sizing: border-box;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: grid;
    grid-template-columns: minmax(144px, 1fr) auto minmax(144px, 1fr);
    align-items: center;
    width: 100%;
    height: var(--site-header-height);
    min-height: var(--site-header-height);
    margin-bottom: 0;
    padding: 0 clamp(20px, 2.6vw, 48px);
    overflow: visible;
    border-bottom: 0;
    background: rgba(8, 14, 26, 0.94);
    box-shadow: none;
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.site-header::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    height: 24px;
    background: linear-gradient(180deg, rgba(8, 14, 26, 0.5), transparent);
    pointer-events: none;
}

.site-header .student-access {
    grid-column: 3;
    justify-self: end;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 15px;
    border: 1px solid rgba(144, 234, 42, 0.38);
    border-radius: 999px;
    background: rgba(144, 234, 42, 0.06);
    color: #e2e8f0;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.site-header .student-access svg {
    width: 17px;
    height: 17px;
    color: #90ea2a;
    flex-shrink: 0;
}

.site-header .student-access:hover,
.site-header .student-access[aria-current='page'] {
    background: rgba(144, 234, 42, 0.14);
    border-color: #90ea2a;
}

.site-header .logo-container {
    position: absolute;
    top: 4px;
    left: clamp(20px, 2.6vw, 48px);
    z-index: 1010;
}

.site-header .logo {
    display: inline-flex;
    border-radius: 9px;
    text-decoration: none;
}

.site-header .logo img {
    display: block;
    width: auto;
    height: var(--site-logo-height);
    margin: 0;
    border-radius: 8px;
    filter: drop-shadow(0 12px 19px rgba(0, 0, 0, 0.58));
    transition: transform 0.25s ease, filter 0.25s ease;
}

.site-header .logo:hover img {
    transform: translateY(2px) scale(1.02);
    filter: drop-shadow(0 13px 22px rgba(144, 234, 42, 0.25));
}

.site-header .logo:focus-visible {
    outline-offset: 5px;
}

.site-header .desktop-nav {
    grid-column: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(20px, 2vw, 30px);
}

.site-header .desktop-nav a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 0;
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.site-header .desktop-nav a:hover,
.site-header .desktop-nav a.active {
    color: #90ea2a;
}

.site-header .pill-free {
    padding: 3px 8px;
    border-radius: 999px;
    background: #90ea2a;
    color: #0f172a;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.mobile-floating-pill-nav {
    display: none;
}

@media (max-width: 900px), (orientation: portrait) and (max-width: 1024px) {
    :root {
        --site-header-height: 58px;
        --site-logo-height: 78px;
        --site-logo-overhang: 26px;
    }

    .site-header {
        grid-template-columns: 1fr;
        padding: 0 16px;
    }

    .site-header .logo-container {
        top: 6px;
        left: 16px;
    }

    .site-header .desktop-nav {
        display: none;
    }

    .site-header .student-access {
        grid-column: 1;
        min-height: 42px;
        padding: 0 13px;
        font-size: 12px;
    }

    .mobile-floating-pill-nav {
        position: fixed;
        right: 12px;
        bottom: max(14px, env(safe-area-inset-bottom));
        left: 12px;
        z-index: 1000;
        display: block;
        max-width: 520px;
        margin: auto;
        padding: 6px;
        border: 1px solid rgba(255, 255, 255, 0.14);
        border-radius: 24px;
        background: rgba(15, 23, 42, 0.94);
        box-shadow: 0 14px 38px rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
    }

    .mobile-pill-items {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 4px;
    }

    .mobile-pill-link {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 38px;
        padding: 7px 5px;
        border-radius: 18px;
        color: #94a3b8;
        font-size: 11px;
        font-weight: 800;
        line-height: 1;
        text-decoration: none;
        white-space: nowrap;
    }

    .mobile-pill-link.active {
        background: #90ea2a;
        color: #0f172a;
    }

    body {
        padding-bottom: 82px;
    }
}

@media (max-width: 390px) {
    .mobile-pill-link {
        font-size: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .site-header .logo img {
        transition: none;
    }
}
