header {
    position: fixed;
    top: 0;
    left: 0;
    width: 90%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4vh 5%;
    box-shadow: 0 0 3px var(--aux-color-2); 
    background-color: var(--base-color);
    z-index: 5;
}

html[data-scroll="0"] header {
    box-shadow: none;
    background-color: transparent;
}

#header-logo,
#header-logo img {
    display: block;
    height: 100%;
}

html[data-scroll="0"] #sandwich,
html[data-scroll="0"] #sandwich::before,
html[data-scroll="0"] #sandwich::after {
    background-color: var(--aux-color-1);
}

#menu-toggle {
    display: none;
}

#sandwich,
#sandwich::before,
#sandwich::after {
    content: '';
    display: block;
    background-color: var(--highlight-color);
    width: 2em;
    height: 0.4em;
    position: relative;
    top: 0;
    z-index: 10;
    transform: rotate(0deg);
}

#sandwich::before,
#sandwich::after {
    position: absolute;
    transform: translateY(-150%) rotate(0deg);
}

#sandwich::after {
    transform: translateY(150%) rotate(0deg);
}

#header-logo, #header-logo > svg {
    background: none;
    height: 5vh;
    width: auto;
}

#menu-toggle:checked ~ #sandwich {
    transform: rotate(45deg);
}

#menu-toggle:checked ~ #sandwich::before,
#menu-toggle:checked ~ #sandwich::after {
    transform: translateY(0) rotate(-90deg);
}

#menu-toggle:checked ~ nav {
    transform: translateX(-100vw);
}

#menu-toggle:not(:checked) ~ nav {
    transform: translateX(0);
}

header > nav ul,
header > nav li {
    margin: 0;
}

header > nav a {
    font-family: var(--aux-font);
}

header > nav > ul > li:hover > a:last-child,
header li li a:hover {
    color: var(--highlight-color);
    transition: all 0.2s ease-in-out;
}

html[data-scroll="0"] header > nav > ul > li:hover > a:last-child {
    color: var(--aux-color-1);
}

header > nav > ul > li:not(:hover) > a:last-child,
header li li a:not(:hover) {
    transition: all 0.2s ease-in-out;
}

@media screen and (orientation:landscape) {

    header {
        height: 4vh;
    }

    html[data-scroll="0"] header {
        height: 6vh;
    }

    html[data-scroll="0"] header > nav > ul > li > a {
        color: var(--base-color);
    }

    html[data-scroll="0"] header > nav > ul > li::before {
        border-color: var(--aux-color-1);
    }

    #header-logo, #header-logo > svg {
        height: 6vh;
    }

    header > nav {
        height: auto;
        width: auto;
        position: static;
    }

    header > nav,
    header > nav ul {
        display: flex;
        justify-content: center;
        flex-direction: column;
        width: max-content;
        margin: 0;
    }
    
    #sandwich {
        display: none;
    }

    header > nav a {
        font-size: 0.75em;
    }

    header > nav > ul {
        flex-direction: row;
    }

    header > nav > ul > li::before {
        content: "";
        width: 0.25em;
        height: 0.25em;
        position: absolute;
        left: 0;
        top: 50%;
        transform: translate(-125%, -40%) rotate(45deg);
        border-top: 1px solid var(--highlight-color);
        border-right: 1px solid var(--highlight-color);
    }
    
    header > nav > ul > li:has(ul):hover::before {
        transform: translate(-125%, -40%) rotate(135deg);
    }

    header > nav > ul {
        gap: 1em;
        justify-content: space-between;
    }

    header > nav li {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        position: relative;
        margin: 0;
        padding: 0.25em;
    }

    header > nav li > ul {
        display: none;
        position: absolute;
        left: -0.5em;
        top: 100%;
        padding: 0.5em;
        background-color: var(--base-color);
        box-shadow: 1px 1px 2px var(--aux-color-2);
        border-radius: 0.25em;
    }

    header > nav li:hover > ul {
        display: flex;
    }

}

@media screen and (orientation: portrait) {

    header > nav {
        position: fixed;
        top: 0;
        left: 100%;
        height: 100vh;
        width: 100vw;
        background-color: var(--base-color);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 1em;
    }

    header > nav > ul > li > a {
        background-color: var(--highlight-color) !important;
        color: var(--base-color) !important;
    }

    header > nav ul > li {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        margin-top: 0.5em;
    }

    header > nav a {
        background: none !important;
        width: 70vw;
        text-align: center;
        padding: 0.25em;
        border: 2px solid var(--highlight-color);
        border-radius: 0.25em;
    }

}