/* Website Made by Bence (bencebarens.nl) */

/* Header & footer */
header nav{
    z-index: 50;
    position: fixed;
    top: 0;
}

header nav ul{
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

header nav a{
    text-decoration: none;
}

header p{
    margin: 0 auto;
    padding: 0.4em 0.7em;
    border-radius: 50em;
    text-align: center;
    width: max-content;
    max-width: 100%;
    background-color: var(--color-primary);
}

header p span{
    font-variant-numeric: tabular-nums;
    padding: 0 0.1em;
}

footer{
    padding: 0 1em 3em 1em;
    text-align: center;
}

footer p{
    margin: 0 auto;
    font-size: 0.8em;
}

@media (min-width: 1000px) {
    header nav{
        left: 1em;
        top: 50%;
        transform: translateY(-50%);
    }

    header nav ul{
        flex-direction: column;
    }

    header nav li{
        background-color: var(--color-primary);
        width: max-content;
        padding: 0 0.2em;
    }

    header nav a[aria-current="page"]:after{
        content: "●";
        color: var(--color-accent);
        margin-left: 0.4em;
    }

    header p{
        position: fixed;
        top: 1em;
        left: 50%;
        transform: translateX(-50%);
        z-index: 50;
    }

    footer{
        position: fixed;
        padding: 1em;
        right: 0;
        bottom: 0;
        z-index: 50;
        text-align: right;
    }
}

@media (max-width: 1000px) {
    header nav{
        width: 100%;
        background-color: var(--color-primary);
        border-bottom: 0.1em solid var(--color-accent);
    }

    header nav ul{
        width: 100%;
        justify-content: space-around;
    }

    header nav li{
        width: 100%;
        position: relative;
        text-align: center;
    }

    header nav li a{
        display: inline-block;
        padding: 0.5em;
        position: relative;
    }

    header nav li:has(a[aria-current="page"]){
        border-bottom: 0.1em solid var(--color-accent);
    }

    header p{
        margin-top: 3.5em;
        padding: 0 1em;
    }
}

main{
    padding: 6em 1em 2em 1em;
    padding-top: 6em;
    min-height: 90vh;
}

@media (max-width: 1000px) {
    main{
        padding-top: 2em;
    }
}

/* SPLASH SCREEN //////////////////////////////////////////////// */

#splash-screen {
    position: fixed;
    inset: 0;
    background: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 900;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
    animation: splashFadeOut 0.5s cubic-bezier(.45,0,1,.1) forwards;
    animation-delay: 2s;
}

#splash-screen *{
    cursor: wait;
    touch-action: none;
}

#splash-screen p{
    font-size: 4em;
    transform: scaleY(3);
    opacity: 0;
    animation: splashFadeIn 0s linear forwards;
    animation-delay: 0.5s;
}

#splash-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

#splash-screen div{
    border: 0.3em solid var(--color-accent);
    width: 12em;
    height: 5em;
    position: absolute;
    opacity: 0;
    top: 50%;
    left: 50%;
    transform: translate(calc(-50% + 5em), -50%);
    animation: 
        frameSwoop 1.5s cubic-bezier(0,1,0,1) forwards, 
        splashFadeIn 0s linear forwards,
        frameSwoopBack 0.5s cubic-bezier(.45,-0.1,1,.1) forwards;
    animation-delay: 1s, 1s, 2s;
}

#splash-screen div:nth-last-of-type(1){
    width: 12em;
    height: 5em;
    z-index: 910;
}

#splash-screen div:nth-last-of-type(2){
    width: 17em;
    height: 10em;
}

#splash-screen div:nth-last-of-type(3){
    width: 30em;
    height: 23em;
}

#splash-screen div:nth-last-of-type(4){
    width: 60em;
    height: 53em;
}

#splash-screen div:nth-last-of-type(5){
    width: 90em;
    height: 83em;
}

@keyframes splashFadeIn {
    to { opacity: 1; }
}

@keyframes frameSwoop {
    from { width: 150em; height: 143em; }
}

@keyframes frameSwoopBack {
    to { width: 150em; height: 143em; }
}

@keyframes splashFadeOut {
    70% { opacity: 1; transform: scale(1.5); }
    100% { opacity: 0; transform: scale(3); }
}

@media (prefers-reduced-motion: reduce){
    #splash-screen{
        display: none;
    }
}

/* PIXEL GRID //////////////////////////////////////////////////// */

#y2k-grid{
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}

/* LIGHTBOX ////////////////////////////////////////////////////// */

#lightbox {
    border: none;
    background: transparent;
    padding: 1em;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

#lightbox::backdrop {
    background-color: rgba(0,0,0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

#lightbox[open] {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

#lightbox-media {
    display: grid;
    place-items: center;
    max-width: 80vw;
    max-height: 60vh;
    overflow: hidden;
    position: relative;
}

#lightbox-media img,
#lightbox-media video {
    grid-area: 1 / 1;
    max-width: 80vw;
    max-height: 60vh;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

#lightbox-media .media-placeholder {
    filter: blur(15px);
    transform: scale(1.05);
    transition: opacity 300ms ease;
    pointer-events: none;
}

#lightbox-media .media-full {
    opacity: 0;
    transition: opacity 300ms ease;
}

#lightbox-media .media-full.is-loaded {
    opacity: 1;
}

#lightbox-title {
    margin-top: 1.5em;
    text-align: center;
    max-width: 100%;
    color: white;
    line-break: anywhere;
}

#lightbox-close {
    position: fixed;
    color: white;
    top: 0.5em;
    right: 0.5em;
    background: none;
    border: none;
    font-size: 3em;
    font-weight: 200;
    line-height: 1;
    transition: transform 0.2s ease, color 0.2s ease;
    z-index: 10;
}

#lightbox-close:hover {
    color: var(--color-accent);
}

#carousel-stage.paused {
    animation-play-state: paused;
}