/* ============================================
   CSS VARIABLES & RESET
============================================ */
:root {
    --bg-white: #ffffff;
    --text-dark: #1a1a1a;
    --gray-mid: #555;
    --border-light: #eaeaea;
    --spine-color: #d0cdc7;
}

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

html { scroll-behavior: smooth; }

body {
    background-color: var(--bg-white);
    font-family: "Amiri", Arial, sans-serif;
    overflow-x: hidden;
}

/* ============================================
   FLOATING NAVIGATION
============================================ */
header {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 28px;
    background: rgba(245, 245, 243, 0.65);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: 50px;
    border: 1.5px solid rgba(255, 255, 255, 0.45);
    box-shadow: 0 4px 24px 0 rgba(0, 0, 20, 0.1);
    z-index: 200;
    opacity: 0;
}

.logo {
    font-family: 'Catamaran', sans-serif;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 11px;
    font-weight: 500;
    text-decoration: none;
    color: var(--text-dark);
}

nav { display: flex; gap: 24px; }
nav a {
    font-family: 'Catamaran', sans-serif;
    text-decoration: none;
    color: var(--text-dark);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}
nav a:hover { opacity: 1; }

/* ============================================
   SHARED UTILITIES
============================================ */
.word { display: inline-block; will-change: transform, opacity, filter; }

.section-label {
    font-family: 'Catamaran', sans-serif;
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #999;
    margin-bottom: 36px;
    display: block;
}

/* ============================================
   HERO SECTION
============================================ */
.hero {
    position: relative;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #0a0a0a;
}

.hero-bg {
    position: absolute;
    top: -15%;
    left: -5%;
    width: 110%;
    height: 130%;
    background-image: url('image_61ad42.png');
    background-size: cover;
    background-position: center;
    z-index: 1;
    filter: brightness(0.6);
    will-change: transform;
}

#grain-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none;
    opacity: 0.048;
    mix-blend-mode: screen;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    padding: 0 20px;
    max-width: 900px;
}

.hero-content h1 {
    font-family: 'Amiri', serif;
    font-size: clamp(2.4rem, 5vw, 5rem);
    font-weight: 400;
    line-height: 1.1;
}

@media (max-width: 600px) {
    .hero-content h1 {
        font-size: clamp(1.75rem, 8vw, 2.4rem);
    }
    .hero-content h1 span[style],
    .hero-content h1 em span[style] {
        white-space: normal !important;
    }
}

.hero-content h1 em { font-style: italic; }

.hero-illustration {
    margin: 36px auto 0;
    max-width: 820px;
    width: 92%;
    opacity: 1;
    position: relative;
}

.hero-illustration svg {
    width: 100%;
    height: auto;
    display: block;
    overflow: visible;
}

.hero-illustration svg path {
    stroke: rgba(255, 255, 255, 0.82);
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hero-sub {
    margin-top: 24px;
    font-size: clamp(0.85rem, 1.4vw, 1rem);
    letter-spacing: 0.5px;
    color: rgba(255,255,255,0.8);
    line-height: 1.6;
}

/* ============================================
   RIP DIVIDER
============================================ */
.rip-divider {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    z-index: 10;
    line-height: 0;
}

.rip-divider svg {
    display: block;
    width: 100%;
    height: 90px;
    transform: scaleX(1.05);
}

/* ============================================
   CONTENT SECTION (INFORMATION)
============================================ */
.content-section {
    position: relative;
    background: var(--bg-white);
    padding: 120px 5% 150px 5%;
    z-index: 20;
    background-image:
        linear-gradient(to right, rgba(0,0,0,0.03) 1.5px, transparent 1.5px),
        linear-gradient(to bottom, rgba(0,0,0,0.03) 1.5px, transparent 1.5px);
    background-size: 60px 60px;
}

.content-container {
    max-width: 1000px;
    margin: 0 auto;
}

.intro-text {
    font-family: 'Lora', serif;
    font-size: clamp(1.8rem, 3.5vw, 3rem);
    line-height: 1.25;
    font-weight: 400;
    margin-bottom: 60px;
}

.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    border-top: 1px solid var(--border-light);
    padding-top: 40px;
}

.details-grid p {
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--gray-mid);
}

/* ============================================
   ABOUT SECTION
============================================ */
.about-section {
    position: relative;
    background: var(--bg-white);
    /* background-image:
        linear-gradient(to right, rgba(0,0,0,0.03) 1.5px, transparent 1.5px),
        linear-gradient(to bottom, rgba(0,0,0,0.03) 1.5px, transparent 1.5px); */
    background-size: 60px 60px;
    z-index: 20;
    padding: 0 0 80px 0;
}

.about-divider-top {
    border: none;
    border-top: 1px solid var(--border-light);
    margin: 0 5%;
    margin-bottom: 80px;
}

.about-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 5%;
    gap: 0;
}

/* LEFT: bio */
.col-bio {
    padding-right: 56px;
    background: transparent;
}

.page-title {
    font-family: 'Amiri', serif;
    font-size: clamp(2rem, 3vw, 3.2rem);
    font-weight: 400;
    line-height: 1.1;
    margin-bottom: 44px;
}
.page-title em { font-style: italic; }

.portrait-wrap {
    float: left;
    width: 110px;
    height: 138px;
    margin: 4px 22px 12px 0;
    background: #e8e6e0;
    overflow: hidden;
}
.portrait-wrap img {
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    filter: grayscale(15%);
}
.portrait-placeholder {
    width: 100%; height: 100%;
    background: linear-gradient(135deg, #ddd 0%, #c8c8c8 100%);
    display: flex; align-items: center; justify-content: center;
}
.portrait-placeholder span {
    font-family: 'Catamaran', sans-serif;
    font-size: 9px; letter-spacing: 1.5px;
    text-transform: uppercase; color: #999;
}

.bio-block { overflow: hidden; }
.bio-block p {
    font-family: 'Lora', serif;
    font-size: 0.9rem;
    line-height: 1.85;
    color: var(--gray-mid);
    margin-bottom: 14px;
}
.bio-block p:last-child { margin-bottom: 0; }

/* RIGHT: timeline */
.col-timeline {
    background: var(--bg-white);
    padding-left: 56px;
    border-left: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* ============================================
   TIMELINE
============================================ */
.timeline {
    position: relative;
    display: flex;
    flex-direction: column;
}

.spine-line {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, #bbb 0%, #ddd 100%);
    z-index: 0;
    transform-origin: bottom center;
    transform: translateX(-50%) scaleY(0);
}

.timeline-row {
    display: grid;
    grid-template-columns: 1fr 40px 1fr;
    align-items: center;
    padding: 28px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    position: relative;
    z-index: 1;
    opacity: 0;
    will-change: transform, opacity, filter;
}
.timeline-row:last-child { border-bottom: none; }

.tl-left {
    text-align: right;
    padding-right: 28px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tl-role {
    font-family: 'Amiri', serif;
    font-size: 1.05rem;
    font-weight: 400;
    color: var(--text-dark);
    transition: font-weight 0.2s ease;
}

.tl-type {
    font-family: 'Catamaran', sans-serif;
    font-size: 9px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #bbb;
    display: block;
}

.tl-dates {
    font-family: 'Catamaran', sans-serif;
    font-size: 9px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #ccc;
    display: block;
    transition: color 0.3s ease;
}

.tl-node {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.tl-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #ccc;
    border: none;
    transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.tl-right {
    padding-left: 28px;
    display: flex;
    align-items: center;
}

.tl-logo {
    height: 28px;
    width: auto;
    max-width: 130px;
    object-fit: contain;
    object-position: left center;
    filter: grayscale(100%);
    opacity: 0.32;
    transition: opacity 0.35s ease;
}

.tl-logo-placeholder span {
    font-family: 'Catamaran', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #ccc;
    transition: color 0.3s ease;
}

/* Hover states */
.timeline-row:hover .tl-dot {
    background: var(--text-dark);
    box-shadow: 0 0 0 4px rgba(26,26,26,0.09);
    transform: scale(1.4);
}
.timeline-row:hover .tl-logo { opacity: 0.95; }
.timeline-row:hover .tl-logo-placeholder span { color: var(--text-dark); }
.timeline-row:hover .tl-role { font-weight: 700; }
.timeline-row:hover .tl-dates { color: #555; }

/* Most-recent row */
.timeline-row:first-child .tl-dot {
    background: var(--text-dark);
    box-shadow: 0 0 0 3px rgba(26,26,26,0.08);
}
.timeline-row:first-child .tl-logo { opacity: 0.6; }
.timeline-row:first-child .tl-role { font-weight: 700; }

/* ============================================
   SECTION DIVIDER (between About & Projects)
============================================ */
.projects-divider {
    border: none;
    border-top: 1px solid var(--border-light);
    margin: 0 5%;
}

/* ============================================
   GRID SECTION (SELECTED PROJECTS)
============================================ */
.grid-section {
    background: #f7f7f5;
    padding: 120px 5%;
    z-index: 20;
    position: relative;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 60px;
}

.project-card {
    background: var(--bg-white);
    padding: 40px;
    border: 1px solid var(--border-light);
    text-decoration: none;
    color: var(--text-dark);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.04);
}

/* Card with image — removes default padding so image sits flush */
.project-card--has-image {
    padding: 0;
    overflow: hidden;
    cursor: pointer;
}

.project-card-img-wrap {
    width: 100%;
    aspect-ratio: 16 / 7;
    overflow: hidden;
    background: #e8e6e0;
    flex-shrink: 0;
}

.project-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    transition: transform 0.5s ease, filter 0.4s ease;
    filter: grayscale(15%);
}

.project-card--has-image:hover .project-card-img {
    transform: scale(1.04);
    filter: grayscale(0%);
}

.project-card-text {
    padding: 32px 36px 36px;
}

/* ============================================
   PROJECT MODAL
============================================ */
.project-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5%;
    background: rgba(26, 26, 26, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.project-modal-overlay.is-open {
    opacity: 1;
    pointer-events: all;
}

.project-modal {
    position: relative;
    width: 100%;
    max-width: 760px;
    max-height: 88vh;
    overflow-y: auto;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.12);
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    scrollbar-width: thin;
    scrollbar-color: var(--border-light) transparent;
}

.project-modal-overlay.is-open .project-modal {
    transform: translateY(0);
}

.project-modal-hero {
    width: 100%;
    aspect-ratio: 16 / 7;
    overflow: hidden;
    background: #e8e6e0;
}

.project-modal-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

.project-modal-body {
    padding: 48px 52px 56px;
}

.project-modal-body > p {
    font-family: 'Lora', serif;
    font-size: 0.92rem;
    line-height: 1.85;
    color: var(--gray-mid);
    margin-bottom: 18px;
}

.project-modal-body h4 {
    font-family: 'Catamaran', sans-serif;
    font-size: 9px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #bbb;
    margin-top: 36px;
    margin-bottom: 14px;
}

.project-modal-title {
    font-family: 'Amiri', serif;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 400;
    line-height: 1.15;
    margin: 14px 0 28px;
    color: var(--text-dark);
}

.project-modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid var(--border-light);
}

.project-modal-tag {
    font-family: 'Catamaran', sans-serif;
    font-size: 9px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #999;
    border: 1px solid var(--border-light);
    padding: 6px 14px;
}

.project-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border-light);
    color: var(--text-dark);
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
    backdrop-filter: blur(4px);
    z-index: 10;
    letter-spacing: 0;
    font-family: 'Catamaran', sans-serif;
}

.project-modal-close:hover {
    background: var(--text-dark);
    color: #fff;
    border-color: var(--text-dark);
}

body.modal-open { overflow: hidden; }

.project-modal-link {
    display: inline-block;
    margin-top: 32px;
    font-family: 'Catamaran', sans-serif;
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-dark);
    text-decoration: none;
    border-bottom: 1px solid var(--text-dark);
    padding-bottom: 2px;
    transition: opacity 0.2s ease;
}

.project-modal-link:hover { opacity: 0.5; }

/* Placeholder card image */
.project-card-img-wrap--placeholder {
    background: linear-gradient(135deg, #eeecea 0%, #e4e1db 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-img-placeholder-label {
    font-family: 'Catamaran', sans-serif;
    font-size: 9px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #bbb;
}

/* Placeholder modal hero */
.project-modal-hero--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #eeecea 0%, #e4e1db 100%);
}

.modal-hero-placeholder-label {
    font-family: 'Catamaran', sans-serif;
    font-size: 9px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #bbb;
}

@media (max-width: 640px) {
    .project-modal-body { padding: 32px 28px 40px; }
}

.card-meta {
    font-family: 'Catamaran', sans-serif;
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #999;
    margin-bottom: 20px;
    display: block;
}

.card-title {
    font-family: 'Amiri', serif;
    font-size: 1.8rem;
    font-weight: 400;
    margin-bottom: 16px;
}

.card-desc {
    font-family: 'Lora', serif;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--gray-mid);
}

/* ============================================
   FOOTER
============================================ */
footer {
    background: var(--bg-white);
    border-top: 1px solid var(--border-light);
    padding: 40px 5%;
    z-index: 20;
    position: relative;
}

.footer-inner {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-name {
    font-family: 'Catamaran', sans-serif;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
    color: #999;
}

.footer-links {
    display: flex;
    gap: 28px;
    align-items: center;
}

.footer-links a {
    font-family: 'Catamaran', sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-dark);
    text-decoration: none;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

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

/* ============================================
   RESPONSIVE
============================================ */
@media (max-width: 900px) {
    .about-inner {
        grid-template-columns: 1fr;
    }
    .col-bio {
        padding-right: 0;
        margin-bottom: 60px;
    }
    .col-timeline {
        border-left: none;
        border-top: 1px solid var(--border-light);
        padding-left: 0;
        padding-top: 60px;
    }
}

@media (max-width: 768px) {
    .details-grid { grid-template-columns: 1fr; }
    header { flex-direction: column; border-radius: 20px; padding: 16px; }
    .footer-inner { flex-direction: column; gap: 20px; text-align: center; }
}

/* ============================================
   PLAY SECTION
============================================ */
.play-section {
    background: var(--bg-white);
    padding: 120px 5% 140px;
    position: relative;
    z-index: 20;
    border-top: 1px solid var(--border-light);
}

.play-container {
    max-width: 1000px;
    margin: 0 auto;
}

.play-header {
    display: flex;
    align-items: baseline;
    gap: 32px;
    margin-bottom: 56px;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 28px;
}

.play-header .section-label { margin-bottom: 0; flex-shrink: 0; }

.play-lede {
    font-family: 'Lora', serif;
    font-size: 0.95rem;
    font-style: italic;
    color: #999;
    line-height: 1.5;
}

/* Featured large item */
.play-feature {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 56px;
    align-items: center;
    text-decoration: none;
    color: var(--text-dark);
    margin-bottom: 56px;
    padding-bottom: 56px;
    border-bottom: 1px solid var(--border-light);
}

.play-feature-img {
    overflow: hidden;
    aspect-ratio: 4/3;
    background: #f0ede8;
}

.play-img-placeholder {
    width: 100%;
    height: 100%;
    min-height: 260px;
    background: linear-gradient(135deg, #e8e5df 0%, #d8d4cc 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.5s ease;
}

.play-img-placeholder span {
    font-family: 'Catamaran', sans-serif;
    font-size: 9px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #bbb;
}

.play-feature:hover .play-img-placeholder,
.play-card:hover .play-img-placeholder { transform: scale(1.03); }

.play-tag {
    font-family: 'Catamaran', sans-serif;
    font-size: 9px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #bbb;
    display: block;
    margin-bottom: 18px;
}

.play-feature-title {
    font-family: 'Amiri', serif;
    font-size: clamp(1.6rem, 2.5vw, 2.2rem);
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: 20px;
    transition: opacity 0.2s ease;
}

.play-feature:hover .play-feature-title { opacity: 0.7; }

.play-feature-desc {
    font-family: 'Lora', serif;
    font-size: 0.9rem;
    line-height: 1.75;
    color: var(--gray-mid);
    margin-bottom: 28px;
}

.play-read-more {
    font-family: 'Catamaran', sans-serif;
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-dark);
    display: inline-block;
    border-bottom: 1px solid var(--text-dark);
    padding-bottom: 2px;
    transition: opacity 0.2s ease;
    text-decoration: none;
}

.play-feature:hover .play-read-more,
.play-card:hover .play-read-more { opacity: 0.5; }

/* Secondary row */
.play-secondary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.play-card {
    text-decoration: none;
    color: var(--text-dark);
    display: flex;
    flex-direction: column;
}

.play-card-img {
    overflow: hidden;
    aspect-ratio: 16/9;
    background: #f0ede8;
    margin-bottom: 24px;
    position: relative;
}

.play-yt-wrap {
    aspect-ratio: 16/9;
    background: #000;
}

.play-yt-iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.play-card-img--video .play-img-placeholder {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2a26 100%);
}

.play-card-img--video .play-img-placeholder span { color: #555; }

.play-video-badge {
    position: absolute;
    bottom: 14px;
    left: 14px;
    display: flex;
    align-items: center;
    gap: 7px;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.15);
    padding: 5px 10px 5px 7px;
    border-radius: 20px;
}

.play-video-badge span {
    font-family: 'Catamaran', sans-serif;
    font-size: 9px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.8);
}

.play-card-title {
    font-family: 'Amiri', serif;
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.25;
    margin-bottom: 12px;
    transition: opacity 0.2s ease;
}

.play-card:hover .play-card-title { opacity: 0.7; }

.play-card-desc {
    font-family: 'Lora', serif;
    font-size: 0.85rem;
    line-height: 1.7;
    color: var(--gray-mid);
    margin-bottom: 18px;
}

@media (max-width: 860px) {
    .play-feature { grid-template-columns: 1fr; gap: 32px; }
    .play-secondary { grid-template-columns: 1fr; }
}