:root {
  --bg: #eef0f8;
  --ink: #0a0b1a;
  --muted: #5f6382;
  --soft: #9ea2bd;
  --dark: #06070f;
  --dark-2: #0d0f1d;
  --dark-line: #1d2036;
  --on-dark: #eef0ff;
  --on-dark-muted: #8b90b0;
  --accent: #5cf2d6;
  --violet: #6c63ff;
  --cyan: #38bdf8;
  --pink: #ff4fd8;
  --aurora: linear-gradient(100deg, #6c63ff 0%, #ff4fd8 45%, #5cf2d6 100%);
  --serif: "Newsreader", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --gutter: clamp(16px, 3vw, 40px);
  --ease: cubic-bezier(.2, .7, .1, 1);
  --pop: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, ol, pre { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--ink); }

.serif { font-family: var(--serif); font-weight: 500; letter-spacing: -0.02em; line-height: 1.05; }
.serif em { font-style: italic; font-weight: 400; }
.big { font-size: clamp(30px, 4.2vw, 60px); }
.huge { font-size: clamp(40px, 6vw, 88px); }
.mid { font-size: clamp(28px, 3vw, 44px); }
.small { font-size: clamp(13px, 1.05vw, 15px); color: var(--muted); }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: .02em; }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px var(--gutter);
  color: #fff; mix-blend-mode: difference;
  pointer-events: none;
  opacity: 0; transform: translateY(-8px);
  transition: opacity .8s var(--ease) .9s, transform .8s var(--ease) .9s;
}
.loaded .nav { opacity: 1; transform: none; }
.nav a { pointer-events: auto; }
.logo { font-family: var(--mono); font-weight: 500; font-size: 19px; letter-spacing: -0.02em; }
.logo-cur { animation: blink 1.1s steps(1) infinite; }
.nav nav { display: flex; align-items: center; gap: clamp(14px, 2vw, 28px); font-family: var(--mono); font-size: 13.5px; }
.nav nav a { position: relative; }
.nav nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1.5px;
  background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .35s var(--ease);
}
.nav nav a:hover::after { transform: scaleX(1); transform-origin: left; }

/* ---------- story / pinned stage ---------- */
.story { position: relative; height: 800vh; }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.track { position: absolute; inset: 0 auto 0 0; height: 100%; will-change: transform; }
.strings { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.string { fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.string.draw { stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.string.draw.go { stroke-dashoffset: 0; transition: stroke-dashoffset 3.2s cubic-bezier(.35, .1, .15, 1); }

.v-line { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linejoin: round; stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.v-fill { stroke: none; }
.v-fill.v1 { fill: #ff4fd8; }
.v-fill.v2 { fill: #6c63ff; }
.v-fill.v3 { fill: #5cf2d6; }
.v-line.v1 { stroke: #d93cbf; }
.v-line.v2 { stroke: #5148e0; }
.v-line.v3 { stroke: #1fc4a5; }
.v-label { font-family: var(--sans); font-size: 15px; font-weight: 500; fill: var(--ink); text-anchor: middle; dominant-baseline: middle; }

/* hero */
.hero { position: absolute; left: 0; top: 0; height: 100%; pointer-events: none; }
.hero > * { pointer-events: auto; }
.hero-title {
  position: absolute; left: var(--gutter); bottom: clamp(20px, 4vh, 40px);
  font-size: clamp(46px, 6.6vw, 108px); font-weight: 600; letter-spacing: -0.05em; line-height: .96;
}
.ln { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
.ln > span { display: block; transform: translateY(105%); transition: transform 1.1s var(--ease); }
.loaded .ln > span { transform: none; }
.ln:nth-child(2) > span { transition-delay: .08s; }
.ln:nth-child(2) > span { transition-delay: .1s; background: var(--aurora); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .04em; }

.hero-cta {
  position: absolute; right: var(--gutter); bottom: calc(clamp(20px, 4vh, 40px) + 34px); /* room for the Blip toggle */
  display: flex; flex-direction: column; align-items: flex-end; gap: 14px;
  opacity: 0; transform: translateY(14px); transition: opacity .9s var(--ease) .5s, transform .9s var(--ease) .5s;
}
.loaded .hero-cta { opacity: 1; transform: none; }
.hero-cta p { font-size: 14px; }
.btns { display: flex; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: clamp(130px, 12vw, 180px); height: 46px; padding: 0 22px; font-size: 14px; font-weight: 500;
  border: 1.5px solid var(--ink); transition: background .25s, color .25s, transform .25s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn-ghost:hover { background: var(--ink); color: var(--bg); }
.btn-solid { background: var(--ink); color: var(--bg); }
.btn-solid:hover { background: var(--aurora); color: #fff; border-color: transparent; }

/* track items: outer = position/anchor, inner = reveal */
.ti { position: absolute; left: 0; top: 0; }
.a-c { transform: translate(-50%, -50%); }
.a-l { transform: translate(0, -50%); }
.a-bl { transform: translate(0, -100%); }
.ti > div { transition: opacity .9s var(--ease), filter .9s var(--ease), transform .9s var(--ease); }
.ti:not(.in) > div { opacity: 0; filter: blur(10px); transform: translateY(16px); }

.note p { font-size: 14px; color: var(--muted); line-height: 1.35; padding-left: 58px; }
.note-arrow { position: absolute; left: -6px; top: 6px; width: 54px; fill: none; stroke: var(--muted); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }

.tinker > div { text-align: center; width: min(86vw, 560px); }
.tinker .big { margin: 8px 0 10px; }

.obj { z-index: 2; }
.obj > div { display: flex; flex-direction: column; align-items: center; }
.ill { width: clamp(68px, 8vw, 118px); height: auto; display: block; filter: drop-shadow(0 14px 18px rgba(10, 12, 40, .18)); transition: transform .5s var(--ease); }
.obj-lg .ill { width: clamp(84px, 9.5vw, 140px); }
.obj:hover .ill { transform: scale(1.12) rotate(-6deg); }
.bob { animation: bob 5s ease-in-out infinite; animation-delay: var(--d); }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-9px) rotate(2deg); } }
.cap {
  margin-top: 10px; font-family: var(--mono); font-size: 11px; color: var(--muted); white-space: nowrap;
  opacity: 0; transform: translateY(-4px); transition: opacity .3s, transform .3s var(--ease);
}
.obj:hover .cap { opacity: 1; transform: none; }
.caret { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.led { animation: led 1.6s ease-in-out infinite; }
@keyframes led { 50% { opacity: .25; } }
.dot { animation: typing 1.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); opacity: 1; } 30% { transform: translateY(-5px); opacity: .6; } }
.flame { transform-box: fill-box; transform-origin: top center; animation: flame .18s ease-in-out infinite alternate; }
@keyframes flame { to { transform: scaleY(.78); } }
.pulse { transform-box: fill-box; transform-origin: center; animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.18); } }
.beat { transform-box: fill-box; transform-origin: center; animation: beat 1.4s ease-in-out infinite; }
@keyframes beat { 0%, 30%, 100% { transform: scale(1); } 15% { transform: scale(1.06); } }
.spin { animation: spin 14s linear infinite; }
.obj:hover .spin { transform: none; }
@keyframes spin { to { rotate: 360deg; } }

.heart-h .huge { font-size: clamp(40px, 5.2vw, 80px); line-height: 1; }
.love-t > div { width: min(62vw, 270px); }
.love-t h3 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.love-t p { font-size: 14px; color: var(--muted); line-height: 1.45; }

.surp h2 { white-space: nowrap; color: var(--soft); }
.surp .ink { color: var(--ink); }
.surp h2:not(:has(.ink)) { color: var(--ink); }
.surp .dim { color: var(--soft); }
.lead-p > div { width: min(70vw, 340px); }
.lead-p p { font-size: 14px; color: var(--muted); }

/* timeline */
.tl { width: 210px; text-align: center; }
.tl.up { transform: translate(-50%, -100%); }
.tl.down { transform: translate(-50%, 0); }
.tl > div { display: flex; flex-direction: column; align-items: center; }
.tl p { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.tl p b { display: block; color: var(--ink); font-weight: 600; font-size: 13px; }
.tl .yr { font-family: var(--mono); font-size: 11px; color: var(--soft); margin-top: 4px; }
.tl .stem { display: block; position: relative; width: 1.4px; height: clamp(56px, 10vh, 92px); background: var(--muted); }
.tl.up .stem { margin: 12px 0 14px; }
.tl.down .stem { margin: 14px 0 12px; }
.tl .stem::after {
  content: ""; position: absolute; left: 50%; width: 7px; height: 7px;
  border-left: 1.4px solid var(--muted); border-top: 1.4px solid var(--muted);
}
.tl.up .stem::after { top: 0; transform: translate(-50%, 1px) rotate(45deg); }
.tl.down .stem::after { bottom: 0; transform: translate(-50%, -1px) rotate(225deg); }

.venn-t > div { text-align: center; width: min(90vw, 760px); }
.venn-t .big { font-size: clamp(28px, 3.4vw, 50px); margin-bottom: 8px; }

/* ---------- dark / work ---------- */
.dark { background: var(--dark); color: var(--on-dark); position: relative; z-index: 3; padding-bottom: 40px; overflow-x: clip; }
.dark .muted { color: var(--on-dark-muted); }
.dark .label { font-family: var(--mono); font-size: 12px; color: var(--on-dark-muted); letter-spacing: .02em; }

.wait { min-height: 62vh; display: grid; place-items: center; text-align: center; padding: 120px var(--gutter) 40px; }
.wait h2 { font-size: clamp(30px, 3.8vw, 56px); }

.tiles {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(6px, 1.2vw, 16px);
  padding: 0 var(--gutter); margin-bottom: clamp(60px, 10vh, 120px);
}
.tiles span {
  aspect-ratio: 1 / .78; display: grid; place-items: center;
  border: 1px solid var(--dark-line); border-radius: 4px;
  font-family: var(--sans); font-weight: 700; font-size: clamp(30px, 8.4vw, 128px); letter-spacing: -0.04em;
  color: transparent; transition: color .5s var(--ease), background .6s var(--ease), border-color .6s;
  transition-delay: calc(var(--i) * 110ms);
}
.tiles.in span { color: var(--on-dark); animation: tilePop .7s var(--ease) both; animation-delay: calc(var(--i) * 110ms); }
.tiles.in span:first-child { background: var(--accent); color: var(--ink); border-color: var(--accent); transition-delay: 0s, .9s, .9s; }
@keyframes tilePop { from { transform: translateY(24px) scale(.96); filter: blur(8px); } to { transform: none; filter: none; } }
.tiles span:hover { background: var(--dark-2); }
.tiles span:first-child:hover { background: var(--accent); }

.work-grid {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(28px, 4vw, 64px);
  padding: 0 var(--gutter);
}
.work-side { position: sticky; top: 96px; align-self: start; display: flex; flex-direction: column; gap: 18px; padding-bottom: 20px; }
.work-side .label { margin-top: 22px; }
.marks { display: flex; flex-wrap: wrap; gap: 14px 26px; align-items: baseline; }
.marks li { color: #e3e6f7; white-space: nowrap; }
.marks .m1 { font-family: var(--sans); font-weight: 700; font-size: 18px; letter-spacing: -0.03em; }
.marks .m2 { font-family: var(--serif); font-size: 21px; font-style: italic; }
.marks .m2 small { font-family: var(--mono); font-style: normal; font-size: 11px; color: var(--on-dark-muted); }
.marks .m3 { font-family: var(--sans); font-weight: 800; font-size: 19px; letter-spacing: .02em; }
.marks .m4 { font-family: var(--mono); font-size: 15px; }
.marks .m5 { font-family: var(--serif); font-weight: 500; font-size: 22px; letter-spacing: -0.02em; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: transparent; border: 1px solid var(--dark-line); padding: 8px 14px; font-size: 13px; cursor: pointer;
  transition: background .25s, color .25s, border-color .25s;
}
.chip:hover { border-color: #474b6b; }
.chip.on { background: var(--on-dark); color: var(--ink); border-color: var(--on-dark); }

.work-list { display: flex; flex-direction: column; gap: 22px; }
.card {
  display: block; background: var(--dark-2); border: 1px solid var(--dark-line); overflow: hidden;
  transition: border-color .3s, transform .5s var(--ease);
}
.card:hover { border-color: #2f3352; }
.card.hide { display: none; }
.card-info { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 14px; }
.ci-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.kicker { font-family: var(--mono); font-size: 11.5px; color: var(--on-dark-muted); margin-bottom: 6px; }
.card h3 { font-family: var(--serif); font-weight: 500; font-size: clamp(24px, 2.2vw, 32px); letter-spacing: -0.02em; line-height: 1.1; }
.arr { display: inline-block; font-family: var(--sans); font-size: .6em; transition: transform .3s var(--ease); }
.card:hover .arr { transform: translate(3px, -3px); }
.impact { flex: none; font-family: var(--mono); font-size: 11.5px; color: #fff; background: var(--aurora); padding: 5px 9px; white-space: nowrap; }
.card-info > p { color: #c3c6dc; font-size: 14.5px; }
.wins { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.wins li { font-size: 13px; color: var(--on-dark); padding-left: 16px; position: relative; }
.wins li::before { content: "✦"; position: absolute; left: 0; color: var(--accent); font-size: 11px; top: 1px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { font-family: var(--mono); font-size: 11.5px; color: var(--on-dark-muted); border: 1px solid var(--dark-line); padding: 4px 9px; }

.mock { height: clamp(220px, 24vw, 300px); position: relative; overflow: hidden; }

/* chat mock */
.mock-chat { background: radial-gradient(120% 90% at 10% 0%, #1b2456 0%, #0b0e22 60%); display: flex; flex-direction: column; padding: 16px 18px 14px; gap: 10px; }
.mc-head { display: flex; align-items: center; gap: 10px; }
.mc-head .av { width: 32px; height: 32px; border-radius: 50%; background: #38bdf8; display: grid; place-items: center; font-weight: 700; color: #04203a; }
.mc-head b { display: block; font-size: 13px; }
.mc-head small { font-size: 11px; color: #7fd0ff; }
.mc-body { flex: 1; display: flex; flex-direction: column; gap: 6px; justify-content: flex-end; }
.b { max-width: 76%; font-size: 12.5px; padding: 7px 11px; border-radius: 12px; opacity: 0; transform: translateY(8px); }
.b.in { align-self: flex-start; background: #1e2340; border-bottom-left-radius: 3px; }
.b.out { align-self: flex-end; background: #5148e0; border-bottom-right-radius: 3px; }
.card.seen .b { animation: msg 9s var(--ease) infinite; }
.card.seen .b:nth-child(2) { animation-delay: .9s; }
.card.seen .b:nth-child(3) { animation-delay: 1.8s; }
.card.seen .b:nth-child(4) { animation-delay: 2.7s; }
@keyframes msg { 0% { opacity: 0; transform: translateY(8px); } 6%, 88% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; transform: none; } }
.mc-flow { display: flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 10.5px; color: #a5d8ff; }
.mc-flow span { border: 1px solid #2a3566; padding: 3px 7px; background: #0b0e22; }
.mc-flow i { flex: 1; height: 1px; background: linear-gradient(90deg, #2a3566, #5cf2d6, #2a3566); background-size: 200% 100%; animation: flow 1.6s linear infinite; }
@keyframes flow { to { background-position: -200% 0; } }

/* pipeline mock */
.mock-pipe { background: radial-gradient(100% 120% at 100% 0%, #2a1f5c 0%, #121019 65%); display: grid; place-items: center; padding: 24px; }
.pipe { position: relative; display: grid; grid-template-columns: repeat(3, auto); gap: 14px 18px; justify-content: center; }
.pipe span { font-family: var(--mono); font-size: 12px; padding: 10px 14px; border: 1px solid #3b3366; background: #17142a; text-align: center; position: relative; z-index: 1; }
.pipe span.hl { border-color: var(--violet); box-shadow: 0 0 0 4px rgba(108, 99, 255, .18); }
.packet { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); z-index: 2; offset-path: inset(-6px round 8px); animation: packet 4.5s linear infinite; }
@keyframes packet { to { offset-distance: 100%; } }
.mock-pipe .mono { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; color: #a99dff; }

/* browser mock */
.mock-web { background: linear-gradient(160deg, #e8ebff, #d3d9ff); padding: 18px 22px 0; }
.bw-bar { display: flex; align-items: center; gap: 6px; background: #fff; padding: 8px 10px; border-radius: 10px 10px 0 0; }
.bw-bar i { width: 9px; height: 9px; border-radius: 50%; background: #d6daf0; }
.bw-bar span { margin-left: 10px; font-family: var(--mono); font-size: 10.5px; color: #6e7398; background: #eef0fb; padding: 3px 12px; border-radius: 6px; }
.bw-bar.dark { background: #14172b; border-radius: 0; }
.bw-bar.dark i { background: #2f3352; }
.bw-bar.dark span { background: #23263f; color: #8b90b0; }
.bw-page { background: #fbfcff; height: 100%; padding: 14px 18px; display: flex; flex-direction: column; gap: 14px; color: #1c2150; }
.bw-nav { display: flex; align-items: center; gap: 10px; font-size: 12px; }
.bw-nav b { font-family: var(--serif); font-size: 15px; margin-right: auto; }
.bw-nav span { width: 30px; height: 5px; border-radius: 3px; background: #e0e4f7; }
.bw-nav em, .bw-hero em { font-style: normal; font-size: 10.5px; background: #6c63ff; color: #fff; padding: 4px 10px; border-radius: 20px; }
.bw-hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; align-items: center; }
.bw-hero > div:first-child { display: flex; flex-direction: column; gap: 7px; align-items: flex-start; }
.bw-hero span { display: block; height: 10px; border-radius: 5px; background: #1c2150; }
.bw-hero .l1 { width: 90%; } .bw-hero .l2 { width: 70%; } .bw-hero .l3 { width: 50%; height: 6px; background: #c5cbea; margin-bottom: 4px; }
.bw-img { height: 84px; border-radius: 10px; background: radial-gradient(circle at 30% 30%, #ff9be8, #6c63ff); }
.bw-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.bw-cards span { height: 46px; border-radius: 8px; background: #eceffc; }
.card:hover .bw-page { transform: translateY(-6px); }
.bw-page { transition: transform .6s var(--ease); }

/* terminal mock */
.mock-term { background: #0b0d1a; display: flex; flex-direction: column; }
.mock-term pre { padding: 18px; font-family: var(--mono); font-size: clamp(11px, 1vw, 13px); line-height: 1.9; color: #d6d6dc; white-space: pre-wrap; }
.mock-term .p { color: var(--accent); }
.mock-term .g { color: var(--violet); }
.cur { animation: blink 1s steps(1) infinite; color: var(--accent); }

.more {
  display: grid; place-items: center; height: 74px; border: 1px solid var(--dark-line); font-size: 14px;
  transition: background .3s, color .3s;
}
.more:hover { background: var(--accent); color: var(--ink); border-color: var(--accent); }

/* blocks */
.block { padding: clamp(90px, 14vh, 150px) var(--gutter) 0; }
.block-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 36px; max-width: 760px; }
.block-head .mid em { color: var(--on-dark-muted); }
.exp li { display: grid; grid-template-columns: minmax(150px, 2fr) 7fr; gap: 24px; padding: 28px 0; border-top: 1px solid var(--dark-line); }
.exp li:last-child { border-bottom: 1px solid var(--dark-line); }
.when { font-family: var(--mono); font-size: 12px; color: var(--on-dark-muted); padding-top: 6px; }
.exp h3 { font-family: var(--serif); font-weight: 500; font-size: clamp(22px, 2vw, 28px); letter-spacing: -0.02em; }
.org { font-size: 13px; color: var(--accent); margin: 4px 0 12px; }
.exp ul li { display: block; border: 0; padding: 0 0 0 18px; position: relative; color: #c3c6dc; font-size: 14.5px; margin-bottom: 6px; grid-template-columns: none; }
.exp ul li:last-child { border: 0; }
.exp ul li::before { content: "›"; position: absolute; left: 0; color: var(--on-dark-muted); }

.stack { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; background: var(--dark-line); border: 1px solid var(--dark-line); }
.stack > div { background: var(--dark); padding: 22px 20px 26px; }
.stack .mono { color: var(--accent); margin-bottom: 14px; }
.stack ul { display: flex; flex-direction: column; gap: 7px; }
.stack li { font-size: 14.5px; color: #d9dcf0; }

.certs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.certs a {
  display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; column-gap: 12px;
  padding: 20px 22px; border: 1px solid var(--dark-line); background: var(--dark-2); transition: border-color .3s, background .3s;
}
.certs span { font-size: 16px; font-weight: 500; }
.certs small { grid-row: 2; font-family: var(--mono); font-size: 11.5px; color: var(--on-dark-muted); margin-top: 4px; }
.certs b { grid-row: 1 / 3; grid-column: 2; align-self: center; font-weight: 400; transition: transform .3s var(--ease); }
.certs a:hover { border-color: var(--accent); }
.certs .cert-feature { grid-column: 1 / -1; }
.cert-feature a { border-color: rgba(255, 153, 0, .45); background: linear-gradient(100deg, rgba(255, 153, 0, .12), rgba(108, 99, 255, .08) 60%, var(--dark-2)); padding: 24px 24px; }
.cert-feature a:hover { border-color: #ff9900; }
.cert-feature span { font-size: 18px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.aws-tag { font-style: normal; font-family: var(--mono); font-size: 10.5px; font-weight: 500; color: #111; background: #ff9900; padding: 2px 7px; border-radius: 4px; }
.certs a:hover b { transform: translate(3px, -3px); color: var(--accent); }

.contact { padding: clamp(110px, 18vh, 190px) var(--gutter) 0; }
.contact .huge em { background: var(--aurora); -webkit-background-clip: text; background-clip: text; color: transparent; }
.straight { display: block; width: 100%; height: 40px; margin: 40px 0 36px; fill: none; stroke: var(--on-dark); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.straight path { stroke-dasharray: 1 1; stroke-dashoffset: 1; transition: stroke-dashoffset 2.2s var(--ease), d 1.4s var(--ease) 1.2s; }
.straight.in path { stroke-dashoffset: 0; d: path("M0 20 C 120 20, 220 20, 340 20 S 560 20, 1000 20"); }
.mail { display: inline-block; font-family: var(--serif); font-size: clamp(26px, 4vw, 56px); letter-spacing: -0.02em; border-bottom: 1.5px solid var(--dark-line); transition: border-color .3s, color .3s; overflow-wrap: anywhere; }
.mail:hover { color: var(--accent); border-color: var(--accent); }
.socials { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 28px; font-size: 14px; color: var(--on-dark-muted); }
.socials a:hover { color: var(--on-dark); }
.fine { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: clamp(80px, 14vh, 140px); padding-top: 20px; border-top: 1px solid var(--dark-line); font-family: var(--mono); font-size: 11.5px; color: var(--on-dark-muted); }
.live { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-left: 6px; box-shadow: 0 0 0 0 rgba(92, 242, 214, .6); animation: live 2s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 8px rgba(92, 242, 214, 0); } 100% { box-shadow: 0 0 0 0 rgba(92, 242, 214, 0); } }

/* ---------- tech layer ---------- */
.kbtn {
  pointer-events: auto; cursor: pointer; background: transparent; border: 1px solid currentColor; border-radius: 6px;
  padding: 3px 8px; font-family: var(--mono); font-size: 12px; line-height: 1.4; transition: background .2s, color .2s;
}
.kbtn:hover { background: #fff; color: #000; }
.k-mod { margin-right: 2px; }
.k-sm { display: none; }

.term {
  position: absolute; left: var(--gutter); top: 15%; width: clamp(300px, 31vw, 450px);
  background: linear-gradient(180deg, #121528, #0b0d1a); color: #e2e5f7; border-radius: 12px;
  font-family: var(--mono); font-size: 12.5px; line-height: 1.75;
  box-shadow: 0 30px 60px -20px rgba(8, 10, 35, .45), 0 0 0 1px rgba(255, 255, 255, .06) inset;
  opacity: 0; transform: translateY(14px) scale(.98); transition: opacity .8s var(--ease) .15s, transform .8s var(--ease) .15s;
}
.loaded .term { opacity: 1; transform: none; }
.term-bar { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-bottom: 1px solid #1f2238; }
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; }
.term-bar i:nth-child(2) { background: #febc2e; }
.term-bar i:nth-child(3) { background: #28c840; }
.term-bar span { margin-left: auto; margin-right: auto; font-size: 11px; color: #7f84a6; transform: translateX(-18px); }
.term-body { padding: 12px 16px 14px; }
.term-body p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: opacity .35s, transform .35s var(--ease); }
.term-body p:not(.on) { opacity: 0; transform: translateY(4px); }
.term .pr { color: var(--accent); }
.term .g { color: #9d85ff; }
.term .ok { color: var(--accent); }
.term .dots { color: #4a4e6e; }
.typed::after { content: "▍"; color: var(--accent); animation: blink 1s steps(1) infinite; }
.typed.done::after { content: ""; }
.spin-ch { color: var(--accent); }
.cursor-pt { display: inline-block; width: 1px; height: 1px; }

.signal { fill: none; stroke: var(--pink); stroke-width: 3.4; stroke-linecap: round; stroke-dasharray: 1.5 118; opacity: 0; transition: opacity 1s; }
.strings.streaming .signal { opacity: .9; animation: signal 2.2s linear infinite; }
@keyframes signal { to { stroke-dashoffset: -119.5; } }

.live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #5cf2d6; margin-right: 8px; vertical-align: 1px; box-shadow: 0 0 0 3px rgba(92, 242, 214, .22); }
.mono-in { font-family: var(--mono); margin-right: 6px; opacity: .55; }
.btn-ghost { font-family: var(--mono); font-size: 13px; }

.step { display: block; font-family: var(--mono); font-size: 11.5px; letter-spacing: .02em; color: var(--violet); margin-bottom: 10px; }
.note .step { margin-bottom: 4px; }
.note em { font-style: normal; color: var(--soft); font-size: 12.5px; }
.pid { display: block; font-family: var(--mono); font-size: 10.5px; font-weight: 400; color: var(--violet); margin-bottom: 3px; }
.build-log { font-family: var(--mono); font-size: 13px; line-height: 1.8; color: var(--on-dark-muted); margin-bottom: 18px; }
.build-log .pr, .build-log .ok { color: var(--accent); }

/* command palette */
.palette { position: fixed; inset: 0; z-index: 100; display: grid; justify-items: center; align-items: start; padding: 16vh 16px 16px; }
.palette[hidden] { display: none; }
.pal-scrim { position: absolute; inset: 0; background: rgba(8, 8, 10, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fadeIn .2s ease; }
.pal-box {
  position: relative; width: min(580px, 100%); background: #0d0f1f; color: var(--on-dark); border: 1px solid #23263f; border-radius: 14px;
  box-shadow: 0 40px 90px -20px rgba(0, 0, 0, .7); overflow: hidden; font-family: var(--mono); animation: palIn .25s var(--ease);
}
@keyframes fadeIn { from { opacity: 0; } }
@keyframes palIn { from { opacity: 0; transform: translateY(-10px) scale(.98); } }
.pal-in { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid #1c1f35; color: var(--accent); font-size: 16px; }
.pal-in input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: var(--on-dark); font: inherit; font-size: 15px; }
.pal-in input::placeholder { color: #61668a; }
.pal-in kbd { font-family: var(--mono); font-size: 11px; color: #7f84a6; border: 1px solid #2a2d47; border-radius: 5px; padding: 2px 6px; }
.pal-list { max-height: min(52vh, 420px); overflow-y: auto; padding: 8px; }
.pal-group { font-size: 10.5px; color: #61668a; padding: 10px 10px 4px; text-transform: uppercase; letter-spacing: .08em; }
.pal-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; cursor: pointer; font-size: 13.5px; color: #d8d8dd; }
.pal-item .ic { width: 18px; text-align: center; color: #7f84a6; }
.pal-item .hint { margin-left: auto; font-size: 11px; color: #61668a; }
.pal-item[aria-selected="true"] { background: #1a1d33; color: #fff; }
.pal-item[aria-selected="true"] .ic { color: var(--accent); }
.pal-empty { padding: 18px 12px; font-size: 13px; color: #7f84a6; }
.pal-foot { display: flex; gap: 16px; padding: 10px 18px; border-top: 1px solid #1c1f35; font-size: 11px; color: #61668a; }
.pal-msg { margin-left: auto; color: var(--accent); }

/* ---------- the trail down the dark section + the bots on it ---------- */
.dark > :not(.trail):not(.trail-head):not(.bot) { position: relative; z-index: 1; }
.tiles span { background: var(--dark); }
.trail { position: absolute; left: 0; top: 0; z-index: 0; overflow: visible; pointer-events: none; }
.trail-line { fill: none; stroke: #c9cffb; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.trail-head {
  position: absolute; left: 0; top: 0; z-index: 2; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 4px rgba(92, 242, 214, .18), 0 0 18px 2px rgba(92, 242, 214, .55);
  pointer-events: none; opacity: 0; transition: opacity .3s;
}
.trail-head.on { opacity: 1; }

.bot { position: absolute; left: 0; top: 0; z-index: 3; width: 58px; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; }
.bot-ill { width: 100%; height: auto; display: block; overflow: visible; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .45)); transform-origin: 50% 90%; }
.bot:not(.in) .bot-ill { transform: scale(0) rotate(-20deg); }
.bot.in .bot-ill { animation: botPop .7s cubic-bezier(.3, 1.6, .5, 1) both, botBob 3.2s ease-in-out .7s infinite; }
@keyframes botPop { from { transform: scale(0) rotate(-20deg); } to { transform: none; } }
@keyframes botBob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-6px) rotate(-3deg); } }
.bot .eyes { transform-box: fill-box; transform-origin: center; animation: botBlink 4.2s infinite; }
@keyframes botBlink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
.bot .ant { transform-box: fill-box; transform-origin: 50% 100%; animation: antWiggle 2.4s ease-in-out infinite; }
@keyframes antWiggle { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(8deg); } }
.bname { margin-top: 6px; font-family: var(--mono); font-size: 10.5px; color: var(--on-dark-muted); opacity: 0; transition: opacity .4s .3s; white-space: nowrap; }
.bot.in .bname { opacity: 1; }
.bubble {
  position: absolute; top: 8px; left: calc(100% + 8px); white-space: nowrap;
  background: var(--on-dark); color: var(--ink); font-family: var(--mono); font-size: 11.5px; padding: 6px 10px; border-radius: 3px 10px 10px 10px;
  opacity: 0; transform: translateX(-6px) scale(.9); transform-origin: 0 0; transition: opacity .3s, transform .35s var(--ease); pointer-events: none;
}
.bot.talk .bubble, .bot:hover .bubble { opacity: 1; transform: none; }
.bot.flip .bubble { left: auto; right: calc(100% + 8px); transform: translateX(6px) scale(.9); transform-origin: 100% 0; border-radius: 10px 3px 10px 10px; }
.bot.flip.talk .bubble, .bot.flip:hover .bubble { transform: none; }

/* scroll reveal (dark section) */
/* Apple-style: content rises in slightly scaled-down, then settles with a soft spring */
.reveal { transition: opacity 1.1s var(--pop), transform 1.2s var(--pop), filter 1s var(--pop); transform-origin: 50% 100%; }
.reveal:not(.in) { opacity: 0; transform: translateY(56px) scale(.94); filter: blur(8px); }
.work-list .reveal:nth-child(even) { transition-delay: .06s; }
.stack .reveal:nth-child(2), .certs .reveal:nth-child(2) { transition-delay: .08s; }
.stack .reveal:nth-child(3) { transition-delay: .16s; }
.stack .reveal:nth-child(4) { transition-delay: .24s; }
.stack .reveal:nth-child(5) { transition-delay: .32s; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .work-grid { grid-template-columns: 1fr; }
  .work-side { position: static; }
  .stack { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stack > div:last-child { grid-column: 1 / -1; }
  .certs { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 14px; }
  .bot { width: 44px; }
  .nav { padding: 18px var(--gutter); }
  .logo { font-size: 22px; }
  .nav nav { font-size: 12.5px; gap: 12px; }
  .hide-sm { display: none; }
  .k-lg { display: none; }
  .k-sm { display: inline; }
  .term { left: var(--gutter); right: var(--gutter); width: auto; top: 76px; font-size: 11.5px; }
  .hero-title { top: auto; bottom: 226px; } /* sits just above the tagline + buttons */
  .hero-cta { left: var(--gutter); right: var(--gutter); align-items: stretch; bottom: 122px; } /* Blip parks below */
  .hero-cta p { text-align: left; }
  .btns .btn { flex: 1; min-width: 0; }
  .exp li { grid-template-columns: 1fr; gap: 8px; }
  .when { padding-top: 0; }
  .ci-top { flex-direction: column; gap: 10px; }
  .pipe { grid-template-columns: repeat(2, auto); }
  .mc-flow span:nth-of-type(3), .mc-flow i:nth-of-type(3) { display: none; }
  .tl { width: 168px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Blip, the pixel alien guide ---------- */
.pix { position: fixed; left: 0; top: 0; z-index: 140; pointer-events: none; will-change: transform; transform-origin: 36px 40px; }
.pix canvas { display: block; width: 72px; height: 72px; image-rendering: pixelated; pointer-events: auto; cursor: pointer; filter: drop-shadow(0 8px 14px rgba(108, 99, 255, .45)); transition: filter .15s; }
.pix.glitch canvas { filter: drop-shadow(3px 0 0 rgba(255, 79, 216, .85)) drop-shadow(-3px 0 0 rgba(56, 189, 248, .85)) drop-shadow(0 8px 14px rgba(108, 99, 255, .45)); }
.pix-fx { position: fixed; inset: 0; z-index: 139; pointer-events: none; image-rendering: pixelated; }
.pix-say {
  position: fixed; left: 0; top: 0; z-index: 141; pointer-events: none; max-width: 250px;
  font-family: var(--mono); font-size: 11.5px; line-height: 1.45; color: var(--ink); background: #fff;
  border: 2px solid var(--ink); padding: 8px 11px; box-shadow: 4px 4px 0 var(--violet), 8px 8px 0 var(--pink);
  opacity: 0; transition: opacity .25s; will-change: transform;
}
.pix-say.on { opacity: 1; }
.pix-say::after {
  content: ""; position: absolute; left: 14px; bottom: -6px; width: 8px; height: 8px; background: #fff;
  border-left: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(-45deg);
}
.pix-say.r::after { left: auto; right: 14px; }
.pix-say.b::after { bottom: auto; top: -6px; transform: rotate(135deg); }
.pix-toggle {
  position: fixed; right: 14px; bottom: 14px; z-index: 142; cursor: pointer;
  font-family: var(--mono); font-size: 11px; color: #8b90b0; background: rgba(13, 15, 29, .85);
  border: 1px solid #23263f; border-radius: 7px; padding: 6px 10px; transition: color .2s;
}
.pix-toggle:hover { color: #fff; }
