/* ═══════════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════════ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --dark:   #463f3a;
    --medium: #8a817c;
    --light:  #bcb8b1;
    --bg:     #f4f3ee;
    --accent: #e0afa0;

    --font-serif: 'Cormorant Garamond', Georgia, serif;
    --font-sans:  'Inter', system-ui, -apple-system, sans-serif;

    --max-w: min(1400px, 94vw);
    --pad-x: clamp(16px, 5vw, 80px);
    --section-py: clamp(80px, 10vw, 140px);
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg);
    color: var(--dark);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

#about, #news, #research, #publications, #contact {
    scroll-margin-top: 72px;
}

/* ═══════════════════════════════════════════
   NAVIGATION
═══════════════════════════════════════════ */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    padding: 18px var(--pad-x);
    background: var(--bg);
    box-shadow: 0 1px 0 var(--light);
}

.nav-container {
    max-width: var(--max-w);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: var(--font-serif);
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--dark);
    transition: color 0.35s;
}


.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--medium);
    transition: color 0.2s;
}


.nav-links a:hover {
    color: var(--accent);
}

.nav-cv {
    border: 1px solid var(--accent) !important;
    color: var(--accent) !important;
    padding: 6px 16px;
    border-radius: 2px;
    transition: background 0.2s, color 0.2s !important;
}

.nav-cv:hover {
    background: var(--accent) !important;
    color: var(--bg) !important;
}

.nav-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-hamburger span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--dark);
    transition: background 0.3s;
}


/* ═══════════════════════════════════════════
   HERO
═══════════════════════════════════════════ */
#hero {
    min-height: 100vh;
    background-color: var(--bg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 120px var(--pad-x) 100px;
    position: relative;
    overflow: hidden;
}

/* Subtle grain texture overlay */
#hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
    opacity: 0.4;
}

.hero-content {
    max-width: 820px;
    position: relative;
    z-index: 1;
}

.hero-pre {
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--medium);
    margin-bottom: 28px;
    opacity: 0;
    animation: fadeUp 0.8s 0.2s ease forwards;
}

.hero-name {
    font-family: var(--font-serif);
    font-size: clamp(60px, 10vw, 110px);
    font-weight: 300;
    color: var(--dark);
    letter-spacing: -2px;
    line-height: 0.95;
    margin-bottom: 32px;
    opacity: 0;
    animation: fadeUp 0.8s 0.4s ease forwards;
}

.hero-tagline {
    font-family: var(--font-serif);
    font-size: clamp(19px, 2.5vw, 26px);
    font-style: italic;
    font-weight: 300;
    color: var(--accent);
    line-height: 1.45;
    margin-bottom: 44px;
    opacity: 0;
    animation: fadeUp 0.8s 0.6s ease forwards;
}

.hero-themes {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 48px;
    opacity: 0;
    animation: fadeUp 0.8s 0.75s ease forwards;
}

.hero-themes span {
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.1em;
    color: var(--medium);
    border: 1px solid rgba(70, 63, 58, 0.15);
    padding: 7px 16px;
    border-radius: 100px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeUp 0.8s 0.9s ease forwards;
}

.btn-primary {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.06em;
    background: var(--accent);
    color: var(--dark);
    padding: 13px 28px;
    border-radius: 2px;
    transition: opacity 0.2s;
}

.btn-primary:hover {
    opacity: 0.85;
}

.btn-secondary {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.06em;
    color: var(--medium);
    border: 1px solid rgba(70, 63, 58, 0.2);
    padding: 13px 28px;
    border-radius: 2px;
    transition: border-color 0.2s, color 0.2s;
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.hero-scroll {
    position: absolute;
    bottom: 36px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: var(--medium);
    font-size: 10px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    opacity: 0;
    animation: fadeIn 1s 1.4s ease forwards;
}

.scroll-line {
    width: 1px;
    height: 44px;
    background: linear-gradient(to bottom, var(--medium), transparent);
    animation: scrollPulse 2.2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.85); transform-origin: top; }
    50%       { opacity: 0.9; transform: scaleY(1);    transform-origin: top; }
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

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

/* ═══════════════════════════════════════════
   SHARED LAYOUT
═══════════════════════════════════════════ */
.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 var(--pad-x);
}

.section-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 28px;
}

/* ═══════════════════════════════════════════
   ABOUT (landing)
═══════════════════════════════════════════ */
#about {
    padding-top: calc(72px + 40px);
    padding-bottom: var(--section-py);
}

.about-name-block {
    margin-bottom: 56px;
}

.about-name {
    font-family: var(--font-serif);
    font-size: clamp(28px, 4.5vw, 52px);
    font-weight: 700;
    color: var(--dark);
    letter-spacing: -2px;
    line-height: 1;
    margin-bottom: 14px;
}

.about-role {
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--medium);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 72px;
    align-items: start;
}

.about-photo {
    position: sticky;
    top: 100px;
}

.about-photo img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    display: block;
    object-fit: cover;
    object-position: top center;
}

.about-photo-caption {
    font-family: var(--font-serif);
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
    margin-top: 10px;
    line-height: 1.4;
    text-align: center;
}

.photo-placeholder {
    width: 260px;
    aspect-ratio: 3 / 4;
    background: var(--light);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.photo-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.about-bio {
    font-size: 17px;
    color: var(--dark);
    line-height: 1.85;
    margin-bottom: 18px;
}

.about-bio em {
    font-style: italic;
    color: var(--medium);
}

.about-links {
    margin-top: 36px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
}

.about-link {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--medium);
    border-bottom: 1px solid var(--light);
    padding-bottom: 2px;
    transition: color 0.2s, border-color 0.2s;
}

.about-link:hover {
    color: var(--dark);
    border-color: var(--medium);
}

.about-link-accent {
    color: var(--accent);
    border-color: var(--accent);
}

.about-link-accent:hover {
    color: var(--dark);
    border-color: var(--dark);
}

/* ═══════════════════════════════════════════
   RESEARCH SECTION
═══════════════════════════════════════════ */
#research {
    padding: 40px 0 calc(var(--section-py) + 40px);
    background-color: var(--dark);
}

.section-header-light {
    font-family: var(--font-serif);
    font-size: clamp(38px, 6vw, 64px);
    font-weight: 300;
    color: var(--bg);
    letter-spacing: -1px;
    line-height: 1;
    margin-bottom: 56px;
}

.section-subtitle {
    font-size: 32px;
    color: var(--light);
    line-height: 1.75;
    max-width: 560px;
    margin-bottom: 72px;
}

/* ─── PROJECT GRID + COMPACT CARDS ─── */
.project-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.project-card-btn {
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(138, 129, 124, 0.3);
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    text-align: left;
    width: 100%;
    padding: 0;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.25s, box-shadow 0.25s;
}

.project-card-btn.visible {
    opacity: 1;
    transform: translateY(0);
}

.project-card-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(224, 175, 160, 0.55);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transform: translateY(-3px);
}

.project-card-btn.visible:hover {
    transform: translateY(-3px);
}

.card-visual {
    width: 100%;
    height: 190px;
    background: rgba(58, 53, 49, 0.6);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.card-visual svg {
    width: 100%;
    height: 100%;
}

.card-visual img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

.card-body {
    padding: 28px 32px 32px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: var(--accent);
    margin-top: auto;
    padding-top: 20px;
    transition: gap 0.2s;
}

.project-card-btn:hover .card-cta {
    gap: 10px;
}

.project-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.project-year {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--medium);
}

.project-venue {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.06em;
    color: var(--medium);
    background: rgba(138, 129, 124, 0.15);
    padding: 3px 11px;
    border-radius: 100px;
}

.project-org {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.06em;
    color: var(--accent);
    background: rgba(138, 129, 124, 0.15);
    padding: 3px 11px;
    border-radius: 100px;
}

.project-award {
    font-size: 12px;
    font-weight: 600;
    color: var(--dark);
    background: var(--accent);
    padding: 3px 11px;
    border-radius: 100px;
    letter-spacing: 0.03em;
}

.card-methods {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.method-tag {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--light);
    background: rgba(138, 129, 124, 0.45);
    padding: 3px 11px;
    border-radius: 100px;
}

.project-title {
    font-family: var(--font-serif);
    font-size: clamp(22px, 2.8vw, 32px);
    font-weight: 400;
    color: var(--bg);
    line-height: 1.25;
    margin-bottom: 16px;
}

.project-hook {
    font-size: 16px;
    color: var(--light);
    line-height: 1.75;
    margin-bottom: 44px;
    border-left: 2px solid var(--accent);
    padding-left: 20px;
}

.project-details {
    display: flex;
    flex-direction: column;
    gap: 36px;
}

/* Divider between detail sections */
.project-section {
    padding-top: 0;
}

.detail-label {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 16px;
}

/* Method flow */
.method-flow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.method-step {
    background: rgba(70, 63, 58, 0.7);
    border: 1px solid rgba(138, 129, 124, 0.3);
    color: var(--light);
    font-size: 15px;
    font-weight: 400;
    padding: 10px 18px;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    line-height: 1.35;
}

.method-n {
    font-size: 11px;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.04em;
}

.method-arrow {
    color: rgba(138, 129, 124, 1);
    font-size: 18px;
    flex-shrink: 0;
    user-select: none;
}

/* Key Finding */
.project-finding {
    font-family: var(--font-sans);
    font-size: 15px;
    font-style: normal;
    font-weight: 400;
    color: var(--light);
    line-height: 1.75;
    margin: 0;
}

/* Project links (paper, demo, etc.) */
.project-links {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding-top: 28px;
    margin-top: 8px;
    border-top: 1px solid rgba(138, 129, 124, 0.2);
}

.project-link {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.06em;
    color: var(--accent);
    text-decoration: none;
    transition: opacity 0.15s;
}

.project-link:hover {
    opacity: 0.7;
}

/* Impact */
.impact-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.impact-list li {
    font-size: 15px;
    color: var(--light);
    line-height: 1.65;
    padding-left: 20px;
    position: relative;
}

.impact-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent);
}

.impact-stat {
    color: var(--accent);
    font-weight: 600;
}

/* ═══════════════════════════════════════════
   NEWS
═══════════════════════════════════════════ */
#news {
    padding: 40px 0 var(--section-py);
    background-color: var(--bg);
    border-top: 1px solid rgba(188, 184, 177, 0.4);
}

.news-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: 780px;
}

.news-item {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 24px;
    padding: 18px 0;
    border-bottom: 1px solid rgba(188, 184, 177, 0.35);
    align-items: baseline;
}

.news-date {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 500;
    color: var(--dark);
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.news-text {
    font-family: var(--font-sans);
    font-size: 15px;
    color: var(--dark);
    line-height: 1.6;
}

.news-text a {
    color: var(--medium);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.news-text a:hover {
    color: var(--accent);
}

/* ═══════════════════════════════════════════
   PUBLICATIONS
═══════════════════════════════════════════ */
#publications {
    padding: var(--section-py) 0;
    background-color: var(--bg);
}

.section-header-dark {
    font-family: var(--font-serif);
    font-size: clamp(38px, 6vw, 64px);
    font-weight: 300;
    color: var(--dark);
    letter-spacing: -1px;
    line-height: 1;
    margin-bottom: 64px;
}

.pub-year-group {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 40px;
    padding-bottom: 48px;
    margin-bottom: 48px;
    border-bottom: 1px solid var(--light);
}

.pub-year-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.pub-year-label {
    font-family: var(--font-serif);
    font-size: 30px;
    font-weight: 300;
    color: var(--light);
    padding-top: 2px;
    line-height: 1;
}

.pub-list {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.pub-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    /* clickable whole-item styles */
    color: inherit;
    text-decoration: none;
    padding: 12px 14px;
    margin: -12px -14px;
    border-radius: 4px;
    transition: background 0.18s;
}

.pub-item:hover {
    background: rgba(70, 63, 58, 0.05);
}

.pub-item:hover .pub-title {
    color: var(--accent);
}

.pub-item-award {
    background: #fdf5f3;
    border-left: 3px solid var(--accent);
    padding: 18px 22px;
    margin: 0;
    border-radius: 0 4px 4px 0;
    gap: 6px;
}

.pub-item-award:hover {
    background: #faeae6;
}

.pub-award-tag {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 6px;
}

.pub-title {
    font-size: 15px;
    font-weight: 500;
    color: var(--dark);
    line-height: 1.55;
}


.pub-authors {
    font-size: 15px;
    color: var(--medium);
    line-height: 1.55;
}

.pub-authors strong {
    font-weight: 600;
    color: var(--dark);
}

.pub-venue {
    font-size: 15px;
    font-weight: 500;
    color: var(--light);
    letter-spacing: 0.04em;
}

.pub-blog-link {
    display: inline-block;
    margin-top: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--medium);
    letter-spacing: 0.04em;
    transition: opacity 0.2s;
}

.pub-blog-link:hover {
    opacity: 0.7;
}

/* ═══════════════════════════════════════════
   CONTACT
═══════════════════════════════════════════ */
#contact {
    padding: var(--section-py) 0;
    background-color: var(--dark);
}

.contact-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.contact-header {
    font-family: var(--font-serif);
    font-size: clamp(34px, 7vw, 60px);
    font-weight: 300;
    color: var(--bg);
    letter-spacing: -2px;
    line-height: 1;
    margin-bottom: 20px;
}

.contact-sub {
    font-size: 18px;
    color: var(--medium);
    max-width: 440px;
    line-height: 1.75;
    margin-bottom: 40px;
}

.contact-email {
    display: inline-block;
    font-size: 20px;
    font-weight: 400;
    color: var(--accent);
    border-bottom: 1px solid rgba(224, 175, 160, 0.4);
    padding-bottom: 3px;
    margin-bottom: 36px;
    transition: border-color 0.2s, opacity 0.2s;
}

.contact-email:hover {
    opacity: 0.75;
    border-color: var(--accent);
}

.contact-links {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
    color: var(--medium);
}

.contact-links a {
    transition: color 0.2s;
}

.contact-links a:hover {
    color: var(--accent);
}

/* ═══════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════ */
@media (min-width: 1300px) {
    .project-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-photo {
        position: static;
    }

    .photo-placeholder {
        width: 200px;
        aspect-ratio: 3 / 4;
    }

    .pub-year-group {
        grid-template-columns: 56px 1fr;
        gap: 24px;
    }
}

@media (max-width: 640px) {
    .nav-links {
        display: none;
    }

    .nav-hamburger {
        display: flex;
    }

    .hero-name {
        letter-spacing: -1px;
    }

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

    .impact-stats {
        gap: 28px;
    }

    .pub-year-group {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .pub-year-label {
        font-size: 22px;
    }
}

/* ═══════════════════════════════════════════
   PROJECT DETAIL PAGE
═══════════════════════════════════════════ */
.project-page {
    padding-top: calc(56px + 40px);
    padding-bottom: var(--section-py);
    min-height: 100vh;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.06em;
    color: var(--medium);
    text-decoration: none;
    margin-bottom: 48px;
    transition: color 0.2s;
}

.back-link:hover { color: var(--accent); }

.project-page-title {
    font-family: var(--font-serif);
    font-size: clamp(30px, 5vw, 52px);
    font-weight: 300;
    color: var(--dark);
    letter-spacing: -1px;
    line-height: 1.15;
    margin-top: 16px;
    margin-bottom: 20px;
}

.project-page-hook {
    font-size: 18px;
    color: var(--dark);
    line-height: 1.7;
    border-left: 2px solid var(--accent);
    padding-left: 20px;
    margin-bottom: 56px;
}

.project-page .project-year,
.project-page .project-org {
    font-size: 18px;
}

.project-page .project-org {
    color: var(--dark);
}

.project-page-visual {
    width: 100%;
    border-radius: 6px;
    overflow: hidden;
    background: var(--bg);

    margin-bottom: 56px;
}

.project-page-visual img {
    width: 100%;
    max-height: 480px;
    display: block;
    object-fit: contain;
    object-position: center;
}

.project-page-visual > svg {
    width: 100%;
    height: auto;
    display: block;
    padding: 32px;
}

.project-page-visual--narrow {
    width: clamp(240px, 33vw, 480px);
    margin-left: auto;
    margin-right: auto;
}

.video-thumbnail-link {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    line-height: 0;
}

.video-thumbnail-link img {
    width: 100%;
    height: auto;
    display: block;
    max-height: none;
    object-fit: unset;
    transition: transform 0.25s;
}

.video-thumbnail-link:hover img {
    transform: scale(1.02);
}

.video-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.18);
    transition: background 0.2s;
    pointer-events: none;
}

.video-thumbnail-link:hover .video-play-overlay {
    background: rgba(0, 0, 0, 0.3);
}

.yt-play-btn {
    width: 48px;
    height: 34px;
    display: block;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
    transition: transform 0.18s;
}

.video-thumbnail-link:hover .yt-play-btn {
    transform: scale(1.1);
}

.yt-watch-label {
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

.video-overlay-title {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.82);
    color: #fff;
    font-family: var(--font-sans);
    font-size: 15px;
    font-style: normal;
    font-weight: 400;
    letter-spacing: 0.01em;
    padding: 6px 12px;
    border-radius: 3px;
    pointer-events: none;
}

/* Adapt detail section text for light background */
.project-page .project-finding,
.project-page .impact-list li {
    color: var(--dark);
    font-size: 17px;
}

/* Darken accent-colored highlights for readability on cream */
.project-page .detail-label,
.project-page .impact-stat,
.project-page .project-link,
.project-page .impact-list li::before {
    color: #a05848;
}

.project-page .project-link {
    font-size: 17px;
}

/* ── Scroll fade-in for project page sections ── */
.project-page .project-page-hook,
.project-page .project-page-visual,
.project-page .project-section,
.project-page .sub-project {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.project-page .project-page-hook.visible,
.project-page .project-page-visual.visible,
.project-page .project-section.visible,
.project-page .sub-project.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Numbered stepper for project pages ── */
.project-page .method-flow {
    counter-reset: step;
    align-items: stretch;
    position: relative;
    padding-left: 52px;
}

.project-page .method-step:not(:last-child)::after {
    content: '';
    position: absolute;
    left: -39px;
    top: 28px;
    bottom: -1px;
    width: 1.5px;
    background: var(--accent);
    opacity: 0.35;
    z-index: 0;
}

.project-page .method-step {
    counter-increment: step;
    position: relative;
    background: none;
    border: none;
    color: var(--dark);
    font-size: 17px;
    font-weight: 400;
    padding: 2px 0 32px 0;
    border-radius: 0;
    line-height: 1.55;
}

.project-page .method-step::before {
    content: counter(step, decimal-leading-zero);
    position: absolute;
    left: -52px;
    top: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg);
    border: 1.5px solid var(--accent);
    color: var(--accent);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-align: center;
    line-height: 25px;
    z-index: 1;
    transition: background 0.35s ease, color 0.35s ease;
}

.project-page .method-step.active::before {
    background: var(--accent);
    color: var(--bg);
}

.project-page .method-arrow {
    display: none;
}

/* Numbered sub-project sections */
.sub-project {
    border-top: 1px solid rgba(138, 129, 124, 0.25);
    padding-top: 40px;
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.sub-project-header {
    display: flex;
    align-items: baseline;
    gap: 16px;
}

.sub-project-number {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.12em;
    color: var(--accent);
    flex-shrink: 0;
}

.sub-project-title {
    font-family: var(--font-serif);
    font-size: clamp(20px, 2.2vw, 26px);
    font-weight: 600;
    color: var(--dark);
    line-height: 1.3;
}

.sub-project-layout {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 32px;
    align-items: start;
}

.sub-project-image {
    width: 100%;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light);
    font-size: 12px;
    letter-spacing: 0.06em;
    min-height: 80px;
}

.sub-project-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

@media (max-width: 640px) {
    .sub-project-layout {
        grid-template-columns: 1fr;
    }
}

.project-page .method-n {
    font-size: 15px;
    color: #a05848;
    display: inline-block;
    background: rgba(224, 175, 160, 0.18);
    padding: 2px 10px;
    border-radius: 100px;
    margin-top: 6px;
}

/* ═══════════════════════════════════════════
   UTILITY: SCROLL REVEAL
═══════════════════════════════════════════ */
.project-card-btn:nth-child(2) { transition-delay: 0.08s; }
.project-card-btn:nth-child(3) { transition-delay: 0.16s; }
.project-card-btn:nth-child(4) { transition-delay: 0.24s; }
.project-card-btn:nth-child(5) { transition-delay: 0.32s; }

/* ═══════════════════════════════════════════
   MODAL
═══════════════════════════════════════════ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(30, 26, 24, 0.82);
    z-index: 400;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 60px clamp(16px, 5vw, 48px);
    overflow-y: auto;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

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

.modal-container {
    background: var(--dark);
    border: 1px solid rgba(138, 129, 124, 0.3);
    border-radius: 8px;
    max-width: 800px;
    width: 100%;
    padding: clamp(32px, 5vw, 60px);
    position: relative;
    transform: translateY(18px);
    transition: transform 0.35s ease;
    margin-bottom: 60px;
}

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

.modal-close {
    position: absolute;
    top: 18px;
    right: 22px;
    background: none;
    border: none;
    color: var(--medium);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 2px;
    transition: color 0.2s, background 0.2s;
}

.modal-close:hover {
    color: var(--accent);
    background: rgba(224, 175, 160, 0.08);
}

.modal-body .project-title {
    font-size: clamp(24px, 3.5vw, 36px);
    margin-bottom: 20px;
}

.modal-body .project-hook {
    margin-bottom: 40px;
}

/* Responsive modal */
@media (max-width: 640px) {
    .modal-overlay {
        padding: 40px 16px;
    }

    .modal-container {
        padding: 28px 20px;
    }
}
