/*
 * Portfolio, "Warm Night".
 * Borrows the structure, type and motion language of the Superbullet front end
 * (Night Build: a solid panel, a 1px inner edge, a hard drop underneath, buttons
 * you press into their drop, IntersectionObserver reveals, one accent) and
 * recolours it: warm charcoal ground, ivory text, a single camel accent.
 *
 * Shape lock: buttons 12px, cards 18px, media windows 12px, chips 8px.
 * Accent lock: camel (#c9a27a) is the only accent. It is a fill, an edge or a
 * number, never long body text.
 * z-index scale: ground -1, nav 50, skip link 100.
 */

:root {
  --void: #100e0c;
  --night: #161310;
  --surface: #1c1814;
  --raised: #25201a;
  --ink: #f3ede2;
  --text-2: #c4baa8;
  --text-3: #9a8f7d;
  --camel: #c9a27a;
  --camel-hi: #e2c7a3;
  --camel-lo: #a8835c;
  --sand: #dfc8a4;
  --on-camel: #17120d;
  --drop: #070605;
  --line: rgba(243, 237, 226, 0.08);
  --line-2: rgba(243, 237, 226, 0.14);
  --line-camel: rgba(201, 162, 122, 0.45);
  --eout: cubic-bezier(0.16, 1, 0.3, 1);

  --r-btn: 12px;
  --r-card: 18px;
  --r-media: 12px;
  --r-chip: 8px;

  --f-display: "Archivo", "Inter", system-ui, sans-serif;
  --f-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;

  --block-shadow: inset 0 0 0 1px var(--line), inset 0 1px 0 rgba(255, 244, 222, 0.05), 0 6px 0 var(--drop), 0 18px 36px rgba(0, 0, 0, 0.32);
  --lit-shadow: inset 0 0 0 1.5px rgba(201, 162, 122, 0.5), inset 0 1px 0 rgba(236, 210, 170, 0.28), 0 6px 0 var(--drop), 0 0 44px rgba(201, 162, 122, 0.07), 0 18px 36px rgba(0, 0, 0, 0.32);
  --lit-bg: radial-gradient(120% 140% at 0% 0%, rgba(226, 199, 163, 0.14), transparent 52%), radial-gradient(90% 120% at 100% 100%, rgba(201, 162, 122, 0.07), transparent 60%), linear-gradient(180deg, #241f19 0%, #1a1611 100%);
  --block-bg: linear-gradient(180deg, rgba(222, 201, 166, 0.035), rgba(222, 201, 166, 0.01)), #1a1612;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--void);
  color: var(--ink);
  font: 400 17px/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
::selection { background: var(--camel); color: var(--on-camel); }
:focus-visible { outline: 2px solid var(--camel); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* the still ground: a warm glow at the top, a vignette at the edges */
.ground {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 70% 50% at 30% 0%, rgba(201, 162, 122, 0.10) 0%, rgba(201, 162, 122, 0) 62%),
    radial-gradient(ellipse 80% 70% at 50% 35%, #1d1914 0%, #14110e 50%, #0c0a09 100%);
}

.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--camel); color: var(--on-camel); padding: 10px 14px; border-radius: var(--r-btn); font-weight: 600; }
.skip:focus { left: 12px; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ---------------------------------------------------------------- type */
h1, h2, h3 { font-family: var(--f-display); margin: 0; color: var(--ink); }
h1 {
  font-weight: 800;
  font-stretch: 104%;
  font-variation-settings: "wdth" 104;
  font-size: clamp(2.15rem, 4.3vw, 3.9rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  max-width: 25ch;
  text-wrap: balance;
}
.h1-soft { color: var(--text-3); }
h2 {
  font-weight: 800;
  font-stretch: 106%;
  font-variation-settings: "wdth" 106;
  font-size: clamp(2rem, 3.4vw, 3.25rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
}
h3 { font-weight: 700; font-size: clamp(1.2rem, 1.5vw, 1.45rem); line-height: 1.25; letter-spacing: -0.015em; }
.eyebrow {
  margin: 0 0 22px;
  font: 500 13px/1.4 var(--f-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--camel);
}
.lead { font-size: clamp(1.0625rem, 1.3vw, 1.25rem); line-height: 1.6; color: var(--text-2); max-width: 36em; margin: 0; }
.sub { color: var(--text-2); max-width: 44em; margin: 14px 0 0; font-size: 1.0625rem; }

/* ---------------------------------------------------------------- nav */
.nav-wrap { position: sticky; top: 0; z-index: 50; padding: 12px 16px 0; }
.nav {
  position: relative;
  max-width: 1200px; margin: 0 auto;
  height: 64px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 10px 0 12px;
  border-radius: 16px;
  background: rgba(22, 19, 16, 0.86);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  box-shadow: inset 0 0 0 1px rgba(201, 162, 122, 0.22), inset 0 1px 0 rgba(255, 244, 222, 0.05), 0 6px 0 var(--drop), 0 18px 40px rgba(0, 0, 0, 0.4);
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.brand-mark {
  display: grid; place-items: center; flex: none;
  height: 38px; padding: 0 9px; border-radius: 10px;
  background: linear-gradient(180deg, var(--camel-hi), var(--camel) 55%, var(--camel-lo));
  color: var(--on-camel);
  font: 800 13px/1 var(--f-display); letter-spacing: 0.06em;
  box-shadow: inset 0 0 0 2px var(--night), 0 3px 0 var(--drop);
}
.brand-name { font: 700 15.5px/1.2 var(--f-display); letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#menu { display: flex; align-items: center; gap: 4px; }
#menu a {
  color: var(--text-2); text-decoration: none; font-size: 15px; font-weight: 500;
  padding: 9px 13px; border-radius: 10px;
  transition: color 0.2s ease, background 0.2s ease;
}
#menu a:hover { color: var(--ink); background: rgba(243, 237, 226, 0.06); }
#menu .nav-cta {
  margin-left: 6px; color: var(--on-camel); font-weight: 600;
  background: linear-gradient(180deg, var(--camel-hi), var(--camel) 50%, var(--camel-lo));
  box-shadow: inset 0 0 0 2px var(--night), 0 3px 0 var(--drop);
  transition: transform 0.12s var(--eout), box-shadow 0.12s var(--eout);
}
#menu .nav-cta:hover { background: linear-gradient(180deg, #ead3b4, var(--camel-hi) 50%, var(--camel)); color: var(--on-camel); transform: translateY(-1px); }
#menu .nav-cta:active { transform: translateY(3px); box-shadow: inset 0 0 0 2px var(--night), 0 0 0 var(--drop); }
.menu-btn {
  display: none; align-items: center; gap: 8px;
  height: 42px; padding: 0 14px; border: 0; border-radius: var(--r-btn);
  font: 600 15px/1 var(--f-body); color: var(--ink); cursor: pointer;
  background: var(--raised);
  box-shadow: inset 0 0 0 1px var(--line-2), 0 3px 0 var(--drop);
}
.menu-btn i { font-size: 19px; }
.menu-btn:active { transform: translateY(2px); box-shadow: inset 0 0 0 1px var(--line-2); }

/* ---------------------------------------------------------------- buttons
   Blocks you press: the drop shrinks and the block sinks into it. */
.btns { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 54px; padding: 0 22px; border-radius: var(--r-btn);
  font: 700 16px/1 var(--f-display); letter-spacing: -0.005em;
  text-decoration: none; white-space: nowrap;
  transition: transform 0.12s var(--eout), box-shadow 0.12s var(--eout), background 0.15s ease;
}
.btn i { font-size: 19px; }
.btn-primary {
  color: var(--on-camel);
  background: linear-gradient(180deg, var(--camel-hi) 0%, var(--camel) 48%, var(--camel-lo) 100%);
  box-shadow: inset 0 0 0 2px var(--night), 0 5px 0 var(--drop), 0 14px 28px rgba(0, 0, 0, 0.4);
}
.btn-primary::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 45%;
  background: linear-gradient(105deg, transparent, rgba(255, 246, 228, 0.45), transparent);
  transform: translateX(-160%) skewX(-18deg); pointer-events: none;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: inset 0 0 0 2px var(--night), 0 6px 0 var(--drop), 0 16px 30px rgba(0, 0, 0, 0.45); }
.btn-primary:hover::after { animation: shine 0.85s var(--eout); }
.btn-primary:active { transform: translateY(4px); box-shadow: inset 0 0 0 2px var(--night), 0 1px 0 var(--drop), 0 6px 12px rgba(0, 0, 0, 0.4); }
.btn-dark {
  color: var(--ink);
  background: var(--raised);
  box-shadow: inset 0 0 0 1px var(--line-2), 0 5px 0 var(--drop);
}
.btn-dark:hover { transform: translateY(-1px); background: #2c2620; box-shadow: inset 0 0 0 1px var(--line-camel), 0 6px 0 var(--drop); }
.btn-dark:active { transform: translateY(4px); box-shadow: inset 0 0 0 1px var(--line-camel), 0 1px 0 var(--drop); }
@keyframes shine { to { transform: translateX(330%) skewX(-18deg); } }

/* ---------------------------------------------------------------- hero */
.hero { padding: clamp(48px, 7vw, 88px) 0 clamp(56px, 7vw, 96px); scroll-margin-top: 90px; }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px;
  align-items: start; margin-top: 40px;
}
.hero-copy { padding-top: 4px; }
.stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.stat {
  display: flex; flex-direction: column; justify-content: space-between; gap: 10px;
  min-height: 132px; padding: 20px 22px;
  border-radius: var(--r-card);
  background: var(--block-bg);
  box-shadow: var(--block-shadow);
}
.stat strong {
  font: 800 clamp(2.3rem, 3.6vw, 3.4rem)/1 var(--f-display);
  font-stretch: 110%; font-variation-settings: "wdth" 110;
  letter-spacing: -0.03em; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.stat span { color: var(--text-2); font-size: 15px; line-height: 1.4; }
.stat-lit { background: var(--lit-bg); box-shadow: var(--lit-shadow); }
.stat-lit strong { color: var(--sand); }
.note { display: flex; gap: 8px; align-items: flex-start; margin: 22px 0 0; color: var(--text-3); font-size: 14.5px; line-height: 1.5; }
.note i { color: var(--camel); font-size: 17px; margin-top: 1px; flex: none; }

/* ---------------------------------------------------------------- sections */
.section { padding: clamp(64px, 9vw, 120px) 0; scroll-margin-top: 80px; position: relative; }
.section::before {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: min(1152px, calc(100% - 48px)); height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-2) 20%, var(--line-2) 80%, transparent);
}
.section-head { margin-bottom: 44px; }

/* ---------------------------------------------------------------- work bento */
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px; }
.tile {
  position: relative; display: flex; flex-direction: column;
  border-radius: var(--r-card); padding: 8px;
  background: var(--block-bg); box-shadow: var(--block-shadow);
  transition: transform 0.25s var(--eout), box-shadow 0.25s var(--eout);
}
.tile:hover, .tile:focus-within {
  transform: translateY(-4px);
  box-shadow: inset 0 0 0 1px var(--line-camel), inset 0 1px 0 rgba(255, 244, 222, 0.05), 0 10px 0 var(--drop), 0 26px 44px rgba(0, 0, 0, 0.42);
}
.tile-media {
  position: relative; overflow: hidden; border-radius: var(--r-media);
  aspect-ratio: 16 / 9; background: #0b0a08;
  box-shadow: inset 0 0 0 1px var(--line);
}
.tile-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--eout); }
.tile:hover .tile-media img { transform: scale(1.04); }
.tile-body { display: flex; flex-direction: column; gap: 8px; padding: 16px 14px 14px; flex: 1; }
.tile-meta { margin: 0; font: 500 12.5px/1.4 var(--f-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.tile-views { margin: 0; color: var(--text-2); font: 500 15px/1.2 var(--f-mono); }
.tile-views b { font: 800 1.9rem/1 var(--f-display); font-stretch: 110%; font-variation-settings: "wdth" 110; letter-spacing: -0.02em; color: var(--sand); margin-right: 4px; font-variant-numeric: tabular-nums; }
.tile h3 { margin-top: 2px; }
.tile-desc { margin: 0; color: var(--text-2); font-size: 15.5px; line-height: 1.55; }
.tile-link {
  margin-top: auto; padding-top: 10px;
  display: inline-flex; align-items: center; gap: 6px; align-self: flex-start;
  color: var(--camel); font-weight: 600; font-size: 15.5px; text-decoration: none;
}
.tile-link i { transition: transform 0.25s var(--eout); }
.tile:hover .tile-link i { transform: translate(2px, -2px); }
/* the whole tile is the link target; the visible link text stays the label */
.tile-link::after { content: ""; position: absolute; inset: 0; border-radius: var(--r-card); }
.tile-link:focus-visible { outline: none; }
.tile:focus-within { outline: 2px solid var(--camel); outline-offset: 3px; }

.tile-feature { grid-column: span 8; }
.tile-feature h3 { font-size: clamp(1.35rem, 2vw, 1.85rem); }
.tile-short { grid-column: span 4; }
.tile-short .tile-media { aspect-ratio: auto; flex: 1; min-height: 300px; }
.tile-short .short-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(22px) saturate(1.1) brightness(0.55); transform: scale(1.3); }
.tile:hover .tile-media .short-backdrop { transform: scale(1.3); }
.tile-short .short-frame {
  position: absolute; top: 50%; left: 50%; height: calc(100% - 32px); width: auto;
  aspect-ratio: 9 / 16; object-fit: cover; transform: translate(-50%, -50%);
  border-radius: 10px; box-shadow: 0 0 0 1px rgba(243, 237, 226, 0.12), 0 18px 36px rgba(0, 0, 0, 0.5);
}
.tile:hover .tile-media .short-frame { transform: translate(-50%, -50%) scale(1.03); }
.tile-short .tile-body { flex: none; }
.tile-half { grid-column: span 6; }
.tile-x { grid-column: span 7; flex-direction: row; }
.tile-x .tile-media { aspect-ratio: auto; width: 44%; flex: none; min-height: 300px; }
.tile-x .tile-media img { object-position: center top; }
.tile-x .tile-body { padding: 18px 18px 14px 22px; }
.tile-type { grid-column: span 5; background: var(--lit-bg); box-shadow: var(--lit-shadow); }
.tile-type .tile-body { padding: 26px 22px 16px; justify-content: flex-start; }
.tile-views-xl b { font-size: clamp(2.8rem, 4.4vw, 4rem); display: block; margin: 10px 0 6px; }
.tile-type h3 { font-size: clamp(1.3rem, 1.8vw, 1.6rem); }

.channel { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 36px 0 0; color: var(--text-2); }
.channel i { color: var(--camel); font-size: 22px; }
.channel a { color: var(--ink); font-weight: 600; text-decoration-color: var(--line-camel); text-underline-offset: 4px; }
.channel a:hover { text-decoration-color: var(--camel); }
.channel-subs { font: 500 14px/1 var(--f-mono); color: var(--text-3); padding: 7px 10px; border-radius: var(--r-chip); box-shadow: inset 0 0 0 1px var(--line-2); }

/* ---------------------------------------------------------------- case studies */
.case { padding: 40px 0 8px; }
.case + .case { margin-top: 40px; border-top: 1px solid var(--line); }
.case-title { font-size: clamp(1.5rem, 2.4vw, 2.1rem); font-weight: 800; letter-spacing: -0.025em; max-width: 26ch; margin-bottom: 28px; }
.case-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 40px; align-items: start; }
.case-grid-stack { grid-template-columns: minmax(0, 1fr); gap: 36px; }
.case-fields { margin: 0; display: grid; gap: 22px; }
.case-fields-wide { max-width: 64em; }
.field { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 20px; }
.field dt { font: 500 12.5px/1.9 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--camel); }
.field dd { margin: 0; color: var(--text-2); font-size: 16.5px; line-height: 1.65; }

.figures {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0;
  border-radius: var(--r-card); padding: 6px 22px;
  background: var(--block-bg); box-shadow: var(--block-shadow);
}
.figures-lit { background: var(--lit-bg); box-shadow: var(--lit-shadow); }
.figure-row { display: flex; flex-direction: column; gap: 6px; padding: 18px 0; }
.figure-row + .figure-row { border-top: 0; }
.figure-wide { grid-column: 1 / -1; border-bottom: 1px solid var(--line); }
.figure-row b {
  display: inline-flex; align-items: center; gap: 10px;
  font: 800 clamp(1.9rem, 2.8vw, 2.6rem)/1 var(--f-display); font-stretch: 110%; font-variation-settings: "wdth" 110;
  letter-spacing: -0.03em; color: var(--sand); font-variant-numeric: tabular-nums;
}
.figure-row b i { font-size: 0.7em; color: var(--camel); }
.figure-row span { color: var(--text-2); font-size: 14.5px; line-height: 1.45; }
.figure-note { grid-column: 1 / -1; margin: 0; padding: 12px 0 16px; border-top: 1px solid var(--line); color: var(--text-3); font-size: 13.5px; }

/* pipeline: a row of blocks with a dashed return loop underneath */
.pipeline { margin: 0; }
.pipeline-cap { font: 500 13px/1.5 var(--f-mono); letter-spacing: 0.04em; color: var(--text-3); margin-bottom: 18px; }
.pipe { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 14px; }
.pipe-step {
  position: relative;
  display: flex; flex-direction: column; gap: 6px;
  padding: 16px 14px 18px; border-radius: 14px;
  background: var(--block-bg); box-shadow: var(--block-shadow);
}
.pipe-step:not(:last-child)::after {
  content: ""; position: absolute; top: 34px; right: -14px; width: 14px; height: 2px;
  background: var(--line-camel);
}
.pipe-step b { font: 700 16px/1.25 var(--f-display); color: var(--ink); margin-top: 6px; }
.pipe-step > span:last-child { color: var(--text-2); font-size: 14px; line-height: 1.45; }
.pipe-icon {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px;
  background: var(--raised); color: var(--camel); font-size: 20px;
  box-shadow: inset 0 0 0 1px var(--line-2), 0 3px 0 var(--drop);
}
.pipe-key { background: var(--lit-bg); box-shadow: var(--lit-shadow); }
.pipe-key .pipe-icon { background: linear-gradient(180deg, var(--camel-hi), var(--camel) 55%, var(--camel-lo)); color: var(--on-camel); box-shadow: inset 0 0 0 2px var(--night), 0 3px 0 var(--drop); }
.pipe-loop { position: relative; margin: 6px 0 0; padding: 0 calc(100% / 14 - 7px); }
.pipe-loop-line { display: block; width: 100%; height: 40px; color: var(--camel); opacity: 0.6; }
.pipe-loop p { margin: 10px 0 0; text-align: center; color: var(--text-2); font-size: 15px; }
.pipe-loop p i { color: var(--camel); font-size: 18px; vertical-align: -3px; margin-right: 4px; }
.pipe-loop p b { color: var(--sand); font-weight: 600; }

/* ---------------------------------------------------------------- about */
.about-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; align-items: start; }
.about-copy h2 { margin-bottom: 26px; }
.about-copy p { color: var(--text-2); margin: 0 0 18px; max-width: 38em; font-size: 17px; }
.about-copy .about-lead { color: var(--ink); font-size: clamp(1.15rem, 1.5vw, 1.35rem); line-height: 1.55; }
.snapshot { border-radius: var(--r-card); padding: 10px 24px 24px; background: var(--block-bg); box-shadow: var(--block-shadow); margin-top: 8px; }
.snapshot dl { margin: 0; }
.snapshot dl > div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.snapshot dt { font: 500 12px/1.9 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
.snapshot dd { margin: 0; color: var(--ink); font-size: 15.5px; line-height: 1.5; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 20px 0 0; }
.tags li { padding: 7px 11px; border-radius: var(--r-chip); background: var(--raised); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--text-2); font-size: 14px; }

/* ---------------------------------------------------------------- resume */
.resume-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: center; }
.downloads { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.dl {
  position: relative; display: flex; align-items: center; gap: 16px;
  min-height: 104px; padding: 20px; border-radius: var(--r-card);
  text-decoration: none; color: var(--ink);
  background: var(--block-bg); box-shadow: var(--block-shadow);
  transition: transform 0.15s var(--eout), box-shadow 0.15s var(--eout);
}
.dl:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 1px var(--line-camel), 0 9px 0 var(--drop), 0 24px 40px rgba(0, 0, 0, 0.4); }
.dl:active { transform: translateY(5px); box-shadow: inset 0 0 0 1px var(--line-camel), 0 1px 0 var(--drop); }
.dl-lit { background: var(--lit-bg); box-shadow: var(--lit-shadow); }
.dl-icon {
  display: grid; place-items: center; flex: none; width: 50px; height: 50px; border-radius: 12px;
  background: var(--raised); color: var(--camel); font-size: 26px;
  box-shadow: inset 0 0 0 1px var(--line-2), 0 3px 0 var(--drop);
}
.dl-lit .dl-icon { background: linear-gradient(180deg, var(--camel-hi), var(--camel) 55%, var(--camel-lo)); color: var(--on-camel); box-shadow: inset 0 0 0 2px var(--night), 0 3px 0 var(--drop); }
.dl-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.dl-text b { font: 700 18px/1.2 var(--f-display); }
.dl-text span { font: 500 13px/1.3 var(--f-mono); color: var(--text-3); letter-spacing: 0.03em; }
.dl-arrow { margin-left: auto; font-size: 22px; color: var(--camel); transition: transform 0.3s var(--eout); }
.dl:hover .dl-arrow { animation: drop-in 0.7s var(--eout); }
@keyframes drop-in { 0% { transform: translateY(0); opacity: 1; } 40% { transform: translateY(7px); opacity: 0; } 41% { transform: translateY(-8px); opacity: 0; } 100% { transform: translateY(0); opacity: 1; } }

/* ---------------------------------------------------------------- contact */
.contact {
  border-radius: 24px; padding: clamp(32px, 5vw, 64px);
  background: var(--lit-bg); box-shadow: var(--lit-shadow);
}
.contact-email {
  display: inline-flex; align-items: center; gap: 14px; margin-top: 30px; max-width: 100%;
  font: 800 clamp(1.25rem, 3.4vw, 2.75rem)/1.15 var(--f-display); letter-spacing: -0.025em;
  color: var(--ink); text-decoration: none;
}
.contact-email span { overflow-wrap: anywhere; background: linear-gradient(var(--camel), var(--camel)) 0 100% / 0% 2px no-repeat; transition: background-size 0.5s var(--eout); padding-bottom: 4px; }
.contact-email:hover span, .contact-email:focus-visible span { background-size: 100% 2px; }
.contact-email i { color: var(--camel); font-size: 0.85em; flex: none; }

/* ---------------------------------------------------------------- footer */
.footer { padding: 28px 0 40px; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; color: var(--text-3); font-size: 14px; border-top: 1px solid var(--line); padding-top: 24px; }
.footer p { margin: 0; }
.footer a { color: var(--text-2); text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.footer a:hover { color: var(--ink); }

/* ---------------------------------------------------------------- motion
   Hero blocks fade up once on load; everything else reveals through an
   IntersectionObserver (no scroll listener). Only transform and opacity move. */
@media (prefers-reduced-motion: no-preference) {
  .js .load { animation: fade-up 0.8s var(--eout) both; animation-delay: var(--d, 0ms); }
  .js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--eout), transform 0.7s var(--eout); transition-delay: var(--d, 0ms); }
  .js .reveal.is-in { opacity: 1; transform: none; }
  .js .tile.reveal.is-in { transition: opacity 0.7s var(--eout) var(--d, 0ms), transform 0.25s var(--eout), box-shadow 0.25s var(--eout); }
  .js .pipe-loop.reveal .pipe-loop-line { clip-path: inset(0 0 0 100%); transition: clip-path 1.1s var(--eout) 0.75s; }
  .js .pipe-loop.reveal.is-in .pipe-loop-line { clip-path: inset(0 0 0 0); }
}
@keyframes fade-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; margin-top: 28px; }
  .pipe { grid-template-columns: minmax(0, 1fr); gap: 10px; max-width: 560px; }
  .pipe-step { display: grid; grid-template-columns: 38px minmax(0, 1fr); column-gap: 14px; row-gap: 2px; padding: 14px 16px; }
  .pipe-step .pipe-icon { grid-row: span 2; }
  .pipe-step b { margin-top: 0; }
  .pipe-step:not(:last-child)::after { top: auto; bottom: -10px; right: auto; left: 34px; width: 2px; height: 10px; }
  .pipe-loop { padding: 0; max-width: 560px; }
  .pipe-loop-line { display: none; }
  .pipe-loop p { text-align: left; padding: 14px 16px; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--line-camel); border: 0; }
}
@media (max-width: 960px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .tile-feature, .tile-x, .tile-type { grid-column: 1 / -1; }
  .tile-short, .tile-half { grid-column: span 1; }
  .tile-short { grid-row: span 1; }
  .case-grid, .about-grid, .resume-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
}
@media (max-width: 760px) {
  .menu-btn { display: inline-flex; }
  #menu {
    display: none;
    position: absolute; top: calc(100% + 10px); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 10px; border-radius: 16px;
    background: #1a1612;
    box-shadow: inset 0 0 0 1px rgba(201, 162, 122, 0.22), 0 6px 0 var(--drop), 0 24px 48px rgba(0, 0, 0, 0.55);
  }
  #menu.open { display: flex; animation: menu-in 0.22s var(--eout); }
  #menu a { padding: 14px 14px; font-size: 17px; }
  #menu .nav-cta { margin: 8px 0 2px; text-align: center; }
  @keyframes menu-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
}
@media (max-width: 640px) {
  body { font-size: 16.5px; }
  .wrap { padding: 0 16px; }
  .nav-wrap { padding: 8px 8px 0; }
  .nav { height: 60px; }
  .brand { gap: 10px; }
  .brand-name { font-size: 14px; }
  .brand-mark { height: 34px; font-size: 12px; padding: 0 7px; }
  .menu-btn { height: 40px; padding: 0 12px; font-size: 14.5px; gap: 6px; }
  .menu-btn i { font-size: 18px; }
  .bento { grid-template-columns: minmax(0, 1fr); }
  .tile-short, .tile-half { grid-column: 1 / -1; }
  .tile-short .tile-media { flex: none; height: 360px; min-height: 0; }
  .tile-x { flex-direction: column; }
  .tile-x .tile-media { width: 100%; min-height: 0; aspect-ratio: 392 / 412; }
  .tile-x .tile-body { padding: 16px 14px 14px; }
  .stats { gap: 12px; }
  .stat { min-height: 118px; padding: 16px; }
  .stat strong { font-size: 2.1rem; }
  .stat span { font-size: 14px; }
  .btns { gap: 12px; }
  .btn { flex: 1 1 auto; }
  .field { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .figures { padding: 4px 18px; }
  .downloads { grid-template-columns: minmax(0, 1fr); }
  .section-head { margin-bottom: 32px; }
  .case { padding-top: 32px; }
  .contact { border-radius: var(--r-card); }
  .contact-email { gap: 10px; }
  .section::before { width: calc(100% - 32px); }
}
