/* Shared site header — single source for index + personal pages */

#site-header-root {
    position: sticky;
    top: 0;
    z-index: 200;
    flex-shrink: 0;
}

.site-header {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 0.6rem;
    margin: 0 -0.25rem;
    padding-inline: clamp(0.5rem, 1.2vw, 1rem);
    min-height: 6.25rem;
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(16, 19, 36, 0.92), rgba(10, 12, 23, 0.92));
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(6px);
}

.site-header__brand {
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
}

.site-header__nav {
    position: absolute;
    left: 50%;
    top: 0.68rem;
    transform: translateX(-50%);
    z-index: 1;
    width: min(780px, calc(100% - 10.5rem));
    max-width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 0.42rem;
    font-size: 0.9rem;
    align-items: center;
    min-width: 0;
    pointer-events: none;
}

.site-header__nav > * {
    pointer-events: auto;
}

.site-header__auth {
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: inherit;
    text-decoration: none;
}

.logo-mark {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: radial-gradient(circle at 30% 20%, #67ddff, #1b1d37 62%);
    box-shadow: 0 0 20px rgba(77, 210, 255, 0.32);
}

.logo-text {
    font-weight: 700;
    letter-spacing: 0.02em;
    font-size: 0.95rem;
    text-transform: none;
    color: #f2f5ff;
}

.site-header__nav .main-categories {
    width: 100%;
}

.site-header__nav .main-categories,
.site-header__nav .sub-categories {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
    justify-content: center;
}

.site-header__nav .sub-categories-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 3.3rem;
}

.main-cat-btn {
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.14s ease-out;
}

.main-cat-btn.active {
    color: var(--text-main);
    border-color: rgba(77, 210, 255, 0.45);
    background: linear-gradient(180deg, rgba(77, 210, 255, 0.18), rgba(77, 210, 255, 0.1));
    box-shadow: 0 0 0 1px rgba(77, 210, 255, 0.16) inset, 0 0 0 2px rgba(77, 210, 255, 0.08);
}

.main-cat-btn:hover {
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.24);
}

.site-header__nav .sub-categories {
    display: none;
}

.site-header__nav .sub-categories.active {
    display: flex;
    width: 100%;
}

.site-header__nav a {
    padding: 0.42rem 0.78rem;
    border-radius: 999px;
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.84rem;
    background: rgba(255, 255, 255, 0.02);
    transition: all 0.14s ease-out;
}

.site-header__nav a:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-main);
}

.site-header__nav a.sub-active {
    color: var(--text-main);
    border-color: rgba(77, 210, 255, 0.4);
    background: rgba(77, 210, 255, 0.1);
}

.auth-btn {
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(77, 210, 255, 0.22), rgba(77, 210, 255, 0.12));
    color: #effbff;
    padding: 0.44rem 0.9rem;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.14s ease-out;
}

.auth-btn:hover {
    color: #ffffff;
    border-color: rgba(77, 210, 255, 0.45);
    box-shadow: 0 0 0 2px rgba(77, 210, 255, 0.1);
}

.main-cat-hidden {
    display: none !important;
}

@media (max-width: 900px) {
    .site-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        min-height: 0;
        border-radius: 12px;
    }

    .site-header__nav {
        position: static;
        left: auto;
        top: auto;
        transform: none;
        width: 100%;
        max-width: none;
        margin: 0 auto;
    }

    .site-header__auth {
        margin-left: 0;
        align-self: flex-end;
        width: 100%;
        justify-content: flex-end;
    }

    .site-header__nav .sub-categories-slot {
        min-height: 0;
    }
}
