:root {
    --header-transition-duration: 0.3s;
}

#site-header {
    height: 88px !important;
    width: 100%;
}

#site-header .stickyy {
    background: var(--background);
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
    border-bottom: 1px solid var(--line-1);
    margin-top: 0 !important;
    max-width: 100% !important;
    opacity: 1;
    transition: opacity 0.45s ease;
    top: 0px;
    bottom: auto;
    transform: translate3d(0, 0, 0);
    position: fixed;
    z-index: 5;
    width: 100%;
}

.top-bar {
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    background: transparent;
    transition: min-height var(--header-transition-duration) ease;
}

.top-bar-left {
    display: flex;
    align-items: center;
}

.site-name {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-decoration: none;
    transition: font-size var(--header-transition-duration) ease;
    color: var(--text);
}

.site-name:hover {
    color: var(--text);
}

.header-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    flex-shrink: 0;
    /* transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform; */
    transition: font-size var(--header-transition-duration) ease;
}

.desktop-navigation .menu {
    gap: 0;
    background: transparent;
}

.desktop-navigation a {
    font-size: 0.9375rem;
    text-decoration: none;
    display: initial;
    transition: padding var(--header-transition-duration) ease, font-size var(--header-transition-duration) ease;
}

/* .desktop-navigation .menu li:last-child a {
    padding-right: 0;
} */

.desktop-navigation a:hover,
.mobile-navigation a:hover {
    color: var(--accent-1);
}

.menu-toggle {
    display: none;
    border: 0;
    background: transparent;
    padding: 0.5rem;
    cursor: pointer;
    position: absolute;
    right: 0.75rem
}

/* ========================================
   Scrolled Header
   ======================================== */
.scrolled #site-header .stickyy {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.scrolled #site-header .top-bar {
    min-height: 54px;
}

.scrolled #site-header .site-name {
    font-size: 1.05rem;
}

.scrolled #site-header .header-logo {
    width: 26px;
    height: 26px;
}

.scrolled #site-header .desktop-navigation a {
    font-size: 0.88rem;
}

@media screen and (max-width: 63.9375em) {
    #site-header {
        height: 62px !important;
    }

    .top-bar {
        min-height: 62px;
    }

    .scrolled #site-header .top-bar {
        min-height: 50px;
    }
}

/*  Fix scrolled header flicker on page reload  */
/* html.header-state-pending #site-header,
html.header-state-pending #site-header *,
html.header-state-pending #site-header .top-bar,
html.header-state-pending #site-header .site-name,
html.header-state-pending #site-header .header-logo,
html.header-state-pending #site-header .desktop-navigation a {
    transition: none !important;
} */


/* Subtle header fade-in after initial setup */
#site-header .stickyy {}

/* Keep the header hidden until its initial state is set */
html.header-state-pending #site-header .stickyy {
    opacity: 0;
    transition: none !important;
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
    #site-header .stickyy {
        transition: none;
    }
}

.off-canvas {
    padding-top: 1rem;
    background: rgb(23, 23, 23);
}

.off-canvas .close-button {
    font-size: 2.4em;
    top: 0.7rem;
    color: var(--background);
}

body.scrolled .close-button {
    top: 0.4rem;
}

.off-canvas .menu {
    padding-left: 0.5rem;
}

.off-canvas .menu a {
    color: var(--background);
}

.off-canvas .logo-bg {
    position: absolute;
    bottom: 4%;
    left: 8%;
    opacity: 0.15;
    z-index: 1;
    width: 84%;
    height: auto;
}

.off-canvas .on-top {
    position: relative;
    z-index: 2;
}

.menu-icon::after {
    background: var(--text);
    box-shadow: 0 6px 0 var(--text), 0 12px 0 var(--text);
}

/* 639px */
@media (max-width: 39.9375em) {
    .top-bar {
        min-height: 72px;
    }

    .desktop-navigation {
        display: none;
    }

    .menu-toggle {
        display: block;
    }
}

/* Behind the Systems navigation link */
/* .behind-the-systems.nav {
    position: relative;
} */

.behind-the-systems .ph-atom {
    background: linear-gradient(135deg,
            #6fc5f4,
            #7bd4ad,
            #c5a0f3,
            #3187B8,
            #8B62B5);
    background-size: 250% 250%;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    animation: nav-gradient-orbit 5s linear infinite;
    display: inline-block;
    font-size: 1rem;
    ;
    /* transition: filter 0.3s ease; */
}


.off-canvas .behind-the-systems .ph-atom {
    margin-right: 2px;
}

.top-bar .behind-the-systems .ph-atom,
.site-footer .behind-the-systems .ph-atom {
    position: relative;
    top: 0.01875rem;
}

span.behind-the-systems .ph-atom {
    animation: nav-gradient-orbit 13s linear infinite;
}

/* .behind-the-systems.nav a:hover .ph-atom,
span.behind-the-systems:hover .ph-atom {
    filter: brightness(1.2) saturate(1.2);
    animation-play-state: paused;
} */

@keyframes nav-gradient-orbit {
    0% {
        background-position: 0% 50%;
        transform: rotate(0deg);
    }

    25% {
        background-position: 100% 50%;
        transform: rotate(90deg);
    }

    50% {
        background-position: 0% 50%;
        transform: rotate(180deg);
    }

    75% {
        background-position: 100% 50%;
        transform: rotate(270deg);
    }

    100% {
        background-position: 0% 50%;
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .behind-the-systems .ph-atom {
        animation: none;
    }
}


/* =========================================

   FOOTER

========================================= */
.site-footer {
    padding: 3rem 0rem 1rem 0;
    border-top: 1px solid var(--line-1);
    margin-top: 0;
    overflow: hidden;
    background: var(--surface);
}

.footer-logo {
    max-width: 64px;
    height: auto;
    width: 100%;
}

.site-footer .menu {
    background: transparent;
}

.site-footer .menu a {
    font-size: 0.9rem;
    text-decoration: none;
    padding: .5rem 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.site-footer .menu li:last-child a {
    padding-right: 0;
}

.site-footer .footer-nav i {
    display: inline-block;
    line-height: 1;
    flex-shrink: 0;
    font-size: 0.9375rem;
    padding-top: 1px;
}

.site-footer .nav-wrap {
    padding-right: 0;
}

.copyright {
    margin: 0;
    color: var(--muted);
    font-size: 0.8rem;
    margin-top: 1.05rem;
    opacity: 0.9;
}