/* ════════════════════════════════════════════════════════════════
   main.css
   Covers:  index.html (portfolio homepage)
            case/*.html (all project case study pages)
   ════════════════════════════════════════════════════════════════ */

/* ── RESET & BASE ── */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #fff;
    color: #111;
}


/* ════════════════════════════════════════════════════════════════
   INDEX PAGE
   ════════════════════════════════════════════════════════════════ */

/* ── NAV ── */
nav {
    position: fixed;
    top: 16px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 10px 28px;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: 50px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.10);
    z-index: 1000;
    opacity: 0;
    transform: translateY(-24px);
    transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.3s;
}

nav.nav-loaded {
    opacity: 1;
    transform: translateY(0);
}

/* Hide hamburger on desktop — mobile only */
.nav-hamburger-wrap {
    display: none;
}

/* Scoped to direct nav children only */
body > nav > a {
    color: #555;
    font-size: 15px;
    font-style: italic;
    text-decoration: none;
    transition: color 0.2s, font-size 0.2s ease;
    letter-spacing: 0.01em;
    display: inline-block;
}

body > nav > a:hover  { color: #000; font-size: 20px; text-decoration: none; }
body > nav > a.active { color: #000; font-weight: 600; font-size: 20px; }

.nav-btn {
    background: #000;
    color: #fff !important;
    font-style: normal !important;
    padding: 7px 18px;
    border-radius: 50px;
    font-weight: 500;
    font-size: 14px !important;
    transition: background 0.2s !important;
}
.nav-btn:hover { background: #333; text-decoration: none !important; }

/* ── HAMBURGER DROPDOWN ── */
.nav-hamburger-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 2px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: center;
    justify-content: center;
}

.nav-hamburger-btn span {
    display: block;
    width: 20px;
    height: 2px;
    background: #555;
    border-radius: 2px;
    will-change: transform, opacity;
    transition: background 0.2s, transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
    transform-origin: center;
}

.nav-hamburger-btn:hover span { background: #000; }

.nav-hamburger-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger-btn.open span:nth-child(2) { opacity: 0; width: 0; }
.nav-hamburger-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-dropdown {
    position: fixed;
    top: 68px;
    right: 20px;
    width: calc(100% - 40px);
    max-width: calc(100vw - 40px);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 20px;
    box-shadow: 0 8px 48px rgba(0,0,0,0.12);
    z-index: 999;
    padding: 48px 60px 56px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transform: translateY(-12px) scale(0.98);
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-dropdown.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.nav-dropdown-link {
    font-family: Garamond, serif;
    font-style: italic;
    font-size: clamp(2.4rem, 6vw, 5rem);
    color: #bbb;
    text-decoration: none;
    line-height: 1.15;
    transition: color 0.2s ease, transform 0.2s ease;
    display: inline-block;
    width: fit-content;
}

.nav-dropdown-link:hover { color: #000; transform: translateX(8px); }

.nav-dropdown-divider {
    width: 100%;
    height: 1px;
    background: rgba(0,0,0,0.07);
    margin: 4px 0;
}

.nav-dropdown-footer {
    margin-top: auto;
    padding-top: 32px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    color: #aaa;
}

/* ── SCROLL REVEAL ── */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays — about panels */
.sectionabout1 { transition-delay: 0s; }
.sectionabout2 { transition-delay: 0.15s; }
.sectionabout3 { transition-delay: 0.3s; }

/* Stagger delays — work cells, mirrors visual reading order */
#cell-snap      { transition-delay: 0s;    }
#cell-xrmural   { transition-delay: 0.08s; }
#cell-clash     { transition-delay: 0.14s; }
#cell-did       { transition-delay: 0.2s;  }
#cell-atall     { transition-delay: 0.08s; }
#cell-eafc      { transition-delay: 0.14s; }
#cell-litespots { transition-delay: 0.08s; }

/* ── SECTIONS SHARED ── */
section { min-height: 100vh; }
footer  { min-height: unset; }

/* ── HOME ── */
#home {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 80px;
    padding: 0 40px;
    position: relative;
}

.avatar-wrap {
    position: relative;
    display: inline-block;
    width: 380px;
    flex-shrink: 0;
    cursor: pointer;
    animation: avatarIdle 3.6s ease-in-out infinite;
}

.avatar-wrap:hover {
    animation-play-state: paused;
    transform: scale(1.03);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes avatarIdle {
    0%   { transform: translateY(0px)   rotate(0deg);  }
    25%  { transform: translateY(-8px)  rotate(1deg);  }
    50%  { transform: translateY(-12px) rotate(0deg);  }
    75%  { transform: translateY(-8px)  rotate(-1deg); }
    100% { transform: translateY(0px)   rotate(0deg);  }
}

.avatar {
    width: 100%;
    display: block;
    transition: opacity 0.4s ease;
}

.avatar-hover {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
}

.avatar-wrap:hover .avatar-default { opacity: 0; }
.avatar-wrap:hover .avatar-hover   { opacity: 1; }

/* ── Spotify CTA overlay ── */
.avatar-cta {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    font-family: 'Courier New', Courier, monospace;
    font-size: 12px;
    letter-spacing: 0.08em;
    white-space: nowrap;
    padding: 8px 16px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 7px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.avatar-cta::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #1DB954;
    flex-shrink: 0;
}

.avatar-wrap:hover .avatar-cta {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.hometext {
    max-width: 560px;
    text-align: center;
}

.hometext h1 {
    font-family: Garamond, serif;
    font-style: italic;
    font-weight: 400;
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.hometext p {
    font-size: 1.8rem;
    line-height: 1.55;
    color: #333;
    font-family: 'Courier New', Courier, monospace;
}

.emoji {
    font-size: 24px;
    margin-top: 12px;
    display: inline-block;
    animation: float 1.4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-6px); }
}

.scroll-indicator {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    font-size: 15px;
    color: #888;
    will-change: opacity, transform;
}

.scroll-indicator .arrow {
    font-size: 22px;
    margin-top: 6px;
    display: inline-block;
    animation: arrowbounce 1.4s ease-in-out infinite;
}

@keyframes arrowbounce {
    0%, 100% { transform: translateY(0); opacity: 1; }
    50%       { transform: translateY(10px); opacity: 0.5; }
}

/* ── WORK ── */
#work {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 120px 60px 100px;
}

.work-header {
    max-width: 1200px;
    width: 100%;
    margin-bottom: 32px;
}

.section-tag {
    display: inline-block;
    font-family: 'Courier New', Courier, monospace;
    font-size: 11px;
    font-style: normal;
    letter-spacing: 0.18em;
    text-transform: lowercase;
    color: #aaa;
    padding-bottom: 6px;
    border-bottom: 1px solid #ddd;
}

.wrapperwork {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: 260px;
    gap: 24px;
    max-width: 1200px;
    width: 100%;
}

/* Column widths */
.w-12 { grid-column: span 12; }
.w-8  { grid-column: span 8;  }
.w-4  { grid-column: span 4;  }

/* Row heights */
.h-2 { grid-row: span 2; }

/* Cell-specific grid placement */
#cell-snap      { grid-row: span 2; }
#cell-eafc      { grid-column: span 3; }
#cell-litespots { grid-column: span 9; }

/* EAFC — contain so the full portrait is visible with no crop */
#cell-eafc img {
    object-fit: contain;
    background: #000;
}

.work-cell {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.work-cell img,
.work-cell video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.work-cell:hover img,
.work-cell:hover video {
    transform: scale(1.04);
}

.work-item-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

/* Video sound indicator */
.work-cell:has(video)::after {
    content: '🔇';
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 13px;
    background: rgba(0, 0, 0, 0.48);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 4px 10px;
    border-radius: 50px;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 2;
}

.work-cell:has(video):hover::after {
    content: '🔊';
}

/* ── ABOUT ── */
#about {
    background: #f9f9f9;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 100px 20px;
    min-height: unset;
}

.mainabout {
    max-width: 1100px;
    width: 100%;
    box-shadow: 0 0 10px rgba(0,0,0,0.15);
    padding: 10px;
    border-radius: 6px;
    background: #fff;
}

.wrapperabout {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    padding: 20px;
}

.sectionabout1 {
    font-family: Garamond, serif;
    font-weight: 400;
    font-size: 22px;
    padding: 20px;
    background: #fff;
    color: #333;
    border-radius: 5px;
    line-height: 1.6;
}

.sectionabout2,
.sectionabout3 {
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    line-height: 1.7;
    padding: 20px;
    background: #fff;
    color: #333;
    border-radius: 5px;
}

/* ── CONTACT / FOOTER ── */
#contact {
    background: #fff;
    padding: 60px 40px 80px;
    min-height: 280px;
    display: block;
    width: 100%;
    border-top: 1.5px dashed #bbb;
}

.contact-tagline {
    font-family: Garamond, 'Times New Roman', serif;
    font-weight: 400;
    font-size: clamp(2.8rem, 7vw, 5.5rem);
    color: #111;
    line-height: 1.1;
    margin-bottom: 48px;
}

.contact-tagline em { font-style: italic; }

.contact-links {
    display: flex;
    gap: 40px;
    justify-content: flex-start;
}

.contact-social-link {
    font-family: 'Courier New', Courier, monospace;
    font-size: 15px;
    color: #111;
    text-decoration: none;
    letter-spacing: 0.01em;
    position: relative;
    padding-bottom: 2px;
}

.contact-social-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 1px;
    background: #111;
    transition: width 0.25s ease;
}

.contact-social-link:hover::after { width: 100%; }

/* ── PAGE LOAD ENTRANCE ANIMATIONS ── */
.home-enter {
    animation: homeEnter 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

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

.avatar-wrap.home-enter {
    animation: avatarEnter 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes avatarEnter {
    from { opacity: 0; transform: scale(0.88) translateY(24px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.scroll-indicator.home-enter {
    animation: scrollEnter 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes scrollEnter {
    from { opacity: 0; transform: translateX(-50%) translateY(16px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}


/* ════════════════════════════════════════════════════════════════
   PROJECT / CASE STUDY PAGES  (case/*.html)
   ════════════════════════════════════════════════════════════════ */

/* ── BACK LINK ── */
.back-link {
    position: fixed;
    top: 24px;
    left: 28px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    color: #555;
    text-decoration: none;
    letter-spacing: 0.04em;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
    /*
     * Visible by default — JS adds a fade-in as a progressive enhancement.
     * If JS fails or is slow, the back link is always accessible.
     */
    opacity: 1;
}

.back-link:hover { color: #000; }

.back-arrow {
    font-size: 16px;
    line-height: 1;
}

/* ── HERO ── */
.project-hero {
    width: 100%;
    /* top padding clears the fixed back-link */
    padding: 72px 28px 0;
}

.project-hero-img,
.project-hero-video {
    width: 100%;
    aspect-ratio: 16 / 7;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}

/* ── MAIN CONTENT ── */
.project-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 28px 80px;
}

/* ── TITLE BLOCK ── */
.project-title-block {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    margin-bottom: 48px;
    min-height: unset; /* override section { min-height: 100vh } */
}

.project-title-left { flex: 1; }

.project-title {
    font-family: Garamond, 'Times New Roman', serif;
    font-weight: 400;
    font-size: clamp(2rem, 5vw, 3.2rem);
    line-height: 1.1;
    margin-bottom: 12px;
}

.project-title em { font-style: italic; }

.project-subtitle {
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 14px;
    color: #888;
    margin-bottom: 24px;
    letter-spacing: -0.01em;
}

.project-rule {
    border: none;
    border-top: 1px solid #e0e0e0;
    width: 100%;
}

/*
 * Intro text — sits directly below the rule inside the title block.
 * Matches the reference layout where the first description paragraph
 * lives under the divider rather than in a separate body section.
 */
.project-intro {
    padding-top: 32px;
}

.project-intro p {
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 15px;
    line-height: 1.75;
    color: #333;
    margin-bottom: 20px;
}

.project-intro p:last-child { margin-bottom: 0; }

/* Meta column */
.project-meta {
    flex-shrink: 0;
    width: 180px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.project-meta-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.project-meta-label {
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #111;
    margin-bottom: 6px;
}

.project-meta-value {
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    display: block;
}

/* ── BODY COPY ── */
.project-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    padding-top: 48px;
    min-height: unset; /* override section { min-height: 100vh } */
}

.project-col p {
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 15px;
    line-height: 1.75;
    color: #333;
    margin-bottom: 20px;
}

.project-col p:last-child { margin-bottom: 0; }

/* ── ADDITIONAL MEDIA ──
 * Optional sections for supporting visuals below the body copy.
 */
.project-media-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding-top: 48px;
}

.project-media-grid img,
.project-media-grid video {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 10px;
    display: block;
}

.project-media-full {
    padding-top: 32px;
}

.project-media-full img,
.project-media-full video {
    width: 100%;
    aspect-ratio: 16 / 7;
    object-fit: cover;
    border-radius: 10px;
    display: block;
}

/* ── PROJECT FOOTER ── */
.project-footer {
    border-top: 1px solid #e8e8e8;
    padding: 32px 28px;
    background: #fff;
}

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

.project-footer-back {
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    color: #888;
    text-decoration: none;
    transition: color 0.2s;
}

.project-footer-back:hover { color: #000; }

.project-footer-links {
    display: flex;
    gap: 32px;
}

.project-footer-link {
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    color: #111;
    text-decoration: none;
    position: relative;
    padding-bottom: 2px;
}

.project-footer-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 1px;
    background: #111;
    transition: width 0.25s ease;
}

.project-footer-link:hover::after { width: 100%; }

/* ── PROJECT ENTRANCE ANIMATIONS ──
 * One animation on .project-hero, one on .project-main.
 * Per-element stagger delays were the root cause of the gap —
 * `animation: X both` holds each element at opacity:0 + translateY(28px)
 * during its delay. That shifts elements in the normal flow, pushing
 * everything below them down by 28px and creating phantom whitespace.
 * Animating the container as one unit eliminates this entirely.
 */
.project-hero {
    animation: projectFadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.project-main {
    animation: projectFadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: 0.1s;
}

/* Ensure no child element overrides the container animation */
.project-title-block,
.snap-title-only,
.project-body,
.snap-description,
.snap-deck,
.project-media-grid,
.project-media-full {
    animation: none;
    opacity: 1;
    transform: none;
}

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


/*
 * Full "Get in touch" footer for project pages.
 * Left side: back to portfolio link.
 * Right side: big tagline + contact links — matches the homepage footer
 * but right-aligned so it feels intentional rather than copied.
 */
.project-footer-full {
    border-top: 1.5px dashed #bbb;
    background: #fff;
    padding: 60px 40px 80px;
    width: 100%;
}

.project-footer-full-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
}

.project-footer-full-left {
    padding-top: 8px; /* align back link with the top of the tagline */
}

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

.project-footer-full-right .contact-tagline {
    margin-bottom: 32px;
}

.project-footer-full-right .contact-links {
    justify-content: flex-end;
}

@media (max-width: 768px) {
    .project-footer-full { padding: 40px 24px 60px; }
    .project-footer-full-inner {
        flex-direction: column;
        gap: 32px;
    }
    .project-footer-full-right { text-align: left; }
    .project-footer-full-right .contact-links { justify-content: flex-start; }
}

@media (max-width: 520px) {
    .project-footer-full { padding: 40px 20px 60px; }
    .project-footer-full-right .contact-links { flex-direction: column; gap: 16px; }
}

/* ════════════════════════════════════════════════════════════════
   SNAP CASE STUDY — deck layout
   ════════════════════════════════════════════════════════════════ */

/*
 * Container for all the deck content — sits below the title block.
 * Generous vertical gap between slides so each piece of work
 * has room to breathe, matching the editorial scroll aesthetic.
 */
.snap-deck {
    display: flex;
    flex-direction: column;
    gap: 48px;
    padding-top: 40px;
}

/* ── Individual slide ── */
.snap-slide-full {
    width: 100%;
}

/*
 * DID paired slides — two images side by side at equal width.
 * Used for the UI mockup screens (did5–did10) which are designed
 * to be read as pairs. No captions needed.
 */
.did-slide-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    width: 100%;
}

.did-slide-pair .snap-media {
    aspect-ratio: 16 / 9;
}

@media (max-width: 600px) {
    .did-slide-pair {
        grid-template-columns: 1fr;
    }
}

.snap-media {
    width: 100%;
    display: block;
    border-radius: 12px;
    object-fit: cover;
    aspect-ratio: 16 / 9;
    box-shadow: 0 2px 24px rgba(0, 0, 0, 0.08);
}

/*
 * Contain variant — for slides like the kickoff that have a white
 * background and need to show the full image without cropping.
 */
.snap-media-contain {
    object-fit: contain;
    background: #fff;
    aspect-ratio: 16 / 9;
}

/* Caption below each slide */
.snap-caption {
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    line-height: 1.7;
    color: #888;
    margin-top: 16px;
    max-width: 760px;
}

.snap-caption strong {
    color: #111;
    font-weight: 600;
}

/* Section labels between content groups */
.snap-section-label {
    padding-bottom: 8px;
    border-bottom: 1px solid #e8e8e8;
}

/*
 * Snap-specific title override — title + rule span full width
 * with no meta column beside them, matching the reference layout.
 */
.snap-title-only {
    display: block;
    margin-bottom: 0;
    min-height: unset; /* override section { min-height: 100vh } from index styles */
}

.snap-title-only .project-title-left {
    width: 100%;
}

.snap-description {
    display: grid;
    grid-template-columns: 1fr 1fr 200px;
    gap: 48px;
    padding-top: 20px;
    margin-bottom: 0;
    min-height: unset; /* override section { min-height: 100vh } */
}

/* Meta column aligns to top of the description row */
.snap-description .project-meta {
    align-self: start;
}

.snap-description .project-col p {
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 15px;
    line-height: 1.75;
    color: #333;
    margin-bottom: 20px;
}

.snap-description .project-col p:last-child { margin-bottom: 0; }

/* ── Timeline filmstrip ── */
/*
 * A horizontally scrolling strip — the four timeline slides
 * are sequential so horizontal scroll mirrors the content logic.
 * scroll-snap gives it a satisfying slide-by-slide feel.
 */
.snap-filmstrip {
    width: 100%;
}

.snap-filmstrip-track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding-bottom: 12px;
    /* Hide scrollbar visually but keep it functional */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.snap-filmstrip-track::-webkit-scrollbar {
    display: none;
}

.snap-filmstrip-slide {
    flex-shrink: 0;
    /* Each slide takes ~80% of the container width so the next
       slide peeks in, communicating that there's more to scroll */
    width: 80%;
    scroll-snap-align: start;
}

.snap-filmstrip-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 12px;
    display: block;
    box-shadow: 0 2px 24px rgba(0, 0, 0, 0.08);
}

.snap-filmstrip-hint {
    font-family: 'Courier New', Courier, monospace;
    font-size: 11px;
    letter-spacing: 0.12em;
    color: #ccc;
    text-align: center;
    margin-top: 12px;
}


/*
 * AT ALL — single text col + meta only (no second text column).
 * Overrides the standard three-column snap-description grid.
 */
.atall-description {
    grid-template-columns: 1fr 200px;
}

/* ════════════════════════════════════════════════════════════════
   XRMURAL CASE STUDY — video layout
   ════════════════════════════════════════════════════════════════ */

/*
 * Landscape + vertical video side by side.
 * Column widths are proportional to each video's natural aspect ratio
 * so both sit at the same height with no black bars or cropping.
 *
 *   landscape (16:9) → flex: 3   (~75% of the row)
 *   vertical  (9:16) → flex: 1   (~25% of the row)
 *
 * The shared height is driven by the landscape video's aspect-ratio.
 * The vertical video fills its narrower column at full height.
 */
.xrmural-videos {
    display: flex;
    gap: 16px;
    margin-top: 48px;
    align-items: flex-start; /* align to top so captions don't stretch */
}

/* Each column holds the video clip + caption below it */
.xrmural-video-col {
    display: flex;
    flex-direction: column;
}

.xrmural-video-col:first-child { flex: 3; min-width: 0; }
.xrmural-video-col:last-child  { flex: 1; min-width: 0; }

.xrmural-video-landscape,
.xrmural-video-vertical {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 24px rgba(0, 0, 0, 0.08);
}

.xrmural-video-landscape video {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}

.xrmural-video-vertical video {
    width: 100%;
    aspect-ratio: 9 / 16;
    object-fit: cover;
    display: block;
}

/* Caption sits below the video, outside the clip container */
.xrmural-video-col .snap-caption {
    margin-top: 14px;
}

@media (max-width: 768px) {
    .xrmural-videos {
        flex-direction: column;
        margin-top: 32px;
    }
    .xrmural-video-col:first-child,
    .xrmural-video-col:last-child { flex: unset; width: 100%; }
}

/* ════════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {

    /* Nav */
    nav { gap: 14px; padding: 8px 18px; top: 10px; right: 10px; }
    body > nav > a    { display: none; }
    .nav-hamburger-wrap { display: flex; }

    /* Home */
    #home {
        flex-direction: column;
        gap: 36px;
        padding: 110px 20px 60px;
        text-align: center;
    }
    .avatar-wrap  { width: 240px; }
    .hometext h1  { font-size: 2rem; }
    .hometext p   { font-size: 1.2rem; }

    /* Work grid — collapse to 2 columns */
    .wrapperwork {
        grid-template-columns: 1fr 1fr;
        grid-auto-rows: 220px;
        gap: 14px;
    }
    #work         { padding: 100px 24px 60px; }
    .work-header  { margin-bottom: 20px; }

    .w-12, .w-8, .w-4              { grid-column: span 2; }
    #cell-eafc, #cell-litespots    { grid-column: span 2; }
    #cell-eafc img                 { object-fit: cover; }
    .h-2                           { grid-row: span 1; }
    #cell-snap                     { grid-row: span 1; }

    /* About */
    /* Snap deck */
    .snap-deck { gap: 40px; padding-top: 40px; }
    .snap-filmstrip-slide { width: 90%; }
    .snap-description {
        grid-template-columns: 1fr;
        gap: 24px;
    }

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

    /* Contact */
    #contact { padding: 40px 24px 60px; }

    /* Project pages */
    .back-link    { top: 16px; left: 16px; }
    .project-hero { padding: 64px 16px 0; }

    .project-hero-img,
    .project-hero-video   { aspect-ratio: 16 / 9; }

    .project-main         { padding: 32px 16px 60px; }

    .project-title-block  { flex-direction: column; gap: 24px; }

    .project-meta {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 20px;
    }

    .project-body {
        grid-template-columns: 1fr;
        gap: 0;
        padding-top: 32px;
    }

    .project-col p { margin-bottom: 16px; }

    .project-media-grid {
        grid-template-columns: 1fr;
        padding-top: 32px;
    }

    .project-footer-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .project-footer-links { flex-wrap: wrap; gap: 16px; }
}

@media (max-width: 520px) {

    /* Nav */
    nav { gap: 8px; padding: 6px 14px; }
    .nav-btn { padding: 5px 12px; }

    /* Work grid — single column */
    .wrapperwork {
        grid-template-columns: 1fr;
        grid-auto-rows: 220px;
        gap: 12px;
    }
    #work { padding: 100px 16px 60px; }

    .w-12, .w-8, .w-4           { grid-column: 1 !important; }
    #cell-eafc, #cell-litespots { grid-column: 1 !important; }
    #cell-eafc img              { object-fit: cover; }
    .h-2                        { grid-row: span 1 !important; }
    #cell-snap                  { grid-row: span 1 !important; }

    /* Contact */
    /* Snap deck */
    .snap-deck { gap: 32px; padding-top: 32px; }
    .snap-filmstrip-slide { width: 95%; }

    #contact { padding: 40px 20px 60px; }
    .contact-links { flex-direction: column; gap: 20px; }

    /* Project pages */
    .project-hero { padding: 56px 12px 0; }
    .project-main { padding: 24px 12px 48px; }
}


/* ════════════════════════════════════════════════════════════════
   REDUCED MOTION
   ════════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html { scroll-behavior: auto; }

    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}


/* ════════════════════════════════════════════════════════════════
   PAGE LOADER
   Full-screen overlay that fades out once the page is ready.
   ════════════════════════════════════════════════════════════════ */

.page-loader {
    position: fixed;
    inset: 0;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.page-loader.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loader-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.loader-gif {
    width: 280px;
    height: auto;
    border-radius: 12px;
    display: block;
}

.loader-bar {
    width: 160px;
    height: 1px;
    background: #e8e8e8;
    border-radius: 2px;
    overflow: hidden;
}

.loader-bar-fill {
    height: 100%;
    width: 0%;
    background: #111;
    border-radius: 2px;
    animation: loaderFill 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: 0.1s;
}

@keyframes loaderFill {
    from { width: 0%; }
    to   { width: 100%; }
}