/*  this is the only thing required for view transitions to work
    it provides a fade from one page to the next.
    auto
*/
@view-transition {
    navigation: auto;
}


/*
     the view-transition root holds groups of transitions.
     Each view-transition has two images:
         an old image (render of what was on the last page)
         a new image (live render of new page)
     they are both rendered as a css replaced content
 */
::view-transition-old(root) {
    animation: .25s ease-in-out both fade-out;
}

::view-transition-new(root) {
    animation: .25s ease-in-out .1s both fade-in;
}

.text-content{
    view-transition-name: text-pt;
}
/*
::view-transition-new(text-pt) {
    animation: .6s ease-out both slide-in;
}
::view-transition-old(text-pt) {
    animation: .5s ease-out both .1s slide-out;
}
 */

.image-content{
    view-transition-name: image-pt;
}
::view-transition-new(image-pt) {
    animation: .6s ease-out both rise-in;
}
::view-transition-old(image-pt) {
    animation: .6s ease-out both drop-out;
}


.image-item{
    /*
    transition: .3s ease-in-out var(--delay);
    @starting-style{
        opacity: 0;
    }
    */
}

body {
    --hightlight: #f34836;
    --dark-background: #0a0e4a;
    display: flex;
    flex-wrap: wrap;
    background: var(--dark-background);
    color: #eee;
    font-size: 1em;
    font-family: 'Roboto', sans-serif;
}

header {
    view-transition-name: header-pt;
    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-pt;
    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;
            padding: 1rem;
        }

        &: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);
    }
}

.text-content {
    view-transition-name: text-pt;
}

.image-item {
    display: inline-block;
    width: 10%;
    margin: 0 3% 3% 0;
}
.image-item-large {
    display: inline-block;
    width: 30%;
    margin: 0 3% 3% 0;
}

footer {
    view-transition-name: 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;
    }
}

@keyframes fade-out {
    to {
        opacity: 0;
    }
}

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

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

@keyframes rise-in {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
}

@keyframes drop-out {
    to {
        opacity: 0;
        transform: translateY(-15px);
    }
}
