/* ==========================================================================
   Aniket Murkutkar · portfolio
   Dark-first theme; [data-theme="light"] on <html> switches tokens.
   ========================================================================== */

:root {
  --bg: #07080c;
  --bg-elev: #0c0e14;
  --surface: rgba(255, 255, 255, .035);
  --surface-2: rgba(255, 255, 255, .06);
  --surface-solid: #10121a;
  --border: rgba(255, 255, 255, .08);
  --border-strong: rgba(255, 255, 255, .15);
  --text: #eef0f6;
  --muted: #a4a9b9;
  --faint: #6d7285;
  --teal: #3ddbb1;
  --blue: #7c9cff;
  --violet: #b18cff;
  --grad: linear-gradient(110deg, #3ddbb1 0%, #7c9cff 52%, #b18cff 100%);
  --on-grad: #06080d;
  --glow-teal: rgba(61, 219, 177, .18);
  --glow-blue: rgba(124, 156, 255, .18);
  --chip: rgba(255, 255, 255, .055);
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, .75);
  --shadow-sm: 0 10px 30px -12px rgba(0, 0, 0, .6);
  --grid-dot: rgba(255, 255, 255, .07);
  --app-bg: #0c0e14;          /* DocuMind's own background */
  --app-panel: #141824;
  --app-accent: #7c9cff;
  --radius: 22px;
  --radius-sm: 14px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", monospace;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f6f7fb;
  --bg-elev: #ffffff;
  --surface: rgba(255, 255, 255, .72);
  --surface-2: rgba(12, 16, 32, .045);
  --surface-solid: #ffffff;
  --border: rgba(12, 16, 32, .09);
  --border-strong: rgba(12, 16, 32, .17);
  --text: #10131c;
  --muted: #4f566b;
  --faint: #868da1;
  --teal: #0b9b77;
  --blue: #4566f0;
  --violet: #8250f0;
  --grad: linear-gradient(110deg, #0b9b77 0%, #4566f0 52%, #8250f0 100%);
  --on-grad: #ffffff;
  --glow-teal: rgba(11, 155, 119, .14);
  --glow-blue: rgba(69, 102, 240, .14);
  --chip: rgba(12, 16, 32, .05);
  --shadow: 0 30px 70px -32px rgba(20, 26, 50, .35);
  --shadow-sm: 0 10px 28px -14px rgba(20, 26, 50, .3);
  --grid-dot: rgba(12, 16, 32, .09);
  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .3s, color .3s;
}
/* film grain for depth */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }
strong, b { font-weight: 600; color: var(--text); }
::selection { background: var(--glow-blue); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 28px; }
/* let grid/flex children shrink below their content (wide media, scrolling strips) */
.hero-layout > *, .video-showcase > *, .replay-grid > *, .built-grid > *, .about > *, .project-head > * { min-width: 0; }
.ic { width: 18px; height: 18px; flex: none; }
.grad-text {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  font-style: italic; padding-right: .06em;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 46px; padding: 0 20px; border-radius: 12px;
  font-size: 15px; font-weight: 500; white-space: nowrap;
  background: var(--surface); border: 1px solid var(--border-strong); color: var(--text);
  transition: transform .18s ease, border-color .18s, background-color .18s, box-shadow .18s;
}
.btn:hover { transform: translateY(-2px); border-color: var(--faint); background: var(--surface-2); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--grad); color: var(--on-grad); border-color: transparent; font-weight: 600;
  box-shadow: 0 8px 30px -10px var(--glow-blue);
}
.btn-primary:hover { background: var(--grad); border-color: transparent; box-shadow: 0 12px 34px -8px var(--glow-blue); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 11px; display: inline-grid; place-items: center;
  border: 1px solid var(--border); background: var(--surface); color: var(--muted);
  transition: color .18s, border-color .18s, transform .18s;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); transform: translateY(-1px); }

/* ---------- Progress + nav ---------- */
.progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 100%; z-index: 60;
  background: var(--grad); transform-origin: 0 50%; transform: scaleX(0);
}
.nav {
  position: fixed; top: 14px; left: 0; right: 0; z-index: 50; padding: 0 16px;
  pointer-events: none;
}
.nav-inner {
  pointer-events: auto; max-width: 1180px; margin: 0 auto; height: 60px; padding: 0 10px 0 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  border-radius: 18px; border: 1px solid transparent;
  transition: background-color .3s, border-color .3s, box-shadow .3s;
}
.nav.scrolled .nav-inner {
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-color: var(--border);
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: var(--shadow-sm);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; letter-spacing: -.01em; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center;
  font: 600 12.5px var(--mono); color: var(--on-grad); background: var(--grad);
}
.nav-links { display: flex; gap: 4px; }
.nav-links a {
  padding: 8px 14px; border-radius: 10px; font-size: 14px; color: var(--muted);
  transition: color .18s, background-color .18s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); background: var(--surface-2); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.ic-moon { display: none; }
:root[data-theme="light"] .ic-sun { display: none; }
:root[data-theme="light"] .ic-moon { display: block; }
.menu-btn { display: none; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); transition-delay: var(--d, 0ms); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Spotlight (cursor-follow glow) ---------- */
.spot { position: relative; isolation: isolate; }
.spot::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), var(--glow-blue), transparent 60%);
  opacity: 0; transition: opacity .35s;
}
.spot:hover::before { opacity: 1; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { position: relative; padding: 150px 0 0; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-grid-bg {
  position: absolute; inset: 0;
  background-image: radial-gradient(var(--grid-dot) 1.2px, transparent 1.2px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse 75% 60% at 50% 30%, #000 30%, transparent 80%);
          mask-image: radial-gradient(ellipse 75% 60% at 50% 30%, #000 30%, transparent 80%);
}
.blob { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .9; will-change: transform; }
.b1 { width: 520px; height: 520px; left: -140px; top: -120px; background: var(--glow-teal); animation: drift1 18s ease-in-out infinite alternate; }
.b2 { width: 560px; height: 560px; right: -160px; top: -60px; background: var(--glow-blue); animation: drift2 22s ease-in-out infinite alternate; }
.b3 { width: 420px; height: 420px; left: 40%; top: 260px; background: rgba(177, 140, 255, .12); animation: drift1 26s ease-in-out infinite alternate-reverse; }
@keyframes drift1 { to { transform: translate(80px, 60px) scale(1.08); } }
@keyframes drift2 { to { transform: translate(-90px, 70px) scale(1.1); } }

.hero-layout { display: grid; grid-template-columns: 1.08fr .92fr; gap: 56px; align-items: center; }
.status {
  display: inline-flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--muted);
  padding: 7px 14px 7px 12px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface);
  transition: border-color .2s, color .2s;
}
.status:hover { color: var(--text); border-color: var(--border-strong); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 0 var(--teal); animation: pulse 2.2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(61, 219, 177, .55); } 70%, 100% { box-shadow: 0 0 0 9px rgba(61, 219, 177, 0); } }
.display {
  font-family: var(--serif); font-weight: 400; letter-spacing: -.022em; line-height: 1.0;
  font-size: clamp(48px, 7.2vw, 92px); margin: 26px 0 24px;
}
.lede { font-size: clamp(16.5px, 1.7vw, 19px); color: var(--muted); max-width: 590px; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 34px; }
.socials { display: flex; gap: 8px; margin-left: 4px; }
.socials .icon-btn { width: 46px; height: 46px; border-radius: 12px; }

/* Terminal */
.hero-side { min-width: 0; }
.term {
  border-radius: 18px; overflow: hidden; border: 1px solid var(--border-strong);
  background: rgba(10, 12, 18, .82); box-shadow: var(--shadow);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  color: #dfe3ee; font: 13.5px/1.7 var(--mono);
}
:root[data-theme="light"] .term { background: #0e1118; }
.term-bar { display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 14px; border-bottom: 1px solid rgba(255,255,255,.07); background: rgba(255,255,255,.03); }
.dots { display: inline-flex; gap: 7px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.dots i:nth-child(2) { background: #febc2e; }
.dots i:nth-child(3) { background: #28c840; }
.term-title { color: #8b91a3; font-size: 12.5px; }
.term-hint { margin-left: auto; font-size: 11px; color: #3ddbb1; border: 1px solid rgba(61,219,177,.35); padding: 1px 8px; border-radius: 99px; }
.term-body { height: 300px; overflow-y: auto; padding: 16px 18px 6px; scrollbar-width: thin; scrollbar-color: #2a2f3d transparent; }
.term-body .line { white-space: pre-wrap; word-break: break-word; }
.term-body .cmd::before { content: "❯ "; color: #3ddbb1; }
.term-body .out { color: #a9b0c2; }
.term-body .hl { color: #7c9cff; }
.term-body .ok { color: #3ddbb1; }
.term-body .warn { color: #febc2e; }
.term-body a { color: #b18cff; text-decoration: underline; text-decoration-color: rgba(177,140,255,.4); text-underline-offset: 3px; }
.term-body .typing::after { content: "▍"; color: #3ddbb1; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.term-input { display: flex; align-items: center; gap: 8px; padding: 10px 18px 14px; }
.term-input .prompt { color: #3ddbb1; }
.term-input input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: #eef0f6; font: inherit; caret-color: #3ddbb1; }
.term-input input::placeholder { color: #565c6e; }
.term-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.term-chips button {
  font: 12.5px var(--mono); color: var(--muted); padding: 6px 12px; border-radius: 99px;
  border: 1px solid var(--border); background: var(--surface); transition: color .18s, border-color .18s;
}
.term-chips button:hover { color: var(--text); border-color: var(--teal); }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 84px; }
.stat {
  border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius-sm);
  padding: 22px 22px 20px; display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 6px; overflow: hidden;
}
.stat dd { font-family: var(--serif); font-size: 46px; line-height: 1; letter-spacing: -.02em; }
.stat dd .count { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat dt { font-size: 13.5px; color: var(--muted); line-height: 1.45; }

/* Tech carousel (positions driven by JS so it can be dragged, nudged and paused) */
.skills-carousel { margin-top: 60px; padding: 22px 0 26px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.sc-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 16px; }
.sc-label { font: 500 12.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--teal); }
.sc-controls { display: flex; gap: 8px; }
.sc-controls .icon-btn { width: 36px; height: 36px; border-radius: 10px; }
.sc-row {
  overflow: hidden; padding: 6px 0; touch-action: pan-y; cursor: grab; user-select: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.sc-row + .sc-row { margin-top: 8px; }
.sc-row.dragging { cursor: grabbing; }
.sc-track { display: flex; gap: 12px; width: max-content; will-change: transform; }
.tech {
  display: inline-flex; align-items: center; gap: 11px; padding: 7px 18px 7px 7px; border-radius: 14px; white-space: nowrap;
  border: 1px solid var(--border); background: var(--surface); transition: border-color .2s, background-color .2s, transform .2s;
}
.tech:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--teal) 50%, transparent); background: var(--surface-2); }
.tech-logo { width: 38px; height: 38px; flex: none; border-radius: 10px; display: grid; place-items: center; background: #fff; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.tech-logo img { width: 24px; height: 24px; object-fit: contain; pointer-events: none; -webkit-user-drag: none; }
.tech-logo.alt { background: var(--grad); color: var(--on-grad); }
.tech-logo.alt .ic { width: 20px; height: 20px; }
.tech-name { font-size: 14.5px; font-weight: 500; }

/* ==========================================================================
   Sections
   ========================================================================== */
.section { padding: 130px 0 40px; }
.section-head { max-width: 720px; margin-bottom: 48px; }
.eyebrow { display: inline-block; font: 500 12.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--teal); margin-bottom: 14px; }
.section-head h2, .contact-card h2 {
  font-family: var(--serif); font-weight: 400; letter-spacing: -.015em; line-height: 1.05;
  font-size: clamp(38px, 5.2vw, 62px);
}
.section-head p { color: var(--muted); font-size: 17.5px; margin-top: 14px; }

/* ==========================================================================
   Projects
   ========================================================================== */
.project {
  position: relative; border-radius: 30px; padding: 40px; margin-bottom: 36px;
  border: 1px solid var(--border);
  background:
    radial-gradient(900px 300px at 0% 0%, var(--glow-teal), transparent 60%),
    radial-gradient(700px 300px at 100% 0%, var(--glow-blue), transparent 60%),
    var(--surface);
  background-size: 100% 100%;
  box-shadow: var(--shadow-sm);
}
.project::after { /* soft inner top highlight */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.05), transparent 120px);
}
.project > * { position: relative; z-index: 1; }
.project-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; margin-bottom: 30px; }
.project-intro { max-width: 700px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.tag { font: 500 12px var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--teal); padding: 5px 11px; border-radius: 99px; border: 1px solid color-mix(in srgb, var(--teal) 35%, transparent); background: color-mix(in srgb, var(--teal) 8%, transparent); }
.tag-soft { color: var(--blue); border-color: color-mix(in srgb, var(--blue) 35%, transparent); background: color-mix(in srgb, var(--blue) 8%, transparent); }
.tag-live { display: inline-flex; align-items: center; gap: 7px; color: var(--text); border-color: var(--border-strong); background: var(--surface-2); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #28c840; box-shadow: 0 0 0 3px rgba(40,200,64,.2); }
.project-title { font-family: var(--serif); font-weight: 400; font-size: clamp(40px, 5vw, 60px); line-height: 1; letter-spacing: -.02em; margin-bottom: 14px; }
.project-sub { color: var(--muted); font-size: 17px; }
.project-cta { display: flex; flex-direction: column; align-items: stretch; gap: 10px; min-width: 230px; }
.hint { font-size: 12.5px; color: var(--faint); line-height: 1.45; max-width: 240px; }
.fineprint { font-size: 12.5px; color: var(--faint); margin-top: 12px; }

/* Tabs */
.tabs { display: inline-flex; gap: 4px; padding: 5px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); margin-bottom: 22px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.tab { padding: 9px 16px; border-radius: 10px; font-size: 14px; font-weight: 500; color: var(--muted); white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; transition: color .18s, background-color .18s; }
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--text); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border-strong); }
.tab-badge { font: 500 10.5px var(--mono); color: var(--on-grad); background: var(--grad); padding: 2px 7px; border-radius: 99px; }
.tab-panel { animation: panelIn .45s ease; }
@keyframes panelIn { from { opacity: 0; transform: translateY(8px); } }

/* Browser frame */
.browser { border-radius: 16px; overflow: hidden; border: 1px solid var(--border-strong); background: var(--app-bg); box-shadow: var(--shadow); }
.browser-bar { display: flex; align-items: center; gap: 14px; height: 40px; padding: 0 14px; background: #121521; border-bottom: 1px solid rgba(255,255,255,.06); }
.browser-bar .url { flex: 1; max-width: 420px; margin: 0 auto; text-align: center; font: 12px var(--mono); color: #8a90a2; background: rgba(255,255,255,.05); padding: 5px 12px; border-radius: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Carousel */
.carousel-viewport { position: relative; overflow: hidden; aspect-ratio: 16 / 10; touch-action: pan-y; cursor: grab; }
.carousel-viewport.dragging { cursor: grabbing; }
.carousel-track { display: flex; height: 100%; transition: transform .7s cubic-bezier(.65,0,.25,1); }
.carousel-viewport.dragging .carousel-track { transition: none; }
.slide { flex: 0 0 100%; height: 100%; display: grid; place-items: center; padding: 18px; }
.slide img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 8px; cursor: zoom-in; user-select: none; -webkit-user-drag: none; transition: transform .5s ease; }
.slide img:hover { transform: scale(1.01); }
.carousel-ui { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-top: 20px; }
.carousel-caption { display: flex; gap: 16px; align-items: flex-start; min-height: 74px; max-width: 760px; }
.cap-step { font: 500 13px var(--mono); color: var(--teal); padding-top: 3px; }
.cap-title { display: block; font-size: 17px; margin-bottom: 2px; }
.cap-text { color: var(--muted); font-size: 15px; }
.carousel-caption.swap { animation: capIn .5s ease; }
@keyframes capIn { from { opacity: 0; transform: translateY(6px); } }
.carousel-controls { display: flex; align-items: center; gap: 12px; flex: none; }
.c-dots { display: flex; gap: 6px; }
.c-dots button { width: 9px; height: 9px; border-radius: 99px; background: var(--border-strong); transition: width .35s, background-color .35s; position: relative; overflow: hidden; }
.c-dots button[aria-current="true"] { width: 30px; background: var(--surface-2); }
.c-dots button[aria-current="true"]::after { content: ""; position: absolute; inset: 0; background: var(--grad); transform-origin: 0 50%; animation: dotfill var(--interval, 6500ms) linear forwards; }
.carousel.paused .c-dots button::after { animation-play-state: paused; }
@keyframes dotfill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Replay (the experiment) */
.replay-intro { color: var(--muted); font-size: 16px; max-width: 820px; margin-bottom: 18px; }
.q-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.q {
  text-align: left; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface);
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: "kind k" "text text"; gap: 4px 10px;
  transition: border-color .2s, background-color .2s, transform .2s;
}
.q:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.q[aria-pressed="true"] { border-color: color-mix(in srgb, var(--blue) 60%, transparent); background: color-mix(in srgb, var(--blue) 9%, transparent); }
.q-kind { grid-area: kind; font: 500 11.5px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--teal); }
.q-k { grid-area: k; font: 500 12px var(--mono); color: var(--blue); }
.q-text { grid-area: text; font-size: 14.5px; font-weight: 500; line-height: 1.4; }
.replay-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 18px; align-items: start; }

.dm-panel { border-radius: 16px; border: 1px solid #262c3d; background: var(--app-bg); padding: 18px; color: #e6e9f2; font-size: 14px; box-shadow: var(--shadow-sm); }
.dm-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.dm-logo { font-weight: 700; font-size: 18px; letter-spacing: -.01em; }
.dm-pill { font-size: 11.5px; font-weight: 600; color: #a9bcff; background: rgba(124,156,255,.14); border: 1px solid rgba(124,156,255,.3); padding: 3px 10px; border-radius: 99px; }
.dm-label { font-size: 12px; color: #8a90a2; margin-bottom: 6px; }
.dm-input { min-height: 46px; border-radius: 10px; border: 1px solid #2a3042; background: #090b10; padding: 11px 13px; font-size: 14px; line-height: 1.5; }
.dm-input .caret { display: inline-block; width: 2px; height: 1.1em; vertical-align: -3px; background: var(--app-accent); margin-left: 1px; animation: blink 1s steps(1) infinite; }
.dm-row { display: flex; justify-content: space-between; align-items: center; margin: 12px 0; }
.dm-k { font-size: 13px; color: #8a90a2; }
.dm-k b { display: inline-grid; place-items: center; min-width: 32px; height: 28px; margin-left: 8px; border-radius: 8px; border: 1px solid #2a3042; background: #090b10; color: #e6e9f2; font: 500 13px var(--mono); }
.dm-run { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px; border-radius: 9px; background: var(--app-accent); color: #0b0e18; font-size: 13px; font-weight: 600; transition: filter .2s, transform .15s; }
.dm-run .ic { width: 15px; height: 15px; }
.dm-run:hover { filter: brightness(1.1); }
.dm-run.pressed { transform: scale(.94); }
.dm-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 12px; counter-reset: s; }
.dm-steps li { counter-increment: s; font: 11.5px/1.3 var(--mono); color: #6d7285; padding: 7px 8px; border-radius: 8px; border: 1px dashed #262c3d; text-align: center; transition: color .3s, border-color .3s, background-color .3s; }
.dm-steps li.on { color: #e6e9f2; border-style: solid; border-color: rgba(61,219,177,.5); background: rgba(61,219,177,.08); }
.dm-steps li.done { color: #3ddbb1; border-style: solid; border-color: rgba(61,219,177,.3); }
.dm-context { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; font: 12px var(--mono); color: #8a90a2; }
.seg-bar { display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; flex: 1; max-width: 220px; }
.seg-bar i { height: 8px; border-radius: 3px; background: #1d2231; transition: background-color .25s, transform .25s; }
.seg-bar i.on { background: linear-gradient(90deg, #3ddbb1, #7c9cff); }
.dm-answer { border-radius: 12px; border: 1px solid #262c3d; background: var(--app-panel); padding: 14px; min-height: 150px; }
.dm-route { display: inline-block; font-size: 11px; font-weight: 600; color: #a4a9b9; background: #1d2231; padding: 3px 9px; border-radius: 99px; margin-bottom: 10px; }
.answer { font-size: 14.5px; line-height: 1.65; color: #dfe3ee; }
.answer strong { color: #fff; }
.answer ul { padding-left: 18px; list-style: disc; }
.answer.typing::after { content: "▍"; color: var(--app-accent); animation: blink 1s steps(1) infinite; }

.cb-panel { border-radius: 16px; border: 1px solid var(--border-strong); background: #000; padding: 16px; color: #e6e9f2; box-shadow: var(--shadow-sm); }
.cb-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 12px; font-weight: 600; font-size: 14px; }
.cb-head small { font: 11.5px var(--mono); color: #8a90a2; font-weight: 400; }
.cb-shot { display: block; width: 100%; border-radius: 10px; overflow: hidden; cursor: zoom-in; }
.cb-shot img { width: 100%; height: auto; transition: opacity .4s; }
.cb-shot.fade img { opacity: .2; }
.match { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 11px 13px; border-radius: 11px; font-size: 13.5px; color: #c8f7e9; background: rgba(61,219,177,.1); border: 1px solid rgba(61,219,177,.32); opacity: 0; transform: translateY(6px); transition: opacity .45s, transform .45s; }
.match b { color: #fff; }
.match .ic { color: #3ddbb1; }
.match.show { opacity: 1; transform: none; }
.takeaway { margin-top: 12px; font-size: 13.5px; color: #a4a9b9; min-height: 1.5em; }
.takeaway b { color: #e6e9f2; }
.replay-note { margin-top: 16px; font-size: 13.5px; color: var(--faint); }
.replay-note a, .about-text a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--blue) 40%, transparent); }

/* How it works */
.how { display: grid; gap: 16px; }
.lane { border-radius: 18px; border: 1px solid var(--border); background: var(--surface); padding: 18px; }
.lane-label { font: 500 12px var(--mono); text-transform: uppercase; letter-spacing: .07em; color: var(--faint); margin-bottom: 14px; }
.flow-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 34px; }
.flow-row li { position: relative; border-radius: 14px; border: 1px solid var(--border); background: var(--bg-elev); padding: 14px 14px 13px; display: grid; gap: 3px; transition: border-color .25s, transform .25s; }
.flow-row li:hover { border-color: color-mix(in srgb, var(--teal) 55%, transparent); transform: translateY(-2px); }
.flow-row li .ic { width: 22px; height: 22px; color: var(--teal); margin-bottom: 6px; }
.flow-row li b { font-size: 14.5px; }
.flow-row li small { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.flow-row li:not(:last-child)::after { /* animated connector */
  content: ""; position: absolute; top: 50%; right: -30px; width: 26px; height: 2px;
  background: linear-gradient(90deg, var(--teal) 0 40%, transparent 40% 100%) 0 0 / 10px 2px repeat-x;
  animation: flow 1s linear infinite; opacity: .8;
}
@keyframes flow { to { background-position: 10px 0; } }
.k-explorer { border-radius: 18px; border: 1px solid var(--border); background: var(--surface); padding: 20px; }
.k-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.k-top label { font-weight: 600; }
.k-top output { font: 600 15px var(--mono); color: var(--blue); }
input[type="range"] { width: 100%; accent-color: var(--blue); margin-bottom: 12px; cursor: pointer; }
.seg-lg { max-width: none; gap: 6px; }
.seg-lg i { height: 14px; border-radius: 5px; background: var(--surface-2); }
#kText { margin-top: 12px; color: var(--muted); font-size: 15px; }
#kText b { color: var(--text); }
.how-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.how-card { border-radius: 16px; border: 1px solid var(--border); background: var(--surface); padding: 18px; overflow: hidden; }
.how-card .ic { width: 22px; height: 22px; color: var(--blue); margin-bottom: 10px; }
.how-card b { display: block; margin-bottom: 4px; }
.how-card p { color: var(--muted); font-size: 14px; }

/* Project footer: metrics + chips */
.project-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--border); }
.metrics { display: flex; flex-wrap: wrap; gap: 34px; }
.metrics li b { display: block; font-family: var(--serif); font-weight: 400; font-size: 36px; line-height: 1; letter-spacing: -.01em; }
.metrics li span { font-size: 13px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chips li { font: 12.5px var(--mono); color: var(--muted); padding: 5px 11px; border-radius: 8px; background: var(--chip); border: 1px solid var(--border); transition: color .2s, border-color .2s; }
.chips li:hover { color: var(--text); border-color: var(--border-strong); }
.chips-sm li { font-size: 11.5px; padding: 3px 9px; }

/* Video showcase */
.video-showcase { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 18px; align-items: stretch; }
.video-frame .browser-bar .url { max-width: 360px; }
.mode-badge { font: 500 11px var(--mono); color: #3ddbb1; border: 1px solid rgba(61,219,177,.35); padding: 2px 9px; border-radius: 99px; white-space: nowrap; }
.video-wrap { position: relative; background: #0b0d12; aspect-ratio: 1600 / 726; }
.video-wrap video { width: 100%; height: 100%; object-fit: cover; background: #0b0d12; }
.play-overlay {
  position: absolute; left: 18px; bottom: 18px; display: inline-flex; align-items: center; gap: 14px;
  padding: 8px 18px 8px 8px; border-radius: 99px; color: #fff;
  background: rgba(8, 10, 16, .72); border: 1px solid rgba(255,255,255,.16);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 18px 40px -12px rgba(0,0,0,.6); transition: transform .25s, background-color .25s;
}
.play-overlay:hover { transform: translateY(-2px) scale(1.02); background: rgba(8, 10, 16, .85); }
.play-ring { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #06080d; box-shadow: 0 0 0 0 rgba(124,156,255,.6); animation: ring 2.4s infinite; }
.play-ring .ic { width: 20px; height: 20px; margin-left: 3px; }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(124,156,255,.55); } 70%, 100% { box-shadow: 0 0 0 14px rgba(124,156,255,0); } }
.play-label { display: grid; text-align: left; font-weight: 600; font-size: 14.5px; line-height: 1.3; }
.play-label small { font-weight: 400; font-size: 12px; color: #b9bfce; }
.video-showcase.is-full .play-overlay { display: none; }

/* height: 0 + min-height: 100% → the list matches the video's height and scrolls inside */
.chapters-wrap { border-radius: 16px; border: 1px solid var(--border); background: var(--surface); padding: 14px; display: flex; flex-direction: column; height: 0; min-height: 100%; }
.chapters-head { display: flex; justify-content: space-between; align-items: baseline; padding: 2px 4px 10px; }
.chapters-head small { color: var(--faint); font-size: 12px; }
.chapters { flex: 1; min-height: 0; display: grid; align-content: start; gap: 6px; overflow-y: auto; padding-right: 4px; scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
.chapters button {
  position: relative; width: 100%; display: grid; grid-template-columns: 104px 1fr; gap: 12px; align-items: center; text-align: left;
  padding: 7px; border-radius: 12px; border: 1px solid transparent; overflow: hidden;
  transition: background-color .2s, border-color .2s;
}
.chapters button:hover { background: var(--surface-2); }
.chapters button.active { background: color-mix(in srgb, var(--blue) 10%, transparent); border-color: color-mix(in srgb, var(--blue) 45%, transparent); }
.chapters img { width: 104px; height: 47px; object-fit: cover; border-radius: 7px; border: 1px solid var(--border); }
.ch-meta { display: grid; min-width: 0; }
.ch-time { font: 500 11.5px var(--mono); color: var(--teal); }
.ch-title { font-size: 14px; font-weight: 600; line-height: 1.3; }
.ch-desc { font-size: 12px; color: var(--muted); line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-bar { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--grad); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); opacity: 0; }
.chapters button.active .ch-bar { opacity: 1; }

.built-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px; margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--border); }
.built h4 { font-size: 15px; margin-bottom: 12px; }
.ticks { display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 28px; color: var(--muted); font-size: 15px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 6px; background: color-mix(in srgb, var(--teal) 14%, transparent); }
.ticks li::after { content: ""; position: absolute; left: 6px; top: 8px; width: 5px; height: 8px; border: solid var(--teal); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.project-foot-col { margin-top: 0; padding-top: 0; border-top: 0; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 22px; }
.metrics-col { gap: 26px; }

/* Land registry: animated transfer walkthrough. Stage classes r1…r6 mark the steps already reached. */
.lr { display: grid; gap: 14px; }
.lr-stage {
  position: relative; border-radius: 20px; border: 1px solid var(--border); background: var(--surface); padding: 22px;
  display: grid; gap: 16px 26px; overflow: hidden;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1fr);
  grid-template-areas: "alice office bob" "alice contract bob" "ledger ledger ledger";
}
.lr-stage > * { position: relative; z-index: 1; min-width: 0; }
.lr-stage > .lr-wires { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; overflow: visible; }
.lr-wires line { stroke: var(--border-strong); stroke-width: 2; stroke-dasharray: 5 7; transition: stroke .3s; }
.lr-wires line.on { stroke: var(--teal); stroke-width: 2.5; animation: wireflow .5s linear infinite; }
@keyframes wireflow { to { stroke-dashoffset: -12; } }
.lr-alice { grid-area: alice; } .lr-bob { grid-area: bob; } .lr-office { grid-area: office; }
.lr-contract { grid-area: contract; } .lr-ledger { grid-area: ledger; }

.lr-actor { border-radius: 16px; border: 1px solid var(--border); background: var(--bg-elev); padding: 14px; display: grid; align-content: start; gap: 12px; }
.lr-person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.lr-person b { display: block; font-size: 15px; line-height: 1.25; }
.lr-person small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.3; }
.lr-avatar, .lr-shared i { display: grid; place-items: center; flex: none; border-radius: 50%; color: #06080d; font-weight: 700; font-style: normal; }
.lr-avatar { width: 40px; height: 40px; font-size: 16px; }
.av-a { background: linear-gradient(135deg, #3ddbb1, #7c9cff); }
.av-b { background: linear-gradient(135deg, #b18cff, #ff8fb1); }
.av-gov { background: var(--surface-2); color: var(--blue); border-radius: 12px; }
.av-gov .ic { width: 21px; height: 21px; }
.lr-sig { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font: 600 11px var(--mono); color: var(--teal); padding: 2px 8px; border-radius: 99px; border: 1px solid color-mix(in srgb, var(--teal) 45%, transparent); opacity: 0; transition: opacity .4s; }
.lr-sig .ic { width: 12px; height: 12px; }
.lr-stage.r2 .lr-sig { opacity: 1; }
.lr-wallet { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); font-size: 12px; color: var(--muted); }
.lr-mm { font: 700 10px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: #f6851b; }
.lr-wallet code { font: 12px var(--mono); }
.lr-bal { margin-left: auto; font: 600 12.5px var(--mono); color: var(--text); transition: color .4s; }
.lr-bal.dip { color: #f2b13a; }
:root[data-theme="light"] .lr-bal.dip { color: #b06f00; }
.lr-slot { min-height: 60px; border-radius: 12px; border: 1.5px dashed var(--border-strong); display: grid; place-items: center; transition: border-color .3s; }
.lr-slot.has-deed { border-color: transparent; }
.lr-slot.has-deed .lr-slot-hint { display: none; }
.lr-slot-hint { font-size: 12px; color: var(--faint); text-align: center; padding: 0 8px; }
.lr-deed {
  justify-self: stretch; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; position: relative; z-index: 2;
  background: linear-gradient(135deg, color-mix(in srgb, var(--teal) 16%, var(--bg-elev)), color-mix(in srgb, var(--blue) 14%, var(--bg-elev)));
  border: 1px solid color-mix(in srgb, var(--teal) 50%, transparent); box-shadow: 0 12px 26px -14px var(--glow-teal);
}
.lr-deed.moving { z-index: 12; box-shadow: 0 24px 50px -16px var(--glow-teal); }
.lr-deed-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--grad); color: var(--on-grad); flex: none; }
.lr-deed-ic .ic { width: 20px; height: 20px; }
.lr-deed-txt { min-width: 0; }
.lr-deed-txt b { display: block; font-size: 14.5px; line-height: 1.25; }
.lr-deed-txt small { color: var(--muted); font-size: 12.5px; }

/* wallet signature pop-up over Alice */
.lr-sign {
  position: absolute; left: 50%; top: 52%; width: min(236px, 94%); z-index: 10; pointer-events: none;
  padding: 12px 14px; border-radius: 14px; background: #fff; color: #1b1e27; border: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 26px 60px -14px rgba(0,0,0,.65);
  opacity: 0; transform: translate(-50%, -40%) scale(.9); transition: opacity .35s, transform .45s cubic-bezier(.2,.9,.25,1.15);
}
.lr-sign.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.lr-sign-head { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; color: #f6851b; margin-bottom: 6px; }
.lr-sign-head .ic { width: 14px; height: 14px; }
.lr-sign p { font-size: 13px; line-height: 1.45; color: #3a4153; margin-bottom: 10px; }
.lr-sign p b { color: #10131c; }
.lr-sign-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lr-sign-btns span { text-align: center; padding: 6px 0; border-radius: 99px; font-size: 12.5px; font-weight: 600; color: #4a5163; border: 1px solid #d5d9e3; }
.lr-sign-btns .lr-sign-ok { background: #037dd6; border-color: #037dd6; color: #fff; transition: transform .15s, filter .15s; }
.lr-sign.pressing .lr-sign-ok { transform: scale(.9); filter: brightness(1.2); }
.lr-signed { position: absolute; inset: 0; border-radius: inherit; display: grid; place-content: center; justify-items: center; gap: 4px; background: rgba(255,255,255,.97); color: #0b9b77; font-weight: 700; font-size: 15px; opacity: 0; transition: opacity .3s; }
.lr-signed .ic { width: 30px; height: 30px; }
.lr-sign.signed .lr-signed { opacity: 1; }

/* government office */
.lr-checks { display: grid; gap: 7px; }
.lr-checks li { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--faint); transition: color .35s; }
.lr-checks li::before { content: ""; width: 17px; height: 17px; flex: none; border-radius: 50%; border: 1.5px solid var(--border-strong); transition: background-color .35s, border-color .35s; background: center / 11px no-repeat; }
.lr-checks li.on, .lr-stage.r3 .lr-checks li { color: var(--text); }
.lr-checks li.on::before, .lr-stage.r3 .lr-checks li::before {
  border-color: var(--teal); background-color: var(--teal);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2306080d' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}
.lr-stamp {
  justify-self: end; margin: -4px 4px 0 0; padding: 3px 9px; border-radius: 6px; border: 2px solid var(--teal);
  font: 700 12px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--teal);
  opacity: 0; transform: rotate(-9deg) scale(1.8); transition: opacity .2s, transform .4s cubic-bezier(.2,1.6,.4,1);
}
.lr-office.stamped .lr-stamp, .lr-stage.r3 .lr-stamp { opacity: 1; transform: rotate(-9deg) scale(1); }

/* the shared smart contract */
.lr-contract { align-self: center; border-radius: 16px; padding: 14px; border: 1px solid color-mix(in srgb, var(--blue) 50%, transparent); background: color-mix(in srgb, var(--blue) 8%, var(--bg-elev)); }
.lr-contract.bump { animation: cbump .9s ease; }
@keyframes cbump { 0% { box-shadow: 0 0 0 0 var(--glow-blue); } 35% { box-shadow: 0 0 0 12px var(--glow-blue); } 100% { box-shadow: 0 0 0 0 transparent; } }
.lr-contract-head { display: flex; align-items: center; gap: 8px; }
.lr-contract-head > .ic { width: 20px; height: 20px; color: var(--blue); }
.lr-contract-head b { font: 600 15px var(--mono); }
.lr-shared { margin-left: auto; display: inline-flex; }
.lr-shared i { width: 24px; height: 24px; font-size: 11px; margin-left: -6px; border: 2px solid var(--bg-elev); }
.lr-shared .ic { width: 12px; height: 12px; }
.lr-contract-sub { display: block; color: var(--muted); font-size: 12.5px; margin: 3px 0 10px; }
.lr-code { font: 13px/1.75 var(--mono); padding: 10px 12px; border-radius: 10px; background: var(--app-bg); border: 1px solid #262c3d; color: #dfe3ee; }
.lr-code .k { display: inline-block; min-width: 64px; color: #7c9cff; }
.lr-code .s { color: #f3c178; }
.lr-code .v { color: #3ddbb1; padding: 0 4px; border-radius: 4px; }
.flash { animation: flash 1.1s ease; }
@keyframes flash { 0%, 30% { background-color: rgba(61, 219, 177, .4); } 100% { background-color: transparent; } }

/* ledger */
.lr-ledger { border-radius: 16px; border: 1px solid var(--border); background: var(--bg-elev); padding: 12px 14px 14px; }
.lr-ledger-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; font: 500 12px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.lr-final { display: inline-flex; align-items: center; gap: 6px; font: 600 12.5px var(--font); letter-spacing: 0; text-transform: none; color: var(--teal); opacity: 0; transform: translateY(4px); transition: opacity .45s, transform .45s; }
.lr-final .ic { width: 15px; height: 15px; }
.lr-stage.r5 .lr-final { opacity: 1; transform: none; }
/* newest block pinned right; older blocks fade out on the left */
.lr-chain { display: flex; align-items: center; justify-content: flex-end; overflow: hidden; padding: 4px 2px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 22%); mask-image: linear-gradient(90deg, transparent, #000 22%); }
.block { flex: none; width: 150px; margin-right: 22px; padding: 9px 12px; border-radius: 12px; position: relative; border: 1px solid var(--border-strong); background: var(--surface-2); font: 11.5px/1.5 var(--mono); color: var(--muted); }
.block:last-child { margin-right: 0; }
.block b { display: block; color: var(--text); font-weight: 500; }
.block::after { content: ""; position: absolute; right: -23px; top: 50%; width: 22px; height: 2px; background: var(--border-strong); }
.block:last-child::after { display: none; }
.block.new { border-color: color-mix(in srgb, var(--teal) 70%, transparent); box-shadow: 0 0 0 4px var(--glow-teal); animation: blockIn .8s cubic-bezier(.2,.8,.2,1); }
.block.new b { color: var(--teal); }
@keyframes blockIn { from { opacity: 0; transform: translateX(60px) scale(.85); } }
.lr-history { margin-top: 10px; font-size: 12.5px; color: var(--muted); opacity: 0; transition: opacity .6s; }
.lr-history b { color: var(--teal); font-weight: 600; }
.lr-stage.r6 .lr-history { opacity: 1; }

/* things that fly across the stage */
.lr-packet, .lr-coin { position: absolute; left: 0; top: 0; z-index: 11; pointer-events: none; }
.lr-packet { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; white-space: nowrap; font-size: 12.5px; font-weight: 600; color: #06080d; background: var(--grad); box-shadow: 0 12px 28px -8px var(--glow-blue); }
.lr-packet .ic { width: 14px; height: 14px; }
.lr-packet-ok { background: linear-gradient(110deg, #3ddbb1, #a6f3dc); }
.lr-coin {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  font: 800 15px var(--font); color: #7a4a00; border: 1.5px solid #e2a92e;
  background: radial-gradient(circle at 34% 30%, #fff4c8, #f7cb4d 46%, #d8961a);
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.14), 0 8px 18px -6px rgba(216,150,26,.75);
}

/* narration panel */
.lr-panel { border-radius: 18px; border: 1px solid var(--border); background: var(--surface); padding: 16px 18px; }
.lr-progress { height: 3px; border-radius: 3px; overflow: hidden; background: var(--surface-2); margin-bottom: 12px; }
.lr-progress span { display: block; height: 100%; background: var(--grad); transform-origin: 0 50%; transform: scaleX(0); transition: transform .7s ease; }
.lr-steps { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin-bottom: 14px; }
.lr-steps button { width: 100%; padding: 7px 4px; border-radius: 9px; border: 1px solid var(--border); font: 500 12.5px var(--mono); color: var(--faint); transition: color .2s, border-color .2s, background-color .2s; }
.lr-steps button:hover { color: var(--text); border-color: var(--border-strong); }
.lr-steps button.done { color: var(--teal); border-color: color-mix(in srgb, var(--teal) 35%, transparent); }
.lr-steps button[aria-current="step"] { color: var(--on-grad); background: var(--grad); border-color: transparent; }
.lr-bottom { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.lr-caption { min-height: 76px; max-width: 760px; }
.lr-caption b { display: block; font-size: 17px; margin-bottom: 3px; }
.lr-caption p { color: var(--muted); font-size: 15px; }
.lr-caption.swap { animation: capIn .5s ease; }
.lr-controls { display: flex; align-items: center; gap: 8px; flex: none; }
.lr-controls .btn { min-width: 196px; }

/* ==========================================================================
   Experience timeline
   ========================================================================== */
.timeline { position: relative; display: grid; gap: 22px; padding-left: 34px; }
.timeline::before, .timeline::after { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; }
.timeline::before { background: var(--border); }
.timeline::after { background: var(--grad); transform-origin: 50% 0; transform: scaleY(var(--fill, 0)); }
.tl-item { position: relative; }
.tl-dot { position: absolute; left: -34px; top: 30px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 2px solid var(--border-strong); z-index: 1; transition: border-color .4s, box-shadow .4s; }
.tl-item.lit .tl-dot { border-color: var(--teal); box-shadow: 0 0 0 5px var(--glow-teal); }
.tl-card { border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); padding: 26px 28px; overflow: hidden; transition: border-color .25s, transform .25s; }
.tl-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.tl-head { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; margin-bottom: 16px; }
.logo { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; font: 600 18px var(--serif); font-size: 22px; color: var(--on-grad); }
.logo-1 { background: linear-gradient(135deg, #3ddbb1, #7c9cff); }
.logo-2 { background: linear-gradient(135deg, #7c9cff, #b18cff); }
.logo-3 { background: linear-gradient(135deg, #b18cff, #ff8fb1); }
.tl-role h3 { font-size: 18.5px; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; }
.org { color: var(--muted); font-size: 14.5px; }
.org a { border-bottom: 1px solid var(--border-strong); }
.org a:hover { color: var(--text); }
.when { font: 12.5px var(--mono); color: var(--faint); white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; }
.now { font-size: 10.5px; color: var(--on-grad); background: var(--grad); padding: 1px 8px; border-radius: 99px; }
.tl-points { display: grid; gap: 9px; margin-bottom: 16px; }
.tl-points li { position: relative; padding-left: 20px; color: var(--muted); font-size: 15.5px; }
.tl-points li::before { content: ""; position: absolute; left: 2px; top: 11px; width: 8px; height: 2px; border-radius: 2px; background: var(--teal); }

/* ==========================================================================
   Skills bento
   ========================================================================== */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.bento-card { grid-column: span 2; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); padding: 24px; overflow: hidden; transition: border-color .25s, transform .25s; }
.bento-card:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.b-wide { grid-column: span 4; }
.bento-card:nth-child(2) { grid-column: span 2; }
.bento-card:nth-child(3), .bento-card:nth-child(4), .bento-card:nth-child(5) { grid-column: span 2; }
.b-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--teal); margin-bottom: 14px; }
.b-icon .ic { width: 22px; height: 22px; }
.bento-card h3 { font-size: 17px; font-weight: 600; margin-bottom: 14px; }

/* ==========================================================================
   About
   ========================================================================== */
.about { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: start; }
.about-text p { color: var(--muted); font-size: 17.5px; margin-bottom: 18px; }
.facts { border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); padding: 8px 22px; }
.facts div { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--border); font-size: 14.5px; }
.facts div:last-child { border-bottom: 0; }
.facts dt { color: var(--faint); display: inline-flex; align-items: center; gap: 6px; }
.facts dt .ic { width: 15px; height: 15px; }
.facts dd { font-weight: 500; text-align: right; }
.edu-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 40px; }
.edu-card { border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); padding: 24px; overflow: hidden; }
.edu-card h3 { font-size: 18px; font-weight: 600; margin: 8px 0 4px; }
.edu-card p { color: var(--muted); font-size: 15px; margin-bottom: 14px; }
.certs { margin-top: 36px; }
.certs-title { font: 500 12.5px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--faint); margin-bottom: 14px; }
.cert-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.cert { border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); padding: 18px; display: flex; flex-direction: column; justify-content: space-between; gap: 14px; overflow: hidden; }
.cert b { display: block; font-weight: 600; line-height: 1.35; margin-bottom: 4px; }
.cert span { color: var(--faint); font-size: 13.5px; }
.cert a { display: inline-flex; align-items: center; gap: 5px; font-size: 13.5px; font-weight: 500; color: var(--teal); }
.cert a .ic { width: 14px; height: 14px; }

/* ==========================================================================
   Contact + footer
   ========================================================================== */
.contact { padding-bottom: 110px; }
.contact-card {
  position: relative; text-align: center; padding: 72px 32px; border-radius: 32px; overflow: hidden;
  border: 1px solid var(--border-strong);
  background:
    radial-gradient(600px 260px at 15% 0%, var(--glow-teal), transparent 65%),
    radial-gradient(600px 260px at 85% 100%, var(--glow-blue), transparent 65%),
    var(--surface);
}
.contact-card p { color: var(--muted); font-size: 18px; max-width: 560px; margin: 18px auto 0; }
.cta-center { justify-content: center; }
.email-line { display: inline-flex; align-items: center; gap: 12px; margin-top: 26px; font: 15px var(--mono); color: var(--muted); }
.copy-btn { display: inline-flex; align-items: center; gap: 6px; font: 12.5px var(--font); color: var(--muted); border: 1px solid var(--border); background: var(--surface); border-radius: 8px; padding: 5px 10px; transition: color .2s, border-color .2s; }
.copy-btn .ic { width: 14px; height: 14px; }
.copy-btn:hover { color: var(--text); border-color: var(--border-strong); }
.copy-btn.done { color: var(--teal); border-color: var(--teal); }
.footer { border-top: 1px solid var(--border); padding: 28px 0 34px; font-size: 13.5px; color: var(--faint); }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.to-top:hover { color: var(--text); }

/* ==========================================================================
   Lightbox
   ========================================================================== */
.lightbox { position: fixed; inset: 0; z-index: 90; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 24px; background: rgba(4, 5, 8, .88); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; } }
.lb-figure { display: grid; justify-items: center; gap: 14px; min-width: 0; max-height: 100%; }
.lb-figure img { max-height: 80vh; width: auto; max-width: 100%; border-radius: 12px; box-shadow: 0 30px 90px -20px rgba(0,0,0,.8); border: 1px solid rgba(255,255,255,.12); }
.lb-figure figcaption { color: #c4c9d6; font-size: 14.5px; text-align: center; max-width: 720px; }
.lightbox .icon-btn { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.14); color: #fff; }
.lb-close { position: absolute; top: 18px; right: 18px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1080px) {
  .hero-layout { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .hero-side { max-width: 640px; }
  .video-showcase { grid-template-columns: minmax(0, 1fr); }
  .chapters-wrap { height: auto; min-height: 0; }
  .chapters { grid-auto-flow: column; grid-auto-columns: 236px; overflow-x: auto; overflow-y: hidden; padding-bottom: 6px; scroll-snap-type: x mandatory; }
  .chapters li { scroll-snap-align: start; }
  .chapters button { grid-template-columns: 1fr; gap: 8px; }
  .chapters img { width: 100%; height: auto; aspect-ratio: 560 / 254; }
  .ch-desc { white-space: normal; }
  .replay-grid { grid-template-columns: minmax(0, 1fr); }
  .flow-row { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .flow-row li::after { display: none; }
  .built-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .lr-stage {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; padding: 16px;
    grid-template-areas: "alice bob" "office office" "contract contract" "ledger ledger";
  }
  .lr-bottom { flex-direction: column; align-items: stretch; gap: 14px; }
  .lr-controls { justify-content: center; }
}
@media (max-width: 860px) {
  .nav { top: 10px; }
  .nav-links {
    position: absolute; top: 70px; left: 16px; right: 16px; flex-direction: column; gap: 2px; padding: 8px;
    border-radius: 16px; border: 1px solid var(--border-strong); background: var(--surface-solid); box-shadow: var(--shadow);
    opacity: 0; transform: translateY(-8px); pointer-events: none; transition: opacity .2s, transform .2s;
  }
  .nav.open .nav-links { opacity: 1; transform: none; pointer-events: auto; }
  .nav.open .nav-inner { background: color-mix(in srgb, var(--bg) 85%, transparent); border-color: var(--border); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
  .nav-links a { padding: 12px 14px; font-size: 15px; }
  .menu-btn { display: inline-grid; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .project { padding: 26px; border-radius: 24px; }
  .project-head { flex-direction: column; align-items: flex-start; }
  .project-cta { flex-direction: row; flex-wrap: wrap; align-items: center; min-width: 0; }
  .hint { max-width: none; flex-basis: 100%; }
  .carousel-ui { flex-direction: column; align-items: flex-start; }
  .q-list { grid-template-columns: 1fr; }
  .how-cards { grid-template-columns: 1fr; }
  .bento { grid-template-columns: 1fr; }
  .bento-card, .b-wide, .bento-card:nth-child(n) { grid-column: auto; }
  .about { grid-template-columns: 1fr; gap: 28px; }
  .edu-grid, .cert-list { grid-template-columns: 1fr; }
  .tl-head { grid-template-columns: auto 1fr; }
  .tl-head .when { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .container { padding: 0 16px; }
  .brand-name { display: none; }
  .nav-resume { display: none; }
  .hero { padding-top: 112px; }
  .display { margin: 20px 0 18px; }
  .cta-row .btn { flex: 1 1 auto; }
  .socials { margin-left: 0; }
  .term-body { height: 250px; font-size: 12.5px; }
  .stat { padding: 16px; }
  .stat dd { font-size: 36px; }
  .section { padding-top: 96px; }
  .project { padding: 20px 16px; border-radius: 20px; }
  .slide { padding: 8px; }
  .carousel-viewport { aspect-ratio: 4 / 3; }
  .tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
  .tab { justify-content: center; text-align: center; white-space: normal; line-height: 1.25; padding: 8px 6px; font-size: 13.5px; }
  .tab-badge { display: none; }
  .metrics { gap: 22px; }
  .metrics li b { font-size: 30px; }
  .play-overlay { left: 10px; bottom: 10px; padding: 5px 12px 5px 5px; gap: 10px; }
  .play-ring { width: 36px; height: 36px; }
  .play-label { font-size: 13px; }
  .play-label small { display: none; }
  .video-frame .browser-bar .url { display: none; }
  .mode-badge { margin-left: auto; }
  .flow-row { grid-template-columns: 1fr; }
  .dm-steps { grid-template-columns: repeat(2, 1fr); }
  .skills-carousel { margin-top: 44px; }
  .tech { padding: 6px 14px 6px 6px; gap: 9px; }
  .tech-logo { width: 34px; height: 34px; }
  .tech-logo img { width: 21px; height: 21px; }
  .tech-name { font-size: 13.5px; }
  .lr-stage { padding: 12px; gap: 12px 10px; }
  .lr-actor { padding: 11px; gap: 10px; }
  .lr-avatar { width: 34px; height: 34px; font-size: 14px; }
  .lr-person { gap: 8px; }
  .lr-person b { font-size: 14px; }
  .lr-wallet code, .lr-alice .lr-person small, .lr-bob .lr-person small { display: none; }
  .lr-sig { position: absolute; top: -9px; right: 10px; background: var(--bg-elev); }
  .lr-deed { padding: 8px 10px; gap: 6px; flex-direction: column; align-items: flex-start; }
  .lr-deed-ic { width: 30px; height: 30px; }
  .lr-deed-txt b { font-size: 13px; }
  .lr-deed-txt small { font-size: 11.5px; }
  .lr-sign { width: 96%; padding: 10px; }
  .block { width: 124px; }
  .lr-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lr-controls .btn { min-width: 0; flex: 1; }
  .timeline { padding-left: 26px; }
  .tl-dot { left: -26px; }
  .timeline::before, .timeline::after { left: 6px; }
  .tl-card { padding: 20px; }
  .contact-card { padding: 52px 18px; border-radius: 24px; }
  .email-line { flex-direction: column; gap: 10px; }
  .lightbox { grid-template-columns: 1fr; padding: 60px 12px 24px; }
  .lb-prev, .lb-next { display: none; }
}

/* Reduced motion: drop ambient movement (drifting glows, pulsing rings, sliding reveals).
   Autoplaying things start paused in JS, and anything a visitor clicks still animates. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .blob, .pulse, .play-ring, .flow-row li::after { animation: none; }
  .reveal { transform: none; transition: opacity .6s ease; }
}
