/* ==========================================================================
   LOKALE SCHRIFTARTEN (DSGVO-KONFORM)
   ========================================================================== */

/* --- OSWALD (Überschriften & Buttons) --- */

/* Oswald Light (300) */
@font-face {
    font-family: 'Oswald';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('fonts/oswald-v49-latin-300.woff2') format('woff2');
}

/* Oswald Regular (400) */
@font-face {
    font-family: 'Oswald';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/oswald-v49-latin-regular.woff2') format('woff2');
}

/* Oswald Medium (500) */
@font-face {
    font-family: 'Oswald';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('fonts/oswald-v49-latin-500.woff2') format('woff2');
}


/* --- KANIT (Fließtext & Beschreibungen) --- */

/* Kanit Light (300) */
@font-face {
    font-family: 'Kanit';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('fonts/kanit-v15-latin-300.woff2') format('woff2');
}

/* Kanit Regular (400) */
@font-face {
    font-family: 'Kanit';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/kanit-v15-latin-regular.woff2') format('woff2');
}

/* Kanit Medium (500) */
@font-face {
    font-family: 'Kanit';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('fonts/kanit-v15-latin-500.woff2') format('woff2');
}


/* ==========================================================================
   BASIS-LAYOUT & ALLGEMEINE STILE
   ========================================================================== */

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Kanit', sans-serif;
    margin: 0;
    background-color: #000000;
    color: #ffffff;
}

/* Fixierte Navigationsleiste (volle Breite von Kante zu Kante) */
header {
    display: flex;
    justify-content: space-between; /* Schiebt Logo ganz nach links und Navigationsblock ganz nach rechts */
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 85px; /* Feste Gesamthöhe */
    padding: 0 2rem 0 0; /* Rechts 2rem Abstand zum Bildschirmrand, links 0 für das Logo */
    z-index: 10;
    background-color: #000000; /* Blickdichtes Tiefschwarz */
    box-sizing: border-box;
}

/* Logo-Container ganz links mit 10px Innenabstand */
.header-logo-link {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    aspect-ratio: 1 / 1;
    padding: 10px; /* 10px Abstand um das Logo */
    box-sizing: border-box;
    flex-shrink: 0;
    overflow: hidden;
    background-color: #000000;
}

.header-logo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.header-logo-link:hover .header-logo {
    transform: scale(1.06);
}

/* Wrapper für Name und Navigation: Rechtsbündig & gestapelt */
.header-nav-wrapper {
    display: flex;
    flex-direction: column; /* Stapelt Name über Navigation */
    align-items: flex-end; /* Richtet Name und Links rechtsbündig aus */
    justify-content: center;
    gap: 0.35rem; /* Dezenter Abstand zwischen Name und Links */
    height: 100%;
    text-align: right;
}

h1 {
    font-size: 1.4rem;
    margin: 0;
    line-height: 1.1;
    letter-spacing: 1px;
}

h1 a,
h1 a:visited {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s;
}

h1 a:hover {
    color: #aaaaaa;
}

/* Navigationslinks in einer Zeile rechtsbündig */
nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1.5rem; /* Gleichmäßiger Abstand zwischen den Links */
}

nav a,
nav a:visited {
    color: #ffffff;
    text-decoration: none;
    font-size: 0.95rem;
    margin: 0;
    transition: color 0.3s;
}

nav a:hover {
    color: #aaaaaa;
}


/* ==========================================================================
   HERO-HEADER SECTION
   ========================================================================== */

.hero-header {
    height: 70vh;
    padding: 100px 2rem 0 2rem;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    background-image: url('images/header.jpg');
    background-size: cover;
    background-position: center;
}

/* Desktop & Tablet: Sanfter Verlauf von links nach rechts */
.hero-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to right,
        rgba(0, 0, 0, 0.85) 0%,
        rgba(0, 0, 0, 0.6) 35%,
        rgba(0, 0, 0, 0.2) 65%,
        rgba(0, 0, 0, 0) 100%
    );
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
}

.hero-content h2 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-content p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #ddd;
}

.cta-scroll {
    display: inline-block;
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    margin-top: 2.5rem;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    transition: border-color 0.3s;
}

.cta-scroll:hover {
    border-color: rgba(255, 255, 255, 1);
}

.cta-scroll span {
    margin-left: 0.5rem;
    display: inline-block;
    transition: transform 0.3s;
}

.cta-scroll:hover span {
    transform: translateY(3px);
}


/* ==========================================================================
   MAIN & PORTFOLIO-FILTER
   ========================================================================== */

main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Ziel-Offset für Sprungmarke #work */
#work {
    scroll-margin-top: 92px;
}

/* Portfolio Header mit Filtern */
.portfolio-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2.5rem 0 2rem 0;
    border-bottom: 1px solid #333;
    margin-bottom: 4rem;
    gap: 2rem;
}

.portfolio-title p {
    margin: 0;
    font-size: 0.9rem;
    color: #aaa;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.portfolio-title h2 {
    font-size: 4.5rem;
    margin: 0.25rem 0 0 0;
}

.filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-start;
}

.filter-controls button {
    font-family: inherit;
    font-size: 1rem;
    background-color: transparent;
    color: #fff;
    border: 1px solid #555;
    border-radius: 20px;
    padding: 0.5rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    margin-left: 0;
}

.filter-controls button:hover {
    border-color: #fff;
}

.filter-controls button.active {
    background-color: #fff;
    color: #000;
    border-color: #fff;
}


/* ==========================================================================
   MASONRY-GALERIE & KUNSTWERK-INFOS
   ========================================================================== */

.gallery {
    column-count: 3; /* Standard Desktop: 3 Spalten */
    column-gap: 2.5rem;
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 2.5rem;
}

/* 
   aspect-ratio reserviert sofort den Platz für jedes Bild,
   bevor es geladen wird. Verhindert 100% des Layout-Shifts beim Scrollen!
*/
.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
    transition: opacity 0.3s ease-out;
    background-color: #111;
    aspect-ratio: 1 / 1; /* Standard für quadratische Kunstwerke (80x80cm) */
}

/* Skizzen sind Hochformat (ca. 3:4) */
.gallery-item[data-category="scribble-art"] img {
    aspect-ratio: 3 / 4;
}

.gallery-item:hover img {
    opacity: 0.9;
}

.gallery-item.hide {
    display: none;
}

.artwork-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-top: 1rem;
}

.artwork-info .details {
    flex-grow: 1;
}

.artwork-info .title {
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
    color: #fff;
}

.artwork-info .medium {
    margin: 0.25rem 0 0 0;
    font-size: 0.9rem;
    color: #aaa;
    line-height: 1.4;
}

.artwork-info .year {
    font-size: 1rem;
    color: #aaa;
    margin-left: 1rem;
    white-space: nowrap;
}


/* ==========================================================================
   LIGHTBOX MODAL
   ========================================================================== */

.modal {
    display: none;
    position: fixed;
    z-index: 100;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.95);
}

.modal-content {
    margin: auto;
    display: block;
    width: auto;
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
    animation: zoom 0.3s ease;
}

@keyframes zoom {
    from {
        transform: scale(0.95);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: 700;
    transition: 0.3s;
    cursor: pointer;
}

.close:focus,
.close:hover {
    color: #bbb;
    text-decoration: none;
}


/* ==========================================================================
   TEXT-SEKTIONEN (ABOUT & CONTACT)
   ========================================================================== */

/* Ziel-Offset für Sprungmarken #about und #contact */
#about,
#contact {
    scroll-margin-top: 92px;
}

.text-section {
    padding: 3.5rem 2rem 5rem 2rem;
    border-top: 1px solid #333;
}

/*
   Mindesthöhe garantiert, dass die Kontakt-Überschrift 
   auch auf hohen Bildschirmen bis ganz nach oben unter die Menüleiste scrollen kann.
*/
#contact {
    min-height: calc(100vh - 92px);
}

.text-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.text-content h2 {
    font-size: 3rem;
    margin-top: 0;
    margin-bottom: 2rem;
}

.text-content p {
    font-size: 1.2rem;
    line-height: 1.7;
    color: #ccc;
    margin-bottom: 1.5rem;
}

.text-content .connect {
    font-size: 1.5rem;
    font-weight: 500;
    color: #fff;
    margin-top: 3rem;
    margin-bottom: 1rem;
}

.email-link {
    display: inline-block;
    font-size: 1.2rem;
    color: #fff;
    text-decoration: none;
    padding-bottom: 5px;
    border-bottom: 1px solid #777;
    transition: all 0.3s;
}

.email-link:hover {
    color: #fff;
    border-color: #fff;
}


/* ==========================================================================
   FOOTER & SOCIAL MEDIA ICONS
   ========================================================================== */

footer {
    text-align: center;
    padding: 3rem 2rem;
    margin-top: 4rem;
    font-size: 0.9rem;
    color: #666;
}

.social-links {
    margin-top: 1.2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
}

.social-links a {
    color: #888;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease, transform 0.2s ease;
    text-decoration: none;
}

.social-links a svg {
    display: block;
    width: 22px;
    height: 22px;
}

.social-links a:hover {
    color: #ffffff;
    transform: translateY(-2px);
}


/* ==========================================================================
   LEGAL FOOTER & LEGAL SEITEN (IMPRESSUM / DATENSCHUTZ)
   ========================================================================== */

.legal-footer {
    text-align: center;
    padding: 2rem 1rem;
    background-color: #000;
}

.legal-footer a,
.legal-footer a:visited {
    color: #888;
    text-decoration: none;
    font-size: 0.9rem;
    margin: 0 0.5rem;
    transition: color 0.3s;
}

.legal-footer a:hover {
    color: #fff;
}

.legal-footer span {
    color: #555;
}

.legal-page-container {
    max-width: 800px;
    margin: 10rem auto 6rem auto;
    padding: 2rem;
    color: #ccc;
    line-height: 1.8;
}

.legal-page-container h1 {
    font-size: 3rem;
    margin-bottom: 2rem;
}

.legal-page-container p,
.legal-page-container ul {
    font-family: 'Kanit', sans-serif;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.legal-page-container .back-link a,
.legal-page-container .back-link a:visited {
    color: #fff;
    border-bottom: 1px solid #777;
    text-decoration: none;
    transition: border-color 0.3s;
}

.legal-page-container .back-link a:hover {
    border-color: #fff;
}


/* ==========================================================================
   RESPONSIVE ANPASSUNGEN (TABLET & MOBILE)
   ========================================================================== */

/* Mittlere Bildschirme (Tablets) */
@media (max-width: 1024px) {
    #work,
    #about,
    #contact {
        scroll-margin-top: 92px;
    }

    .hero-header {
        background-image: url('images/header-2.jpg');
        align-items: flex-start;
        padding-top: 150px;
        height: 75vh;
    }

    .hero-content h2 {
        font-size: 2.5rem;
    }

    .gallery {
        column-count: 2; /* Tablet: 2 Spalten */
    }
}

/* Kleine Bildschirme (Smartphones, z. B. iPhone 15 / 16) */
@media (max-width: 768px) {
    header {
        height: 85px;
        padding: 0 1rem 0 0;
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        left: 0;
        width: 100%;
        background-color: #000000;
    }

    .header-logo-link {
        height: 100%;
        aspect-ratio: 1 / 1;
        padding: 10px;
        box-sizing: border-box;
        flex-shrink: 0;
    }

    .header-nav-wrapper {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        justify-content: center;
        gap: 0.25rem;
        text-align: right;
    }

    h1 {
        font-size: 1.15rem;
        margin: 0;
        letter-spacing: 0.5px;
    }

    nav {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        gap: 0.75rem;
    }

    nav a {
        font-size: 0.85rem;
        margin: 0;
    }

    .hero-header {
        align-items: flex-end;
        justify-content: center;
        text-align: center;
        padding: 2rem 1rem 4rem 1rem;
        height: 90vh;
    }

    /* Mobil: Verlauf von unten nach oben */
    .hero-header::before {
        background: linear-gradient(
            to top,
            rgba(0, 0, 0, 0.9) 0%,
            rgba(0, 0, 0, 0.65) 40%,
            rgba(0, 0, 0, 0.15) 70%,
            rgba(0, 0, 0, 0) 100%
        );
    }

    .hero-content h2 {
        font-size: 2rem;
    }

    .portfolio-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
        padding-top: 1.5rem;
        margin-bottom: 2.5rem;
    }

    .portfolio-title h2 {
        font-size: 2.5rem;
    }

    .gallery {
        column-count: 1; /* Mobil: 1 Spalte */
    }

    .text-section {
        padding: 2.5rem 1rem 4rem 1rem;
    }

    .text-content h2 {
        font-size: 2rem;
    }

    .legal-page-container {
        margin: 8rem auto 4rem auto;
        padding: 1.5rem;
    }
}
