@font-face {
    font-family: "atkinson_hyperlegible";
    font-style: normal;
    font-weight: 400;
    src: url('/assets/fonts/Atkinson-Hyperlegible-Regular-102.ttf') format('truetype');
}

@font-face {
    font-family: "atkinson_hyperlegible";
    font-style: italic;
    font-weight: 400;
    src: url('/assets/fonts/Atkinson-Hyperlegible-Italic-102a.ttf') format('truetype');
}

@font-face {
    font-family: "atkinson_hyperlegible";
    font-style: normal;
    font-weight: 700;
    src: url('/assets/fonts/Atkinson-Hyperlegible-Bold-102.ttf') format('truetype');
}

@font-face {
    font-family: "atkinson_hyperlegible";
    font-style: italic;
    font-weight: 700;
    src: url('/assets/fonts/Atkinson-Hyperlegible-BoldItalic-102.ttf') format('truetype');
}

@font-face {
    font-family: "No Tears";
    font-style: normal;
    font-weight: 400;
    src: url('/assets/fonts/No-Tears.ttf') format('truetype');
}

@font-face {
    font-family: "No Tears";
    font-style: normal;
    font-weight: 700;
    src: url('/assets/fonts/No-Tears-Bold.ttf') format('truetype');
}

@font-face {
    font-family: "Playpen Sans";
    src: url('/assets/fonts/PlaypenSans.ttf') format('truetype'),  url('/assets/fonts/PlaypenSans.woff2') format('woff2');
}


:root {
    --background-color:#c9d0df;
    --header-color: #1da099;
    --header-text-color: black;
    height: 100vh;
}

body {
    background: var(--background-color);
    margin: 0;
    padding: 0;
    font-family: 'Playpen Sans', Verdana, sans-serif;
    font-size: 1.1rem;
    font-weight: 300;
}

h1,
h2,
h3,
h4,
h5 {
    font-family: 'Playpen Sans', Verdana, sans-serif;
}

header {
    display: flex;
    background: var(--header-color);
    position: relative;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    height: 8rem;
}

#logo {
    padding: 0.5rem;
    border-radius: 1rem;
}

a:has(#logo) {
    /* needed to prevent slight bit of extra space, not sure why */
    display: flex;
    width: fit-content;
}

#hamburger {
    position: absolute;
    color: black;
    cursor: pointer;
    z-index: 9999;
    right: 8%;
    top: 20%;
}

#hamburger-toggle {
    opacity: 0;
    position: absolute;
    right: 3rem;
    top: 45%;
}

#hamburger svg {
    position: absolute;
}

header:has(#hamburger-toggle:checked) nav {
    display: flex;
    padding: 2rem;
}

#slices,
#x {
    display: none;
    color: #EEE;
}

header:has(#hamburger-toggle:checked) #x {
    display: block;
}

header:has(#hamburger-toggle:not(:checked)) #slices {
    display: block;
}

header:has(#hamburger-toggle:focus) svg {
    border: 1px solid currentColor;
}

#logo {
    height: 6.5rem;
}

header nav {
    background: var(--header-color);
    display: none;
    position: absolute;
    z-index: 1000;
    right: 0;
    top: 0px;
    font-size: 2rem;
}

header nav p {
    margin: 0;
}

header nav ul {
    list-style: none;
    padding: 0;
    margin: 1rem auto;
}

.nav-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 1rem 0;
    gap: 0.5rem;
}

.aligning-space {
    display: none;
}

.nav-section-header {
    max-height: 2.8rem;
}

nav a {
    color: var(--header-text-color);
}

/* Nav on desktop */
@media (min-width: 535px) {
    header {
        display: flex;
        flex-direction: row;
        gap: 1rem;
        align-items: center;
        justify-content: center;
        height: 100%;
    }

    #logo {
        height: 10rem;
    }
}

@media (min-width: 890px) {
    /* needed to center the logo in the middle, see
        https://stackoverflow.com/questions/28700805/aligning-elements-left-and-center-with-flexbox */
    header::after {
        content: '';
        flex: 1;
    }

    header nav {
        display: flex;
        color: #EEE;
        background-color: var(--header-color);
        position: unset;
        flex: 1;
    }


    nav ul {
        list-style-type: none;
        padding: 0;
    }

    .nav-sections {
        display: inline-flex;
        flex-direction: row;
        list-style-type: none;
        align-items: center;
        font-size: 1.6rem;
        margin: 0;
    }

    .nav-section {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        border-right: 2px solid var(--background-color);
        height: 100%;
        padding: 0 1rem;
    }

    .nav-section:last-child {
        border-right: none;
    }

    .nav-section-header {
        margin-top: 1rem;
    }

    .nav-section> :last-child {
        margin-bottom: auto;
    }

    header nav ul {
        margin: 0;
    }

    header #hamburger {
        display: none;
    }

    header #hamburger-toggle {
        display: none;
    }
}

h1 {
    text-align: center;
}

main {
    overflow: auto;
}