/* ---------- tokens ---------- */
:root {
  --bg: #0e0d0b;
  --bg-2: #171512;
  --fg: #ede7da;
  --muted: #948c7d;
  --line: rgba(237, 231, 218, 0.12);
  --line-2: rgba(237, 231, 218, 0.22);
  --accent: #ff5a1f;
  --accent-ink: #120700;
  --cell: rgba(237, 231, 218, 0.2);
  --aurora-1: #ff5a1f;
  --aurora-2: #ffb36b;
  --aurora-3: #8a4dff;
  --aurora-strength: 0.62;
  --orb-deep: rgba(40, 16, 60, 0.92);
  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Geist", ui-sans-serif, sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;
  --gutter: clamp(16px, 4vw, 56px);
  --edge: max(var(--gutter), calc((100% - 1440px) / 2 + var(--gutter))); /* left/right edge shared by nav, hero, sections, footer */
  --ease: cubic-bezier(0.2, 0.7, 0, 1);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #efe9dc;
  --bg-2: #e6dfcf;
  --fg: #15130f;
  --muted: #6e6758;
  --line: rgba(21, 19, 15, 0.12);
  --line-2: rgba(21, 19, 15, 0.24);
  --accent: #b53408; /* deep enough for AA contrast on both light backgrounds and under button text */
  --accent-ink: #fff6ef;
  --cell: rgba(21, 19, 15, 0.15);
  --aurora-1: #ff6a2b;
  --aurora-2: #ffc08a;
  --aurora-3: #e86f9c;
  --aurora-strength: 0.5;
  --orb-deep: rgba(120, 60, 110, 0.55);
  color-scheme: light;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 17px/1.6 var(--sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.4s, color 0.4s;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--accent); }
kbd {
  font: 500 12px/1 var(--mono);
  padding: 3px 5px;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  color: var(--muted);
}
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 6px; }
.skip:focus { top: 12px; }

/* film grain */

/* scroll progress: native scroll timeline, JS fallback sets --p */
.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 80;
  background: var(--accent); transform-origin: 0 50%; transform: scaleX(var(--p, 0));
}
@supports (animation-timeline: scroll()) {
  .progress { animation: grow linear both; animation-timeline: scroll(root); }
  @keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}

/* custom cursor (fine pointers only, enabled by JS) */

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 70;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px var(--edge);
  transition: background-color 0.4s, padding 0.4s var(--ease), border-color 0.4s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  padding-block: 12px;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px) saturate(1.3);
  border-color: var(--line);
}
.nav__logo { font: 400 28px/1 var(--serif); letter-spacing: -0.02em; }
.nav__logo i { color: var(--accent); font-style: normal; }
.nav__links { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; position: absolute; left: 50%; translate: -50% 0; }
.nav__links a { position: relative; z-index: 1; font-size: 14px; padding: 6px 14px; border-radius: 999px; color: var(--muted); transition: color 0.3s; }
.nav__links a:hover, .nav__links a.is-active { color: var(--fg); }
.nav__links .pill { position: absolute; z-index: 0; top: 4px; bottom: 4px; border-radius: 999px; background: var(--line); transition: left 0.45s var(--ease), width 0.45s var(--ease), opacity 0.3s; }
.nav__tools { display: flex; gap: 8px; align-items: center; }
.kbd-btn, .icon-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 999px; font-size: 14px; color: var(--muted);
  transition: border-color 0.3s, color 0.3s;
}
.icon-btn { width: 36px; padding: 0; justify-content: center; }
.kbd-btn:hover, .icon-btn:hover { border-color: var(--line-2); color: var(--fg); }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100svh; display: grid; align-items: end; padding: 120px var(--edge) 96px; overflow: hidden; isolation: isolate; }
/* Static backdrop: a warm glow behind the portrait and a faint dot grid that fades out toward the text */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(42% 60% at 80% 58%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    radial-gradient(circle at 1px 1px, var(--line) 1px, transparent 1.5px) 0 0 / 22px 22px;
  -webkit-mask-image: linear-gradient(100deg, transparent 25%, #000 70%);
  mask-image: linear-gradient(100deg, transparent 25%, #000 70%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(120% 80% at 10% 100%, var(--bg) 20%, transparent 70%);
}
.hero__inner { max-width: 1100px; container-type: inline-size; }
.eyebrow { font: 500 12px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 0 0 24px; display: flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
/* Sized from its own column ("Arun Kumar" is ~4.2em wide), so the name never wraps to three lines */
.hero__title { margin: 0; font: 400 clamp(64px, 13.5vw, 210px)/0.86 var(--serif); font-size: clamp(56px, 23cqi, 210px); letter-spacing: -0.035em; }
/* Room for italic descenders (J, y) and overhang inside the reveal mask, cancelled by negative margins */
.hero__title .line { display: block; overflow: hidden; padding: 0.02em 0.14em 0.24em; margin: 0 -0.14em -0.18em; }
.hero__title .line > span { display: inline-block; }
.hero__cta { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  height: 52px; padding: 0 26px; border-radius: 999px; overflow: hidden;
  border: 1px solid var(--line-2); font-size: 15px; font-weight: 500;
  transition: border-color 0.3s, color 0.4s var(--ease);
}
.btn span { position: relative; z-index: 1; }
.btn::before {
  content: ""; position: absolute; inset: 0; background: var(--fg); border-radius: inherit;
  transform: translateY(101%); transition: transform 0.5s var(--ease);
}
.btn:hover { color: var(--bg); border-color: var(--fg); }
.btn:hover::before { transform: translateY(0); }
.btn--solid { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* page-load stagger */
.load { animation: rise 1.1s var(--ease) both; animation-delay: calc(var(--d) * 110ms + 150ms); }
.line > .load { animation-name: lineUp; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); filter: blur(6px); } }
@keyframes lineUp { from { transform: translateY(105%) rotate(4deg); } }

/* ---------- marquee ---------- */

/* ---------- sections ---------- */
.section { padding: clamp(96px, 14vw, 180px) var(--gutter) 0; max-width: 1440px; margin: 0 auto; scroll-margin-top: -40px; }
.section__head { display: grid; grid-template-columns: minmax(48px, 1fr) 11fr; gap: 16px; align-items: start; margin-bottom: clamp(40px, 6vw, 80px); }
.section__num { font: 500 12px/1 var(--mono); color: var(--accent); padding-top: 1.2em; }
.section__head h2, .contact__title { margin: 0; font: 400 clamp(40px, 7vw, 104px)/0.95 var(--serif); letter-spacing: -0.03em; max-width: 14ch; }
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 0.08em 0.22em; margin: 0 -0.08em -0.22em; }
.split .w > span { display: inline-block; transform: translateY(105%); transition: transform 1s var(--ease); transition-delay: calc(var(--i) * 45ms); }
.split.in .w > span { transform: none; }

.reveal { opacity: 0; transform: translateY(32px); transition: opacity 1s var(--ease), transform 1s var(--ease); transition-delay: var(--rd, 0ms); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- about ---------- */
@supports (animation-timeline: view()) {
  @keyframes parallax { from { translate: 0 0; } to { translate: 0 -10%; } }
}
.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin: 48px 0 0; border-top: 1px solid var(--line); }
.stats div { padding: 20px 16px 0 0; }
.stats div + div { padding-left: 16px; border-left: 1px solid var(--line); }
.stats dt { font: 400 12px/1.3 var(--mono); color: var(--muted); }
.stats dd { margin: 10px 0 0; font: 400 clamp(36px, 4.5vw, 64px)/1 var(--serif); font-variant-numeric: tabular-nums; }

/* ---------- shared inline bits ---------- */
.eyebrow__link, .inline { color: var(--fg); background: linear-gradient(var(--accent), var(--accent)) 0 100% / 100% 1px no-repeat; transition: background-size 0.4s var(--ease), color 0.3s; pointer-events: auto; }
.eyebrow__link:hover, .inline:hover { color: var(--accent); background-size: 0 1px; }

/* ---------- tulifo ---------- */
.tulifo__intro { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(24px, 5vw, 80px); align-items: start; margin-bottom: 56px; }
.tulifo__intro .big { margin: 0; font-size: clamp(22px, 2.4vw, 32px); line-height: 1.3; letter-spacing: -0.01em; }
.tulifo__facts { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.tulifo__facts li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.tulifo__facts b { font: 400 30px/1 var(--serif); }
.tulifo__facts span { font: 400 12px/1.3 var(--mono); color: var(--muted); text-align: right; }
.flow { padding: clamp(20px, 3vw, 36px); border: 1px solid var(--line); border-radius: 22px; background: var(--bg-2); position: relative; overflow: hidden; }
.flow::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(60% 80% at var(--fx, 10%) 0%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%); transition: --fx 0.6s; }
.flow__label { margin: 0 0 20px; font: 400 12px/1 var(--mono); color: var(--muted); }
.flow__track { display: flex; align-items: center; }
.flow__node { flex: 0 1 auto; display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border: 1px solid var(--line-2); border-radius: 14px; text-align: left; font-size: 15px; line-height: 1.2; transition: background 0.35s, color 0.35s, border-color 0.35s, transform 0.5s var(--ease); }
.flow__node:hover { border-color: var(--fg); }
.flow__node.is-on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); transform: translateY(-4px); }
.flow__n { font: 500 12px/1 var(--mono); opacity: 0.7; }
.flow__wire { flex: 1 1 24px; min-width: 16px; height: 1px; background: var(--line-2); position: relative; overflow: hidden; }
.flow__wire:nth-of-type(4)::after { animation-delay: 0.45s; } .flow__wire:nth-of-type(6)::after { animation-delay: 0.9s; } .flow__wire:nth-of-type(8)::after { animation-delay: 1.35s; }
.flow__detail { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); min-height: 150px; }
.flow__detail h3 { margin: 0 0 8px; font: 400 clamp(28px, 3vw, 40px)/1 var(--serif); }
.flow__detail p { margin: 0 0 16px; color: var(--muted); max-width: 70ch; }
.flow__detail.swap > * { animation: rise 0.6s var(--ease) both; }
.flow__detail.swap > *:nth-child(2) { animation-delay: 60ms; } .flow__detail.swap > *:nth-child(3) { animation-delay: 120ms; }

/* ---------- AI loop diagram and models ---------- */
.loop { position: relative; aspect-ratio: 1; max-width: 360px; width: 100%; margin: 0 auto; }
.loop__ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.loop__ring circle { fill: none; stroke: var(--line-2); stroke-width: 1; }
.loop__nodes { position: absolute; inset: 0; }
.loop__node { position: absolute; left: calc(50% + var(--x) * 39%); top: calc(50% + var(--y) * 39%); translate: -50% -50%; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--bg-2); font: 500 12px/1.1 var(--mono); white-space: nowrap; transition: background 0.35s, color 0.35s, border-color 0.35s, scale 0.35s var(--ease); }
.loop__node.is-on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); scale: 1.08; }
.loop__core { position: absolute; inset: 30%; border-radius: 50%; display: grid; place-content: center; text-align: center; border: 1px dashed var(--line-2); }
.loop__core b { font: 400 clamp(22px, 2.6vw, 30px)/1 var(--serif); font-style: italic; color: var(--accent); }
.loop__core span { font: 400 12px/1 var(--mono); color: var(--muted); margin-top: 6px; }
.model-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.model { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--bg-2); min-height: 280px; transform: perspective(800px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform 0.5s var(--ease), border-color 0.3s; }
.model:hover { border-color: var(--accent); }
.model__top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font: 400 12px/1.2 var(--mono); color: var(--muted); }
.model h4 { margin: 8px 0 0; font: 400 clamp(28px, 2.4vw, 36px)/1 var(--serif); }
.model p { margin: 0; font-size: 14px; color: var(--muted); }

/* ---------- footprint: map, countries, teams ---------- */
.footprint { margin-bottom: clamp(56px, 8vw, 104px); }
.map { position: relative; aspect-ratio: 144 / 52; border: 1px solid var(--line); border-radius: 22px; background: var(--bg-2); overflow: hidden; }
.map__dots, .map__arcs { position: absolute; inset: 0; width: 100%; height: 100%; }
.map__arcs path { fill: none; stroke: var(--accent); stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0.85; }
.map.in .map__arcs path { animation: draw 2.2s var(--ease) forwards; }
.map.in .map__arcs path:nth-child(2) { animation-delay: 0.5s; }
.map__arcs .spark { fill: var(--accent); }
@keyframes draw { to { stroke-dashoffset: 0; } }
.pin { position: absolute; left: var(--px, -100px); top: var(--py, -100px); translate: -50% -50%; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent); z-index: 1; }
.pin--home { width: 18px; height: 18px; }
.pin span { position: absolute; left: 50%; bottom: calc(100% + 8px); translate: -50% 0; padding: 6px 10px; border-radius: 999px; background: var(--fg); color: var(--bg); font: 500 12px/1 var(--mono); white-space: nowrap; transition: transform 0.4s var(--ease); }
.pin:hover span, .pin.is-on span { transform: translateY(-4px) scale(1.06); background: var(--accent); color: var(--accent-ink); }
.footprint__grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(24px, 4vw, 64px); margin-top: 32px; }
.countries h3, .teams h3 { margin: 0 0 12px; font: 500 12px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.countries ul, .teams ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.countries li { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; padding: 16px 0; border-bottom: 1px solid var(--line); cursor: default; transition: opacity 0.3s, padding 0.4s var(--ease); }
.countries li b { font: 400 26px/1.1 var(--serif); }
.countries li span { grid-column: 1; font-size: 14px; color: var(--muted); }
.countries li time { grid-row: 1; grid-column: 2; font: 400 12px/1.3 var(--mono); color: var(--muted); }
.countries__clients { margin: 16px 0 0; font-size: 14px; color: var(--muted); }
.teams small { font: 400 12px/1 var(--mono); letter-spacing: 0; text-transform: none; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-left: 6px; }
.sw--team { background: var(--line-2); } .sw--direct { background: var(--accent); }
.teams li { display: grid; grid-template-columns: minmax(180px, 3fr) 5fr 92px; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); transition: opacity 0.3s; }
.teams__name { font-size: 15px; line-height: 1.25; display: flex; flex-direction: column; }
.teams__name em { font: 400 12px/1.3 var(--mono); color: var(--muted); }
.teams__bar { position: relative; height: 12px; border-radius: 999px; background: var(--line); overflow: hidden; }
.teams__bar i, .teams__bar b { position: absolute; inset: 0 auto 0 0; border-radius: inherit; transform-origin: left; transform: scaleX(0); transition: transform 1.4s var(--ease); }
.teams__bar i { width: calc(var(--w) * 100%); background: var(--line-2); }
.teams__bar b { width: calc(var(--d, 0) * 100%); background: var(--accent); transition-delay: 0.3s; }
.teams.in .teams__bar i, .teams.in .teams__bar b { transform: scaleX(1); }
.teams.in li:nth-child(2) .teams__bar i { transition-delay: 0.1s; } .teams.in li:nth-child(3) .teams__bar i { transition-delay: 0.2s; } .teams.in li:nth-child(4) .teams__bar i { transition-delay: 0.3s; } .teams.in li:nth-child(5) .teams__bar i { transition-delay: 0.4s; }
.teams__n { font: 400 30px/1 var(--serif); text-align: right; display: flex; flex-direction: column; align-items: flex-end; white-space: nowrap; }
.teams__n small { margin-top: 4px; }
.footprint.is-focus .countries li:not(.is-on), .footprint.is-focus .teams li:not(.is-on) { opacity: 0.28; }
.countries li.is-on { padding-left: 8px; }

/* ---------- 3D portrait: you inside a living aurora orb; your head rises out of the top ---------- */
@property --ring { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.p3d { margin: 0; position: relative; perspective: 1100px; }
.p3d__stage { position: relative; aspect-ratio: 3 / 4; transform-style: preserve-3d; transform: rotateX(var(--tx, 0deg)) rotateY(var(--ty, 0deg)); transition: transform 0.6s var(--ease); will-change: transform; }
.orb { position: absolute; left: 50%; bottom: 3.2%; width: 90.9%; aspect-ratio: 1; translate: -50% 0; animation: morph 10s ease-in-out infinite; }
@keyframes morph {
  0%, 100% { border-radius: 46% 54% 58% 42% / 44% 46% 54% 56%; }
  33% { border-radius: 58% 42% 44% 56% / 54% 40% 60% 46%; }
  66% { border-radius: 40% 60% 52% 48% / 42% 58% 42% 58%; }
}
@keyframes ring { to { --ring: 360deg; } }
.orb--fill, .orb--glow {
  background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--aurora-1) 85%, transparent), color-mix(in srgb, var(--aurora-3) 55%, transparent) 60%, var(--orb-deep) 100%);
}
.orb--glow { transform: translateZ(-30px); filter: blur(28px); opacity: 0.55; }
.orb--fill { overflow: hidden; }
.orb--ring {
  width: 95.2%; bottom: 1.6%; padding: 2.5px; pointer-events: none;
  background: conic-gradient(from var(--ring), var(--aurora-1), var(--aurora-3), var(--aurora-2), var(--aurora-1));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: morph 10s ease-in-out infinite, ring 6s linear infinite;
}
/* The same photo twice, pixel-aligned: once clipped by the shape (body), once clipped to the top band (head) */
.orb__img { position: absolute; left: 50%; bottom: 0; width: 110%; max-width: none; height: auto; translate: -50% 0; }
.orb__head { position: absolute; inset: 0; clip-path: inset(0 0 59% 0); pointer-events: none; }
.orb__head .orb__img { width: 100%; bottom: 3.2%; }

/* ---------- Tulifo products ---------- */
.products { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 8px; }
.product { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 22px 22px 70px; border: 1px solid var(--line); border-radius: 18px; background: var(--bg-2); transform: perspective(800px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform 0.5s var(--ease), border-color 0.3s; }
.product:hover { border-color: var(--accent); }
.product__l { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; font: 400 30px/1 var(--serif); font-style: italic; background: var(--fg); color: var(--bg); transition: background 0.3s, color 0.3s, rotate 0.6s var(--ease); }
.product:hover .product__l { background: var(--accent); color: var(--accent-ink); rotate: -8deg; }
.product b { font: 400 30px/1 var(--serif); font-weight: 400; margin-top: 8px; }
.product p { margin: 0; font-size: 14px; color: var(--muted); }

/* ---------- model specs and code snippet ---------- */
.pin--below span { bottom: auto; top: calc(100% + 8px); }

/* ---------- experience timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; --tl: 0; }
.timeline::before, .timeline::after { content: ""; position: absolute; top: 8px; bottom: 8px; left: calc(min(22%, 240px) + 11px); width: 1px; background: var(--line-2); }
.timeline::after { background: var(--accent); transform-origin: top; transform: scaleY(var(--tl)); }
.role { display: grid; grid-template-columns: min(22%, 240px) 1fr; gap: 0 56px; padding-bottom: clamp(40px, 5vw, 64px); position: relative; }
.role::before { content: ""; position: absolute; top: 6px; left: calc(min(22%, 240px) + 5px); width: 13px; height: 13px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line-2); z-index: 1; transition: background 0.4s, border-color 0.4s, box-shadow 0.4s; }
.role.is-past::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 18%, transparent); }
.role__when span { font: 500 13px/1 var(--mono); color: var(--muted); position: sticky; top: 96px; display: block; padding-top: 4px; transition: color 0.4s; }
.role.is-past .role__when span { color: var(--fg); }
.role__org { margin: 0 0 6px; font: 400 13px/1.3 var(--mono); color: var(--muted); }
.role__org a { color: var(--accent); }
.role h3 { margin: 0 0 14px; font: 400 clamp(34px, 4.4vw, 60px)/1 var(--serif); letter-spacing: -0.02em; }
.role p { margin: 0 0 18px; color: var(--muted); max-width: 64ch; }
.role--feature .role__body { padding: clamp(20px, 2.6vw, 32px); border: 1px solid var(--line); border-radius: 20px; background: var(--bg-2); }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.metrics div { padding: 16px; display: flex; flex-direction: column; gap: 8px; box-shadow: 1px 1px 0 var(--line); }
.metrics b { font: 400 clamp(30px, 3vw, 42px)/1 var(--serif); font-weight: 400; color: var(--fg); font-variant-numeric: tabular-nums; }
.metrics div:first-child b { color: var(--accent); }
.metrics span { font: 400 12px/1.3 var(--mono); color: var(--muted); }
.metrics b { white-space: nowrap; }
.metrics b span { font: inherit; color: inherit; }

/* ---------- credentials ---------- */
.creds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); margin-bottom: 48px; }
.creds h3 { margin: 0 0 12px; font: 500 12px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.creds ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.creds li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); transition: padding 0.4s var(--ease); }
.creds li:hover { padding-left: 8px; }
.creds li span { font-size: 16px; line-height: 1.35; }
.creds time { flex-shrink: 0; font: 400 12px/1.3 var(--mono); color: var(--muted); text-align: right; max-width: 40%; }

/* ---------- craft ---------- */

/* ---------- work ---------- */
.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.card {
  --mx: 50%; --my: 50%;
  position: relative; display: flex; flex-direction: column; min-height: 240px; padding: 24px; border-radius: 18px;
  background: var(--bg-2); border: 1px solid var(--line); overflow: hidden; isolation: isolate;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.5s var(--ease), border-color 0.3s;
}
.card::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity 0.4s;
  background: radial-gradient(420px circle at var(--mx) var(--my), color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%);
}
.card:hover { border-color: var(--line-2); }
.card:hover::before { opacity: 1; }
.card__top { display: flex; justify-content: space-between; align-items: center; font: 400 12px/1 var(--mono); color: var(--muted); }
.card__lang { display: inline-flex; align-items: center; gap: 8px; }
.card__lang::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--dot, var(--muted)); }
.card h3 { margin: auto 0 8px; padding-top: 40px; font: 400 clamp(30px, 3vw, 44px)/1 var(--serif); letter-spacing: -0.02em; word-break: break-word; }
.card p { margin: 0; color: var(--muted); font-size: 15px; max-width: 48ch; }
.card__arrow { position: absolute; right: 22px; bottom: 22px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; transition: transform 0.5s var(--ease), background 0.3s, color 0.3s; }
.card:hover .card__arrow { transform: rotate(-45deg); background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.card p { padding-right: 52px; }

/* ---------- writing ---------- */
.features { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 72px; }
.feature { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 24px; border-radius: 18px; border: 1px solid var(--line); min-height: 320px; transition: transform 0.6s var(--ease), border-color 0.3s, background 0.3s; }
.feature:hover { transform: translateY(-6px); border-color: var(--accent); background: var(--bg-2); }
.feature__meta { display: flex; justify-content: space-between; font: 400 12px/1 var(--mono); color: var(--muted); }
.feature h3 { margin: 0; font: 400 clamp(26px, 2.4vw, 34px)/1.05 var(--serif); letter-spacing: -0.01em; }
.feature p { margin: 0; font-size: 14px; color: var(--muted); }

/* ---------- badges ---------- */

/* ---------- contact ---------- */
.contact { padding: clamp(120px, 16vw, 220px) var(--gutter); text-align: center; display: flex; flex-direction: column; align-items: center; }
.contact .eyebrow { justify-content: center; }
.contact__title { max-width: 16ch; margin-inline: auto; font-size: clamp(48px, 9vw, 150px); }
.mail { margin-top: 48px; display: inline-flex; flex-direction: column; align-items: center; gap: 10px; padding: 22px 34px; border-radius: 999px; border: 1px solid var(--line-2); transition: border-color 0.3s, background 0.3s; }
.mail:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.mail__addr { font: 400 clamp(20px, 3vw, 36px)/1 var(--serif); font-style: italic; }
.mail__hint { font: 400 12px/1 var(--mono); color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }
.socials { list-style: none; padding: 0; margin: 40px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 28px; }
.socials a { position: relative; color: var(--muted); transition: color 0.3s; }
.socials a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: right; transition: transform 0.5s var(--ease); }
.socials a:hover { color: var(--fg); }
.socials a:hover::after { transform: scaleX(1); transform-origin: left; }

.footer { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 24px var(--edge); border-top: 1px solid var(--line); font: 400 12px/1.4 var(--mono); color: var(--muted); }

/* ---------- command palette ---------- */
.palette { padding: 0; border: 0; background: none; color: var(--fg); width: min(620px, calc(100% - 32px)); margin: 14vh auto auto; overflow: visible; }
.palette::backdrop { background: color-mix(in srgb, var(--bg) 55%, transparent); backdrop-filter: blur(6px); }
.palette[open] .palette__box { animation: pop 0.35s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(-10px) scale(0.98); } }
.palette__box { background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 16px; overflow: hidden; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45); }
.palette__input { width: 100%; height: 58px; padding: 0 20px; background: none; border: 0; border-bottom: 1px solid var(--line); outline: 0; color: var(--fg); font: 400 17px var(--sans); }
.palette__list { list-style: none; margin: 0; padding: 8px; max-height: min(52vh, 420px); overflow: auto; }
.palette__group { font: 500 12px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 12px 12px 6px; }
.palette__item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px; cursor: pointer; }
.palette__item span:last-child { font: 400 12px/1 var(--mono); color: var(--muted); }
.palette__item[aria-selected="true"] { background: var(--line); }
.palette__item[aria-selected="true"] span:first-child { color: var(--accent); }
.palette__foot { display: flex; gap: 16px; margin: 0; padding: 10px 16px; border-top: 1px solid var(--line); font: 400 12px/1 var(--mono); color: var(--muted); }
.palette__foot kbd { margin-right: 4px; }

.toast { position: fixed; left: 50%; bottom: 24px; z-index: 99; translate: -50% 140%; padding: 12px 18px; border-radius: 999px; background: var(--fg); color: var(--bg); font-size: 14px; opacity: 0; transition: translate 0.5s var(--ease), opacity 0.3s; pointer-events: none; }
.toast.is-on { translate: -50% 0; opacity: 1; }

/* theme switch: circular reveal via view transitions */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .nav__links { display: none; }
  .tulifo__intro, .creds { grid-template-columns: 1fr; }
  .footprint__grid { grid-template-columns: 1fr; }
  .products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .p3d { max-width: 460px; }
  .model-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .loop { max-width: 300px; }
  .flow__track { flex-direction: column; align-items: stretch; }
  .flow__node { flex-direction: row; align-items: center; gap: 12px; }
  .flow__node.is-on { transform: translateX(6px); }
  .flow__wire { flex: 0 0 22px; width: 1px; min-width: 0; height: 22px; margin-left: 28px; overflow: visible; }
  .timeline::before, .timeline::after { left: 6px; }
  .role { grid-template-columns: 1fr; padding-left: 36px; }
  .role::before { left: 0; }
  .role__when span { position: static; margin-bottom: 10px; }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats div:nth-child(3) { border-left: 0; padding-left: 0; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .kbd-btn kbd { display: none; }
  .hero { padding-bottom: 120px; }
  .section__head { grid-template-columns: 1fr; gap: 8px; }
  .section__num { padding-top: 0; }
  .features { grid-template-columns: 1fr; }
  .feature { min-height: 0; }
  .model-grid, .products { grid-template-columns: 1fr; }
  .model { min-height: 0; }
  .map { aspect-ratio: 144 / 70; }
  .pin span { font-size: 11px; padding: 4px 7px; opacity: 0; transition: opacity 0.3s; }
  .pin { width: 10px; height: 10px; }
  .pin.is-on span { opacity: 1; }
  .teams li { grid-template-columns: 1fr 52px; }
  .teams__bar { grid-column: 1 / -1; grid-row: 2; }
  .loop__node { font-size: 11px; padding: 6px 9px; }
  .mail { padding: 18px 22px; max-width: 100%; }
  .contact__actions { flex-direction: column; width: 100%; max-width: 360px; }
  .mail__addr { font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .reveal, .split .w > span { opacity: 1; transform: none; }
}

/* ---------- polish pass: hero, at a glance, capabilities, quieter detail ---------- */
.hero__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(24px, 4vw, 64px); align-items: end; width: 100%; max-width: 1360px; }
.hero__role { margin: 40px 0 0; font-size: clamp(19px, 2vw, 24px); line-height: 1.45; color: var(--fg); max-width: 34ch; }
.hero__open { display: inline-flex; align-items: center; gap: 10px; margin: 18px 0 0; font: 400 13px/1.4 var(--mono); color: var(--muted); }
.hero__open .dot { width: 8px; height: 8px; border-radius: 50%; background: #3fb950; box-shadow: 0 0 0 4px rgba(63, 185, 80, 0.18); }
.hero__portrait { width: 100%; max-width: 470px; justify-self: end; pointer-events: auto; }
.btn--ghost { border-color: transparent; color: var(--muted); }
.btn--ghost:hover { color: var(--bg); }
.nav__li { color: var(--fg); }

.glance__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.glance__bio p { margin: 0 0 24px; color: var(--muted); max-width: 60ch; }
.glance__bio .big { font-size: clamp(22px, 2.4vw, 32px); line-height: 1.3; color: var(--fg); letter-spacing: -0.01em; }
.career { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.career li { display: grid; grid-template-columns: 112px 1fr; gap: 2px 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.career time { grid-row: span 2; font: 400 12px/1.6 var(--mono); color: var(--muted); }
.career b { font: 400 24px/1.1 var(--serif); }
.career span { font-size: 14px; color: var(--muted); }
.career li:first-child b { color: var(--accent); }
.career__more { grid-template-columns: 1fr !important; }
.career__more span { font: 400 12px/1.5 var(--mono); }

.stack { margin: 0; font: 400 13px/1.5 var(--mono); color: var(--muted); }
.sub { margin: clamp(64px, 8vw, 96px) 0 20px; font: 500 12px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.more { display: inline-flex; margin-top: 20px; font-size: 15px; color: var(--fg); background: linear-gradient(var(--accent), var(--accent)) 0 100% / 100% 1px no-repeat; padding-bottom: 2px; transition: color 0.3s; }
.more:hover { color: var(--accent); }

.caps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cap { padding: 22px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.cap h4 { margin: 0; font: 400 28px/1.05 var(--serif); }
.cap p { margin: 0; font-size: 15px; color: var(--muted); }
.cap .stack { margin-top: auto; padding-top: 6px; }

.model__kind { margin: 0; font: 400 12px/1.3 var(--mono); color: var(--muted); }
.model h4 { margin: 4px 0 0; font: 400 clamp(28px, 2.4vw, 36px)/1 var(--serif); }
.model .stack { margin-top: auto; }
a.model:hover h4 { color: var(--accent); }
.product { padding-bottom: 22px; }
.feature .stack { margin-top: auto; }
.flow__detail .stack { margin-top: 4px; }

.contact__lede { margin: 20px 0 0; color: var(--muted); font-size: 18px; }
.contact__actions { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; align-items: stretch; }
.contact__actions .btn { height: auto; min-height: 52px; padding: 0 32px; }
.contact__actions .mail { margin-top: 0; }

@media (max-width: 960px) {
  .hero__grid, .glance__grid { grid-template-columns: 1fr; }
  .hero__portrait { justify-self: start; max-width: 340px; }
  .caps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .hero { padding-top: 104px; }
  .hero__portrait { max-width: 270px; }
  .caps { grid-template-columns: 1fr; }
  .career li { grid-template-columns: 1fr; }
  .career time { grid-row: auto; }
  .nav__li { display: none; }
}

/* ---------- neural aurora hero ---------- */
.aurora { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; pointer-events: none; }
.has-aurora .hero::before {
  background: radial-gradient(circle at 1px 1px, var(--line) 1px, transparent 1.5px) 0 0 / 22px 22px;
}

/* ---------- How I build with AI: featured band with a pinned loop ---------- */
.ai { position: relative; isolation: isolate; padding-bottom: clamp(64px, 9vw, 120px); margin-top: clamp(64px, 9vw, 120px); }
.ai::before { content: ""; position: absolute; inset: 0 calc(50% - 50vw); z-index: -1; background: var(--bg-2); border-block: 1px solid var(--line); }
.ai__lede { margin: 0 0 clamp(40px, 6vw, 80px); max-width: 38ch; font-size: clamp(22px, 2.4vw, 32px); line-height: 1.3; color: var(--muted); letter-spacing: -0.01em; }
.ai__lede b { color: var(--fg); font-weight: 500; }
.ai__grid { display: grid; grid-template-columns: minmax(280px, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); }
.ai__sticky { position: sticky; top: 14vh; align-self: start; display: flex; flex-direction: column; gap: 32px; }
.ai__sticky .loop { max-width: 340px; margin: 0; }
.loop__node { animation: nodeIn 0.5s var(--ease) both; animation-delay: calc(var(--k, 0) * 70ms); }
@keyframes nodeIn { from { opacity: 0; scale: 0.8; } }
.ai__index { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.ai__index a { display: flex; gap: 14px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 16px; transition: color 0.3s, padding 0.4s var(--ease); }
.ai__index a span { font: 500 12px/1 var(--mono); }
.ai__index a:hover { color: var(--fg); }
.ai__index a.is-on { color: var(--fg); padding-left: 10px; box-shadow: inset 2px 0 0 var(--accent); }
.ai__index a.is-on span { color: var(--accent); }
.pillar { min-height: 62vh; padding: 10vh 0; border-top: 1px solid var(--line); opacity: 0.3; transition: opacity 0.6s var(--ease); }
.pillar:first-child { border-top: 0; padding-top: 0; }
.pillar.is-on { opacity: 1; }
.pillar__n { margin: 0 0 14px; font: 500 12px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.pillar h3 { margin: 0 0 16px; font: 400 clamp(34px, 4vw, 58px)/1.02 var(--serif); letter-spacing: -0.02em; max-width: 18ch; }
.pillar__text { margin: 0 0 24px; color: var(--muted); font-size: 18px; max-width: 56ch; }
.pillar__points { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 10px; }
.pillar__points li { display: grid; grid-template-columns: 22px 1fr; gap: 8px; font-size: 16px; line-height: 1.45; }
.pillar__points li::before { content: "→"; color: var(--accent); font-family: var(--mono); }
.pillar__proof { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 16px; padding: 18px 0; margin-bottom: 18px; border-block: 1px solid var(--line); }
.pillar__proof b { font: 400 clamp(36px, 4vw, 56px)/1 var(--serif); font-weight: 400; color: var(--accent); }
.pillar__proof span { font: 400 13px/1.4 var(--mono); color: var(--muted); }
.pillar__stages { display: none; margin: 12px 0 0; font: 400 12px/1.5 var(--mono); color: var(--muted); }

@media (max-width: 960px) {
  .ai__grid { grid-template-columns: 1fr; }
  .ai__sticky { display: none; }
  .pillar { min-height: 0; padding: 48px 0; opacity: 1; }
  .pillar__stages { display: block; }
}
@media (max-width: 640px) {
  .aurora { opacity: 0.75; }
}

/* ---------- cursor light: trailing glow and card edges that light up as the cursor nears ---------- */
.cursor-glow {
  position: fixed; left: 0; top: 0; z-index: 1; width: 560px; height: 560px; margin: -280px 0 0 -280px;
  border-radius: 50%; pointer-events: none; will-change: transform; mix-blend-mode: screen;
  background: radial-gradient(circle, color-mix(in srgb, var(--aurora-1) 14%, transparent) 0%, color-mix(in srgb, var(--aurora-3) 7%, transparent) 38%, transparent 66%);
  transition: opacity 0.5s, width 0.5s var(--ease), height 0.5s var(--ease), margin 0.5s var(--ease);
}
:root[data-theme="light"] .cursor-glow {
  mix-blend-mode: multiply;
  background: radial-gradient(circle, color-mix(in srgb, var(--aurora-2) 26%, transparent) 0%, color-mix(in srgb, var(--aurora-3) 8%, transparent) 40%, transparent 66%);
}
.cursor-glow.is-hidden { opacity: 0; }
.cursor-glow.is-target { width: 260px; height: 260px; margin: -130px 0 0 -130px; }

.product, .model, .feature, .cap { position: relative; isolation: isolate; }
.card, .product, .model, .feature, .cap { --spot: 0; }
.product, .model, .feature, .cap {
  background-image: radial-gradient(360px circle at var(--mx, -999px) var(--my, -999px), color-mix(in srgb, var(--accent) calc(var(--spot) * 9%), transparent), transparent 70%);
}
.card::after, .product::after, .model::after, .feature::after, .cap::after {
  content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; padding: 1px; pointer-events: none;
  background: radial-gradient(220px circle at var(--mx, -999px) var(--my, -999px), var(--accent), transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: var(--spot);
}

/* ---------- hero parallax: the name docks into the logo ---------- */
.dock .nav__logo { opacity: var(--logo-in, 1); transition: opacity 0.2s; }
.dock .hero__title { transform-origin: 0 0; will-change: translate, scale, opacity; }
.dock .hero__fade, .dock .hero__portrait, .dock .aurora { will-change: translate, opacity; }

/* ---------- map journey: pinned map, flying camera, story card ---------- */
.journey { position: relative; }
.journey__card { display: none; }
.journey__stops { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.journey__stops li { padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-2); }
.journey__stops b, .journey__k { display: block; margin: 0 0 6px; font: 500 12px/1.3 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.journey__stops h4, .journey__t { margin: 0 0 6px; font: 400 28px/1.05 var(--serif); }
.journey__stops p, .journey__x { margin: 0; font-size: 15px; color: var(--muted); }

.journey--live { height: calc(var(--stops) * 70vh + 100vh); }
.journey--live .journey__sticky { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; justify-content: center; padding-top: 64px; }
.journey--live .journey__stops { display: none; }
.journey--live .journey__card {
  display: block; position: absolute; left: 20px; bottom: 20px; z-index: 2; width: min(360px, 46%); padding: 18px 20px;
  border: 1px solid var(--line-2); border-radius: 16px; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(10px);
}
.journey__card.swap > * { animation: rise 0.6s var(--ease) both; }
.journey__card.swap > *:nth-child(2) { animation-delay: 60ms; } .journey__card.swap > *:nth-child(3) { animation-delay: 120ms; }
.journey__dots { list-style: none; display: flex; gap: 6px; margin: 14px 0 0; padding: 0; }
.journey__dots li { width: 18px; height: 3px; border-radius: 3px; background: var(--line-2); transition: background 0.3s, width 0.4s var(--ease); }
.journey__dots li.is-on { width: 34px; background: var(--accent); }
.journey--live .map { width: 100%; aspect-ratio: auto; height: min(74vh, 700px); }
.footprint__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: start; }
.footprint__grid .teams { grid-column: 1; }
.footprint__grid .countries__clients { grid-column: 2; margin: 32px 0 0; }

@media (max-width: 960px) {
  .footprint__grid .countries__clients { grid-column: 1; margin-top: 0; }
}
@media (max-width: 640px) {
  .journey--live .journey__sticky { justify-content: flex-start; padding-top: 88px; }
  .journey--live .map { overflow: visible; height: auto; aspect-ratio: 144 / 70; }
  .journey--live .journey__card { position: absolute; left: 0; right: 0; bottom: auto; top: calc(100% + 16px); width: auto; }
}
/* The aurora drifts down with parallax; fade the hero's bottom edge so the glow never ends in a hard line */
.dock .hero { -webkit-mask-image: linear-gradient(#000 calc(100% - 110px), transparent); mask-image: linear-gradient(#000 calc(100% - 110px), transparent); }

/* ---------- AI loop runs with scroll; points stream in; proof decodes ---------- */
.loop__ring .loop__trail { stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: var(--trail, 0) 100; transition: stroke-dasharray 0.15s linear; }
.loop__ring .loop__spark { fill: var(--accent); stroke: none; transition: opacity 0.3s; }
.loop__node.is-done { border-color: var(--accent); color: var(--accent); }
.tok { opacity: 0; transition: opacity 0.18s ease-out; }
.tok.in { opacity: 1; }
.pillar__points li:not(:has(.tok.in)):has(.tok)::before { opacity: 0; }
.pillar__points li::before { transition: opacity 0.2s; }
.pillar__proof b { font-variant-numeric: tabular-nums; }

/* ---------- back to top ---------- */
.to-top {
  position: fixed; right: var(--gutter); bottom: 24px; z-index: 60; width: 52px; height: 52px; padding: 0; border-radius: 50%;
  display: grid; place-items: center; color: var(--fg);
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(10px); border: 1px solid var(--line);
  opacity: 0; translate: 0 16px; pointer-events: none;
  transition: opacity 0.4s var(--ease), translate 0.5s var(--ease), color 0.3s, border-color 0.3s;
}
.to-top.is-on { opacity: 1; translate: 0 0; pointer-events: auto; }
.to-top:hover { color: var(--accent); border-color: var(--accent); }
.to-top svg { width: 100%; height: 100%; overflow: visible; }
.to-top__track { fill: none; stroke: var(--line); stroke-width: 1.5; }
.to-top__ring { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-dasharray: var(--done, 0) 100; }
.to-top path { transition: translate 0.4s var(--ease); }
.to-top:hover path { translate: 0 -2px; }
@media (max-width: 640px) { .to-top { right: 16px; bottom: 16px; width: 46px; height: 46px; } }
.hero__title:focus { outline: none; }

/* ---------- static map (phones, tablets, reduced motion): no drawing animation ---------- */
.journey:not(.journey--live) .map__arcs path { animation: none; stroke-dashoffset: 0; }

/* ---------- touch: larger tap areas without changing the look ---------- */
.pin::after { content: ""; position: absolute; inset: -12px; }
@media (max-width: 640px) {
  .nav__tools .kbd-btn, .nav__tools .icon-btn { height: 40px; }
  .nav__tools .icon-btn { width: 40px; }
  .nav__logo { padding: 6px 4px; margin: -6px -4px; }
  .more { padding: 9px 0; background-position: 0 calc(100% - 9px); }
}

