.site-header {
    position: fixed;
    inset: 0 0 auto 0;

    width: 100%;
    max-width: none;

    height: var(--header-height-desktop);

    margin: 0;
    padding: 0;

    background: rgba(15, 12, 35, 0.50);
    border-bottom: 1px solid var(--border-glass);

    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);

    z-index: 2000;
    isolation: isolate;
}
.header-nav-container {
    width: 100%;
    max-width: var(--site-max-width, 1350px);

    height: 100%;

    margin: 0 auto;
    /* padding: 0px; */

    box-sizing: border-box;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 24px;
}


.nav-container-inner {
    width: 100%;
    max-width: none;

    margin: 0 auto;
    padding: 1rem 2rem;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* BRAND */

.brand {
    display: inline-flex;
    align-items: center;

    flex-shrink: 0;

    gap: 0.75rem;

    text-decoration: none;

    color: var(--text-main);

    min-width: 0;

    transition: opacity 0.2s ease;
}

.brand:hover {
    opacity: 0.9;
}

.brand:focus-visible {
    outline: 2px solid var(--accent-cyan);
    outline-offset: 6px;
    border-radius: 6px;
}
.brand-logo {
    display: block;

    width: auto;
    height: 44px;

    max-width: 150px;

    object-fit: contain;
    align-self: right;
    padding-right: 0px;
}
.brand-text {
    display: inline-block;

    white-space: nowrap;

    font-family: var(--font-family);
    font-size: clamp(1rem, 2vw, 1.3rem);
    font-weight: 800;
    line-height: 1.4;

    color: var(--text-main);

    background: linear-gradient(
        90deg,
        var(--accent-cyan),
        var(--text-main),
        var(--accent-cyan)
    );

    background-size: 200% auto;

    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;

    animation: ligo-gradient-flow 4s linear infinite;
}
@keyframes ligo-gradient-flow {
    to {
        background-position: 200% center;
    }
}


/* Navigation Links */
.header-nav-links {
    display: flex;
    align-items: center;
    justify-content: flex-start;

    gap: 24px;

    flex-shrink: 0;

    min-width: 0;
}
.header-nav-links a {
    position: relative;

    display: inline-flex;
    align-items: center;

    padding: 8px 0;

    white-space: nowrap;

    font-family: var(--font-family);
    font-size: 0.92rem;
    font-weight: 500;
    line-height: 1.5;

    text-decoration: none;

    color: var(--text-muted);

    transition:
        color 0.2s ease,
        background-color 0.2s ease;
}
.header-nav-links a:hover {
    color: var(--accent-cyan);
}
.header-nav-links a::after {
    content: "";

    position: absolute;

    right: 0;
    bottom: 0;

    width: 0;
    height: 2px;

    border-radius: 10px;

    background: var(--accent-cyan);

    transition: width 0.25s ease;
}

.header-nav-links a:hover::after {
    width: 100%;
}


/* Login / User Action in Header */
#login-btn-placeholder {
    display: flex;
    align-items: center;

    flex-shrink: 0;
}

#login-btn-placeholder > * {
    max-width: 100%;
}



/* hamburger menu */

.header-nav-toggle {
    display: none;

    flex-direction: column;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    width: 44px;
    height: 44px;

    padding: 0;

    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);

    background: var(--bg-panel-light);

    color: var(--text-main);

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease;
}
.header-nav-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-cyan);
}
.header-nav-toggle:focus-visible {
    outline: 2px solid var(--accent-cyan);
    outline-offset: 3px;
}
.header-nav-toggle-bar {
    display: block;

    width: 17px;
    height: 2px;

    flex-shrink: 0;

    border-radius: 10px;

    background: currentColor;

    transform-origin: center;

    transition:
        transform 0.25s ease,
        opacity 0.2s ease;
}
.header-nav-toggle {
    position: relative;
    margin: 0 24px;
}

.header-nav-toggle[aria-expanded="true"]
    .header-nav-toggle-bar {
    position: absolute;
    top: 50%;
    left: 50%;
    margin: 0;
}

.header-nav-toggle[aria-expanded="true"]
    .header-nav-toggle-bar:nth-child(1) {
    transform: translate(-50%, -50%) rotate(45deg);
}

.header-nav-toggle[aria-expanded="true"]
    .header-nav-toggle-bar:nth-child(2) {
    opacity: 0;
}

.header-nav-toggle[aria-expanded="true"]
    .header-nav-toggle-bar:nth-child(3) {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.user-profile-mini {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 15px;
    background: rgba(20, 20, 30, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(5px);
}

.user-name-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}
.user-profile-link {
    display: flex;
    flex-direction: row;
    align-items: center;
}
.user-profile-link svg, .user-name-text {
    color: var(--text-main);
}
.user-profile-link:hover .user-name-text:hover {
    color: var(--accent-cyan);
}
#header-user-avatar {
    color: var(--text-main);
    position: relative;
    display: inline-block;
    flex:none;
}
#header-user-avatar:hover {
    color: var(--accent-cyan);
}

.breadcrumb {
    color: var(--text-muted);
    font-size: 0.9rem;
}
.breadcrumb span {
    color: var(--text-main);
}
.breadcrumb a {
    color: var(--accent-cyan);
    text-decoration: none;
}

/* =========================================================
   HEADER INNER CONTAINER
   ========================================================= */

.site-header-inner {
    width: 100%;

    min-height: var(--header-height);

    margin: 0 auto;
    padding: 1rem 2rem;

    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;

    box-sizing: border-box;

    gap: 1rem;
}


/* =========================================================
   BREADCRUMB
   ========================================================= */

.breadcrumb {
    flex: 1 1 auto;
    width: auto;

    display: flex;
    align-items: center;

    overflow: hidden;

    white-space: nowrap;
    text-overflow: ellipsis;
}


/* =========================================================
   LOGIN / USER ACTION
   ========================================================= */

.site-header-inner #login-btn-placeholder {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: auto;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1024px) {

    .site-header-inner {
        width: 100%;
        max-width: none;

        padding-left: 1.5rem;
        padding-right: 1.5rem;

        gap: 0.75rem;

        display: flex;
        align-items: center;
        justify-content: flex-end;
    }

    .site-header-inner .breadcrumb {
        flex: 1 1 auto;
        min-width: 0;
    }

    .site-header-inner #login-btn-placeholder {
        flex: 0 0 auto;
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767px) {

    .site-header-inner {
        width: 100%;
        max-width: none;

        padding-left: 1rem;
        padding-right: 1rem;

        gap: 0.5rem;
        display: flex;
        align-items: center;
        justify-content: flex-end;
    }
}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 480px) {

    .site-header-inner {
        padding-left: 0.75rem;
        padding-right: 0.75rem;

        gap: 0.5rem;
        display: flex;
        align-items: center;
        justify-content: flex-end;
    }
}



@media (prefers-reduced-motion: reduce) {
    .brand-text {
        animation: none;
    }
    .header-nav-links,
    .header-nav-toggle,
    .header-nav-toggle-bar,
    .header-nav-links a,
    .header-nav-links a::after {
        transition: none;
    }
}

@media (max-width: 767px) {
    .site-header {
        height: var(--header-height-mobile);
        backdrop-filter: blur(30px);
        -webkit-backdrop-filter: blur(30px);
    }
    .header-nav-container,
    .nav-container-inner {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .user-profile-mini {
        padding: 3px 10px;
        gap: 5px;
    }
    .brand {
        gap: 0.5rem;
        min-width: 0;
    }

    .brand-logo {
        height: 36px;
        max-width: 110px;
    }

    .brand-text {
        font-size: 1rem;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .header-nav-toggle {
        width: 42px;
        height: 42px;
    }

    .header-nav-links {
        top: calc(100% + 8px);
        padding: 10px;
        border-radius: var(--radius-md);
        /* margin-left: 8px;
        margin-right: 8px; */
    }

    .header-nav-links a {
        font-size: 0.95rem;
        min-height: 46px;
        padding: 12px;
    }
}

@media (min-width: 767px) and (max-width: 1024px) {
    .site-header {
        height: var(--header-height-tablet);
    }

    .brand-logo {
        height: 40px;
    }

    .brand-text {
        font-size: clamp(0.95rem, 2.5vw, 1.15rem);
    }
}

@media (max-width: 1024px) {
    #login-btn-placeholder {
    width: 100%;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);

    display: flex;
    flex-direction: column;
    align-items: stretch;
    text-align: right;
    }

    #login-btn-placeholder > * {
        width: 100%;
        max-width: 100%;
    }


    .header-nav-toggle {
        display: flex;
    }

    .header-nav-links {
        position: absolute;

        top: calc(100% + 10px);
        right: 24px;
        left: 24px;

        display: flex;
        flex-direction: column;
        align-items: stretch;

        width: auto;

        gap: 4px;

        padding: 12px;

        background: rgba(15, 23, 42, 0.98);

        border: 1px solid var(--glass-border);
        border-radius: var(--radius-md);

        box-shadow: var(--glass-shadow);

        backdrop-filter: blur(22px);
        -webkit-backdrop-filter: blur(22px);

        opacity: 0;
        visibility: hidden;
        pointer-events: none;

        transform: translateY(-8px);

        transition:
            opacity 0.2s ease,
            transform 0.2s ease,
            visibility 0.2s ease;

        z-index: 2100;
    }

    .header-nav-links.is-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }

}


@media (min-width: 1025px) {
    .site-header {
        height: var(--header-height-desktop);
    }
    .header-nav-container {
        width: 100%;
        max-width: 1350px;
    }
}

@media (max-width: 1024px) {
    .header-nav-container {
        max-width: none;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (max-width: 767px) {
    .header-nav-container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

@media (max-width: 480px) {
    .header-nav-container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}