/* ================== GLOBAL ================== */

* {
    box-sizing: border-box;
}

:root {
    --side-spacing: clamp(20px, 5vw, 50px);
}

body {
    margin: 0;
    font-family: Garamond, serif;
}

a {
    text-decoration: none;
    color: black;
}

/* ================== NAVIGATION ================== */

nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: var(--side-spacing);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 30px;
    z-index: 1000;
}

.nav-left {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.name,
.job {
    white-space: nowrap;
}

.job {
    min-width: 170px;
}

.nav-right {
    display: none;
    align-items: center;
    gap: 80px;
}

.lang-switch {
    min-width: 90px;
    text-align: right;
}

.lang {
    cursor: pointer;
}

.lang.active {
    text-decoration: underline;
}

/* Hover ohne Layout Shift */

.name,
.nav-link,
.side-info a,
.side-info .email,
.nav-right .lang {
    transition: font-style 0.2s ease;
}

@media (min-width: 1300px) {
    .name:hover,
    .nav-link:hover,
    .side-info a:hover,
    .side-info .email:hover,
    .nav-right .lang:hover {
        font-style: italic;
    }
}

/* Hamburger */

.hamburger {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    line-height: 0.8;
    cursor: pointer;
    position: relative;
    transform: translateY(14px);
}

/* Dropdown */

.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    margin-top: -6px;
    right: 2%;
    background: white;
    padding: 30px;
    font-size: 28px;
    border: 2px solid black;
    width: min(260px, 90vw);
    flex-direction: column;
    gap: 25px;
}

.mobile-menu.active {
    display: flex;
}

/* ================== SIDE INFO ================== */

.side-info {
    position: fixed;
    left: calc(var(--side-spacing) / 2);
    top: 34%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 200px;
    font-size: 20px;
    z-index: 10;
}

.side-info.stopped {
    position: absolute;
}

.side-info a,
.side-info .email {
    transform: rotate(-90deg);
    transform-origin: center;
    cursor: pointer;
}

/* ================== GALLERY ================== */

.gallery {
    margin: 200px 0 100px;
    padding: 0 var(--side-spacing);
    display: grid;
    grid-template-columns: 1fr;
}

/* Grundstruktur */

.gallery-item {
    overflow: hidden;
    position: relative;
    width: 100%;
}

/* Bilder */

.gallery picture,
.gallery img {
    width: 100%;
    height: 100%;
    display: block;
}

.gallery img {
    object-fit: cover;
    opacity: 0;
    transform: scale(1.03);
    transition:
        opacity 0.8s ease,
        transform 1.2s ease,
        border-radius 0.4s ease;
}

.gallery img.loaded {
    opacity: 1;
    transform: scale(1);
}

/* ================== TABLET ================== */

@media (min-width: 1000px) {
    .gallery {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 522px;
    }
}

/* ================== DESKTOP ================== */

@media (min-width: 1300px) {

    .nav-left {
        flex-direction: row;
        gap: 100px;
        align-items: center;
    }

    .nav-right {
        display: flex;
    }

    .hamburger {
        display: none;
    }

    .gallery {
        grid-template-columns: repeat(12, 1fr);
        grid-auto-rows: 522px;
        grid-auto-flow: row; /* WICHTIG für Stabilität */
    }

    .gallery-item {
        height: 100%;
    }

    .gallery-item:hover img {
        border-radius: 50px;
    }

    /* Grid Utilities */

    .w-6 { grid-column: span 6; }
    .w-5 { grid-column: span 5; }
    .w-4 { grid-column: span 4; }
    .w-3 { grid-column: span 3; }
    .w-2 { grid-column: span 2; }
    .w-1 { grid-column: span 1; }
}

/* ================== FOOTER ================== */

footer {
    height: 150px;
    background: #F0F0F0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-left {
    padding-left: var(--side-spacing);
}

.footer-left img {
    width: 25px;
    height: 25px;
    object-fit: contain;
}

.footer-right {
    padding-right: var(--side-spacing);
    font-size: 16px;
    font-family: Helvetica, sans-serif;
}

/* ================== SHARED PAGE WRAPPER ================== */

.left-content {
    display: contents;
}

.about-wrapper,
.imprint-wrapper,
.project-wrapper {
    margin-top: 200px;
    margin-bottom: 150px;
    padding: 0 var(--side-spacing);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    font-family: Helvetica, sans-serif;
    line-height: 1.6;
    font-size: 16px;
/*ALTERNATIV: font-size: clamp(16px, 1.2vw + 10px, 20px);*/
    align-items: start;
}

@media (min-width: 1300px) {
        .project-wrapper,
        .about-wrapper {
        grid-template-columns: 1.5fr 2fr 1fr 1.5fr;
    }
}

/* Headings (shared Garamond style) */

.about-wrapper h1,
.imprint-wrapper h1,
.project-wrapper h1,
.project-wrapper h2 {
    font-family: Garamond, serif;
    font-weight: normal;
}

/* Fluid Headings */

.about-wrapper h1,
.imprint-wrapper h1,
.project-wrapper h1 {
    font-size: 25px;
/*alternativ: font-size: clamp(25px, 1.5vw + 12px, 30px);*/
    margin-bottom: 20px;
}

.project-wrapper h2 {
    font-size: 16px;
/*alternativ: font-size: clamp(16px, 1.2vw + 10px, 20px);*/
    margin-bottom: -20px;
}

.project-wrapper p {
    margin-top: 50px;
}

.col img {
    width: 100%;
    display: block;
    margin-bottom: 50px;
    height: auto;
    object-fit: cover;
}

.project-wrapper .col-4 img {
    margin-bottom: 20px;
}

.col-4 {
    position: static;
    top: 200px;
    align-self: start;
}

/* Imprint */

.imprint-content {
    grid-column: 2 / span 2;
    text-align: left;
}

/* ================== TABLET 50/50 STRICT ================== */

@media (min-width: 768px) and (max-width: 1300px) {

    .about-wrapper,
    .project-wrapper {
        grid-template-columns: 1fr 1fr;
        column-gap: clamp(20px, 4vw, 60px);
        row-gap: 60px;
    }

    .left-content {
        display: flex;
        flex-direction: column;
        gap: 0px;
        align-self: start;
    }

    .col-1 img {
        margin-bottom: 10px;
    }

    /* Spaltenstruktur */

    .col-1 {
        grid-column: 1;
        grid-row: 1;
    }

    .col-1 img {
        margin-bottom: 0;
    }

    .col-2 {
        grid-column: 1;
        grid-row: 2;
    }

    .col-3 {
        display: none;
    }

    .col-4 {
        grid-column: 2;
        grid-row: 1;
    }

}

/* ================== MOBILE ================== */

@media (max-width: 767px) {

    .about-wrapper,
    .imprint-wrapper,
    .project-wrapper {
        grid-template-columns: 1fr;
        padding-left: 80px;
        row-gap: 0;
    }

    .imprint-content {
        grid-column: auto;
    }

    .col-1 img {
        margin-bottom: 0;
    }

    .col-3 {
        display: none;
    }

    .col-4 {
        position: static;
    }
}