/* ============ WORK PAGE (work.html) — additions only ============ */

/* Header has no hero behind it on this page: keep it solid from the start */
.work-page header.site-header {
    background: rgba(10, 13, 16, 0.86);
    border-bottom: 1px solid var(--border);
}

/* Intro block, offset below the fixed header */
/* The video stays fixed to the viewport behind the whole page; every section
   after the intro is transparent and sits above it, so the page scrolls over
   the video. (On project pages there is no video, so this just shows --bg.) */
.work-intro .hero-media {
    position: fixed;
}
.work-page main > section:not(.work-intro) {
    position: relative;
    z-index: 1;
    background: transparent;
}
/* Dark overlay on the fixed video. main.js fades it in (--dim: 0 → 1) while
   scrolling down through the intro, so the video behind every later section
   is already dimmed. */
.video-dim {
    position: absolute;
    inset: 0;
    background: rgba(10, 13, 16, 0.62);
    opacity: var(--dim, 0);
    pointer-events: none;
}
.work-page main > section.work-alt {
    background: transparent;
}
.work-intro {
    position: relative;
    padding-top: calc(var(--headerHeight) + clamp(3rem, 7vw, 5rem));
    padding-bottom: clamp(3rem, 7vw, 5rem);
}
.work-intro .wrap {
    position: relative;
    z-index: 2;
}
.work-intro h1 {
    font-size: clamp(2rem, 5vw, 3.6rem);
    max-width: 18ch;
    margin-bottom: 0.5em;
}
.work-lead {
    font-size: clamp(1rem, 1.6vw, 1.2rem);
    max-width: 58ch;
    margin-bottom: 2.2rem;
}
.work-facts {
    margin-top: 3rem;
    padding-top: 1.6rem;
    border-top: 1px solid var(--border);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.6rem;
}
.work-facts .fact strong {
    display: block;
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--text);
    font-size: 1rem;
    margin-bottom: 0.3rem;
}
.work-facts .fact span {
    font-size: 0.8rem;
    color: var(--text-faint);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* Project overview: poster cards, four across on desktop */
.work-grid {
    grid-template-columns: repeat(4, 1fr);
}
.poster-card .card-media {
    aspect-ratio: 2 / 3;
}
.poster-card .card-body {
    padding: 1.1rem 1.2rem 1.3rem;
    gap: 0.3rem;
}
/* whole card is clickable: stretch the title link over it */
.poster-card {
    position: relative;
}
.poster-card .card-link::after {
    content: "";
    position: absolute;
    inset: 0;
}
.poster-card:hover .card-link {
    color: var(--accent);
}
.card-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.card-body .card-role {
    color: var(--text);
    font-weight: 600;
    font-size: 0.9rem;
}
.card-body .card-note {
    padding-top: 0.2rem;
    font-size: 0.8rem;
    color: var(--accent-warm);
    letter-spacing: 0.04em;
}

/* Alternating section background (no divider lines between sections) */
.work-alt {
    background: var(--bg-elevated);
}
.work-page .cta-banner {
    border: none;
}
/* fixed year column so the descriptions line up across rows */
@media (min-width: 721px) {
    .collab-row {
        grid-template-columns: 1fr 2fr 5.5rem;
    }
}
.collab-org a:hover {
    color: var(--accent);
}

/* Skills */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.4rem;
}
.skill-group {
    padding: 1.4rem 1.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
}
.skill-group h3 {
    font-size: 0.95rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
}
.skill-group p {
    margin: 0;
    font-size: 0.95rem;
}

@media (max-width: 860px) {
    .work-facts,
    .skills-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 980px) {
    .work-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 420px) {
    .work-grid {
        grid-template-columns: 1fr;
        max-width: 340px;
    }
}
