.site-logo-link {
    height: 100%;
    max-height: var(--header--height);

    .site-logo {
        height: auto;
        width: 100%;
        max-width: 178px;
    }
}



header {
    position: fixed;
    z-index: var(--header--z-index);
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: var(--header--max-width);
    width: 100%;
    height: var(--header--height);
    /* background: linear-gradient(180deg, rgba(var(--color--background), 1) 0%, rgba(0, 0, 0, 0) 100%); */
    backdrop-filter: blur(4px);
   /*  mask: linear-gradient(180deg, black 0%, black 80%, transparent); */

    .header-content {
        display: flex;
        align-items: center;
        max-width: var(--header--content--max-width);
        width: 100%;
        height: 100%;
        padding: 0 var(--spacing--m);
    }

    .divider {
        opacity: 0.5;
    }
}

nav {
    display: flex;
    margin-left: auto;
    margin-bottom: 0;
    gap: var(--spacing--l);
    height: 100%;
    align-items: center;

    a {
        position: relative;
        text-decoration: none;
        /* font-weight: 200; */
        letter-spacing: 0.8px;
        text-transform: uppercase;
        color: var(--color--text--secondary);

        &::after {
            content: "";
            position: absolute;
            height: 2px;
            width: 0px;
            left: calc(50% - 2px);
            bottom: calc(var(--spacing--xs) * -1);
            background-color: var(--color--text--secondary);
            transition: 0.2s width, 0.2s left, 0.2s color;
            /* transform: scaleX(0.1);
            transform-origin: center; */
        }

        &:hover {
            color: var(--color--text--highlight);

            &:after {
                width: 90%;
                left: 5%;
            }
        }

        &.active {
            color: var(--color--text--highlight);

            &:hover {
                &:after {
                    width: 90%;
                    left: 5%;
                }
            }

            &:after {
                width: 2px;
                left: calc(50% - 1px);
                background-color: var(--color--text--secondary);
            }
        }
    }
}

.socials {
    gap: var(--spacing--base);

    .social-link {
        fill: var(--color--text--primary);
        width: 24px;
        aspect-ratio: 1/1;

        &:after {
            display: none;
        }

        &.youtube {
            width: 32px;
        }
    }
}

.nav-toggle {
    display: none;

    &:checked + .hamburger {
        & .bar {
            opacity: 0;
        }

        & .bar:first-of-type {
            opacity: 1;
            width: calc(100% + 2px);
            transform: rotate(45deg);
        }

        & .bar:last-of-type {
            opacity: 1;
            width: calc(100% + 2px);
            transform: rotate(-45deg);
        }
    }
}

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    height: 26px;
    width: 32px;
    /* aspect-ratio: 1/1; */
    margin-right: var(--spacing--base);

    .bar {
        display: flex;
        height: 2px;
        width: calc(100% - 4px);
        background-color: var(--color--text--primary);
        transition: 0.2s transform, 0.2s opacity;
        margin-left: 2px;

        &:first-of-type {
            transform-origin: 0% 50%;
        }

        &:last-of-type {
            transform-origin: 0% 50%;
        }
    }
}

@media screen and (max-width:768px) {

    html:has(.nav-toggle:checked) {
        overflow: hidden;
    }

    header {
        transition: 0.2s backdrop-filter;
        
        nav {
            margin: 0 auto;
        }

        .header-content {
            display: flex;
            flex-direction: column;
            justify-content: center;
            position: fixed;
            top: 0;
            width: 100%;
            height: 100dvh;
            backdrop-filter: blur(4px);
            background-color: rgba(0,0,0,0.5);
            gap: var(--spacing--2xl);
            pointer-events: none;

            visibility: hidden;
            z-index: -1;
            opacity: 0;
            transition: 0.2s opacity;

            nav {
                height: auto;
                flex-direction: column;

                .divider {
                    display: none;
                }
            }

            .socials {
                flex-direction: row;
            }
           
        }

        &:has(.nav-toggle:checked) {
            /* background-color: rgba(0,0,0,0.5); */
            backdrop-filter: none;
        }
    }

    nav {
        gap: var(--spacing--base);
        font-size: var(--font-size--h5);
        
        a {
            letter-spacing: 2px;
        }
    }

    .hamburger {
        display: flex;
        margin-left: auto;
        z-index: calc(var(--header--z-index) + 1);
    }

    .nav-toggle {
        &:checked ~ .header-content {
            visibility: visible;
            z-index: var(--header--z-index);
            opacity: 1;
            pointer-events: all;
            
        }
    }
}