div#nav {
    background-color: rgb(55, 55, 55);
    position: sticky;
    top: 0;
    z-index: 5;
}

div#burger-underlay {
    display: none;
    position: fixed;
    top: 50px;
    bottom: 0;
    left: 0;
    right: 0;
}

div#burger-underlay.open {
    display: block;
}

.hide-on-desktop {
    display: none;
}

nav {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

nav a {
    height: 100%;
    padding: 0 20px;
    color: #fff;
    text-decoration: none;
    transition: all 100ms ease-in-out;
    user-select: none;
}

nav a:hover {
    background-color: #111;
}

nav a.home {
    line-height: 50px;
    font-size: 1.2rem;
}

nav div.links {
    display: flex;
}

nav div.links a {
    line-height: 50px;
}

nav button {
    width: 50px;
    border: none;
    background-color: #111;
    position: relative;
}

nav button div.bar {
    display: block;
    width: 25px;
    height: 2.5px;
    background-color: #ccc;
    border-radius: 15px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: all 250ms ease-in-out;
}

nav button div.bar:nth-child(1) {
    transform: translate(-50%, calc(-50% - 7px));
}

nav button div.bar:nth-child(3) {
    transform: translate(-50%, calc(-50% + 7px));
}

nav button.open div.bar:nth-child(1) {
    transform: translate(-50%, -50%) rotate(45deg);
}

nav button.open div.bar:nth-child(2) {
    transform: scale(0);
    opacity: 0;
}

nav button.open div.bar:nth-child(3) {
    transform: translate(-50%, -50%) rotate(-45deg);
}


@media only screen and (max-width: 780px) {
    .hide-on-desktop {
        display: block;
    }

    nav div.links {
        opacity: 0;
        pointer-events: none;
        position: fixed;
        top: 50px;
        right: 0;
        background-color: #111111ee;
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transform: translateY(-100%);
        transition: all 250ms ease-in-out;
    }

    nav div.links.open {
        opacity: 1;
        transform: translateY(0);
        pointer-events: all;
    }

    nav div.links a {
        height: fit-content;
        width: 100%;
        line-height: inherit;
        padding: 15px 20px;
    }
}