body>header nav ul {
    flex-direction: column;
}

#menu-btn {
    display: block;
    height: calc(1rem);
    width: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: absolute;
    right: 1rem;
    z-index: 1;
}

#menu-btn>span {
    display: block;
    height: 4px;
    width: 100%;
    background-color: #505050;
}

#menu-btn>span:nth-of-type(1) {
    transform-origin: 0% 0%;
    transition: .3s;
}

#menu-btn>span:nth-of-type(2) {
    transition: .15s;
}

#menu-btn>span:nth-of-type(3) {
    transform-origin: 0% 100%;
    transition: .3s;
}

nav input[type=checkbox] {
    appearance: none;
    width: 1.25rem;
    height: 1.25rem;
    margin: 0;
    z-index: 2;
    cursor: pointer;
}

nav input[type=checkbox]:checked~#menu-btn>span:nth-of-type(1) {
    transform: rotate(-45deg)translateX(calc(-.5rem))translateY(calc(.75rem - 1px));
}

nav input[type=checkbox]:checked~#menu-btn>span:nth-of-type(2) {
    transform: scale(0);
}

nav input[type=checkbox]:checked~#menu-btn>span:nth-of-type(3) {
    transform: rotate(45deg)translateX(calc(-.5rem))translateY(calc(-.75rem + 1px));
}

nav input[type=checkbox]:checked~#menu {
    display: flex;
}

#menu {
    display: none;
    flex-direction: column;
    gap: 1.5rem;
    position: fixed;
    top: var(--header-height);
    right: 0;
    z-index: 1;
    padding: 2rem;
    background-color: #fff;
    width: 100%;
    height: calc(100vh - var(--header-height));
}
