@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400&family=Lato:wght@300;400;500;600&display=swap");

/* ==========================================================================
   1. Color Palette, Variable Tokens & Base Resets
   ========================================================================== */
:root {
    --bg-cream: #f9f6f0;
    --accent-sage: #6e7e6a;
    --accent-dark-green: #38543e;
    --text-dark: #1a1a1a;
    --text-muted: #555555;

    /* Responsive Fluid Typography */
    --fs-h1: clamp(2rem, 5vw, 2.5rem);
    --fs-h3: clamp(1.3rem, 4vw, 1.5rem);
    --fs-body: clamp(1rem, 2.5vw, 1.1rem);
    --fs-muted: clamp(0.9rem, 2vw, 0.95rem);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Cormorant Garamond", Georgia, serif;
}

body {
    background-color: var(--bg-cream);
    color: var(--text-dark);
    overflow-x: hidden;
    opacity: 0; /* Managed by GSAP Page Load */
}

a {
    color: inherit;
    text-decoration: none;
    font-family: "Lato", sans-serif;
    transition:
        opacity 0.2s ease,
        color 0.2s ease;
}

.active-nav {
    font-weight: 600 !important;
}

/* ==========================================================================
   2. Header & Top Navigation Layout
   ========================================================================== */
header {
    width: 100%;
    background-color: var(--accent-dark-green);
    padding: 1.5rem 2rem;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.logo {
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: -0.5px;
    color: #fff;
    white-space: nowrap;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    flex-wrap: wrap; /* Prevents text clipping on small viewports */
}

.nav-links a {
    color: #fff;
    font-family: "Lato", sans-serif;
    font-weight: 300;
}

/* ==========================================================================
   3. Hero Showcase / Carousel Section
   ========================================================================== */
.hero-carousel {
    position: relative;
    width: 100%;
    height: 70vh;
    min-height: 400px; /* Ensures text has room on short mobile screens */
    background-color: #e2dfd8;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

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

.hero-text {
    position: relative;
    z-index: 10;
    text-align: center;
    width: 100%;
    max-width: 600px;
    padding: 1.5rem;
}

.hero-text h1 {
    font-size: var(--fs-h1);
    margin-bottom: 0.5rem;
    font-weight: 400;
}

.hero-text p {
    font-size: var(--fs-body);
    color: var(--text-muted);
}

/* ==========================================================================
   4. Global Page Content Layout Framework
   ========================================================================== */
main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 4rem 2rem 0 2rem;
}

.section-title-container {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 1rem;
    margin-bottom: 3rem;
    gap: 1rem;
}

.see-more {
    font-size: 0.9rem;
    text-transform: lowercase;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Main Layout Grid Modules */
.work-row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    margin-bottom: 6rem;
}

.about-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-bottom: 6rem;
}

.work-layout {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    margin-bottom: 6rem;
}

.about-section {
    margin-top: 8rem;
    padding-top: 4rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.row-label h3,
.about-text h3 {
    font-size: var(--fs-h3);
    font-weight: 400;
}

/* Inner galleries for Grid Modules */
.row-gallery,
.about-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.3rem; /* Increased slightly from 0.3rem for better breathing room */
}

.project-card {
    display: block;
    width: 100%;
}

/* ==========================================================================
   5. General Visual Utilities & Images
   ========================================================================== */
.image-placeholder {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    background-color: #dddcd7;
    margin-bottom: 0.75rem;
    transition: transform 0.3s ease;
    display: block;
}

.project-card:hover .image-placeholder {
    transform: scale(1.02);
}

.project-card p {
    font-size: var(--fs-muted);
    color: var(--text-muted);
}

/* ==========================================================================
   6. About Me Block Elements
   ========================================================================== */
.about-text p {
    font-size: var(--fs-body);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

.about-sub-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    background-color: #dddcd7;
    display: block;
}

.mini-thumb-row {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.mini-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    background-color: #dddcd7;
    border-radius: 4px;
    flex-shrink: 0;
}

/* ==========================================================================
   7. Photography Stream Template Layouts
   ========================================================================== */
.sidebar-header {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 1.3rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    font-weight: 600;
}

.sidebar-nav ul {
    list-style: none;
    position: sticky;
    top: 4rem;
}

.sidebar-nav li {
    margin-bottom: 1.2rem;
}

.sidebar-nav a {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.sidebar-nav a:hover,
.sidebar-nav li.active a {
    color: var(--text-dark);
}

.sidebar-nav li.active a {
    font-weight: bold;
}

.stream-layout {
    display: flex;
    flex-direction: column;
    gap: 5rem;
}

.stream-item {
    width: 100%;
}

.large-placeholder {
    width: 100%;
    background-color: #dddcd7;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.large-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.standard-landscape {
    aspect-ratio: 16/9;
}

.standard-portrait {
    aspect-ratio: 3/4;
    max-width: 550px;
}

.stream-text h3 {
    font-size: 1.4rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.stream-item p {
    font-size: var(--fs-body);
    line-height: 1.6;
    color: var(--text-muted);
    max-width: 800px;
}

/* ==========================================================================
   8. Global Footer Section Layout
   ========================================================================== */
footer {
    background-color: var(--accent-sage);
    color: #ffffff;
    padding: 4rem 2rem;
    margin-top: 8rem;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 2rem;
}

.footer-links a {
    display: block;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.footer-links a:hover {
    opacity: 1;
}

.footer-right {
    text-align: right;
}

.social-dots {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: flex-end;
}

.dot {
    width: 35px;
    height: 35px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.dot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==========================================================================
   8b. Hero text legibility — ensure contrast over carousel images
   ========================================================================== */
.hero-text h1 {
    color: #ffffff;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.hero-text p {
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   9a. Tablet Breakpoint (769px – 1024px)
   ========================================================================== */
@media (min-width: 769px) and (max-width: 1024px) {
    main {
        padding: 3rem 1.5rem 0 1.5rem;
    }

    .work-row,
    .about-section,
    .work-layout {
        gap: 2.5rem;
        margin-bottom: 4rem;
    }

    .about-section {
        margin-top: 5rem;
        padding-top: 3rem;
    }

    .row-gallery,
    .about-gallery {
        gap: 1rem;
    }

    .stream-layout {
        gap: 3.5rem;
    }

    footer {
        margin-top: 5rem;
    }
}

/* ==========================================================================
   9b. Mobile Fluid Optimization Responsive Media Query (< 768px)
   ========================================================================== */
/* ==========================================================================
      9. Mobile Fluid Optimization Responsive Media Query (< 768px)
      ========================================================================== */
@media (max-width: 768px) {
    header {
        padding: 1.5rem 1rem;
    }

    .header-container {
        flex-direction: column;
        text-align: center;
    }

    .nav-links {
        justify-content: center;
        gap: 1.5rem;
    }

    main {
        padding: 2rem 1rem 0 1rem;
    }

    .section-title-container {
        margin-bottom: 2rem;
    }

    /* Collapse structural layout grids into consistent stacks */
    .work-row,
    .about-section,
    .work-layout {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        margin-bottom: 4rem;
    }

    .about-section {
        margin-top: 4rem;
        padding-top: 2.5rem;
    }

    /* Filters break into smooth horizontal scroll/wrap on small profiles */
    .sidebar-nav ul {
        display: flex;
        justify-content: center;
        gap: 1.5rem;
        flex-wrap: wrap;
        position: static;
        margin-bottom: 1rem;
    }

    .sidebar-nav li {
        margin-bottom: 0;
    }

    .sidebar-header {
        text-align: center;
        margin-bottom: 1rem;
    }

    /* Inner galleries turn seamlessly to full width rows */
    .row-gallery,
    .about-gallery {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* --- MOBILE IMAGE FILTERING PATCH --- */
    /* Hides any project card inside a standard gallery row if it isn't the first item */
    .row-gallery .project-card {
        display: none;
    }
    .row-gallery .project-card:first-child {
        display: block;
        grid-column: span 1 !important; /* Forces the reporting wide image to adapt properly */
    }
    /* ------------------------------------ */

    /* Absolute Center Rules for Elements and Copy */
    .row-label,
    .about-text,
    .stream-text,
    .footer-content,
    .footer-right {
        text-align: center;
        flex-direction: column;
        align-items: center;
    }

    .mini-thumb-row,
    .social-dots {
        justify-content: center;
    }

    .project-card p,
    .stream-item p {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    /* Image Viewport standardizations for mobile parity */
    .image-placeholder,
    .large-placeholder,
    .about-sub-img {
        aspect-ratio: 4/3 !important;
        max-width: 100% !important;
        margin-left: auto;
        margin-right: auto;
    }

    footer {
        padding: 3rem 1rem;
        margin-top: 4rem;
    }
}
