/* ==========================================================================
   Afaque Jaya — Portfolio
   Design system: warm "paper" editorial pages + a dark "stage" for products.
   No framework. Motion is CSS transitions driven by js/main.js.
   ========================================================================== */

:root {
  /* Colour */
  --paper: #f3efe7;
  --paper-2: #ebe5da;
  --paper-3: #e1d9cb;
  --ink: #121110;
  --ink-2: #3d3a35;
  --ink-3: #6f6a61;
  --line: rgba(18, 17, 16, 0.12);
  --line-strong: rgba(18, 17, 16, 0.22);

  --night: #0d0e10;
  --night-2: #15171a;
  --night-3: #1d2024;
  --night-line: rgba(243, 239, 231, 0.1);
  --night-text: #f3efe7;
  --night-muted: #a19c92;

  --accent: #ff5b24;          /* signal orange */
  --accent-ink: #c43a0c;      /* accent on paper, AA for text */
  --accent-soft: rgba(255, 91, 36, 0.12);
  --teal: #a9cdd5;            /* echoes the portrait backdrop */

  /* Type */
  --f-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --f-body: "Geist", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --f-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  /* Space & layout */
  --gutter: clamp(16px, 4.2vw, 56px);
  --maxw: 1360px;
  --section-y: clamp(88px, 12vw, 176px);
  --radius: 18px;
  --radius-sm: 10px;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur: 0.9s;

  --nav-h: 70px;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }
ul, ol { margin: 0; padding: 0; list-style: none; }
dl, dd { margin: 0; }

::selection { background: var(--accent); color: #fff; }

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

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 8px;
  transform: translateY(-160%);
  transition: transform 0.2s;
}
.skip-link:focus { transform: none; }

/* Film grain — a single static SVG noise tile, no animation. */
.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 90;
  opacity: 0.07;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* --------------------------------------------------------------------------
   Type helpers
   -------------------------------------------------------------------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.eyebrow .num { color: var(--accent-ink); }
.on-night .eyebrow { color: var(--night-muted); }
.on-night .eyebrow .num { color: var(--accent); }

.serif { font-family: var(--f-serif); font-weight: 400; font-style: italic; letter-spacing: -0.01em; }

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  margin-bottom: clamp(48px, 7vw, 96px);
}
.section-title {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(2.3rem, 6vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  max-width: 16ch;
  font-variation-settings: "opsz" 96;
}
.section-title .serif { font-size: 1.08em; letter-spacing: -0.02em; }
.section-lead {
  max-width: 56ch;
  color: var(--ink-2);
  font-size: clamp(1rem, 1.25vw, 1.15rem);
}
.on-night .section-lead { color: var(--night-muted); }

@media (min-width: 960px) {
  .section-head.split {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    align-items: end;
    column-gap: 64px;
  }
}

/* --------------------------------------------------------------------------
   Buttons & links
   -------------------------------------------------------------------------- */
.btn {
  --bg: var(--ink);
  --fg: var(--paper);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--fg);
  font-weight: 500;
  font-size: 15.5px;
  letter-spacing: -0.005em;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out), color 0.35s;
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--accent);
  transform: translateY(101%);
  transition: transform 0.45s var(--ease-out);
}
.btn .arrow { transition: transform 0.35s var(--ease-out); }
.btn svg { width: 18px; height: 18px; flex: none; }

@media (hover: hover) {
  .btn:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -14px rgba(18, 17, 16, 0.5); }
  .btn:hover::before { transform: translateY(0); }
  .btn:hover .arrow { transform: translateX(3px); }
  .btn.ghost:hover { color: #fff; border-color: transparent; }
}

.btn.ghost {
  --bg: transparent;
  --fg: var(--ink);
  border: 1px solid var(--line-strong);
}
.on-night .btn { --bg: var(--night-text); --fg: var(--night); }
.on-night .btn.ghost { --bg: transparent; --fg: var(--night-text); border-color: rgba(243, 239, 231, 0.24); }
@media (hover: hover) {
  .on-night .btn:hover { color: #fff; }
}

.text-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 0.45s var(--ease-out), color 0.2s;
}
.text-link:hover { background-size: 100% 1px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.01em;
  color: var(--ink-2);
  white-space: nowrap;
}
.on-night .chip { border-color: var(--night-line); color: #cfc9be; }

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */
.progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 120;
  height: 2px;
  background: var(--accent);
  transform-origin: 0 50%;
  transform: scaleX(0);
  pointer-events: none;
}

/* Nav — three floating rounded pills (brand · section tabs · CTA), always on
   top. A filled indicator slides to the section you're reading; on smaller
   screens the tabs become a swipeable strip that keeps the active tab centred. */
/* The pills always contrast with what's behind them: dark pills over the
   light pages, light pills over dark sections (.is-dark) and the menu. */
.nav {
  --pill-bg: rgba(22, 21, 19, 0.86);
  --pill-line: rgba(243, 239, 231, 0.1);
  --pill-shadow: 0 12px 30px -16px rgba(18, 17, 16, 0.6);
  --ind-bg: var(--paper);
  --ind-fg: var(--ink);
  --role: #a19c92;
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  pointer-events: none; /* only the pills are interactive */
  color: var(--night-text);
  transition: color 0.35s;
}
.nav.is-dark,
.menu-open .nav {
  --pill-bg: rgba(250, 248, 243, 0.92);
  --pill-line: rgba(18, 17, 16, 0.1);
  --pill-shadow: 0 12px 30px -16px rgba(0, 0, 0, 0.7);
  --ind-bg: var(--ink);
  --ind-fg: var(--paper);
  --role: var(--ink-3);
  color: var(--ink);
}
.nav .wrap {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav .wrap > * { pointer-events: auto; }

.pill {
  background: var(--pill-bg);
  border: 1px solid var(--pill-line);
  border-radius: 999px;
  box-shadow: var(--pill-shadow);
  -webkit-backdrop-filter: saturate(1.5) blur(16px);
  backdrop-filter: saturate(1.5) blur(16px);
  transition: background-color 0.35s, border-color 0.35s, box-shadow 0.35s;
}

.brand {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 4px;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 16.5px;
  letter-spacing: -0.02em;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--ind-bg);
  color: var(--ind-fg);
  font-size: 13px;
  letter-spacing: 0;
  transition: background-color 0.35s, color 0.35s;
}
.brand-name { display: none; white-space: nowrap; padding-right: 10px; }
.brand-role { color: var(--role); font-weight: 400; font-family: var(--f-body); font-size: 13.5px; transition: color 0.35s; }

/* Section tabs */
.tabs {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 2px;
  height: 46px;
  padding: 4px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
}
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  position: relative;
  z-index: 1;
  flex: none;
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  color: inherit;
  opacity: 0.72;
  transition: color 0.4s var(--ease-out), opacity 0.3s;
}
.tabs a:hover { opacity: 1; }
.tabs a[aria-current="true"] { color: var(--ind-fg); opacity: 1; }
.tab-ind {
  position: absolute;
  top: 4px;
  left: 0;
  height: 36px;
  width: 0;
  border-radius: 999px;
  background: var(--ind-bg);
  opacity: 0;
  transform: translateX(0);
  transition: transform 0.6s var(--ease-out), width 0.6s var(--ease-out), opacity 0.35s, background-color 0.35s;
  pointer-events: none;
}
.tabs.has-active .tab-ind { opacity: 1; }
.menu-open .nav .tabs { opacity: 0; pointer-events: none; }

.nav-cta { display: none; flex: none; min-height: 46px; padding: 0 20px; font-size: 14.5px; box-shadow: var(--pill-shadow); }
.nav .nav-cta { --bg: var(--accent); --fg: #fff; }
.nav .nav-cta::before { background: var(--ink); }
.nav.is-dark .nav-cta::before { background: var(--paper); }
@media (hover: hover) { .nav.is-dark .nav-cta:hover { color: var(--ink); } }

.menu-btn {
  flex: none;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
}
.menu-btn .bars {
  position: relative;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--ind-bg);
  transition: background-color 0.35s;
}
.menu-btn .bars::before,
.menu-btn .bars::after {
  content: "";
  position: absolute;
  left: 11px; right: 11px;
  height: 1.5px;
  background: var(--ind-fg);
  transition: transform 0.4s var(--ease-out), background-color 0.35s;
}
.menu-btn .bars::before { top: 14px; }
.menu-btn .bars::after { top: 20px; }
.menu-open .menu-btn .bars::before { transform: translateY(3px) rotate(45deg); }
.menu-open .menu-btn .bars::after { transform: translateY(-3px) rotate(-45deg); }

@media (min-width: 1080px) {
  .nav .wrap { justify-content: space-between; }
  .brand { padding: 0 4px 0 4px; }
  .brand-name { display: inline; }
  .tabs { flex: 0 0 auto; overflow: visible; -webkit-mask-image: none; mask-image: none; }
  .tab-contact { display: none !important; }
  .nav-cta { display: inline-flex; }
  .menu-btn { display: none; }
}

/* Mobile menu */
.menu {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(var(--nav-h) + 24px) var(--gutter) 32px;
  background: var(--night);
  color: var(--night-text);
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
  transition: clip-path 0.6s var(--ease-in-out), visibility 0s linear 0.6s;
}
.menu-open .menu {
  clip-path: inset(0 0 0 0);
  visibility: visible;
  transition: clip-path 0.6s var(--ease-in-out), visibility 0s;
}
.menu-open { overflow: hidden; }

.menu ol { counter-reset: m; }
.menu li { overflow: hidden; }
.menu ol a {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 6px 0;
  font-family: var(--f-display);
  font-size: clamp(2.1rem, 9vw, 3.6rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.035em;
  transform: translateY(105%);
  transition: transform 0.6s var(--ease-out);
}
.menu ol a::before {
  counter-increment: m;
  content: "0" counter(m);
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--accent);
  transform: translateY(-1.1em);
}
.menu-open .menu ol a { transform: none; }
.menu-open .menu li:nth-child(2) a { transition-delay: 0.04s; }
.menu-open .menu li:nth-child(3) a { transition-delay: 0.08s; }
.menu-open .menu li:nth-child(4) a { transition-delay: 0.12s; }
.menu-open .menu li:nth-child(5) a { transition-delay: 0.16s; }
.menu-open .menu li:nth-child(6) a { transition-delay: 0.2s; }
.menu-open .menu li:nth-child(7) a { transition-delay: 0.24s; }
.menu-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
  font-size: 15px;
  color: var(--night-muted);
}
.menu-foot a { color: var(--night-text); }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  padding-top: calc(var(--nav-h) + clamp(28px, 6vw, 72px));
  padding-bottom: clamp(40px, 6vw, 72px);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(36px, 5vw, 64px);
}
@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    align-items: center;
  }
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13.5px;
  color: var(--ink-2);
  background: rgba(255, 255, 255, 0.35);
}
.status .dot {
  position: relative;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #23a55a;
}
.status .dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid #23a55a;
  opacity: 0;
  animation: ping 2.6s var(--ease-out) infinite;
}
@media (max-width: 480px) { .status-name { display: none; } }
@keyframes ping {
  0% { transform: scale(0.6); opacity: 0.8; }
  70%, 100% { transform: scale(1.6); opacity: 0; }
}

.hero h1 {
  margin-top: clamp(20px, 3vw, 32px);
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(2.65rem, 6.6vw, 7rem);
  line-height: 0.94;
  letter-spacing: -0.045em;
  font-variation-settings: "opsz" 96;
}
.hero h1 .line { display: block; overflow: hidden; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.hero h1 .line > span { display: inline-block; }
.hero h1 .serif {
  font-weight: 400;
  font-size: 1.06em;
  letter-spacing: -0.025em;
  color: var(--accent-ink);
}

.hero-lead {
  margin-top: clamp(22px, 3vw, 34px);
  max-width: 54ch;
  font-size: clamp(1.03rem, 1.35vw, 1.2rem);
  color: var(--ink-2);
}
.hero-lead strong { color: var(--ink); font-weight: 600; }

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero-stack {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 34px;
}
.hero-stack .label {
  margin-right: 6px;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* Portrait */
.portrait {
  position: relative;
  width: min(100%, 520px);
  margin-inline: auto;
}
.portrait-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--teal);
  box-shadow: 0 40px 80px -48px rgba(18, 17, 16, 0.55), 0 0 0 1px rgba(18, 17, 16, 0.06);
}
.portrait-frame img {
  width: 100%;
  height: 112%;
  object-fit: cover;
  object-position: 50% 12%;
  transform: translate3d(0, var(--py, 0px), 0) scale(1.02);
  will-change: transform;
}
.portrait-caption {
  position: absolute;
  left: 16px; bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 8px;
  border-radius: 999px;
  background: rgba(243, 239, 231, 0.88);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-size: 13px;
  line-height: 1.25;
  color: var(--ink);
}
.portrait-caption b { display: block; font-weight: 600; }
.portrait-caption span { color: var(--ink-3); }
.portrait-caption i {
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-style: normal;
  font-size: 14px;
}

.float-tag {
  position: absolute;
  z-index: 2;
  display: flex;
  flex-direction: column;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px -24px rgba(18, 17, 16, 0.45);
  font-size: 12.5px;
  color: var(--ink-3);
  line-height: 1.25;
}
.float-tag b {
  font-family: var(--f-display);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1.05;
}
.float-tag.t1 { top: 9%; right: -14px; }
.float-tag.t2 { top: 44%; left: -22px; }
.float-tag.t2 b { color: var(--accent-ink); }
@media (max-width: 600px) {
  .float-tag { padding: 9px 12px; font-size: 11.5px; }
  .float-tag b { font-size: 20px; }
  .float-tag.t1 { right: -6px; }
  .float-tag.t2 { left: -6px; }
}
@media (max-width: 959px) {
  .portrait { width: min(100%, 440px); }
}

/* Gentle ambient drift — transform only, paused for reduced motion. */
.drift { animation: drift 7s ease-in-out infinite alternate; }
.drift.slow { animation-duration: 9s; animation-delay: -3s; }
@keyframes drift {
  from { transform: translate3d(0, -6px, 0); }
  to { transform: translate3d(0, 6px, 0); }
}

/* Proof bar */
.proof {
  margin-top: clamp(56px, 8vw, 104px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line-strong);
}
.proof-item {
  padding: 22px 0 6px;
  border-bottom: 1px solid var(--line);
}
.proof-item:nth-child(odd) { padding-right: 16px; }
.proof-item:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--line); }
.proof-value {
  font-family: var(--f-display);
  font-size: clamp(2.2rem, 4.6vw, 3.8rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.proof-value sup { font-size: 0.5em; vertical-align: 0.65em; margin-left: 2px; color: var(--accent-ink); }
.proof-label { margin-top: 10px; font-size: 14px; color: var(--ink-3); line-height: 1.4; padding-bottom: 14px; }
@media (min-width: 860px) {
  .proof { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .proof-item { border-bottom: 0; padding: 26px 24px 0 !important; border-left: 1px solid var(--line); }
  .proof-item:first-child { border-left: 0; padding-left: 0 !important; }
}

/* --------------------------------------------------------------------------
   Night (dark) sections
   -------------------------------------------------------------------------- */
.on-night {
  position: relative;
  background: var(--night);
  color: var(--night-text);
}
.on-night ::selection { background: var(--accent); color: #fff; }

/* --------------------------------------------------------------------------
   Products
   -------------------------------------------------------------------------- */
.work {
  padding-block: var(--section-y);
  border-radius: clamp(20px, 3vw, 36px) clamp(20px, 3vw, 36px) 0 0;
}
.work .section-title { max-width: 13ch; }

.app-index {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}
.app-index a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 5px 14px 5px 5px;
  border: 1px solid var(--night-line);
  border-radius: 999px;
  font-size: 14px;
  color: #d9d3c8;
  transition: border-color 0.3s, background-color 0.3s, color 0.3s;
}
.app-index a:hover { border-color: rgba(243, 239, 231, 0.32); background: var(--night-2); color: #fff; }
.app-index a[aria-current="true"] { border-color: var(--accent); color: #fff; }
.app-index img { width: 32px; height: 32px; border-radius: 9px; background: var(--night-3); }

.apps { display: grid; gap: clamp(96px, 14vw, 200px); }

.app {
  --app: var(--accent);
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(40px, 6vw, 72px);
  align-items: center;
}
@media (min-width: 960px) {
  .app { grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 72px; }
  .app:nth-child(even) .app-copy { order: 2; }
}

.app-copy { max-width: 560px; }
.app-meta-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--night-muted);
}
.app-meta-top .bar { flex: 1; height: 1px; background: var(--night-line); }
.app-meta-top .idx { color: var(--app); }

.app-title {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 26px;
}
.app-icon {
  flex: none;
  width: 72px; height: 72px;
  border-radius: 18px;
  background: var(--night-3);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 18px 36px -18px var(--app);
  transition: transform 0.5s var(--ease-out);
}
@media (hover: hover) {
  .app:hover .app-icon { transform: rotate(-4deg) scale(1.04); }
}
.app-title h3 {
  font-family: var(--f-display);
  font-size: clamp(2rem, 4.2vw, 3.4rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
}
.app-title .kind { display: block; margin-top: 8px; font-size: 14.5px; color: var(--night-muted); letter-spacing: 0; font-family: var(--f-body); font-weight: 400; }

.app-summary {
  margin-top: 26px;
  font-size: clamp(1.05rem, 1.4vw, 1.22rem);
  line-height: 1.55;
  color: #e7e1d6;
}

.app-facts {
  display: grid;
  gap: 18px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--night-line);
}
.app-facts dt {
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--app);
  margin-bottom: 4px;
}
.app-facts dd { color: var(--night-muted); font-size: 15.5px; line-height: 1.55; }
@media (min-width: 600px) {
  .app-facts { grid-template-columns: 1fr 1fr; column-gap: 28px; }
}

.app-stack { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }

.app-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
  margin-top: 30px;
}
.app-metric {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.app-metric b {
  font-family: var(--f-display);
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--night-text);
}
.app-metric span { font-size: 13.5px; color: var(--night-muted); line-height: 1.3; max-width: 18ch; }

.store-links { display: flex; flex-wrap: wrap; gap: 10px; }
.store {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 16px 0 13px;
  border-radius: 12px;
  border: 1px solid rgba(243, 239, 231, 0.2);
  font-size: 14px;
  font-weight: 500;
  color: var(--night-text);
  transition: background-color 0.3s, border-color 0.3s, transform 0.3s var(--ease-out);
}
.store svg { width: 18px; height: 18px; }
.store small { display: block; font-size: 10.5px; font-weight: 400; color: var(--night-muted); line-height: 1.1; letter-spacing: 0.02em; }
.store span { line-height: 1.15; }
.store:hover { background: var(--night-text); color: var(--night); border-color: var(--night-text); transform: translateY(-2px); }
.store:hover small { color: #5c574f; }

/* Device stage
   .slot  — absolutely placed; JS writes a scroll-driven translate on it
   .enter — one-time entrance (opacity/translate)
   .tilt  — static rotation + idle float
   .phone (device frame around a raw UI capture) | .card (store panel) */
.stage {
  position: relative;
  height: clamp(520px, 52vw, 700px);
  isolation: isolate;
}
.stage::before {
  content: "";
  position: absolute;
  inset: 10% 6% 6%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--app) 30%, transparent), transparent 72%);
  opacity: 0.6;
}
.slot {
  --w: clamp(190px, 21vw, 280px);
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--w);
  margin: 0;
  margin-left: calc(var(--w) / -2);
  translate: 0 -50%;
  will-change: transform;
}
.slot.s-main { z-index: 3; }
.slot.s-left, .slot.s-right { --w: clamp(150px, 16.5vw, 228px); z-index: 2; }
.slot.s-left { margin-left: calc(var(--w) * -1.42); top: 54%; }
.slot.s-right { margin-left: calc(var(--w) * 0.42); top: 46%; z-index: 1; }
.slot.s-left .tilt { rotate: -7deg; }
.slot.s-right .tilt { rotate: 6deg; }
.slot.s-left .shot, .slot.s-right .shot { filter: brightness(0.82) saturate(0.92); }

.enter { width: 100%; }
.tilt { width: 100%; }
.stage.is-visible .s-main .tilt { animation: float 6s ease-in-out infinite alternate; }
.stage.is-visible .s-right .tilt { animation: float 7.5s ease-in-out -2s infinite alternate; }
@keyframes float {
  from { transform: translate3d(0, -7px, 0); }
  to { transform: translate3d(0, 7px, 0); }
}

.phone {
  padding: calc(var(--w) * 0.034);
  border-radius: calc(var(--w) * 0.14);
  background: linear-gradient(145deg, #34373d, #0b0c0e 42%, #26292e);
  box-shadow:
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.09),
    0 0 0 1px rgba(0, 0, 0, 0.7),
    0 50px 80px -40px rgba(0, 0, 0, 0.95),
    0 30px 70px -50px var(--app);
}
.phone .screen {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--w) * 0.11);
  background: #000;
  aspect-ratio: var(--ar);
}
.phone .screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0) 30%);
}
.card {
  position: relative;
  overflow: hidden;
  aspect-ratio: var(--ar);
  border-radius: calc(var(--w) * 0.08);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 50px 80px -40px rgba(0, 0, 0, 0.95),
    0 30px 70px -50px var(--app);
}
.shot { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }

@media (max-width: 959px) {
  .stage { height: auto; aspect-ratio: 1 / 1.08; max-width: 620px; width: 100%; margin-inline: auto; }
  .slot { --w: 40%; }
  .slot.s-left, .slot.s-right { --w: 31%; }
}
@media (max-width: 600px) {
  .stage { aspect-ratio: 1 / 1.25; }
  .slot { --w: 53%; }
  .slot.s-left, .slot.s-right { --w: 38%; }
  .slot.s-left { margin-left: calc(var(--w) * -1.3); }
  .slot.s-right { margin-left: calc(var(--w) * 0.3); }
}

.app-note { margin-top: 14px; font-size: 13px; color: var(--night-muted); font-style: italic; }

/* More shipped apps */
.more-apps {
  margin-top: clamp(96px, 12vw, 160px);
  padding-top: 40px;
  border-top: 1px solid var(--night-line);
}
.more-apps h3 {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  letter-spacing: -0.03em;
}
.more-apps > p { margin-top: 10px; color: var(--night-muted); max-width: 60ch; }
.more-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin-top: 32px;
  border-top: 1px solid var(--night-line);
}
@media (min-width: 760px) { .more-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.more-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 4px;
  border-bottom: 1px solid var(--night-line);
  transition: background-color 0.3s;
}
@media (min-width: 760px) {
  .more-item:nth-child(odd) { padding-right: 24px; border-right: 1px solid var(--night-line); }
  .more-item:nth-child(even) { padding-left: 24px; }
}
.more-item img { width: 52px; height: 52px; border-radius: 13px; flex: none; background: var(--night-3); }
.more-item .t { flex: 1; min-width: 0; }
.more-item .mono {
  flex: none;
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  border-radius: 13px;
  background: var(--night-3);
  border: 1px solid var(--night-line);
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.03em;
  color: var(--night-muted);
}
.more-item .t .where { margin-top: 4px; font-family: var(--f-mono); font-size: 11.5px; letter-spacing: 0.04em; color: #7d786f; }
.more-item b { display: block; font-weight: 600; font-size: 16.5px; }
.more-item span { display: block; color: var(--night-muted); font-size: 14px; line-height: 1.45; }
.more-item .go {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--night-line);
  transition: background-color 0.3s, color 0.3s, transform 0.4s var(--ease-out);
}
.more-item .go svg { width: 16px; height: 16px; }
.more-item:hover .go { background: var(--accent); border-color: var(--accent); color: #fff; transform: rotate(-45deg); }

/* --------------------------------------------------------------------------
   Impact
   -------------------------------------------------------------------------- */
.impact { padding-block: var(--section-y); }
.impact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  border-top: 1px solid var(--line-strong);
}
@media (min-width: 720px) { .impact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1080px) { .impact-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.metric {
  position: relative;
  padding: 32px 0 34px;
  border-bottom: 1px solid var(--line);
}
@media (min-width: 720px) {
  .metric { padding: 36px 32px 40px; border-left: 1px solid var(--line); }
  .metric:nth-child(2n + 1) { border-left: 0; padding-left: 0; }
}
@media (min-width: 1080px) {
  .metric:nth-child(2n + 1) { border-left: 1px solid var(--line); padding-left: 32px; }
  .metric:nth-child(3n + 1) { border-left: 0; padding-left: 0; }
}
.metric-value {
  font-family: var(--f-display);
  font-size: clamp(3.4rem, 7vw, 6rem);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.055em;
  font-variant-numeric: tabular-nums;
}
.metric-value .unit { color: var(--accent-ink); }
.metric-label { margin-top: 14px; font-size: 17px; font-weight: 500; letter-spacing: -0.01em; max-width: 26ch; }
.metric-ctx { margin-top: 8px; font-size: 14px; color: var(--ink-3); max-width: 34ch; }
.metric-ctx b { color: var(--ink-2); font-weight: 500; }

.markets {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-top: 40px;
  font-size: 15px;
  color: var(--ink-2);
}
.markets .chip { font-size: 12.5px; }

/* --------------------------------------------------------------------------
   Case studies
   -------------------------------------------------------------------------- */
.cases {
  padding-block: var(--section-y);
  background: var(--paper-2);
}
.case {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 36px;
  padding-block: clamp(48px, 6vw, 80px);
  border-top: 1px solid var(--line-strong);
}
.case:first-of-type { border-top: 0; padding-top: 0; }
@media (min-width: 1000px) {
  .case { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr); gap: 72px; }
  .case-aside { position: sticky; top: calc(var(--nav-h) + 32px); align-self: start; }
}
.case-aside .eyebrow { margin-bottom: 18px; }
.case-aside h3 {
  font-family: var(--f-display);
  font-size: clamp(1.9rem, 3.4vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.02;
}
.case-aside h3 .serif { color: var(--accent-ink); }
.case-aside .who { margin-top: 18px; color: var(--ink-3); font-size: 15px; }
.case-aside .who b { color: var(--ink); font-weight: 600; }
.case-outcomes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 28px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.case-outcomes div { background: var(--paper-2); padding: 16px 18px; }
.case-outcomes b {
  display: block;
  font-family: var(--f-display);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.05;
}
.case-outcomes span { font-size: 13px; color: var(--ink-3); line-height: 1.35; display: block; margin-top: 4px; }

.case-body { display: grid; gap: 0; }
.case-step {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.case-step:first-child { border-top: 0; padding-top: 0; }
@media (min-width: 640px) {
  .case-step { grid-template-columns: 170px minmax(0, 1fr); gap: 24px; }
}
.case-step h4 {
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding-top: 5px;
}
.case-step p, .case-step li { color: var(--ink-2); font-size: 16.5px; }
.case-step ul { display: grid; gap: 8px; }
.case-step li { position: relative; padding-left: 20px; }
.case-step li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.72em;
  width: 9px; height: 1px;
  background: var(--accent-ink);
}

/* Concept diagram */
.diagram {
  margin-top: 8px;
  padding: 20px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.35);
}
.diagram figcaption {
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--ink-3);
  font-family: var(--f-mono);
}
.flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}
@media (min-width: 640px) {
  .flow { grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr) 28px minmax(0, 1fr); }
}
.flow .fnode {
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.35;
}
.flow .fnode b { display: block; font-size: 14.5px; }
.flow .fnode span { color: var(--ink-3); font-size: 12.5px; }
.flow .fnode.hot { border-color: var(--accent-ink); box-shadow: inset 0 0 0 1px var(--accent-ink); }
.flow .arr { color: var(--ink-3); justify-self: center; transform: rotate(90deg); }
@media (min-width: 640px) { .flow .arr { transform: none; } }

/* Lab / side projects */
.lab {
  margin-top: clamp(40px, 6vw, 72px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
@media (min-width: 760px) { .lab { grid-template-columns: 1.4fr 1fr 1fr; } }
.lab > * { background: var(--paper); padding: 26px; }
.lab .lab-head { background: var(--ink); color: var(--paper); }
.lab .lab-head .eyebrow { color: #b8b2a7; }
.lab h4 { font-family: var(--f-display); font-size: 21px; font-weight: 600; letter-spacing: -0.02em; margin-top: 12px; line-height: 1.15; }
.lab p { margin-top: 10px; font-size: 15px; color: var(--ink-2); }
.lab .lab-head p { color: #d6d0c5; }
.lab .meta { margin-top: 14px; font-family: var(--f-mono); font-size: 12px; color: var(--ink-3); }
.lab .lab-head .meta { color: #b8b2a7; }
.lab .meta-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.lab .lab-head .chip { border-color: rgba(243, 239, 231, 0.18); color: #e4ded3; }
.lab a.text-link { margin-top: 14px; font-size: 14.5px; color: var(--accent); }

/* --------------------------------------------------------------------------
   Experience
   -------------------------------------------------------------------------- */
.experience { padding-block: var(--section-y); }
.timeline { border-top: 1px solid var(--line-strong); }
.role {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px 48px;
  padding: clamp(28px, 4vw, 44px) 0;
  border-bottom: 1px solid var(--line);
}
@media (min-width: 900px) {
  .role { grid-template-columns: 220px minmax(0, 1fr) minmax(0, 0.9fr); }
}
.role-when {
  font-family: var(--f-mono);
  font-size: 13px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
  padding-top: 6px;
}
.role-when b { display: block; color: var(--ink); font-weight: 500; }
.role-head h3 {
  font-family: var(--f-display);
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.12;
}
.role-head .company { margin-top: 6px; font-size: 16px; color: var(--ink-2); }
.role-head .company .where { color: var(--ink-3); }
.role-head .apps-line { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.role-head .apps-line a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  transition: border-color 0.2s, background-color 0.2s;
}
.role-head .apps-line .app-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  border: 1px dashed var(--line-strong);
  color: var(--ink-3);
}
.role-head .apps-line a:hover { border-color: var(--ink); background: var(--paper); }
.role-head .apps-line img { width: 20px; height: 20px; border-radius: 6px; }
.role-head .apps-line .noimg { width: 20px; height: 20px; border-radius: 6px; background: var(--paper-3); display: grid; place-items: center; font-size: 10px; font-weight: 600; }
.role-points { display: grid; gap: 10px; }
.role-points li { position: relative; padding-left: 20px; color: var(--ink-2); font-size: 15.5px; line-height: 1.55; }
.role-points li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.68em;
  width: 7px; height: 7px;
  border-radius: 50%;
  border: 1.5px solid var(--accent-ink);
}
.role-points strong { color: var(--ink); font-weight: 600; }
.role-stack { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }

.edu {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  margin-top: clamp(48px, 6vw, 72px);
}
@media (min-width: 900px) { .edu { grid-template-columns: 1fr 1.6fr; gap: 48px; } }
.edu h3 { font-family: var(--f-mono); font-size: 12px; font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 14px; }
.edu .school b { display: block; font-family: var(--f-display); font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.edu .school span { color: var(--ink-3); font-size: 15px; }
.certs li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15.5px;
}
.certs li:first-child { border-top: 1px solid var(--line); }
.certs time { flex: none; font-family: var(--f-mono); font-size: 12.5px; color: var(--ink-3); padding-top: 2px; }

/* --------------------------------------------------------------------------
   Skills
   -------------------------------------------------------------------------- */
.skills { padding-block: var(--section-y); }
.skill-groups {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1px;
  background: var(--night-line);
  border: 1px solid var(--night-line);
  border-radius: var(--radius);
  overflow: hidden;
}
@media (min-width: 760px) { .skill-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1120px) { .skill-groups { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.skill-group {
  position: relative;
  padding: clamp(24px, 3vw, 34px);
  background: var(--night);
  transition: background-color 0.4s;
}
.skill-group:hover { background: var(--night-2); }
.skill-group .g-top { display: flex; align-items: center; justify-content: space-between; }
.skill-group .g-icon {
  width: 42px; height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--night-3);
  color: var(--accent);
}
.skill-group .g-icon svg { width: 20px; height: 20px; }
.skill-group .g-num { font-family: var(--f-mono); font-size: 12px; color: var(--night-muted); }
.skill-group h3 {
  margin-top: 22px;
  font-family: var(--f-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.025em;
}
.skill-group p { margin-top: 8px; color: var(--night-muted); font-size: 15px; line-height: 1.55; }
.skill-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 18px; }
.skill-list li {
  padding: 5px 11px;
  border-radius: 8px;
  background: rgba(243, 239, 231, 0.06);
  font-size: 13.5px;
  color: #e4ded3;
  transition: background-color 0.25s, color 0.25s;
}
.skill-list li.core { background: rgba(255, 91, 36, 0.14); color: #ffd8c9; }
.skill-list li.exploring { background: transparent; border: 1px dashed rgba(243, 239, 231, 0.22); color: var(--night-muted); }
.skill-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 22px;
  font-size: 13.5px;
  color: var(--night-muted);
}
.skill-legend span { display: inline-flex; align-items: center; gap: 8px; }
.skill-legend i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; }
.skill-legend .l-core { background: rgba(255, 91, 36, 0.35); }
.skill-legend .l-used { background: rgba(243, 239, 231, 0.16); }
.skill-legend .l-exp { border: 1px dashed rgba(243, 239, 231, 0.4); }

/* --------------------------------------------------------------------------
   About
   -------------------------------------------------------------------------- */
.about { padding-block: var(--section-y); }
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: start;
}
@media (min-width: 960px) { .about-grid { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); } }
.about-photo {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: var(--teal);
  max-width: 480px;
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-photo .stamp {
  position: absolute;
  right: 14px; top: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
}
.about-copy .big {
  font-family: var(--f-display);
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: -0.03em;
}
.about-copy .big .serif { color: var(--accent-ink); font-size: 1.06em; }
.about-copy .body { margin-top: 26px; display: grid; gap: 16px; color: var(--ink-2); max-width: 62ch; }
.principles {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin-top: 40px;
  border-top: 1px solid var(--line-strong);
}
@media (min-width: 640px) { .principles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.principles li { padding: 20px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 640px) {
  .principles li:nth-child(odd) { padding-right: 24px; }
  .principles li:nth-child(even) { padding-left: 24px; border-left: 1px solid var(--line); }
}
.principles b { display: block; font-weight: 600; font-size: 16.5px; letter-spacing: -0.01em; }
.principles span { display: block; margin-top: 4px; color: var(--ink-3); font-size: 15px; line-height: 1.5; }

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */
.contact {
  padding-top: var(--section-y);
  padding-bottom: 40px;
  overflow: hidden;
}
.contact::before {
  content: "";
  position: absolute;
  right: -10%; top: -30%;
  width: 70vw; height: 70vw;
  max-width: 900px; max-height: 900px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 91, 36, 0.16), transparent 70%);
  pointer-events: none;
}
.contact-title {
  position: relative;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(2.6rem, 8vw, 8rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
  max-width: 14ch;
}
.contact-title .serif { display: block; color: var(--accent); font-weight: 400; }
.contact-lead { margin-top: 26px; max-width: 52ch; color: var(--night-muted); font-size: clamp(1rem, 1.3vw, 1.15rem); }

.mail-row {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 44px;
}
.mail-big {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  max-width: 100%;
  font-family: var(--f-display);
  font-size: clamp(1.25rem, 3.6vw, 2.6rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
  background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 2px no-repeat;
  padding-bottom: 4px;
  transition: background-size 0.5s var(--ease-out);
}
.mail-big:hover { background-size: 100% 2px; }
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(243, 239, 231, 0.22);
  font-size: 14px;
  color: var(--night-text);
  transition: background-color 0.25s, color 0.25s;
}
.copy-btn:hover { background: var(--night-text); color: var(--night); }
.copy-btn svg { width: 16px; height: 16px; }

.contact-links {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin-top: clamp(56px, 7vw, 96px);
  border-top: 1px solid var(--night-line);
}
@media (min-width: 720px) { .contact-links { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .contact-links { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.contact-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 24px 4px;
  border-bottom: 1px solid var(--night-line);
  transition: color 0.25s, padding 0.4s var(--ease-out);
}
@media (min-width: 1100px) {
  .contact-links a { border-bottom: 0; border-left: 1px solid var(--night-line); padding: 26px 22px; }
  .contact-links a:first-child { border-left: 0; padding-left: 4px; }
}
.contact-links a small { display: block; font-family: var(--f-mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--night-muted); }
.contact-links a span { display: block; margin-top: 4px; font-size: 17px; font-weight: 500; }
.contact-links a svg { width: 18px; height: 18px; flex: none; transition: transform 0.4s var(--ease-out); }
.contact-links a:hover { color: var(--accent); }
.contact-links a:hover svg { transform: translate(3px, -3px); }

.footer {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  margin-top: clamp(64px, 9vw, 120px);
  padding-top: 24px;
  border-top: 1px solid var(--night-line);
  font-size: 13.5px;
  color: var(--night-muted);
}
.footer a:hover { color: var(--night-text); }
.footer .to-top { display: inline-flex; align-items: center; gap: 6px; }
.footer .footer-note { flex-basis: 100%; order: 3; font-size: 0.8em; opacity: 0.7; }

.wordmark {
  position: relative;
  margin-top: 40px;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(3.4rem, 17.5vw, 17rem);
  line-height: 0.8;
  letter-spacing: -0.065em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(243, 239, 231, 0.16);
  white-space: nowrap;
  user-select: none;
}

/* --------------------------------------------------------------------------
   Toast
   -------------------------------------------------------------------------- */
.toast {
  position: fixed;
  left: 50%; bottom: 24px;
  z-index: 150;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  transform: translate(-50%, calc(100% + 40px));
  visibility: hidden;
  transition: transform 0.45s var(--ease-out), visibility 0s linear 0.45s;
  pointer-events: none;
}
.toast.show { transform: translate(-50%, 0); visibility: visible; transition: transform 0.45s var(--ease-out), visibility 0s; }

/* --------------------------------------------------------------------------
   Reveal system (JS adds .js to <html>; without JS everything is visible)
   -------------------------------------------------------------------------- */
.js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
  transition-delay: var(--d, 0s);
}
.js [data-reveal="fade"] { transform: none; }
.js [data-reveal="left"] { transform: translate3d(-28px, 0, 0); }
.js [data-reveal="scale"] { transform: scale(0.96); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* Hero line mask reveal */
.js .hero h1 .line > span {
  transform: translate3d(0, 108%, 0);
  transition: transform 1.1s var(--ease-out);
  transition-delay: var(--d, 0s);
}
.js .hero.is-in h1 .line > span { transform: none; }

/* Devices enter from below; parallax lives on the outer .slot. */
.js .stage .enter {
  opacity: 0;
  transform: translate3d(0, 70px, 0);
  transition: opacity 1s var(--ease-out), transform 1.3s var(--ease-out);
  transition-delay: var(--d, 0s);
}
.js .stage.is-in .enter { opacity: 1; transform: none; }

/* --------------------------------------------------------------------------
   Reduced motion: everything visible, nothing drifts or parallaxes.
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0s !important;
  }
  .js [data-reveal],
  .js .hero h1 .line > span,
  .js .stage .enter { opacity: 1 !important; transform: none !important; }
  .slot, .portrait-frame img { transform: none !important; }
  .stage .tilt, .drift { animation: none !important; }
  .status .dot::after { display: none; }
}

section[tabindex="-1"]:focus, article[tabindex="-1"]:focus { outline: none; }

/* --------------------------------------------------------------------------
   Mascot (js/mascot.js) — small, bottom-right, never essential
   -------------------------------------------------------------------------- */
.mascot {
  --m: 78px;
  position: fixed;
  right: max(14px, env(safe-area-inset-right));
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 80;
  width: var(--m);
  height: var(--m);
  opacity: 0;
  transform: translate3d(0, 24px, 0);
  transition: opacity 0.5s var(--ease-out), transform 0.6s var(--ease-out), visibility 0s linear 0.6s;
  visibility: hidden;
}
.mascot.is-ready { opacity: 1; transform: none; visibility: visible; transition: opacity 0.5s var(--ease-out), transform 0.6s var(--ease-out), visibility 0s; }
.mascot.is-ready.is-away { opacity: 0; transform: translate3d(0, 120%, 0); visibility: hidden; transition: opacity 0.3s, transform 0.45s var(--ease-out), visibility 0s linear 0.45s; }
/* Small screens: the mascot lives inline in the About section instead of floating over text. */
.about-head { grid-template-columns: 1fr auto; align-items: end; }
.mascot.is-docked {
  --m: 64px;
  position: relative;
  right: auto;
  bottom: auto;
  z-index: 1;
}
.mascot.is-docked .mascot-disc { box-shadow: 0 0 0 3px var(--paper), 0 10px 24px -14px rgba(18, 17, 16, 0.5); }
.mascot.is-docked .mascot-bubble { max-width: min(260px, calc(100vw - 120px)); }

.mascot-btn {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.mascot-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.mascot-disc {
  position: absolute;
  inset: 8% 6% 0;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 3px var(--paper), 0 14px 30px -12px rgba(18, 17, 16, 0.55);
  overflow: hidden;
}
.mascot-body {
  position: absolute;
  inset: -12% -6% 0;
  transform-origin: 50% 78%;
}
.mascot-layer {
  position: absolute;
  inset: 0;
  background-size: 300% 300%;
  background-repeat: no-repeat;
}
.mascot-react { opacity: 0; }

.mascot-bubble {
  position: absolute;
  right: calc(100% - 10px);
  bottom: calc(100% - 6px);
  width: max-content;
  max-width: min(280px, calc(100vw - 110px));
  padding: 12px 14px;
  border-radius: 16px 16px 4px 16px;
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  line-height: 1.4;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: translate3d(8px, 8px, 0) scale(0.96);
  transform-origin: 100% 100%;
  pointer-events: none;
  transition: opacity 0.3s var(--ease-out), transform 0.4s var(--ease-out);
}
.mascot-bubble a {
  display: inline-block;
  margin-top: 6px;
  color: var(--accent);
  font-weight: 600;
}
.mascot-bubble span { display: block; }
.mascot-bubble b { display: block; margin-bottom: 3px; font-weight: 600; letter-spacing: -0.01em; }
.mascot-bubble small { display: block; margin-top: 8px; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.mascot-bubble:empty { display: none; }
/* Tail pointing at the avatar */
.mascot-bubble::after {
  content: "";
  position: absolute;
  right: -6px;
  bottom: 8px;
  width: 14px;
  height: 14px;
  background: inherit;
  border-radius: 2px;
  transform: rotate(45deg);
}
.mascot.is-talking .mascot-bubble { opacity: 1; transform: none; pointer-events: auto; cursor: pointer; }
.mascot.is-talking .mascot-disc { animation: mascot-ping 1.6s var(--ease-out) 2; }
@keyframes mascot-ping {
  0% { box-shadow: 0 0 0 3px var(--paper), 0 0 0 3px var(--accent), 0 14px 30px -12px rgba(18, 17, 16, 0.55); }
  100% { box-shadow: 0 0 0 3px var(--paper), 0 0 0 18px rgba(255, 255, 255, 0), 0 14px 30px -12px rgba(18, 17, 16, 0.55); }
}
/* Docked (phones) the bubble can sit over the dark Skills panel — a thin paper ring keeps its edge. */
.mascot.is-docked .mascot-bubble { bottom: calc(100% - 2px); right: calc(100% - 14px); box-shadow: 0 0 0 1.5px var(--paper), 0 18px 40px -18px rgba(0, 0, 0, 0.6); }
@media (prefers-reduced-motion: reduce) { .mascot.is-talking .mascot-disc { animation: none; } }

/* --------------------------------------------------------------------------
   Tech logos inside chips / skill items (added by js/main.js)
   -------------------------------------------------------------------------- */
.tech-icons { display: inline-flex; align-items: center; gap: 3px; flex: none; }
.tech-ico { width: 14px; height: 14px; flex: none; object-fit: contain; }
.skill-list li { display: inline-flex; align-items: center; gap: 7px; }
.skill-list .tech-ico { width: 15px; height: 15px; }
/* Black/near-black marks (Apple, GitHub, Next.js, Expo, Cursor, Anthropic, LangChain) flip to white on dark */
.on-night .tech-ico.mono,
.lab-head .tech-ico.mono { filter: invert(1) brightness(1.15); }
.hero-stack .chip, .role-stack .chip, .app-stack .chip { gap: 6px; }

/* --------------------------------------------------------------------------
   Career journey — map + rail (drawn/filled by js/main.js)
   -------------------------------------------------------------------------- */
.journey {
  position: relative;
  margin-bottom: clamp(64px, 8vw, 112px);
  padding: clamp(20px, 3vw, 36px) clamp(12px, 2vw, 28px) clamp(24px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 1px 1px, rgba(18, 17, 16, 0.07) 1px, transparent 1.5px) 0 0 / 22px 22px,
    rgba(255, 255, 255, 0.28);
}
.journey-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.jp-base, .jp-line, .jp-next { fill: none; stroke-linecap: round; }
.jp-base { stroke: var(--line-strong); stroke-width: 2; stroke-dasharray: 2 8; }
.jp-line { stroke: var(--accent); stroke-width: 3; }
.jp-next { stroke: var(--ink-3); stroke-width: 2; stroke-dasharray: 6 8; opacity: 0; transition: opacity 0.6s; }
.journey.is-done .jp-next { opacity: 0.8; }
.jp-dot { fill: var(--accent); filter: drop-shadow(0 0 6px rgba(255, 91, 36, 0.7)); opacity: 0; }
.journey.is-in .jp-dot { opacity: 1; }

.journey-stops {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}
.stop a {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: 14px;
  padding: 0 6px 6px;
  outline-offset: 4px;
}
.node-band { position: relative; display: block; height: 128px; }
.stop:nth-child(odd) .node { top: 64px; }
.stop:nth-child(even) .node { top: 6px; }
.node {
  position: absolute;
  left: 0;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--line-strong);
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: -0.01em;
  color: var(--ink-3);
  transform: scale(0.86);
  transition: transform 0.6s var(--ease-out), border-color 0.4s, background-color 0.4s, color 0.4s, box-shadow 0.4s;
}
.stop.is-lit .node {
  transform: none;
  border-color: var(--c);
  background: var(--c);
  color: #fff;
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--c) 18%, transparent), 0 14px 28px -14px var(--c);
}
.stop.latest.is-lit .node::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid var(--c);
  animation: ping 2.4s var(--ease-out) infinite;
}
.stop.next .node { border-style: dashed; font-size: 20px; color: var(--ink-3); }
.journey.is-done .stop.next .node { border-color: var(--ink); color: var(--ink); }

.stop-text { display: block; margin-top: 14px; opacity: 0.45; transition: opacity 0.6s; }
.stop.is-lit .stop-text, .journey.is-done .stop.next .stop-text { opacity: 1; }
.stop-when {
  display: block;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--accent-ink);
}
.stop-text b {
  display: block;
  margin-top: 6px;
  font-family: var(--f-display);
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.stop-where { display: block; margin-top: 4px; font-size: 13.5px; color: var(--ink-3); line-height: 1.4; }
@media (hover: hover) {
  .stop a:hover .node { transform: scale(1.08); }
  .stop a:hover b { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
}

/* Tablet: two staggered rows would crowd — keep 6 columns but tighten */
@media (max-width: 1100px) and (min-width: 761px) {
  .node { width: 54px; height: 54px; font-size: 12px; }
  .stop-text b { font-size: 15px; }
  .stop-where { font-size: 12.5px; }
}

/* Phone: the path runs top-to-bottom and winds left/right */
@media (max-width: 760px) {
  .journey-stops { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .stop a { flex-direction: row; align-items: center; gap: 14px; padding: 6px 4px; }
  .node-band { flex: none; width: 88px; height: 64px; }
  .stop:nth-child(odd) .node, .stop:nth-child(even) .node { top: 4px; }
  .stop:nth-child(odd) .node { left: 0; }
  .stop:nth-child(even) .node { left: 30px; }
  .node { width: 56px; height: 56px; font-size: 12px; }
  .stop-text { margin-top: 0; }
}

/* Timeline rail */
.timeline {
  position: relative;
  border-top: 0;
  padding-left: 56px;
}
.timeline::before,
.rail-fill {
  content: "";
  position: absolute;
  left: 19px;
  top: 0;
  bottom: 0;
  width: 2px;
  border-radius: 2px;
}
.timeline::before { background: var(--line); }
.rail-fill {
  list-style: none;
  background: linear-gradient(var(--accent), var(--accent-ink));
  transform-origin: 50% 0;
  transform: scaleY(var(--p, 0));
  box-shadow: 0 0 12px rgba(255, 91, 36, 0.35);
}
.timeline .role { position: relative; }
.rail-fill + .role { border-top: 1px solid var(--line-strong); }
.role-node {
  position: absolute;
  left: -45px;
  top: calc(clamp(28px, 4vw, 44px) + 4px);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--line-strong);
  transition: background-color 0.4s, border-color 0.4s, box-shadow 0.4s, transform 0.4s var(--ease-out);
}
.role.is-passed .role-node {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 5px rgba(255, 91, 36, 0.16);
  transform: scale(1.1);
}
.role-hop {
  position: absolute;
  top: 0;
  left: -46px;
  transform: translateY(-50%);
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 10px;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: 0.03em;
  color: var(--ink-2);
  white-space: nowrap;
  max-width: calc(100% + 40px);
  overflow: hidden;
  text-overflow: ellipsis;
}
.role-hop span { color: var(--accent-ink); }
.role.is-passed .role-hop { border-color: var(--accent-ink); }
.role-chapter {
  margin-bottom: 8px;
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-ink);
}
.timeline .role { padding-top: clamp(40px, 5vw, 56px); }
.role-node { top: calc(clamp(40px, 5vw, 56px) + 4px); }

@media (max-width: 760px) {
  .timeline { padding-left: 40px; }
  .timeline::before, .rail-fill { left: 11px; }
  .role-node { left: -37px; }
  .role-hop { left: -38px; font-size: 10.5px; }
}

/* --------------------------------------------------------------------------
   Logo strip (rendered from PORTFOLIO.logos in js/data.js)
   -------------------------------------------------------------------------- */
.float-tag.t3 { bottom: 16%; right: -18px; top: auto; }
.float-tag.t3 b { font-size: 19px; }
@media (max-width: 600px) { .float-tag.t3 { right: -6px; bottom: 20%; } .float-tag.t3 b { font-size: 15px; } }

.logos { margin-top: clamp(48px, 6vw, 80px); }
.logos-title {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  text-align: center;
}
.marquee {
  position: relative;
  margin-top: 22px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  gap: 14px;
  width: max-content;
  padding: 6px 0;
  animation: marquee var(--marquee-dur, 48s) linear infinite;
}
.marquee:hover .marquee-track,
.marquee:focus-within .marquee-track { animation-play-state: paused; }
.marquee.is-offscreen .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(calc(-50% - 7px)); } }

.logo-item {
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 64px;
  padding: 0 20px 0 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.5);
  color: var(--ink);
  transition: border-color 0.3s, background-color 0.3s, transform 0.4s var(--ease-out), box-shadow 0.4s;
}
a.logo-item:hover, a.logo-item:focus-visible {
  border-color: var(--ink);
  background: #fff;
  transform: translateY(-3px);
  box-shadow: 0 14px 30px -18px rgba(18, 17, 16, 0.45);
}
.logo-item img { height: 40px; width: auto; max-width: 120px; object-fit: contain; border-radius: 10px; }
.logo-item img.square { width: 40px; }
.logo-item img.wide { height: 28px; border-radius: 0; }
.logo-tile { display: grid; place-items: center; height: 40px; padding: 0 10px; border-radius: 10px; }
.logo-tile img { height: 22px; border-radius: 0; }
.logo-item .wordmark-tile {
  display: grid;
  place-items: center;
  min-width: 40px;
  height: 40px;
  padding: 0 8px;
  border-radius: 10px;
  background: var(--lc, var(--ink));
  color: #fff;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.02em;
}
.logo-item .lt { line-height: 1.2; }
.logo-item .lt b { display: block; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; }
.logo-item .lt span { display: block; font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.logos-note { margin-top: 14px; text-align: center; font-size: 12px; color: var(--ink-3); }

@media (prefers-reduced-motion: reduce) {
  .marquee { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .marquee-track { animation: none; }
  .marquee-track [aria-hidden="true"] { display: none; }
}

/* --------------------------------------------------------------------------
   SaaS, AI & innovation (#builds)
   -------------------------------------------------------------------------- */
.builds { padding-block: var(--section-y); background: var(--paper-2); }
.build {
  --b: var(--accent-ink);
  position: relative;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 40px 80px -60px rgba(18, 17, 16, 0.45);
  overflow: hidden;
}
.build-row { margin-top: clamp(24px, 3vw, 36px); }
.build-feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px);
  padding: clamp(22px, 4vw, 52px);
}
@media (min-width: 1000px) { .build-feature { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.25fr); align-items: start; } }
.build-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(24px, 3vw, 36px); }
@media (min-width: 1000px) { .build-row { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); } }
.build-row .build { padding: clamp(22px, 3vw, 36px); display: flex; flex-direction: column; }

.badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: 999px;
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  color: var(--ink-2);
}
.badge.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #23a55a; box-shadow: 0 0 0 3px rgba(35, 165, 90, 0.18); }
.badge.hot { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.badge.concept { border-style: dashed; color: var(--ink-3); }

.build-title { display: flex; align-items: center; gap: 14px; margin-top: 18px; }
.build-title img, .build-title .mark {
  flex: none;
  width: 56px; height: 56px;
  border-radius: 15px;
  box-shadow: 0 0 0 1px var(--line), 0 12px 24px -16px rgba(18, 17, 16, 0.5);
  object-fit: cover;
}
.build-title .mark { display: grid; place-items: center; background: var(--b); color: #fff; }
.build-title .mark svg { width: 26px; height: 26px; }
.build h3 {
  font-family: var(--f-display);
  font-size: clamp(1.8rem, 3.2vw, 2.8rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.02;
}
.build-row .build h3 { font-size: clamp(1.5rem, 2.4vw, 2.1rem); }
.build h3 .serif { color: var(--b); }
.build .kind { display: block; margin-top: 6px; color: var(--ink-3); font-size: 14.5px; letter-spacing: 0; font-family: var(--f-body); font-weight: 400; }
.build .lede { margin-top: 18px; color: var(--ink-2); font-size: clamp(1rem, 1.3vw, 1.1rem); max-width: 62ch; }
.feature-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px;
  margin-top: 22px;
}
.feature-list li { position: relative; padding-left: 18px; font-size: 14.5px; color: var(--ink-2); line-height: 1.45; }
.feature-list li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 8px; height: 8px; border-radius: 2px; background: var(--b); opacity: 0.85; }
@media (max-width: 480px) { .feature-list { grid-template-columns: minmax(0, 1fr); } }
.build .role-stack { margin-top: 20px; }
.build-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 24px; }
.build-links .btn { min-height: 46px; font-size: 14.5px; }
.build .note { margin-top: 12px; font-size: 12.5px; color: var(--ink-3); font-style: italic; }
.build dl.facts { display: grid; gap: 14px; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.build dl.facts dt { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--b); }
.build dl.facts dd { margin-top: 4px; font-size: 14.5px; color: var(--ink-2); line-height: 1.5; }
@media (min-width: 640px) { .build dl.facts { grid-template-columns: 1fr 1fr; column-gap: 24px; } }

/* Browser mockup + gallery */
.browser {
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line-strong);
  box-shadow: 0 40px 70px -40px rgba(18, 17, 16, 0.55), 0 0 0 6px rgba(255, 255, 255, 0.5);
}
.browser-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 36px;
  padding: 0 12px;
  background: #f1ede6;
  border-bottom: 1px solid var(--line);
}
.browser-bar .dots { display: flex; gap: 6px; }
.browser-bar .dots i { width: 10px; height: 10px; border-radius: 50%; background: #d9d2c6; }
.browser-bar .dots i:first-child { background: #ff6159; }
.browser-bar .dots i:nth-child(2) { background: #ffbd2e; }
.browser-bar .dots i:nth-child(3) { background: #28c941; }
.browser-bar .url {
  flex: 1;
  min-width: 0;
  height: 22px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 6px;
  background: #fff;
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.browser-view { position: relative; aspect-ratio: 16 / 9; background: #f7f4ef; overflow: hidden; }
.browser-view img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.6s var(--ease-out), transform 0.9s var(--ease-out);
}
.browser-view img.is-active { opacity: 1; transform: none; }
.gallery-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.gallery-tabs button {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-size: 13px;
  color: var(--ink-2);
  background: var(--paper);
  transition: background-color 0.25s, color 0.25s, border-color 0.25s;
}
.gallery-tabs button[aria-selected="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.gallery-caption { margin-top: 10px; font-size: 12.5px; color: var(--ink-3); }

/* MCP architecture flow */
.mcp {
  padding: clamp(22px, 4vw, 44px);
  border-top: 1px solid var(--line);
  background:
    radial-gradient(circle at 1px 1px, rgba(18, 17, 16, 0.06) 1px, transparent 1.5px) 0 0 / 20px 20px,
    var(--paper);
}
.mcp-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px 24px; }
.mcp-head h4 { font-family: var(--f-display); font-size: clamp(1.25rem, 2vw, 1.6rem); font-weight: 600; letter-spacing: -0.03em; }
.mcp-head p { font-size: 14px; color: var(--ink-3); max-width: 62ch; }
.mcp-flow {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  margin-top: 26px;
}
@media (min-width: 900px) { .mcp-flow { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; } }
.mcp-node {
  position: relative;
  z-index: 1;
  padding: 16px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line-strong);
  transition: border-color 0.35s, box-shadow 0.35s, transform 0.35s var(--ease-out);
}
.mcp-node .step { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.08em; color: var(--ink-3); }
.mcp-node b { display: block; margin-top: 6px; font-family: var(--f-display); font-size: 16px; font-weight: 600; letter-spacing: -0.02em; }
.mcp-node .d { display: block; margin-top: 4px; font-size: 13px; color: var(--ink-3); line-height: 1.45; }
.mcp-node.is-on { border-color: var(--accent-ink); box-shadow: 0 0 0 4px var(--accent-soft), 0 18px 34px -22px rgba(196, 58, 12, 0.6); transform: translateY(-3px); }
.mcp-wire {
  position: absolute;
  z-index: 0;
  left: 6%; right: 6%;
  top: 50%;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--line-strong) 0 6px, transparent 6px 12px);
  overflow: hidden;
}
.mcp-wire::after {
  content: "";
  position: absolute;
  top: -2px;
  left: -20%;
  width: 20%;
  height: 6px;
  border-radius: 6px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: packet 2.8s linear infinite;
}
.mcp.is-paused .mcp-wire::after { animation-play-state: paused; }
@keyframes packet { to { left: 100%; } }
@keyframes packet-v { to { top: 100%; } }
@media (max-width: 899px) {
  .mcp-wire { left: 26px; right: auto; top: 4%; bottom: 4%; width: 2px; height: auto; background: repeating-linear-gradient(180deg, var(--line-strong) 0 6px, transparent 6px 12px); }
  .mcp-wire::after { left: -2px; top: -20%; width: 6px; height: 20%; background: linear-gradient(180deg, transparent, var(--accent), transparent); animation-name: packet-v; }
  .mcp-node { margin-left: 52px; }
}
.mcp-asks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.mcp-asks span {
  padding: 8px 14px;
  border-radius: 16px 16px 16px 4px;
  background: var(--ink);
  color: var(--paper);
  font-size: 13.5px;
}
.mcp-foot { margin-top: 14px; font-size: 12.5px; color: var(--ink-3); max-width: 80ch; }

/* Pregnancy Tracker: conceptual phone + widget, drawn in HTML/CSS */
.preg { --b: #d0605f; }
.preg-stage {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  margin-top: 26px;
  padding: 26px 12px;
  border-radius: 18px;
  background: linear-gradient(160deg, #fff0f2, #ffe5e5 60%, #ffe0d1);
}
.preg-phone {
  flex: none;
  width: 200px;
  padding: 7px;
  border-radius: 30px;
  background: linear-gradient(145deg, #34373d, #0b0c0e 42%, #26292e);
  box-shadow: 0 40px 60px -36px rgba(77, 44, 44, 0.7);
}
.preg-screen {
  border-radius: 24px;
  overflow: hidden;
  aspect-ratio: 9 / 19;
  background: #fffbf9;
  color: #4d2c2c;
  font-family: var(--f-body);
  display: flex;
  flex-direction: column;
}
.ps-top { padding: 18px 14px 12px; background: #ffe5e5; }
.ps-top small { display: block; font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; color: #a08484; }
.ps-top b { display: block; margin-top: 2px; font-size: 17px; font-weight: 800; letter-spacing: -0.02em; }
.ps-top span { display: block; font-size: 10px; color: #a08484; margin-top: 2px; }
.ps-bar { height: 6px; margin-top: 10px; border-radius: 6px; background: #f3e6e1; overflow: hidden; }
.ps-bar i { display: block; height: 100%; width: var(--pct, 60%); border-radius: 6px; background: #e67e7e; }
.ps-baby { display: grid; place-items: center; margin: 12px auto 4px; width: 92px; height: 92px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #ffe0d1, #fad4d8); font-size: 40px; }
.ps-card { margin: 8px 12px 0; padding: 10px 12px; border-radius: 12px; background: #fff0e8; border: 1px solid #ffe0d1; font-size: 10px; line-height: 1.4; }
.ps-card b { display: block; font-size: 11px; }
.ps-nav { margin: auto 10px 10px; height: 32px; border-radius: 16px; background: #4d2c2c; display: flex; align-items: center; justify-content: space-around; }
.ps-nav i { width: 14px; height: 14px; border-radius: 4px; background: rgba(255, 240, 232, 0.35); }
.ps-nav i:first-child { background: #ffe5e5; }

.preg-widget {
  flex: none;
  width: 230px;
  padding: 14px 16px;
  border-radius: 22px;
  background: #fffbf9;
  color: #4d2c2c;
  box-shadow: 0 30px 50px -30px rgba(77, 44, 44, 0.55), 0 0 0 1px #ffe0d1;
}
.preg-widget .w-top { display: flex; align-items: center; justify-content: space-between; }
.preg-widget .w-top small { font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: #a08484; }
.preg-widget .w-top span { font-size: 16px; }
.preg-widget b { display: block; margin-top: 6px; font-size: 18px; font-weight: 800; letter-spacing: -0.02em; }
.preg-widget .w-sub { font-size: 11px; color: #a08484; }
.preg-widget .w-chips { display: flex; gap: 6px; margin-top: 10px; }
.preg-widget .w-chips span { padding: 3px 8px; border-radius: 999px; font-size: 10px; background: #ffe5e5; color: #d17d5e; }
.preg-widget .w-chips span + span { background: #fff0e8; }
.widget-label { display: block; margin-bottom: 8px; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: #a08484; }
@media (max-width: 560px) {
  .preg-stage { flex-direction: column; }
  .preg-phone { width: 180px; }
}

/* Doha supporting cards (dark section) with concept previews */
.doha { margin-top: clamp(96px, 12vw, 160px); padding-top: 40px; border-top: 1px solid var(--night-line); }
.doha-head h3 { margin-top: 14px; font-family: var(--f-display); font-weight: 600; font-size: clamp(1.6rem, 3vw, 2.4rem); letter-spacing: -0.035em; }
.doha-head > p:last-child { margin-top: 10px; max-width: 64ch; color: var(--night-muted); font-size: 15px; }
.doha-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; margin-top: 32px; }
@media (min-width: 960px) { .doha-grid { grid-template-columns: 1fr 1fr; } }
.doha-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--night-line);
  background: linear-gradient(160deg, color-mix(in srgb, var(--app) 12%, var(--night-2)), var(--night-2) 55%);
  transition: border-color 0.35s, transform 0.5s var(--ease-out);
}
.doha-card:hover { border-color: color-mix(in srgb, var(--app) 55%, transparent); transform: translateY(-4px); }
@media (max-width: 480px) { .doha-card { grid-template-columns: minmax(0, 1fr); } .doha-preview { justify-self: center; } }
.doha-preview { position: relative; }
.concept-tag {
  display: block;
  margin-top: 10px;
  text-align: center;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--night-muted);
  border: 1px dashed rgba(243, 239, 231, 0.24);
  border-radius: 999px;
  padding: 3px 0;
}
.cp-phone { width: 150px; padding: 6px; border-radius: 24px; background: linear-gradient(145deg, #34373d, #0b0c0e 42%, #26292e); box-shadow: 0 30px 50px -30px rgba(0, 0, 0, 0.9), 0 20px 50px -40px var(--app); }
.cp-screen { aspect-ratio: 9 / 19; border-radius: 19px; overflow: hidden; background: #fff; color: #121110; display: flex; flex-direction: column; font-size: 8px; }
.jeeb-ui { padding: 12px 9px; gap: 7px; background: #f6faf9; }
.j-top { display: flex; justify-content: space-between; align-items: center; }
.j-top b { font-size: 8.5px; }
.j-top span { width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; background: var(--app); color: #fff; font-size: 9px; }
.j-search { padding: 5px 7px; border-radius: 8px; background: #fff; border: 1px solid #e3ecea; color: #8a9692; }
.j-banner { padding: 9px; border-radius: 10px; background: linear-gradient(120deg, var(--app), #7fd8cc); color: #fff; }
.j-banner b { display: block; font-size: 10px; } .j-banner span { opacity: 0.85; }
.j-cats { display: flex; gap: 5px; } .j-cats i { flex: 1; height: 18px; border-radius: 6px; background: #e1f3f0; }
.j-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; flex: 1; } .j-grid i { border-radius: 8px; background: #fff; border: 1px solid #e3ecea; }
.j-cart { padding: 6px; border-radius: 8px; background: #121110; color: #fff; text-align: center; }
.pass-ui { background: #eef0f7; }
.p-map { flex: 1; position: relative; background: repeating-linear-gradient(0deg, transparent 0 18px, rgba(16, 32, 72, 0.07) 18px 19px), repeating-linear-gradient(90deg, transparent 0 18px, rgba(16, 32, 72, 0.07) 18px 19px), #f4f5fb; }
.p-map svg { position: absolute; inset: 8% 6%; width: 88%; height: 84%; }
.p-sheet { padding: 10px 10px 14px; background: #fff; border-radius: 14px 14px 0 0; box-shadow: 0 -6px 16px -10px rgba(0, 0, 0, 0.3); }
.p-sheet b { display: block; font-size: 10px; }
.p-sheet span { display: block; margin-top: 4px; color: #77798a; }
.p-steps { display: flex; gap: 4px; margin-top: 6px; } .p-steps i { flex: 1; height: 4px; border-radius: 4px; background: #dfe1ee; } .p-steps i.on { background: var(--app); }
.doha-logo { display: inline-flex; align-items: center; height: 38px; padding: 0 12px; margin-bottom: 12px; border-radius: 10px; background: #fff; }
.doha-logo img { height: 22px; width: auto; }
.doha-copy h4 { font-family: var(--f-display); font-size: 22px; font-weight: 600; letter-spacing: -0.025em; line-height: 1.15; }
.doha-copy h4 span { display: block; margin-top: 4px; font-family: var(--f-body); font-size: 13.5px; font-weight: 400; color: var(--night-muted); letter-spacing: 0; }
.doha-copy p { margin-top: 12px; font-size: 14.5px; color: #d9d3c8; line-height: 1.55; }
.doha-metrics { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 16px; }
.doha-metrics li { display: flex; align-items: baseline; gap: 6px; }
.doha-metrics b { font-family: var(--f-display); font-size: 22px; font-weight: 600; letter-spacing: -0.03em; color: var(--night-text); }
.doha-metrics span { font-size: 12.5px; color: var(--night-muted); }
.doha-copy .role-stack { margin-top: 14px; }

/* Journey nodes with real company logos */
.node.has-logo { background: #fff; overflow: hidden; }
.node.has-logo img { width: 62%; height: 62%; object-fit: contain; filter: grayscale(1); opacity: 0.55; transition: filter 0.5s, opacity 0.5s; }
.node.has-logo.wide img { width: 78%; }
.node.has-logo.on-dark { background: #121110; }
.node.has-logo.on-dark img { width: 80%; }
.stop.is-lit .node.has-logo { background: #fff; border-color: var(--c); }
.stop.is-lit .node.has-logo.on-dark { background: #121110; }
.stop.is-lit .node.has-logo img { filter: none; opacity: 1; }

/* ==========================================================================
   Pinned horizontal sections (Apps, SaaS & AI)
   js/main.js adds .hs-on when the viewport is tall enough and motion is
   allowed: the section becomes (track overflow + 1 viewport) tall, the inner
   frame sticks, and the card track follows the vertical scroll sideways.
   Without .hs-on the track is a native, swipeable scroll-snap row.
   ========================================================================== */
.hs { position: relative; padding-block: 0 !important; }
.hs-sticky {
  display: flex;
  flex-direction: column;
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
}
.hs.hs-on .hs-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  padding-top: calc(var(--nav-h) + clamp(10px, 2.4vh, 32px));
  padding-bottom: clamp(14px, 3vh, 36px);
}
.hs-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px 40px;
}
.hs-title {
  margin-top: 10px;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(1.9rem, 4.2vw, 3.9rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  font-variation-settings: "opsz" 96;
}
.hs-title .serif { font-size: 1.06em; }
.hs-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 14px; }
.hs-status {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}
.on-night .hs-status { color: var(--night-muted); }
.hs-progress { position: relative; width: clamp(90px, 12vw, 180px); height: 2px; border-radius: 2px; background: var(--line); overflow: hidden; }
.on-night .hs-progress { background: var(--night-line); }
.hs-progress i { position: absolute; inset: 0; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }
.hs-hint { opacity: 0.8; }
.hs .app-index { margin-top: 0; justify-content: flex-end; }
.hs .app-index a { min-height: 38px; padding: 4px 12px 4px 4px; font-size: 13px; }
.hs .app-index img { width: 28px; height: 28px; border-radius: 8px; }
.hs .app-index .ix-dot { width: 28px; height: 28px; border-radius: 8px; background: var(--night-3); }

.hs-viewport {
  flex: 1;
  min-height: 0;
  margin-top: clamp(14px, 3vh, 34px);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.hs-viewport::-webkit-scrollbar { display: none; }
.hs.hs-on .hs-viewport { overflow: hidden; overflow: clip; scroll-snap-type: none; } /* clip: not scrollable by anchors or focus */
.hs-track {
  display: flex;
  gap: clamp(14px, 2vw, 28px);
  width: max-content;
  height: 100%;
  padding-inline: max(var(--gutter), calc((100vw - var(--maxw)) / 2 + var(--gutter)));
  will-change: transform;
}

/* Card */
.hcard {
  --app: var(--accent);
  flex: none;
  width: min(1120px, 86vw);
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(18px, 3vw, 44px);
  padding: clamp(18px, 2.4vw, 34px);
  border-radius: 26px;
  scroll-snap-align: center;
  min-height: 0;
  overflow: hidden;
}
.hs.hs-on .hcard { height: 100%; }
.work .hcard {
  border: 1px solid var(--night-line);
  background:
    radial-gradient(120% 90% at 0% 100%, color-mix(in srgb, var(--app) 20%, transparent), transparent 60%),
    var(--night-2);
}
.builds .hcard { background: rgba(255, 255, 255, 0.62); border: 1px solid var(--line); box-shadow: 0 40px 80px -60px rgba(18, 17, 16, 0.45); }
.hcard-media { position: relative; display: flex; flex-direction: column; justify-content: center; min-height: 0; }
.hcard-copy { display: flex; flex-direction: column; justify-content: center; min-height: 0; overflow: hidden; }
.hcard-copy.wide { grid-column: 1 / -1; }
.hcard-name {
  font-family: var(--f-display);
  font-size: clamp(1.6rem, 3vw, 2.7rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.02;
}
.hcard-name .kind, .app-title .kind { display: block; margin-top: 6px; font-family: var(--f-body); font-size: 14px; font-weight: 400; letter-spacing: 0; color: var(--night-muted); }
.builds .hcard-name .kind { color: var(--ink-3); }

/* App card copy, compacted for the frame */
.hcard .app-title { margin-top: 18px; gap: 14px; }
.hcard .app-icon { width: 60px; height: 60px; border-radius: 16px; }
.hcard .app-title h3 { font-size: clamp(1.6rem, 3vw, 2.7rem); }
.hcard .app-summary {
  margin-top: 14px;
  font-size: clamp(0.98rem, 1.15vw, 1.08rem);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hcard .app-facts { margin-top: 16px; padding-top: 14px; gap: 12px; }
.hcard .app-facts dd { font-size: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hcard .app-stack { margin-top: 14px; }
.hcard .app-bottom { margin-top: 18px; gap: 12px 18px; }
.hcard .app-metric b { font-size: 30px; }
.hcard .app-note { margin-top: 10px; }
.hcard .doha-logo { margin-top: 16px; align-self: flex-start; }
.hcard .doha-metrics { margin-top: 14px; }

/* Phone stage scales to the card's height (container units) */
.hstage { position: relative; flex: 1; min-height: 0; container-type: size; isolation: isolate; }
.hstage::before {
  content: "";
  position: absolute;
  inset: 8% 4% 6%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--app) 30%, transparent), transparent 72%);
}
.hstage .slot { --w: min(40cqh, 33cqw); }
.hstage .slot.s-left, .hstage .slot.s-right { --w: min(31cqh, 26cqw); }
.hstage .slot.s-left { margin-left: calc(var(--w) * -1.38); }
.hstage .slot.s-right { margin-left: calc(var(--w) * 0.38); }
.hstage.is-visible .s-main .tilt { animation: float 6s ease-in-out infinite alternate; }

.concept-media { align-items: center; }
.cp-phone.big { width: min(230px, 38cqh, 80%); }
.concept-media { container-type: size; }
.concept-media .concept-tag { width: min(260px, 90%); margin-top: 14px; }

/* More shipped apps card */
.more-hcard { width: min(920px, 86vw); grid-template-columns: minmax(0, 1fr); }
.more-hcard .more-grid { margin-top: 20px; }

/* SaaS & AI cards */
.builds .hcard .lede { margin-top: 14px; font-size: clamp(1rem, 1.25vw, 1.1rem); color: var(--ink-2); }
.feature-list.one { grid-template-columns: minmax(0, 1fr); gap: 9px; margin-top: 18px; }
.feature-list.one li { font-size: 15px; }
.feature-list.one b { color: var(--ink); font-weight: 600; }
.builds .hcard .role-stack { margin-top: 16px; }
.builds .hcard .build-links { margin-top: 18px; padding-top: 0; }
.builds .hcard .browser-view { aspect-ratio: 16 / 9; }
.builds .hcard .gallery-tabs { margin-top: 12px; }
.mcp-card { width: min(1040px, 86vw); grid-template-columns: minmax(0, 1fr); }
.mcp-card .mcp { padding: 0; border: 0; background: none; justify-content: center; }
.mcp-card .mcp-flow { margin-top: 26px; }
.preg .preg-stage { margin-top: 0; padding: 18px 12px; container-type: size; flex: 1; min-height: 0; }
.preg .preg-phone { width: min(200px, 44cqh); }
.preg .preg-widget { width: min(230px, 44cqw); }

/* Short laptop screens: trim secondary details so the card fits */
@media (max-height: 820px) {
  .hs.hs-on .hcard .app-facts dd { -webkit-line-clamp: 2; }
  .hs.hs-on .hcard .app-note, .hs.hs-on .hcard .app-stack { display: none; }
  .hs.hs-on .hs-title { font-size: clamp(1.8rem, 3.4vw, 3rem); }
  .hs.hs-on .builds .hcard .role-stack, .hs.hs-on.builds .hcard .role-stack { display: none; }
  .hs.hs-on.builds .gallery-caption { display: none; }
}

/* Tablet & phone: card stacks media above copy */
@media (max-width: 899px) {
  .hcard { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 16px; }
  .hcard.more-hcard, .hcard.mcp-card { grid-template-rows: none; }
  .hs-meta { align-items: flex-start; width: 100%; }
  .hs .app-index { display: none; }
  .hs-head { gap: 10px; }
  .hcard .app-facts, .hcard .app-note { display: none; }
  .hcard .app-title { margin-top: 10px; }
  .hcard .app-icon { width: 48px; height: 48px; border-radius: 13px; }
  .hcard .app-summary { -webkit-line-clamp: 3; margin-top: 10px; }
  .hcard .app-bottom { margin-top: 12px; }
  .hcard .app-metric b { font-size: 24px; }
  .hcard .store { min-height: 40px; }
  .hcard .doha-metrics b { font-size: 18px; }
  .builds .hcard .feature-list.one li:nth-child(n+3) { display: none; }
  .builds .hcard .role-stack, .builds .hcard .gallery-caption { display: none; }
  .builds .hcard .gallery-tabs button { min-height: 32px; padding: 0 10px; font-size: 12px; }
  .mcp-card .mcp-node { padding: 10px 12px; }
  .mcp-card .mcp-node .d { display: none; }
  .mcp-card .mcp-flow { gap: 8px; margin-top: 16px; }
  .mcp-card .mcp-asks span:nth-child(n+3) { display: none; }
}
@media (max-width: 899px) and (max-height: 760px) {
  .hcard .app-stack, .hcard .doha-metrics { display: none; }
}

/* Not pinned (short screens / reduced motion): give stages a real height */
.hs:not(.hs-on) .hcard { min-height: 0; }
.hs:not(.hs-on) .hstage { flex: none; height: clamp(300px, 46vw, 460px); }
.hs:not(.hs-on) .concept-media { height: clamp(300px, 46vw, 460px); }
.hs:not(.hs-on) .preg .preg-stage { flex: none; height: 380px; }
@media (max-width: 899px) {
  .hs:not(.hs-on) .hcard { grid-template-rows: none; }
}

/* Card fit tuning: never squash copy; trim it instead */
.hcard-copy > * { flex-shrink: 0; }
.hstage .slot { --w: min(47cqh, 37cqw); }
.hstage .slot.s-left, .hstage .slot.s-right { --w: min(36cqh, 28cqw); }
.hcard .app-summary { -webkit-line-clamp: 3; }
.hcard .app-facts dd { -webkit-line-clamp: 2; }
.hcard .app-stack { flex-wrap: nowrap; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
.hs .app-index .ix-dot { background: color-mix(in srgb, var(--night-text) 14%, transparent); }

/* Short laptop screens */
@media (min-width: 900px) and (max-height: 800px) {
  .hs.hs-on .hcard { padding: 18px 22px; }
  .hs.hs-on .hcard .app-summary { -webkit-line-clamp: 2; }
  .hs.hs-on .hcard .app-facts { grid-template-columns: minmax(0, 1fr); margin-top: 12px; padding-top: 10px; }
  .hs.hs-on .hcard .app-facts > div:first-child { display: none; }
  .hs.hs-on .hcard .app-title { margin-top: 12px; }
  .hs.hs-on .hcard .app-icon { width: 52px; height: 52px; }
  .hs.hs-on .hcard .app-bottom { margin-top: 12px; }
  .hs.hs-on .more-hcard .more-item { padding: 12px 4px; }
  .hs.hs-on .more-hcard .more-item .t > span:not(.where) { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
}

/* Phones & tablets (pinned only when ≥700px tall) */
@media (max-width: 899px) {
  .hs.hs-on .hcard { grid-template-rows: minmax(0, 0.72fr) minmax(0, 1.28fr); padding: 16px; gap: 12px; }
  .hs.hs-on .hcard.more-hcard, .hs.hs-on .hcard.mcp-card { grid-template-rows: none; }
  .hs.hs-on .hs-title { font-size: clamp(1.6rem, 6.4vw, 2.2rem); }
  .hs.hs-on .hs-viewport { margin-top: 14px; }
  .hcard .doha-logo { margin-top: 10px; height: 32px; }
  .hcard .doha-logo img { height: 18px; }
  .more-hcard .more-grid { margin-top: 12px; }
  .more-hcard .more-item { padding: 10px 2px; gap: 12px; }
  .more-hcard .more-item img, .more-hcard .more-item .mono { width: 40px; height: 40px; border-radius: 11px; }
  .more-hcard .more-item .t > span:not(.where) { display: none; }
  .more-hcard .more-item .go { width: 34px; height: 34px; }
  .mcp-card .badges, .mcp-card .lede { display: none; }
  .mcp-card .hcard-name { font-size: 1.5rem; }
  .mcp-card .mcp-node b { font-size: 14.5px; margin-top: 2px; }
  .mcp-card .mcp-asks { margin-top: 14px; }
  .mcp-card .mcp-asks span { font-size: 12.5px; padding: 6px 12px; }
  .mcp-card .mcp-foot { margin-top: 10px; font-size: 12px; }
  .builds .hcard .badges { display: none; }
  .builds .hcard .build-title { margin-top: 0; }
  .builds .hcard .build-title img, .builds .hcard .build-title .mark { width: 44px; height: 44px; border-radius: 12px; }
  .builds .hcard h3 { font-size: 1.45rem; }
  .builds .hcard .lede { margin-top: 10px; font-size: 0.98rem; }
  .builds .hcard .feature-list.one { margin-top: 12px; }
  .builds .hcard .build-links { margin-top: 12px; }
  .builds .hcard .build-links .btn { min-height: 42px; }
}

@media (max-width: 899px) { .mcp-card .mcp-asks span:nth-child(n+2) { display: none; } }
.js .builds .hcard .cd-chart .bars i { transform: scaleY(0.2); }
.js .builds .hcard.is-current .cd-chart .bars i { transform: none; }
@media (prefers-reduced-motion: reduce) { .js .builds .hcard .cd-chart .bars i { transform: none; } }
.preg-screen.shot-screen { aspect-ratio: 560 / 1245; display: block; background: #fdf6f4; }
.preg-screen.shot-screen img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }

/* --------------------------------------------------------------------------
   Apps section — light cards (matches "Beyond the app stores")
   -------------------------------------------------------------------------- */
.work.work-light { background: var(--paper); color: var(--ink); border-radius: 0; }
.work-light .hcard {
  border: 1px solid var(--line);
  background:
    radial-gradient(110% 80% at 0% 100%, color-mix(in srgb, var(--app) 16%, transparent), transparent 62%),
    rgba(255, 255, 255, 0.66);
  box-shadow: 0 40px 80px -60px rgba(18, 17, 16, 0.45);
}
.work-light .app-meta-top { color: var(--ink-3); }
.work-light .app-meta-top .bar { background: var(--line); }
.work-light .app-meta-top .idx,
.work-light .app-facts dt { color: color-mix(in srgb, var(--app) 55%, #121110); }
.work-light .hcard-name .kind, .work-light .app-title .kind { color: var(--ink-3); }
.work-light .app-summary { color: var(--ink-2); }
.work-light .app-facts { border-top-color: var(--line); }
.work-light .app-facts dd { color: var(--ink-2); }
.work-light .app-metric b, .work-light .doha-metrics b { color: var(--ink); }
.work-light .app-metric span, .work-light .doha-metrics span { color: var(--ink-3); }
.work-light .app-note { color: var(--ink-3); }
.work-light .app-icon { box-shadow: 0 0 0 1px var(--line), 0 14px 26px -16px rgba(18, 17, 16, 0.5); }
.work-light .store { border-color: var(--line-strong); color: var(--ink); }
.work-light .store small { color: var(--ink-3); }
.work-light .store:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.work-light .store:hover small { color: #c9c3b8; }
.work-light .app-index a { border-color: var(--line-strong); color: var(--ink-2); background: rgba(255, 255, 255, 0.5); }
.work-light .app-index a:hover { background: #fff; color: var(--ink); border-color: var(--ink); }
.work-light .app-index a[aria-current="true"] { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.work-light .app-index img { background: var(--paper-2); }
.work-light .app-index .ix-dot { background: var(--paper-3); }
.work-light .concept-tag { color: var(--ink-3); border-color: var(--line-strong); }
.work-light .doha-logo { border: 1px solid var(--line); }
.work-light .more-hcard { background: rgba(255, 255, 255, 0.66); }
.work-light .more-grid { border-top-color: var(--line); }
.work-light .more-item { border-bottom-color: var(--line); }
.work-light .more-item:nth-child(odd) { border-right-color: var(--line); }
.work-light .more-item span { color: var(--ink-3); }
.work-light .more-item .t .where { color: #8b857b; }
.work-light .more-item .mono { background: var(--paper-2); border-color: var(--line); color: var(--ink-3); }
.work-light .more-item .go { border-color: var(--line-strong); }
.work-light .hstage .phone { box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.09), 0 0 0 1px rgba(0, 0, 0, 0.7), 0 40px 60px -34px rgba(18, 17, 16, 0.55); }
.work-light .hstage .slot.s-left .shot, .work-light .hstage .slot.s-right .shot { filter: none; }

/* Pregnancy card on phones: phone + widget side by side */
@media (max-width: 899px) {
  .hs.hs-on .hcard.preg { grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); }
  .preg .hcard-media { min-height: 0; }
  .preg .preg-stage { flex-direction: row; align-items: center; gap: 10px; padding: 10px; }
  .preg .preg-phone { width: min(150px, 42cqh, 44cqw); padding: 5px; border-radius: 22px; }
  .preg .preg-screen { border-radius: 18px; }
  .preg .preg-widget { width: min(180px, 48cqw); padding: 10px 12px; border-radius: 16px; }
  .preg .preg-widget b { font-size: 14px; }
  .preg .preg-widget .w-sub { font-size: 10px; }
  .preg .preg-widget .w-chips { flex-wrap: wrap; gap: 4px; }
  .preg .preg-widget .w-chips span { font-size: 9px; }
  .preg .widget-label { font-size: 9px; margin-bottom: 6px; }
  .preg .feature-list.one li:nth-child(n+2) { display: none; }
}
.hs:not(.hs-on) .preg .preg-stage { height: 340px; }

/* App tab bar — frosted glass pill, matching the top navigation */
.work-light .app-index {
  position: relative;
  z-index: 2;
  flex-wrap: nowrap;
  gap: 4px;
  padding: 5px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.42));
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 0 0 1px rgba(18, 17, 16, 0.06),
    0 18px 40px -22px rgba(18, 17, 16, 0.45);
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
  backdrop-filter: saturate(1.6) blur(18px);
}
.work-light .app-index a {
  position: relative;
  z-index: 1;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  transition: background-color 0.3s, color 0.4s var(--ease-out), box-shadow 0.3s;
}
.work-light .app-index a:hover { background: rgba(255, 255, 255, 0.75); color: var(--ink); border: 0; }
.work-light .app-index a[aria-current="true"] {
  background: transparent;
  color: var(--paper);
  box-shadow: none;
}
.work-light .app-index a[aria-current="true"]:hover { background: transparent; color: var(--paper); }
/* The filled pill that glides from tab to tab (js/main.js → hsIndicator) */
.app-index .ix-ind {
  position: absolute;
  top: 5px;
  bottom: 5px;
  left: 0;
  width: 0;
  border-radius: 999px;
  background: var(--ink);
  box-shadow: 0 8px 18px -10px rgba(18, 17, 16, 0.7);
  opacity: 0;
  transform: translateX(0);
  transition: transform 0.6s var(--ease-out), width 0.6s var(--ease-out), opacity 0.35s;
  pointer-events: none;
}
.app-index .ix-ind.is-on { opacity: 1; }
/* Without the script's pill (e.g. before it has measured), fall back to a filled tab. */
.work-light .app-index:not(:has(.ix-ind.is-on)) a[aria-current="true"] { background: var(--ink); }
@media (prefers-reduced-motion: reduce) { .app-index .ix-ind { transition: opacity 0.35s; } }
.work-light .app-index img { background: #fff; box-shadow: 0 0 0 1px var(--line); object-fit: cover; }
.ix-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  width: 28px; height: 28px;
  padding: 6px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 0 0 1px var(--line);
}
.ix-grid i { border-radius: 2px; background: var(--accent); }
.ix-grid i:nth-child(2), .ix-grid i:nth-child(3) { background: var(--ink); }
.work-light .app-index a[aria-current="true"] .ix-grid { background: var(--paper); }

/* Opened with an #anchor: jump instantly so js/main.js can land on the right card */
html.no-smooth { scroll-behavior: auto; }

/* Pass: concept delivery-map screen (drawn, not a capture) */
.pass-map { position: relative; background: #f3f1ec; font-family: var(--f-body); color: #102048; }
.pass-map .pm-map { position: absolute; inset: 0; width: 100%; height: 100%; }
.pass-map .pm-route { stroke-dasharray: 340; stroke-dashoffset: 340; }
.hstage.is-in .pass-map .pm-route { animation: pm-draw 2.4s var(--ease-out) 0.5s forwards; }
@keyframes pm-draw { to { stroke-dashoffset: 0; } }
.pm-top { position: absolute; top: 9%; left: 8%; right: 8%; display: flex; justify-content: space-between; align-items: center; padding: 5px 9px; border-radius: 999px; background: #fff; box-shadow: 0 6px 14px -8px rgba(16, 32, 72, 0.5); font-size: clamp(7px, 2.6cqh, 11px); }
.pm-top b { font-family: var(--f-display); font-weight: 700; letter-spacing: -0.03em; color: #102048; }
.pm-top span { color: #6b7488; }
.pm-eta { position: absolute; top: 44%; left: 24%; padding: 4px 9px; border-radius: 999px; background: #102048; color: #fff; font-size: clamp(6px, 2.2cqh, 10px); white-space: nowrap; }
.pm-sheet { position: absolute; left: 0; right: 0; bottom: 0; padding: 9% 9% 11%; border-radius: 16px 16px 0 0; background: #fff; box-shadow: 0 -10px 20px -14px rgba(16, 32, 72, 0.5); font-size: clamp(6px, 2.2cqh, 10px); }
.pm-sheet b { display: block; font-size: clamp(7px, 2.6cqh, 11.5px); }
.pm-steps { display: flex; gap: 4px; margin: 7px 0 8px; }
.pm-steps i { flex: 1; height: 4px; border-radius: 4px; background: #e2e5ee; }
.pm-steps i.on { background: #1cc4cc; }
.pm-sheet span { display: flex; align-items: center; gap: 6px; margin-top: 4px; color: #4b5470; }
.pm-sheet em { width: 7px; height: 7px; border-radius: 50%; }
.pm-sheet em.a { background: #1cc4cc; } .pm-sheet em.b { background: #102048; }
@media (prefers-reduced-motion: reduce) { .pass-map .pm-route { stroke-dashoffset: 0; animation: none; } }

/* ==========================================================================
   Case studies — dark "case files" with a glass tab bar
   ========================================================================== */
.cases.on-night {
  background:
    radial-gradient(60% 50% at 85% 0%, rgba(255, 91, 36, 0.12), transparent 70%),
    radial-gradient(50% 40% at 0% 100%, rgba(79, 141, 245, 0.1), transparent 70%),
    var(--night);
}
.cs { position: relative; }
.cs-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 24px 50px -30px rgba(0, 0, 0, 0.9);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
}
.cs-tabs button {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 6px 18px 6px 6px;
  border-radius: 16px;
  color: var(--night-muted);
  text-align: left;
  transition: background-color 0.35s, color 0.35s, box-shadow 0.35s;
}
.cs-tabs button b { display: block; font-family: var(--f-display); font-size: 16px; font-weight: 600; letter-spacing: -0.02em; color: var(--night-text); }
.cs-tabs button small { display: block; font-size: 12px; }
.cs-tabs button:hover { background: rgba(255, 255, 255, 0.06); }
.cs-tabs button[aria-selected="true"] {
  background: rgba(255, 255, 255, 0.1);
  color: #d9d3c8;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 60%, transparent), 0 14px 30px -18px var(--c);
}
.cs-tab-logo { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: #fff; overflow: hidden; flex: none; }
.cs-tab-logo img { width: 100%; height: 100%; object-fit: contain; }

.cs-panel {
  --c: var(--accent);
  position: relative;
  margin-top: 22px;
  padding: clamp(22px, 4vw, 52px);
  border-radius: 28px;
  border: 1px solid var(--night-line);
  background:
    radial-gradient(70% 60% at 100% 0%, color-mix(in srgb, var(--c) 22%, transparent), transparent 70%),
    linear-gradient(180deg, var(--night-2), #111214);
  overflow: hidden;
  isolation: isolate;
}
.cs-panel::before {
  /* hairline glow along the top edge */
  content: "";
  position: absolute;
  inset: 0 10% auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--c) 80%, #fff), transparent);
  opacity: 0.7;
}
.js .cs-panel:not(.is-active) { display: none; }
.js .cs-panel.is-active { animation: cs-in 0.7s var(--ease-out) both; }
@keyframes cs-in { from { opacity: 0; transform: translate3d(0, 18px, 0); } to { opacity: 1; transform: none; } }

.cs-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  padding-bottom: clamp(24px, 3vw, 36px);
  border-bottom: 1px solid var(--night-line);
}
@media (min-width: 1000px) { .cs-head { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: end; gap: 48px; } }
.cs-logo { display: inline-flex; align-items: center; height: 48px; padding: 0 14px; border-radius: 12px; background: #fff; margin-bottom: 20px; }
.cs-logo img { height: 28px; width: auto; }
.cs-id .eyebrow { display: flex; }
.cs-id h3 {
  margin-top: 14px;
  font-family: var(--f-display);
  font-size: clamp(2rem, 4vw, 3.6rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 0.98;
}
.cs-id h3 .serif { color: color-mix(in srgb, var(--c) 70%, #fff); font-size: 1.05em; }
.cs-id .who { margin-top: 16px; color: var(--night-muted); font-size: 15px; }
.cs-id .who b { color: var(--night-text); font-weight: 600; }
.cs-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; border-radius: 18px; overflow: hidden; background: var(--night-line); border: 1px solid var(--night-line); }
.cs-metrics li { padding: 18px 20px; background: rgba(13, 14, 16, 0.6); }
.cs-metrics b {
  display: block;
  font-family: var(--f-display);
  font-size: clamp(1.9rem, 3.4vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 1;
  background: linear-gradient(180deg, #fff, color-mix(in srgb, var(--c) 45%, #fff));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.cs-metrics span { display: block; margin-top: 8px; font-size: 13px; color: var(--night-muted); line-height: 1.35; }
.js .cs-panel.is-active .cs-metrics li { animation: cs-pop 0.8s var(--ease-out) both; }
.js .cs-panel.is-active .cs-metrics li:nth-child(2) { animation-delay: 0.08s; }
.js .cs-panel.is-active .cs-metrics li:nth-child(3) { animation-delay: 0.16s; }
.js .cs-panel.is-active .cs-metrics li:nth-child(4) { animation-delay: 0.24s; }
@keyframes cs-pop { from { opacity: 0; transform: translate3d(0, 14px, 0); } to { opacity: 1; transform: none; } }

.cs-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  padding-block: clamp(24px, 3vw, 36px);
}
@media (min-width: 900px) { .cs-body { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; } }
.cs-col { position: relative; padding: 22px; border-radius: 18px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--night-line); }
.cs-step { font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.08em; color: color-mix(in srgb, var(--c) 70%, #fff); }
.cs-col h4 { margin-top: 8px; font-family: var(--f-display); font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.cs-col p, .cs-col li { margin-top: 10px; color: #cfc9be; font-size: 15px; line-height: 1.55; }
.cs-col ul { display: grid; gap: 2px; }
.cs-col li { position: relative; padding-left: 18px; margin-top: 8px; }
.cs-col li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 8px; height: 8px; border-radius: 2px; background: var(--c); }
.cs-col strong { color: var(--night-text); font-weight: 600; }

.cs-visual { margin: 0; padding: clamp(18px, 3vw, 28px); border-radius: 20px; border: 1px dashed rgba(243, 239, 231, 0.16); background: rgba(255, 255, 255, 0.02); }
.cs-visual figcaption { margin-top: 14px; font-family: var(--f-mono); font-size: 11.5px; color: var(--night-muted); }

/* Jeeb: animated server-driven flow */
.cs-flow { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
@media (min-width: 760px) { .cs-flow { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; } }
.cs-flow .fnode { position: relative; z-index: 1; padding: 16px; border-radius: 14px; background: #17191d; border: 1px solid rgba(243, 239, 231, 0.12); transition: border-color 0.35s, box-shadow 0.35s, transform 0.35s var(--ease-out); }
.cs-flow .fnode b { display: block; font-family: var(--f-display); font-size: 16px; font-weight: 600; }
.cs-flow .fnode span { display: block; margin-top: 4px; font-size: 13px; color: var(--night-muted); }
.cs-flow .fnode.hot, .cs-flow .fnode.is-on { border-color: var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 18%, transparent), 0 18px 30px -20px var(--c); }
.cs-flow .fnode.is-on { transform: translateY(-3px); }
.cs-wire { position: absolute; z-index: 0; left: 6%; right: 6%; top: 50%; height: 2px; background: repeating-linear-gradient(90deg, rgba(243, 239, 231, 0.2) 0 6px, transparent 6px 12px); overflow: hidden; }
.cs-wire::after { content: ""; position: absolute; top: -2px; left: -20%; width: 20%; height: 6px; border-radius: 6px; background: linear-gradient(90deg, transparent, var(--c), transparent); animation: packet 2.6s linear infinite; }
@media (max-width: 759px) {
  .cs-wire { left: 22px; right: auto; top: 6%; bottom: 6%; width: 2px; height: auto; background: repeating-linear-gradient(180deg, rgba(243, 239, 231, 0.2) 0 6px, transparent 6px 12px); }
  .cs-wire::after { left: -2px; top: -20%; width: 6px; height: 20%; background: linear-gradient(180deg, transparent, var(--c), transparent); animation-name: packet-v; }
  .cs-flow .fnode { margin-left: 44px; }
}

/* Kobet: app family + team */
.cs-family { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
@media (min-width: 900px) { .cs-family { grid-template-columns: 1.4fr 1fr; align-items: center; } .cs-family figcaption { grid-column: 1 / -1; margin-top: 0; } }
.cs-apps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.cs-apps li { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 14px 8px; border-radius: 16px; background: #17191d; border: 1px solid rgba(243, 239, 231, 0.1); transition: transform 0.4s var(--ease-out), border-color 0.3s; }
.cs-apps li:hover { transform: translateY(-4px); border-color: rgba(243, 239, 231, 0.3); }
.cs-apps img { width: 56px; height: 56px; border-radius: 15px; box-shadow: 0 14px 24px -14px rgba(0, 0, 0, 0.9); }
.cs-apps b { margin-top: 10px; font-size: 14px; }
.cs-apps span { font-size: 11.5px; color: var(--night-muted); }
.cs-team { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.cs-city { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: #17191d; border: 1px solid rgba(243, 239, 231, 0.12); font-size: 14px; font-weight: 500; }
.cs-city i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 22%, transparent); }
.cs-link { width: 28px; height: 2px; background: repeating-linear-gradient(90deg, var(--c) 0 4px, transparent 4px 8px); opacity: 0.8; }
@media (max-width: 480px) { .cs-apps { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cs-link { display: none; } }

/* eVV: real screen + roles */
.cs-evv { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; align-items: center; justify-items: center; }
@media (min-width: 760px) { .cs-evv { grid-template-columns: 220px minmax(0, 1fr); justify-items: stretch; } .cs-evv figcaption { grid-column: 1 / -1; } }
.cs-evv-phone { width: 200px; padding: 7px; border-radius: 30px; background: linear-gradient(145deg, #34373d, #0b0c0e 42%, #26292e); box-shadow: 0 30px 60px -30px rgba(79, 141, 245, 0.6); }
.cs-evv-phone img { width: 100%; border-radius: 24px; aspect-ratio: 560 / 996; object-fit: cover; }
.cs-roles { display: grid; gap: 10px; width: 100%; }
.cs-roles li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 18px; border-radius: 14px; background: #17191d; border: 1px solid rgba(243, 239, 231, 0.1); }
.cs-roles b { font-family: var(--f-display); font-size: 18px; font-weight: 600; }
.cs-roles span { color: var(--night-muted); font-size: 13.5px; }

/* Lab strip on the dark background */
.cases.on-night .lab { background: var(--night-line); border-color: var(--night-line); }
.cases.on-night .lab > * { background: var(--night-2); }
.cases.on-night .lab .lab-head { background: linear-gradient(160deg, #2a1810, var(--night-2) 70%); }
.cases.on-night .lab p { color: #cfc9be; }
.cases.on-night .lab .eyebrow { color: var(--night-muted); }
.cases.on-night .lab .chip { border-color: var(--night-line); color: #cfc9be; }

@media (max-width: 640px) {
  .cs-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
  .cs-tabs button { flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 8px 4px; }
  .cs-tabs button small { display: none; }
  .cs-metrics li { padding: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .js .cs-panel.is-active, .js .cs-panel.is-active .cs-metrics li { animation: none; }
  .cs-wire::after { animation: none; }
}
.cs-logo.square { height: 56px; width: 56px; padding: 6px; justify-content: center; }
.cs-logo.square img { height: 100%; width: 100%; object-fit: contain; border-radius: 8px; }

/* --------------------------------------------------------------------------
   Lab: featured side project with its real app screen
   -------------------------------------------------------------------------- */
@media (min-width: 760px) {
  .lab { grid-template-columns: 1fr 1fr; }
  .lab .lab-head { grid-column: 1 / -1; }
}
.lab .lab-head { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: center; overflow: hidden; }
@media (min-width: 900px) { .lab .lab-head { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; padding: 32px 36px 0; } }
.lab .lab-text h4 { font-size: clamp(1.4rem, 2.4vw, 2rem); letter-spacing: -0.03em; }
.lab .lab-text code { font-family: var(--f-mono); font-size: 0.86em; padding: 1px 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.08); color: #ffd2bf; }
.lab-visual { position: relative; margin: 0; align-self: end; display: flex; flex-direction: column; align-items: center; }
.lab-phone {
  width: min(300px, 78%);
  padding: 9px 9px 0;
  border-radius: 38px 38px 0 0;
  background: linear-gradient(145deg, #3a3d43, #0b0c0e 40%, #26292e);
  box-shadow: 0 -10px 60px -20px rgba(255, 91, 36, 0.35), inset 0 0 0 1.5px rgba(255, 255, 255, 0.08);
  -webkit-mask-image: linear-gradient(180deg, #000 78%, transparent);
  mask-image: linear-gradient(180deg, #000 78%, transparent);
}
.lab-phone img { display: block; width: 100%; border-radius: 30px 30px 0 0; }
.lab-bubble, .lab-json {
  position: absolute;
  z-index: 2;
  margin: 0;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 12.5px;
  line-height: 1.45;
  box-shadow: 0 18px 36px -18px rgba(0, 0, 0, 0.8);
  max-width: 220px;
}
.lab-bubble span, .lab-json span { display: block; margin-bottom: 4px; font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.7; }
.lab-bubble { top: 16%; left: 0; background: #fff; color: #121110; border-radius: 14px 14px 14px 4px; }
.lab-json { bottom: 22%; right: 0; background: #1b1d21; color: #9fe3b4; border: 1px solid rgba(159, 227, 180, 0.25); font-family: var(--f-mono); font-size: 11.5px; white-space: pre; border-radius: 14px 14px 4px 14px; }
.lab-visual figcaption { position: absolute; bottom: 8px; left: 0; right: 0; text-align: center; font-family: var(--f-mono); font-size: 10.5px; color: var(--night-muted); }
.js .lab-visual .lab-bubble, .js .lab-visual .lab-json { animation: drift 7s ease-in-out infinite alternate; }
.js .lab-visual .lab-json { animation-delay: -3s; }
@media (max-width: 560px) {
  .lab-bubble { position: relative; top: auto; left: auto; align-self: flex-start; margin-bottom: 12px; }
  .lab-json { position: relative; bottom: auto; right: auto; align-self: flex-end; margin: -40px 0 34px; }
}

/* --------------------------------------------------------------------------
   Case-study tabs: clearer, logo-fitted, brand-lit
   -------------------------------------------------------------------------- */
.cs-tabs { gap: 8px; padding: 8px; border-radius: 24px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.04)); border-color: rgba(255, 255, 255, 0.14); }
.cs-tabs button {
  position: relative;
  gap: 14px;
  min-height: 64px;
  padding: 8px 22px 8px 8px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
  color: #b9b3a8;
  transition: background 0.35s, border-color 0.35s, box-shadow 0.35s, transform 0.35s var(--ease-out);
}
.cs-tabs button b { font-size: 17px; color: #f3efe7; }
.cs-tabs button small { margin-top: 2px; font-size: 12.5px; color: #b9b3a8; }
.cs-tabs button:hover { border-color: rgba(255, 255, 255, 0.22); background: rgba(255, 255, 255, 0.07); transform: translateY(-1px); }
.cs-tabs button[aria-selected="true"] {
  border-color: color-mix(in srgb, var(--c) 75%, #fff);
  background:
    radial-gradient(120% 140% at 0% 50%, color-mix(in srgb, var(--c) 34%, transparent), transparent 70%),
    rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 16%, transparent), 0 18px 36px -20px var(--c);
}
.cs-tabs button[aria-selected="true"] small { color: #ece6db; }
.cs-tabs button[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -9px;
  width: 26px;
  height: 3px;
  margin-left: -13px;
  border-radius: 3px;
  background: var(--c);
  box-shadow: 0 0 12px var(--c);
}
.cs-tab-logo {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 5px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 18px -10px rgba(0, 0, 0, 0.8), inset 0 0 0 1px rgba(18, 17, 16, 0.06);
  overflow: hidden;
}
.cs-tab-logo img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.cs-tab-logo.full { padding: 0; }
.cs-tab-logo.full img { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; }
@media (max-width: 640px) {
  .cs-tabs button { padding: 10px 6px 12px; min-height: 0; }
  .cs-tabs button b { font-size: 15px; }
  .cs-tab-logo { width: 44px; height: 44px; }
}
.lab-json { max-width: none; right: 2%; font-size: 11px; }
.lab-bubble { left: 1%; max-width: 200px; }
@media (min-width: 900px) and (max-width: 1180px) { .lab-json { right: 0; bottom: 26%; } .lab-bubble { top: 10%; } }

/* Lab cards with phone screens (Social media app, Face detection) */
.lab > .lab-card { display: flex; flex-direction: column; }
.lab-phones { display: flex; justify-content: center; align-items: flex-end; gap: 12px; margin: 22px 0 18px; }
.lab-phones .lp { flex: 1 1 0; max-width: 150px; display: flex; flex-direction: column; align-items: center; }
.lab-phones.two .lp { max-width: 170px; }
.lab-phones .lp:nth-child(2) { transform: translateY(-14px); }
.lab-phones.two .lp:nth-child(2) { transform: none; }
.lp-scr {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 18.3;
  border-radius: 20px;
  overflow: hidden;
  border: 5px solid #121316;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 24px 40px -24px rgba(0, 0, 0, 0.9);
  transition: transform 0.5s var(--ease-out);
}
.lab-phones .lp:hover .lp-scr { transform: translateY(-4px); }
.lp-scr > img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
.lp-tag { margin-top: 8px; font-family: var(--f-mono); font-size: 9.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--night-muted); text-align: center; }

/* Concept: chat */
.ui-chat { display: flex; flex-direction: column; background: #eef1f7; font-size: 8.5px; color: #121110; }
.c-top { display: flex; align-items: center; gap: 6px; padding: 9px 7px 7px; background: #4f46e5; color: #fff; }
.c-top i { width: 18px; height: 18px; border-radius: 50%; background: linear-gradient(135deg, #f9a8d4, #a78bfa); flex: none; }
.c-top span { flex: 1; line-height: 1.1; } .c-top b { display: block; font-size: 9px; } .c-top small { font-size: 7px; opacity: 0.8; }
.c-top em { font-style: normal; font-size: 10px; opacity: 0.9; }
.c-msgs { flex: 1; display: flex; flex-direction: column; gap: 5px; padding: 8px 6px; }
.c-msgs p { margin: 0; max-width: 80%; padding: 5px 7px; border-radius: 9px; line-height: 1.3; }
.c-msgs .in { align-self: flex-start; background: #fff; border-bottom-left-radius: 3px; }
.c-msgs .out { align-self: flex-end; background: #4f46e5; color: #fff; border-bottom-right-radius: 3px; }
.c-msgs .typing { display: flex; gap: 3px; padding: 7px 8px; }
.c-msgs .typing i { width: 4px; height: 4px; border-radius: 50%; background: #9aa3b5; animation: typing 1.2s infinite; }
.c-msgs .typing i:nth-child(2) { animation-delay: 0.2s; } .c-msgs .typing i:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing { 0%, 60%, 100% { opacity: 0.3; transform: none; } 30% { opacity: 1; transform: translateY(-2px); } }
.c-input { display: flex; align-items: center; gap: 5px; margin: 0 6px 8px; padding: 5px 5px 5px 9px; border-radius: 999px; background: #fff; color: #9aa3b5; }
.c-input span { flex: 1; } .c-input b { display: grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: #4f46e5; color: #fff; font-size: 7px; }

/* Concept: video call */
.ui-call { background: radial-gradient(80% 60% at 50% 35%, #3b3f77, #14152a); color: #fff; }
.v-remote { position: absolute; inset: 0; display: grid; place-items: center; }
.v-remote span { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #f9a8d4, #a78bfa); font-family: var(--f-display); font-size: 24px; font-weight: 700; box-shadow: 0 0 0 8px rgba(167, 139, 250, 0.18), 0 0 0 16px rgba(167, 139, 250, 0.08); animation: ring 2.4s ease-out infinite; }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(167, 139, 250, 0.35), 0 0 0 0 rgba(167, 139, 250, 0.2); } 100% { box-shadow: 0 0 0 14px rgba(167, 139, 250, 0), 0 0 0 26px rgba(167, 139, 250, 0); } }
.v-self { position: absolute; top: 10px; right: 8px; width: 30%; aspect-ratio: 3 / 4; border-radius: 8px; background: linear-gradient(160deg, #6b7280, #374151); border: 1.5px solid rgba(255, 255, 255, 0.5); }
.v-info { position: absolute; top: 12px; left: 9px; line-height: 1.15; } .v-info b { display: block; font-size: 9px; } .v-info small { font-size: 7.5px; opacity: 0.75; }
.v-ctrl { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; justify-content: center; gap: 8px; }
.v-ctrl i { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: rgba(255, 255, 255, 0.18); font-style: normal; font-size: 9px; }
.v-ctrl i.end { background: #ef4444; }
@media (prefers-reduced-motion: reduce) { .c-msgs .typing i, .v-remote span { animation: none; } }

/* Auto-fit levels (js/main.js → hsFit): trim secondary details, never the actions */
.hcard-copy { justify-content: safe center; }
.hcard.fit-1 .app-facts > div:first-child,
.hcard.fit-1 .app-note,
.hcard.fit-1 .gallery-caption { display: none; }
.hcard.fit-1 .app-facts { grid-template-columns: minmax(0, 1fr); }
.hcard.fit-2 .app-stack,
.hcard.fit-2 .role-stack,
.hcard.fit-2 .badges { display: none; }
.hcard.fit-3 .app-facts,
.hcard.fit-3 .doha-metrics li:nth-child(3),
.hcard.fit-3 .feature-list.one li:nth-child(n+3) { display: none; }
.hcard.fit-4 .app-summary,
.hcard.fit-4 .lede { -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.hcard.fit-4 .app-title { margin-top: 8px; }
.hcard.fit-4 .app-bottom { margin-top: 10px; }
.hcard.fit-5 .app-metric span { display: none; }
.hcard.fit-5 .feature-list.one { display: none; }
.hcard .app-bottom { flex-shrink: 0; }
.hcard .store { min-height: 44px; }

/* Case files: stack all panels so the section height never jumps while rotating */
.js .cs { display: grid; grid-template-columns: minmax(0, 1fr); }
.js .cs > .cs-tabs { grid-row: 1; justify-self: start; }
.js .cs > .cs-panel { grid-row: 2; grid-column: 1; display: block !important; }
.js .cs-panel:not(.is-active) { visibility: hidden; opacity: 0; pointer-events: none; }
@media (max-width: 640px) { .js .cs > .cs-tabs { justify-self: stretch; } }
/* Progress bar on the active tab while auto-rotating */
.cs-tabs button { overflow: hidden; }
.cs-tabs button::before {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: var(--c);
  transform: scaleX(0);
  transform-origin: 0 50%;
}
.cs.is-playing .cs-tabs button[aria-selected="true"]::before { animation: cs-progress var(--cs-dur, 9s) linear forwards; }
.cs-tabs button[aria-selected="true"]::after { display: none; }
@keyframes cs-progress { to { transform: scaleX(1); } }
.lab .c-msgs p { margin: 0; font-size: 8.5px; line-height: 1.3; color: #121110; }
.lab .c-msgs p.out { color: #fff; }
.lab .c-msgs p.typing { display: flex; }
@media (max-width: 480px) { .lab .c-msgs p { font-size: 7.5px; } }
.cases.on-night .lab .c-msgs p.in { color: #121110; }
.cases.on-night .lab .c-msgs p.out { color: #fff; }

/* --------------------------------------------------------------------------
   Case files v3: sticky glass bar + sliding, auto-rotating panels
   -------------------------------------------------------------------------- */
.js .cs > .cs-bar { grid-row: 1; justify-self: start; }
.js .cs > .cs-panel { grid-row: 2; }
.cs-bar {
  position: sticky;
  top: calc(var(--nav-h) + 8px);
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04) 45%, rgba(255, 255, 255, 0.1));
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -1px 0 rgba(255, 255, 255, 0.05),
    0 30px 60px -30px rgba(0, 0, 0, 0.95),
    0 0 0 1px rgba(0, 0, 0, 0.25);
  -webkit-backdrop-filter: blur(22px) saturate(1.7);
  backdrop-filter: blur(22px) saturate(1.7);
  isolation: isolate;
}
.cs-bar::before {
  /* soft colour wash that follows the active case, so the glass has something to refract */
  content: "";
  position: absolute;
  inset: -30% -10%;
  z-index: -1;
  border-radius: 40px;
  background: radial-gradient(40% 60% at var(--glow-x, 20%) 50%, color-mix(in srgb, var(--glow, #3f86ef) 40%, transparent), transparent 70%);
  filter: blur(18px);
  opacity: 0.7;
  transition: background 0.8s var(--ease-out);
}
.cs-bar .cs-tabs { padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.cs-tabs button { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.1); }
.cs-tabs button[aria-selected="true"] {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.06)),
    radial-gradient(120% 140% at 0% 50%, color-mix(in srgb, var(--c) 40%, transparent), transparent 70%);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 0 0 1px color-mix(in srgb, var(--c) 55%, transparent), 0 16px 34px -18px var(--c);
}
.cs-play {
  flex: none;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  color: #f3efe7;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: background-color 0.3s, transform 0.3s var(--ease-out);
}
.cs-play:hover { background: rgba(255, 255, 255, 0.2); transform: scale(1.05); }
.cs-play svg { width: 18px; height: 18px; }
.cs-play .i-play, .cs.is-paused .cs-play .i-pause { display: none; }
.cs.is-paused .cs-play .i-play { display: block; }

/* Slide transition between case files */
.js .cs > .cs-panel {
  transition: opacity 0.7s var(--ease-out), transform 0.8s var(--ease-out), visibility 0s linear 0.8s;
  transform: translate3d(70px, 0, 0);
}
.js .cs > .cs-panel.from-left { transform: translate3d(-70px, 0, 0); }
.js .cs > .cs-panel.to-left { transform: translate3d(-70px, 0, 0); }
.js .cs > .cs-panel.to-right { transform: translate3d(70px, 0, 0); }
.js .cs > .cs-panel.is-active { transform: none; opacity: 1; visibility: visible; transition: opacity 0.7s var(--ease-out) 0.1s, transform 0.8s var(--ease-out) 0.05s, visibility 0s; animation: none; }
.js .cs > .cs-panel.is-active .cs-metrics li { animation: cs-pop 0.8s var(--ease-out) both; }
.cs-panel.is-active .cs-col { animation: cs-pop 0.8s var(--ease-out) both; }
.cs-panel.is-active .cs-col:nth-child(2) { animation-delay: 0.08s; }
.cs-panel.is-active .cs-col:nth-child(3) { animation-delay: 0.16s; }

@media (max-width: 640px) {
  .js .cs > .cs-bar { justify-self: stretch; }
  .cs-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .cs-play { width: 40px; height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .js .cs > .cs-panel, .js .cs > .cs-panel.from-left, .js .cs > .cs-panel.to-left, .js .cs > .cs-panel.to-right { transform: none; transition: none; }
  .cs-panel.is-active .cs-col { animation: none; }
}
.cases { overflow-x: clip; } /* panels waiting off-stage must not widen the page; clip keeps the sticky bar working */

/* ==========================================================================
   Hero ID badge on a lanyard (js/main.js → initBadge)
   .badge-swing rotates around the strap's top (spring physics, drag),
   .badge-tilt adds a small 3D lean toward the cursor,
   .badge-card flips (rotateY 180deg) on click / Enter / Space.
   ========================================================================== */
.portrait { padding-top: 70px; }
.idbadge { position: relative; display: block; perspective: 1400px; }
.badge-swing {
  position: relative;
  transform-origin: 50% -70px;
  will-change: transform;
}
.badge-strap {
  position: absolute;
  left: 50%;
  bottom: calc(100% - 6px);
  width: 46px;
  height: 900px;
  margin-left: -23px;
  border-radius: 3px;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.25), transparent 22%, transparent 78%, rgba(0, 0, 0, 0.25)),
    var(--ink);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 82%);
  mask-image: linear-gradient(180deg, transparent 0, #000 82%);
  z-index: 0;
}
.badge-strap span {
  position: absolute;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%) rotate(180deg);
  writing-mode: vertical-rl;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  color: rgba(243, 239, 231, 0.75);
  white-space: nowrap;
}
.badge-clip {
  position: absolute;
  left: 50%;
  top: -22px;
  z-index: 2;
  width: 58px;
  height: 34px;
  margin-left: -29px;
  border-radius: 9px 9px 12px 12px;
  background: linear-gradient(180deg, #e9e6e0, #a9a49b 55%, #d9d5ce);
  box-shadow: inset 0 1px 0 #fff, inset 0 -2px 3px rgba(0, 0, 0, 0.25), 0 6px 12px -6px rgba(0, 0, 0, 0.6);
}
.badge-clip::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 7px;
  width: 22px;
  height: 7px;
  margin-left: -11px;
  border-radius: 4px;
  background: #6f6a61;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.6);
}
.badge-tilt { position: relative; z-index: 1; transform-style: preserve-3d; will-change: transform; }

.badge-card {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: none;
  text-align: left;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  transform-style: preserve-3d;
  transition: transform 0.9s var(--ease-out);
}
.idbadge.is-dragging .badge-card { cursor: grabbing; }
.badge-card.is-flipped { transform: rotateY(180deg); }
.badge-card:focus-visible { outline: none; }
.badge-card:focus-visible .badge-face { box-shadow: 0 0 0 3px var(--accent), 0 40px 80px -48px rgba(18, 17, 16, 0.6); }

.badge-face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  overflow: hidden;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  box-shadow: 0 40px 80px -48px rgba(18, 17, 16, 0.6), 0 0 0 1px rgba(18, 17, 16, 0.08);
}

/* Front */
.badge-front { background: #fbf9f5; color: var(--ink); }
.bf-head {
  position: relative;
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 58px;
  padding: 0 16px;
  background: var(--ink);
  color: var(--paper);
}
.bf-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; font-family: var(--f-display); font-weight: 700; font-size: 12px; letter-spacing: 0; }
.bf-org { font-family: var(--f-display); font-weight: 600; font-size: 13.5px; letter-spacing: 0.04em; line-height: 1.1; }
.bf-org small { display: block; font-family: var(--f-mono); font-weight: 400; font-size: 9.5px; letter-spacing: 0.12em; color: #a19c92; margin-top: 2px; }
.bf-slot { position: absolute; left: 50%; top: 9px; width: 54px; height: 9px; margin-left: -27px; border-radius: 5px; background: var(--paper); box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.45); }
.bf-tag { margin-left: auto; font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.16em; color: #a19c92; }
.bf-photo { position: relative; flex: 1; min-height: 0; overflow: hidden; background: var(--teal); }
.bf-photo picture, .bf-photo img { display: block; width: 100%; height: 100%; }
.bf-photo img { object-fit: cover; object-position: 50% 14%; pointer-events: none; }
.bf-holo {
  /* subtle holographic sheen that moves with the tilt */
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.28) 45%, rgba(169, 205, 213, 0.18) 52%, transparent 66%);
  transform: translateX(var(--sheen, -30%));
  mix-blend-mode: soft-light;
  pointer-events: none;
}
.bf-body { flex: none; display: flex; flex-direction: column; padding: 14px 18px 16px; }
.bf-name { font-family: var(--f-display); font-weight: 600; font-size: clamp(1.25rem, 2vw, 1.6rem); letter-spacing: -0.03em; line-height: 1.1; }
.bf-role { margin-top: 3px; font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.12em; color: var(--accent-ink); }
.bf-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 12px; }
.bf-bars {
  width: 46%;
  height: 26px;
  background: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 4px, var(--ink) 4px 5px, transparent 5px 8px, var(--ink) 8px 11px, transparent 11px 12px);
  opacity: 0.85;
}
.bf-id { font-family: var(--f-mono); font-size: 9.5px; letter-spacing: 0.12em; color: var(--ink-3); text-align: right; line-height: 1.4; }
.bf-id b { display: block; color: var(--ink); font-weight: 500; }

/* Back */
.badge-back {
  transform: rotateY(180deg);
  padding: 22px clamp(18px, 3vw, 28px);
  gap: 0;
  color: var(--night-text);
  background:
    radial-gradient(80% 60% at 100% 0%, rgba(255, 91, 36, 0.28), transparent 70%),
    radial-gradient(70% 50% at 0% 100%, rgba(169, 205, 213, 0.18), transparent 70%),
    var(--night);
}
.bb-top { display: flex; align-items: center; gap: 10px; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.14em; color: var(--night-muted); }
.bb-title { margin-top: auto; font-family: var(--f-display); font-weight: 600; font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.045em; line-height: 0.98; }
.bb-title em { display: block; font-family: var(--f-serif); font-style: italic; font-weight: 400; color: var(--accent); font-size: 1.06em; }
.bb-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin-top: 20px; border-radius: 14px; overflow: hidden; background: var(--night-line); border: 1px solid var(--night-line); }
.bb-stats > span { padding: 12px 14px; background: rgba(13, 14, 16, 0.6); font-size: 12px; color: var(--night-muted); line-height: 1.3; }
.bb-stats b { display: block; font-family: var(--f-display); font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 600; letter-spacing: -0.05em; color: var(--night-text); line-height: 1; margin-bottom: 4px; }
.bb-where { margin-top: 16px; font-size: 13px; color: #d9d3c8; }
.bb-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--night-line); font-family: var(--f-mono); font-size: 9.5px; letter-spacing: 0.06em; color: var(--night-muted); }
.bb-hint { margin-top: 10px; font-family: var(--f-mono); font-size: 9.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }

.badge-hint { margin-top: 18px; text-align: center; font-family: var(--f-mono); font-size: 11.5px; letter-spacing: 0.06em; color: var(--ink-3); }
.badge-hint .h-touch { display: none; }
@media (hover: none), (pointer: coarse) {
  .badge-hint .h-fine { display: none; }
  .badge-hint .h-touch { display: inline; }
  .badge-card { cursor: pointer; }
}

/* The badge replaces the old framed photo; keep the floating stats clear of the strap */
.portrait .float-tag.t1 { top: calc(70px + 9%); }
@media (max-width: 959px) { .portrait { padding-top: 56px; } .badge-swing { transform-origin: 50% -56px; } }
@media (max-width: 600px) {
  .bf-head { height: 50px; padding: 0 12px; }
  .bf-tag { display: none; }
  .bf-body { padding: 10px 14px 12px; }
  .bb-title { font-size: 1.9rem; }
  .bb-stats > span { padding: 9px 10px; font-size: 11px; }
  .bb-stats b { font-size: 1.5rem; }
  .bb-foot span:last-child { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .badge-card { transition: none; }
}
/* Floating stat cards step aside while the badge is flipped or being dragged */
.portrait .float-tag { transition: opacity 0.4s var(--ease-out), visibility 0s linear 0.4s; }
.portrait.badge-flipped .float-tag,
.portrait.badge-moving .float-tag { opacity: 0; visibility: hidden; }
.portrait .float-tag.t3 { bottom: 30%; }
@media (max-width: 600px) { .portrait .float-tag.t3 { bottom: 33%; } }

/* Badge a touch smaller than the old photo card (~10%) */
.portrait { width: min(100%, 440px); }
@media (max-width: 959px) { .portrait { width: min(100%, 390px); } }
@media (max-width: 600px) { .portrait { width: min(92%, 340px); } }
.idbadge.is-dragging .badge-swing, .idbadge.is-dragging .badge-tilt { will-change: transform; }

/* --------------------------------------------------------------------------
   Avatar in the nav's brand mark + the flight to the corner (js/mascot.js)
   -------------------------------------------------------------------------- */
.brand-mark.has-avatar { position: relative; overflow: hidden; }
.brand-avatar {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background-color: var(--teal);
  background-repeat: no-repeat;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.55);
  transition: opacity 0.25s, transform 0.35s var(--ease-out);
}
.brand-mark.avatar-away .brand-avatar { opacity: 0; transform: scale(0.3); }
.mascot.no-trans, .mascot.no-trans * { transition: none !important; }
.mascot-flyer {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 160;
  border-radius: 50%;
  background-color: var(--teal);
  background-repeat: no-repeat;
  box-shadow: 0 0 0 3px var(--paper), 0 18px 40px -14px rgba(18, 17, 16, 0.55);
  pointer-events: none;
  will-change: transform;
}
.mascot-flyer.ghost { box-shadow: none; filter: blur(1.5px); z-index: 159; }

/* --------------------------------------------------------------------------
   Ask an AI about me (compact, under the hero stats)
   -------------------------------------------------------------------------- */
.ask-ai {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) auto auto;
  align-items: center;
  gap: 14px 20px;
  margin-top: clamp(28px, 4vw, 44px);
  padding: 12px 12px 12px 14px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid transparent;
  background-clip: padding-box;
  box-shadow: 0 24px 50px -36px rgba(18, 17, 16, 0.45);
  isolation: isolate;
}
.ask-ai::before {
  /* slowly rotating AI-gradient border */
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(from var(--ask-a, 0deg), #10a37f, #4f8df5, #8e75b2, #d97757, #ff5b24, #10a37f);
  -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: ask-spin 6s linear infinite;
}
@property --ask-a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes ask-spin { to { --ask-a: 360deg; } }
.ask-ai-lead { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ask-ai-lead p { line-height: 1.3; }
.ask-ai-lead b { display: block; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.ask-ai-lead span { display: block; margin-top: 2px; font-size: 12.5px; color: var(--ink-3); }
.ask-orb {
  position: relative;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: conic-gradient(from var(--ask-a, 0deg), #10a37f, #4f8df5, #8e75b2, #d97757, #10a37f);
  animation: ask-spin 4s linear infinite;
  box-shadow: 0 8px 20px -8px rgba(79, 141, 245, 0.7);
}
.ask-orb i { position: absolute; inset: 4px; border-radius: 50%; background: var(--ink); }
.ask-orb i::after { content: "✦"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 15px; font-style: normal; animation: ask-twinkle 2.4s ease-in-out infinite; }
@keyframes ask-twinkle { 50% { transform: scale(0.8) rotate(45deg); opacity: 0.75; } }

.ask-ai-qs { display: flex; flex-wrap: wrap; gap: 6px; }
.ask-ai-qs button {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-size: 13px;
  color: var(--ink-2);
  background: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
  transition: background-color 0.25s, color 0.25s, border-color 0.25s;
}
.ask-ai-qs button:hover { border-color: var(--ink); color: var(--ink); }
.ask-ai-qs button[aria-checked="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.ask-ai-own { grid-column: 1 / -1; display: block; }
.ask-ai-own[hidden] { display: none; }
.ask-ai-own input {
  width: 100%;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: #fff;
  font: inherit;
  font-size: 14.5px;
  color: var(--ink);
}
.ask-ai-own input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.ask-ai-go { display: flex; gap: 6px; }
.ai-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 14px 0 11px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--paper);
  font-size: 13.5px;
  font-weight: 500;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s, background-color 0.3s;
}
.ai-btn img { width: 16px; height: 16px; padding: 2px; border-radius: 5px; background: #fff; box-sizing: content-box; }
.ai-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -12px rgba(18, 17, 16, 0.6); }
.ai-btn[data-ai="chatgpt"]:hover { background: #10a37f; }
.ai-btn[data-ai="gemini"]:hover { background: #4f6ef5; }
.ai-btn[data-ai="claude"]:hover { background: #c66a4d; }

@media (max-width: 1180px) {
  .ask-ai { grid-template-columns: minmax(0, 1fr) auto; }
  .ask-ai-qs { grid-column: 1 / -1; grid-row: 2; }
  .ask-ai-own { grid-row: 3; }
}
@media (max-width: 640px) {
  .ask-ai { grid-template-columns: minmax(0, 1fr); padding: 14px; }
  .ask-ai-qs { grid-row: auto; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; margin-inline: -2px; padding-bottom: 2px; }
  .ask-ai-qs::-webkit-scrollbar { display: none; }
  .ask-ai-own { grid-row: auto; }
  .ask-ai-go { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ai-btn { justify-content: center; padding: 0 8px; }
}
@media (prefers-reduced-motion: reduce) { .ask-ai::before, .ask-orb, .ask-orb i::after { animation: none; } }

/* Ask-AI: brighter, thicker moving outline with a soft travelling glow */
.ask-ai { border-radius: 22px; background: rgba(255, 255, 255, 0.75); }
.ask-ai::before {
  inset: -2.5px;
  padding: 2.5px;
  background: conic-gradient(from var(--ask-a, 0deg), #10a37f, #22d3ee, #4f8df5, #a855f7, #ec4899, #ff5b24, #facc15, #10a37f);
  animation: ask-spin 4s linear infinite;
}
.ask-ai::after {
  /* blurred copy of the gradient behind the card: a glow that orbits with the border */
  content: "";
  position: absolute;
  inset: -6px;
  z-index: -2;
  border-radius: 28px;
  background: conic-gradient(from var(--ask-a, 0deg), #10a37f, #22d3ee, #4f8df5, #a855f7, #ec4899, #ff5b24, #facc15, #10a37f);
  filter: blur(16px);
  opacity: 0.45;
  animation: ask-spin 4s linear infinite;
}
.ask-ai:hover::after { opacity: 0.7; }
@media (prefers-reduced-motion: reduce) { .ask-ai::after { animation: none; } }

/* Hero spacing: less air under the nav and between the stack and the stats */
.hero { padding-top: calc(var(--nav-h) + clamp(10px, 1.6vw, 24px)); }
.hero .proof { margin-top: clamp(24px, 3vw, 40px); }
.portrait { padding-top: 56px; }
.badge-swing { transform-origin: 50% -56px; }
.badge-hint { margin-top: 12px; }
.ask-ai { background: #fbf9f5; } /* opaque so the orbiting glow stays outside the card */
.ask-ai { isolation: auto; z-index: auto; } /* no own stacking context: the glow (z-index -2) must sit behind the card fill */

/* Ask-AI: colour only on the outer border — inside stays neutral */
.ask-ai { background: #fbf9f5; }
.ask-ai::after { inset: -3px; border-radius: 25px; filter: blur(7px); opacity: 0.35; }
.ask-ai:hover::after { opacity: 0.5; }
.ask-orb { background: var(--ink); animation: none; box-shadow: 0 8px 18px -10px rgba(18, 17, 16, 0.6); }
.ask-orb i { inset: 0; background: transparent; }
.ai-btn[data-ai]:hover { background: #2a2825; }

/* ==========================================================================
   Ask an AI — v2 (matches the reference: orb · copy | ChatGPT · Gemini · Claude)
   ========================================================================== */
.ask-ai {
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 22px;
  padding: 22px 26px;
  border-radius: 28px;
  background:
    radial-gradient(60% 120% at 100% 100%, rgba(255, 196, 140, 0.16), transparent 60%),
    radial-gradient(50% 120% at 0% 0%, rgba(120, 160, 255, 0.12), transparent 60%),
    #fdfcfb;
  box-shadow: 0 30px 70px -40px rgba(80, 70, 140, 0.35);
}
.ask-ai::before {
  inset: -1.5px;
  padding: 1.5px;
  background: conic-gradient(from var(--ask-a, 0deg), #60a5fa, #818cf8, #a855f7, #ec4899, #fb923c, #fbbf24, #60a5fa);
  animation: ask-spin 7s linear infinite;
}
.ask-ai::after { inset: -2px; border-radius: 30px; filter: blur(10px); opacity: 0.28; animation: ask-spin 7s linear infinite;
  background: conic-gradient(from var(--ask-a, 0deg), #60a5fa, #818cf8, #a855f7, #ec4899, #fb923c, #fbbf24, #60a5fa); }

.ask-ai .ask-orb {
  position: relative;
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, #6aa8ff, #5b7cfa 40%, #9b5cf6 75%, #c451e6);
  box-shadow: 0 0 0 10px rgba(130, 120, 250, 0.08), 0 16px 34px -12px rgba(110, 90, 240, 0.65), inset 0 2px 6px rgba(255, 255, 255, 0.35);
  animation: none;
}
.ask-ai .ask-orb svg { width: 30px; height: 30px; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2)); animation: ask-twinkle 3s ease-in-out infinite; }
.ask-ai .ask-orb i { display: none; }

.ask-eyebrow {
  display: inline-block;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.1);
  color: #5b5bd6;
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.ask-title {
  margin-top: 8px;
  font-family: var(--f-display);
  font-size: clamp(1.15rem, 1.7vw, 1.55rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: #171624;
}
.ask-grad { background: linear-gradient(90deg, #4f7cf7, #8b5cf6 55%, #c026d3); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ask-sub { margin-top: 6px; font-size: 14.5px; line-height: 1.5; color: #5d5b6b; max-width: 56ch; }
.ask-divider { width: 1px; align-self: stretch; margin-block: 6px; background: linear-gradient(180deg, transparent, rgba(23, 22, 36, 0.14), transparent); }

.ask-ai .ask-ai-go { display: flex; align-items: center; gap: 14px; }
.ai-primary {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 0 22px 0 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, #1e1d2e, #121220 60%, #24183a);
  color: #fff;
  font-size: 15.5px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 0 0 1.5px rgba(168, 120, 255, 0.55), 0 14px 30px -14px rgba(120, 80, 240, 0.7);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s;
}
.ai-primary img { width: 26px; height: 26px; filter: invert(1); }
.ai-primary .arrow { margin-left: 4px; opacity: 0.8; transition: transform 0.3s var(--ease-out); }
.ai-primary:hover { transform: translateY(-2px); box-shadow: 0 0 0 1.5px rgba(190, 150, 255, 0.85), 0 20px 36px -14px rgba(120, 80, 240, 0.85); }
.ai-primary:hover .arrow { transform: translateX(4px); }
.ai-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 92px;
  height: 92px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid rgba(23, 22, 36, 0.06);
  box-shadow: 0 12px 26px -16px rgba(60, 50, 120, 0.4);
  font-size: 14px;
  font-weight: 600;
  color: #171624;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s;
}
.ai-tile[data-ai="gemini"] { background: linear-gradient(180deg, #f6f3ff, #fff); }
.ai-tile[data-ai="claude"] { background: linear-gradient(180deg, #fff6f0, #fff); }
.ai-tile:hover { transform: translateY(-3px); box-shadow: 0 18px 32px -16px rgba(60, 50, 120, 0.55); }
.ai-ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: #fff; box-shadow: 0 4px 10px -4px rgba(0, 0, 0, 0.18); }
.ai-ico img { width: 26px; height: 26px; }

@media (max-width: 1180px) {
  .ask-ai { grid-template-columns: auto minmax(0, 1fr); }
  .ask-divider { display: none; }
  .ask-ai .ask-ai-go { grid-column: 1 / -1; justify-content: flex-start; }
}
@media (max-width: 640px) {
  .ask-ai { grid-template-columns: auto minmax(0, 1fr); gap: 14px 16px; padding: 18px; }
  .ask-ai .ask-orb { width: 54px; height: 54px; box-shadow: 0 0 0 7px rgba(130, 120, 250, 0.08), 0 12px 26px -12px rgba(110, 90, 240, 0.65); }
  .ask-ai .ask-orb svg { width: 24px; height: 24px; }
  .ask-sub { font-size: 13.5px; }
  .ask-ai .ask-ai-go { display: grid; grid-template-columns: minmax(0, 1fr) 76px 76px; gap: 10px; }
  .ai-primary { min-height: 76px; padding: 0 14px; font-size: 14px; white-space: normal; line-height: 1.2; }
  .ai-primary .arrow { display: none; }
  .ai-tile { width: auto; height: 76px; font-size: 12.5px; }
  .ai-ico { width: 34px; height: 34px; }
  .ai-ico img { width: 22px; height: 22px; }
}
.ask-ai .ask-orb svg { width: 34px; height: 34px; animation: ask-pulse 2.8s ease-in-out infinite; }
@keyframes ask-pulse { 50% { transform: scale(0.86); opacity: 0.85; } }
@media (prefers-reduced-motion: reduce) { .ask-ai .ask-orb svg { animation: none; } }

/* ==========================================================================
   Ask an AI — v3: colour only outside the card, hover-expanding assistants
   ========================================================================== */
.ask-ai { background: #fdfcfb; isolation: isolate; }
/* The orbiting glow is masked to a band OUTSIDE the card, so it can never tint the inside */
.ask-ai::after {
  inset: -16px;
  padding: 14px;
  z-index: 0;
  border-radius: 42px;
  filter: blur(9px);
  opacity: 0.4;
  pointer-events: none;
  -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);
}
.ask-ai::before { z-index: 0; pointer-events: none; }
.ask-ai > * { position: relative; z-index: 1; }
.ask-eyebrow { background: rgba(18, 17, 16, 0.05); color: var(--ink-2); }

.ask-ai .ask-ai-go { display: flex; gap: 12px; width: 470px; }
.ai-opt {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  height: 88px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid rgba(23, 22, 36, 0.07);
  box-shadow: 0 12px 26px -16px rgba(40, 36, 60, 0.35);
  color: #171624;
  overflow: hidden;
  transition: flex-grow 0.55s var(--ease-out), background-color 0.45s, box-shadow 0.45s, transform 0.35s var(--ease-out), border-color 0.45s;
}
.ai-opt.is-active {
  flex-grow: 2.75;
  background: linear-gradient(135deg, #1e1d2e, #121220 60%, #24183a);
  border-color: transparent;
  box-shadow: 0 0 0 1.5px rgba(168, 120, 255, 0.55), 0 16px 32px -14px rgba(120, 80, 240, 0.65);
}
.ai-opt:active { transform: scale(0.98); }
.ai-compact, .ai-wide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s var(--ease-out), transform 0.45s var(--ease-out);
}
.ai-compact { flex-direction: column; gap: 6px; font-size: 13.5px; font-weight: 600; }
.ai-wide { gap: 12px; padding: 0 18px; color: #fff; font-size: 15px; font-weight: 600; white-space: nowrap; opacity: 0; transform: translateX(-10px); }
.ai-wide img { width: 26px; height: 26px; flex: none; }
.ai-wide .arrow { opacity: 0.8; transition: transform 0.3s var(--ease-out); }
.ai-opt[data-ai="chatgpt"] .ai-wide img { filter: invert(1); }
.ai-opt[data-ai="gemini"] .ai-wide img,
.ai-opt[data-ai="claude"] .ai-wide img { padding: 3px; border-radius: 8px; background: #fff; box-sizing: content-box; width: 22px; height: 22px; }
.ai-opt.is-active .ai-compact { opacity: 0; transform: scale(0.9); }
.ai-opt.is-active .ai-wide { opacity: 1; transform: none; transition-delay: 0.12s; }
.ai-opt.is-active:hover .ai-wide .arrow { transform: translateX(4px); }
.ai-opt:not(.is-active):hover { transform: translateY(-2px); }
.ai-opt:focus-visible { outline: 2px solid #8b5cf6; outline-offset: 3px; }

@media (max-width: 1180px) { .ask-ai .ask-ai-go { width: min(470px, 100%); } }
@media (max-width: 640px) {
  .ask-ai .ask-ai-go { display: flex; width: 100%; gap: 8px; }
  .ai-opt { height: 74px; border-radius: 16px; }
  .ai-opt.is-active { flex-grow: 2.2; }
  .ai-compact { font-size: 12px; }
  .ai-wide { gap: 8px; padding: 0 12px; font-size: 13px; white-space: normal; line-height: 1.2; }
  .ai-wide .arrow { display: none; }
}
@media (prefers-reduced-motion: reduce) { .ai-opt, .ai-compact, .ai-wide { transition: none; } }
.ask-ai::after { inset: -12px; padding: 10px; border-radius: 38px; opacity: 0.3; filter: blur(7px); }

/* Ask-AI v4: smooth expansion, even gradient border, question chips */
.ai-opt { transition: flex-grow 0.85s cubic-bezier(0.45, 0, 0.2, 1), background-color 0.6s ease, box-shadow 0.6s ease, transform 0.4s var(--ease-out), border-color 0.6s ease; }
.ai-compact, .ai-wide { transition: opacity 0.45s ease, transform 0.7s cubic-bezier(0.45, 0, 0.2, 1); }
.ai-opt.is-active .ai-wide { transition-delay: 0.22s; }
.ai-opt:not(.is-active) .ai-compact { transition-delay: 0.25s; }

/* A crisp, even 2px gradient border — no blurred glow */
.ask-ai::after { display: none; }
.ask-ai::before {
  inset: -2px;
  padding: 2px;
  background: linear-gradient(110deg, #60a5fa, #818cf8, #a855f7, #ec4899, #fb923c, #fbbf24, #60a5fa) 0 0 / 200% 100%;
  animation: ask-flow 8s linear infinite;
}
@keyframes ask-flow { to { background-position: 200% 0; } }
@media (prefers-reduced-motion: reduce) { .ask-ai::before { animation: none; } }

.ask-ai .ask-ai-qs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.ask-ai .ask-ai-qs button { min-height: 36px; padding: 0 14px; font-size: 13.5px; background: #fff; }
.ask-ai .ask-ai-own { display: block; margin-top: 10px; max-width: 520px; }
.ask-ai .ask-ai-own[hidden] { display: none; }
.ask-ai .ask-ai-own input { min-height: 40px; border-radius: 12px; }
@media (max-width: 640px) {
  .ask-ai .ask-ai-qs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -18px; padding-right: 18px; }
  .ask-ai .ask-ai-qs::-webkit-scrollbar { display: none; }
  .ask-ai .ask-ai-qs button { flex: none; }
}
.ask-ai .ask-ai-qs button[aria-checked="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* Ask-AI v5: compact */
.ask-ai { gap: 18px; padding: 16px 20px; border-radius: 24px; }
.ask-ai .ask-orb { width: 56px; height: 56px; box-shadow: 0 0 0 7px rgba(130, 120, 250, 0.08), 0 12px 26px -12px rgba(110, 90, 240, 0.65), inset 0 2px 6px rgba(255, 255, 255, 0.35); }
.ask-ai .ask-orb svg { width: 26px; height: 26px; }
.ask-eyebrow { padding: 3px 9px; font-size: 10px; }
.ask-title { margin-top: 6px; font-size: clamp(1.05rem, 1.45vw, 1.3rem); }
.ask-sub { margin-top: 3px; font-size: 13.5px; }
.ask-ai .ask-ai-qs { margin-top: 10px; gap: 6px; }
.ask-ai .ask-ai-qs button { min-height: 32px; padding: 0 12px; font-size: 12.5px; }
.ask-ai .ask-ai-go { width: 410px; gap: 10px; }
.ai-opt { height: 76px; border-radius: 18px; }
.ai-ico { width: 34px; height: 34px; border-radius: 10px; }
.ai-ico img { width: 22px; height: 22px; }
.ai-compact { gap: 4px; font-size: 12.5px; }
.ai-wide { gap: 10px; padding: 0 16px; font-size: 14px; }
.ai-wide img { width: 22px; height: 22px; }
@media (max-width: 1180px) { .ask-ai .ask-ai-go { width: min(410px, 100%); } }
@media (max-width: 640px) { .ai-opt { height: 66px; } }

/* Less air between the hero and "Published mobile applications" */
.hero { padding-bottom: 16px; }
.hs.hs-on .hs-sticky { padding-top: calc(var(--nav-h) + 6px); }

/* SaaS & AI · AI expense tracker card (phone + explanatory callouts) */
.expense .hcard-media { min-height: 0; }
.exp-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  margin: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-top: 18px;
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(60% 70% at 50% 100%, rgba(109, 91, 208, 0.22), transparent 70%),
    linear-gradient(180deg, #f4f2fb, #ebe8f6);
  container-type: size;
}
.exp-phone {
  width: min(250px, 56cqh, 62cqw);
  padding: 8px 8px 0;
  border-radius: 32px 32px 0 0;
  background: linear-gradient(145deg, #3a3d43, #0b0c0e 40%, #26292e);
  box-shadow: 0 -12px 40px -18px rgba(109, 91, 208, 0.55), inset 0 0 0 1.5px rgba(255, 255, 255, 0.08);
}
.exp-phone img { display: block; width: 100%; border-radius: 25px 25px 0 0; }
.exp-bubble, .exp-json {
  position: absolute;
  z-index: 2;
  margin: 0;
  padding: 9px 12px;
  border-radius: 14px;
  font-size: 12px;
  line-height: 1.45;
  box-shadow: 0 16px 30px -16px rgba(30, 20, 70, 0.55);
}
.exp-bubble span, .exp-json span { display: block; margin-bottom: 3px; font-family: var(--f-mono); font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.65; }
.exp-bubble { top: 12%; left: 4%; max-width: 46%; background: #fff; color: #121110; border-radius: 14px 14px 14px 4px; }
.exp-json { bottom: 14%; right: 4%; background: #1b1d21; color: #9fe3b4; border: 1px solid rgba(159, 227, 180, 0.25); font-family: var(--f-mono); font-size: 10.5px; white-space: pre; border-radius: 14px 14px 4px 14px; }
.js .exp-stage .exp-bubble, .js .exp-stage .exp-json { animation: drift 7s ease-in-out infinite alternate; }
.js .exp-stage .exp-json { animation-delay: -3s; }
@media (max-width: 899px) {
  .exp-bubble { font-size: 10.5px; padding: 7px 9px; max-width: 48%; }
  .exp-json { font-size: 9px; padding: 7px 9px; }
}
@media (prefers-reduced-motion: reduce) { .exp-stage .exp-bubble, .exp-stage .exp-json { animation: none; } }
.hs:not(.hs-on) .exp-stage { flex: none; height: clamp(300px, 46vw, 440px); }
.exp-phone { width: min(300px, 72cqh, 66cqw); }
@media (max-width: 899px) {
  .exp-json { display: none; }
  .exp-bubble { top: 10%; left: 3%; max-width: 40%; font-size: 9.5px; }
  .exp-phone { width: min(220px, 70cqh, 60cqw); }
}

/* Case slot follows the active panel's height (js/main.js → sizeCases) */
.js .cs { grid-template-rows: auto var(--cs-h, auto); transition: grid-template-rows 0.7s var(--ease-out); }
.js .cs > .cs-panel { align-self: start; }
@media (prefers-reduced-motion: reduce) { .js .cs { transition: none; } }

/* Tighter spacing around the side projects */
.cases .lab { margin-top: 28px; }
.cases { padding-bottom: clamp(40px, 5vw, 64px); }
/* Impact → Case studies: no double section padding between the markets row and the next heading */
.impact { padding-bottom: clamp(36px, 4vw, 56px); }
.cases { padding-top: clamp(56px, 6vw, 88px); }
.experience { padding-top: clamp(56px, 7vw, 96px); }

/* --------------------------------------------------------------------------
   Hero fits the first screen on laptops/desktops: headline, intro, CTAs and
   core stack all visible on load. Sizes follow viewport HEIGHT as well as width.
   -------------------------------------------------------------------------- */
@media (min-width: 960px) {
  .hero { min-height: 100vh; min-height: 100svh; padding-top: calc(var(--nav-h) + clamp(8px, 1.6vh, 20px)); }
  .hero-grid { align-items: center; gap: clamp(28px, 4vw, 56px); }
  .hero h1 {
    margin-top: clamp(12px, 2vh, 24px);
    font-size: clamp(2.6rem, min(6vw, 10.2vh), 7rem);
  }
  .hero-lead { margin-top: clamp(14px, 2.4vh, 28px); font-size: clamp(0.98rem, min(1.25vw, 2.2vh), 1.18rem); line-height: 1.55; max-width: 58ch; }
  .hero-ctas { margin-top: clamp(16px, 2.8vh, 30px); }
  .hero-ctas .btn { min-height: clamp(44px, 6vh, 52px); }
  .hero-stack { margin-top: clamp(14px, 2.6vh, 30px); gap: 6px; }
  .hero-stack .chip { padding: 4px 10px; font-size: 11.5px; }
  .status { padding: 5px 12px 5px 9px; font-size: 13px; }

  /* Badge scales with the screen height: card + strap + hint stay inside the viewport */
  .portrait { width: min(100%, 400px, calc((100vh - var(--nav-h) - 130px) * 0.8)); padding-top: 48px; }
  .badge-swing { transform-origin: 50% -48px; }
  .badge-hint { margin-top: 10px; }
  .float-tag { padding: 9px 13px; }
  .float-tag b { font-size: 22px; }
  .float-tag.t3 b { font-size: 17px; }
}
@media (min-width: 960px) { .hero h1 { font-size: clamp(2.6rem, min(6vw, 9.6vh), 7rem); } }

/* Hero: text column takes the free space, badge column hugs the badge */
@media (min-width: 960px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) auto; column-gap: clamp(32px, 3.5vw, 64px); }
  .portrait { margin-inline: 0; }
  .hero h1 { font-size: clamp(2.6rem, min(6.6vw, 10.4vh), 7.6rem); }
  .hero-lead { max-width: 64ch; }
}
@media (min-width: 960px) { .portrait { width: min(400px, 34vw, calc((100vh - var(--nav-h) - 130px) * 0.8)); } }
@media (min-width: 960px) { .hero-lead { max-width: none; } .hero h1 { font-size: clamp(2.6rem, min(6.9vw, 11.2vh), 8rem); } }
@media (min-width: 960px) { .hero h1 { font-size: clamp(2.6rem, min(6.9vw, 10.6vh), 8rem); } }

/* --------------------------------------------------------------------------
   Ask-AI: slightly smaller buttons + a "thinking → decided" avatar perched on
   the top-left corner of the buttons, pointing at the expanded one.
   -------------------------------------------------------------------------- */
.ask-ai .ask-ai-go { position: relative; width: 384px; gap: 9px; }
.ai-opt { height: 66px; border-radius: 16px; }
.ai-ico { width: 30px; height: 30px; border-radius: 9px; }
.ai-ico img { width: 19px; height: 19px; }
.ai-compact { font-size: 12px; gap: 3px; }
.ai-wide { gap: 9px; padding: 0 14px; font-size: 13.5px; }
.ai-wide img { width: 20px; height: 20px; }
.ai-opt[data-ai="gemini"] .ai-wide img, .ai-opt[data-ai="claude"] .ai-wide img { width: 18px; height: 18px; }

.ask-buddy {
  position: absolute;
  z-index: 3;
  left: -24px;
  top: -34px;
  width: 46px;
  height: 46px;
  pointer-events: none;
  animation: ab-bob 4.8s ease-in-out infinite;
}
.ab-face {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
  background: var(--teal);
  box-shadow: 0 0 0 3px #fdfcfb, 0 10px 20px -8px rgba(40, 30, 90, 0.55);
}
.ab-look, .ab-happy {
  position: absolute;
  inset: -12% -6% 0;
  background-size: 300% 300%;
  background-repeat: no-repeat;
}
.ab-look { background-image: url("../img/mascot/afaque-directions.webp"); background-position: 100% 100%; animation: ab-look 4.8s steps(1) infinite; }
.ab-happy { background-image: url("../img/mascot/afaque-reactions.webp"); background-position: 100% 100%; opacity: 0; animation: ab-happy 4.8s steps(1) infinite; }

/* thought bubble: three dots while thinking, then a lightbulb */
.ab-think {
  position: absolute;
  left: -30px;
  top: -24px;
  display: flex;
  align-items: center;
  gap: 3px;
  height: 22px;
  padding: 0 7px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 14px -6px rgba(40, 30, 90, 0.45), 0 0 0 1px rgba(23, 22, 36, 0.06);
}
.ab-think::after { content: ""; position: absolute; right: -3px; bottom: -4px; width: 7px; height: 7px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px rgba(23, 22, 36, 0.06); }
.ab-think i { width: 4px; height: 4px; border-radius: 50%; background: #8b86a8; animation: ab-dot 1.2s ease-in-out infinite; }
.ab-think i:nth-child(2) { animation-delay: 0.15s; }
.ab-think i:nth-child(3) { animation-delay: 0.3s; }
.ab-think b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; opacity: 0; transform: scale(0.4); }
.ab-think, .ab-think i { animation-fill-mode: both; }
.ask-buddy .ab-think i { animation: ab-dot 1.2s ease-in-out infinite, ab-hide 4.8s steps(1) infinite; }
.ask-buddy .ab-think b { animation: ab-bulb 4.8s var(--ease-out) infinite; }

.ab-arrow {
  position: absolute;
  left: 34px;
  top: 30px;
  width: 30px;
  height: 26px;
  color: #8b5cf6;
  animation: ab-point 1.6s ease-in-out infinite;
}
.ab-arrow path:first-child { animation: ab-dash 1.2s linear infinite; }

@keyframes ab-bob { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-3px) rotate(3deg); } }
@keyframes ab-dot { 0%, 60%, 100% { transform: translateY(0); opacity: 0.45; } 30% { transform: translateY(-3px); opacity: 1; } }
@keyframes ab-hide { 0% { visibility: visible; } 62% { visibility: hidden; } }
@keyframes ab-bulb { 0%, 60% { opacity: 0; transform: scale(0.4); } 66% { opacity: 1; transform: scale(1.25); } 72%, 96% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(0.4); } }
@keyframes ab-look { 0% { opacity: 1; } 62% { opacity: 0; } }
@keyframes ab-happy { 0% { opacity: 0; } 62% { opacity: 1; } }
@keyframes ab-point { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(4px, 4px); } }
@keyframes ab-dash { to { stroke-dashoffset: -16; } }

@media (max-width: 1180px) { .ask-ai .ask-ai-go { width: min(384px, 100%); margin-top: 26px; margin-left: 18px; } }
@media (max-width: 640px) { .ai-opt { height: 62px; } .ask-ai .ask-ai-go { width: calc(100% - 18px); } }
@media (prefers-reduced-motion: reduce) {
  .ask-buddy, .ab-arrow, .ab-arrow path, .ab-think i, .ab-think b, .ab-look, .ab-happy { animation: none !important; }
}
@media (min-width: 1181px) {
  .ab-think { left: -44px; top: 4px; }
  .ab-think::after { right: -5px; bottom: 6px; }
}

/* --------------------------------------------------------------------------
   Ask-AI peeker: an original cartoon buddy hiding behind the card's top-right
   edge — body behind the card, pointing hand in front of it.
   -------------------------------------------------------------------------- */
.ask-buddy { display: none !important; }
.ask-zone { position: relative; margin-top: clamp(56px, 7vw, 84px); }
.ask-zone > .ask-ai { position: relative; z-index: 1; margin-top: 0; }
.peeker { position: absolute; inset: 0; pointer-events: none; }
.pk-body {
  position: absolute;
  z-index: 0;
  right: clamp(24px, 6%, 90px);
  top: -78px;
  width: 92px;
  height: 130px;
  overflow: visible;
  transform-origin: 50% 100%;
  animation: pk-peek 6s var(--ease-out) infinite;
}
.pk-hand {
  position: absolute;
  z-index: 2;
  right: calc(clamp(24px, 6%, 90px) + 56px);
  top: -6px;
  width: 78px;
  height: 52px;
  overflow: visible;
  transform-origin: 100% 50%;
  animation: pk-hand 6s var(--ease-out) infinite;
}
.pk-finger { transform-origin: 40px 38px; animation: pk-tap 0.9s ease-in-out infinite; }
.pk-lids rect { transform-origin: center; transform: scaleY(0); animation: pk-blink 4.2s infinite; }
.pk-lids rect:nth-child(2) { animation-delay: 0.02s; }
.pk-iris { animation: pk-look 6s ease-in-out infinite; }
.pk-brows { animation: pk-brow 6s ease-in-out infinite; }
.pk-mouth { transform-origin: 58px 98px; animation: pk-ooh 6s ease-in-out infinite; }
.pk-sprout { transform-origin: 60px 14px; animation: pk-sprout 1.8s ease-in-out infinite; }
.pk-say {
  position: absolute;
  z-index: 2;
  right: calc(clamp(24px, 6%, 90px) + 98px);
  top: -60px;
  padding: 6px 12px;
  border-radius: 14px 14px 4px 14px;
  background: var(--ink);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 10px 22px -10px rgba(0, 0, 0, 0.5);
  animation: pk-say 6s var(--ease-out) infinite;
}
/* hovering the card makes him extra excited */
.ask-zone:hover .pk-body { animation-duration: 3s; }
.ask-zone:hover .pk-finger { animation-duration: 0.45s; }

@keyframes pk-peek {
  0%, 4% { transform: translateY(70px) rotate(8deg); }
  14% { transform: translateY(-6px) rotate(-6deg); }
  20%, 78% { transform: translateY(0) rotate(-4deg); }
  48% { transform: translateY(-4px) rotate(-7deg); }
  90%, 100% { transform: translateY(70px) rotate(6deg); }
}
@keyframes pk-hand {
  0%, 10% { opacity: 0; transform: translateX(30px) rotate(10deg); }
  20%, 76% { opacity: 1; transform: none; }
  86%, 100% { opacity: 0; transform: translateX(30px) rotate(10deg); }
}
@keyframes pk-tap { 50% { transform: translate(-3px, 2px) rotate(-6deg); } }
@keyframes pk-blink { 0%, 44%, 50%, 100% { transform: scaleY(0); } 47% { transform: scaleY(1); } }
@keyframes pk-look { 0%, 30% { transform: translate(-1px, 1px); } 40%, 60% { transform: translate(2px, -2px); } 70%, 100% { transform: translate(-1px, 1px); } }
@keyframes pk-brow { 0%, 18% { transform: none; } 24%, 70% { transform: translateY(-3px); } 80%, 100% { transform: none; } }
@keyframes pk-ooh { 0%, 18% { transform: scale(0.7); } 24% { transform: scale(1.15); } 34%, 70% { transform: scale(1); } 80%, 100% { transform: scale(0.7); } }
@keyframes pk-sprout { 50% { transform: rotate(-12deg); } }
@keyframes pk-say {
  0%, 22% { opacity: 0; transform: translateY(8px) scale(0.9); }
  28%, 72% { opacity: 1; transform: none; }
  80%, 100% { opacity: 0; transform: translateY(8px) scale(0.9); }
}
@media (max-width: 640px) {
  .pk-body { right: 16px; width: 76px; height: 108px; top: -64px; }
  .pk-hand { right: 62px; top: -4px; width: 64px; height: 43px; }
  .pk-say { right: 96px; top: -52px; font-size: 11.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .pk-body, .pk-hand, .pk-finger, .pk-lids rect, .pk-iris, .pk-brows, .pk-mouth, .pk-sprout, .pk-say { animation: none !important; }
  .pk-say { opacity: 1; }
}
.pk-body { width: 106px; height: 150px; top: -90px; }
.pk-hand { right: calc(clamp(24px, 6%, 90px) + 58px); top: -10px; width: 104px; height: 66px; }
.pk-finger { transform-origin: 54px 40px; }
.pk-say { right: calc(clamp(24px, 6%, 90px) + 112px); top: -74px; }
@media (max-width: 640px) {
  .pk-body { right: 14px; width: 84px; height: 119px; top: -72px; }
  .pk-hand { right: 58px; top: -8px; width: 84px; height: 53px; }
  .pk-say { right: 100px; top: -60px; }
}
@media (max-width: 1180px) { .pk-hand { rotate: -32deg; top: 4px; } }
@media (max-width: 1180px) { .pk-hand { rotate: none; top: -10px; } } @media (max-width: 640px) { .pk-hand { top: -12px; } }

/* ==========================================================================
   Minion-style peeker (replaces .peeker). Body sits BEHIND the card; the
   gripping glove and the pointing arm sit IN FRONT of it.
   Wide screens: peeks from behind the card's right edge (like the reference).
   Narrower: peeks over the card's top-right corner.
   ========================================================================== */
.peeker { display: none !important; }
.minion { position: absolute; inset: 0; pointer-events: none; }
.mn-body, .mn-grip, .mn-point { position: absolute; overflow: visible; }
.mn-body { z-index: 0; }
.mn-grip, .mn-point, .mn-say { z-index: 2; }
.mn-say {
  position: absolute;
  padding: 6px 12px;
  border-radius: 14px 14px 4px 14px;
  background: var(--ink);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 10px 22px -10px rgba(0, 0, 0, 0.5);
}

/* -- side peek (≥1400px: enough page margin to the right of the card) -- */
@media (min-width: 1400px) {
  .ask-zone > .ask-ai { padding-right: 96px; }
  .mn-body { right: -86px; top: -28px; width: 112px; height: 179px; }
  .mn-grip { right: -14px; top: 22px; width: 30px; height: 39px; }
  .mn-point { right: -46px; top: 66px; width: 124px; height: 57px; }
  .mn-say { right: 0; top: -52px; border-radius: 14px 14px 4px 14px; }
}
/* -- top-corner peek (narrower screens) -- */
@media (max-width: 1399px) {
  .mn-body { right: clamp(18px, 6%, 80px); top: -104px; width: 92px; height: 147px; }
  .mn-grip { right: calc(clamp(18px, 6%, 80px) + 2px); top: -18px; width: 26px; height: 34px; rotate: 90deg; }
  .mn-point { right: calc(clamp(18px, 6%, 80px) + 54px); top: -6px; width: 104px; height: 48px; rotate: -38deg; transform-origin: 100% 60%; }
  .mn-say { right: calc(clamp(18px, 6%, 80px) + 96px); top: -64px; }
}
@media (max-width: 640px) {
  .mn-body { right: 14px; top: -86px; width: 76px; height: 122px; }
  .mn-grip { right: 14px; top: -16px; width: 22px; height: 29px; }
  .mn-point { right: 56px; top: -4px; width: 86px; height: 40px; }
  .mn-say { right: 92px; top: -54px; font-size: 11.5px; }
}

/* -- motion: slides out from behind the card once, then idles -- */
.mn-body, .mn-grip, .mn-point, .mn-say { opacity: 0; }
.ask-zone.is-in .mn-body { animation: mn-in 1s var(--ease-out) 0.3s both, mn-bob 3.4s ease-in-out 1.3s infinite; }
.ask-zone.is-in .mn-grip { animation: mn-fade 0.4s ease 0.75s both; }
.ask-zone.is-in .mn-point { animation: mn-arm 0.7s var(--ease-out) 1s both; }
.ask-zone.is-in .mn-say { animation: mn-say 0.5s var(--ease-out) 1.4s both; }
@media (min-width: 1400px) { @keyframes mn-in { from { opacity: 1; transform: translateX(-60px); } to { opacity: 1; transform: none; } } }
@media (max-width: 1399px) { @keyframes mn-in { from { opacity: 1; transform: translateY(80px); } to { opacity: 1; transform: none; } } }
@keyframes mn-bob { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(-3deg) translateY(-2px); } }
@keyframes mn-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes mn-arm { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }
@keyframes mn-say { from { opacity: 0; transform: translateY(8px) scale(0.9); } to { opacity: 1; transform: none; } }
.mn-body { transform-origin: 30% 100%; }
.mn-finger { animation: mn-jab 0.9s ease-in-out infinite; }
@keyframes mn-jab { 50% { transform: translateX(-5px); } }
.mn-lids rect { transform-box: fill-box; transform-origin: center; transform: scaleY(0); animation: mn-blink 4s infinite; }
@keyframes mn-blink { 0%, 46%, 52%, 100% { transform: scaleY(0); } 49% { transform: scaleY(1); } }
.mn-iris { animation: mn-look 5s ease-in-out infinite; }
@keyframes mn-look { 0%, 40% { transform: none; } 50%, 70% { transform: translate(3px, -2px); } 80%, 100% { transform: none; } }
.mn-tuft { transform-origin: 101px 34px; animation: mn-tuft 2s ease-in-out infinite; }
@keyframes mn-tuft { 50% { transform: rotate(-8deg); } }
.mn-grin { opacity: 0; animation: mn-mouth 5s steps(1) infinite; }
.mn-ooh { animation: mn-mouth2 5s steps(1) infinite; }
@keyframes mn-mouth { 0% { opacity: 0; } 55% { opacity: 1; } 85% { opacity: 0; } }
@keyframes mn-mouth2 { 0% { opacity: 1; } 55% { opacity: 0; } 85% { opacity: 1; } }
.ask-zone:hover .mn-finger { animation-duration: 0.45s; }
.ask-zone:hover .mn-grin { opacity: 1; animation: none; }
.ask-zone:hover .mn-ooh { opacity: 0; animation: none; }
@media (prefers-reduced-motion: reduce) {
  .mn-body, .mn-grip, .mn-point, .mn-say { opacity: 1 !important; animation: none !important; }
  .mn-finger, .mn-lids rect, .mn-iris, .mn-tuft, .mn-grin, .mn-ooh { animation: none !important; }
}
@media (min-width: 1400px) {
  .mn-grip { top: 56px; }
  .mn-point { top: 98px; }
}
@media (max-width: 640px) {
  .mn-point { display: none; }
  .mn-say::after { content: " 👇"; }
}
@media (min-width: 1400px) { .ask-zone > .ask-ai { padding-right: 28px; } }

/* Minion: always peek from behind the card's RIGHT side.
   Below 1400px the zone reserves a strip on the right (--mn-pad) for him. */
.ask-zone { --mn-pad: 0px; padding-right: var(--mn-pad); }
@media (max-width: 1399px) { .ask-zone { --mn-pad: 64px; } }
@media (max-width: 640px) { .ask-zone { --mn-pad: 52px; } }
.mn-grip { rotate: none; }
.mn-body { right: calc(var(--mn-pad) - 86px); top: -28px; width: 112px; height: 179px; }
.mn-grip { right: calc(var(--mn-pad) - 14px); top: 56px; width: 30px; height: 39px; }
.mn-say { right: var(--mn-pad); top: -52px; }
@media (max-width: 640px) {
  .mn-body { right: calc(var(--mn-pad) - 66px); top: -18px; width: 86px; height: 137px; }
  .mn-grip { right: calc(var(--mn-pad) - 11px); top: 44px; width: 23px; height: 30px; }
  .mn-say { top: -44px; font-size: 11.5px; }
}
@keyframes mn-in { from { opacity: 1; transform: translateX(-60px); } to { opacity: 1; transform: none; } }
@media (max-width: 1399px) { @keyframes mn-in { from { opacity: 1; transform: translateX(-60px); } to { opacity: 1; transform: none; } } }
/* Half-body peek: ~half of him stays behind the card */
.mn-body { right: calc(var(--mn-pad) - 58px); }
.mn-grip { right: calc(var(--mn-pad) - 12px); top: 70px; }
@media (min-width: 1400px) { .ask-zone > .ask-ai { padding-right: 20px; } }
@media (max-width: 1399px) { .ask-zone { --mn-pad: 46px; } }
@media (max-width: 640px) {
  .ask-zone { --mn-pad: 38px; }
  .mn-body { right: calc(var(--mn-pad) - 45px); }
  .mn-grip { right: calc(var(--mn-pad) - 10px); top: 54px; }
}

/* ==========================================================================
   Minion v2 — peeks over the card's TOP-RIGHT edge (dome behind the card,
   both gloves gripping the edge in front), eye looking down at the section.
   ========================================================================== */
.minion { display: none !important; }
.ask-zone { --mn-pad: 0px !important; padding-right: 0 !important; }
.ask-zone > .ask-ai { padding-right: 20px !important; }
.minion2 { position: absolute; inset: 0; pointer-events: none; --m2-r: clamp(28px, 7%, 110px); --m2-w: 132px; }
.m2-head, .m2-glove, .m2-say { position: absolute; overflow: visible; }
.m2-head { z-index: 0; right: var(--m2-r); top: calc(var(--m2-w) * -0.5); width: var(--m2-w); height: calc(var(--m2-w) * 0.6); }
.m2-glove { z-index: 2; top: calc(var(--m2-w) * -0.11); width: calc(var(--m2-w) * 0.27); height: calc(var(--m2-w) * 0.2); }
.m2-l { right: calc(var(--m2-r) + var(--m2-w) * 0.8); }
.m2-r { right: calc(var(--m2-r) - var(--m2-w) * 0.07); }
.m2-say {
  z-index: 2;
  right: calc(var(--m2-r) + var(--m2-w) + 6px);
  top: -46px;
  padding: 6px 12px;
  border-radius: 14px 14px 4px 14px;
  background: var(--ink);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 10px 22px -10px rgba(0, 0, 0, 0.5);
}
@media (max-width: 640px) {
  .minion2 { --m2-r: 22px; --m2-w: 104px; }
  .m2-say { right: calc(var(--m2-r) + var(--m2-w) - 10px); top: -78px; font-size: 11.5px; }
}

/* motion: rises from behind the edge, then peeks — ducks a little, looks around, blinks */
.m2-head, .m2-glove, .m2-say { opacity: 0; }
.ask-zone.is-in .m2-head { animation: m2-up 0.9s var(--ease-out) 0.3s both, m2-peek 5s ease-in-out 1.2s infinite; }
.ask-zone.is-in .m2-glove { animation: m2-fade 0.35s ease 0.7s both, m2-grip 5s ease-in-out 1.2s infinite; }
.ask-zone.is-in .m2-say { animation: m2-say 0.5s var(--ease-out) 1.3s both; }
@keyframes m2-up { from { opacity: 1; transform: translateY(70%); } to { opacity: 1; transform: none; } }
@keyframes m2-peek { 0%, 100% { transform: none; } 40% { transform: none; } 48% { transform: translateY(14%); } 58% { transform: translateY(-4%); } 66% { transform: none; } }
@keyframes m2-grip { 0%, 40%, 66%, 100% { transform: none; } 48% { transform: translateY(2px); } }
@keyframes m2-fade { to { opacity: 1; } }
@keyframes m2-say { from { opacity: 0; transform: translateY(8px) scale(0.9); } to { opacity: 1; transform: none; } }
.m2-iris { animation: m2-look 5s ease-in-out infinite; }
@keyframes m2-look { 0%, 20% { transform: translate(-4px, 0); } 30%, 50% { transform: translate(4px, 1px); } 60%, 100% { transform: translate(-4px, 0); } }
.m2-lid { transform-box: fill-box; transform-origin: center top; transform: scaleY(0); animation: m2-blink 4.2s infinite; }
@keyframes m2-blink { 0%, 44%, 50%, 100% { transform: scaleY(0); } 47% { transform: scaleY(1); } }
.m2-hair { transform-origin: 100px 12px; animation: m2-hair 2.2s ease-in-out infinite; }
@keyframes m2-hair { 50% { transform: rotate(-4deg); } }
@media (prefers-reduced-motion: reduce) {
  .m2-head, .m2-glove, .m2-say { opacity: 1 !important; animation: none !important; }
  .m2-iris, .m2-lid, .m2-hair { animation: none !important; }
}
.m2-head { top: calc(var(--m2-w) * -0.6 + 2px); }

/* 3D avatar in the corner mascot: one image, tilted toward the cursor */
.mascot.is-3d .mascot-body { inset: -14% -4% 0; }
.mascot.is-3d .mascot-dir {
  background-size: contain;
  background-position: 50% 100%;
  opacity: 1;
  transform-origin: 50% 90%;
  transition: transform 0.45s var(--ease-out);
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.18));
}
.mascot-emoji {
  position: absolute;
  right: -6px;
  top: -10px;
  font-size: 22px;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
}
.mascot-emoji.pop { animation: emoji-pop 0.9s var(--ease-out) both; }
@keyframes emoji-pop {
  0% { opacity: 0; transform: translateY(6px) scale(0.4); }
  25% { opacity: 1; transform: translateY(-6px) scale(1.2); }
  70% { opacity: 1; transform: translateY(-12px) scale(1); }
  100% { opacity: 0; transform: translateY(-22px) scale(0.9); }
}
.brand-avatar { background-color: var(--teal); }
@media (prefers-reduced-motion: reduce) { .mascot.is-3d .mascot-dir { transition: none; } .mascot-emoji.pop { animation-duration: 0.01s; } }
/* Bottom-right avatar a little larger */
.mascot { --m: 96px; }
@media (max-width: 760px) { .mascot.is-docked { --m: 78px; } }
/* Corner mascot: 3D avatar with live eyes (js/mascot.js) */
.mascot { --m: 132px; }
@media (max-width: 760px) { .mascot.is-docked { --m: 96px; } }
.mascot.is-av svg.av {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 6px 8px rgba(18, 17, 16, 0.22));
}

/* Second Ask-AI card under the contact links (dark section) */
.ask-zone--contact { margin-top: clamp(84px, 9vw, 110px); }
.ask-zone--contact .ask-ai { color: #171624; }
.ask-zone--contact .ask-ai { box-shadow: 0 30px 70px -40px rgba(0, 0, 0, 0.8); }
.ask-zone--contact .m2-say { background: var(--paper); color: var(--ink); }

/* ==========================================================================
   Glass navigation — translucent frosted pills that adapt to what's behind
   them (dark text over light pages, light text over dark sections and the
   open menu). On phones the section tabs become a bottom tab bar; the
   profile pill and the menu button stay at the top.
   ========================================================================== */
.nav {
  --pill-bg: rgba(250, 248, 243, 0.5);
  --pill-line: rgba(255, 255, 255, 0.6);
  --pill-shadow: 0 10px 30px -14px rgba(18, 17, 16, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  --ind-bg: var(--ink);
  --ind-fg: var(--paper);
  --role: var(--ink-3);
  color: var(--ink);
}
.nav.is-dark,
.menu-open .nav {
  --pill-bg: rgba(24, 24, 27, 0.42);
  --pill-line: rgba(255, 255, 255, 0.14);
  --pill-shadow: 0 12px 32px -14px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  --ind-bg: var(--paper);
  --ind-fg: var(--ink);
  --role: #a19c92;
  color: var(--night-text);
}
.nav .pill {
  -webkit-backdrop-filter: saturate(1.8) blur(18px);
  backdrop-filter: saturate(1.8) blur(18px);
}
.nav .nav-cta::before { background: var(--ink); }
.nav.is-dark .nav-cta::before { background: var(--paper); }
/* Without backdrop blur the glass would be hard to read: fall back to solid. */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .nav { --pill-bg: rgba(250, 248, 243, 0.94); }
  .nav.is-dark, .menu-open .nav { --pill-bg: rgba(24, 24, 27, 0.92); }
}

@media (max-width: 760px) {
  /* Top: profile pill on the left, menu button on the right. */
  .nav .wrap { justify-content: space-between; }

  /* Bottom tab bar */
  .nav .tabs {
    --pill-bg: rgba(250, 248, 243, 0.55);
    --pill-line: rgba(255, 255, 255, 0.6);
    --pill-shadow: 0 -2px 24px -10px rgba(18, 17, 16, 0.28), 0 14px 34px -16px rgba(18, 17, 16, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.7);
    --ind-bg: var(--ink);
    --ind-fg: var(--paper);
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    flex: none;
    height: 56px;
    padding: 6px;
    color: var(--ink);
    -webkit-mask-image: none;
    mask-image: none;
    scroll-padding-inline: 12px;
  }
  /* Over a dark section the bar turns to dark glass — judged at the bottom of the screen, not the top. */
  .nav .tabs.on-dark {
    --pill-bg: rgba(24, 24, 27, 0.48);
    --pill-line: rgba(255, 255, 255, 0.14);
    --pill-shadow: 0 14px 34px -16px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    --ind-bg: var(--paper);
    --ind-fg: var(--ink);
    color: var(--night-text);
  }
  .nav .tabs a { height: 44px; padding: 0 15px; font-size: 14px; }
  .nav .tab-ind { top: 6px; height: 44px; }

  /* Keep content, the pinned card strips and pop-ups clear of the bar. */
  body { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
  .hs.hs-on .hs-sticky { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(86px + env(safe-area-inset-bottom)); }
}

/* --------------------------------------------------------------------------
   Ask-an-AI card on phones: one clean column — small orb beside the title,
   question chips in a 2 × 2 grid (no sideways overflow), and three equal,
   compact AI buttons under a short label.
   -------------------------------------------------------------------------- */
@media (max-width: 600px) {
  .ask-zone > .ask-ai {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    gap: 0 12px;
    padding: 18px 16px 16px !important;
    border-radius: 22px;
  }
  .ask-ai .ask-ai-copy { display: contents; }
  .ask-ai .ask-orb {
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: center;
    width: 44px;
    height: 44px;
    box-shadow: 0 0 0 5px rgba(130, 120, 250, 0.08), 0 10px 20px -10px rgba(110, 90, 240, 0.6);
  }
  .ask-ai .ask-orb svg { width: 20px; height: 20px; }
  .ask-ai .ask-eyebrow { grid-column: 2; grid-row: 1; justify-self: start; }
  .ask-ai .ask-title { grid-column: 2; grid-row: 2; margin-top: 5px; font-size: 18px; line-height: 1.25; }
  .ask-ai .ask-sub { grid-column: 1 / -1; margin-top: 12px; font-size: 14px; line-height: 1.45; }

  .ask-ai .ask-ai-qs {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 14px 0 0;
    padding: 0;
    overflow: visible;
  }
  .ask-ai .ask-ai-qs button {
    min-height: 42px;
    padding: 8px 10px;
    font-size: 13.5px;
    line-height: 1.2;
    white-space: normal;
    text-align: center;
    justify-content: center;
  }
  .ask-ai .ask-ai-own { grid-column: 1 / -1; max-width: none; }
  .ask-ai .ask-divider { display: none; }

  .ask-ai .ask-ai-go {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    margin: 16px 0 0;
  }
  .ask-ai .ask-ai-go::before {
    content: "Then ask with";
    grid-column: 1 / -1;
    margin-bottom: 2px;
    font-family: var(--f-mono);
    font-size: 10.5px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6e6a7c;
  }
  /* Equal buttons: no expanding "active" one on a touch screen. */
  .ask-ai .ai-opt,
  .ask-ai .ai-opt.is-active {
    flex-grow: 0;
    height: 52px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid rgba(23, 22, 36, 0.1);
    box-shadow: 0 8px 18px -14px rgba(40, 36, 60, 0.45);
  }
  .ask-ai .ai-opt .ai-wide { display: none; }
  .ask-ai .ai-opt .ai-compact,
  .ask-ai .ai-opt.is-active .ai-compact {
    flex-direction: row;
    gap: 7px;
    opacity: 1;
    transform: none;
    color: #171624;
    font-size: 13px;
  }
  .ask-ai .ai-ico { width: 26px; height: 26px; border-radius: 8px; box-shadow: none; background: transparent; }
  .ask-ai .ai-ico img { width: 20px; height: 20px; }
  .ask-ai .ai-opt:active { background: #f3f1fb; }
}
@media (max-width: 374px) {
  .ask-ai .ask-ai-qs button { font-size: 12.5px; padding: 8px 6px; }
}

/* Experience → Skills → About → Contact: same rhythm as Impact → Case
   studies (no doubled full section padding between neighbours). */
.experience { padding-bottom: clamp(36px, 4vw, 56px); }
.skills { padding-top: clamp(56px, 6vw, 88px); padding-bottom: clamp(36px, 4vw, 56px); }
.contact { padding-top: clamp(56px, 6vw, 88px); }

/* --------------------------------------------------------------------------
   Hiring & client payments
   -------------------------------------------------------------------------- */
/* Hero "Hire me": the one orange button; fills dark on hover. */
.btn.btn-hire { --bg: var(--accent); --fg: #fff; box-shadow: 0 12px 26px -14px rgba(255, 91, 36, 0.75); }
.btn.btn-hire::before { background: var(--ink); }

/* Contact: two ways to work together — talk first (primary), pay later (secondary). */
.engage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  margin-top: clamp(40px, 5vw, 64px);
}
@media (min-width: 820px) { .engage { grid-template-columns: 1.15fr 1fr; } }
.engage-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: clamp(20px, 2.4vw, 30px);
  border: 1px solid var(--night-line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
}
.engage-card.is-primary {
  border-color: rgba(255, 91, 36, 0.3);
  background: linear-gradient(160deg, rgba(255, 91, 36, 0.14), rgba(255, 255, 255, 0.03) 62%);
}
.engage-kicker { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--night-muted); }
.engage-card h3 { font-family: var(--f-display); font-size: clamp(1.35rem, 2vw, 1.75rem); font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; color: var(--night-text); }
.engage-card > p:not(.engage-kicker) { max-width: 52ch; color: var(--night-muted); line-height: 1.6; }
.engage-card .btn { margin-top: 8px; min-height: 48px; font-size: 15px; }
.engage-card.is-primary .btn { --bg: var(--accent); --fg: #fff; }
.engage-card.is-primary .btn::before { background: var(--night-text); }
@media (hover: hover) { .engage-card.is-primary .btn:hover { color: var(--night); } }
.engage-card .engage-note { margin-top: -2px; font-size: 12.5px; }
.engage-card .btn:focus-visible, .btn-hire:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (max-width: 600px) {
  .engage-card .btn { width: 100%; }
}

/* Contact: on wide screens, intro on the left and the ways to work together
   on the right — so "Hire me" lands on a screen that shows both. */
.contact-top { position: relative; }
#work-with-me { scroll-margin-top: calc(var(--nav-h) + 24px); }
@media (min-width: 1100px) {
  .contact-top {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: clamp(40px, 5vw, 88px);
    align-items: start;
  }
  .contact-top .contact-title { font-size: clamp(3rem, 5.2vw, 5.75rem); max-width: 12ch; }
  .contact-top .mail-row { margin-top: 32px; }
  .contact-top .mail-big { font-size: clamp(1.2rem, 2.1vw, 2rem); }
  .contact-top .engage { grid-template-columns: minmax(0, 1fr); margin-top: 0; }
  #work-with-me { scroll-margin-top: calc(var(--nav-h) + 40px); }
}

/* Talk-first actions: email inquiry + WhatsApp */
.engage-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.engage-actions .btn { margin-top: 0; }
.btn.wa-btn { gap: 9px; }
.btn.wa-btn svg { width: 19px; height: 19px; color: #25d366; transition: color 0.3s; }
.btn.wa-btn::before { background: #25d366; }
@media (hover: hover) {
  .on-night .btn.wa-btn:hover { color: #0b1f12; }
  .btn.wa-btn:hover svg { color: #0b1f12; }
}
@media (max-width: 600px) {
  .engage-actions { flex-direction: column; }
  .engage-actions .btn { width: 100%; }
}
/* WhatsApp sits beside the orange primary as an outline button. */
.engage-card.is-primary .btn.wa-btn {
  --bg: transparent;
  --fg: var(--night-text);
  border: 1px solid rgba(243, 239, 231, 0.26);
}
.engage-card.is-primary .btn.wa-btn::before { background: #25d366; }
@media (max-width: 600px) { .engage-actions { align-self: stretch; } }

/* --------------------------------------------------------------------------
   About — recruiter-focused introduction (editorial, compact)
   Portrait + headline side by side, a dark impact band, three numbered
   strength cards that link to evidence, and a quiet row of text links.
   -------------------------------------------------------------------------- */
.about { padding-top: clamp(48px, 5vw, 72px); padding-bottom: clamp(36px, 4vw, 56px); }
.about .section-head { margin-bottom: clamp(18px, 2.4vw, 30px); }
/* Keep content clear of the floating avatar in the bottom-right corner,
   without wasting space on wide screens. */
@media (min-width: 761px) {
  .about .wrap { padding-right: max(var(--gutter), calc(168px - (100vw - min(100vw, var(--maxw))) / 2)); }
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
}
@media (min-width: 960px) {
  .about-grid { grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr); }
}

/* Portrait: square photo on a soft terracotta offset frame */
.about-photo {
  position: relative;
  margin: 0 14px 14px 0;
  max-width: 440px;
  aspect-ratio: 1 / 1;
  border-radius: 24px;
  overflow: visible;
  background: none;
}
.about-photo::before {
  content: "";
  position: absolute;
  inset: 14px -14px -14px 14px;
  z-index: 0;
  border-radius: 24px;
  background:
    repeating-linear-gradient(135deg, rgba(196, 58, 12, 0.10) 0 1px, transparent 1px 9px),
    linear-gradient(135deg, rgba(255, 91, 36, 0.18), rgba(196, 58, 12, 0.06));
  border: 1px solid rgba(196, 58, 12, 0.22);
}
.about-photo img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 24px;
  background: var(--teal);
  box-shadow: 0 30px 60px -36px rgba(18, 17, 16, 0.55);
}
.about-photo .stamp { z-index: 2; right: 14px; top: 14px; }
.about-tag {
  position: absolute;
  z-index: 2;
  left: 14px;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 28px);
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(250, 248, 243, 0.82);
  -webkit-backdrop-filter: blur(10px) saturate(1.4);
  backdrop-filter: blur(10px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  box-shadow: 0 10px 24px -14px rgba(18, 17, 16, 0.5);
}
.about-tag .dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: #2fae6b; box-shadow: 0 0 0 3px rgba(47, 174, 107, 0.2); }

/* Copy */
.about-title {
  font-family: var(--f-display);
  font-size: clamp(1.75rem, 2.9vw, 2.75rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.035em;
  color: var(--ink);
  max-width: 22ch;
  text-wrap: balance;
}
.about-accent {
  margin-top: 10px;
  font-family: var(--f-serif);
  font-style: italic;
  font-size: clamp(1.3rem, 2vw, 1.85rem);
  line-height: 1.2;
  color: var(--accent-ink);
  max-width: 30ch;
  text-wrap: balance;
}
.about-lead {
  margin-top: clamp(16px, 2vw, 24px);
  padding-left: 16px;
  border-left: 2px solid var(--accent);
  max-width: 60ch;
  font-size: clamp(1.02rem, 1.25vw, 1.15rem);
  line-height: 1.55;
  color: var(--ink);
}
.about-copy .body { margin-top: 16px; display: grid; gap: 12px; max-width: 64ch; font-size: 15.5px; line-height: 1.65; color: var(--ink-2); }

/* Impact band: dark, numbers with an accent plus */
.about-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: clamp(32px, 4vw, 52px);
  border-radius: 22px;
  overflow: hidden;
  background:
    radial-gradient(80% 140% at 100% 0%, rgba(255, 91, 36, 0.22), transparent 60%),
    var(--night);
  color: var(--night-text);
  box-shadow: 0 30px 60px -40px rgba(18, 17, 16, 0.7);
}
.about-stats li { padding: 20px 20px 22px; border-top: 1px solid rgba(243, 239, 231, 0.08); }
.about-stats li:nth-child(-n + 2) { border-top: 0; }
.about-stats li:nth-child(even) { border-left: 1px solid rgba(243, 239, 231, 0.08); }
.about-stats b {
  display: block;
  font-family: var(--f-display);
  font-size: clamp(2.1rem, 3.6vw, 3.2rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.045em;
  color: var(--night-text);
}
.about-stats b em { font-style: normal; color: var(--accent); margin-left: 1px; }
.about-stats b.is-word { font-size: clamp(1.4rem, 2.3vw, 2.1rem); line-height: 1.52; letter-spacing: -0.03em; }
.about-stats span { display: block; margin-top: 8px; font-size: 13.5px; line-height: 1.4; color: var(--night-muted); }
@media (min-width: 860px) {
  .about-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .about-stats li { padding: 26px 26px 28px; border-top: 0; border-left: 1px solid rgba(243, 239, 231, 0.08); }
  .about-stats li:first-child { border-left: 0; }
}

/* Strength cards */
.about-strengths {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin-top: 12px;
}
@media (min-width: 860px) { .about-strengths { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.str-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 22px 22px 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fbf9f5;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out), border-color 0.35s;
}
.str-card.is-ai { background: linear-gradient(160deg, rgba(255, 91, 36, 0.08), #fbf9f5 55%); border-color: rgba(196, 58, 12, 0.2); }
@media (hover: hover) {
  .str-card:hover { transform: translateY(-3px); border-color: rgba(196, 58, 12, 0.3); box-shadow: 0 22px 40px -28px rgba(18, 17, 16, 0.45); }
}
.str-num { font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.08em; color: var(--accent-ink); }
.str-card h3 { margin-top: 10px; font-family: var(--f-display); font-size: 19px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }
.str-card p { margin-top: 6px; font-size: 14.5px; line-height: 1.55; color: var(--ink-2); }
.str-card a { margin-top: auto; padding-top: 14px; }

/* Links */
.str-card a,
.about-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 4px;
  transition: color 0.25s, text-decoration-color 0.25s;
}
.str-card a span, .about-links a span { transition: transform 0.3s var(--ease-out); }
.str-card a:hover, .about-links a:hover { color: var(--accent-ink); text-decoration-color: currentColor; }
.str-card a:hover span[aria-hidden], .about-links a:hover span[aria-hidden] { transform: translateX(3px); }
.str-card a:focus-visible, .about-links a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.about-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 26px;
  margin-top: clamp(16px, 2vw, 22px);
}
.about-links a { min-height: 40px; }
.about-links-label { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
@media (max-width: 600px) { .about-links-label { flex-basis: 100%; } }

@media (prefers-reduced-motion: reduce) { .str-card { transition: none; } .str-card:hover { transform: none; } }

/* Contact cards on wide screens: compact enough that "Let's talk" / "Hire me"
   lands with both cards — including the Razorpay button — fully on screen. */
@media (min-width: 1100px) {
  #work-with-me { scroll-margin-top: calc(var(--nav-h) + 16px); }
  .contact-top .engage { gap: 12px; }
  .contact-top .engage-card { gap: 8px; padding: 22px 26px; }
  .contact-top .engage-card h3 { font-size: clamp(1.25rem, 1.6vw, 1.5rem); }
  .contact-top .engage-card > p:not(.engage-kicker) { font-size: 15px; line-height: 1.55; }
  .contact-top .engage-card .btn { min-height: 46px; font-size: 14.5px; }
  .contact-top .engage-actions { margin-top: 6px; }
  .contact-top .engage-card .engage-note { margin-top: 0; }
}
@media (min-width: 1100px) and (max-height: 760px) {
  .contact-top .engage-card { padding: 18px 22px; gap: 6px; }
  .contact-top .engage-card > p:not(.engage-kicker) { font-size: 14.5px; line-height: 1.5; }
  .contact-top .engage-card .btn { min-height: 42px; }
}
/* About layout: photo + evidence links on the left, copy on the right,
   then the impact band and strength cards across the full width.
   Phones: photo, copy, impact, strengths, links. */
.about-grid > .about-photo { order: 1; }
.about-grid > .about-copy { order: 2; }
.about-grid > .about-stats { order: 3; margin-top: 4px; }
.about-grid > .about-strengths { order: 4; margin-top: -16px; }
.about-grid > .about-links { order: 5; margin-top: -12px; }
@media (min-width: 960px) {
  .about-grid {
    grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
    grid-template-areas: "photo copy" "links copy" "stats stats" "str str";
    grid-template-rows: auto 1fr auto auto;
    row-gap: 0;
  }
  .about-grid > .about-photo { grid-area: photo; }
  .about-grid > .about-copy { grid-area: copy; }
  .about-grid > .about-links { grid-area: links; align-self: start; margin-top: 26px; }
  .about-grid > .about-stats { grid-area: stats; margin-top: clamp(32px, 4vw, 48px); }
  .about-grid > .about-strengths { grid-area: str; margin-top: 12px; }
  /* Links as a compact 2 × 2 list under the portrait */
  .about-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 18px;
    max-width: 440px;
  }
  .about-links-label { grid-column: 1 / -1; margin-bottom: 4px; }
  .about-links a { justify-content: space-between; min-height: 42px; border-bottom: 1px solid var(--line); text-decoration: none; }
  .about-links a span[aria-hidden] { color: var(--ink-3); }
  .about-links a:hover span[aria-hidden] { color: var(--accent-ink); }
}
@media (min-width: 960px) {
  .about-links { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); max-width: 454px; }
  .about-links a { white-space: nowrap; font-size: 14px; }
}
@media (min-width: 960px) and (max-width: 1199px) {
  .about-links { grid-template-columns: minmax(0, 1fr); }
}

/* --------------------------------------------------------------------------
   Feedback — “What it’s like working with me”
   One slow horizontal row of cards (js/testimonials.js). Reuses the logo
   strip's .marquee / .marquee-track loop; on touch screens and with reduced
   motion it is a plain swipeable row instead.
   -------------------------------------------------------------------------- */
.feedback {
  padding-top: clamp(56px, 6vw, 88px);
  padding-bottom: clamp(56px, 6vw, 88px);
  background: var(--paper-2);
  border-top: 1px solid var(--line);
  overflow: hidden;
}
.feedback .section-head { margin-bottom: clamp(16px, 2vw, 24px); }

/* Invitation row */
.fb-bar { display: flex; justify-content: flex-end; }
.fb-bar[hidden] { display: none; }
@media (max-width: 719px) {
  .fb-bar { justify-content: stretch; }
  .fb-cta { width: 100%; justify-content: center; }
}

/* The row */
.fb-row {
  margin-top: clamp(22px, 3vw, 36px);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}
.fb-track {
  gap: 16px;
  padding: 10px var(--gutter) 30px;   /* room for the hover lift and shadow */
}
@keyframes fb-marquee { to { transform: translateX(calc(-50% - 8px)); } }
.fb-row .fb-track { animation-name: fb-marquee; }
/* Touch screens: swipe instead of auto-scroll (one copy of the list, snapping) */
@media (hover: none) {
  .fb-row {
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    scrollbar-width: none;
    -webkit-mask-image: none;
    mask-image: none;
  }
  .fb-row::-webkit-scrollbar { display: none; }
  .fb-row .fb-track { animation: none; width: max-content; }
  .fb-track li[aria-hidden] { display: none; }
  .fb-card { scroll-snap-align: start; }
}

/* Cards */
.fb-card {
  position: relative;
  flex: 0 0 min(380px, 82vw);
  display: flex;
  flex-direction: column;
  padding: 22px 22px 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fbf9f5;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out), border-color 0.35s;
}
@media (hover: hover) {
  .fb-card:hover { transform: translateY(-3px); border-color: rgba(196, 58, 12, 0.3); box-shadow: 0 22px 40px -28px rgba(18, 17, 16, 0.45); }
}
.fb-top { display: flex; align-items: center; gap: 10px; }
.fb-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: auto;
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-ink);
}
.fb-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
/* Stars: five grey stars with the golden ones clipped to the rating */
.fb-stars { position: relative; flex: none; display: inline-block; height: 16px; line-height: 0; }
.fb-stars-off, .fb-stars-on { display: inline-flex; gap: 1px; white-space: nowrap; }
.fb-stars-on { position: absolute; inset: 0 auto 0 0; overflow: hidden; }
.fb-stars svg { flex: none; width: 16px; height: 16px; }
.fb-stars-off svg { color: rgba(18, 17, 16, 0.14); }
.fb-stars-on svg { color: #e8a317; }
.fb-quote { margin: 16px 0 22px; }
.fb-quote::before {
  content: "\201C";
  display: block;
  height: 24px;
  font-family: var(--f-serif);
  font-size: 50px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--accent-ink);
}
.fb-quote p { font-size: 16px; line-height: 1.6; letter-spacing: -0.005em; color: var(--ink-2); }
.fb-quote .hl {
  font-style: normal;
  font-weight: 600;
  color: var(--ink);
  background: linear-gradient(transparent 64%, var(--accent-soft) 64%);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.fb-who {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
/* Avatar: a real photo, a company logo in a white tile, or initials */
.fb-av {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--f-mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  overflow: hidden;
}
.fb-card:nth-child(6n + 2) .fb-av, .fb-card:nth-child(6n + 5) .fb-av { background: var(--accent-ink); }
.fb-card:nth-child(6n + 3) .fb-av, .fb-card:nth-child(6n) .fb-av { background: #2b6a73; }
.fb-av.is-photo { object-fit: cover; object-position: 50% 30%; background: var(--paper-3); box-shadow: 0 0 0 1px var(--line); }
.fb-card .fb-av.is-logo { border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px var(--line); padding: 6px; }
.fb-av.is-logo img { width: 100%; height: 100%; object-fit: contain; }
.fb-meta { display: grid; gap: 2px; min-width: 0; }
.fb-meta b { font-size: 14.5px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }
.fb-meta span { font-size: 13px; line-height: 1.35; color: var(--ink-3); }
a.fb-meta:hover b { text-decoration: underline; text-underline-offset: 3px; }
.fb-ref {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 4px;
  transition: color 0.25s, text-decoration-color 0.25s;
}
.fb-ref:hover { color: var(--accent-ink); text-decoration-color: var(--accent-ink); }
@media (max-width: 440px) {
  .fb-ref { flex-basis: 100%; margin-left: 0; padding-left: 56px; }
}
/* Reduced motion: no auto-scroll — a plain horizontal list you can scroll */
@media (prefers-reduced-motion: reduce) {
  .fb-row { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .fb-row .fb-track { animation: none !important; transform: none !important; }
  .fb-track li[aria-hidden] { display: none; }
}

/* "Explore All Projects" — sits right after the app tab bar ("More apps"), opens the showcase */
.app-index-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; }

/* An ink pill with an accent medallion, distinct from the tabs and store links */
.all-projects-btn {
  flex: none;
  gap: 12px;
  font-weight: 600;
  box-shadow: 0 0 0 1px rgba(18, 17, 16, 0.9), 0 14px 30px -18px rgba(18, 17, 16, 0.65);
}
.all-projects-btn .ap-ico {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  transition: transform 0.4s var(--ease-out), background-color 0.3s, color 0.3s;
}
.all-projects-btn .ap-ico svg { width: 16px; height: 16px; }
@media (hover: hover) {
  .all-projects-btn:hover { box-shadow: 0 0 0 1px var(--accent), 0 18px 36px -16px rgba(255, 91, 36, 0.55); }
  .all-projects-btn:hover .ap-ico { background: #fff; color: var(--accent-ink); transform: rotate(45deg); }
}
.all-projects-btn:active { transform: translateY(0) scale(0.97); transition-duration: 0.1s; }
.all-projects-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; box-shadow: 0 0 0 6px var(--accent-soft); }
@media (prefers-reduced-motion: reduce) {
  .all-projects-btn .ap-ico { transition: none; }
  .all-projects-btn:hover .ap-ico { transform: none; }
}

/* Compact size: same height as the glass tab bar beside it */
.ix-all { min-height: 50px; padding: 0 6px 0 20px; font-size: 14.5px; }
.ix-all .ap-ico { width: 38px; height: 38px; }

/* Tablet & phone: the tab bar is hidden, so the button shares a row with the progress status */
@media (max-width: 899px) {
  .hs-meta:has(.app-index-row) { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
  .ix-all { min-height: 42px; padding: 0 4px 0 16px; font-size: 13.5px; gap: 10px; }
  .ix-all .ap-ico { width: 34px; height: 34px; }
}

/* Narrow phones (< 390px): keep both store buttons on one row so neither is clipped in the pinned card */
@media (max-width: 389px) {
  .hcard .store-links { gap: 8px; }
  .hcard .store { padding: 0 10px 0 9px; gap: 7px; }
}

/* --------------------------------------------------------------------------
   Rental card: real dashboard capture. The browser view is 16:9 by default;
   this capture is wider because the greeting band was cropped off.
   -------------------------------------------------------------------------- */
.browser-view.is-dash { aspect-ratio: 1280 / 632; }

/* --------------------------------------------------------------------------
   Impact: how each figure was measured
   -------------------------------------------------------------------------- */
.metric-how {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-3);
  max-width: 36ch;
}
.metric-how b {
  display: block;
  margin-bottom: 2px;
  font-family: var(--f-mono);
  font-weight: 500;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.metric-how a { text-decoration: underline; text-underline-offset: 2px; color: var(--ink-2); }
.impact-note { margin-top: 28px; max-width: 72ch; font-size: 14px; line-height: 1.6; color: var(--ink-3); }

/* --------------------------------------------------------------------------
   Now — what I'm building and learning this month (js/now.js)
   -------------------------------------------------------------------------- */
.now {
  padding-block: clamp(64px, 7vw, 104px);
  background: var(--paper-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.now .section-head { margin-bottom: clamp(28px, 4vw, 48px); }
.now-updated {
  display: inline-block;
  margin-top: 6px;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-ink);
}
.now-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px; }
@media (min-width: 960px) {
  .now-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 48px; align-items: start; }
}
.now-col { display: grid; gap: 14px; align-content: start; }
.now-h {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 2px;
  font-family: var(--f-mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.now-learning + .now-h { margin-top: 22px; }
.now-k {
  display: inline-grid;
  place-items: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-size: 11px;
}
.now-card, .now-learn, .now-focus {
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fbf9f5;
}
.now-card { transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out), border-color 0.35s; }
@media (hover: hover) {
  .now-card:hover { transform: translateY(-2px); border-color: rgba(196, 58, 12, 0.3); box-shadow: 0 22px 40px -28px rgba(18, 17, 16, 0.45); }
}
.now-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 14px; }
.now-top h4 { font-family: var(--f-display); font-size: 1.2rem; letter-spacing: -0.02em; line-height: 1.15; }
.now-status, .now-when {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
}
.now-status::before {
  content: "";
  display: inline-block;
  width: 7px; height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: 1px;
}
.now-when.is-current { color: var(--accent-ink); }
.now-what { margin-top: 10px; font-size: 15.5px; color: var(--ink-2); }
.now-line { margin-top: 8px; font-size: 14px; line-height: 1.55; color: var(--ink-3); }
.now-line b { color: var(--ink-2); font-weight: 500; }
.now-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.now-tags li {
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-family: var(--f-mono);
  font-size: 11.5px;
  color: var(--ink-2);
}
.now-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; font-size: 14px; font-weight: 500; }
.now-links a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--accent-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(196, 58, 12, 0.35);
}
.now-links a:hover { text-decoration-color: currentColor; }
.now-links .arrow { font-size: 0.9em; }
.now-learning { display: grid; gap: 10px; }
.now-learn { padding: 16px 18px; }
.now-learn .now-top h4 { font-size: 1.05rem; }
.now-focus { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.now-statement { font-family: var(--f-display); font-size: 1.25rem; letter-spacing: -0.02em; line-height: 1.3; }
.now-focus .now-line { color: var(--night-muted); }
.now-focus .now-line b { color: var(--paper); }
.now-focus a { color: #ffb08f; text-decoration: underline; text-underline-offset: 3px; }

/* Building this month: full width, a spotlight card, then a 2-up grid of
   cards that each open on real screenshots in a device frame. */
.now-build { display: grid; gap: 18px; grid-column: 1 / -1; }
@media (min-width: 960px) { .now-side { position: sticky; top: 96px; } }
.now-count {
  padding: 2px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-2);
}
.now-cards { display: grid; gap: 18px; }
@media (min-width: 760px) { .now-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.now-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.now-body { padding: 20px 22px 22px; }
@media (min-width: 960px) {
  .now-card.is-spotlight { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: stretch; }
  .now-card.is-spotlight .now-body { align-self: center; padding: 30px 34px; }
  .now-card.is-spotlight .now-top h4 { font-size: clamp(1.6rem, 2.4vw, 2.1rem); }
  .now-card.is-spotlight .now-what { font-size: 16.5px; }
}

/* Live status: a green, softly pulsing dot */
.now-status.is-live { color: #1c7a45; }
.now-status.is-live::before { background: #22a35a; box-shadow: 0 0 0 0 rgba(34, 163, 90, 0.5); animation: now-pulse 2.2s ease-out infinite; }
@keyframes now-pulse { 70% { box-shadow: 0 0 0 7px rgba(34, 163, 90, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 163, 90, 0); } }

.now-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.now-stats div { display: flex; flex-direction: column-reverse; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.now-stats dd { font-family: var(--f-display); font-size: 1.45rem; letter-spacing: -0.03em; line-height: 1; color: var(--ink); }
.now-stats dt { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-3); }

/* The dark stage behind each device */
.now-media {
  position: relative;
  background:
    radial-gradient(120% 90% at 15% 0%, rgba(255, 91, 36, 0.24), transparent 55%),
    radial-gradient(90% 80% at 100% 100%, rgba(120, 110, 255, 0.16), transparent 60%),
    var(--night);
}
.now-media.is-web { padding: 18px 18px 0; }
.is-spotlight .now-media.is-web { padding: clamp(18px, 3vw, 34px) clamp(18px, 3vw, 34px) 0; }
.nm-chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border-radius: 12px 12px 0 0;
  background: var(--night-3);
  border: 1px solid var(--night-line);
  border-bottom: 0;
}
.nm-chrome i { width: 9px; height: 9px; border-radius: 50%; background: #ff5f57; }
.nm-chrome i:nth-child(2) { background: #febc2e; }
.nm-chrome i:nth-child(3) { background: #28c840; }
.nm-url {
  flex: 1;
  min-width: 0;
  margin: 0 8px;
  padding: 3px 10px;
  border-radius: 6px;
  background: rgba(243, 239, 231, 0.06);
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--night-muted);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.nm-count { font-family: var(--f-mono); font-size: 10.5px; color: var(--night-muted); }
.now-media.is-web .nm-stage {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--night-2);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8);
}
.nm-shot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 0.7s var(--ease-out), transform 1.2s var(--ease-out);
}
.nm-shot.is-whole { object-fit: contain; object-position: center; padding: 10px; }
.nm-shot.is-on { opacity: 1; transform: none; }
@media (hover: hover) {
  .now-card:hover .nm-shot.is-on { transform: scale(1.015); }
}
.nm-note {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 1;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(13, 14, 16, 0.78);
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #f3efe7;
}
.nm-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  padding: 10px 2px 12px;
}
.nm-cap { margin: 0; font-size: 13px; line-height: 1.35; color: #cfc9be; }
.nm-pips { display: flex; flex: none; gap: 2px; }
.nm-pip { display: grid; place-items: center; width: 26px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; }
.nm-pip span { position: relative; width: 20px; height: 3px; border-radius: 3px; background: rgba(243, 239, 231, 0.22); overflow: hidden; }
.nm-pip span::after { content: ""; position: absolute; inset: 0; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.nm-pip.is-on span::after { transform: scaleX(1); }
.is-playing .nm-pip.is-on span::after { animation: nm-fill 4.2s linear; }
@keyframes nm-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.nm-pip:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-radius: 4px; }

/* Phone frames */
.now-media.is-phones .nm-stage {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(10px, 2.4vw, 20px);
  padding: 26px 18px 18px;
}
.nm-phone { width: 27%; max-width: 150px; margin: 0; text-align: center; transition: transform 0.5s var(--ease-out); }
.nm-phone:nth-child(2) { transform: translateY(-10px); }
.nm-phone img {
  display: block;
  width: 100%;
  height: auto;
  border: 5px solid #050506;
  border-radius: 20px;
  box-shadow: 0 0 0 1px rgba(243, 239, 231, 0.12), 0 24px 40px -18px rgba(0, 0, 0, 0.9);
}
.nm-phone figcaption { margin-top: 10px; font-size: 12px; color: #cfc9be; }
@media (hover: hover) {
  .now-card:hover .nm-phone:nth-child(1) { transform: translateY(-4px) rotate(-2deg); }
  .now-card:hover .nm-phone:nth-child(2) { transform: translateY(-16px); }
  .now-card:hover .nm-phone:nth-child(3) { transform: translateY(-4px) rotate(2deg); }
}
.now-media.is-phones .nm-note { left: 50%; bottom: auto; top: 10px; transform: translateX(-50%); }

/* Learning list thumbnails */
.now-learn.has-thumb { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 16px; align-items: start; }
.now-thumb {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  border-radius: 12px;
  overflow: hidden;
  background: var(--night);
  box-shadow: 0 10px 20px -14px rgba(18, 17, 16, 0.6);
}
.now-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.now-thumb.is-concept img { object-position: center; }
.now-thumb-tag {
  position: absolute;
  left: 5px;
  bottom: 5px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(13, 14, 16, 0.8);
  font-family: var(--f-mono);
  font-size: 9.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #f3efe7;
}
@media (max-width: 480px) {
  .now-learn.has-thumb { grid-template-columns: 64px minmax(0, 1fr); gap: 12px; }
  .now-stats dd { font-size: 1.2rem; }
  .now-media.is-web { padding: 12px 12px 0; }
}
@media (prefers-reduced-motion: reduce) {
  .nm-shot, .nm-phone { transition: none; }
  .now-status.is-live::before { animation: none; }
}

/* Footer licence link */
.footer .footer-license { text-decoration: underline; text-underline-offset: 2px; }
