/* ==========================================================================
   Tri Nguyen — Product Design Lead portfolio
   Resume-aligned typography, white space, and a soft blue wash
   ========================================================================== */

@font-face {
  font-family: "Archivo Narrow";
  src: url("fonts/ArchivoNarrow-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("fonts/Poppins-Light.ttf") format("truetype");
  font-style: normal;
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("fonts/Poppins-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("fonts/Poppins-Medium.ttf") format("truetype");
  font-style: normal;
  font-weight: 500 900;
  font-display: swap;
}

:root {
  --paper: #ffffff;
  --paper-dim: #f5f8fb;
  --ink: #222222;
  --ink-soft: #4c535b;
  --ink-faint: #646d77;
  --line: #d9dde1;
  --line-strong: #bbc4ce;
  --accent: #284f72;
  --accent-soft: #527b9e;
  --tag-bg: #edf4fa;
  --need-bg: #fbeee0;
  --need-border: #dba86a;
  --need-ink: #8a5a20;

  --display: "Archivo Narrow", "Arial Narrow", Arial, sans-serif;
  --serif: var(--display);
  --sans: "Poppins", -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.75;
  font-weight: 300;
  position: relative;
  isolation: isolate;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1000px;
  z-index: -2;
  pointer-events: none;
  background: radial-gradient(ellipse 850px 650px at 9% 55px, #a9cef3 0%, rgba(176,213,248,.72) 32%, rgba(223,239,254,.35) 57%, rgba(255,255,255,0) 84%);
  background-repeat: no-repeat;
  background-size: 125% 115%;
  animation: blue-wash-drift 18s ease-in-out infinite alternate;
}
body.case-study::before { filter: opacity(.5); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }

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(--display); font-weight: 700; margin: 0; letter-spacing: -0.035em; line-height: 1.12; }

.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(--sans);
  font-style: normal;
  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: var(--ink);
  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;
  gap: 20px;
  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(255,255,255,0.93);
  backdrop-filter: blur(8px);
  border-bottom-color: var(--line);
  padding-top: 14px;
  padding-bottom: 14px;
}

.site-nav .wordmark {
  min-width: 0;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 400;
  letter-spacing: -.015em;
  line-height: 1.2;
}

.site-nav .wordmark.has-role { display: inline-flex; align-items: center; gap: 8px; }
.wordmark-role { font-size: 16px; color: var(--ink-soft); white-space: nowrap; }
.wordmark-role::before { content: "·"; margin-right: 8px; }
.site-nav .menu-btn { flex-shrink: 0; }

@media (max-width: 560px) {
  .site-nav .wordmark.has-role { flex-direction: column; align-items: flex-start; gap: 1px; }
  .wordmark-role { font-size: 14px; }
  .wordmark-role::before { content: none; }
}

.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: radial-gradient(ellipse at top left, #e4f1fc, white 65%);
  color: var(--ink);
  visibility: hidden;
  transform: translateY(-100%);
  transition: transform .5s cubic-bezier(.65,0,.35,1);
  overflow-y: auto;
}
.menu-overlay.is-open { transform: translateY(0); visibility: visible; }

.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(--ink);
  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: var(--ink-soft);
  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(--ink);
  font-weight: 700;
  letter-spacing: -.025em;
  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: var(--ink-soft); margin-left: 12px; vertical-align: middle; }

.menu-contact { margin-top: 40px; font-size: 15px; color: var(--ink-soft); }
.menu-contact a { text-decoration: underline; text-decoration-color: var(--line-strong); }

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

.hero {
  position: relative;
  padding: 160px var(--gutter) 24px;
  max-width: var(--max);
  margin: 0 auto;
}
.hero h1 {
  font-weight: 500;
  font-size: clamp(68px, 9vw, 116px);
  line-height: 1.05;
  letter-spacing: -.045em;
  padding-bottom: 38px;
  border-bottom: 1px solid var(--line-strong);
}
.name-i { margin-left: .055em; }
.hero-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(36px, 6vw, 72px);
  padding: 42px 0;
  border-bottom: 1px solid var(--line);
}
.hero-positioning { min-width: 0; }
.hero-profile { border-left: 1px solid var(--line); padding-left: clamp(30px, 5vw, 60px); }
.hero-label { margin-bottom: 12px; }
.hero .hero-label .eyebrow {
  font-family: var(--display);
  font-size: clamp(30px, 3.5vw, 44px);
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: 1.1;
  text-transform: none;
  color: var(--ink);
}
.eyebrow, .cs-section .step-label, .menu-col-label {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1.4;
  color: var(--ink);
}
.hero .role-line { font-family: var(--sans); font-size: 15px; font-weight: 300; line-height: 1.8; color: var(--ink-soft); }
.hero .lede { font-family: var(--sans); font-size: clamp(18px, 1.75vw, 21px); font-weight: 300; font-style: normal; line-height: 1.65; margin: 24px 0 0; max-width: 40ch; }
.hero .support { font-size: 16px; font-weight: 300; line-height: 1.85; margin: 16px 0 0; color: var(--ink); }
.hero .credentials { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 12px; margin-top: 22px; color: var(--ink-soft); }
.hero .credentials b { font-weight: 500; color: var(--ink); }
.hero .resume-link { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 22px; }
.hero .company-strip { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 24px; margin-top: 28px; padding: 0; }
.hero .company-strip img { height: 18px; width: auto; filter: grayscale(1); opacity: .58; transition: opacity .2s; }
.hero .company-strip img.sm { height: 15px; }
.hero .company-strip img.glyph { height: 23px; }
.hero .company-strip img.samsung { width: 64px; height: auto; }
.hero .company-strip img:hover { opacity: 1; }

/* --------------------------------------------------------------------------
   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: 700; 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: 32px minmax(220px, 30%) minmax(0, 1fr) auto; align-items: center; gap: 24px; }

.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(28px, 3.2vw, 40px);
  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: 11px;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--ink-faint);
  opacity: 1;
  transform: translateX(0);
  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(28px, 2.8vw, 34px); 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(--display); font-size: 28px; font-weight: 500; letter-spacing: -.035em; }
.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(44px, 6vw, 76px); 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(--sans);
  font-style: normal;
  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(--sans);
  font-style: normal;
  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: var(--ink);
}
.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: 140px; }
}

@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; }

/* Resume layout adapts to smaller screens without compressing the text. */
@media (max-width: 1100px) and (min-width: 901px) {
  .work-row { grid-template-columns: 28px 29% minmax(0, 1fr); }
  .work-row .go { display: none; }
}
@media (max-width: 760px) {
  .hero { padding-top: 132px; }
  .hero h1 { padding-bottom: 28px; }
  .hero-intro { grid-template-columns: 1fr; gap: 28px; padding: 30px 0; }
  .hero-profile { border-left: 0; border-top: 1px solid var(--line); padding: 28px 0 0; }
  .hero .support { max-width: 60ch; }
  .hero .company-strip { justify-content: flex-start; gap: 24px 30px; }
  .section-block { padding-top: 62px; }
  .selected-cell { padding: 28px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { transform: none; }
}

/* Distance-shaded dots sit between the blue wash and the page content. */
#gradient-dots { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; z-index: -1; pointer-events: none; }
@media (forced-colors: active) { #gradient-dots, body::before { display: none; } }

/* Primary projects: a vertical editorial story with a persistent visual stage. */
.primary-section { max-width: var(--max); margin: 0 auto; padding-top: 96px; }
.primary-section > .section-head { padding-bottom: 24px; border-bottom: 1px solid var(--line); margin: 0 var(--gutter); padding-left: 0; padding-right: 0; }
.presentation-note { font-size: 12px; color: var(--ink-faint); }
.primary-stories { padding: 0 var(--gutter); }
.story-step { padding: 64px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 100px; }
.story-eyebrow { display: flex; align-items: center; gap: 16px; font-size: 12px; color: var(--ink-soft); margin-bottom: 22px; }
.story-eyebrow > span:first-child { font-family: var(--display); font-size: 15px; color: var(--accent); font-weight: 500; }
.story-step h2 { font-size: clamp(34px, 4vw, 50px); line-height: 1.06; max-width: 14ch; }
.story-description { margin-top: 24px; font-size: 16px; line-height: 1.85; color: var(--ink-soft); max-width: 37ch; }
.story-takeaway { font-size: 12px; margin: 26px 0; padding-left: 14px; border-left: 2px solid #bcd7ef; max-width: 32ch; color: var(--ink-soft); }
.story-link { display: inline-flex; align-items: center; gap: 20px; font-weight: 400; font-size: 13px; padding-bottom: 7px; border-bottom: 1px solid var(--ink); }
.story-link span { font-size: 20px; line-height: 1; transition: transform .2s ease; }
.story-link:hover span { transform: translate(3px,-3px); }
.story-static { margin: 32px 0 0; }
.story-static img { width: 100%; max-height: 480px; object-fit: contain; }
.story-visual { display: none; }
.primary-stories.is-orchestrated { display: grid; grid-template-columns: .8fr 1.2fr; gap: 44px; position: relative; }
.is-orchestrated .story-step { min-height: 86svh; display: flex; align-items: center; padding: 76px 0; border: 0; }
.is-orchestrated .story-static { display: none; }
.is-orchestrated .story-visual { display: block; position: sticky; top: 108px; height: min(620px, calc(100svh - 156px)); margin-top: 36px; align-self: start; min-width: 0; }
.story-stage { position: relative; width: 100%; height: 100%; overflow: hidden; isolation: isolate; border: 1px solid #dce6ef; border-radius: 22px; background: radial-gradient(ellipse at 30% 25%, #e2f0fc, #f7fbff 55%, #f5f8fb); perspective: 1100px; }
.stage-grid { position: absolute; inset: 0; background-image: radial-gradient(#8cb0cf .65px, transparent .65px); background-size: 20px 20px; opacity: .22; mask-image: linear-gradient(135deg, #000, transparent 85%); }
.stage-orbit { position: absolute; border: 1px solid #d3e3f0; border-radius: 50%; width: 83%; aspect-ratio: 1; left: 8%; top: 18%; }
.orbit-two { width: 112%; left: -6%; top: 5%; opacity: .55; }
.stage-topline,.stage-bottomline { position: absolute; left: 26px; right: 26px; display: flex; align-items: center; justify-content: space-between; z-index: 4; }
.stage-topline { top: 22px; font-size: 10px; color: var(--ink-soft); }
.stage-project { font-weight: 400; }
.stage-count { font-family: var(--display); font-size: 14px; }
.stage-bottomline { bottom: 22px; font-size: 10px; color: var(--ink-soft); gap: 16px; }
.stage-progress { width: 68px; height: 2px; background: #d4e1ec; overflow: hidden; flex-shrink: 0; }
.stage-progress > span { display: block; height: 100%; width: 100%; background: #567fa2; transform: scaleX(0); transform-origin: left; }
.story-scene { position: absolute; inset: 50px 12px 55px; opacity: 0; pointer-events: none; transform-style: preserve-3d; }
.scene-assistant { opacity: 1; }
.ui-piece { position: absolute; transform-origin: center 90%; will-change: transform, opacity; }
.ui-crop { position: relative; overflow: hidden; width: 100%; border-radius: 10px; background: white; box-shadow: 0 8px 30px #203c5b1a; }
.ui-crop img { position: absolute; max-width: none; height: auto; }
.assistant-tablet { width: 68%; left: 8%; top: 43%; z-index: 2; }
.assistant-auto { width: 54%; left: 36%; top: 9%; z-index: 1; }
.assistant-watch { width: 19%; left: 9%; top: 15%; z-index: 3; }
.assistant-watch .ui-crop { border-radius: 50%; }
.assistant-phone { width: 23%; right: 3%; top: 41%; z-index: 3; }
.photos-phone { width: 34%; left: 33%; top: 2%; height: auto; aspect-ratio: 720 / 1555; border-radius: 22px; overflow: hidden; box-shadow: 0 16px 40px #203c5b24; background: white; }
.photos-phone img { width: 100%; height: 100%; object-fit: contain; object-position: top; }
.photos-status { width: 42%; z-index: 2; container-type: inline-size; }
.photos-status .ui-crop { border-radius: 100px; box-shadow: 0 8px 30px #203c5b20; }
/* Native text and SVG avoid magnifying the low-resolution source slide. */
.photos-status .backup-pill {
  display: flex; align-items: center; gap: 4.5cqw;
  aspect-ratio: 235 / 54; padding-inline: 6.8cqw;
  background: #f0f3f9; border: 1px solid #b4bbc5;
  color: #292d33; font-family: Arial, Helvetica, sans-serif;
  font-size: 7.45cqw; font-weight: 600; line-height: 1;
  letter-spacing: -.025em; white-space: nowrap;
}
.photos-backing .backup-pill { aspect-ratio: 243 / 54; }
.photos-complete .backup-pill { aspect-ratio: 224 / 54; }
.backup-pill svg { flex: 0 0 auto; width: 10cqw; height: 10cqw; }
.backup-wave-track { stroke: #cdd2da; stroke-width: 1.9; stroke-linecap: round; }
.backup-wave-active { stroke: #30353c; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.backup-pill span { flex: 0 0 auto; }
.photos-preparing { left: 0; top: 26%; }
.photos-backing { right: 0; top: 48%; }
.photos-complete { left: 0; top: 73%; }
.drive-dialog { width: 43%; left: 3%; top: 30%; z-index: 3; }
.drive-notification { width: 39%; left: 28%; top: 8%; z-index: 2; }
.drive-digest { width: 41%; right: 0; top: 38%; z-index: 3; }
/* Release the 3D raster layer once the Drive composition settles. Tiny residual
   rotations otherwise soften even high-resolution interface screenshots. */
.scene-drive.is-settled { transform-style: flat; }
.scene-drive.is-settled .ui-piece { transform: none !important; will-change: auto; }
.story-stage.drive-is-settled { perspective: none; }
.primary-case .cs-figure.is-scroll-figure, .primary-case .cs-hero.is-scroll-figure { will-change: transform, opacity; transform-origin: center 70%; }
@media (max-width: 1050px) and (min-width: 761px) {
  .primary-stories.is-orchestrated { gap: 28px; grid-template-columns: .9fr 1.1fr; }
  .story-step h2 { font-size: 38px; }
  .story-description { font-size: 15px; }
  .stage-topline,.stage-bottomline { left: 18px; right: 18px; }
}
@media (max-width: 760px) {
  .primary-section { padding-top: 64px; }
  .presentation-note { display: none; }
  .primary-stories.is-orchestrated { grid-template-columns: minmax(0,1fr); gap: 0; }
  .is-orchestrated .story-visual { grid-row: 1; top: 76px; height: clamp(250px, 38svh, 360px); margin-top: 24px; z-index: 5; padding-bottom: 12px; background: white; }
  .is-orchestrated .story-steps { grid-row: 2; }
  .is-orchestrated .story-step { min-height: 85svh; padding: 40px 0; align-items: center; }
  .story-step h2 { font-size: clamp(32px, 8vw, 42px); max-width: 18ch; }
  .story-description { font-size: 15px; max-width: 42ch; }
  .story-eyebrow { margin-bottom: 16px; }
  .story-stage { border-radius: 16px; }
  .story-scene { inset: 34px 8px 35px; }
  .stage-topline { top: 12px; }
  .stage-bottomline { bottom: 12px; }
  .stage-topline,.stage-bottomline { left: 16px; right: 16px; font-size: 9px; }
  .photos-phone { width: 29%; left: 36%; }
  .assistant-tablet { width: 55%; top: 40%; left: 14%; }
  .assistant-auto { width: 39%; top: 3%; left: 40%; }
  .assistant-watch { width: 14%; left: 17%; top: 8%; }
  .assistant-phone { width: 17%; right: 13%; top: 29%; }
  .photos-status { width: 36%; }
  .drive-dialog { width: 32%; left: 8%; top: 27%; }
  .drive-notification { width: 28%; left: 35%; top: 3%; }
  .drive-digest { width: 30%; right: 5%; top: 20%; }
}
@media (prefers-reduced-motion: reduce) {
  .primary-stories.is-orchestrated { display: block; }
  .is-orchestrated .story-visual { display: none; }
  .is-orchestrated .story-static { display: block; }
  .is-orchestrated .story-step { display: block; min-height: 0; padding: 48px 0; border-bottom: 1px solid var(--line); }
}

@keyframes blue-wash-drift {
  from { background-position: 0% 0%; opacity: .88; }
  to { background-position: 40% 38%; opacity: 1; }
}

/* The stage breathes quietly while a reader pauses on a project. */
.story-stage::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at 20% 30%, #c8e2fb90, transparent 72%);
  background-size: 150% 140%;
  animation: blue-wash-drift 16s ease-in-out infinite alternate;
}
.ui-piece > .ui-crop { animation: ui-rest 9s ease-in-out infinite; }
.ui-piece:nth-child(2) > .ui-crop { animation-delay: -3s; }
.ui-piece:nth-child(3) > .ui-crop { animation-delay: -6s; }
.ui-piece:nth-child(4) > .ui-crop { animation-delay: -1.5s; }
@keyframes ui-rest { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .story-stage::before, .ui-piece > .ui-crop { animation: none; } }

/* On-load name drawing; the semantic heading remains in the document. */
.hero .hero-name { position: relative; transition: border-bottom-color 450ms ease; }
.name-intro-pending .hero .hero-name,
.hero .hero-name.name-is-drawing:not(.name-is-finishing) { border-bottom-color: transparent; }
.hero-name .name-ink { display: inline-block; }
.name-draw { display: none; position: absolute; pointer-events: none; z-index: 2; visibility: hidden; }
.name-intro-pending .hero-name .name-ink,
.hero-name.name-is-drawing .name-ink { opacity: 0; }
.hero-name.name-is-drawing .name-draw { display: block; }

/* Let the role, profile, and companies follow the completed name introduction. */
.hero-intro-pending .hero-intro { border-bottom-color: transparent; }
.hero-intro-pending .hero-label,
.hero-intro-pending .hero .role-line,
.hero-intro-pending .hero .lede,
.hero-intro-pending .hero-profile,
.hero-intro-pending .hero .company-strip img { opacity: 0; }
.hero-intro-revealing .hero-label,
.hero-intro-revealing .hero .role-line,
.hero-intro-revealing .hero .lede,
.hero-intro-revealing .hero-profile {
  animation: hero-copy-in 700ms cubic-bezier(.2,.75,.25,1) both;
}
.hero-intro-revealing .hero .role-line { animation-delay: 80ms; }
.hero-intro-revealing .hero .lede { animation-delay: 160ms; }
.hero-intro-revealing .hero-profile { animation-delay: 240ms; }
.hero-intro-revealing .hero-intro { animation: hero-rule-in 600ms ease 180ms both; }
.hero-intro-revealing .hero .company-strip img { animation: hero-logo-in 620ms cubic-bezier(.2,.75,.25,1) 520ms both; }
.hero-intro-revealing .hero .company-strip img:nth-child(2) { animation-delay: 565ms; }
.hero-intro-revealing .hero .company-strip img:nth-child(3) { animation-delay: 610ms; }
.hero-intro-revealing .hero .company-strip img:nth-child(4) { animation-delay: 655ms; }
.hero-intro-revealing .hero .company-strip img:nth-child(5) { animation-delay: 700ms; }
.hero-intro-revealing .hero .company-strip img:nth-child(6) { animation-delay: 745ms; }
.hero-intro-revealing .hero .company-strip img:nth-child(7) { animation-delay: 790ms; }
@keyframes hero-copy-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes hero-logo-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: .58; transform: translateY(0); }
}
@keyframes hero-rule-in {
  from { border-bottom-color: transparent; }
  to { border-bottom-color: var(--line); }
}
@media (prefers-reduced-motion: reduce), (forced-colors: active) {
  .name-intro-pending .hero-name .name-ink, .hero-name.name-is-drawing .name-ink { opacity: 1 !important; }
  .hero-name .name-draw { display: none !important; }
  .hero-intro-pending .hero-label,
  .hero-intro-pending .hero .role-line,
  .hero-intro-pending .hero .lede,
  .hero-intro-pending .hero-profile { opacity: 1 !important; }
  .hero-intro-pending .hero .company-strip img { opacity: .58 !important; }
  .hero-intro-pending .hero-intro { border-bottom-color: var(--line); }
  .hero-intro-revealing .hero-label,
  .hero-intro-revealing .hero .role-line,
  .hero-intro-revealing .hero .lede,
  .hero-intro-revealing .hero-profile,
  .hero-intro-revealing .hero .company-strip img,
  .hero-intro-revealing .hero-intro { animation: none; }
}
