:root {
    --header-height: 100px;
    --header-height-scrolled: 75px;
    --z-header: 1000;
}

/* ==========================================
   1. MAIN ARCHITECTURE
   ========================================== */
.site-header {
    position: fixed;
    top: 0; left: 0; width: 100%;
    height: var(--header-height);
    z-index: var(--z-header);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    background-color: transparent;
    color: #ffffff;
    display: flex;
    align-items: center;
}

.header-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 40px;
}

/* ==========================================
   2. BRANDING & NAVIGATION
   ========================================== */
.site-branding a {
    font-family: var(--font-serif);
    font-size: 24px;
    color: inherit;
    text-decoration: none;
    letter-spacing: -0.02em;
}

.nav-list {
    display: flex;
    flex-direction: row;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 40px;
}

.nav-list li {
    margin: 0;
    padding: 0;
}

.nav-list a {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    text-decoration: none;
    color: inherit;
    position: relative;
    padding-bottom: 5px;
}

/* Modern Underline */
.nav-list a::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 1px;
    background-color: currentColor;
    transition: width 0.3s ease;
}
.nav-list a:hover::after { width: 100%; }

/* ==========================================
   3. SCROLL STATES (ANTI-BLEND)
   ========================================== */
/* Flip text to black instantly on scroll */
.site-header.invert-header {
    color: #000000;
}

/* Apply glass background further down */
.site-header.is-scrolled {
    height: var(--header-height-scrolled);
    background-color: rgba(255, 255, 255, 0.98); /* Slightly more opaque for perfect readability */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: none !important; /* KILLS THE CHEAP SHADOW */
    border-bottom: 1px solid rgba(0, 0, 0, 0.08); /* Adds a crisp, high-end architectural line */
}

/* Hairline Border */
.header-border {
    position: absolute;
    bottom: 0; left: 40px; right: 40px;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.2);
    transition: opacity 0.3s ease;
}
.site-header.is-scrolled .header-border { opacity: 0; } /* Hide border when scrolled */

/* ==========================================
   4. MOBILE UI
   ========================================== */
.mobile-toggle {
    display: none;
    background: transparent; border: none;
    width: 30px; height: 20px;
    position: relative; cursor: pointer;
    z-index: 2002;
}

.mobile-toggle .bar {
    display: block; width: 100%; height: 1px;
    background-color: currentColor;
    position: absolute; left: 0;
    transition: all 0.3s ease;
}
.mobile-toggle .bar:first-child { top: 4px; }
.mobile-toggle .bar:last-child { bottom: 4px; }

@media (max-width: 1024px) {
    .main-navigation { display: none; }
    .mobile-toggle { display: block; }
}

/* Overlay Styles */
.mobile-menu-overlay {
    position: fixed; inset: 0;
    background: #000000; color: #ffffff;
    z-index: 2000;
    opacity: 0; visibility: hidden;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.4s ease;
}
.mobile-menu-overlay.is-visible { opacity: 1; visibility: visible; }

.mobile-close {
    position: absolute; top: 40px; right: 40px;
    background: none; border: none; color: #fff;
    font-size: 30px; cursor: pointer;
}

.mobile-nav-list { list-style: none; text-align: center; padding: 0; }
.mobile-nav-list li { margin-bottom: 30px; }
.mobile-nav-list a {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 8vw, 3.5rem);
    color: #ffffff; text-decoration: none;
}