/* Header Styles */
.site-header {
    position: sticky;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 10001;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(0) translateZ(0);
    background: var(--background);
    box-shadow: var(--shadow-sm);
    will-change: transform;
    contain: layout style paint;
}

.site-header.header-hidden {
    transform: translateY(-100%) translateZ(0);
}

.header-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 1rem 1.5rem;
    max-width: 1500px;
    margin: 0 auto;
}

/* Brand Styles */
.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--foreground);
    transition: opacity 0.2s ease;
    flex-shrink: 0;
}

.brand:hover {
    opacity: 0.8;
}

.brand-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background: var(--primary);
    color: var(--primary-foreground);
    border-radius: var(--radius);
    font-size: 1.125rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    transform: translateZ(0);
}

.brand:hover .brand-mark {
    transform: scale(1.05) translateZ(0);
}

.brand-name {
    display: block;
    font-family: var(--font-sans);
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--foreground);
    letter-spacing: -0.02em;
}

.brand-tagline {
    display: block;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.2;
    color: var(--muted-foreground);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Navigation Links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    justify-content: center;
    flex: 1;
    margin: 0 auto;
}

.nav-links a {
    font-family: var(--font-sans);
    font-size: 0.7375rem;
    font-weight: 500;
    color: var(--foreground);
    text-decoration: none;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.2s ease;
    text-transform: uppercase;
}
.nav-links a:hover {
    color: var(--primary);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
    margin-left: auto;
}

/* Theme Toggle Button */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background: var(--muted);
    color: var(--muted-foreground);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    /* transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s cubic-bezier(0.4, 0, 0.2, 1); */
    position: relative;
    overflow: hidden;
    will-change: transform;
    transform: translateZ(0);
}

.theme-toggle:hover {
    color: var(--accent-foreground);
    box-shadow: var(--shadow-sm);
}

.theme-toggle:active {
    transform: scale(0.95) translateZ(0);
}

.toggle-icon {
    position: absolute;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, opacity;
    transform: translateZ(0);
}

.toggle-icon--sun {
    opacity: 1;
    transform: rotate(0deg);
}

.dark .toggle-icon--sun {
    opacity: 0;
    transform: rotate(90deg);
}

.toggle-icon--moon {
    opacity: 0;
    transform: rotate(-90deg);
}

.dark .toggle-icon--moon {
    opacity: 1;
    transform: rotate(0deg);
}

/* Hamburger Menu Button */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 2rem;
    height: 2rem;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    gap: 0.375rem;
    z-index: 10002;
    position: relative;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    transform: translateZ(0);
}

.hamburger:hover {
    transform: scale(1.1) translateZ(0);
}

.hamburger:active {
    transform: scale(0.95) translateZ(0);
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--foreground);
    border-radius: var(--radius);
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55), opacity 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55), background 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transform-origin: center;
    position: relative;
    will-change: transform, opacity;
    transform: translateZ(0);
}

.hamburger[aria-expanded="true"] {
    transform: rotate(180deg) translateZ(0);
}

.hamburger[aria-expanded="true"] span:nth-child(1) {
    transform: rotate(45deg) translate3d(0.375rem, 0.375rem, 0);
    background: var(--primary);
}

.hamburger[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0) translate3d(10px, 0, 0);
}

.hamburger[aria-expanded="true"] span:nth-child(3) {
    transform: rotate(-45deg) translate3d(0.375rem, -0.375rem, 0);
    background: var(--primary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-grid {
        padding: 0.875rem 1rem;
        gap: 1rem;
        justify-content: space-between;
    }

    .nav-links {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .header-actions {
        margin-left: auto;
        gap: 0.5rem;
    }

    .brand {
        flex-shrink: 0;
    }

    .brand-mark {
        width: 2.25rem;
        height: 2.25rem;
        font-size: 1rem;
    }

    .brand-name {
        font-size: 1.125rem;
    }

    .brand-tagline {
        font-size: 0.6875rem;
    }
}

@media (max-width: 480px) {
    .header-grid {
        padding: 0.75rem 0.875rem;
        gap: 0.75rem;
        justify-content: space-between;
    }

    .brand {
        gap: 0.5rem;
        flex-shrink: 0;
    }

    .brand-mark {
        width: 2rem;
        height: 2rem;
        font-size: 0.875rem;
    }

    .brand-name {
        font-size: 1rem;
    }

    .brand-tagline {
        display: none;
    }

    .header-actions {
        margin-left: auto;
        gap: 0.5rem;
    }

    .theme-toggle {
        width: 2.25rem;
        height: 2.25rem;
    }

    .hamburger {
        width: 1.75rem;
        height: 1.25rem;
    }
}

