:root {
    --bg-color: #313131;
}

* {
    margin: 0;
    padding: 0;
}

body {
    background: #000;
    font-family: "Lucida Sans Typewriter", monospace;
    color: #fff;
}

#all-cont {
    position: relative;
    height: 100vh;
    height: 100dvh;
    opacity: 1;
    transition: opacity 200ms 100ms;
    overflow: hidden;
}

#all-cont.start-anim {
    opacity: 0;
}

#textlogo {
    width: 250px;
    height: auto;
}

#flex-cont {
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    position: absolute;
    height: 85%;
    width: 100%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

footer {
    position: absolute;
    bottom: 0;
    right: 0;
    padding: 8px;
    opacity: .6;
}

footer ul {
    display: flex;
    gap: 8px;
}

footer li {
    list-style: none;
}

footer a {
    color: #fff;
    text-decoration: none;
}

/* MIDDLE */

#mid-featured {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    row-gap: 6rem;
    justify-content: center;
}

#featured-img {
    height: 65%;
    cursor: pointer;
    position: relative;
}

#featured-img > img {
    height: 100%;
}

#featured-img::after {
    content: attr(tag);
    display: block;
    color: #646464;
    position: absolute;
    top: 100%;
    left: 0;
    font-family: "Lucida Sans Typewriter", monospace;
    font-size: .75rem;
    transition: color 100ms;
}
#featured-img > svg {
    fill: #646464;
    position: absolute;
    top: calc(100% + 16px);
    left: 0px;
    font-family: "Lucida Sans Typewriter", monospace;
    font-size: 2rem;
    transition: left 100ms, color 100ms, transform 100ms;
}
#featured-img:hover > svg {
    left: 16px;
    color: #fff;
    transform: scaleZ(1.2);
}
#featured-img:hover::after {
    color: #9e9e9e;
}

/* LEFT */

#left li {
    list-style: none;
    font-size: 1rem;
    color: #c9c9c9;
}

#left li:hover {
    color: #ffffff;
}

#left a {
    text-decoration: none;
    color: inherit;
}

#socials {
    margin-bottom: 4px;
}

#socials > a svg {
    fill: #c9c9c9;
    height: 16px;
}

#socials > a svg:hover {
    fill: #fff;
}

#socials #instagram {
    height: 18px;
    transform: translateY(2px);
}

/* RIGHT */

#right > a {
    text-decoration: none;
    height: 24px;
    width: 65px;
    display: block;
}

#right > a > div {
    position: relative;
    color: inherit;
    font-size: 1rem;
    color: #c9c9c9;
}

#right > a:hover > div {
    color: #fff;
}

#right > a > div > svg {
    color: #c9c9c9;
    position: absolute;
    top: calc(50% + .5px);
    right: 0;
    transform: translateY(-50%);
    font-family: "Lucida Sans Typewriter", monospace;
    font-size: 1.5rem;
    transition: right 100ms, color 100ms, transform 100ms;
}

#right > a:hover > div > svg {
    color: #fff;
    right: -8px;
    transform: translateY(-50%) scaleZ(1.2);
}


/* STORY SITE */
body.story {
    background: var(--bg-color);
}

.story-title-cont {
    width: max-content;
    left: max(64px, calc(48% - (min(500px, 70vh) + 256px) / 2));
    bottom: calc(50% + min(250px, 35vh) - 16px);
    position: absolute;
    font-size: 128px;
    opacity: .9;
}

.story-title-cont.second {
    left: unset;
    top: unset;
    right: 64px;
    bottom: 32px;
    opacity: .07;
    color: #000;
    font-size: 16rem;
    user-select: none;
    pointer-events: none;
}

.story-title {
    font-family: 'Big Caslon';
    font-size: inherit;
    position: relative;
}

#story-flex {
    position: absolute;
    top: 50%;
    left: 48%;
    transform: translate(-50%, -50%);
    display: flex;
    gap: 16px;
}

#story-right-flex {
    display: flex;
    flex-direction: column;
    gap: 32px;
    max-height: 100%;
    width: 256px;
}

#selected-img {
    --size: min(500px, 70vh);
    height: var(--size);
    min-height: var(--size);
    width: var(--size);
    min-width: var(--size);
    position: relative;
}

#selected-img::after {
    content: attr(tag);
    display: block;
    color: #fff;
    opacity: .5;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    font-family: "Lucida Sans Typewriter", monospace;
    font-size: .75rem;
    transition: color 100ms;
}

#selected-img > img {
    height: 100%;
    width: 100%;
    object-fit: contain;
}

#selected-img > #selected-img-cursor {
    position: absolute;
    filter: drop-shadow(0 0 4px rgb(0 0 0 / .2)) drop-shadow(0 0 2px rgb(0 0 0 / .2));
    user-select: none;
    pointer-events: none;
}

#img-grid {
    --img-size: 61px;
    display: grid;
    grid-template-columns: repeat(4, var(--img-size));
    grid-auto-rows: var(--img-size);
    gap: 4px;
}

#img-grid > img {
    object-fit: cover;
    height: 100%;
    width: 100%;
    opacity: .7;
    cursor: pointer;
    transition: opacity 80ms;
}

#img-grid > img.selected {
    outline: 2px solid rgba(255,255,255,.2);
    opacity: 1;
}

#img-grid > img:hover {
    opacity: 1;
}

#story-description {
    color: #fff;
    width: calc(100% - 16px);
    height: 300px;
    max-height: 300px;
    resize: none;
    background: rgba(0,0,0,.2);
    border: none;
    padding: 8px;
    scrollbar-width: thin;
}
#story-description::-webkit-scrollbar {
    width: 2px;
}
#story-description::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,.2);
}

#story-description:focus-visible {
    outline: none;
}

#fullImage {
    position: absolute;
    top: 0;
    left: 0;
    height: 100vh;
    width: 100vw;
    background-color: var(--bg-color);
    display: flex;
}

#fullImage > #fullImage-img {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    height: 100vmin;
    width: 100vmin;
    display: flex;
    justify-content: center;
    align-items: center;
}

#fullImage > #fullImage-img > img {
    object-fit: contain;
}

#fullImage > #previous {
    width: 30%;
    height: 100%;
    z-index: 5;
}

#fullImage > #next {
    width: 30%;
    height: 100%;
    z-index: 5;
    position: relative;
}

#fullImage > #close {
    width: 40%;
    height: 100%;
}

#fullImage > #closeCross {
    position: absolute;
    height: max-content;
    display: none;
    z-index: 6;
}

#fullImage > #cursor {
    position: absolute;
    display: none;
    user-select: none;
    pointer-events: none;
}

#fullImage > #cursor > svg {
    position: absolute;
    filter: drop-shadow(0 0 4px rgb(0 0 0 / .2)) drop-shadow(0 0 2px rgb(0 0 0 / .2));
}

#back-home > svg {
    padding: 20px 24px;
    opacity: .2;
    transition: opacity 80ms;
    cursor: pointer;
    display: block;
    width: max-content;
    transform: rotateZ(180deg);
}

#back-home {
    color: #fff;
    text-decoration: none;
    position: absolute;
}

#back-home > svg:hover {
    opacity: .8;
}


/* ARCHIVE SITE */
#archive {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 64px 0;
}

#archive .story {
    color: #fff;
    display: flex;
    justify-content: space-between;
    width: 300px;
    padding: 8px 14px;
    border: 1px solid #fff;
    cursor: pointer;
}

#archive .story:hover {
    background-color: rgba(255, 255, 255, .15);
}

#archive .story > div {
    user-select: none;
    pointer-events: none;
}

#archive > a {
    text-decoration: none;
}


@media only screen and (max-width: 900px) {

    /* STORY */

    .story-title-cont.second {
        display: none;
    }

    #back-home > div {
        font-size: 24px;
        padding: 16px 20px;
    }

    .story-title-cont {
        left: 50%;
        transform: translateX(-50%);
        font-size: 32px;
        bottom: unset;
        margin-top: 12px;
    }

    #story-flex {
        flex-direction: column;
        position: unset;
        transform: unset;
        margin-top: 72px;
        align-items: center;
    }

    #selected-img {
        --size: 95vw;
    }

    #story-right-flex {
        margin-top: 24px;
        width: 95vw;
        gap: 12px;
    }

    #story-description {
        height: 240px;
        max-height: 240px;
        margin-bottom: 12px;
    }

    #fullImage {
        height: 100vh;
        height: 100dvh;
    }

    #fullImage > #fullImage-img {
        height: 100%;
        width: 100%;
    }

    #fullImage > #fullImage-img > img {
        width: 100%;
        object-fit: none;
    }

    @media (max-aspect-ratio: 1/1) and (max-width: 900px) {
        #fullImage > #fullImage-img > img {
            object-fit: contain;
        }
    }

    #fullImage > #next, #fullImage > #previous {
        width: 50%;
    }

    #fullImage > #close {
        width: 0;
    }

    #fullImage > #closeCross {
        opacity: .33;
        padding: 16px 16px;
        display: block;
    }

    #img-grid {
        grid-template-columns: repeat(auto-fill, var(--img-size));
    }


    /* MAIN */

    footer {
        font-size: 12px;
    }

    #all-cont {
        overflow: auto;
    }

    #flex-cont {
        position: unset;
        transform: unset;
        height: unset;
        flex-direction: column;
    }

    #mid-featured {
        justify-content: unset;
        padding-top: 32px;
        gap: 24px;
        height: unset;
        width: 70%;
    }

    #featured-img, #featured-img > img {
        height: unset;
        width: 100%;
    }

    #textlogo {
        width: 150px;
    }

    #mobile {
        margin-top: 96px;
        display: flex;
        width: 100%;
        justify-content: space-around;
        align-items: center;
        margin-bottom: 48px;
    }

    #mobile li {
        list-style: none;
        font-size: 1rem;
        color: #c9c9c9;
    }
    
    #mobile li:hover {
        color: #ffffff;
    }
    
    #mobile a {
        text-decoration: none;
        color: inherit;
    }

    #mobile > a {
        text-decoration: none;
        height: 24px;
        width: 65px;
        display: block;
    }
    
    #mobile > a > div {
        position: relative;
        color: inherit;
        font-size: 1rem;
        color: #c9c9c9;
    }
    
    #mobile > a:hover > div {
        color: #fff;
    }
    
    #mobile > a > div > svg {
        content: "→";
        display: block;
        color: #c9c9c9;
        position: absolute;
        top: calc(50% + .5px);
        right: 0;
        transform: translateY(-50%);
        font-family: "Lucida Sans Typewriter", monospace;
        font-size: 1.5rem;
        transition: right 100ms, color 100ms, transform 100ms;
    }
    
    #mobile > a:hover > div > svg {
        color: #fff;
        right: -8px;
        transform: translateY(-50%) scaleZ(1.2);
    }
}