/* ==========================================================================
   Tri Nguyen — Product Design Lead portfolio
   Editorial / minimal / high-craft / calm / premium design system
   ========================================================================== */

:root {
  --paper: #f7f4ee;
  --paper-dim: #efeadf;
  --ink: #17160f;
  --ink-soft: #5c584c;
  --ink-faint: #8b8677;
  --line: #ddd7c6;
  --line-strong: #c7bfa8;
  --accent: #2c3a58;
  --accent-soft: #445576;
  --tag-bg: #eee6d3;
  --need-bg: #fbeee0;
  --need-border: #dba86a;
  --need-ink: #8a5a20;

  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --max: 1180px;
  --gutter: clamp(24px, 6vw, 72px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

::selection { background: var(--accent); color: var(--paper); }

/* --------------------------------------------------------------------------
   Type
   -------------------------------------------------------------------------- */

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; margin: 0; letter-spacing: -0.01em; }

.eyebrow {
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.lede {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.35;
  color: var(--ink);
  max-width: 46ch;
}

p.body, .prose p {
  font-size: clamp(16px, 1.6vw, 18px);
  line-height: 1.7;
  color: #302d24;
  max-width: 62ch;
}

.prose p + p { margin-top: 1.1em; }

.need {
  display: inline-block;
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--need-ink);
  background: var(--need-bg);
  border: 1px solid var(--need-border);
  border-radius: 3px;
  padding: 2px 8px;
  margin: 0 2px;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 0;
}

/* --------------------------------------------------------------------------
   Nav
   -------------------------------------------------------------------------- */

.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px var(--gutter);
  transition: background-color .35s ease, border-color .35s ease, padding .35s ease;
  border-bottom: 1px solid transparent;
}

.site-nav.is-scrolled {
  background: rgba(247,244,238,0.92);
  backdrop-filter: blur(8px);
  border-bottom-color: var(--line);
  padding-top: 14px;
  padding-bottom: 14px;
}

.site-nav .wordmark {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 13.5px;
  letter-spacing: 0.02em;
}

.nav-links a { color: var(--ink-soft); transition: color .2s; }
.nav-links a:hover { color: var(--ink); }

.menu-btn {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
}

.menu-btn .bars { display: flex; flex-direction: column; gap: 4px; }
.menu-btn .bars span { display: block; width: 20px; height: 1.5px; background: var(--ink); transition: transform .3s; }

/* Full-screen overlay index */
.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-100%);
  transition: transform .5s cubic-bezier(.65,0,.35,1);
  overflow-y: auto;
}
.menu-overlay.is-open { transform: translateY(0); }

.menu-overlay-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 100px var(--gutter) 80px;
}

.menu-close {
  position: absolute;
  top: 26px; right: var(--gutter);
  background: none; border: none; color: var(--paper);
  font-family: var(--sans); font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase;
  cursor: pointer;
}

.menu-col-label {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #a5a08e;
  margin-bottom: 22px;
}

.menu-list { list-style: none; margin: 0 0 56px; padding: 0; }
.menu-list li + li { margin-top: 10px; }
.menu-list a {
  font-family: var(--serif);
  font-size: clamp(28px, 4.2vw, 44px);
  color: var(--paper);
  display: inline-block;
  border-bottom: 1px solid transparent;
  transition: opacity .2s;
}
.menu-list a:hover { opacity: 0.65; }
.menu-list .tag { font-family: var(--sans); font-size: 14px; color: #8f8a78; margin-left: 12px; vertical-align: middle; }

.menu-contact { margin-top: 40px; font-size: 15px; color: #cfcabb; }
.menu-contact a { text-decoration: underline; text-decoration-color: #55503f; }

/* --------------------------------------------------------------------------
   Hero (home)
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  padding: 200px var(--gutter) 90px;
  max-width: var(--max);
  margin: 0 auto;
  overflow: hidden;
}

.hero #particle-field {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero .eyebrow,
.hero h1,
.hero .role-line,
.hero .lede,
.hero .support,
.hero .company-strip,
.hero .credentials {
  position: relative;
  z-index: 1;
}

.hero .eyebrow { margin-bottom: 22px; }

.hero h1 {
  font-size: clamp(56px, 9vw, 108px);
  line-height: 0.98;
  margin-bottom: 6px;
}

.hero .role-line {
  font-family: var(--serif);
  font-size: clamp(24px, 3.4vw, 34px);
  color: var(--ink-soft);
  margin-bottom: 18px;
}

.hero .focus-line {
  font-family: var(--sans);
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 40px;
}

.hero .lede { margin-bottom: 28px; }

.hero .support {
  font-size: clamp(15px, 1.5vw, 17px);
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 56ch;
}

.hero .company-strip {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--paper-dim);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 22px clamp(16px, 3vw, 40px);
  width: 100%;
  max-width: 720px;
}
.hero .company-strip img {
  height: 19px;
  width: auto;
  display: block;
  opacity: 0.62;
  transition: opacity .2s;
}
.hero .company-strip img.sm { height: 15px; }
.hero .company-strip img.glyph { height: 25px; }
.hero .company-strip img.samsung { width: 64px; height: auto; }
.hero .company-strip img:hover { opacity: 1; }

.hero .credentials {
  margin-top: 18px;
  font-size: 13.5px;
  letter-spacing: 0.03em;
  color: var(--ink-faint);
}
.hero .credentials b { color: var(--ink-soft); font-weight: 600; }
.hero-label { position: relative; z-index: 1; display: flex; align-items: center; flex-wrap: wrap; gap: 12px 18px; margin-bottom: 22px; }
.hero .hero-label .eyebrow { margin-bottom: 0; font-size: 13px; font-weight: 700; color: var(--ink); }
.hero .hero-label .credentials { margin-top: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; border-left: 1px solid var(--line); padding-left: 18px; font-size: 13px; letter-spacing: 0; }
.hero-label .credentials span { white-space: nowrap; }
.hero-label .credentials b { font-weight: 700; }

/* --------------------------------------------------------------------------
   Section headers (shared)
   -------------------------------------------------------------------------- */

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 var(--gutter);
  max-width: var(--max);
  margin: 0 auto 8px;
}
.section-head .eyebrow { }
.section-head .count { font-size: 13px; color: var(--ink-faint); }

.section-block { padding: 90px 0 10px; }
.section-block.tight { padding-top: 56px; }
.earlier-intro { color: var(--ink-faint); max-width: 640px; margin: 0 0 24px; line-height: 1.65; }
.earlier-disclosure { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.earlier-disclosure summary { display: flex; align-items: center; justify-content: space-between; padding: 24px 0; cursor: pointer; list-style: none; font-weight: 500; }
.earlier-disclosure summary::-webkit-details-marker { display: none; }
.earlier-disclosure summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }
.earlier-open { display: none; }
.earlier-disclosure[open] .earlier-open { display: inline; }
.earlier-disclosure[open] .earlier-closed { display: none; }
.earlier-toggle { font-size: 24px; font-weight: 400; }
.earlier-disclosure[open] .earlier-toggle { transform: rotate(45deg); }
.earlier-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 5vw, 72px); padding: 16px 0 40px; }
.earlier-project h3 { font-family: var(--serif); font-size: clamp(26px, 3vw, 36px); font-weight: 400; line-height: 1.15; margin: 12px 0 24px; }
.earlier-project figure { margin: 0 0 28px; }
.earlier-project figure a { display: flex; align-items: center; justify-content: center; background: #fff; border: 1px solid var(--line); padding: 12px; height: 300px; }
.earlier-project img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.earlier-project figcaption { color: var(--ink-faint); font-size: 12px; line-height: 1.6; margin-top: 10px; }
.earlier-project h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; margin: 24px 0 8px; }
.earlier-project p { font-size: 15px; line-height: 1.75; margin: 0; }
@media (max-width: 700px) { .earlier-grid { grid-template-columns: 1fr; gap: 44px; } .earlier-project figure a { height: 250px; } }

/* --------------------------------------------------------------------------
   Primary work list (numbered rows)
   -------------------------------------------------------------------------- */

.work-list {
  list-style: none;
  margin: 34px auto 0;
  max-width: var(--max);
  padding: 0 var(--gutter);
}

.work-row {
  display: block;
  border-top: 1px solid var(--line);
  padding: 40px 0;
  transition: opacity .25s;
}
.work-list li:last-child .work-row { border-bottom: 1px solid var(--line); }

.resume-link { margin: 24px 0 0; font-size: 14px; font-weight: 600; }
.resume-link a { text-decoration: underline; text-underline-offset: 5px; }
.work-row { display: grid; grid-template-columns: 84px minmax(280px, 34%) 1fr auto; align-items: center; gap: 32px; }

.work-row .num {
  font-family: var(--serif);
  font-size: 20px;
  color: var(--ink-faint);
}

.work-row .thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--paper-dim);
}
.work-row .thumb img { width: 100%; height: 100%; object-fit: contain; object-position: center; display: block; }
.work-row .thumb--photos { aspect-ratio: 16 / 10; position: relative; }
.work-row .thumb--photos img {
  position: absolute;
  top: 16%;
  bottom: 0;
  left: 20%;
  width: 60%;
  height: 84%;
  margin: 0;
  object-fit: cover;
  object-position: top;
}

.work-row .titles h3 {
  font-size: clamp(26px, 3.6vw, 42px);
  line-height: 1.15;
  transition: color .2s;
}
.work-row .titles .subtitle {
  margin-top: 8px;
  font-family: var(--sans);
  font-size: 14.5px;
  color: var(--ink-soft);
  letter-spacing: 0.01em;
}

.work-row .go {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity .25s, transform .25s;
  white-space: nowrap;
}

.work-row:hover .go { opacity: 1; transform: translateX(0); }
.work-row:hover .titles h3 { color: var(--accent); }

/* --------------------------------------------------------------------------
   Selected work grid
   -------------------------------------------------------------------------- */

.selected-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  max-width: var(--max);
  margin: 34px auto 0;
  padding: 0 var(--gutter);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.selected-grid { padding: 0; margin-left: auto; margin-right: auto; }
.selected-wrap { padding: 0 var(--gutter); max-width: var(--max); margin: 34px auto 0; }
.selected-grid-inner {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.selected-cell {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 36px 34px;
  transition: background-color .2s;
}
.selected-cell:hover { background: var(--paper-dim); }
.earlier-work[hidden] { display: none; }
.earlier-card { appearance: none; background: transparent; border-top: 0; border-left: 0; border-radius: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.earlier-card:focus-visible { outline: 2px solid var(--accent); outline-offset: -5px; }
.earlier-card[aria-expanded="true"] { background: var(--paper-dim); }
.earlier-card-visual { display: flex; height: 180px; margin-bottom: 24px; padding: 24px; border: 1px dashed var(--ink-faint); align-items: center; justify-content: space-between; color: var(--ink-faint); }
.earlier-card-symbol { font-size: 48px; font-weight: 300; }
.earlier-card-action { display: block; margin-top: 24px; font-size: 12px; font-weight: 600; letter-spacing: .03em; }
.selected-preview { height: 180px; margin-bottom: 24px; padding: 12px; background: var(--paper-dim); display: flex; align-items: center; justify-content: center; overflow: hidden; border: 1px solid var(--line); border-radius: 2px; }
.selected-preview img { display: block; width: 100%; height: 100%; object-fit: contain; }

.selected-cell .eyebrow { display: block; margin-bottom: 14px; }
.selected-cell h3 { font-size: clamp(21px, 2.2vw, 26px); margin-bottom: 10px; }
.selected-cell .subtitle { font-size: 14px; color: var(--ink-soft); }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 120px;
  padding: 56px var(--gutter) 60px;
  max-width: var(--max);
  margin-left: auto; margin-right: auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 24px;
}

.site-footer .footer-name { font-family: var(--serif); font-size: 20px; }
.site-footer .footer-links { display: flex; gap: 26px; font-size: 13.5px; color: var(--ink-soft); }
.site-footer .footer-links a:hover { color: var(--ink); text-decoration: underline; }
.site-footer .footer-meta { font-size: 12.5px; color: var(--ink-faint); width: 100%; margin-top: 10px; }

/* --------------------------------------------------------------------------
   Case study — header
   -------------------------------------------------------------------------- */

.cs-header {
  padding: 168px var(--gutter) 64px;
  max-width: var(--max);
  margin: 0 auto;
  border-bottom: 1px solid var(--line);
}

.cs-header .back-link {
  display: inline-block;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 28px;
}
.cs-header .back-link:hover { color: var(--ink); }

.cs-header .eyebrow { margin-bottom: 18px; }
.cs-header h1 { font-size: clamp(40px, 6vw, 68px); line-height: 1.04; max-width: 20ch; }
.cs-header .surface-tag { margin-top: 20px; font-size: 15px; color: var(--ink-soft); }
.cs-header .dek {
  margin-top: 28px;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(19px, 2.2vw, 24px);
  color: var(--ink-soft);
  max-width: 52ch;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Case study — body layout with section rail
   -------------------------------------------------------------------------- */

.cs-body {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 64px;
}

.cs-rail {
  position: sticky;
  top: 120px;
  align-self: start;
  padding-top: 76px;
  font-size: 13px;
}

.cs-rail ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.cs-rail li { margin: 0; }
.cs-rail a {
  display: block;
  padding: 9px 0 9px 18px;
  color: var(--ink-faint);
  border-left: 2px solid transparent;
  margin-left: -1px;
  transition: color .2s, border-color .2s;
  line-height: 1.4;
}
.cs-rail a.is-active { color: var(--ink); border-left-color: var(--accent); font-weight: 600; }
.cs-rail a:hover { color: var(--ink); }

.cs-main { min-width: 0; padding-top: 76px; padding-bottom: 40px; }

.cs-section { padding-bottom: 84px; scroll-margin-top: 110px; }
.cs-section + .cs-section { border-top: 1px solid var(--line); padding-top: 76px; }

.cs-section .step-label {
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 14px;
}

.cs-section h2 {
  font-size: clamp(26px, 3vw, 34px);
  margin-bottom: 24px;
  max-width: 26ch;
}

.cs-pull {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(20px, 2.4vw, 26px);
  line-height: 1.45;
  color: var(--ink);
  border-left: 2px solid var(--accent);
  padding-left: 24px;
  margin: 32px 0;
  max-width: 46ch;
}

.cs-list { margin: 22px 0; padding: 0; list-style: none; max-width: 62ch; }
.cs-list li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 12px;
  font-size: clamp(16px, 1.6vw, 18px);
  line-height: 1.65;
  color: #302d24;
}
.cs-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.65em;
  width: 6px; height: 6px;
  background: var(--accent-soft);
  border-radius: 50%;
}

/* image / craft frames */
.display-slide { position: relative; }
.display-slide > img:first-child { display: block; width: 100%; height: auto; }
.display-slide .display-slide-animation { position: absolute; border: 0; border-radius: 4px; object-fit: fill; }
.display-slide--framework .display-slide-animation { left: 51.875%; top: 29.26%; width: 34.17%; height: 37.96%; }
.display-slide--proactive .display-slide-animation { top: 38.52%; width: 41.875%; height: 46.52%; }
.display-slide--proactive .display-slide-animation--left { left: 5%; }
.display-slide--proactive .display-slide-animation--right { left: 51.145%; }
.auto-latency-motion { position: relative; }
.auto-latency-motion > img:first-child { display: block; width: 100%; height: auto; }
.auto-latency-motion .auto-latency-pattern,
.auto-latency-motion .auto-latency-contact {
  position: absolute;
  top: 38.44%;
  height: 48.46%;
  border: 0;
  border-radius: 4.3% / 7%;
  object-fit: fill;
}
.auto-latency-motion .auto-latency-pattern { left: 5%; width: 43.615%; }
.auto-latency-motion .auto-latency-contact { left: 50.984%; width: 45.432%; }
.drive-sharing-motion { position: relative; }
.drive-sharing-motion > img:first-child { display: block; width: 100%; height: auto; }
.drive-sharing-motion .drive-request-animation {
  position: absolute;
  left: 60.24%;
  top: 6.8%;
  width: 29.51%;
  height: 38.76%;
  object-fit: fill;
  border: 0;
  border-radius: 4px;
}
.photos-motion-panel { padding: clamp(20px, 4vw, 48px); background: #151515; color: #fff; border-radius: 2px; }
.photos-motion-panel h3 { font-family: var(--sans); font-size: clamp(18px, 2vw, 26px); margin-bottom: 32px; }
.photos-motion-examples { display: grid; grid-template-columns: 1.8fr 1fr 1fr; gap: clamp(16px, 3vw, 36px); align-items: center; }
.photos-motion-examples figure { margin: 0; }
.photos-motion-examples img { display: block; width: 100%; height: auto; border: 0; border-radius: 12px; }
.photos-motion-pill p { font-size: 14px; margin-bottom: 24px; }
.photos-motion-examples figcaption { color: #ccc; text-align: center; }
@media (max-width: 600px) {
  .photos-motion-examples { grid-template-columns: 1fr 1fr; }
  .photos-motion-pill { grid-column: 1 / -1; max-width: 80%; margin-bottom: 12px; }
}
.cs-figure { margin: 36px 0; }
.cs-figure img { border: 1px solid var(--line); border-radius: 2px; }
.cs-figure figcaption {
  margin-top: 12px;
  font-size: 13px;
  color: var(--ink-faint);
  max-width: 62ch;
}

.cs-figure.phone { max-width: 300px; }
.cs-figure.phone img { width: 100%; }
.contained-phone-frame { display: flex; justify-content: center; align-items: center; padding: 24px; background: var(--paper); border: 1px solid var(--line); border-radius: 2px; }
.cs-figure .contained-phone-frame img { display: block; width: auto; max-width: 100%; height: auto; max-height: 520px; object-fit: contain; border: 0; }

.cs-hero { margin-top: 48px; }
.cs-hero img {
  width: 100%;
  display: block;
  border: 1px solid var(--line);
  border-radius: 2px;
}
.cs-hero figcaption {
  margin-top: 14px;
  font-size: 13px;
  color: var(--ink-faint);
}
.cs-hero.phone { max-width: 320px; margin-left: auto; margin-right: auto; }
.cs-hero.phone img { width: 100%; }

.cs-figure-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 36px 0;
}
.cs-figure-row .cs-figure { margin: 0; }

.cs-placeholder {
  border: 1px dashed var(--need-border);
  background: var(--need-bg);
  border-radius: 3px;
  padding: 28px 24px;
  font-size: 14px;
  color: var(--need-ink);
  max-width: 62ch;
}

.cs-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 28px;
  margin: 30px 0 10px;
  max-width: 62ch;
}
.cs-stat .num { font-family: var(--serif); font-size: clamp(30px, 4vw, 44px); color: var(--ink); line-height: 1; }
.cs-stat .label { font-size: 13px; color: var(--ink-soft); margin-top: 8px; line-height: 1.4; }

.cs-footer-nav {
  border-top: 1px solid var(--line);
  padding: 48px var(--gutter) 20px;
  max-width: var(--max);
  margin: 40px auto 0;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.cs-footer-nav a { font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-faint); }
.cs-footer-nav a:hover { color: var(--ink); }
.cs-footer-nav .next-title { display: block; margin-top: 8px; font-family: var(--serif); font-size: 22px; color: var(--ink); text-transform: none; letter-spacing: 0; }

/* --------------------------------------------------------------------------
   Selected-work (condensed) template
   -------------------------------------------------------------------------- */

.sw-body { max-width: 720px; margin: 0 auto; padding: 0 var(--gutter) 60px; }
.sw-body .cs-section { padding-bottom: 64px; }
.sw-body .cs-section + .cs-section { padding-top: 56px; }

/* --------------------------------------------------------------------------
   Reveal-on-scroll
   -------------------------------------------------------------------------- */

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 900px) {
  .cs-body { grid-template-columns: 1fr; }
  .cs-rail { display: none; }
  .cs-main { padding-top: 20px; }
  .cs-header { padding-top: 130px; }
  .selected-grid-inner { grid-template-columns: 1fr; }
  .work-row { grid-template-columns: 1fr; gap: 14px; }
  .work-row .num { order: 1; }
  .work-row .thumb { order: 2; width: 100%; }
  .work-row .titles { order: 3; }
  .work-row .go { display: none; }
  .cs-figure-row { grid-template-columns: 1fr; }
  .hero { padding-top: 150px; }
}

@media (max-width: 560px) {
  .nav-links { display: none; }
  .site-footer { flex-direction: column; align-items: flex-start; }
}

/* Earlier-work archives retain complete source images without cropping. */
.archive-details { margin: 32px 0; }
.archive-details summary { cursor: pointer; padding: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 16px; }
.archive-details[open] summary { margin-bottom: 32px; }
.archive-details .cs-figure img { object-fit: contain; height: auto; }
.earlier-card { border: 1px dashed var(--ink-faint); background: var(--paper); }
.archive-video { display: block; width: 100%; max-height: 680px; margin: 32px auto; background: #111; }
