@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=Roboto:wght@300;400&display=swap');

/* ========= VARIABLES & GENERAL STYLES ========= */
:root {
    --bg-color: #F8F8F8;
    --text-color: #111111;
    --border-color: #e0e0e0;
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Roboto', sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-sans);
    font-weight: 300;
    overflow-x: hidden; /* Prevent horizontal scroll on most pages */
}

h1, h2, h3 {
    font-family: var(--font-serif);
}

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

/* ========= HEADER ========= */
.main-header-v3 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 3rem;
    border-bottom: 1px solid var(--border-color);
}

.header-logo-v3 a {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
}

.main-nav-v3 ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

/* ========= SPLASH PAGE ========= */
.splash-container-v3 {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.splash-logo-v3 {
    font-family: var(--font-serif);
    font-size: 4rem;
}

.enter-link-v3 {
    font-family: var(--font-sans);
    margin-top: 1rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-size: 0.8rem;
}

/* ========= HORIZONTAL PORTFOLIO ========= */
.portfolio-page-v3 {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 97px); /* Full height minus header */
}

.portfolio-filters-v3 {
    padding: 1rem 3rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.filter-btn-v3 {
    background: none;
    border: none;
    font-family: var(--font-sans);
    font-size: 1rem;
    margin: 0 1rem;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.filter-btn-v3.active, .filter-btn-v3:hover {
    opacity: 1;
}

.horizontal-gallery {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 5vw;
    padding: 0 5vw;
    overflow-x: auto;
    overflow-y: hidden;
    height: 100%;
    scrollbar-width: thin;
}

main {
    flex: 1; /* Sticky footer fix */
}

.gallery-item-v3 {
    flex-shrink: 0;
    height: 600px; /* Fixed height for gallery frame */
    width: auto;
    background-color: #fff; /* The "mat" or "passe-partout" color */
    border: 10px solid #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    display: flex;
    justify-content: center;
    align-items: center;
}

.gallery-item-v3 img {
    height: 100%;
    width: 100%;
    object-fit: cover; /* Fill the frame, cropping if necessary */
    cursor: pointer;
}

.bio-content-v3 img {
    width: 250px;
    height: auto;
    flex-shrink: 0;
}

.archives-link-v3 {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.archives-link-v3 a {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    transition: letter-spacing 0.3s ease;
}

.archives-link-v3 a:hover {
    letter-spacing: 0.1em;
}

/* ========= LIGHTBOX (re-styled from V2) ========= */
.lightbox-modal {
    background-color: rgba(248, 248, 248, 0.95);
}
.lightbox-close { color: #111; }
/* ========= LIGHTBOX (re-styled from V2) ========= */
.lightbox-modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(248, 248, 248, 0.95);
    justify-content: center;
    align-items: center;
}
.lightbox-modal-content { max-width: 90%; max-height: 90%; }
.lightbox-close { color: #111; position: absolute; top: 15px; right: 35px; font-size: 40px; font-weight: bold; cursor: pointer; }
.prev, .next { color: #111; cursor: pointer; position: absolute; top: 50%; transform: translateY(-50%); font-size: 30px; padding: 1rem; }
.prev { left: 1rem; }
.next { right: 1rem; }

/* ========= NEW V3 STYLES ========= */
.social-links-v3 {
    display: flex;
    gap: 1rem;
}
.social-links-v3 a { font-size: 0.9rem; font-weight: 400; }

.gallery-wrapper {
    position: relative;
    flex-grow: 1;
    display: flex;
}

.scroll-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255,255,255,0.7);
    border: 1px solid var(--border-color);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    font-size: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}
.scroll-arrow.left { left: 20px; }
.scroll-arrow.right { right: 20px; }

.source-toggle { margin-bottom: 1rem; }
.source-btn { font-size: 1.2rem; font-family: var(--font-serif); }

.main-footer-v3 {
    text-align: center;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: #888;
}

/* ========= RESPONSIVE ========= */
@media (max-width: 768px) {
    .main-header-v3 { flex-direction: column; gap: 1rem; padding: 1.5rem; }
    .social-links-v3 { display: none; } /* Hide social on mobile header for simplicity */

    .portfolio-page-v3 {
        height: auto; /* Let content define height */
    }

    .horizontal-gallery {
        flex-direction: column; /* Switch to vertical scroll */
        overflow-x: hidden;
        overflow-y: auto;
        padding: 1rem;
        gap: 1rem;
        align-items: stretch; /* Stretch items to full width */
    }

    .gallery-item-v3 {
        width: 100%;
        height: auto; /* Let aspect ratio define height */
        max-height: none; /* Remove height limit on mobile */
        border: 5px solid #fff;
    }

    .scroll-arrow { display: none; } /* Hide arrows on mobile */

    .bio-content-v3 { flex-direction: column; align-items: center; }
    .bio-content-v3 img { width: 200px; }

    .about-galleries-container-v3 {
        grid-template-columns: 1fr; /* Single column on mobile */
    }
}

/* ========= CONTENT PAGES (BIO, CONTACT, ABOUT) ========= */
.content-page-v3 {
    max-width: 900px;
    margin: 4rem auto;
    padding: 0 2rem;
    animation: fadeInV3 1s ease-in-out;
}

.content-page-v3 h1 {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 3rem;
}

.bio-content-v3 {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.bio-content-v3 img {
    width: 250px;
    height: auto;
    flex-shrink: 0;
}

.bio-text-v3 p {
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.contact-intro-v3 {
    text-align: center;
    font-size: 1.2rem;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto 2rem auto;
}

.contact-email-v3-link {
    display: block;
    text-align: center;
    font-size: 1.5rem;
    font-family: var(--font-serif);
    transition: letter-spacing 0.3s ease;
}

.contact-email-v3-link:hover {
    letter-spacing: 0.1em;
}

/* --- About Galleries Page --- */
.about-galleries-container-v3 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.gallery-card-v3 {
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.gallery-card-v3 h2 {
    margin-top: 0;
    font-size: 1.5rem;
}

.gallery-card-v3 .resume-court {
    font-style: italic;
    color: #555;
    margin: 0.5rem 0 1rem 0;
}

@keyframes fadeInV3 {
    from { opacity: 0; }
    to { opacity: 1; }
}
