:root {
    --primary-color: rgb(28, 28, 28);
    --yellow-color: rgb(255, 208, 0);
}

body {
    margin: 0;
}

header {
    display: grid;
    grid-template-columns: auto auto;
    grid-template-areas: "logo hambox";
    background-color: var(--primary-color);
}

.logo {
    grid-area: logo;
    padding: 0;
    margin: 0;
}

.logo > h1 {
    padding: 0.4em 1em;
    margin: 0;
    font-family: 'Brush Script MT', cursive;
    color: var(--yellow-color);
}

.hambox {
    grid-area: hambox;
    color: white;
}

#hamburger {
    display: none;
}

.pages {
    display: flex;
    justify-content: flex-end;
    gap: 2em;
    margin-right: 2em;
}

.pages > button {
    padding: 1em 0;
    color: white;
    font-size: 1.2em;
    background-color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.pages > button:hover {
    cursor: pointer;
}

@media (max-width: 800px) {
    .hambox {
        display: flex;
        align-items: center;
        justify-content: right;
        padding-right: 1em;
    }

    .hamburger {
        position: relative;
        display: block;
        background-color: var(--yellow-color);
        border: 1px solid var(--primary-color);
        padding: 5px 13px;
        border-radius: 5px;
        cursor: pointer;
    }

    .hamburger > div {
        width: 18px;
        height: 2px;
        background-color: white;
        margin: 4px 0;
    }

    input {
        display: none;
    }

    .pages {
        transform: translate(-150%);
        transition: transform 0.5s ease-in-out;
        flex-direction: column;
        justify-content: center;
        width: 100%;
        gap: 0;
        position: absolute;
        top: 4em;
        left: 0;
        background-color: var(--primary-color);
        border-top: 2px solid rgb(73, 73, 73);
    }

    input:checked ~ .pages {
        transform: translateX(0);
    }

    .pages > button {
        border-bottom: 1px solid rgb(73, 73, 73);
        padding: 1em;
    }

    .hamburger {
        transition: padding 0.4s ease-in-out;
    }

    .hamburger>div:nth-child(1) {
        transform-origin: 0% 0%;
        transition: transform 0.4s ease-in-out;
    }

    .hamburger>div:nth-child(2) {
        transition: transform 0.2s ease-in-out;
    }

    .hamburger>div:nth-child(3) {
        transform-origin: 0% 100%;
        transition: transform 0.4s ease-in-out;
    }

    input:checked ~ .hamburger {
        padding-right: 7px;
    }
    
    input:checked ~ .hamburger>div:nth-child(1) {
        transform: rotate(45deg);
    }

    input:checked ~ .hamburger>div:nth-child(2) {
        transform: scaleY(0);
    }
    
    input:checked ~ .hamburger>div:nth-child(3) {
        transform: rotate(-45deg);
    }
}
