@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap');

:root
{
    ---white: whitesmoke;
}

body
{
    margin: 0;
    padding: 0;
    background-color: black;
    font-family: "Playfair Display", serif;
}

.header
{
    width: 100%;
    height: 100px;
    position: fixed;
    top: 0;
    display: grid;
    place-items: center;
    background-color: black;
    z-index: 10;
}

.header::before
{
    content: "";
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background-position: center top;
    background-size: 100% auto;
    background-repeat: repeat-x;
    opacity: 0.15;
    background-image: url("../gfx/textures/paint.jpg");
    mask-image: linear-gradient(to top, transparent 50%, black 100%);
}

.header > .logo
{
    height: 65px;
    aspect-ratio: 10/4;
    background-image: url("../gfx/logos/inline_logo.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: drop-shadow(0 0 3px black) drop-shadow(0 0 8px black);
    z-index: 10;
    opacity: 0;
    animation: logo_show 1.5s ease-in forwards;
}

@keyframes logo_show
{
    from
    {
        transform: translateY(calc(100% + 100px)) scale(3);
    }
    40%
    {
        transform: translateY(calc(100% + 100px)) scale(3);
        opacity: 1;
    }
    to
    {
        opacity: 1;
    }
}

.header > .back_button
{
    position: absolute;
    font-size: 24px;
    color: black;
    font-weight: bold;
    left: 0;
    transform: translateX(-100%);
    opacity: 0;
    transition: 0.3s;
    padding: 7px 18px;
    border-radius: 8px;
    background-color: var(---white);
    user-select: none;
    animation: button_show 0.5s 0.5s ease-in-out forwards;
}

.header > .back_button:hover
{
    cursor: pointer;
    background-color: lightgray;
}

.header > .back_button::before
{
    content: "🡸";
    display: inline-block;
    transition: 0.3s;
    margin-right: 10px;
}

.header > .back_button:hover::before
{
    transform: translateX(-6px);
}

.header > .back_button:active
{
    background-color: gray;
}

@keyframes button_show
{
    to
    {
        left: 80px;
        transform: translateX(0);
        opacity: 1;
    }
}

.gallery
{
    width: 100%;
    margin-top: 100px;
    box-sizing: border-box;
    padding: 50px 150px;
    height: fit-content;
    position: relative;
    display: flex;
    gap: 15px;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
}

.gallery > .folders_nav
{
    width: 15%;
    display: flex;
    flex-direction: row;
    gap: 10px;
    margin-bottom: 30px;
    margin-right: auto;
    color: var(---white);
}

.gallery > .folders_nav > span
{
    padding: 6px;
    font-size: 20px;
    font-weight: bold;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.gallery > .folders_nav > div
{
    padding: 8px 16px;
    border: 2px solid var(---white);
    border-radius: 8px;
    transition: 0.3s;
    user-select: none;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.gallery > .folders_nav > div:hover
{
    cursor: pointer;
    background-color: var(---white);
    color: black;
}

.gallery > .folders_nav > div:active
{
    background-color: darkgray;
    border-color: darkgray;
}

.gallery > .folder
{
    width: 100%;
    background-color: rgba(255, 255, 255, 0.06);
    padding: 15px 30px;
    border-radius: 10px;
}

.gallery > .folder > h1
{
    color: var(---white);
    margin-bottom: 30px;
    margin-top: 0;
    text-align: center;
    font-size: 35px;
}

.gallery > .folder > .images
{
    display: block;
}

.gallery > .folder > .images > div
{
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    display: inline-block;
    transition: 0.3s;
}

@keyframes show_image
{
    from
    {
        transform: translateY(30px);
        opacity: 0;
    }
    to
    {
        opacity: 1;
        pointer-events: auto;
    }
}

.gallery > .folder > .images > div:hover
{
    cursor: pointer;
    filter: drop-shadow(0 0 3px black);
}

.gallery > .folder > .images > div::before
{
    content: "";
    display: block;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    scale: 0;
    background-color: rgba(0, 0, 0, 0.4);
    transition: 0.2s;
    pointer-events: none;
}

.gallery > .folder > .images > div:hover::before
{
    scale: 1;
}

.gallery_popup
{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
    z-index: 20;
    user-select: none;
}

.gallery_popup::before
{
    content: "";
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    background-color: black;
    mask-image: linear-gradient(to left, black -10%, transparent 30%, transparent 70%, black 110%);
}

.gallery_popup.active
{
    opacity: 1 !important;
    pointer-events: auto !important;
}

.gallery_popup > .close_button
{
    position: absolute;
    bottom: 5%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 22px;
    color: var(---white);
    font-family: "Oswald", sans-serif;
    font-weight: bold;
    transition: 0.3s;
    filter: drop-shadow(0 0 5px black);
}

.gallery_popup > .close_button:hover
{
    cursor: pointer;
    text-decoration: underline;
}

.gallery_popup > .close_button:active
{
    color: gray;
}

.gallery_popup > .close_button:hover::before
{
    transform: translateX(-6px);
}

.gallery_popup > .previous_button, .gallery_popup > .next_button
{
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 40px;
    color: var(---white);
    font-weight: bold;
    transition: 0.3s;
    z-index: 2;
    filter: drop-shadow(0 0 5px black);
}

.gallery_popup > .previous_button:hover, .gallery_popup > .next_button:hover
{
    cursor: pointer;
}

.gallery_popup > .previous_button:active, .gallery_popup > .next_button:active
{
    color: gray;
}

.gallery_popup > .previous_button
{
    left: 10%;
}

.gallery_popup > .previous_button:hover
{
    transform: translateY(-50%) translateX(-4px);
}

.gallery_popup > .next_button
{
    right: 10%;
}

.gallery_popup > .next_button:hover
{
    transform: translateY(-50%) translateX(4px);
}

.gallery_popup > .image_foldername
{
    position: absolute;
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
    color: var(---white);
    filter: drop-shadow(0 0 5px black) drop-shadow(0 0 5px black);
}

.gallery_popup > .image
{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, calc(-50% - 20px));
    width: 80%;
    height: 80%;
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
    filter: drop-shadow(0 0 20px black);
}

@media (max-width: 900px)
{
    .header > .back_button
    {
        display: none;
    }

    .header > .mobile_back_button
    {
        position: absolute;
        font-size: 30px;
        color: var(---white);
        font-weight: bold;
        left: 0;
        transform: translateX(-100%);
        opacity: 0;
        transition: 0.3s;
        padding: 10px;
        margin-top: 10px;
        width: 40px;
        aspect-ratio: 1/1;
        border-radius: 50%;
        display: grid;
        place-items: center;
        user-select: none;
        animation: button_show 0.5s 1.5s ease-in-out forwards;
    }

    .header > .mobile_back_button::before
    {
        content: "◄";
        display: inline-block;
        transition: 0.3s;
    }

    @keyframes button_show
    {
        to
        {
            left: 25px;
            transform: translateX(0);
            opacity: 1;
        }
    }

    .gallery
    {
        gap: 15px;
        padding: 50px 15px;
        padding-bottom: 15px;
        margin-top: 75px !important;
    }

    .gallery > .folder > .images > div
    {
        pointer-events: none !important;
        height: auto !important;
        width: 100% !important;
    }

    .gallery > .folders_nav
    {
        width: 100% !important;
        justify-content: center !important;
        align-items: center !important;
        flex-wrap: wrap !important;
    }
    .gallery > .folders_nav > span
    {
        width: 100% !important;
        text-align: center !important;
        padding: none !important;
    }
}