@font-face {
  font-family: "Bricolage";
  src: url("assets/bricolage.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --paper: #f7f8fa;
  --sky: #e6edff;
  --sky-deep: #d4defe;
  --ink: #15171c;
  --muted: #5b6070;
  --rule: #dde0e7;
  --rule-sky: #c5d1f7;
  --pulse: #2b4bee;
  --pulse-soft: #e7ebff;
  --alarm: #e5383b;

  --wrap: 1180px;
  --gutter: clamp(20px, 5vw, 56px);
  --font: "Bricolage", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }
main { overflow-x: clip; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; line-height: 1.05; font-weight: 700; letter-spacing: -0.02em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

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

.skip {
  position: absolute; left: 16px; top: -60px;
  background: var(--ink); color: var(--paper);
  padding: 10px 16px; border-radius: 8px; z-index: 200; text-decoration: none;
}
.skip:focus { top: 16px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Circle cursor ---------- */
.cursor, .cursor-dot { position: fixed; top: 0; left: 0; pointer-events: none; z-index: 150; opacity: 0; transition: opacity .2s; }
.cursor {
  width: 34px; height: 34px; margin: -17px 0 0 -17px;
  border: 1.5px solid var(--pulse); border-radius: 50%;
  transition: opacity .2s, width .25s var(--ease), height .25s var(--ease), margin .25s var(--ease), background-color .25s;
}
.cursor-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: var(--pulse); }
html.cursor-on .cursor, html.cursor-on .cursor-dot { opacity: 1; }
html.cursor-on, html.cursor-on * { cursor: none !important; }
html.cursor-on input, html.cursor-on textarea { cursor: text !important; }
.cursor.hover { width: 64px; height: 64px; margin: -32px 0 0 -32px; background: rgba(43, 75, 238, .1); }
.cursor.down { width: 26px; height: 26px; margin: -13px 0 0 -13px; }

/* ---------- Thread ---------- */
.thread { position: absolute; top: 0; left: 0; z-index: 5; pointer-events: none; overflow: visible; opacity: 0; transition: opacity .6s ease 1.6s; }
.thread.on { opacity: 1; }
.thread path { fill: none; stroke: var(--pulse); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.thread circle { fill: var(--pulse); transform-box: fill-box; transform-origin: center; transform: scale(0); transition: transform .35s var(--ease); }
.thread circle.on { transform: scale(1); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled { background: color-mix(in srgb, var(--paper) 86%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom-color: var(--rule); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 24px; }
.wordmark { font-weight: 700; text-decoration: none; font-size: 19px; letter-spacing: -0.01em; }
.nav { display: flex; align-items: center; gap: 28px; font-size: 16px; }
.nav a { text-decoration: none; color: var(--muted); position: relative; }
.nav a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1.5px; background: var(--pulse); transform: scaleX(0); transform-origin: right; transition: transform .35s var(--ease); }
.nav a:not(.btn):hover { color: var(--ink); }
.nav a:not(.btn):hover::after { transform: scaleX(1); transform-origin: left; }
.menu-toggle { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ink); color: var(--paper);
  padding: 13px 22px; border-radius: 999px;
  text-decoration: none; font-weight: 600; font-size: 16px; font-family: inherit;
  border: 2px solid var(--ink); cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.btn:hover { background: var(--pulse); border-color: var(--pulse); color: #fff; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.nav .btn { padding: 8px 16px; font-size: 15px; color: var(--paper); }

/* ---------- Hero ---------- */
.hero { min-height: 100svh; display: grid; align-content: center; padding: 110px 0 70px; text-align: center; }

.pulse-line { width: min(1120px, 100%); height: clamp(48px, 7vw, 84px); margin: clamp(10px, 2vw, 24px) auto clamp(24px, 3vw, 36px); overflow: visible; }
.pulse-line path { fill: none; stroke: var(--pulse); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.pulse-line .beat-dot { fill: var(--pulse); }
.hero-intro { font-size: clamp(19px, 2vw, 23px); line-height: 1.45; max-width: 40ch; margin: 0 auto 28px; }
.hero-intro a { text-decoration-color: var(--pulse); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* ---------- Headline ---------- */
.headline { position: relative; font-size: clamp(50px, 8.4vw, 124px); font-weight: 800; letter-spacing: -0.05em; line-height: .94; margin: 0 auto; }
.hl-line { display: block; }
.hl-main { position: relative; display: block; }
.hl-echo { position: absolute; inset: 0; display: block; color: var(--pulse); opacity: .16; transform: translate(.045em, .055em); pointer-events: none; }
.headline .w { display: inline-block; }

/* Entrance on every load */
.hl-main .w { transition: opacity .9s var(--ease), filter .9s var(--ease), transform .9s var(--ease); transition-delay: calc(var(--i) * 90ms + 80ms); }
.hl-echo { transition: opacity 1s var(--ease) .7s, transform 1.1s var(--ease) .7s; }
.hero-after { transition: opacity .9s var(--ease) .85s, transform .9s var(--ease) .85s; }
.site-header { transition: background-color .3s, border-color .3s, opacity .8s ease .3s, transform .8s var(--ease) .3s; }
.pulse-line { clip-path: inset(-30% -2% -30% -200%); transition: clip-path 1.3s cubic-bezier(.6,.05,.25,1) .9s; }
.pulse-line .beat-dot { transition: opacity .3s 2.1s; }
.js.pre .hl-main .w { opacity: 0; filter: blur(16px); transform: translateY(14px); }
.js.pre .hl-echo { opacity: 0; transform: translate(0, 0); }
.js.pre .hero-after { opacity: 0; transform: translateY(16px); }
.js.pre .site-header { opacity: 0; transform: translateY(-12px); }
.js.pre .pulse-line { clip-path: inset(-30% 300% -30% -200%); }
.js.pre .pulse-line .beat-dot { opacity: 0; }

/* Phone heartbeat dividers (desktop uses the thread) */
.beat { display: none; }

/* ---------- Sections ---------- */
section { scroll-margin-top: 80px; position: relative; }
.section { padding: clamp(80px, 10vw, 140px) 0; }
.sky { background: var(--sky); }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; margin-bottom: clamp(40px, 6vw, 72px); align-items: end; }
.section-head h2 { font-size: clamp(44px, 7vw, 96px); letter-spacing: -0.045em; line-height: .95; }
.section-head p { color: var(--muted); max-width: 44ch; margin: 0 0 8px; font-size: 19px; justify-self: end; }

/* Scrubbed blur words */
.scrub .w { display: inline-block; will-change: filter, opacity; }
.js .scrub .w { opacity: .12; filter: blur(10px); }

/* ---------- Heapi feature ---------- */
.heapi-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(40px, 6vw, 96px); align-items: center; }
.status { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; color: var(--muted); margin-bottom: 20px; }
.status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #1fa463; box-shadow: 0 0 0 4px #1fa46322; animation: live 2s ease-in-out infinite; }
@keyframes live { 50% { box-shadow: 0 0 0 8px #1fa46300; } }
.heapi h2 { font-size: clamp(64px, 10vw, 136px); letter-spacing: -0.055em; line-height: .9; }
.heapi .lede { font-size: clamp(20px, 2.2vw, 26px); line-height: 1.35; margin: 20px 0 36px; max-width: 28ch; letter-spacing: -0.01em; }
.built-list li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding: 16px 0; border-top: 1px solid var(--rule-sky); }
.built-list li:last-child { border-bottom: 1px solid var(--rule-sky); }
.built-list svg { width: 20px; height: 20px; margin-top: 4px; color: var(--pulse); }
.built-list strong { font-weight: 600; display: block; }
.built-list span { color: var(--muted); font-size: 16px; }
.stack { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 32px; }
.stack li { font-size: 14px; padding: 5px 12px; border-radius: 999px; background: #fff; color: #1d33a8; border: 1px solid var(--rule-sky); }
.link-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Phone mock */
.phone-wrap { position: relative; }
.phone {
  width: min(320px, 100%); margin: 0 auto; aspect-ratio: 9 / 19;
  border-radius: 44px; padding: 12px; background: var(--ink);
  box-shadow: 0 40px 80px -30px rgba(21, 23, 28, .45), 0 0 0 1px #2a2d35 inset;
  transform: rotate(var(--rot, 3deg)) translateY(var(--py, 0px));
  animation: float 6s ease-in-out infinite;
}
@keyframes float { 50% { translate: 0 -12px; } }
.screen { height: 100%; border-radius: 34px; overflow: hidden; background: #fbfbfc; display: flex; flex-direction: column; font-size: 13px; line-height: 1.3; position: relative; }
.screen .notch { width: 92px; height: 24px; background: var(--ink); border-radius: 0 0 14px 14px; margin: 0 auto; flex: none; }
.screen .app-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px 8px; font-weight: 700; font-size: 16px; }
.screen .app-top small { font-weight: 500; color: var(--muted); font-size: 11px; }
.call-btn { position: relative; margin: 6px 14px 14px; background: var(--alarm); color: #fff; border-radius: 16px; padding: 14px 16px; font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 10px; }
.call-btn::after { content: ""; position: absolute; inset: 0; border-radius: 16px; border: 2px solid var(--alarm); animation: ring 2.2s ease-out infinite; }
@keyframes ring { from { opacity: .7; transform: scale(1); } to { opacity: 0; transform: scale(1.12, 1.35); } }
.call-btn svg { width: 18px; height: 18px; }
.screen h4 { margin: 4px 18px 10px; font-size: 17px; letter-spacing: -0.01em; }
.situations { padding: 0 14px; display: grid; gap: 7px; }
.situations li { background: #fff; border: 1px solid var(--rule); border-radius: 12px; padding: 11px 12px; display: flex; justify-content: space-between; align-items: center; transition: opacity .5s var(--ease), transform .5s var(--ease); transition-delay: calc(var(--i) * 90ms + 200ms); }
.situations li::after { content: "›"; color: var(--muted); font-size: 16px; }
.js .phone-wrap:not(.in) .situations li { opacity: 0; transform: translateY(10px); }
.tabbar { margin: auto 12px 14px; background: var(--ink); color: #9aa0ad; border-radius: 22px; display: flex; justify-content: space-around; align-items: center; padding: 8px 6px; }
.tabbar span { width: 22px; height: 22px; display: grid; place-items: center; }
.tabbar svg { width: 18px; height: 18px; }
.tabbar .home { width: 44px; height: 44px; border-radius: 50%; background: var(--pulse); color: #fff; margin-top: -18px; box-shadow: 0 6px 14px rgba(43,75,238,.4); }
.tabbar .home svg { width: 24px; height: 24px; }

/* ---------- Projects ---------- */
.project { position: relative; padding: clamp(56px, 8vw, 110px) 0; border-top: 1px solid var(--rule); }
.project:last-child { border-bottom: 1px solid var(--rule); }
.proj-top { display: flex; justify-content: space-between; gap: 32px; align-items: flex-start; position: relative; z-index: 2; }
.proj-top h3 { font-size: clamp(26px, 3vw, 36px); letter-spacing: -0.03em; }
.proj-top .kind { color: var(--muted); font-size: 15px; margin: 6px 0 0; }
.proj-top p.desc { max-width: 46ch; margin: 0; color: var(--ink); }
.proj-stage { position: relative; display: grid; place-items: center; min-height: clamp(260px, 34vw, 440px); margin: clamp(10px, 2vw, 24px) 0; }
.big-name {
  font-size: clamp(96px, 19vw, 280px); font-weight: 800; letter-spacing: -0.06em; line-height: .8;
  color: var(--ink); text-align: center; user-select: none; white-space: nowrap;
  will-change: filter, opacity;
}
.js .big-name { opacity: .15; filter: blur(22px); }
.proj-art { position: absolute; z-index: 2; left: 50%; top: 50%; width: min(440px, 86%); transform: translate(calc(-50% + var(--ax, 0px)), calc(-50% + var(--py, 0px))) rotate(var(--rot, -2deg)); }
.project:nth-child(even) .proj-art { --rot: 2deg; }
.proj-bottom { display: flex; justify-content: space-between; align-items: center; gap: 20px; position: relative; z-index: 2; flex-wrap: wrap; }
.tags { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: 15px; }
.go { font-size: 16px; font-weight: 600; text-decoration: none; display: inline-flex; gap: 8px; align-items: center; padding-bottom: 4px; border-bottom: 1.5px solid var(--ink); }
.go svg { width: 16px; height: 16px; transition: transform .25s var(--ease); }
.go:hover { color: var(--pulse); border-color: var(--pulse); }
.go:hover svg { transform: translate(3px, -3px); }
.go.none { border: none; color: var(--muted); font-weight: 400; font-size: 15px; }

/* Line-drawn cards */
.card { background: #fff; border: 1.5px solid var(--ink); border-radius: 12px; padding: 18px 20px; font-size: 14px; line-height: 1.35; box-shadow: 6px 6px 0 var(--ink); }
.card-head { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 10px; margin-bottom: 12px; border-bottom: 1.5px solid var(--ink); font-weight: 700; font-size: 15px; }
.card-head span { font-weight: 400; color: var(--muted); font-size: 12px; }
.code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 13px; border-radius: 6px; overflow: hidden; border: 1px solid var(--rule); }
.code div { padding: 3px 10px; white-space: pre; }
.code .del { background: #fdecec; color: #a3242a; }
.code .add { background: #e6f6ec; color: #17673a; }
.card-foot { display: flex; justify-content: space-between; margin-top: 12px; font-size: 13px; color: var(--muted); }
.pass { color: #17673a; font-weight: 600; }
.route { display: grid; gap: 10px; }
.route .box { border: 1.5px solid var(--ink); border-radius: 8px; padding: 8px 10px; }
.route .box small { display: block; color: var(--muted); font-size: 12px; }
.route .row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.route .chosen { border-color: var(--pulse); background: var(--pulse-soft); }
.route .chosen b { color: var(--pulse); }
.route .faded { opacity: .45; border-style: dashed; }
.arrow-down { height: 14px; width: 1.5px; background: var(--ink); margin: -4px auto; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.kpis div { border: 1px solid var(--rule); border-radius: 8px; padding: 8px; font-size: 12px; color: var(--muted); }
.kpis b { display: block; color: var(--ink); font-size: 15px; }
.bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; align-items: end; height: 110px; border-bottom: 1.5px solid var(--ink); padding: 0 6px; }
.bars span { background: var(--ink); border-radius: 4px 4px 0 0; height: var(--h); transform-origin: bottom; transition: transform .8s var(--ease); }
.bars span.low { background: var(--pulse); }
.bar-labels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 6px 6px 0; font-size: 12px; color: var(--muted); text-align: center; }
.js .project:not(.in) .bars span { transform: scaleY(0); }
.senti { display: grid; gap: 8px; }
.senti div { display: grid; grid-template-columns: 70px 1fr 40px; gap: 10px; align-items: center; font-size: 13px; }
.senti i { display: block; height: 12px; border-radius: 6px; background: var(--ink); width: var(--w); transform-origin: left; transition: transform .8s var(--ease); }
.senti .neg i { background: var(--pulse); }
.js .project:not(.in) .senti i { transform: scaleX(0); }
.spark { margin-top: 14px; height: 54px; width: 100%; }
.spark path { fill: none; stroke: var(--pulse); stroke-width: 2; }
.tree { font-size: 13px; }
.tree .root { border: 1.5px solid var(--ink); border-radius: 8px; padding: 6px 10px; text-align: center; font-weight: 700; width: 120px; margin: 0 auto; }
.tree .stem { height: 14px; width: 1.5px; background: var(--ink); margin: 0 auto; }
.tree .branch { border-top: 1.5px solid var(--ink); margin: 0 12%; }
.tree .kids { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tree .kid { text-align: center; }
.tree .kid::before { content: ""; display: block; height: 12px; width: 1.5px; background: var(--ink); margin: 0 auto 4px; }
.tree .kid span { display: block; border: 1px solid var(--ink); border-radius: 6px; padding: 6px 4px; }
.tree .kid em { display: block; font-style: normal; color: var(--muted); font-size: 11px; margin-top: 4px; }

/* ---------- Skills circle ---------- */
.orbit { position: relative; width: 100%; max-width: 1060px; margin: 0 auto; aspect-ratio: 1060 / 620; }
.orbit svg.ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.orbit .ring circle.track { fill: none; stroke: var(--rule-sky); stroke-width: 1.5; }
.orbit .ring circle.draw { fill: none; stroke: var(--pulse); stroke-width: 2; stroke-linecap: round; }
.orbit .ring circle.node { fill: var(--sky); stroke: var(--pulse); stroke-width: 2; transition: fill .3s; }
.orbit .ring circle.node.on { fill: var(--pulse); }
.orbit-center { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 34%; text-align: center; font-size: clamp(17px, 1.7vw, 22px); line-height: 1.35; letter-spacing: -0.01em; }
.skill { position: absolute; width: 26%; transition: opacity .6s var(--ease), filter .6s var(--ease), transform .6s var(--ease); }
.skill h3 { font-size: clamp(20px, 2vw, 26px); letter-spacing: -0.02em; margin-bottom: 6px; }
.skill p { color: var(--muted); font-size: 15px; margin: 0; }
.skill.l { text-align: right; }
.js .skill:not(.on) { opacity: .15; filter: blur(6px); }
.skill-list { display: none; }

/* ---------- Experience ---------- */
.timeline { position: relative; }
.tl-fill { position: absolute; left: calc(33.333% + 16px); top: 8px; bottom: 40px; width: 2px; background: var(--pulse); transform-origin: top; transform: scaleY(var(--p, 0)); }
.role { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 32px; padding: 0 0 48px; position: relative; }
.role .when { color: var(--muted); font-size: 16px; padding-top: 4px; font-variant-numeric: tabular-nums; text-align: right; }
.role .body { position: relative; padding-left: 32px; border-left: 2px solid var(--rule); }
.role:last-child .body { border-left-color: transparent; }
.role .body::before { content: ""; position: absolute; left: -8px; top: 8px; width: 14px; height: 14px; border-radius: 50%; background: var(--paper); border: 2px solid var(--ink); z-index: 1; transition: background .3s, border-color .3s, box-shadow .3s; }
.role.lit .body::before { background: var(--pulse); border-color: var(--pulse); box-shadow: 0 0 0 5px var(--pulse-soft); }
.role h3 { font-size: 26px; letter-spacing: -0.02em; }
.role .org { color: var(--muted); margin: 4px 0 12px; font-size: 17px; }
.role ul li { position: relative; padding-left: 18px; margin-bottom: 6px; max-width: 62ch; }
.role ul li::before { content: ""; position: absolute; left: 0; top: .7em; width: 7px; height: 2px; background: var(--muted); }
.creds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; margin-top: 48px; padding-top: 48px; border-top: 1px solid var(--rule); }
.creds h3 { font-size: 26px; margin-bottom: 16px; letter-spacing: -0.02em; }
.creds li { padding: 12px 0; border-top: 1px solid var(--rule); }
.creds li span { display: block; color: var(--muted); font-size: 15px; }

/* ---------- About ---------- */
.about { border-top: 1px solid var(--rule); }
.about-big { font-size: clamp(32px, 5vw, 68px); line-height: 1.08; letter-spacing: -0.035em; font-weight: 700; max-width: 18ch; margin-bottom: 40px; }
.about-big .accent { color: var(--pulse); }
.about-small { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
.about-small p { font-size: 19px; color: var(--muted); max-width: 48ch; margin: 0; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); }
.contact h2 { font-size: clamp(48px, 7vw, 100px); letter-spacing: -0.05em; line-height: .92; }
.contact .sub { color: var(--muted); margin: 22px 0 32px; max-width: 36ch; font-size: 19px; }
.contact-links li { border-top: 1px solid var(--rule-sky); }
.contact-links li:last-child { border-bottom: 1px solid var(--rule-sky); }
.contact-links a { display: flex; justify-content: space-between; padding: 15px 0; text-decoration: none; transition: padding .3s var(--ease); }
.contact-links a span { color: var(--muted); }
.contact-links a:hover { padding-left: 10px; }
.contact-links a:hover strong { color: var(--pulse); }
.contact-links strong { font-weight: 600; }
form { display: grid; gap: 18px; }
label { display: grid; gap: 8px; font-size: 15px; color: var(--muted); }
input, textarea { font: inherit; font-size: 17px; color: var(--ink); background: #fff; border: 1.5px solid var(--rule-sky); border-radius: 12px; padding: 14px 16px; width: 100%; }
input:focus, textarea:focus { outline: none; border-color: var(--pulse); box-shadow: 0 0 0 3px #2b4bee33; }
textarea { min-height: 150px; resize: vertical; }
.hidden { position: absolute; left: -9999px; }
form .btn { justify-self: start; }

.site-footer { font-size: 15px; color: var(--muted); }
.site-footer .wrap { display: flex; justify-content: space-between; padding-top: 28px; padding-bottom: 36px; gap: 16px; flex-wrap: wrap; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ink); }

/* ---------- Case study page ---------- */
.case-hero { padding: clamp(120px, 14vw, 170px) 0 clamp(40px, 6vw, 72px); }
.back { color: var(--muted); text-decoration: none; font-size: 16px; display: inline-flex; gap: 6px; margin-bottom: 36px; }
.back:hover { color: var(--ink); }
.case-hero h1 { font-size: clamp(72px, 14vw, 190px); letter-spacing: -0.06em; line-height: .86; }
.case-hero .lede { font-size: clamp(21px, 2.4vw, 28px); line-height: 1.35; max-width: 30ch; margin: 24px 0 32px; letter-spacing: -0.01em; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--ink); margin-top: 48px; }
.facts div { padding: 18px 20px 0 0; }
.facts div + div { padding-left: 20px; border-left: 1px solid var(--rule); }
.facts dt { color: var(--muted); font-size: 15px; margin-bottom: 4px; }
.facts dd { margin: 0; font-size: 17px; }
.case-block { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 32px; padding: clamp(48px, 7vw, 88px) 0; border-top: 1px solid var(--rule); }
.case-block h2 { font-size: clamp(28px, 3.4vw, 42px); letter-spacing: -0.03em; }
.case-block .text { max-width: 64ch; }
.case-block .text h3 { font-size: 20px; margin: 28px 0 8px; letter-spacing: -0.01em; }
.case-block .text ul li { position: relative; padding-left: 18px; margin-bottom: 8px; }
.case-block .text ul li::before { content: ""; position: absolute; left: 0; top: .7em; width: 7px; height: 2px; background: var(--pulse); }
.flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 28px 0 8px; }
.flow li { padding: 16px 16px 16px 0; border-top: 3px solid var(--pulse); position: relative; }
.flow li + li { padding-left: 16px; }
.flow li::before { content: ""; position: absolute; top: -8px; left: 0; width: 13px; height: 13px; border-radius: 50%; background: var(--pulse); }
.flow li + li::before { left: 16px; }
.flow strong { display: block; font-size: 17px; margin-bottom: 4px; }
.flow span { color: var(--muted); font-size: 15px; }
.thanks { min-height: 80vh; display: grid; align-content: center; }
.thanks h1 { font-size: clamp(56px, 10vw, 128px); letter-spacing: -0.05em; margin-bottom: 20px; }

/* Generic reveal */
.js .reveal { opacity: 0; transform: translateY(18px); filter: blur(6px); transition: opacity .8s var(--ease), transform .8s var(--ease), filter .8s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; filter: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .section-head, .about-small, .heapi-grid, .contact-grid { grid-template-columns: 1fr; }
  .section-head p { justify-self: start; }
  .role { grid-template-columns: 1fr; gap: 6px; }
  .role .when { text-align: left; padding-left: 32px; }
  .tl-fill { left: 0; }
  .phone { --rot: 0deg; width: min(300px, 100%); }
  .proj-top { flex-direction: column; gap: 14px; }
  .proj-art { position: relative; left: auto; top: auto; transform: rotate(var(--rot, -2deg)); margin: -40px auto 0; }
  .proj-stage { min-height: 0; display: block; }
  .big-name { text-align: left; }
  .orbit { display: none; }
  .skill-list { display: grid; gap: 0; border-top: 1px solid var(--rule-sky); }
  .skill-list li { padding: 18px 0 18px 26px; border-bottom: 1px solid var(--rule-sky); position: relative; }
  .skill-list li::before { content: ""; position: absolute; left: 0; top: 26px; width: 10px; height: 10px; border-radius: 50%; background: var(--pulse); }
  .skill-list h3 { font-size: 22px; margin-bottom: 4px; }
  .skill-list p { color: var(--muted); margin: 0; font-size: 16px; }
  .case-block { grid-template-columns: 1fr; gap: 14px; }
}
@media (max-width: 760px) {
  body { font-size: 17px; }
  .menu-toggle { display: inline-flex; background: none; border: 1.5px solid var(--ink); border-radius: 999px; padding: 7px 14px; font: inherit; font-size: 15px; color: var(--ink); }
  .nav { position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: flex-start; gap: 0; background: var(--paper); border-bottom: 1px solid var(--rule); padding: 8px var(--gutter) 20px; display: none; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; width: 100%; font-size: 18px; color: var(--ink); }
  .nav a:not(.btn)::after { display: none; }
  .nav .btn { width: auto; margin-top: 8px; }
  .creds, .facts, .flow { grid-template-columns: 1fr; }
  .facts div + div { padding-left: 0; border-left: none; border-top: 1px solid var(--rule); padding-top: 14px; }
  .facts div { padding-bottom: 14px; }
  .flow li, .flow li + li { padding-left: 24px; border-top: none; border-left: 3px solid var(--pulse); }
  .flow li::before, .flow li + li::before { top: 18px; left: -8px; }
  .card { box-shadow: 4px 4px 0 var(--ink); }
  .thread { display: none; }
  .beat { display: block; position: absolute; left: var(--gutter); right: var(--gutter); width: calc(100% - 2 * var(--gutter)); top: calc(clamp(80px, 10vw, 140px) / 2 - 24px); height: 48px; overflow: visible; pointer-events: none; }
  .beat path { fill: none; stroke: var(--pulse); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
  .beat { clip-path: inset(-40% 100% -40% 0); transition: clip-path 1.1s cubic-bezier(.6,.05,.25,1); }
  .beat circle { fill: var(--pulse); opacity: 0; transition: opacity .3s 1s; }
  .beat.in { clip-path: inset(-40% -2% -40% 0); }
  .beat.in circle { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .beat { clip-path: none !important; } .beat circle { opacity: 1 !important; }
  .js .reveal, .js .scrub .w, .js .big-name, .js .skill:not(.on) { opacity: 1 !important; filter: none !important; transform: none !important; }
  .phone, .call-btn::after, .status::before { animation: none; }
  .js .phone-wrap:not(.in) .situations li, .js .project:not(.in) .bars span, .js .project:not(.in) .senti i { opacity: 1; transform: none; }
}
