/* 1. BASIS EINSTELLUNGEN */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: #ffffff;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: #000;
    overflow-x: hidden;
}

/* 2. DER NAME (PC - FIXIERT) */
.main-title {
    position: fixed;
    top: 50%;
    left: 9%; 
    transform: translateY(-50%);
    z-index: 100; 
    mix-blend-mode: difference;
    pointer-events: auto; /* Klicks gehen durch auf die Galerie */
    cursor: default;
    width: 40vw;
    font-size: 0;
    line-height: 0;
}

.signature-img {
    width: 100%;
    height: auto;
    display: block;
    filter: brightness(0) invert(1);
}

/* 3. GALERIE & PERFORMANCE */
.gallery-container {
    padding: 25vh 0 2vh 0; 
    display: flex;
    flex-direction: column;
}

.project-item {
    width: 100%;
    display: block; /* Ermöglicht stabiles Rechts-Alignment via Margin */
    margin-bottom: 35vh;
    content-visibility: auto;
    contain-intrinsic-size: auto 60vh;
}

.project-item:last-of-type {
    margin-bottom: 10vh;
}

/* Der klickbare Bereich */
.project-link, 
.project-item .image-box {
    text-decoration: none; 
    color: inherit; 
    width: 45vw;
    max-width: 900px;
    margin-left: auto;   /* Schiebt das Bild nach rechts */
    margin-right: 10%;   /* Abstand zum rechten Rand */
    display: block;
    position: relative;
    cursor: pointer !important; /* Nur hier erscheint die Hand */
}

.image-box {
    overflow: hidden;
    height: auto;
}

.image-box img, .project-video {
    width: 100%; 
    height: auto; 
    display: block;
    transition: filter 0.7s ease, transform 0.9s ease, opacity 0.5s ease;
}

/* 4. HOVER & OVERLAYS (PC) */
@media (min-width: 901px) {
    .image-box:hover img, .image-box:hover .project-video {
        filter: blur(20px);
        transform: scale(1.05);
    }
    .image-box:hover .project-overlay-info { opacity: 1; }
}

.project-overlay-info {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    display: flex; flex-direction: column; padding: 20px;
    opacity: 0; transition: opacity 0.5s ease;
    z-index: 2; color: #fff;
    background: linear-gradient(135deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0) 50%);
}

.project-overlay-info h2 { font-size: 1.8rem; font-weight: 700; text-transform: uppercase; }

/* 5. BIO & QUACK PC */
    .floating-bio {
        position: fixed; width: 320px; padding: 25px 25px 130px 25px; 
        background-color: #ffffff; font-family: Garamond, serif;
        opacity: 0; z-index: 1000; pointer-events: none; transition: opacity 0.3s ease;
    }
    .floating-bio.is-visible { opacity: 1; }
    .floating-bio .mobile-quack { display: none !important; } /* Versteckt am PC */

    .quack-link { font-family: Garamond, serif; color: #000; text-decoration: none; }
    .desktop-quack { position: fixed; bottom: 40px; left: 40px; mix-blend-mode: difference; color: #fff; font-size: 1.1rem; z-index: 1000; }

    .floating-bio .quack-link {
        display: none !important;
}

.floating-bio.is-visible { opacity: 1; }
.bio-mini-icon { position: absolute; bottom: 15px; right: 15px; width: 110px; height: auto; }

.quack-link { font-family: Garamond, serif; color: #000; text-decoration: none; }
.desktop-quack { position: fixed; bottom: 40px; left: 40px; mix-blend-mode: difference; color: #fff; font-size: 1.1rem; }

/* 6. DETAIL OVERLAY (MODAL) */
.detail-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background-color: #ffffff;
    z-index: 10000;
    display: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.detail-overlay.is-active { display: block; opacity: 1; }

.detail-content {
    position: relative;
    width: 100%; height: 100%;
    display: flex; align-items: center;
}

.detail-media-container { height: 100vh; width: auto; display: flex; align-items: center; }
#detail-img, #detail-vid { height: 100vh; width: auto; object-fit: contain; display: block; }

.detail-info-bottom-right {
    position: absolute;
    bottom: 40px; right: 40px;
    text-align: right;
}

.detail-info-bottom-right h2 {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 1.5rem;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.detail-info-bottom-right p {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; /* Serifenlos Fix */
    font-size: 1rem;
    color: #888;
}

.close-detail {
    position: absolute;
    top: 30px;
    right: 40px;
    background: none;
    border: none;
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 10001;
    /* FIX: Farbe erzwingen & Blaustich entfernen */
    color: #000 !important; 
    -webkit-tap-highlight-color: transparent; 
    outline: none;
}
/* -------------------------------------------------- */
/* 7. MOBILE ANPASSUNG (Alles unter 900px) */
/* -------------------------------------------------- */
@media (max-width: 900px) {
    
    /* Name oben sticky - lässt Klicks durch */
    .main-title {
        position: sticky;
        top: 0;
        left: 0;
        width: 100%;
        padding: 4vh 10% 2vh 10%;
        transform: none;
        
        z-index: 9999;
        pointer-events: none; 
    }

    .signature-img { width: 70vw; margin: 0 auto; }

    /* Galerie zentriert */
    .gallery-container {
        width: 100%;
        padding: 2vh 0;
        align-items: center;
    }

    .project-item {
        margin-bottom: 12vh; /* Abstand zwischen den Projekten */
        padding-right: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    /* Bild-Box wieder mittig */
    .project-link, 
    .project-item .image-box {
        width: 85vw;
        margin: 0 auto;
    }

    /* FIX: Unterschriften UNTER dem Bild (keine Überlagerung) */
    .project-overlay-info {
        position: relative !important;
        opacity: 1 !important;
        display: block !important;
        padding: 15px 0 0 0 !important; 
        background: none !important;
        color: #000 !important;
        height: auto;
        pointer-events: auto;
    }

    .project-overlay-info h2 { font-size: 1rem; color: #000; }
    .project-overlay-info p { font-size: 0.8rem; color: #666; margin-top: 4px; }

    /* --- BIO FIX --- */
    .floating-bio {
        position: relative !important; 
        width: 100% !important;
        height: auto !important;
        opacity: 1 !important;
        padding: 60px 10% 100px 10% !important;
        pointer-events: auto !important;
        display: block !important;
        z-index: 10;
        background: white;
        margin-top: 5vh;
    }

    .floating-bio .mobile-quack { display: block !important; text-align: center; margin-top: 30px; color: #000 !important; }
    .desktop-quack { display: none !important; }
    

    /* --- MOBILE POPUP (MODAL) ANPASSUNG --- */
    .detail-overlay {
        background-color: #ffffff;
    }

    .detail-content {
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 80px; /* Platz für das X */
    }

    .detail-media-container {
        width: 100vw;
        height: auto;
        max-height: 100vh;
        padding-left: 0;
        justify-content: center;
    }

    #detail-img, #detail-vid {
        width: 90vw;
        height: auto;
        max-height: 100vh;
        margin-left: 0;
    }

    .detail-info-bottom-right {
        position: relative;
        bottom: 0;
        right: 0;
        width: 100%;
        text-align: left;
        padding: 30px 10%;
    }

    /* Subtext im Popup mobil ausblenden */
    .detail-info-bottom-right p {
        display: none !important; 
    }

    .detail-info-bottom-right h2 {
        display: none !important;
    }

    .close-detail {
        top: 20px;
        right: 20px;
        font-size: 2rem;
    }
}