/* ═══════════════════════════════════════════════════════════════
   Jake Biddlecome — Systems Blueprint (light)
   Palette: paper canvas, faint drafting grid, signal amber, trace cyan
   Type:    Archivo (display + body) / JetBrains Mono (labels, data)
   ═══════════════════════════════════════════════════════════════ */

:root {
  color-scheme: light;
  --bg0: #fbfbf9;
  --bg1: #ffffff;
  --bg2: #f4f5f3;
  --line: #e4e6e2;
  --line-bright: #cfd3cd;
  --grid: rgba(20, 32, 52, 0.045);
  --text: #14181f;
  --dim: #5a6472;
  --faint: #8b95a3;
  --amber: #ffb224;
  --amber-text: #8a5a00;
  --amber-deep: #ce8a00;
  --cyan: #56c8e8;
  --cyan-text: #0f6d8c;
  --ink-on-amber: #14100a;
  --ok: #34d399;
  --ok-text: #0f7a52;
  --danger: #f0645c;
  --danger-text: #b3261e;
  --shadow-sm: 0 1px 2px rgba(20, 32, 52, 0.04), 0 2px 8px rgba(20, 32, 52, 0.04);
  --shadow-md: 0 2px 4px rgba(20, 32, 52, 0.05), 0 8px 24px rgba(20, 32, 52, 0.06);
  --tint-blue: #e6edf5;
  --tint-sage: #e9efe8;
  --tint-lavender: #eceaf4;
  --font-display: "Archivo", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --maxw: 1120px;
  --radius: 10px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg0);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
}

::selection { background: var(--amber); color: var(--ink-on-amber); }

a { color: var(--cyan-text); text-decoration: none; }
a:hover { text-decoration: underline; }

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

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

/* ── Route eyebrow: mono API-route section labels ─────────────── */
.route {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--faint);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.route .verb { color: var(--ok-text); font-weight: 700; }
.route .verb.post { color: var(--amber-text); }
.route::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--line-bright);
}

/* ── Nav ──────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.wordmark {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.wordmark:hover { text-decoration: none; }
.wordmark .tld { color: var(--amber-text); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  list-style: none;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--dim);
  transition: color 0.18s ease;
}
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-cta { white-space: nowrap; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-bright);
  border-radius: 6px;
  color: var(--text);
  font-size: 18px;
  width: 40px; height: 40px;
  cursor: pointer;
}

/* ── Buttons ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-amber {
  background: var(--amber);
  color: var(--ink-on-amber);
}
.btn-amber:hover {
  box-shadow: 0 6px 24px rgba(255, 178, 36, 0.38);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-bright);
}
.btn-ghost:hover {
  border-color: var(--amber-deep);
  color: var(--amber-text);
}
.btn-sm { padding: 8px 16px; font-size: 13.5px; }

/* Outlined pill — the closing call-to-action row */
.btn-pill {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--text);
  border-radius: 999px;
  padding: 13px 26px;
}
.btn-pill:hover { background: var(--text); color: var(--bg1); border-color: var(--text); }

/* ── Layout scaffolding ───────────────────────────────────────── */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
}
section.block {
  padding: 96px 0;
  border-top: 1px solid var(--line);
}
.section-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  font-stretch: 112%;
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin-bottom: 14px;
}
.section-sub {
  color: var(--dim);
  max-width: 640px;
  margin-bottom: 48px;
}

/* ── Hero ─────────────────────────────────────────────────────── */
.hero {
  padding-top: 168px;
  padding-bottom: 88px;
  position: relative;
}
.hero-status {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--dim);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 14px;
  border: 1px solid var(--line-bright);
  border-radius: 100px;
  background: var(--bg1);
  margin-bottom: 30px;
}
.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.45); }
  70% { box-shadow: 0 0 0 9px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.hero h1 {
  font-size: clamp(34px, 4.6vw, 60px);
  font-weight: 700;
  font-stretch: 115%;
  line-height: 1.08;
  letter-spacing: -0.02em;
  max-width: 1000px;
  margin-bottom: 26px;
}
.hero h1 .accent { color: var(--amber-text); }
.hero h1 .line {
  display: block;
  overflow: hidden;
}
.hero h1 .line > span {
  display: block;
  transform: translateY(110%);
  animation: rise 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.hero h1 .line:nth-child(2) > span { animation-delay: 0.12s; }
.hero h1 .line:nth-child(3) > span { animation-delay: 0.24s; }
@keyframes rise { to { transform: translateY(0); } }

.hero-lead {
  font-size: 19px;
  color: var(--dim);
  max-width: 660px;
  margin-bottom: 38px;
}
.hero-lead strong { color: var(--text); font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hero-aside {
  margin-top: 30px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--faint);
}

/* ── Proof strip ──────────────────────────────────────────────── */
.proof {
  border-top: 1px solid var(--line);
  background: var(--bg1);
}
.proof-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
}
.proof-cell {
  padding: 34px 24px 34px 24px;
  border-left: 1px solid var(--line);
}
.proof-cell:first-child { border-left: none; padding-left: 0; }
.proof-num {
  font-family: var(--font-mono);
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
}
.proof-num .unit { font-size: 0.62em; color: var(--dim); font-weight: 500; }
.proof-label {
  font-size: 13.5px;
  color: var(--dim);
  margin-top: 6px;
}

/* ── Pillars (condensed engagement models) ────────────────────── */
.pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.pillar {
  border-top: 2px solid var(--line-bright);
  padding-top: 18px;
  position: relative;
}
.pillar::before {
  content: "";
  position: absolute;
  top: -5px; left: 0;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--amber);
}
.pillar-tag {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--cyan-text);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.pillar h3 {
  font-size: 18px;
  font-weight: 700;
  font-stretch: 108%;
  letter-spacing: -0.01em;
  margin-bottom: 5px;
}
.pillar p { font-size: 14.5px; color: var(--dim); }

/* ── Case study cards ─────────────────────────────────────────── */
.case-card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: var(--tint-blue);
  padding: 56px 56px 58px;
  margin-bottom: 22px;
}
.case-card.sage { background: var(--tint-sage); }
.case-card.lavender { background: var(--tint-lavender); }
.case-body { position: relative; z-index: 1; max-width: 46%; }
.case-eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 14px;
}
.case-card h2 {
  font-size: clamp(26px, 3.4vw, 36px);
  font-weight: 700;
  font-stretch: 112%;
  letter-spacing: -0.02em;
  line-height: 1.14;
  margin-bottom: 12px;
}
.case-card > p,
.case-body > p { color: var(--dim); font-size: 16px; }
.case-art {
  position: absolute;
  right: -56px;
  top: 50%;
  transform: translateY(-50%);
  width: 52%;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
}

/* Metric triplets */
.metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 44px;
  margin-top: 32px;
}
.metric b {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
}
.metric span { font-size: 13.5px; color: var(--dim); }

/* ── Progressive disclosure ("depth on click") ────────────────── */
.more {
  border-top: 1px solid var(--line);
  margin-top: 8px;
}
.more > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 18px 0;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--amber-text);
}
.more > summary::-webkit-details-marker { display: none; }
.more > summary::after { content: "▾"; font-size: 11px; transition: transform 0.2s ease; }
.more[open] > summary { color: var(--dim); }
.more[open] > summary::after { transform: rotate(180deg); }
.more-body { padding-bottom: 20px; }

/* ── Case study internals ─────────────────────────────────────── */
.case-header { max-width: 780px; }
.case-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 30px 0 40px;
}
.kpi {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
  background: var(--bg1);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px 15px;
}
.kpi b { color: var(--amber-text); font-weight: 700; }

/* Architecture visualizer */
.arch {
  background: var(--bg1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 0 0 22px;
  box-shadow: var(--shadow-sm);
}
.arch-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--faint);
}
.arch-toolbar .dots { display: flex; gap: 6px; margin-right: 8px; }
.arch-toolbar .dots i {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--line-bright);
}
.arch-scroll { position: relative; }
.arch svg { display: block; width: 100%; height: auto; }

.arch .edge {
  stroke: #aab3bf;
  stroke-width: 1.4;
  fill: none;
}
.arch .flow {
  stroke: var(--cyan-text);
  stroke-width: 2;
  fill: none;
  stroke-dasharray: 5 90;
  stroke-linecap: round;
  animation: flow 3.2s linear infinite;
  opacity: 1;
}
@keyframes flow { to { stroke-dashoffset: -95; } }

.arch .node rect {
  fill: var(--bg2);
  stroke: var(--line-bright);
  stroke-width: 1.2;
  transition: stroke 0.18s ease, fill 0.18s ease;
}
.arch .node text {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  fill: var(--text);
}
.arch .node .sub { font-size: 9.5px; font-weight: 400; fill: var(--faint); }
.arch .node { cursor: pointer; }
.arch .node:hover rect,
.arch .node.active rect { stroke: var(--amber-deep); stroke-width: 1.8; fill: var(--tint-blue); }
.arch .node.core rect { stroke: var(--cyan-text); }

.arch-detail {
  border-top: 1px solid var(--line);
  padding: 18px 22px;
  min-height: 92px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  justify-content: center;
}
.arch-detail .name {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--amber-text);
}
.arch-detail .desc { font-size: 14.5px; color: var(--dim); }

/* Build timeline */
.timeline-rail {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 44px;
}
.week {
  border-top: 2px solid var(--line-bright);
  padding-top: 18px;
  position: relative;
}
.week::before {
  content: "";
  position: absolute;
  top: -5px; left: 0;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--amber);
}
.week-tag {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--amber-text);
  text-transform: uppercase;
}
.week h4 { font-size: 16.5px; margin: 8px 0 8px; font-weight: 650; }
.week p { font-size: 14px; color: var(--dim); }

/* ── Platform case study (screenshots) ────────────────────────── */
.shots-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.shot {
  background: var(--bg1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.shot:hover { border-color: var(--line-bright); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.shot img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top;
  display: block;
  border-bottom: 1px solid var(--line);
}
.shot-meta { padding: 16px 18px 18px; }
.shot-meta h4 { font-size: 15.5px; font-weight: 650; margin-bottom: 4px; }
.shot-meta p { font-size: 13.5px; color: var(--dim); }

/* ── App screenshot showcase ──────────────────────────────────── */
.app-showcase { margin-top: 64px; }
.showcase-head { max-width: 680px; margin-bottom: 30px; }
.showcase-head h3 { font-size: clamp(22px, 3vw, 28px); font-weight: 700; margin: 6px 0 8px; }
.showcase-head p:last-child { color: var(--dim); font-size: 15.5px; }
.showcase-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber-text);
  margin: 0 0 14px;
}
.showcase-label span { color: var(--faint); }

.phone, .browser {
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: zoom-in;
}
.phone-rail {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  margin-bottom: 44px;
}
.phone-frame {
  display: block;
  padding: 5px;
  background: var(--bg2);
  border: 1px solid var(--line-bright);
  border-radius: 22px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.phone-frame img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1008 / 2244;
  border-radius: 17px;
}
.phone:hover .phone-frame, .browser:hover .browser-frame { border-color: var(--amber-deep); transform: translateY(-3px); }
.phone-cap { display: block; padding: 10px 2px 0; font-size: 13px; color: var(--dim); line-height: 1.45; }
.phone-cap b { display: block; color: var(--text); font-size: 14px; font-weight: 650; }

.web-rail {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.browser-frame {
  position: relative;
  display: block;
  padding-top: 22px;
  background: var(--bg2);
  border: 1px solid var(--line-bright);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.browser-frame i {
  position: absolute;
  top: 8px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--line-bright);
}
.browser-frame i:nth-child(1) { left: 10px; }
.browser-frame i:nth-child(2) { left: 21px; }
.browser-frame i:nth-child(3) { left: 32px; }
.browser-frame img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top left;
}

.showcase-cta { margin-top: 34px; text-align: center; }
.gallery-open {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--amber-text);
  background: transparent;
  border: 1px solid var(--amber-deep);
  border-radius: 999px;
  padding: 11px 22px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.gallery-open:hover { background: var(--amber); color: var(--ink-on-amber); }

/* gallery dialog */
html:has(dialog.gallery[open]) { overflow: hidden; }
.gallery {
  width: min(1180px, calc(100vw - 32px));
  height: calc(100dvh - 48px);
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  background: var(--bg1);
  color: var(--text);
  border: 1px solid var(--line-bright);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.gallery[open] { display: flex; flex-direction: column; }
.gallery::backdrop { background: rgba(3, 7, 14, 0.62); backdrop-filter: blur(4px); }
.gallery-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px 12px 18px;
  border-bottom: 1px solid var(--line);
}
.gallery-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.gallery-tabs button {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--dim);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 13px;
  cursor: pointer;
}
.gallery-tabs button[aria-pressed="true"] { color: var(--ink-on-amber); background: var(--amber); border-color: var(--amber); }
.gallery-close {
  flex: none;
  width: 36px; height: 36px;
  font-size: 22px;
  line-height: 1;
  color: var(--text);
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
}
.gallery-body { flex: 1; overflow-y: auto; padding: 8px 18px 28px; }
.gallery-group h3 {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber-text);
  margin: 20px 0 12px;
}
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
.gallery-grid.is-web { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.tile {
  background: none;
  border: 0;
  padding: 0;
  color: var(--dim);
  font: inherit;
  font-size: 12.5px;
  line-height: 1.4;
  text-align: left;
  cursor: zoom-in;
}
.tile img {
  display: block;
  width: 100%;
  aspect-ratio: 1008 / 2244;
  object-fit: cover;
  object-position: top;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: border-color 0.2s ease;
}
.is-web .tile img { aspect-ratio: 16 / 10; object-position: top left; border-radius: 8px; }
.tile span { display: block; padding-top: 7px; }
.tile:hover img { border-color: var(--amber-deep); }

.lightbox {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px 12px;
  background: rgba(5, 10, 19, 0.97);
}
.lightbox[hidden] { display: none; }
.lightbox figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  height: 100%;
  min-width: 0;
  flex: 1;
}
.lightbox img {
  flex: 1;
  min-height: 0;
  max-width: 100%;
  object-fit: contain;
  border-radius: 12px;
}
.lightbox figcaption { font-family: var(--font-mono); font-size: 13px; color: #c7cedb; text-align: center; }
.lb-nav {
  flex: none;
  width: 44px; height: 44px;
  font-size: 28px;
  line-height: 1;
  color: #e8eef6;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  cursor: pointer;
}
.lb-nav:hover { border-color: var(--amber); color: var(--amber); }
.gallery-close:hover { border-color: var(--amber-deep); color: var(--amber-text); }
.lb-close {
  position: absolute;
  top: 12px; right: 14px;
  color: #e8eef6;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.28);
}
.lb-close:hover { border-color: var(--amber); color: var(--amber); }

.platform-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 36px 0 44px;
}
.fact {
  border-left: 2px solid var(--amber-deep);
  padding-left: 16px;
}
.fact b { display: block; font-size: 15.5px; font-weight: 650; margin-bottom: 3px; }
.fact span { font-size: 14px; color: var(--dim); }

/* ── Chat ─────────────────────────────────────────────────────── */
.chat-shell {
  background: var(--bg1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 760px;
}
.chat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--dim);
}
.chat-head .status-dot { width: 7px; height: 7px; }
.chat-window {
  height: 360px;
  overflow-y: auto;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-behavior: smooth;
}
.msg {
  max-width: 82%;
  padding: 11px 15px;
  border-radius: 10px;
  font-size: 14.5px;
  line-height: 1.55;
  white-space: pre-wrap;
}
.msg.user {
  align-self: flex-end;
  background: #fdf0d6;
  border: 1px solid #f2d79a;
}
.msg.ai {
  align-self: flex-start;
  background: var(--bg2);
  border: 1px solid var(--line);
  color: var(--text);
}
.msg.ai.thinking { color: var(--faint); font-family: var(--font-mono); font-size: 13px; }

.chat-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 22px 6px;
}
.chat-presets button {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--dim);
  background: none;
  border: 1px solid var(--line-bright);
  border-radius: 100px;
  padding: 6px 13px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.chat-presets button:hover { color: var(--amber-text); border-color: var(--amber-deep); }

.chat-form {
  display: flex;
  gap: 10px;
  padding: 16px 22px 20px;
  border-top: 1px solid var(--line);
}
.chat-form input {
  flex: 1;
  background: var(--bg0);
  border: 1px solid var(--line-bright);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 14.5px;
  padding: 11px 14px;
}
.chat-form input::placeholder { color: var(--faint); }
.chat-form input:focus { outline: none; border-color: var(--amber-deep); }

/* ── Floating chat bubble ─────────────────────────────────────── */
#chat-bubble {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 120;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}
#chat-bubble .chat-shell {
  display: none;
  width: min(384px, calc(100vw - 32px));
  max-width: none;
  box-shadow: var(--shadow-md);
}
#chat-bubble.open .chat-shell { display: block; }
#chat-bubble .chat-window { height: 320px; padding: 18px; }
#chat-bubble .chat-presets { padding: 0 18px 6px; }
#chat-bubble .chat-form { padding: 14px 18px 16px; }
.chat-close {
  margin-left: auto;
  background: none;
  border: 0;
  color: var(--faint);
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
}
.chat-close:hover { color: var(--text); }
.chat-launcher {
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 1px solid var(--line-bright);
  background: var(--bg1);
  box-shadow: var(--shadow-md);
  color: var(--text);
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.16s ease, border-color 0.16s ease;
}
.chat-launcher:hover { transform: translateY(-2px); border-color: var(--amber-deep); }

/* ── Experience: git-log timeline ─────────────────────────────── */
.gitlog { max-width: 860px; }
.commit {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 20px;
  padding-bottom: 22px;
}
.commit-rail { position: relative; }
.commit-rail::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 24px;
  bottom: -34px;
  width: 2px;
  background: var(--line);
  transform: translateX(-50%);
}
.commit:last-child .commit-rail::before { display: none; }
.commit-dot {
  position: absolute;
  top: 24px;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--bg1);
  border: 2px solid var(--line-bright);
  z-index: 1;
}
.commit.current .commit-dot {
  background: var(--amber);
  border-color: var(--amber);
  box-shadow: 0 0 0 0 rgba(255, 178, 36, 0.45);
  animation: pulse-amber 2.4s infinite;
}
@keyframes pulse-amber {
  0% { box-shadow: 0 0 0 0 rgba(255, 178, 36, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(255, 178, 36, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 178, 36, 0); }
}
.commit-card {
  background: var(--bg1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.commit-card:hover {
  border-color: var(--amber-deep);
  transform: translateX(4px);
}
.commit.current .commit-card { border-color: rgba(206, 138, 0, 0.5); }
.commit-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--faint);
  margin-bottom: 10px;
}
.commit-meta .tag {
  border: 1px solid var(--line-bright);
  border-radius: 100px;
  padding: 2px 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
}
.commit-meta .tag.head {
  color: var(--amber-text);
  border-color: rgba(206, 138, 0, 0.6);
}
.commit-card h3 { font-size: 17.5px; font-weight: 650; }
.commit-card .role { font-size: 14.5px; color: var(--amber-text); margin: 2px 0 10px; }
.commit-card .sum { font-size: 15px; color: var(--dim); }
.commit-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.chip {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--dim);
  border: 1px solid var(--line-bright);
  border-radius: 5px;
  padding: 3px 9px;
  white-space: nowrap;
}
.chip.hot { color: var(--amber-text); border-color: rgba(206, 138, 0, 0.5); }

/* ── Closing call to action ───────────────────────────────────── */
.closing {
  border-top: 1px solid var(--line);
  padding: 116px 0 124px;
  text-align: center;
}
.closing h2 {
  font-size: clamp(28px, 4.4vw, 46px);
  font-weight: 700;
  font-stretch: 112%;
  letter-spacing: -0.02em;
  line-height: 1.16;
  max-width: 820px;
  margin: 0 auto 34px;
}
.closing-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}

/* ── Contact ──────────────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 56px;
  align-items: start;
}
.contact-photo {
  width: 96px; height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line-bright);
  box-shadow: var(--shadow-sm);
  filter: grayscale(1) contrast(0.96) brightness(0.98);
  margin-bottom: 20px;
}
.contact-info > p { color: var(--dim); margin-bottom: 26px; }
.contact-facts { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.contact-facts li {
  display: flex;
  gap: 12px;
  font-size: 15px;
  align-items: baseline;
}
.contact-facts .k {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--faint);
  min-width: 72px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form {
  background: var(--bg1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.field { display: flex; flex-direction: column; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--dim);
  letter-spacing: 0.04em;
}
.field input,
.field select,
.field textarea {
  background: var(--bg0);
  border: 1px solid var(--line-bright);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 15px;
  padding: 12px 14px;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus,
.field select:focus,
.field textarea:focus { outline: none; border-color: var(--amber-deep); }
.form-footer {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.form-status {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--dim);
}
.form-status.ok { color: var(--ok-text); }
.form-status.err { color: var(--danger-text); }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* ── Footer ───────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--line);
  padding: 34px 0 44px;
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--faint);
}
.footer-inner a { color: var(--dim); }
.footer-inner a:hover { color: var(--amber-text); text-decoration: none; }
.footer-links { display: flex; gap: 22px; }

/* ── Scroll reveals ───────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.in { opacity: 1; transform: none; }
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.reveal-stagger.in > * { opacity: 1; transform: none; }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 960px) {
  .proof-grid { grid-template-columns: 1fr 1fr; }
  .proof-cell { padding-left: 0; border-left: none; }
  .pillars { grid-template-columns: 1fr 1fr; row-gap: 32px; }
  .case-card { padding: 40px 34px 42px; }
  .case-body { max-width: 100%; }
  .case-art { display: none; }
  .metrics { gap: 30px; }
  .shots-grid { grid-template-columns: 1fr 1fr; }
  .phone-rail {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 30%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 4px 0 10px;
  }
  .phone { scroll-snap-align: start; }
  .platform-facts { grid-template-columns: 1fr 1fr; }
  .timeline-rail { grid-template-columns: 1fr 1fr; row-gap: 34px; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 680px) {
  body { font-size: 16px; }
  section.block { padding: 68px 0; }
  .hero { padding-top: 128px; padding-bottom: 64px; }
  .nav-links {
    position: fixed;
    top: 64px; right: 0;
    flex-direction: column;
    align-items: flex-start;
    background: var(--bg1);
    border: 1px solid var(--line);
    border-right: none;
    border-radius: 10px 0 0 10px;
    padding: 22px 28px;
    gap: 18px;
    box-shadow: var(--shadow-md);
    transform: translateX(110%);
    transition: transform 0.25s ease;
  }
  .nav-links.open { transform: none; }
  .nav-toggle { display: block; }
  .nav-cta { display: none; }
  .pillars { grid-template-columns: 1fr; row-gap: 28px; }
  .case-card { padding: 32px 24px 34px; border-radius: 14px; }
  .metrics { gap: 22px; }
  .closing { padding: 78px 0 86px; }
  .shots-grid { grid-template-columns: 1fr; }
  .phone-rail { grid-auto-columns: 56%; }
  .web-rail { grid-template-columns: 1fr; }
  .gallery { width: 100vw; height: 100dvh; border-radius: 0; border: 0; }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
  .gallery-grid.is-web { grid-template-columns: 1fr; }
  .lightbox { padding: 60px 4px 16px; gap: 4px; }
  .lb-nav { width: 36px; height: 36px; font-size: 22px; }
  .platform-facts { grid-template-columns: 1fr; }
  .timeline-rail { grid-template-columns: 1fr; }
  .commit { grid-template-columns: 20px 1fr; gap: 14px; }
  .commit-card { padding: 18px; }
  .form { grid-template-columns: 1fr; padding: 22px; }
  .chat-window { height: 320px; }
  #chat-bubble { right: 14px; bottom: 14px; gap: 10px; }
  #chat-bubble .chat-window { height: 44vh; }
  .chat-launcher { width: 50px; height: 50px; font-size: 19px; }
  .arch-scroll { overflow-x: auto; }
  .arch-scroll svg { min-width: 760px; }
}

/* ── Reduced motion ───────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero h1 .line > span { animation: none; transform: none; }
  .status-dot { animation: none; }
  .commit.current .commit-dot { animation: none; }
  .arch .flow { animation: none; opacity: 0; }
  .reveal, .reveal-stagger > * { opacity: 1; transform: none; transition: none; }
  .btn, .service-card, .shot, .commit-card, .phone-frame, .browser-frame, .chat-launcher { transition: none; }
}

/* ── Legacy resume page (kept) ────────────────────────────────── */
.resume-page {
  background-color: var(--bg0);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.resume-header {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 48px 28px 24px;
  width: 100%;
}
.resume-header h1 {
  font-size: 34px;
  font-weight: 700;
  font-stretch: 112%;
  margin: 6px 0 8px;
}
.resume-header .eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--amber-text);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 18px;
}
.resume-header .copy { color: var(--dim); margin-bottom: 20px; }
.resume-header .hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.resume-header .button,
.resume-header .button.ghost {
  display: inline-flex;
  padding: 11px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14.5px;
  text-decoration: none;
}
.resume-header .button { background: var(--amber); color: var(--ink-on-amber); }
.resume-header .button.ghost {
  background: none;
  border: 1px solid var(--line-bright);
  color: var(--text);
}
.text-link { font-family: var(--font-mono); font-size: 13px; color: var(--cyan-text); }
.resume-viewer {
  flex: 1;
  max-width: var(--maxw);
  width: 100%;
  margin: 0 auto;
  padding: 12px 28px 48px;
}
.resume-viewer object {
  width: 100%;
  height: min(1200px, 82vh);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
