@view-transition {
    navigation: auto;
}
/* this would apply transition to everything */
/*
::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: .5s;
}
*/

::view-transition-new(header-pt) {
    animation: .5s ease-in-out both slide-in;
}
::view-transition-old(header-pt) {
    animation: .5s ease-in-out both slide-out;
}
body {
    --hightlight: #f34836;
    --dark-background: #333;
    display: flex;
    flex-wrap: wrap;
    background: var(--dark-background);
    color: #eee;
    font-size: 1em;
    font-family: 'Roboto', sans-serif;
}

header {
    display: block;
    width: 100dvw;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    font-size: 2rem;
    font-weight: bold;
    color: var(--hightlight);
}

nav {
    view-transition-name: nav;
    flex: auto 1;

    & li {
        list-style: none;
        padding: .5rem;
        color: var(--hightlight);
        text-align: center;
        border-bottom: 1px dotted #f34836;
        transition: filter .5s ease-in-out;

        & a {
            text-decoration: none;
            color: inherit;
        }

        &:hover {
            filter: brightness(500%) saturate(0%);
        }
    }
}

main {
    flex-basis: 75%;
    background: var(--dark-background);
    padding: 0 3rem;
    font-size: 1.5rem;

    & h1, h2 {
        color: var(--hightlight);
    }

    .image-item {
        width: 43%;
        margin:0 3% 3% 0;
    }
}
footer {
    display: flex;
    height: 50px;
    width: 100dvw;
    bottom: 0;
    border-top: 1px solid #888;
    align-items: center;
    position: fixed;
    background: var(--dark-background);
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
}

@keyframes fade-out {
    to {
        opacity: 0;
        transform: translateX(-30px);
    }
}

@keyframes slide-in {
    from {
        opacity: 0;
        transform: translateX(60px);
    }
}

@keyframes slide-out {
    to {
        opacity: 0;
        transform: translateX(-60px);
    }
}
