/* ==========================================================================
   DESIGN SYSTEM & CUSTOM PORTFOLIO STYLES
   Conny Winter Portfolio
   ========================================================================== */

/* Font Definitions (GDPR Compliant / Locally Hosted) */
@font-face {
    font-family: 'Inter';
    src: url('../../fonts/Inter-VariableFont_opsz,wght.ttf') format('truetype-variations');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('../../fonts/Inter-Italic-VariableFont_opsz,wght.ttf') format('truetype-variations');
    font-weight: 100 900;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Lato';
    src: url('../../fonts/Lato-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Lato';
    src: url('../../fonts/Lato-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Lato';
    src: url('../../fonts/Lato-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

/* Base Design Variables */
:root {
    --bg-color: #FAF8F5;
    /* Sophisticated Off-White / Alabaster */
    --text-color: #121212;
    /* Elegant Dark Charcoal */
    --accent-color: #7B7369;
    /* Warm Muted Taupe */
    --border-color: #EAE6E0;
    /* Soft Outline Separator */
    --overlay-color: rgba(18, 18, 18, 0.96);
    /* Darker backdrop for Lightbox */
    --media-bg: rgba(0, 0, 0, 0.015);
    /* Very light background behind pictures */
    --media-bg-hover: rgba(0, 0, 0, 0.035);
    /* Slightly darker on hover */
    --gallery-aspect-ratio: auto;
    /* Easily customizable gallery aspect-ratio (e.g. 3/2, 16/9, 1/1) */

    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-secondary: 'Lato', sans-serif;
}

/* Global Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-primary);
    font-weight: 400;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.25s ease;
}

/* Header & Navigation Layout */
header {
    width: 100%;
    padding: 40px 60px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    z-index: 10;
}

.brand-name {
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: 0.08em;
    /* Slightly tighter spacing for standard mixed-case text */
}

.brand-name:hover {
    color: var(--accent-color);
}

nav {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-link {
    font-family: var(--font-secondary);
    font-size: 0.95rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    position: relative;
    padding: 5px 0;
}

.nav-link:after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: var(--text-color);
    transform-origin: bottom right;
    transition: transform 0.25s ease-out;
}

.nav-link:hover:after,
.nav-link.active:after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

.nav-link.active {
    font-weight: 700;
}

/* Main Content Area */
main {
    flex: 1;
    padding: 0 60px 0px 60px;
    /* Reduced bottom padding to lower footer divider */
    display: flex;
    flex-direction: column;
}

.page-title {
    font-size: 1.8rem;
    font-weight: 300;
    letter-spacing: 0.05em;
    margin-bottom: 40px;
    text-transform: uppercase;
}

#gallery-container {
    margin-top: 20px;
    width: 100%;
}


/* ==========================================================================
   ALBUM VERSION 1: HORIZONTAL ROW SCROLL
   ========================================================================== */
.gallery-horizontal-container {
    width: 100%;
    position: relative;
}

.gallery-horizontal {
    display: flex;
    flex-direction: row;
    height: 73vh;
    /* Increased from 62vh for an immersive full-screen presentation */
    overflow-x: auto;
    overflow-y: hidden;
    cursor: grab;
}

.gallery-horizontal:active {
    cursor: grabbing;
}

/* Firefox / Non-Webkit fallback */
@supports not selector(::-webkit-scrollbar) {
    .gallery-horizontal {
        scrollbar-width: auto;
        scrollbar-color: var(--accent-color) var(--bg-color);
    }
}

/* Webkit Scrollbar Styling */
.gallery-horizontal::-webkit-scrollbar {
    height: 16px;
}

.gallery-horizontal::-webkit-scrollbar-button {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

.gallery-horizontal::-webkit-scrollbar-track {
    background: transparent;
}

.gallery-horizontal::-webkit-scrollbar-thumb {
    background-color: var(--accent-color);
    border-radius: 8px;
}

.gallery-horizontal::-webkit-scrollbar-thumb:hover {
    background-color: #4d4d4d;
}

.gallery-item {
    display: flex;
    flex-direction: column;
    height: 100%;
    flex-shrink: 0;
    margin-right: 30px;
    position: relative;
}

/* Progressive Blur-Up Image Loading */
.progressive-img {
    transition: filter 0.4s ease, transform 0.4s ease;
    filter: blur(0);
}

.progressive-img.loading {
    filter: blur(15px);
    transform: scale(1.03);
    /* scale hides the harsh edge artifacts of blur */
}

.gallery-item-wrapper {
    height: calc(100% - 45px);
    /* Allocate bottom space for captions */
    aspect-ratio: var(--gallery-aspect-ratio, auto);
    position: relative;
    background-color: transparent;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.06);
    /* Centered soft shadow instead of background */
    transition: all 0.4s ease;
    border-radius: 2px;
    overflow: hidden;
}

.gallery-item-wrapper:hover {
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.16);
    /* Pronounced centered shadow on hover */
}

/* Enforce uniform covering if aspect ratio is non-auto */
.gallery-horizontal-container:not(.natural-ratio) .gallery-item img,
.gallery-horizontal-container:not(.natural-ratio) .gallery-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-item img,
.gallery-item video {
    height: 100%;
    width: auto;
    display: block;
    object-fit: contain;
    cursor: pointer;
    user-select: none;
    -webkit-user-drag: none;
}

.item-desc {
    height: 45px;
    padding-top: 12px;
    font-family: var(--font-secondary);
    font-size: 0.88rem;
    color: var(--text-color);
    letter-spacing: 0.02em;
    text-align: left;
    opacity: 0;
    transition: opacity 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: auto;
}

.gallery-item:hover .item-desc {
    opacity: 0.85;
    /* Fades in link-aligned under image on hover */
}

/* Navigation Indicators for horizontal gallery */
.scroll-nav-btn {
    position: absolute;
    top: calc(50% - 40px);
    background: rgba(250, 248, 245, 0.7);
    border: 1px solid var(--border-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 1.1rem;
    z-index: 5;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    opacity: 0;
}

.gallery-horizontal-container:hover .scroll-nav-btn {
    opacity: 1;
}

.scroll-nav-btn:hover {
    background: var(--text-color);
    color: var(--bg-color);
    border-color: var(--text-color);
}

.scroll-prev {
    left: -20px;
}

.scroll-next {
    right: -20px;
}

/* ==========================================================================
   ALBUM VERSION 2: STAGGERED MASONRY GRID
   ========================================================================== */
.gallery-masonry {
    column-count: 3;
    column-gap: 30px;
    width: 100%;
}

.masonry-item {
    display: inline-block;
    width: 100%;
    margin-bottom: 30px;
    break-inside: avoid;
    position: relative;
    background-color: transparent;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.06);
    /* Centered soft shadow */
    border-radius: 2px;
    overflow: hidden;
    transition: all 0.4s ease;
}

.masonry-item:hover {
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.16);
}

.masonry-item img,
.masonry-item video {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    cursor: pointer;
}

/* ==========================================================================
   LIGHTBOX COMPONENT
   ========================================================================== */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--overlay-color);
    z-index: 2000;
    display: none;
    opacity: 0;
    justify-content: center;
    align-items: center;
    transition: opacity 0.35s ease-out;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    max-width: 88vw;
    max-height: 85vh;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 0;
    /* Prevents content overflow cutoff on short viewports */
}

.lightbox-media-wrapper {
    position: relative;
    max-width: 100%;
    max-height: calc(85vh - 50px);
    flex: 1;
    /* Fill available height proportionally */
    min-height: 0;
    /* Crucial: allows wrapper to shrink below natural content size */
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox img,
.lightbox video {
    max-width: 88vw;
    max-height: calc(85vh - 60px);
    /* Strictly constrain media height using viewport units to bypass flexbox height bugs */
    object-fit: contain;
    border-radius: 1px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    background-color: rgba(0, 0, 0, 0.2);
    /* Subtle darkening built behind active lightbox media */
}

.lightbox-caption {
    width: 100%;
    text-align: left;
    color: rgba(255, 255, 255, 0.85);
    font-family: var(--font-secondary);
    font-size: 0.95rem;
    padding-top: 15px;
    height: 50px;
    white-space: normal;
}

.lightbox-close {
    position: absolute;
    top: 40px;
    right: 40px;
    color: #FFFFFF;
    font-size: 1.8rem;
    font-weight: 200;
    cursor: pointer;
    z-index: 2100;
    transition: opacity 0.25s ease;
    opacity: 0.6;
}

.lightbox-close:hover {
    opacity: 1;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #FFFFFF;
    font-size: 2.2rem;
    font-weight: 200;
    cursor: pointer;
    user-select: none;
    z-index: 2100;
    padding: 20px;
    transition: opacity 0.25s ease;
    opacity: 0.5;
}

.lightbox-nav:hover {
    opacity: 1;
}

.lightbox-prev {
    left: 40px;
}

.lightbox-next {
    right: 40px;
}

/* =style options toggles in frontend */
.layout-toggle {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    align-self: flex-end;
}

.toggle-btn {
    font-family: var(--font-secondary);
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: none;
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    cursor: pointer;
    border-radius: 2px;
    transition: all 0.25s ease;
}

.toggle-btn.active,
.toggle-btn:hover {
    background: var(--text-color);
    color: var(--bg-color);
    border-color: var(--text-color);
}

/* ==========================================================================
   ABOUT ME & BIO LAYOUT
   ========================================================================== */
.about-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    margin-top: 20px;
    width: 100%;
}

.about-slideshow-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 600px;
}

.about-slideshow {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background-color: transparent;
    border-radius: 2px;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.08);
    /* Sophisticated centered glow/shadow */
}

.about-slideshow-caption {
    font-family: var(--font-secondary);
    font-size: 0.88rem;
    color: var(--accent-color);
    margin-top: 15px;
    /* Elegant closer spacing under image */
    text-align: center;
    min-height: 20px;
    width: 100%;
    font-style: italic;
}

.about-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.0s ease-in-out;
}

.about-slide.active {
    opacity: 1;
}

.about-content {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 800px;
    margin-top: 20px;
}

.about-bio {
    font-family: var(--font-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 50px;
    font-weight: 300;
}

/* Exhibitions (Ausstellungen) styles */
.exhibitions-section h3 {
    font-size: 1.25rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    margin-bottom: 25px;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.exhibitions-year-block {
    display: flex;
    flex-direction: column;
    margin-bottom: 25px;
}

.exhibitions-year {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-color);
}

.exhibitions-list {
    list-style: none;
}

.exhibitions-item {
    display: grid;
    grid-template-columns: 140px 1fr;
    padding: 6px 0;
    font-size: 0.95rem;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.05);
}

.exh-date {
    font-family: var(--font-secondary);
    color: var(--accent-color);
    font-weight: 400;
}

.exh-desc {
    color: var(--text-color);
}

.exh-location {
    font-style: italic;
    color: var(--accent-color);
}

/* ==========================================================================
   LINKS PAGE LAYOUT
   ========================================================================== */
.links-container {
    max-width: 600px;
    margin-top: 40px;
}

.links-intro {
    font-family: var(--font-secondary);
    font-size: 1.05rem;
    margin-bottom: 40px;
    color: var(--accent-color);
}

.external-links-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.external-link-item a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border: 1px solid var(--border-color);
    background: #FFFFFF;
    border-radius: 2px;
    font-size: 1.1rem;
    font-weight: 400;
}

.external-link-item a:hover {
    border-color: var(--text-color);
    background: var(--text-color);
    color: var(--bg-color);
}

.external-link-arrow {
    font-size: 1.2rem;
    font-weight: 300;
}

/* ==========================================================================
   LEGAL PAGES (Impressum / Datenschutzerklärung)
   ========================================================================== */
.legal-container {
    max-width: 800px;
    margin-top: 20px;
    font-family: var(--font-secondary);
}

.legal-container h2 {
    font-family: var(--font-primary);
    font-size: 1.3rem;
    font-weight: 500;
    margin: 35px 0 15px 0;
    letter-spacing: 0.02em;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 6px;
}

.legal-container p {
    font-size: 0.98rem;
    margin-bottom: 18px;
    line-height: 1.7;
    color: #333333;
}

.legal-container ul {
    margin-left: 20px;
    margin-bottom: 18px;
    font-size: 0.98rem;
}

.legal-container li {
    margin-bottom: 6px;
}

/* ==========================================================================
   FOOTER LAYOUT
   ========================================================================== */
footer {
    width: 100%;
    padding: 25px 60px;
    /* Reduced from 40px to lower the bar and reduce empty whitespace */
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    font-family: var(--font-secondary);
    color: var(--accent-color);
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a:hover {
    color: var(--text-color);
}

/* ==========================================================================
   RESPONSIVE OVERRIDES
   ========================================================================== */
@media (max-width: 1200px) {
    .gallery-masonry {
        column-count: 3;
    }
}

@media (max-width: 992px) {
    header {
        padding: 30px 40px;
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    main {
        padding: 0 40px 40px 40px;
    }

    footer {
        padding: 30px 40px;
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

@media (max-width: 768px) {

    /* Album Horizontal Layout -> Converts to vertical column on Mobile */
    .gallery-horizontal-container {
        padding: 0;
    }

    .gallery-horizontal {
        flex-direction: column;
        height: auto;
        overflow-x: visible;
        overflow-y: visible;
        cursor: default;
        padding-bottom: 0;
    }

    .gallery-item {
        width: 100%;
        height: auto;
        margin-right: 0;
        margin-bottom: 35px;
    }

    .gallery-item-wrapper {
        height: auto;
        width: 100%;
    }

    .gallery-item img,
    .gallery-item video {
        width: 100%;
        height: auto;
    }

    .item-desc {
        opacity: 0.9;
        white-space: normal;
        height: auto;
        padding-top: 10px;
    }

    .scroll-nav-btn {
        display: none !important;
    }

    /* Album Masonry Layout -> Mobile viewport */
    .gallery-masonry {
        column-count: 1;
        column-gap: 0;
    }

    .masonry-item {
        margin-bottom: 25px;
    }

    nav {
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .exhibitions-item {
        grid-template-columns: 1fr;
        gap: 5px;
        padding: 10px 0;
    }

    .lightbox-nav {
        display: none !important;
        /* Hide arrows on mobile overlays */
    }

    .lightbox-close {
        top: 20px;
        right: 20px;
    }
}

/* ==========================================================================
   FONT AWESOME FREE 7.2.0 INTEGRATION (LOCALLY HOSTED)
   ========================================================================== */
@font-face {
    font-family: 'Font Awesome 7 Free';
    src: url('../../fonts/fa-solid-900.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Font Awesome 7 Free';
    src: url('../../fonts/fa-regular-400.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Font Awesome 7 Brands';
    src: url('../../fonts/fa-brands-400.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

.fa,
.fas,
.far,
.fab {
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
}

.fa,
.fas {
    font-family: 'Font Awesome 7 Free';
    font-weight: 900;
}

.far {
    font-family: 'Font Awesome 7 Free';
    font-weight: 400;
}

.fab {
    font-family: 'Font Awesome 7 Brands';
    font-weight: 400;
}

/* Custom mapping for standard social icons */
.icon-instagram::before {
    content: "\f16d";
}

.icon-vimeo::before {
    content: "\f27d";
}

.icon-tumblr::before {
    content: "\f173";
}

.icon-flickr::before {
    content: "\f16e";
}

.icon-facebook::before {
    content: "\f082";
}

.icon-youtube::before {
    content: "\f167";
}

.icon-linkedin::before {
    content: "\f08c";
}

.icon-xing::before {
    content: "\f168";
}

.icon-bluesky::before {
    content: "\e671";
}

.icon-pixelfed::before {
    content: "\e67b";
}

.icon-eye::before {
    content: "\f06e";
}

/* fa-eye for das auge */
.icon-mail::before {
    content: "\f0e0";
}

.icon-link::before {
    content: "\f0c1";
}

/* ==========================================================================
   BIOGRAPHY SOCIAL LINKS LINES (ONLY ICONS)
   ========================================================================== */
.about-links-socials-line {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px 30px;
    /* Spacious elegant gap between icon links, wrapped lines slightly closer */
    flex-wrap: wrap;
    width: 100%;
}

.about-social-icon-link {
    font-size: 1.45rem;
    /* Prominent, elegant and clickable size */
    color: var(--accent-color);
    /* Muted taupe theme color */
    transition: color 0.25s ease, transform 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.about-social-icon-link:hover {
    color: var(--text-color);
    /* Elegant dark charcoal on hover */
    transform: translateY(-2px);
    /* Premium subtle float micro-animation on hover */
}