/* =================================================================
   Stu Pender — Portfolio
   Design language inherited from Being Sound (beingsound.studio):
   warm-gray paper, near-black ink, a single soft-coral accent,
   Chivo (display) + Montserrat (body), generous whitespace.

   Editing tips:
   · Colours, fonts, and rhythm all live in :root below.
   · Each project is one <article class="project"> in index.html —
     copy one to add another; add project--reverse to flip the image side.
   ================================================================= */

:root {
    /* Palette — "Clay": warm bone paper, warm near-black ink, muted
       terracotta accent. Swap these three RGB triples to reskin the site. */
    --paper-rgb:  236 231 225;          /* warm bone                  */
    --ink-rgb:    30 26 22;             /* warm near-black            */

    --paper:      rgb(var(--paper-rgb));       /* page background     */
    --ink:        rgb(var(--ink-rgb));         /* primary text / panels */
    --ink-soft:   rgb(var(--ink-rgb) / 0.62);  /* secondary text      */
    --ink-faint:  rgb(var(--ink-rgb) / 0.40);  /* meta / captions     */
    --accent:     #c15d33;              /* burnt-orange screenprint    */
    --hair:       rgb(var(--ink-rgb) / 0.14);  /* hairline dividers   */

    --font-display: 'Chivo', sans-serif;
    --font-body:    'Montserrat', sans-serif;

    --side:  5%;                        /* left/right page margin     */
    --maxw:  1180px;                    /* content max width          */
    --gap:   clamp(3.5rem, 8vw, 7rem);  /* vertical section rhythm    */
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background-color: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    font-weight: 300;
    line-height: 1.6;
    overflow-x: clip; /* contain the full-bleed hero background (100vw) */
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

/* Film grain — a fixed, desaturated noise wash over everything for an analog
   texture (from the moodboards). pointer-events:none so it never intercepts. */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 180px 180px;
}
@media print { body::after { display: none; } }

/* Visible keyboard focus (mouse clicks don't trigger :focus-visible) */
a:focus-visible,
button:focus-visible,
.btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 1px;
}

/* ---- Shared eyebrow label (small, uppercase, coral) ------------- */
.eyebrow {
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0 0 1.1rem;
}
.eyebrow--light { color: var(--accent); }

/* =================================================================
   HEADER / NAV
   ================================================================= */
.site-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: clamp(1.4rem, 3vw, 2.2rem) var(--side);
    border-bottom: 1px solid var(--hair);
    position: sticky;
    top: 0;
    background: var(--paper);
    z-index: 50;
}
.wordmark {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 1.05rem;
    letter-spacing: 0.01em;
    text-decoration: none;
    transition: color 0.2s;
}
.wordmark:hover { color: var(--accent); }
.site-nav { display: flex; gap: clamp(1.2rem, 3vw, 2.4rem); }
.site-nav a {
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    text-decoration: none;
    color: var(--ink-soft);
    padding-bottom: 2px;
    border-bottom: 1px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}
.site-nav a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* Hamburger toggle — three thin lines that animate to an X */
.nav-toggle {
    display: none;
    position: relative;
    width: 26px;
    height: 18px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
}
.nav-toggle span {
    position: absolute;
    left: 0;
    right: 0;
    height: 1.5px;
    background: var(--ink);
    transition: transform 0.3s ease, opacity 0.2s ease;
}
.nav-toggle span:nth-child(1) { top: 2px; }
.nav-toggle span:nth-child(2) { top: 8px; }
.nav-toggle span:nth-child(3) { top: 14px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Right-side header cluster (sound toggle + nav + hamburger) */
.header-right { display: flex; align-items: center; gap: clamp(1.2rem, 3vw, 2.2rem); }

/* =================================================================
   AMBIENT SOUND — "orbits" toggle. Two rings with dots that, while
   playing, orbit at different speeds and slowly fall out of phase —
   a small picture of the generative piece (loops rarely realigning).
   ================================================================= */
.sound-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--ink-soft);
    transition: color 0.2s;
}
.sound-toggle:hover { color: var(--accent); }
.sound-toggle .orbits { display: block; width: 100%; height: 100%; overflow: visible; }
.sound-toggle .ring { fill: none; stroke: currentColor; stroke-width: 1.5; opacity: 0.3; }
.sound-toggle .dot { fill: currentColor; }
.sound-toggle .orb { transform-box: view-box; transform-origin: 20px 20px; }
/* Playing: accent + orbiting dots at different speeds */
.sound-toggle[aria-pressed="true"] { color: var(--accent); }
.sound-toggle[aria-pressed="true"] .ring { opacity: 0.42; }
.sound-toggle[aria-pressed="true"] .orb1 { animation: orbit 7s linear infinite; }
.sound-toggle[aria-pressed="true"] .orb2 { animation: orbit 12s linear infinite; }
@keyframes orbit { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
    .sound-toggle[aria-pressed="true"] .orb { animation: none; }
}

/* =================================================================
   LAYOUT PRIMITIVES
   ================================================================= */
.section {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: var(--gap) var(--side);
    border-bottom: 1px solid var(--hair);
}
.section-head { margin-bottom: clamp(2.2rem, 5vw, 3.4rem); }
.section-title {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(1.7rem, 4vw, 2.5rem);
    line-height: 1.15;
    margin: 0;
    max-width: 20ch;
}

/* =================================================================
   HERO
   ================================================================= */
.hero {
    position: relative;
    isolation: isolate;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: clamp(4rem, 12vh, 9rem) var(--side) clamp(3.5rem, 9vw, 7rem);
}
/* Full-bleed, pre-blurred sky/water photo under a heavy paper tint — quiet
   atmosphere behind the intro; the tint keeps the text fully legible. */
.hero::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    z-index: -1;
    background:
        linear-gradient(to bottom, rgb(var(--paper-rgb) / 0.50), rgb(var(--paper-rgb) / 0.80)),
        radial-gradient(135% 105% at 86% 4%, rgba(222, 110, 52, 0.62) 0%, rgba(222, 110, 52, 0) 52%),
        radial-gradient(85% 80% at 6% 102%, rgba(150, 126, 178, 0.32) 0%, rgba(150, 126, 178, 0) 60%),
        url("images/hero-bg.jpg") center 72% / cover no-repeat;
}
.hero-title {
    font-family: var(--font-display);
    font-weight: 100;
    font-size: clamp(2.6rem, 8vw, 5.2rem);
    line-height: 1.05;
    letter-spacing: -0.01em;
    margin: 0 0 1.6rem;
}
.hero-lede {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(1.05rem, 2.4vw, 1.4rem);
    margin: 0 0 1.4rem;
    max-width: 34ch;
}
.hero-body {
    font-size: 0.98rem;
    color: var(--ink-soft);
    max-width: 54ch;
    margin: 0 0 2.4rem;
}
.hero-actions { display: flex; gap: 0.9rem; flex-wrap: wrap; }

/* ---- Buttons ---- */
.btn {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.82rem;
    letter-spacing: 0.03em;
    text-decoration: none;
    padding: 0.72rem 1.4rem;
    border: 1px solid var(--ink);
    color: var(--ink);
    background: transparent;
    transition: background 0.2s, color 0.2s;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: transparent; color: var(--ink); }

/* =================================================================
   PROJECTS
   ================================================================= */
.project {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center;
    padding: clamp(2.6rem, 6vw, 4.5rem) 0;
    border-top: 1px solid var(--hair);
}
.project:first-of-type { border-top: none; padding-top: 0; }
.project--reverse .project-media { order: 2; }

.project-media {
    display: block;
    overflow: hidden;
    background: rgb(var(--ink-rgb) / 0.04);
    border: 1px solid var(--hair);
}
.project-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
/* Subtle zoom within the fixed frame — the image never shifts the layout */
a.project-media:hover img { transform: scale(1.035); }

.project-status {
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0 0 0.7rem;
}
.project-name {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(1.4rem, 3vw, 2rem);
    margin: 0 0 0.8rem;
    line-height: 1.1;
}
.project-desc {
    font-size: 0.95rem;
    color: var(--ink-soft);
    margin: 0 0 1.4rem;
    max-width: 42ch;
}
.project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 2.2rem;
    margin: 0 0 1.4rem;
}
.project-meta div { min-width: 0; }
.project-meta dt {
    font-size: 0.66rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-faint);
    margin-bottom: 0.2rem;
}
.project-meta dd { margin: 0; font-size: 0.86rem; }

.project-links { margin: 0; font-size: 0.9rem; }
.project-links a {
    font-family: var(--font-display);
    text-decoration: none;
    border-bottom: 1px solid var(--ink);
    padding-bottom: 1px;
    transition: color 0.2s, border-color 0.2s;
}
.project-links a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.project-links--muted { color: var(--ink-faint); font-style: italic; font-size: 0.82rem; }

/* Arrow logic: a link that leaves the site (opens a new tab) gets a ↗.
   Internal/forward links carry an explicit → in markup; back links a ←.
   Prose links and the résumé stay arrow-free. */
.project-links a[target="_blank"]::after,
.cs-cap a[target="_blank"]::after {
    content: "\00A0↗";
    font-size: 0.9em;
}

/* A row of small process links (e.g. Personas · Wireframes · Branding) */
.process-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.3rem; font-size: 0.84rem; }

/* Quiet link to the archive page at the end of the work section */
.work-more {
    margin: clamp(2.5rem, 6vw, 4rem) 0 0;
    padding-top: clamp(2rem, 5vw, 3.5rem);
    border-top: 1px solid var(--hair);
    text-align: center;
}
.work-more a {
    font-family: var(--font-display);
    font-size: clamp(1.05rem, 2.4vw, 1.3rem);
    font-weight: 300;
    text-decoration: none;
    border-bottom: 1px solid var(--ink);
    padding-bottom: 2px;
    transition: color 0.2s, border-color 0.2s;
}
.work-more a:hover { color: var(--accent); border-bottom-color: var(--accent); }
/* Balance the space below the archive link with the space above it, so it sits
   evenly between its own hairline and the section's closing hairline. */
#work { padding-bottom: clamp(2rem, 5vw, 3.5rem); }

/* ---- Sub-sections (client builds, bootcamp) ---- */
.subsection-head {
    margin: clamp(3rem, 7vw, 5rem) 0 1.8rem;
    padding-top: clamp(2rem, 5vw, 3.5rem);
    border-top: 1px solid var(--hair);
}
.subsection-title {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(1.2rem, 2.6vw, 1.6rem);
    margin: 0;
}
.subsection-note {
    font-size: 0.9rem;
    color: var(--ink-soft);
    max-width: 60ch;
    margin: 0.9rem 0 0;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(1.2rem, 3vw, 2rem);
}
.card {
    border: 1px solid var(--hair);
    padding: 1.6rem;
    background: rgb(var(--ink-rgb) / 0.015);
}
.card-media {
    margin: -1.6rem -1.6rem 1.3rem;
    border-bottom: 1px solid var(--hair);
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: rgb(var(--ink-rgb) / 0.04);
}
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.card:hover .card-media img { transform: scale(1.03); }
.card-name {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 1.15rem;
    margin: 0 0 0.5rem;
}
.card-desc { font-size: 0.9rem; color: var(--ink-soft); margin: 0 0 0.9rem; }
.card-meta {
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-faint);
    margin: 0 0 0.6rem;
}

/* =================================================================
   SKILLS
   ================================================================= */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(2rem, 5vw, 3.5rem);
}
.skill-label {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 1rem;
    margin: 0 0 1.1rem;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid var(--hair);
}
.skill-list { list-style: none; margin: 0; padding: 0; }
.skill-list li {
    font-size: 0.9rem;
    color: var(--ink-soft);
    padding: 0.32rem 0;
}

/* =================================================================
   ABOUT — photo fills the left half, text sits on frosted glass
   (the pattern from Being Sound's About page)
   ================================================================= */
.about {
    position: relative;
    overflow: hidden;
    margin: 0 var(--side);
    background: var(--ink);
    color: var(--paper);
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 30rem;
}
.about-photo {
    position: absolute;
    top: 0; left: 0;
    width: 50%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
}
.about-panel {
    grid-column: 2;
    position: relative;
    z-index: 1;
    background: rgb(var(--ink-rgb) / 0.55);
    -webkit-backdrop-filter: blur(22px) saturate(115%);
    backdrop-filter: blur(22px) saturate(115%);
    padding: clamp(2.4rem, 5vw, 4rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.about-title {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(1.6rem, 3.5vw, 2.3rem);
    margin: 0 0 1.3rem;
}
.about-text {
    font-size: 0.94rem;
    line-height: 1.7;
    color: rgb(var(--paper-rgb) / 0.9);
    margin: 0 0 1.1rem;
    max-width: 44ch;
}
.about-text a {
    color: var(--paper);
    border-bottom: 1px solid rgb(var(--paper-rgb) / 0.5);
    text-decoration: none;
    transition: color 0.2s, border-color 0.2s;
}
.about-text a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* =================================================================
   CONTACT + FOOTER
   ================================================================= */
/* Full-width rows: the whole strip between the hairlines is hoverable + clickable */
.contact-list { list-style: none; margin: 0 -1rem; padding: 0; }
.contact-list li { border-top: 1px solid var(--hair); }
.contact-list li:last-child { border-bottom: 1px solid var(--hair); }
.contact-list a {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    text-decoration: none;
    font-family: var(--font-display);
    font-size: clamp(1.05rem, 2.4vw, 1.35rem);
    font-weight: 300;
    color: var(--ink);
    transition: background 0.2s, color 0.2s;
}
.contact-list a:hover,
.contact-list a:focus-visible { background: rgb(var(--ink-rgb) / 0.04); color: var(--accent); }
.contact-list a:focus-visible { outline-offset: -2px; }
.contact-arrow {
    color: var(--ink-faint);
    font-size: 0.85em;
    transition: transform 0.2s, color 0.2s;
    flex-shrink: 0;
}
.contact-list a:hover .contact-arrow { color: var(--accent); transform: translateX(5px); }
.contact-tag {
    font-family: var(--font-body);
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-faint);
    margin-left: 0.6rem;
    vertical-align: middle;
}

.site-footer {
    padding: 2.4rem var(--side);
    text-align: center;
}
.site-footer p {
    margin: 0;
    font-size: 0.76rem;
    letter-spacing: 0.04em;
    color: var(--ink-faint);
}

/* =================================================================
   SCROLL-REVEAL (progressive enhancement — content is visible
   without JS; this just adds a gentle fade-up when JS is present)
   ================================================================= */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .js .reveal { opacity: 1; transform: none; transition: none; }
    a.project-media:hover img, .card:hover .card-media img { transform: none; }
}

/* =================================================================
   RÉSUMÉ  (screen matches the site; print renders clean on white)
   ================================================================= */
.resume {
    max-width: 820px;
    margin: 0 auto;
    padding: clamp(2.6rem, 6vw, 4.5rem) var(--side) 4rem;
}
.resume-name {
    font-family: var(--font-display);
    font-weight: 200;
    font-size: clamp(2.2rem, 6vw, 3.4rem);
    line-height: 1;
    margin: 0 0 0.9rem;
}
.resume-contact {
    font-size: 0.86rem;
    color: var(--ink-soft);
    margin: 0 0 1.1rem;
    letter-spacing: 0.01em;
}
.resume-contact a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--hair); }
.resume-contact a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.resume-contact .sep { color: var(--ink-faint); margin: 0 0.5rem; }
.resume-tagline {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(1.02rem, 2.3vw, 1.28rem);
    line-height: 1.4;
    max-width: 60ch;
    margin: 0 0 1.6rem;
}
.resume-actions { display: flex; gap: 0.8rem; margin: 0 0 0.5rem; }

.resume-section { margin-top: clamp(2rem, 4vw, 2.8rem); }
.resume-section > .eyebrow {
    padding-bottom: 0.6rem;
    margin-bottom: 1.3rem;
    border-bottom: 1px solid var(--hair);
}

.resume-entry { margin-bottom: 1.3rem; }
.resume-entry:last-child { margin-bottom: 0; }
.resume-entry-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
}
.resume-entry-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 1.05rem;
    margin: 0;
}
.resume-entry-date {
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    color: var(--ink-faint);
    white-space: nowrap;
    flex-shrink: 0;
}
.resume-entry-meta {
    font-size: 0.85rem;
    color: var(--ink-soft);
    margin: 0.15rem 0 0.5rem;
}
.resume-entry-meta a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--hair); }
.resume-entry-meta a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.resume-entry ul {
    margin: 0;
    padding-left: 1.1rem;
    font-size: 0.9rem;
    color: var(--ink-soft);
    line-height: 1.6;
}
.resume-entry ul li { margin-bottom: 0.3rem; }
.resume-entry ul li::marker { color: var(--accent); }

.resume-skill { margin-bottom: 0.6rem; font-size: 0.9rem; line-height: 1.55; }
.resume-skill-label {
    font-weight: 500;
    color: var(--ink);
    margin-right: 0.4rem;
}
.resume-skill span:last-child { color: var(--ink-soft); }

/* --- Print / PDF: clean white, tightened, chrome hidden --- */
@media print {
    @page { margin: 11mm 13mm; }
    .no-print { display: none !important; }
    html, body { background: #fff !important; }
    body { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .resume { max-width: none; margin: 0; padding: 0; }
    .resume-name { font-size: 1.9rem; margin-bottom: 0.5rem; }
    .resume-contact { font-size: 0.8rem; margin-bottom: 0.7rem; }
    .resume-tagline { font-size: 0.98rem; margin-bottom: 0; }
    .resume-section { margin-top: 1.05rem; }
    .resume-section > .eyebrow { break-after: avoid; margin-bottom: 0.7rem; padding-bottom: 0.35rem; }
    .resume-entry { margin-bottom: 0.62rem; break-inside: avoid; }
    .resume-entry-title { font-size: 0.96rem; }
    .resume-entry-meta { font-size: 0.8rem; margin-bottom: 0.35rem; }
    .resume-entry ul { font-size: 0.82rem; line-height: 1.42; }
    .resume-entry ul li { margin-bottom: 0.18rem; }
    .resume-skill { font-size: 0.82rem; line-height: 1.4; margin-bottom: 0.42rem; }
    .site-footer { display: none; }
    a { border-bottom: none !important; }
}

/* =================================================================
   CASE STUDY (long-form reading page)
   ================================================================= */
.cs {
    max-width: 860px;
    margin: 0 auto;
    padding: clamp(2.6rem, 6vw, 4.5rem) var(--side) 4rem;
}
.cs-head { margin-bottom: clamp(2rem, 5vw, 3rem); }
.cs-title {
    font-family: var(--font-display);
    font-weight: 200;
    font-size: clamp(2.1rem, 5.5vw, 3.4rem);
    line-height: 1.05;
    margin: 0 0 1rem;
}
.cs-sub {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(1.05rem, 2.4vw, 1.35rem);
    line-height: 1.45;
    color: var(--ink-soft);
    max-width: 60ch;
    margin: 0 0 1.8rem;
}
.cs-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 2.6rem;
    margin: 0 0 1.6rem;
    padding: 1.3rem 0;
    border-top: 1px solid var(--hair);
    border-bottom: 1px solid var(--hair);
}
.cs-meta dt {
    font-size: 0.64rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-faint);
    margin-bottom: 0.25rem;
}
.cs-meta dd { margin: 0; font-size: 0.9rem; }
.cs-toplinks { margin: 0; }

.cs-figure { margin: 2rem 0; }
.cs-figure img { width: 100%; border: 1px solid var(--hair); }
.cs-figure--lead { margin: clamp(1.5rem, 4vw, 2.5rem) 0 0; }
.cs-cap {
    font-size: 0.8rem;
    color: var(--ink-faint);
    margin: 0.7rem 0 0;
}
.cs-cap a { color: var(--ink-soft); text-decoration: none; border-bottom: 1px solid var(--hair); }
.cs-cap a:hover { color: var(--accent); border-bottom-color: var(--accent); }
/* Placeholder slot for a Figma export the author will drop in */
.cs-figure--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 9rem;
    border: 1px dashed rgb(var(--ink-rgb) / 0.28);
    background: rgb(var(--ink-rgb) / 0.02);
    color: var(--ink-faint);
    font-size: 0.82rem;
    letter-spacing: 0.02em;
    text-align: center;
    padding: 1.5rem;
}

.cs-section { margin-top: clamp(2.6rem, 6vw, 4rem); }
.cs-h2 {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(1.4rem, 3.2vw, 2rem);
    line-height: 1.2;
    margin: 0 0 1rem;
    max-width: 28ch;
}
.cs-p {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--ink-soft);
    max-width: 66ch;
    margin: 0 0 1.1rem;
}
.cs-p strong, .cs-p em { color: var(--ink); font-weight: 500; font-style: normal; }
.cs-section .project-links { margin-top: 0.3rem; }
/* Draft-note callout — visible reminder of where to add your own words.
   Delete each note as you fill it in. */
.cs-note {
    border-left: 2px solid var(--accent);
    background: rgb(228 107 108 / 0.06);
    padding: 0.7rem 1rem;
    margin: 1.1rem 0 0;
    font-size: 0.85rem;
    font-style: italic;
    color: var(--ink-soft);
    max-width: 66ch;
}

/* =================================================================
   RESPONSIVE
   ================================================================= */
@media (max-width: 820px) {
    .site-nav { display: none; }
    /* Full-width dropdown panel: calm, generous rows in the display face,
       separated by hairlines (no per-word underlines to overrun) */
    .site-nav.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--paper);
        border-bottom: 1px solid var(--hair);
        box-shadow: 0 12px 24px -18px rgb(var(--ink-rgb) / 0.5);
        padding: 0.4rem var(--side) 1rem;
    }
    .site-nav.open a {
        font-family: var(--font-display);
        font-size: 1.15rem;
        font-weight: 300;
        letter-spacing: 0;
        color: var(--ink);
        padding: 0.85rem 0;
        border-bottom: none;
        border-top: 1px solid var(--hair);
    }
    .site-nav.open a:first-child { border-top: none; }
    .site-nav.open a:hover { color: var(--accent); }
    .nav-toggle { display: inline-block; }
    .site-header { align-items: center; }

    .project,
    .project--reverse { grid-template-columns: 1fr; gap: 1.6rem; }
    .project--reverse .project-media { order: 0; }

    .skills-grid { grid-template-columns: 1fr; gap: 2.2rem; }

    .about { grid-template-columns: 1fr; }
    .about-photo { position: relative; width: 100%; height: 16rem; }
    .about-panel { grid-column: 1; backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--ink); }
}

@media (max-width: 540px) {
    .card-grid { grid-template-columns: 1fr; }
    .project-meta { gap: 0.9rem 0; flex-direction: column; }
}
