/* Shared by the two landing pages: index.html (developer) and video.html (AI video creator). */
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/montserrat-600.woff2") format("woff2");
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/montserrat-700.woff2") format("woff2");
}

/* ---------- tokens ----------
   Dark is the designed-first theme. Orange comes in three strengths because
   one value can't do all three jobs: --accent for marks and borders,
   --accent-text for orange text on the page background (passes 4.5:1 in
   both themes), --accent-fill for filled buttons that carry white text
   (#cf3e0b is the lightest orange that still clears 4.5:1 under white). */
:root,
html[data-theme="dark"] {
  --bg: #0e0d0c;
  --surface: #181716;
  --surface-2: #22201e;
  --text: #f5f1ea;
  --text-dim: #a8a297;
  --border: #2b2926;
  --accent: #ff5b1f;
  --accent-text: #ff7a45;
  --accent-fill: #cf3e0b;
  --accent-soft: rgba(255, 91, 31, 0.14);
  --code-bg: #121212;
  --code-text: #e8e2d4;
  --shadow: 0 1px 2px rgba(0,0,0,0.3), 0 14px 36px rgba(0,0,0,0.35);
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --display: "Montserrat", var(--sans);
  --nav-h: 76px;
  --card-r: 24px;
  --hero-r: 44px;
}
html[data-theme="light"] {
  --bg: #f4f1ec;
  --surface: #ffffff;
  --surface-2: #ece7df;
  --text: #161412;
  --text-dim: #5d584f;
  --border: #e2dbd0;
  --accent: #e8501a;
  --accent-text: #b63c0e;
  --accent-soft: #fbe2d5;
  --shadow: 0 1px 2px rgba(28,26,22,0.05), 0 12px 30px rgba(28,26,22,0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html[data-theme="light"] .scene-night-only { display: none; }
html[data-theme="dark"] .scene-day-only { display: none; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--accent); border-radius: 999px;
  padding: 10px 16px; font-size: 0.9rem; text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus, .skip-link:focus-visible { top: 12px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s ease, color 0.3s ease;
}
img, video { max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; line-height: 1.12; letter-spacing: -0.015em; margin: 0 0 0.5em; }
p { margin: 0 0 1em; }
.dim { color: var(--text-dim); }
.wrap, .wrap-wide { max-width: 1240px; margin: 0 auto; padding: 0 40px; }
@media (max-width: 640px) { .wrap, .wrap-wide { padding: 0 20px; } }
.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;
}

/* ---------- buttons ----------
   The pill with a round arrow badge is the one call-to-action shape on the
   page. White pill + orange badge on dark or orange ground; orange pill +
   white badge where it needs to stand out from a dark section. */
.btn-pill {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 5px 5px 5px 20px; min-height: 44px; border-radius: 999px;
  background: #fff; color: #141210; text-decoration: none;
  font-family: var(--display); font-weight: 600; font-size: 0.88rem; white-space: nowrap;
  border: 0; cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-pill .arrow {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--accent-fill); color: #fff;
  transition: transform 0.25s ease;
}
.btn-pill .arrow svg { width: 15px; height: 15px; }
.btn-pill:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,0.25); }
.btn-pill:hover .arrow { transform: rotate(-45deg); }
.btn-pill.is-accent { background: var(--accent-fill); color: #fff; }
.btn-pill.is-accent .arrow { background: #fff; color: var(--accent-fill); }
html[data-theme="light"] .btn-pill.is-plain { background: var(--text); color: var(--bg); }
.btn-ghost {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px;
  border-radius: 999px; border: 1px solid currentColor; text-decoration: none;
  font-family: var(--display); font-weight: 600; font-size: 0.88rem;
  transition: background 0.2s ease, transform 0.2s ease;
}
.btn-ghost:hover { transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) {
  .btn-pill, .btn-pill .arrow, .btn-ghost { transition: none; }
  .btn-pill:hover, .btn-ghost:hover { transform: none; }
  .btn-pill:hover .arrow { transform: none; }
}

/* ---------- header ----------
   Sits over the orange hero card while the page is at the top (white
   text, no background); once the hero has scrolled away it picks up the
   page background and the theme's text colour (.is-scrolled, set by an
   IntersectionObserver on .hero-card). --nav-fg carries the switch. */
header.site {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  --nav-fg: #fff;
  color: var(--nav-fg);
  border-bottom: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease;
}
header.site.is-scrolled {
  --nav-fg: var(--text);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  border-bottom-color: var(--border);
}
/* scrolled a little but still over the orange card: a dark tinted glass,
   so the white nav text never sits straight on top of hero copy */
header.site.is-floating:not(.is-scrolled) { background: rgba(22, 6, 3, 0.42); }
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  header.site.is-scrolled,
  header.site.is-floating { backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  header.site.is-scrolled { background: var(--bg); }
}
@media (prefers-reduced-motion: reduce) { header.site { transition: none; } }
.nav-row {
  height: 100%; max-width: 1440px; margin: 0 auto; padding: 0 56px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.nav-name {
  font-family: var(--display); font-weight: 700; font-size: 1.1rem; letter-spacing: -0.01em;
  color: var(--nav-fg); text-decoration: none; white-space: nowrap;
}
.nav-links { display: flex; align-items: center; gap: 10px; }
.nav-primary { display: flex; align-items: center; gap: 28px; margin-right: 16px; }
.nav-primary > a, .nav-dropdown-trigger {
  color: var(--nav-fg); text-decoration: none; font-size: 0.9rem; font-weight: 500;
  opacity: 0.88; transition: opacity 0.2s ease;
}
.nav-primary > a:hover, .nav-dropdown-trigger:hover { opacity: 1; }
.nav-icon-link, .theme-toggle {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  color: var(--nav-fg); background: transparent; cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--nav-fg) 32%, transparent);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.nav-icon-link:hover, .theme-toggle:hover { border-color: var(--nav-fg); transform: translateY(-2px); }
.nav-icon-link svg { width: 17px; height: 17px; }
.nav-text-link {
  height: 40px; padding: 0 14px; border-radius: 999px;
  display: inline-flex; align-items: center;
  color: var(--nav-fg); text-decoration: none; font-size: 0.82rem; white-space: nowrap;
  border: 1px solid color-mix(in srgb, var(--nav-fg) 32%, transparent);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.nav-text-link:hover { border-color: var(--nav-fg); transform: translateY(-2px); }
.nav-cta { margin-left: 6px; }

.nav-dropdown-wrap { position: relative; display: flex; align-items: center; }
.nav-dropdown-wrap::after {
  content: ""; position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%); width: 200px; height: 14px;
}
.nav-dropdown-trigger { display: inline-flex; align-items: center; gap: 5px; }
.nav-dropdown-trigger svg { width: 10px; height: 10px; transition: transform 0.2s ease; }
.nav-dropdown-wrap:hover .nav-dropdown-trigger svg,
.nav-dropdown-wrap:focus-within .nav-dropdown-trigger svg { transform: rotate(180deg); }
.nav-dropdown-menu {
  list-style: none; margin: 0; padding: 8px; position: absolute; top: 100%; left: 50%;
  transform: translate(-50%, 6px); min-width: 200px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transition: opacity 0.18s ease, transform 0.18s ease;
}
.nav-dropdown-wrap:hover .nav-dropdown-menu,
.nav-dropdown-wrap:focus-within .nav-dropdown-menu { opacity: 1; pointer-events: auto; transform: translate(-50%, 10px); }
.nav-dropdown-menu a {
  display: block; padding: 9px 12px; border-radius: 10px; font-size: 0.88rem;
  color: var(--text); text-decoration: none; white-space: nowrap;
}
.nav-dropdown-menu a:hover { background: var(--surface-2); }
@media (prefers-reduced-motion: reduce) { .nav-dropdown-trigger svg, .nav-dropdown-menu { transition: none; } }

.nav-burger {
  display: none; width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  align-items: center; justify-content: center;
  color: var(--nav-fg); background: transparent;
  border: 1px solid color-mix(in srgb, var(--nav-fg) 32%, transparent);
}
/* Wellfound and Upwork pills go first (they stay in the menu, contact card
   and footer), then the text links fall back to the burger menu. */
@media (max-width: 1240px) { .nav-text-link { display: none; } }
@media (max-width: 1080px) {
  .nav-primary { display: none; }
  .nav-burger { display: flex; }
}
@media (max-width: 1080px) { .nav-row { padding: 0 28px; } }
@media (max-width: 620px) {
  .nav-row { padding: 0 16px; gap: 10px; }
  .nav-links .nav-icon-link, .nav-cta { display: none; }
}

/* ---------- mobile menu ---------- */
.mobile-menu {
  position: fixed; inset: 0; z-index: 90;
  background: var(--bg);
  display: flex; flex-direction: column;
  padding: 20px 24px;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
}
/* display:flex above would otherwise beat the hidden attribute, leaving the
   closed menu parked just above the viewport: once its links run taller than
   the screen, the last ones hang down into view. */
.mobile-menu[hidden] { display: none; }
.mobile-menu.is-open { transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .mobile-menu { transition: none; } }
.mobile-menu-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.mobile-menu-top .nav-name { color: var(--text); }
.mobile-menu-close {
  width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
}
.mobile-menu-links { display: flex; flex-direction: column; }
.mobile-menu-links a {
  font-family: var(--display); font-weight: 600; font-size: 1.35rem; text-decoration: none; color: var(--text);
  padding: 14px 4px; border-bottom: 1px solid var(--border); min-height: 44px; display: flex; align-items: center;
}

.back-to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--accent-fill); color: #fff; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.back-to-top.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }

.reading-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0%;
  background: var(--accent); z-index: 100; transition: width 0.1s linear;
}
@media (prefers-reduced-motion: reduce) { .reading-progress { transition: none; } }

/* ---------- hero card ----------
   One orange card that the header sits on top of: the card is pulled up
   under the sticky header by the header's own height (margin-top) and
   pads that height back in, so the nav reads as part of the card.
   Desktop (>=1024px): a 2x2 grid. Intro top-left, pitch top-right, the
   numbered list across the bottom, and the portrait absolutely placed in
   the middle, grounded to the card's bottom edge, behind the text.
   Two scrims keep the white text readable over the brightest orange:
   a light one under the nav, a heavier one under the numbered list, which
   the portrait also fades into. */
.hero { padding: 0; margin-top: calc(-1 * var(--nav-h)); }
/* Full-bleed: the card always spans the whole window, but its content
   keeps to the same 1440px column as the nav (1328px of content plus the
   56px side padding), so on very wide screens the orange runs edge to edge
   while the text stays where it is. The proof band below does the same. */
:root { --hero-gutter: max(56px, calc((100% - 1328px) / 2)); }
.hero-card {
  position: relative; isolation: isolate; overflow: hidden;
  border-radius: 0 0 var(--hero-r) var(--hero-r);
  min-height: clamp(660px, 100svh, 900px);
  padding: calc(var(--nav-h) + 48px) var(--hero-gutter) 44px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: 1fr auto;
  column-gap: 32px;
  color: #fff;
  background:
    radial-gradient(55% 75% at 14% 42%, rgba(255, 128, 64, 0.85) 0%, rgba(255, 128, 64, 0) 70%),
    linear-gradient(100deg, #ef531c 0%, #dd3f17 30%, #b3230f 56%, #6b140e 80%, #2b0a09 100%);
  z-index: 2;
}
.hero-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 200px; z-index: 1; pointer-events: none;
  background: linear-gradient(to bottom, rgba(26, 6, 3, 0.38), rgba(26, 6, 3, 0));
}
.hero-card::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 46%; z-index: 1; pointer-events: none;
  background: linear-gradient(to top, rgba(16, 5, 3, 0.9) 0%, rgba(16, 5, 3, 0.5) 42%, rgba(16, 5, 3, 0) 100%);
}
.hero-photo {
  position: absolute; bottom: 0; left: 50%; z-index: 0;
  height: calc(100% - var(--nav-h) - 12px); max-height: 820px;
  transform: translateX(-44%);
  pointer-events: none;
}
.hero-photo picture { display: block; height: 100%; }
.hero-photo img { display: block; height: 100%; width: auto; max-width: none; }
/* 3D avatar: drawn over the photo's own box (the photo keeps sizing the
   box, just invisibly), 6% taller at the top and 28% wider each side so a
   raised hand or the hair is never clipped. avatar.js frames its camera to
   the same numbers. */
.hero-avatar {
  position: absolute; top: -6%; left: -28%; width: 156%; height: 106%;
  display: block; opacity: 0; transition: opacity 0.9s ease;
}
html:not(.avatar-3d) .hero-avatar { display: none; }
.avatar-3d .hero-photo img { visibility: hidden; }
.avatar-ready .hero-avatar { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .hero-avatar { transition: none; } }
@keyframes hero-photo-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.hero-photo img { animation: hero-photo-in 0.9s cubic-bezier(0.16,1,0.3,1) both; }

.hero-intro { grid-column: 1; grid-row: 1; align-self: center; position: relative; z-index: 2; }
/* switch between the two landing pages (index.html <-> video.html) */
.role-switch {
  display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 22px;
  border-radius: 999px; background: rgba(0,0,0,0.18); border: 1px solid rgba(255,255,255,0.32);
}
.role-switch a {
  font-family: var(--display); font-weight: 600; font-size: 0.85rem; color: #fff; text-decoration: none;
  padding: 9px 16px; border-radius: 999px; min-height: 40px; display: inline-flex; align-items: center;
  transition: background 0.2s ease, color 0.2s ease;
}
.role-switch a:hover { background: rgba(255,255,255,0.16); }
.role-switch a[aria-current="page"] { background: #fff; color: var(--accent-fill); }
.role-switch a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (max-width: 400px) { .role-switch a { padding: 9px 12px; font-size: 0.8rem; } }
@media (prefers-reduced-motion: reduce) { .role-switch a { transition: none; } }
.hero-hello {
  font-family: var(--display); font-weight: 600; font-size: clamp(1.3rem, 2vw, 1.65rem);
  margin: 0 0 8px; color: #fff;
}
.hero-title {
  font-family: var(--display); font-weight: 700; color: #fff; margin: 0;
  font-size: clamp(3.3rem, 7.2vw, 6.6rem); line-height: 0.98; letter-spacing: -0.035em;
  text-shadow: 0 2px 30px rgba(60, 10, 0, 0.25);
}
.hero-title span { display: block; }
.hero-pitch {
  grid-column: 2; grid-row: 1; align-self: center; justify-self: end;
  max-width: 340px; position: relative; z-index: 2;
  text-shadow: 0 1px 14px rgba(30, 5, 2, 0.45);
}
.hero-pitch .lead {
  font-family: var(--display); font-weight: 600; color: #fff;
  font-size: clamp(1.2rem, 1.7vw, 1.5rem); line-height: 1.3; margin: 0 0 12px;
}
.hero-pitch .sub { font-size: 0.92rem; line-height: 1.55; color: rgba(255,255,255,0.84); margin: 0 0 22px; }
.hero-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; text-shadow: none; }
.hero-actions .btn-ghost { color: #fff; border-color: rgba(255,255,255,0.55); }
.hero-actions .btn-ghost:hover { background: rgba(255,255,255,0.1); border-color: #fff; }

.hero-services {
  grid-column: 1 / -1; grid-row: 2; position: relative; z-index: 2;
  list-style: none; margin: 40px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px;
}
@media (min-width: 1024px) { .hero-services.is-five { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.hero-services a { display: block; color: #fff; text-decoration: none; font-size: 0.95rem; }
.hero-services .num { display: block; font-family: var(--display); font-weight: 700; font-size: 0.85rem; margin-bottom: 6px; }
.hero-services .num b { color: var(--accent); font-weight: 700; }
.hero-services a span:last-child { border-bottom: 1px solid transparent; transition: border-color 0.2s ease; }
.hero-services a:hover span:last-child { border-bottom-color: rgba(255,255,255,0.7); }

/* tablet + mobile: one column. The portrait opens the card in flow, its
   lower edge faded out and pulled up under the headline, then the pitch
   and the numbered list follow. */
@media (max-width: 1023px) {
  :root { --hero-r: 32px; }
  .hero-card {
    display: flex; flex-direction: column; min-height: 0;
    padding: calc(var(--nav-h) + 8px) 28px 28px;
  }
  .hero-intro, .hero-pitch { align-self: stretch; justify-self: auto; }
  .hero-pitch { max-width: 46ch; margin-top: 22px; }
  .hero-photo {
    position: relative; left: auto; bottom: auto; transform: none;
    height: auto; max-height: none; width: min(72%, 440px); margin: 0 auto -120px;
  }
  /* the fade goes on the photo and the canvas themselves, not on the box:
     a mask on the box would clip everything outside it, the waving hand
     included */
  .hero-photo picture {
    -webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent 96%);
    mask-image: linear-gradient(to bottom, #000 62%, transparent 96%);
  }
  .hero-avatar {
    -webkit-mask-image: linear-gradient(to bottom, #000 64%, transparent 96%);
    mask-image: linear-gradient(to bottom, #000 64%, transparent 96%);
  }
  .hero-photo img { width: 100%; height: auto; }
  .hero-services { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; margin-top: 36px; }
}
@media (max-width: 640px) {
  .hero-card { padding: calc(var(--nav-h) + 4px) 20px 24px; }
  .hero-photo { width: 88%; margin-bottom: -96px; }
}

/* ---------- shipped band ---------- */
.proof-band {
  position: relative; z-index: 1;
  margin: calc(-1 * var(--hero-r)) 0 0;
  padding: calc(var(--hero-r) + 38px) var(--hero-gutter) 38px;
  background: var(--surface);
  border-radius: 0 0 var(--hero-r) var(--hero-r);
  display: grid; grid-template-columns: 170px minmax(0, 1fr); align-items: center; gap: 32px;
}
.proof-label { font-family: var(--display); font-weight: 600; font-size: 0.82rem; line-height: 1.4; margin: 0; }
.proof-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px 32px;
}
.proof-list a {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
  font-family: var(--display); font-weight: 700; font-size: 1.12rem; letter-spacing: -0.015em;
  color: var(--text); text-decoration: none; opacity: 0.82; transition: opacity 0.2s ease, color 0.2s ease;
}
.proof-list a:hover { opacity: 1; color: var(--accent-text); }
.proof-list svg { width: 22px; height: 22px; flex: none; }
@media (max-width: 1023px) {
  .proof-band { grid-template-columns: 1fr; gap: 14px; padding: calc(var(--hero-r) + 26px) 28px 28px; }
  .proof-list { justify-content: flex-start; }
}
@media (max-width: 640px) {
  .proof-band { padding-left: 20px; padding-right: 20px; }
  .proof-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
  .proof-list a { font-size: 1rem; }
}

/* ---------- reveal on scroll ---------- */
.js-reveal .reveal {
  opacity: 0; transform: translateY(18px);
  transition: opacity 0.6s cubic-bezier(0.16,1,0.3,1), transform 0.6s cubic-bezier(0.16,1,0.3,1);
}
.reveal.in-view { opacity: 1; transform: translateY(0); }
.stagger.in-view > * { transition-delay: calc(var(--i, 0) * 70ms); }
.hero-card .reveal { transition-delay: calc(var(--i, 0) * 110ms); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .stagger.in-view > * { transition-delay: 0s; }
  .hero-photo img { animation: none; }
}

/* ---------- sections ---------- */
section { padding: 104px 0; }
section.tight { padding: 72px 0; }
.eyebrow {
  display: inline-block; margin-bottom: 14px;
  font-family: var(--display); font-weight: 600; font-size: 1.02rem; color: var(--accent-text);
}
.section-head { margin-bottom: 44px; }
.section-head h2 { font-size: clamp(2rem, 4.2vw, 3.2rem); line-height: 1.06; letter-spacing: -0.03em; margin: 0 0 14px; }
.section-head p { color: var(--text-dim); max-width: 62ch; margin: 0; font-size: 1.02rem; }
.section-head.split { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px 48px; flex-wrap: wrap; }
.section-head.split > div { max-width: 640px; }

/* about */
#about { padding-top: 120px; }
.about-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 72px; align-items: end; }
.about-title { font-size: clamp(2.2rem, 4.6vw, 3.6rem); line-height: 1.06; letter-spacing: -0.035em; margin: 0; }
.about-lead { font-family: var(--display); font-weight: 600; font-size: clamp(1.12rem, 1.6vw, 1.32rem); line-height: 1.4; margin: 0 0 18px; }
.about-body p { color: var(--text-dim); font-size: 0.98rem; }
.about-cta { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 26px; }
.about-cta small { color: var(--text-dim); font-size: 0.85rem; line-height: 1.5; }
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; gap: 28px; } }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 72px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--card-r); padding: 28px 28px 24px; }
.stat-card b {
  display: block; font-family: var(--display); font-weight: 700; line-height: 1; letter-spacing: -0.04em;
  font-size: clamp(2.6rem, 5vw, 3.8rem); margin-bottom: 10px;
}
.stat-card b i { font-style: normal; color: var(--accent-text); }
.stat-card span { color: var(--text-dim); font-size: 0.94rem; }
@media (max-width: 760px) { .stats { grid-template-columns: 1fr; } }

/* ---------- work ---------- */
.work-row-label, .stack-row-label {
  font-family: var(--display); font-weight: 600; font-size: 0.8rem; letter-spacing: 0.02em;
  color: var(--text-dim); margin: 0 0 14px; padding-left: 2px;
}
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.project-grid.is-featured { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 760px) { .project-grid.is-featured { grid-template-columns: 1fr; } }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--card-r);
  padding: 26px; display: flex; flex-direction: column; gap: 10px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); }
.card h3 { font-size: 1.2rem; margin: 0; }
.card.is-featured { padding: 30px; }
.card.is-featured h3 { font-size: 1.5rem; }
.card p { font-size: 0.93rem; color: var(--text-dim); margin: 0 0 4px; flex-grow: 1; }
.card .card-stat { color: var(--text); font-weight: 600; flex-grow: 0; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.tag {
  font-family: var(--mono); font-size: 0.76rem; padding: 4px 11px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
}
.card-links { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 0.88rem; margin-top: 4px; }
.card-links a { color: var(--accent-text); text-decoration: none; border-bottom: 1px solid transparent; min-height: 44px; display: inline-flex; align-items: center; }
.card-links a:hover { border-bottom-color: var(--accent-text); }
.case-flag {
  align-self: flex-start; font-family: var(--display); font-weight: 600; font-size: 0.72rem;
  color: var(--accent-text); background: var(--accent-soft); padding: 4px 11px; border-radius: 999px;
}
.card.is-case { border-color: color-mix(in srgb, var(--accent) 28%, var(--border)); }
.also-on-github { font-size: 0.9rem; color: var(--text-dim); line-height: 1.8; max-width: 80ch; }
.also-on-github a { color: var(--accent-text); text-decoration: none; border-bottom: 1px solid transparent; }
.also-on-github a:hover { border-bottom-color: var(--accent-text); }

/* ---------- videos ----------
   Every video is preload="none" with a poster, so the page costs one
   small JPG per video until someone presses play. Only one plays at a
   time (script at the bottom pauses the rest). */
.video-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.video-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--card-r);
  overflow: hidden; display: flex; flex-direction: column; margin: 0;
}
.video-card video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #000; }
.video-meta { padding: 20px 24px 22px; display: flex; flex-direction: column; gap: 6px; flex-grow: 1; }
.video-meta h3 { font-size: 1.18rem; margin: 0; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.video-meta .len { font-family: var(--mono); font-weight: 400; font-size: 0.78rem; color: var(--text-dim); letter-spacing: 0; white-space: nowrap; }
.video-meta p { color: var(--text-dim); font-size: 0.92rem; margin: 0; flex-grow: 1; }
.video-meta .card-links { margin-top: 2px; }
@media (max-width: 860px) { .video-grid { grid-template-columns: 1fr; } }

/* one piece shown large: the vertical video beside how it was made */
.video-feature {
  margin-top: 64px; padding: 28px;
  display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 48px; align-items: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--card-r);
}
.video-feature-text h3 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); margin: 14px 0 10px; }
.video-feature-text > p { color: var(--text-dim); margin: 0 0 18px; max-width: 62ch; }
.feature-steps { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 10px; max-width: 62ch; }
.feature-steps li { position: relative; padding-left: 18px; color: var(--text-dim); font-size: 0.93rem; line-height: 1.55; }
.feature-steps li::before {
  content: ""; position: absolute; left: 0; top: 0.62em;
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
}
.feature-steps b { color: var(--text); font-weight: 600; }
/* a second feature right after the first reads as a pair, video on the other side */
.video-feature + .video-feature { margin-top: 24px; }
.video-feature.is-flipped { grid-template-columns: minmax(0, 1fr) minmax(0, 340px); }
.video-feature.is-flipped .video-feature-media { order: 2; }
@media (max-width: 860px) {
  .video-feature, .video-feature.is-flipped { grid-template-columns: 1fr; gap: 24px; padding: 20px; }
  .video-feature-media { width: 100%; max-width: 340px; margin: 0 auto; }
  .video-feature.is-flipped .video-feature-media { order: 0; }
}

.shorts { margin-top: 64px; }
.shorts-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 40px; flex-wrap: wrap; margin-bottom: 22px; }
.shorts-head h3 { font-size: 1.5rem; margin: 0 0 8px; }
.shorts-head p { color: var(--text-dim); margin: 0; max-width: 60ch; font-size: 0.95rem; }
.shorts-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.short-card { margin: 0; }
.short-card video {
  display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; background: #000;
  border-radius: 20px; border: 1px solid var(--border);
}
.short-card figcaption { margin-top: 10px; font-size: 0.85rem; color: var(--text-dim); line-height: 1.45; }
.short-card figcaption b { display: block; color: var(--text); font-family: var(--display); font-size: 0.95rem; }
@media (max-width: 860px) { .shorts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- web stack ---------- */
.stack-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.stack-marquee {
  position: relative; overflow: hidden; margin-top: 36px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.stack-track {
  display: flex; align-items: stretch; gap: 14px; width: max-content;
  animation: stack-scroll-left 42s linear infinite;
  padding: 4px 4px 8px;
}
.stack-marquee.dir-right .stack-track { animation-name: stack-scroll-right; }
.stack-marquee:hover .stack-track,
.stack-marquee:focus-within .stack-track { animation-play-state: paused; }
@keyframes stack-scroll-left { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes stack-scroll-right { from { transform: translateX(-50%); } to { transform: translateX(0); } }
.stack-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
  padding: 20px 16px;
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
  transition: transform 0.25s ease, border-color 0.25s ease;
  flex: 0 0 auto; width: 150px;
}
.stack-grid .stack-card { width: auto; }
.stack-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); }
.tool-icon { width: 28px; height: 28px; color: var(--text-dim); opacity: 0.85; }
.tool-name { font-family: var(--mono); font-size: 0.72rem; color: var(--text); white-space: nowrap; }
.tool-icon-tone { filter: grayscale(1); opacity: 0.55; }
.stack-card:hover .tool-icon-tone { filter: grayscale(0); }
.tool-icon-brand { opacity: 1; }
.stack-card-caption { font-size: 0.76rem; color: var(--text-dim); line-height: 1.45; }
.stack-card-caption a { color: var(--accent-text); text-decoration: none; border-bottom: 1px solid transparent; }
.stack-card-caption a:hover { border-bottom-color: var(--accent-text); }
.stack-tilt { perspective: 900px; }
.stack-tilt > * {
  transform: rotateX(6deg); opacity: 0.85; transform-origin: 50% 100%;
  transition: transform 0.7s cubic-bezier(0.16,1,0.3,1), opacity 0.7s ease;
}
.stack-tilt.in-view > * { transform: rotateX(0deg); opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .stack-tilt > * { transform: none; opacity: 1; transition: none; }
  .stack-track { animation: none; }
}

/* ---------- contact: a second orange card, bookending the hero ---------- */
#contact { padding-bottom: 72px; }
.contact-card {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: var(--hero-r); padding: 64px 56px;
  color: #fff;
  background:
    radial-gradient(60% 90% at 12% 30%, rgba(255, 128, 64, 0.8) 0%, rgba(255, 128, 64, 0) 70%),
    linear-gradient(100deg, #e5491a 0%, #c9330f 40%, #8a1a0e 75%, #3a0d0a 100%);
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 40px; align-items: end;
}
.contact-card .eyebrow { color: #fff; opacity: 0.9; }
.contact-card h2 { font-size: clamp(2.6rem, 6.5vw, 5rem); line-height: 0.98; letter-spacing: -0.04em; margin: 0; color: #fff; }
.contact-side p { color: rgba(255,255,255,0.88); margin: 0 0 22px; font-size: 1.02rem; }
.contact-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.contact-email-inline { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; margin-top: 14px; flex-wrap: wrap; }
.contact-email-text { font-family: var(--mono); font-size: 0.86rem; color: rgba(255,255,255,0.9); user-select: all; }
.copy-email-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 34px;
  padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.5);
  background: transparent; color: #fff; font-size: 0.8rem; font-family: var(--sans);
  cursor: pointer; transition: border-color 0.2s ease, background 0.2s ease;
}
.copy-email-btn:hover { border-color: #fff; background: rgba(255,255,255,0.1); }
.copy-email-btn svg { width: 14px; height: 14px; flex: none; }
.copy-email-btn .icon-check { display: none; }
.copy-email-btn.is-copied .icon-copy { display: none; }
.copy-email-btn.is-copied .icon-check { display: block; }
.contact-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.contact-links a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.45); color: #fff; text-decoration: none; font-size: 0.86rem;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.contact-links a:hover { background: rgba(255,255,255,0.12); border-color: #fff; }
@media (max-width: 900px) {
  .contact-card { grid-template-columns: 1fr; padding: 44px 28px; border-radius: 32px; }
}

footer.site {
  max-width: 1240px; margin: 0 auto; padding: 28px 40px 40px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap;
  color: var(--text-dim); font-size: 0.86rem;
}
footer.site p { margin: 0; }
footer.site nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
footer.site a { color: var(--text-dim); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
footer.site a:hover { color: var(--accent-text); }
@media (max-width: 640px) { footer.site { padding: 20px 20px 32px; } }

/* ---------- video.html only ---------- */
.section-head + .video-feature { margin-top: 0; }
.process-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.process-step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--card-r); padding: 28px 26px 26px; }
.process-num { font-family: var(--display); font-weight: 700; font-size: 0.9rem; color: var(--accent-text); }
.process-step h3 { font-size: 1.15rem; margin: 14px 0 8px; }
.process-step p { color: var(--text-dim); font-size: 0.93rem; line-height: 1.55; margin: 0; }
.tool-groups { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; margin-top: 40px; }
.crosslink-card {
  display: flex; align-items: center; justify-content: space-between; gap: 24px 48px; flex-wrap: wrap;
  padding: 40px 44px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--card-r);
}
.crosslink-card > div { max-width: 640px; }
.crosslink-card h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); line-height: 1.08; letter-spacing: -0.03em; margin: 10px 0 12px; }
.crosslink-card p { color: var(--text-dim); margin: 0; }
@media (max-width: 1023px) { .process-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .tool-groups { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .process-grid { grid-template-columns: 1fr; }
  .crosslink-card { padding: 28px 22px; }
}
