/* ==========================================================================
   ppuzzl.works -- Editorial Portfolio
   Palette: Cream #FAF8F0, Rich Black #1A1A1A, Warm Slate #686058,
            Dusty Rose #C9A0A0, Sage #A8B5A0, Charcoal #2C2C2C
   Fonts: Playfair Display 700, Source Serif 4 400, Josefin Sans 600
   ========================================================================== */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: #FAF8F0;
    color: #686058;
    font-family: 'Source Serif 4', 'Georgia', serif;
    font-size: 1.0625rem;
    font-weight: 400;
    line-height: 1.78;
    -webkit-font-smoothing: antialiased;
}

/* --- Typography --- */
h1, h2, h3 {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-weight: 700;
    color: #1A1A1A;
    line-height: 1.15;
}

.meta-label {
    font-family: 'Josefin Sans', 'Helvetica Neue', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #C9A0A0;
}

.meta-value {
    font-family: 'Source Serif 4', 'Georgia', serif;
    font-size: 0.9375rem;
    color: #686058;
    display: block;
    margin-top: 0.2em;
}

/* --- Hero --- */
#hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, #1A1A1A 0%, #2C2C2C 35%, #686058 65%, #C9A0A0 100%);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 2rem;
}

.hero-meta {
    font-family: 'Josefin Sans', 'Helvetica Neue', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #C9A0A0;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-size: clamp(2.2rem, 4.5vw, 4rem);
    font-weight: 700;
    color: #FAF8F0;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-size: clamp(1rem, 2vw, 1.5rem);
    font-weight: 700;
    font-style: italic;
    color: #C9A0A0;
}

/* --- Botanical Dividers --- */
.botanical-divider {
    display: flex;
    justify-content: center;
    padding: 2.5rem 0;
}

.botanical-divider svg {
    width: min(400px, 80vw);
    height: 40px;
}

/* --- Project Feature (8/4 Asymmetric Grid) --- */
.project-feature {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.project-grid {
    display: grid;
    grid-template-columns: 8fr 4fr;
    gap: 3rem;
    align-items: start;
}

.project-grid--reversed {
    grid-template-columns: 4fr 8fr;
    direction: rtl;
}

.project-grid--reversed > * {
    direction: ltr;
}

.project-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 2px;
    margin-bottom: 1.5rem;
}

.project-title {
    font-size: clamp(1.6rem, 3vw, 2.5rem);
    margin-bottom: 0.75rem;
}

.project-body {
    color: #686058;
    margin-bottom: 1rem;
}

/* --- Project Sidebar --- */
.project-sidebar {
    padding-top: 0.5rem;
}

.sidebar-block {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(104, 96, 88, 0.15);
}

.sidebar-block:last-of-type {
    border-bottom: none;
}

.pull-quote {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    font-style: italic;
    font-weight: 700;
    color: #C9A0A0;
    line-height: 1.45;
    border-left: 3px solid #C9A0A0;
    padding-left: 1.25rem;
    margin-top: 1.5rem;
}

/* --- Expandable Cards --- */
.project-expandable {
    position: relative;
}

.project-expand-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
    -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
}

.project-expandable[data-expanded="true"] .project-expand-content {
    max-height: 600px;
    -webkit-mask-image: none;
    mask-image: none;
}

.expand-btn {
    font-family: 'Josefin Sans', 'Helvetica Neue', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #C9A0A0;
    background: none;
    border: none;
    border-bottom: 1px solid #C9A0A0;
    padding: 0.25em 0;
    cursor: pointer;
    margin-top: 0.5rem;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.expand-btn:hover {
    color: #1A1A1A;
    border-color: #1A1A1A;
}

/* --- Secondary Projects --- */
.secondary-projects {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem 3rem;
}

.section-heading {
    font-size: clamp(1.6rem, 3vw, 2.5rem);
    text-align: center;
    margin-bottom: 3rem;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 2rem;
}

.project-card {
    grid-column: span 4;
    background: #FAF8F0;
    border: 1px solid rgba(104, 96, 88, 0.1);
    border-radius: 2px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.project-card:hover {
    box-shadow: 0 4px 20px rgba(26, 26, 26, 0.08);
}

.project-card--wide {
    grid-column: span 6;
}

.card-image {
    width: 100%;
    aspect-ratio: 3 / 2;
}

.card-content {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.25rem;
    margin: 0.5rem 0 0.75rem;
}

.card-body {
    font-size: 0.9375rem;
    color: #686058;
    line-height: 1.7;
}

/* --- Footer --- */
#footer {
    background-color: #2C2C2C;
    padding: 4rem 2rem;
    text-align: center;
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
}

.footer-mark {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #FAF8F0;
    letter-spacing: 0.08em;
    margin-bottom: 0.75rem;
}

.footer-note {
    font-family: 'Source Serif 4', 'Georgia', serif;
    font-size: 0.9375rem;
    color: #686058;
    margin-bottom: 1.5rem;
}

.footer-copyright {
    font-family: 'Josefin Sans', 'Helvetica Neue', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #C9A0A0;
}

/* --- Fade-in animation --- */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .project-grid,
    .project-grid--reversed {
        grid-template-columns: 1fr;
        direction: ltr;
    }

    .project-sidebar {
        display: flex;
        flex-wrap: wrap;
        gap: 0 2rem;
    }

    .sidebar-block {
        border-bottom: none;
        padding-bottom: 0.5rem;
        margin-bottom: 0.5rem;
    }

    .pull-quote {
        flex-basis: 100%;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .project-card,
    .project-card--wide {
        grid-column: span 1;
    }
}

@media (max-width: 600px) {
    #hero {
        min-height: 400px;
    }

    .project-feature {
        padding: 0 1.25rem;
    }

    .secondary-projects {
        padding: 1rem 1.25rem 2rem;
    }
}
