nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 5rem;

    display: flex;
    align-items: center;
    justify-content: end;

    padding: 0.75rem 1rem;

    background-color: var(--secondary-bg-colour);

    z-index: 999;
}

nav .logo {
    margin-right: auto;

    display: inline-block;
    height: 100%;
}

nav .logo img {
    height: 100%;
}

nav .links {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
nav .links .nav-x {
    display: none;

    margin-bottom: 2rem;
}
nav .links .nav-x svg {
    height: 2rem;
}

nav .links a {
    text-decoration: none;

    font-size: 1rem;

    transition: opacity 0.25s;
}

nav .links a:hover {
    opacity: 0.5;
}

nav .nav-hamburger {
    display: none;
}
nav .nav-hamburger svg {
    height: 2rem;
}

nav .nav-toggle {
    display: none;
}

nav .nav-toggle:checked ~ .nav-overlay {
    opacity: 0.5;
    pointer-events: all;
}

nav .nav-toggle:checked ~ .links {
    translate: 0 0;
}

@media (max-width: 768px) {
    nav .nav-overlay {
        position: fixed;
        inset: 0;

        background-color: black;

        pointer-events: none;

        opacity: 0;

        transition: opacity 0.25s;
    }

    nav .links {
            position: fixed;
            top: 0;
            bottom: 0;
            right: 0;
            width: 300px;
            max-width: 100%;

            translate: 100% 0;

            flex-direction: column;
            justify-content: start;
            align-items: end;
            
            padding: 3rem;

            background-color: var(--secondary-bg-colour);

            transition: translate 0.25s;
    }
    nav .links .nav-x {
        display: block;
    }

    nav .links a {
        font-size: 1.5rem;
    }

    nav .nav-hamburger {
        display: block;
    }
}