@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

:root {
    --vg: #0f0f0f;
    --bg: #fafafa;

    --t1: 2.5vw;
    --t2: 1.7vw;
    --t3: 1vw;
    --t4: 0.8vw;

    --font: "Inter", sans-serif;
    --black: 900;
    --bold: 700;
    --normal: 400;
}

* {
    margin: 0;
    padding: 0;
    border: 0;

    font-family: var(--font);
    font-weight: var(--normal);
    font-optical-sizing: auto;
    font-size: 100%;
    font-style: normal;
    text-decoration: none;
    color: var(--vg);

    overflow: visible;
}

b {
    font-weight: var(--bold);
}

a {
    color: var(--vg);
    text-decoration: none;
}

html {
    background-color: var(--bg);
    height: 100%;
    width: 100%;
}

body {}

.top {
    top: 0;
    width: 70vw;
    height: 20vh;
    padding: 0 15vw 0 15vw;
    position: fixed;
    z-index: 1;

    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(1, 1fr);

    overflow: visible;

    background: linear-gradient(0deg, var(--bg) 0%, transparent 200%);
    box-shadow: inset 0 5vh 10vh var(--bg), 0 -15vh 20vh var(--vg);
}

/* if support for blur */
@supports ((-webkit-backdrop-filter: none) or (backdrop-filter: none)) {
    .top {
        background: linear-gradient(0deg, var(--bg) 0%, transparent 120%);
        box-shadow: inset 0 2vh 10vh var(--bg), 0 -15vh 20vh var(--vg);
        backdrop-filter: blur(0.8vw) brightness(1.0) saturate(1);
        -webkit-backdrop-filter: blur(0.8vw) brightness(1.0) saturate(1);
    }
}

.main {
    width: 100%;
    height: auto;
    grid-column: 1 / span 3;
    display: block;
}

.logo {
    width: 7vw;
    height: 100%;
    float: left;
    padding-right: 2vw;
    object-fit: contain;
}

.headline {
    width: auto;
    height: 100%;
    align-content: space-around;
    overflow: visible;
}

.name {
    width: 100%;
    color: var(--vg);
    font-weight: var(--bold);
    font-size: var(--t1);
    line-height: 1em;
}

.describtion {
    width: 100%;
    overflow: visible;
    color: var(--vg);
    font-size: var(--t2);
}

.nav {
    width: 100%;
    height: 100%;
    align-content: center;
    overflow: visible;

    text-align: right;

    grid-column: 4 / span 2;
}

.nav a {
    transform: translateX(1vw);

    font-size: var(--t3);
    color: var(--vg);

    padding: 0.5vw 1vw;
    border: 0px solid var(--bg);
    border-radius: 0.5vw;

    transition: 0.5s;
}

.nav a:hover {
    color: var(--vg);
    cursor: pointer;
    border-radius: 0.5vw;
    box-shadow: 0 0 2vw var(--bg);
    text-decoration: underline;
}

/* IMG GRID */
.grid {
    width: 80vw;
    height: auto;
    margin: 20vh 10vw 0 10vw;

    column-count: 3;
    column-gap: 2vw;
    break-inside: avoid;
}

.grid-item {
    position: relative;
    break-inside: avoid;
    margin-bottom: 2vw;
}

.gridimg {
    position: relative;
    width: 100%;
    height: auto;
    display: block;

    border-radius: 8px;

    object-fit: contain;

    opacity: 0;
    animation: FadeIn 1s ease-out 0s;
    animation-fill-mode: forwards;
    transition: 0.5s;
}

.placeholder {
    visibility: hidden;
}

.zoom-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    cursor: pointer;
}

.zoom-img:hover {
    transform: translate3d(-0.5vw, 0.5vw, 0);
}

.gridimg:nth-child(odd) {
    animation-delay: 1s;
}

.gridimg:nth-child(even) {
    animation-delay: 0.25s;
}

@keyframes FadeIn {
    0% {
        opacity: 0;
        -webkit-filter: blur(10px);
        filter: blur(10px);
    }

    100% {
        opacity: 100;
        -webkit-filter: blur(0px);
        filter: blur(0px);
    }
}

.imgv {
    display: none;
}

.imgh {
    display: block;
}

.lightbox {
    position: fixed;
    display: flex;
    inset: 0;
    justify-content: center;
    align-items: center;
    z-index: 9999;

    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(0.5vw);
    -webkit-backdrop-filter: blur(0.5vw);

    opacity: 0;
    padding: 40px;
    cursor: pointer;

    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.show {
    visibility: visible;
    pointer-events: auto;
    opacity: 1;

}

.lightbox img {
    max-width: 95%;
    max-height: 95%;
    object-fit: contain;
    border-radius: 8px;

    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.lightbox.show img {
    opacity: 1;
    transform: scale(1);
}

/* IMPRESSUM */
.impressum {
    width: 80vw;
    min-height: 60vh;
    margin: 25vh 10vw 10vh 10vw;

    font-size: var(--t4);
    color: var(--vg);
}

.impressum a {
    color: var(--vg);
}

.impressum a:hover {
    color: var(--vg);
    cursor: pointer;
    text-decoration: underline;
}

footer {
    position: static;
    width: 100%;
    bottom: 0;
    left: 0;
    padding: 1vw 0 0 0;

    font-size: var(--t4);
    color: var(--vg);
    text-align: center;
}

/* dark mode */
@media (prefers-color-scheme: dark) {
    :root {
        --vg: #fafafa;
        --bg: #0f0f0f;
    }

    .logo {
        filter: invert()
    }
}


/* responsive breackpoints */
@media only screen and (min-aspect-ratio: 21/9) {
    :root {
        --t1: 2.2vw;
        --t2: 1.5vw;
        --t3: 0.8vw;
        --t4: 0.6vw;
    }

    .grid {}
}

@media only screen and (max-aspect-ratio: 5/4) {
    :root {
        --t1: 2.8vw;
        --t2: 2.0vw;
        --t3: 1.5vw;
        --t4: 1.1vw;
    }

    .grid {}
}

@media only screen and (max-aspect-ratio: 4/5) {
    :root {
        --t1: 5.2vw;
        --t2: 3.2vw;
        --t3: 2.2vw;
        --t4: 2.0vw;
    }

    .top {
        height: 15vh;
        padding: 0 15vw 0 15vw;
        display: grid;
        grid-template-columns: repeat(1, 1fr);
        grid-template-rows: repeat(5, 1fr);
    }

    .main {
        grid-column: 1 / span 1;
        grid-row: 1 / span 4;
        display: flex;
        justify-content: center;
    }

    .logo {
        width: 11vw;
        padding-right: 2vw;
    }

    .nav {
        grid-column: 1 / span 1;
        grid-row: 4 / span 3;
        text-align: center;
    }

    .grid {
        margin: 15vh 10vw 0 10vw;
        column-count: 2;
        column-fill: balance;
    }

    .imgh {
        display: none;
    }

    .imgv {
        display: block;
    }
}
