:root {
    --navbar-height: 50px;
}

header {
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* the desktop ul */
.desktop {
    list-style-type: none;
    margin: 0;
    padding: 0;
    padding-left: 10px;
    overflow: hidden;
    background-color: var(--gray-furrygourdin);
    height: var(--navbar-height);
}

/* each nav item */
.desktop > li {
    float: left;
    height: 100%;
}

/* links in bio */
.desktop > li > a {
    display: block;
    color: white;
    text-align: center;
    text-decoration: none;
    height: 100%;
    align-content: center;
    margin: 0 10px;
}

.desktop > li > a > img {
    max-height: var(--navbar-height);
}

.desktop > li > a:hover {
    background-color: var(--gray-furrygourdin-darker);
}

/* ---------------------------------------------- */

.mobile {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    background-color: #333;
    color: #FFF;
    height: 50px;
    padding: 0 1em 0 5px;
}

.mobile > a > img {
    max-height: 50px;
}

.menu {
    display: flex;
    flex-direction: row;
    list-style-type: none;
    margin: 0;
    padding: 0;
}

.menu > li {
    margin: 0 1rem;
    overflow: hidden;
    z-index: 10;
}

.menu > li > a {
    display: block;
    color: white;
    width: 100%;
    text-align: center;
    padding: 14px 16px;
    text-decoration: none;
    font-family: sans-serif;
    font-size: larger;
}

.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;
    background-color: #fff;
    position: absolute;
    height: 4px;
    width: 30px;
    transition: transform 400ms 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 screen and (min-width: 769px){
    .desktop {
        display: block;
    }

    .mobile {
        display: none;
    }
}

@media screen and (max-width: 768px){
    .desktop {
        display: none;
    }

    .mobile {
        display: flex;
    }

    .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 400ms cubic-bezier(0.23, 1, 0.32, 1);
    }
    #menu-toggle:checked ~ .menu li {
        border: 1px solid #333;
        height: 2.5em;
        padding: 0.5em;
        transition: height 400ms cubic-bezier(0.23, 1, 0.32, 1);
    }
    .menu > li {
        display: flex;
        justify-content: center;
        margin: 0;
        padding: 0.5em 0;
        width: 100%;
        color: white;
        background-color: #222;
    }
    .menu > li:not(:last-child) {
        border-bottom: 1px solid #444;
    }
}