@import url(base.css);

header {
        position: fixed;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        height: 48px;
        padding-left: 1em;
        padding-right: 1em;
        top: 0;
        left: 0;
        width: calc(100% - 2em);
        font-family: var(--font-family-header);
}

a.header-logo {
        display: flex;
        text-decoration: none;
        font-size: 1.4em;
        gap: 4px;
}
a.header-logo:hover {
        color: var(--color-blue);
        text-decoration: none;
}

img.header-logo {
        width: 28px;
        height: 28px;
        border-radius: 6px;
}

.menu {
        display: flex;
        flex-direction: row;
        list-style-type: none;
        margin: 0;
        padding: 0;
}

.menu>li {
        margin: 0 1.5em;
        overflow: hidden;
}

.menu>li>a {
        text-decoration: none;
}
.menu>li>a:hover {
        color: var(--color-blue);
        text-decoration: none;
}

.menu-button-container {
        display: none;
        height: 100%;
        width: 30px;
        cursor: pointer;
        flex-direction: column;
        justify-content: center;
        align-items: center;
}

#menu-toggle {
        display: none;
}

.menu-button,
.menu-button::before,
.menu-button::after {
        display: block;
        position: absolute;
        height: 4px;
        width: 30px;
        transition: transform 200ms cubic-bezier(0.23, 1, 0.32, 1);
        border-radius: 2px;
}

.menu-button::before {
        content: '';
        margin-top: -8px;
}

.menu-button::after {
        content: '';
        margin-top: 8px;
}

#menu-toggle:checked+.menu-button-container .menu-button::before {
        margin-top: 0px;
        transform: rotate(405deg);
}

#menu-toggle:checked+.menu-button-container .menu-button {
        background: rgba(255, 255, 255, 0);
}

#menu-toggle:checked+.menu-button-container .menu-button::after {
        margin-top: 0px;
        transform: rotate(-405deg);
}

@media (max-width: 1082px) {
        .menu-button-container {
                display: flex;
        }

        .menu {
                position: absolute;
                top: 0;
                margin-top: 50px;
                left: 0;
                flex-direction: column;
                width: 100%;
                justify-content: center;
                align-items: center;
        }

        #menu-toggle~.menu li {
                height: 0;
                margin: 0;
                padding: 0;
                border: 0;
                transition: height 200ms cubic-bezier(0.23, 1, 0.32, 1);
        }

        #menu-toggle:checked~.menu li {
                padding-left: 2em;
                border-bottom: 1px dotted var(--color-light-background);
                height: 44px;
                transition: height 200ms cubic-bezier(0.23, 1, 0.32, 1);
        }

        .menu>li {
                display: flex;
                justify-content: left;
                align-items: center;
                margin: 0;
                width: 100%;
        }
}

@media(prefers-color-scheme: light) {
        header {
                background: var(--color-card-light-background);
                border-bottom: 1px solid var(--color-light-background);
        }

        a.header-logo {
                color: black;
        }

        .menu>li>a {
                color: black;
        }

        .menu-button,
        .menu-button::before,
        .menu-button::after {
                background: black;
        }

        .menu>li {
                background: var(--color-card-light-background);
        }
}
@media(prefers-color-scheme: dark) {
        header {
                background: var(--color-card-dark-background);
                border-bottom: 1px solid var(--color-dark-background);
        }

        a.header-logo {
                color: white;
        }

        .menu>li>a {
                color: white;
        }

        .menu-button,
        .menu-button::before,
        .menu-button::after {
                background: white;
        }

        .menu>li {
                background: var(--color-card-dark-background);
        }
}
