/* styles.css - layout and look.
   Tokens follow the QuantifyMe anti-slop rules: a tinted neutral ramp (Radix
   sand, dark), two text colours plus a disabled colour, one accent used
   sparingly (focus, links on hover, the italic headline word), one control spec,
   Geist only at weights 400 / 500 / 600. The accent is set from content.js. */

:root {
  /* warm paper ramp (light bands). Every section is a band with its own
     shade (see "bands" below); these are the light defaults. */
  --gray-1: #F3EEE4;   /* page */
  --gray-2: #E7DFD0;   /* subtle surface */
  --gray-3: rgba(26, 24, 20, 0.07);  /* tags, ghost hover */
  --gray-6: #D3C9B7;   /* rails */
  --gray-8: #9C9282;   /* dots, hover border */

  --bg: var(--gray-1);
  --text: #1A1814;     /* 13.6:1 or more on every light band */
  --text-2: #5C5549;   /* 5.6:1 or more */
  --text-3: #6B6356;   /* 4.5:1 or more */
  --hairline: rgba(26, 24, 20, 0.12);
  --border: rgba(26, 24, 20, 0.18);
  --border-hover: rgba(26, 24, 20, 0.34);
  --ink: #1A1814;      /* dark pill buttons */
  --ink-fg: #F3EEE4;
  --accent: #C25A23;   /* set from content.js; 3.4:1 or more on light bands (large text) */
  --shadow-tint: 26, 24, 20;
  /* paper grain: a tiny fractal-noise tile laid over the light bands */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.1 0 0 0 0 0.09 0 0 0 0 0.07 0 0 0 0.07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");

  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display-wght: 340;  /* between Fraunces 300 and 400: matches the reference stroke */
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --wrap: 1120px;
  --pad: clamp(20px, 4vw, 32px);
}

/* ---------- bands: each section has its own shade ---------- */
.band { background: var(--grain), var(--bg); color: var(--text); }
.band-cream { --bg: #F3EEE4; }
.band-paper { --bg: #F8F4EC; }
.band-sand  { --bg: #E9E1D1; }
.band-dark {
  --bg: #151412;
  --gray-2: #1F1D1A; --gray-3: #2A2724; --gray-6: #3B3833; --gray-8: #6A645A;
  --text: #EDE8DF;     /* 14:1 */
  --text-2: #ABA497;   /* 6.9:1 */
  --text-3: #8A8377;   /* 4.6:1 */
  --hairline: rgba(255, 255, 255, 0.09);
  --border: rgba(255, 255, 255, 0.16);
  --border-hover: rgba(255, 255, 255, 0.28);
  --ink: #EDE8DF; --ink-fg: #151412;
  --accent: #E8894A;   /* 6.6:1 */
  background: var(--bg);
}
.band-ink { --bg: #1D1B18; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 14px/20px var(--sans);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p, h1, h2, h3, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
.icon { display: block; flex: none; width: 16px; height: 16px; }

/* focus ring, never removed: follows the radius because it is a box-shadow */
a:focus-visible, button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent);
  border-radius: 6px;
}

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--pad) * 2); margin: 0 auto; padding-inline: var(--pad); }

.skip {
  position: fixed; left: 16px; top: 12px; z-index: 100;
  height: 32px; padding: 0 12px; display: inline-flex; align-items: center;
  border-radius: 6px; background: var(--ink); color: var(--ink-fg); font-weight: 500;
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

/* ---------- type ---------- */
/* display serif: Fraunces at its largest optical size, light, tight */
.h2, .hero-name, .footer-heading, .ch-h, .row-title, .nav-brand, .mq-item, .card-link-label, .hand-cap-name, .hero-meta dd {
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 0, "WONK" 0;
}
.h2 { font-size: clamp(36px, 4.4vw, 56px); line-height: 1.04; font-weight: var(--display-wght); letter-spacing: -0.03em; text-wrap: balance; }
/* the one italic accent word in a headline */
.h2 em, .hero-name em, .footer-heading em, .ch-h em { font-style: italic; color: var(--accent); letter-spacing: -0.02em; }
/* tiny uppercase mono label above a headline */
.eyebrow {
  margin: 0 0 16px;
  font: 400 12px/16px var(--mono); letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text-2);
}
.lead { margin-top: 16px; font-size: 16px; line-height: 24px; color: var(--text-2); max-width: 560px; text-wrap: pretty; }

/* ---------- one control spec ---------- */
.control {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--border);
  font: 500 14px/1 var(--sans); white-space: nowrap;
  color: var(--text); background: transparent;
  transition: background-color .15s ease-out, border-color .15s ease-out, color .15s ease-out, transform .1s ease-out;
}
.control > .icon:last-child:not(:first-child) { width: 14px; height: 14px; color: var(--text-2); }
.control-ghost:hover { background: var(--gray-3); border-color: var(--border-hover); }
/* dark pill (light pill on dark bands) */
.control-primary { background: var(--ink); border-color: var(--ink); color: var(--ink-fg); }
.control-primary:hover { opacity: 0.88; }
.control:active { transform: scale(0.97); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.actions-tight { margin-top: 16px; align-items: center; }

/* ---------- nav ---------- */
/* a cream pill floating over every band, as in the references */
.nav {
  position: fixed; top: 8px; left: 12px; right: 12px; z-index: 50;
  height: 52px; display: flex; align-items: center; gap: 32px;
  padding-inline: 20px 8px; border-radius: 999px;
  background: rgba(240, 234, 223, 0.9);
  -webkit-backdrop-filter: saturate(1.2) blur(12px); backdrop-filter: saturate(1.2) blur(12px);
  box-shadow: 0 0 0 1px rgba(26, 24, 20, 0.08);
  transition: box-shadow .15s ease-out;
}
.nav.is-scrolled { box-shadow: 0 0 0 1px rgba(26, 24, 20, 0.1), 0 6px 24px rgba(26, 24, 20, 0.14); }
.nav-brand { font-size: 21px; font-weight: 400; letter-spacing: -0.02em; margin-right: auto; white-space: nowrap; }
.nav-brand::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 6px; border-radius: 50%; background: var(--accent); vertical-align: 0.2em; }
.nav .control-ghost { background: var(--ink); border-color: var(--ink); color: var(--ink-fg); height: 36px; }
.nav .control-ghost:hover { background: var(--ink); opacity: 0.88; }
.nav-links { display: flex; gap: 24px; font-weight: 500; color: var(--text-2); }
.nav-links a { transition: color .15s ease-out; }
.nav-links a:hover { color: var(--text); }

/* ---------- hero ---------- */
.hero {
  min-height: 92vh; min-height: 92svh;
  display: flex; align-items: center;
  padding: 120px 0 80px;
}
.hero-kicker { margin-bottom: 28px; }
.hero-name {
  font-size: clamp(48px, 7.6vw, 112px); line-height: 0.98; font-weight: var(--display-wght); letter-spacing: -0.035em;
  max-width: 13.5em; text-wrap: balance;
}
.hero-foot { margin-top: 48px; display: flex; align-items: flex-end; justify-content: space-between; gap: 32px 64px; flex-wrap: wrap; }
.hero-profile { font-size: 16px; line-height: 24px; color: var(--text-2); max-width: 520px; text-wrap: pretty; }
.hero-meta { margin: 0 0 6px; }
.hero-meta .eyebrow { margin-bottom: 6px; }
.hero-meta dd { margin: 0; font-size: 22px; line-height: 28px; font-weight: var(--display-wght); letter-spacing: -0.01em; }

/* ---------- showcase ---------- */
.showcase { padding-top: 112px; }
.marquee {
  margin-top: 40px;
  overflow: hidden; border-block: 1px solid var(--hairline);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track { display: flex; width: max-content; animation: marquee 50s linear infinite; }
.mq-half { display: flex; align-items: center; }
.mq-item { padding: 18px 0; font-size: 28px; line-height: 32px; font-weight: var(--display-wght); font-style: italic; letter-spacing: -0.02em; color: var(--text-2); white-space: nowrap; }
.mq-sep { width: 1px; height: 16px; margin: 0 32px; background: var(--gray-6); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* wall of product screens, scrolling up behind a hand pinned to the bottom
   of the viewport (position: sticky; bottom: 0), as awsmd.com does */
.hw {
  --gap: 12px;
  --cap-h: 64px;                         /* room above the phone for its caption */
  --phone-k: 1.1;                        /* phone width, in wall columns */
  /* the photo's numbers (--phone-frac, --hand-ratio, --phone-cx, --hand-max)
     come from content.js via main.js. The hand is capped at half its pixel
     width so it is never upscaled on a 2x screen. */
  --hand-w: min(calc(var(--col, 260px) * var(--phone-k) / var(--phone-frac, 0.39)),
                calc((100svh - 96px - var(--cap-h)) / var(--hand-ratio, 0.907)),
                var(--hand-max, 860px));
  --hand-h: calc(var(--hand-w) * var(--hand-ratio, 0.907));
  position: relative;
  margin-top: 40px;
}
.wall {
  width: min(calc(100% - 24px), 1680px); margin: 0 auto;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--gap);
  /* pull the hand up so that at the end it overlaps the last row. This sits on
     the wall, not on the sticky hand: a negative margin on a sticky element
     would let it rise above the top of its section. */
  margin-bottom: calc(var(--hand-h) * -0.6 - var(--cap-h));
}
.card:nth-child(4n+3) { grid-column: 4; }       /* skip the middle column: the hand sits there */
/* chapters: each product starts on its own row with a title, after a divider.
   main.js sets every card's slot (--c5 wide, --c3 on phones). */
.wall-ch > .card { grid-column: var(--c5); }
.ch-head {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); column-gap: var(--gap); align-items: end;
  margin-top: 88px; padding: 40px 0 28px; border-top: 1px solid var(--hairline);
}
.ch-head:first-child { margin-top: 24px; border-top: 0; padding-top: 0; }
/* alternating shade per chapter: main.js paints these as full-width stripes
   behind the wall, starting a little above each chapter title */
.hw { --ch-0: #151412; --ch-1: #2B2621; --ch-2: #151412; }
.hw.has-stripes .ch-head { border-top-color: transparent; }
/* title and line both sit left of the hand, so neither passes behind it */
.ch-title, .ch-text { grid-column: 1 / 3; padding-left: 4px; padding-right: 32px; }
.ch-h { font-size: clamp(28px, 2.9vw, 42px); line-height: 1.06; font-weight: var(--display-wght); letter-spacing: -0.025em; text-wrap: balance; }
.ch-text { margin-top: 12px; max-width: 460px; color: var(--text-2); font-size: 15px; line-height: 22px; text-wrap: pretty; }
/* link tile that closes each chapter */
.wall .card-link {
  display: flex; flex-direction: column; justify-content: flex-end; gap: 8px;
  padding: clamp(14px, 1.6vw, 24px);
  background: var(--gray-2); color: var(--text);
  transition: background-color .15s ease-out;
}
.wall .card-link:hover { background: var(--gray-3); }
.card-link .eyebrow { margin: 0; }
.card-link-label { font-size: clamp(22px, 2.2vw, 32px); line-height: 1.1; font-weight: var(--display-wght); letter-spacing: -0.02em; }
.card-link-go {
  margin-top: 8px; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; background: var(--ink); color: var(--ink-fg);
}
.card {
  position: relative; display: block; overflow: hidden;
  aspect-ratio: 10 / 16;
  border-radius: clamp(8px, calc(var(--col, 260px) * 0.06), 16px);
  background: var(--gray-2);
  box-shadow: 0 0 0 1px var(--hairline);
}
.card img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.card-over {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  padding: 12px; text-align: center;
  background: rgba(17, 17, 16, 0.8);
  opacity: 0; transition: opacity .15s ease-out;
}
.card-label { font-size: 16px; line-height: 24px; font-weight: 600; letter-spacing: -0.01em; }
.card-go { background: var(--gray-1); }
.card:hover .card-over, .card:focus-visible .card-over { opacity: 1; }

.hand-pin {
  position: sticky; bottom: 0; z-index: 2;
  height: calc(var(--hand-h) + var(--cap-h));
  overflow: hidden;
  pointer-events: none;                          /* cards under the arm stay clickable */
  /* the photo's arm is cut at its bottom edge: soften that cut so it never
     shows as a hard line when the section scrolls away */
  -webkit-mask-image: linear-gradient(to top, transparent 0, #000 28px);
  mask-image: linear-gradient(to top, transparent 0, #000 28px);
}
.hand {
  position: absolute; bottom: 0;
  left: calc(50% - var(--hand-w) * var(--phone-cx, 0.311));   /* centre the phone, not the image */
  width: var(--hand-w); aspect-ratio: var(--hand-ar, 1720 / 1560);
}
/* caption pinned above the phone: the product now in the hand */
.hand-cap {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px;
  height: 40px; padding: 0 16px; border-radius: 999px; white-space: nowrap;
  background: #26231F; box-shadow: 0 0 0 1px var(--border), 0 8px 24px rgba(0, 0, 0, 0.35);
}
.hand-cap { transition: opacity .2s ease-out; }
.hand-cap:empty { display: none; }
/* steps aside while a chapter title scrolls past it, so they never overlap */
.hand-cap.is-hidden { opacity: 0; }
.hand-cap .eyebrow { margin: 0; color: var(--accent); }
.hand-cap-name { font-size: 19px; line-height: 1; font-weight: 400; letter-spacing: -0.01em; color: var(--text); }
.hand-img { position: relative; z-index: 1; display: block; width: 100%; height: auto; }
.hand-screen { position: absolute; z-index: 0; overflow: hidden; background: var(--gray-2); }
.hand-screen.is-quad { left: 0; top: 0; transform-origin: 0 0; }   /* size and matrix3d set by main.js */
.hslide {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  opacity: 0; transform: translate3d(0, 3%, 0);
  transition: opacity .6s ease-out, transform .6s ease-out;
}
.hslide.is-on { opacity: 1; transform: none; z-index: 2; }
.hslide.is-off { opacity: 0; transform: translate3d(0, -2%, 0); z-index: 1; }
.hbar { flex: none; height: var(--hbar, 5.8%); background: var(--gray-2); }
.hslide img { flex: 1; min-height: 0; width: 100%; object-fit: cover; object-position: top center; }

/* ---------- sections ---------- */
.section { padding-block: 128px; }
.split { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 48px; align-items: start; }
.split-gap { margin-top: 64px; }

/* ---------- index lists: work history, what I've built ---------- */
#experience .h2, #projects .h2 { margin-bottom: 48px; }
.split .h2 { font-size: clamp(32px, 3.4vw, 44px); }
.ix { border-bottom: 1px solid var(--hairline); }
.ix-row { border-top: 1px solid var(--hairline); }
.ix-head {
  display: grid; align-items: baseline; gap: 24px;
  width: 100%; min-height: 72px; padding: 20px 4px;
  border: 0; background: none; color: inherit; font: inherit; text-align: left;
  cursor: pointer;
}
.ix-work .ix-head  { grid-template-columns: 112px minmax(0, 1.1fr) minmax(0, 1fr) 20px; }
.ix-built .ix-head { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) 96px 20px; }
.ix-name {
  font-family: var(--serif); font-optical-sizing: auto; font-variation-settings: "SOFT" 0, "WONK" 0;
  font-size: clamp(24px, 2.4vw, 32px); line-height: 1.1; font-weight: var(--display-wght); letter-spacing: -0.02em;
}
.ix-tag { font-size: 15px; line-height: 22px; color: var(--text-2); }
.ix-years { font: 400 13px/20px var(--mono); letter-spacing: 0.02em; color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ix-built .ix-years { text-align: right; }
.ix-arrow { align-self: center; justify-self: end; color: var(--text-2); transition: color .15s ease-out; }
.ix-arrow .icon { width: 18px; height: 18px; }
.ix-row:hover .ix-arrow, .ix-row.is-open .ix-arrow { color: var(--accent); }
.ix-arrow > span { display: block; transition: transform .2s ease-out; }
.ix-row.has-url .ix-chev { display: none; }           /* laptops: rows with a link show the arrow */
.ix-row.has-url:hover .ix-go { transform: translate(2px, -2px); }
.ix-row.is-open .ix-chev { transform: rotate(180deg); }
.ix-head:focus-visible { border-radius: 4px; }
/* opening: grid rows 0fr -> 1fr, so only the rows below move */
.ix-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .22s ease-out; }
.ix-row.is-open .ix-body { grid-template-rows: 1fr; }
.ix-inner { min-height: 0; overflow: hidden; display: flex; gap: 24px; align-items: flex-start; }
.ix-text { flex: 1; min-width: 0; padding: 0 4px 24px; }
.ix-work .ix-text { padding-left: calc(112px + 24px + 4px); }
.ix-summary { max-width: 640px; font-size: 16px; line-height: 24px; color: var(--text); text-wrap: pretty; }
.ix-bullets { margin-top: 12px; display: grid; gap: 6px; max-width: 720px; }
.ix-bullets li { position: relative; padding-left: 16px; line-height: 22px; color: var(--text-2); }
.ix-bullets li::before { content: ""; position: absolute; left: 2px; top: 9px; width: 4px; height: 4px; border-radius: 50%; background: var(--gray-8); }
.ix-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.ix-open { display: none; }                      /* phones only: see the touch rules */
.ix-thumb { display: none; }
.ix-note { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; font-size: 13px; color: var(--text-2); }
.control-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.ix-more { margin-top: 32px; }
.ix-more-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 15px; font-weight: 500; color: var(--text);
  border-bottom: 1px solid var(--border); padding-bottom: 2px;
  transition: border-color .15s ease-out, color .15s ease-out;
}
.ix-more-link:hover { color: var(--accent); border-color: var(--accent); }
.ix-more-link .icon { width: 14px; height: 14px; }

/* hover preview (laptops only) */
.ix-preview {
  position: fixed; left: 0; top: 0; z-index: 40;
  width: 320px; border-radius: 12px; overflow: hidden;
  background: var(--gray-2);
  box-shadow: 0 0 0 1px rgba(var(--shadow-tint), 0.1), 0 2px 4px rgba(var(--shadow-tint), 0.12), 0 18px 40px -12px rgba(var(--shadow-tint), 0.4);
  pointer-events: none; opacity: 0; transition: opacity .15s ease-out;
}
.ix-preview.is-on { opacity: 1; }
.ix-preview img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.ix-preview-wide { aspect-ratio: 16 / 10; }
.ix-preview-tall { width: 240px; aspect-ratio: 3 / 4; }
.ix-preview-type {
  padding: 24px; background: #1D1B18; color: #EDE8DF;
  display: flex; flex-direction: column; justify-content: flex-end; aspect-ratio: 16 / 10;
}
.ix-preview-type .eyebrow { color: #E8894A; margin-bottom: 10px; }
.ix-preview-name { font-family: var(--serif); font-size: 30px; line-height: 1.05; font-weight: var(--display-wght); letter-spacing: -0.02em; }
.ix-preview-line { margin-top: 8px; font-size: 14px; line-height: 20px; color: #ABA497; }

/* touch: no hover. A tap opens the row; the main link is an explicit
   "Open" control and the screenshot shows inline as a thumbnail. */
@media (hover: none), (pointer: coarse) {
  .ix-head { min-height: 44px; }
  .ix-open { display: inline-flex; }
  .ix-dup { display: none; }
  .ix-row.has-url .ix-go { display: none; }            /* a tap opens the row, so show the chevron */
  .ix-row.has-url .ix-chev { display: block; }
  .ix-thumb { display: block; flex: none; margin: 0 4px 24px 0; border-radius: 8px; box-shadow: 0 0 0 1px var(--hairline); object-fit: cover; object-position: top center; }
  .ix-thumb-wide { width: 136px; aspect-ratio: 16 / 10; }
  .ix-thumb-tall { width: 96px; aspect-ratio: 3 / 4; }
  .ix-preview { display: none; }
}

/* ---------- rows (projects, education, certification, skills) ---------- */
.row {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 24px;
  padding: 16px 0; border-top: 1px solid var(--hairline);
}
.rows > .row:last-child { border-bottom: 1px solid var(--hairline); }
.row-main { min-width: 0; }
.row-title { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; font-size: 22px; line-height: 28px; font-weight: 400; letter-spacing: -0.015em; }
.row-meta, .row-years, .row-label { font-family: var(--sans); letter-spacing: 0; }
.row-icon { flex-wrap: nowrap; align-items: flex-start; gap: 8px; }
.row-icon .icon { color: var(--text-2); margin-top: 3px; }
.row-meta { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 400; color: var(--text-2); }
.row-meta .icon { width: 14px; height: 14px; }
.row-text { margin-top: 4px; color: var(--text-2); max-width: 620px; }
.row-strong { color: var(--text); font-weight: 500; }
.row-years { font-size: 13px; color: var(--text-2); white-space: nowrap; padding-top: 1px; }
.row-label { flex: none; width: 140px; font-weight: 500; color: var(--text-2); padding-top: 2px; }
.skill-row { justify-content: flex-start; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { height: 24px; padding: 0 8px; display: inline-flex; align-items: center; border-radius: 4px; background: var(--gray-3); font-size: 13px; }
.row .control { flex: none; }

/* ---------- footer ---------- */
.footer { padding: 128px 0 32px; }
.footer-heading { font-size: clamp(44px, 6.4vw, 96px); line-height: 1; font-weight: var(--display-wght); letter-spacing: -0.035em; }
.footer-base {
  display: flex; justify-content: space-between; gap: 16px;
  margin-top: 96px; padding-top: 16px; border-top: 1px solid var(--hairline);
  font-size: 13px; color: var(--text-2);
}

/* ======================================================================
   Responsive
   ====================================================================== */
@media (max-width: 1124px) {
  .hw { --gap: 10px; --phone-k: 1.17; }
}

@media (max-width: 900px) {
  .split { grid-template-columns: minmax(0, 1fr); gap: 20px; }
}

@media (max-width: 768px) {
  .hw { --gap: 8px; --phone-k: 1.33; }
  .nav { gap: 16px; }
  .nav-links { display: none; }
  .hero { min-height: 0; padding: 128px 0 80px; }
  .nav { left: 8px; right: 8px; padding-left: 16px; }
  .section { padding-block: 96px; }
  .footer { padding-top: 96px; }


  /* index lists stack: years over name on work rows, tag under name */
  .ix-head { gap: 4px 16px; padding: 16px 4px; }
  .ix-work .ix-head { grid-template-columns: minmax(0, 1fr) 20px; }
  .ix-work .ix-years { grid-column: 1; grid-row: 1; }
  .ix-work .ix-name { grid-column: 1; grid-row: 2; }
  .ix-work .ix-tag { grid-column: 1; grid-row: 3; }
  .ix-work .ix-arrow { grid-column: 2; grid-row: 1 / 4; }
  .ix-built .ix-head { grid-template-columns: minmax(0, 1fr) auto 20px; }
  .ix-built .ix-name { grid-column: 1; grid-row: 1; }
  .ix-built .ix-years { grid-column: 2; grid-row: 1; }
  .ix-built .ix-tag { grid-column: 1 / 3; grid-row: 2; }
  .ix-built .ix-arrow { grid-column: 3; grid-row: 1 / 3; }
  .ix-work .ix-text { padding-left: 4px; }
  .ix-inner { gap: 16px; }
}

@media (max-width: 600px) {
  .hw { --phone-k: 1.52; }
  .wall { width: calc(100% - 16px); grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .card:nth-child(4n+3) { grid-column: auto; }
  .card:nth-child(2n) { grid-column: 3; }
  .wall-ch > .card { grid-column: var(--c3); }
  .hw { --cap-h: 56px; }
  .ch-head { display: block; margin-top: 64px; padding: 32px 4px 20px; }
  .ch-head:first-child { padding-top: 0; }
  .ch-text { margin-top: 10px; font-size: 14px; line-height: 20px; }
  .hand-cap { height: 36px; padding: 0 14px; gap: 8px; }
  .hand-cap-name { font-size: 17px; }
  .card-link-go { width: 32px; height: 32px; }
  .wall .card-link .eyebrow { display: none; }   /* too narrow; the chapter title names it */
  .card-label { font-size: 14px; line-height: 20px; }
  .row { flex-wrap: wrap; gap: 12px; }
  .row-years { order: -1; width: 100%; padding-top: 0; margin-bottom: -8px; }
  .skill-row { flex-direction: column; gap: 8px; }
  .row-label { width: auto; padding-top: 0; }
  .footer-base { flex-direction: column; gap: 4px; }
}

@media (max-width: 465px) {
  .hw { --gap: 6px; }
}

/* ---------- reduced motion: no marquee, no slideshow ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0s !important; }
}
