/* ==========================================================================
   Portfolio + Tech Blog — "Attention Map" design system
   Near-black space, signal orange + cyan accents, Bricolage / Geist / Geist Mono
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --bg: #08090C;
  --bg-deep: #020306;
  --bg-page: #05060A;
  --surface: #0F1116;
  --surface-2: #161922;
  --bar: #0B0C10;
  --line: #232733;
  --line-2: #333949;
  --line-3: #4A5165;
  --text: #F2F3F6;
  --text-2: #A9AEBC;
  --text-3: #7E8496;
  --soft: #DADCE2;
  --soft-2: #C9CCD5;
  --orange: #FF8547;
  --orange-2: #FFA372;
  --cyan: #36D1E6;
  --violet: #B9A4FF;
  --peach: #FFC4A3;
  --mint: #9EC6C5;
  --danger: #FF8F7A;

  --f-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --f-body: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono: 'Geist Mono', ui-monospace, Menlo, monospace;

  --wrap: 1240px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg-deep);
  color: var(--text);
  font-family: var(--f-body);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--orange); }
a:hover { color: var(--orange-2); }
h1, h2, h3, p { margin: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(255, 133, 71, .35); color: var(--text); }

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

/* ---------- Layout ---------- */
.page { position: relative; isolation: isolate; background: var(--bg-deep); }
.page--inner { background: var(--bg-page); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.section { padding: 88px 0; border-top: 1px solid var(--line); }
.page--space .section { background: rgba(8, 9, 12, .86); }
.section--alt { background: rgba(11, 12, 16, .9); }
.stack { display: flex; flex-direction: column; gap: var(--gap, 16px); }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--gap, 12px); }
.between { justify-content: space-between; }
.end { align-items: flex-end; }
.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--min, 440px)), 1fr));
  gap: var(--gap, 56px);
  align-items: var(--align, center);
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--min, 320px)), 1fr));
  gap: var(--gap, 20px);
}
.grid--fill { grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--min, 340px)), 1fr)); }
.min0 { min-width: 0; }
.space-window { height: clamp(150px, 20vh, 220px); }

/* ---------- Type ---------- */
.cmd { font-family: var(--f-mono); font-size: 14px; color: var(--text-3); }
.cmd b { color: var(--cyan); font-weight: 400; }
.cmd i { color: var(--orange); font-style: normal; }
.h-section {
  font-family: var(--f-display); font-weight: 700;
  font-size: clamp(40px, 5vw, 66px); line-height: 1; letter-spacing: -.035em;
}
.h-page {
  font-family: var(--f-display); font-weight: 780;
  font-size: clamp(50px, 6.4vw, 96px); line-height: .94; letter-spacing: -.045em;
}
.h-card { font-family: var(--f-display); font-weight: 700; font-size: 25px; line-height: 1.1; letter-spacing: -.02em; }
.lead { font-size: 18px; line-height: 1.6; font-weight: 300; color: var(--text-2); max-width: 640px; }
.body { font-size: 16px; line-height: 1.6; font-weight: 300; color: var(--text-2); }
.small { font-size: 15px; line-height: 1.6; font-weight: 300; color: var(--text-2); }
.mono { font-family: var(--f-mono); }
.label { font-family: var(--f-mono); font-size: 12px; color: var(--text-3); }
.muted { color: var(--text-2); }
.accent { color: var(--orange); }
.accent-c { color: var(--cyan); }
.dim { color: var(--text-2); }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: 12px; border: 1px solid transparent;
  font-family: var(--f-body); font-size: 15px; font-weight: 500; line-height: 1;
  text-decoration: none; white-space: nowrap;
  transition: background 150ms ease, border-color 150ms ease, box-shadow 220ms ease, transform 220ms ease;
}
.btn svg { flex-shrink: 0; }
.btn--lg { min-height: 54px; padding: 0 26px; border-radius: 14px; font-size: 16px; }
.btn--sm { min-height: 40px; padding: 0 14px; border-radius: 10px; font-size: 13px; }
.btn--primary { background: var(--orange); color: var(--bg); }
.btn--primary:hover { background: var(--orange-2); color: var(--bg); box-shadow: 0 12px 34px -12px rgba(255, 133, 71, .85); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn--ghost:hover { color: var(--text); border-color: var(--text); background: rgba(242, 243, 246, .05); box-shadow: 0 0 0 4px rgba(242, 243, 246, .05); }
.btn--glass { background: rgba(8, 9, 12, .55); }
.btn--dark { background: var(--bg); color: var(--text); }
.btn--dark:hover { background: var(--line); color: var(--text); }
.btn--danger { background: transparent; color: var(--danger); border-color: rgba(255, 120, 100, .4); }
.btn--danger:hover { background: rgba(255, 120, 100, .1); color: var(--danger); }
.btn--glow { box-shadow: 0 12px 40px -12px rgba(255, 133, 71, .7); }
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
  border: 1px solid var(--line-2); background: rgba(8, 9, 12, .6); color: var(--text);
}
.icon-btn:hover { border-color: var(--text); }
.link {
  color: var(--text); padding: 12px 0;
  text-decoration: underline; text-decoration-color: var(--orange);
  text-decoration-thickness: 2px; text-underline-offset: 6px;
}
.link:hover { color: var(--orange); }

/* ---------- Pills, chips, filters ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 11px; border-radius: 999px;
  font-family: var(--f-mono); font-size: 12px; line-height: 1.2; white-space: nowrap;
}
.pill--orange { background: var(--orange); color: var(--bg); }
.pill--cyan { background: var(--cyan); color: var(--bg); }
.pill--line { border: 1px solid var(--line-2); color: var(--text-2); }
.pill--soft-o { background: rgba(255, 133, 71, .14); color: var(--orange); }
.pill--soft-c { background: rgba(54, 209, 230, .12); color: var(--cyan); }
.pill--soft-v { background: rgba(185, 164, 255, .16); color: var(--violet); }
.chip { display: inline-flex; padding: 7px 12px; border-radius: 999px; background: var(--surface-2); font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.filter {
  min-height: 44px; padding: 0 18px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text-2);
  font-size: 15px; transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}
.filter:hover { border-color: var(--line-3); color: var(--text); }
.filter[aria-pressed="true"] { background: var(--orange); border-color: var(--orange); color: var(--bg); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 4px rgba(54, 209, 230, .18); }

/* ---------- Cards (with cursor spotlight + tilt) ---------- */
.cd {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: 24px; overflow: hidden;
  color: var(--text); text-decoration: none;
  transition: border-color 220ms ease, transform 320ms var(--ease), box-shadow 320ms ease;
}
.cd::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  opacity: 0; transition: opacity 320ms ease;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 133, 71, .14), rgba(54, 209, 230, .05) 38%, transparent 62%);
}
.cd:hover { color: var(--text); border-color: rgba(255, 133, 71, .45); box-shadow: 0 28px 60px -32px rgba(255, 133, 71, .55), 0 0 0 1px rgba(255, 133, 71, .12); transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-5px); }
.cd:hover::before { opacity: 1; }
.cd__body { padding: 26px; display: flex; flex-direction: column; gap: 12px; flex-grow: 1; }

/* ---------- Terminal / editor windows ---------- */
.win { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; min-width: 0; }
.win__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 18px; border-bottom: 1px solid var(--line); background: var(--bar);
  font-family: var(--f-mono); font-size: 12px; color: var(--text-3);
}
.win__title { display: inline-flex; align-items: center; gap: 8px; color: var(--text); }
.win__title i { width: 8px; height: 8px; border-radius: 2px; background: var(--orange); }
.win--glow-o { box-shadow: 0 60px 120px -60px rgba(255, 133, 71, .5); }
.win--glow-c { box-shadow: 0 60px 120px -70px rgba(54, 209, 230, .45); }
.viz { position: relative; background: #08090C; }
.viz canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; }
.viz__fallback { display: none; position: absolute; inset: 0; place-items: center; padding: 24px; text-align: center; font: 13px var(--f-mono); color: var(--text-2); }
.no-webgl .viz__fallback { display: grid; }

/* ---------- Header (editor tabs) ---------- */
.site-header { position: relative; z-index: 5; border-bottom: 1px solid var(--line); background: var(--bg); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; }
.brand { display: flex; align-items: center; gap: 10px; min-height: 60px; color: var(--text); text-decoration: none; font-family: var(--f-mono); font-size: 15px; }
.brand:hover { color: var(--text); }
.brand span { color: var(--text-3); }
.mark { display: grid; grid-template-columns: repeat(2, 9px); gap: 3px; }
.mark i { width: 9px; height: 9px; border-radius: 2px; }
.mark i:nth-child(1) { background: var(--orange); }
.mark i:nth-child(2) { background: rgba(255, 133, 71, .45); }
.mark i:nth-child(3) { background: rgba(54, 209, 230, .55); }
.mark i:nth-child(4) { background: var(--cyan); }
.tabs { display: flex; align-items: stretch; align-self: stretch; overflow-x: auto; font-family: var(--f-mono); font-size: 13px; }
.tab {
  display: flex; align-items: center; gap: 8px; padding: 0 16px; min-height: 60px;
  color: var(--text-2); text-decoration: none; border-top: 2px solid transparent; white-space: nowrap;
  transition: color 150ms ease, background 150ms ease;
}
.tab:hover { color: var(--text); background: var(--surface); }
.tab[aria-current="page"] { color: var(--text); background: var(--surface); border-top-color: var(--orange); border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.tab i { width: 8px; height: 8px; border-radius: 2px; }
.header-actions { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.search-btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px 0 14px;
  border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text-2); font-size: 14px;
}
.search-btn:hover { border-color: var(--text); color: var(--text); }
.kbd { font-family: var(--f-mono); font-size: 11px; padding: 3px 6px; border-radius: 6px; border: 1px solid var(--line-2); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: rgba(8, 9, 12, .92); }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 28px; padding-bottom: 28px; font-family: var(--f-mono); font-size: 13px; color: var(--text-2); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 22px; }
.site-footer a { color: var(--text-2); text-decoration: none; padding: 12px 0; }
.site-footer a:hover { color: var(--text); }

/* ---------- Space + cursor layers ---------- */
.space-bg { position: absolute; left: 0; top: 0; width: 100%; height: 980px; z-index: -1; pointer-events: none; overflow: hidden; }
.space-bg canvas { display: block; width: 100%; height: 100%; }
.cursor-layer { position: fixed; left: 0; top: 0; width: 100%; height: 100vh; pointer-events: none; z-index: 44; }
.dots { background-image: radial-gradient(rgba(242, 243, 246, .07) 1px, transparent 1px); background-size: 28px 28px; }

/* ---------- Motion ---------- */
.reveal { animation: rv 900ms var(--ease) both; animation-delay: var(--d, 0s); }
@keyframes rv { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* Scroll-triggered reveal: fires once an element first enters the viewport,
   works the same whether you scroll down into it or back up into it, since
   it is driven by IntersectionObserver rather than a scroll-position check. */
.io-reveal { opacity: 0; transform: translateY(22px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); transition-delay: var(--d, 0s); }
.io-reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .io-reveal { opacity: 1; transform: none; transition: none; }
}
.pulse { animation: pl 2.2s ease-in-out infinite; }
@keyframes pl { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
.cur { display: inline-block; width: 9px; height: 1.1em; background: var(--orange); vertical-align: text-bottom; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ==========================================================================
   Home
   ========================================================================== */
.hero { position: relative; height: clamp(720px, 100vh, 980px); overflow: hidden; border-bottom: 1px solid rgba(35, 39, 51, .6); }
.hero__scrim { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse 46% 40% at 50% 52%, rgba(2, 3, 6, .62) 0%, rgba(2, 3, 6, .25) 55%, rgba(2, 3, 6, 0) 80%); }
.hero__content {
  position: absolute; inset: 0; z-index: 2; padding: 80px 24px 104px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; text-align: center;
}
.hero__badge {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px; border-radius: 999px;
  border: 1px solid rgba(242, 243, 246, .16); background: rgba(8, 9, 12, .55); font-size: 14px; color: var(--soft-2);
}
.hero__role { font-family: var(--f-mono); font-size: 13px; letter-spacing: .18em; color: var(--peach); }
.hero__name {
  font-family: var(--f-display); font-weight: 780; font-size: clamp(56px, 7.4vw, 118px);
  line-height: .9; letter-spacing: -.05em; text-shadow: 0 10px 60px rgba(5, 6, 10, .8);
}
.hero__line { max-width: 640px; font-family: var(--f-display); font-weight: 500; font-size: clamp(22px, 2.5vw, 34px); line-height: 1.2; letter-spacing: -.02em; color: var(--soft); }
.hero__cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; padding-top: 6px; }
.scroll-hint {
  position: absolute; left: 0; right: 0; bottom: 40px; width: max-content; margin: 0 auto; z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: 10px; min-height: 44px;
  text-decoration: none; font-family: var(--f-mono); font-size: 11px; letter-spacing: .2em; color: var(--soft-2);
}
.scroll-hint span { position: relative; width: 1px; height: 36px; background: rgba(242, 243, 246, .25); overflow: hidden; }
.scroll-hint span::after { content: ""; position: absolute; left: -1px; top: 0; width: 3px; height: 10px; border-radius: 2px; background: var(--orange); animation: sc 2.2s ease-in-out infinite; }
@keyframes sc { 0% { transform: translateY(-10px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(36px); opacity: 0; } }

.impact { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.impact > div { padding: 36px 24px; display: flex; flex-direction: column; gap: 6px; border-right: 1px solid var(--line); }
.impact > div:last-child { border-right: 0; }
.impact strong { font-family: var(--f-display); font-weight: 750; font-size: 48px; line-height: 1; letter-spacing: -.03em; }
.impact span { font-size: 15px; color: var(--text-2); }

/* embeddings panel */
.qbtn { min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text-2); font-size: 13px; }
.qbtn[aria-pressed="true"] { color: var(--bg); background: var(--qc, var(--orange)); border-color: var(--qc, var(--orange)); }
.hits { display: flex; flex-direction: column; gap: 4px; font-family: var(--f-mono); font-size: 12px; }
.hit { display: grid; grid-template-columns: 26px minmax(0, 1fr) 44px; gap: 8px; align-items: center; min-height: 32px; padding: 0 10px; border-radius: 8px; background: var(--surface); }
.hit span:nth-child(2) { color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hit span:last-child { text-align: right; }
.legend { position: absolute; left: 14px; right: 14px; bottom: 12px; display: flex; flex-wrap: wrap; gap: 6px 14px; font: 11px var(--f-mono); color: var(--text-2); pointer-events: none; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.bullets { display: flex; flex-direction: column; gap: 10px; font-size: 15px; color: var(--soft); }
.bullets li { display: flex; gap: 12px; align-items: baseline; list-style: none; }
.bullets li::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--b, var(--orange)); flex-shrink: 0; transform: translateY(-2px); }
.bullets { padding: 0; margin: 0; }

/* code editor */
.editor-tabs { display: flex; }
.editor-tab { min-height: 44px; padding: 0 16px; border: none; border-top: 2px solid transparent; background: transparent; color: var(--text-2); font: 13px var(--f-mono); }
.editor-tab[aria-selected="true"] { background: var(--surface); color: var(--text); border-top-color: var(--orange); }
.lights { display: flex; align-items: center; gap: 7px; padding: 0 16px; }
.lights i { width: 11px; height: 11px; border-radius: 50%; background: var(--line-2); }
.run-btn { display: inline-flex; align-items: center; gap: 6px; margin: 6px 8px; min-height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-2); background: transparent; color: var(--cyan); font: 12px var(--f-mono); }
.code { display: grid; grid-template-columns: 44px minmax(0, 1fr); font-family: var(--f-mono); font-size: 14px; line-height: 1.9; }
.code pre { margin: 0; font-family: inherit; }
.code .ln { padding: 20px 12px 20px 0; text-align: right; color: var(--line-3); border-right: 1px solid #1D212B; }
.code .src { padding: 20px; overflow-x: auto; color: var(--soft); }
.k { color: var(--orange); } .s { color: var(--cyan); } .n { color: var(--violet); } .c { color: var(--text-3); font-style: italic; }
.status-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 7px 14px; background: var(--orange); color: var(--bg); font: 12px var(--f-mono); }
.attn { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.tokens { display: flex; gap: 6px; }
.token {
  flex: 1 1 0; min-width: 0; min-height: 54px; padding: 8px 4px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text);
  font: 14px var(--f-mono); display: flex; flex-direction: column; align-items: center; gap: 7px;
}
.token[aria-pressed="true"] { border-color: var(--orange); background: rgba(255, 133, 71, .14); }
.token b { display: block; width: 100%; height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.token b i { display: block; height: 100%; background: var(--orange); }
.matrix { display: flex; flex-direction: column; gap: 4px; }
.mrow { display: grid; grid-template-columns: 52px repeat(5, minmax(0, 1fr)); gap: 4px; align-items: center; font: 11px var(--f-mono); color: var(--text-3); }
.mrow > span:first-child { text-align: left; }
.mcell { height: 30px; border-radius: 6px; display: flex; align-items: center; justify-content: center; }
.contrib { overflow-x: auto; padding-bottom: 4px; }
.contrib__grid { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 10px); grid-auto-columns: 10px; gap: 3px; width: max-content; }
.contrib__grid span { width: 10px; height: 10px; border-radius: 3px; }
.contrib__legend { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); }
.contrib__legend span { width: 10px; height: 10px; border-radius: 3px; }

/* services, process */
.service { position: relative; padding: 30px 26px 26px; gap: 14px; }
.service::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--accent, var(--orange)), transparent 130%); border-radius: 24px 24px 0 0; }
.service__icon { width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; box-shadow: 0 0 0 1px rgba(255,255,255,.04) inset; }
.service__idx { position: absolute; top: 16px; right: 20px; font-family: var(--f-mono); font-size: 11px; color: var(--text-3); letter-spacing: .08em; }
.service ul { list-style: none; margin: 0; padding: 14px 0 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--soft); }
.service li { display: flex; gap: 10px; align-items: baseline; }
.service li::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--b); flex-shrink: 0; transform: translateY(-2px); }
.service__signal { display: flex; align-items: center; gap: 8px; margin-top: 2px; padding-top: 12px; border-top: 1px solid var(--line); font-family: var(--f-mono); font-size: 12.5px; color: var(--accent, var(--orange)); }
.service__signal i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 22%, transparent); }
.service__proof { margin-top: auto; padding-top: 14px; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.service__proof a { color: var(--accent, var(--orange)); font-weight: 500; }
.service__proof a:hover { text-decoration: underline; }

/* AI-flavoured cards get a soft pulsing glow ring behind the icon, like a model "thinking" */
.service--ai .service__icon, .service.is-ai .service__icon { position: relative; }
.service--ai .service__icon::before, .service.is-ai .service__icon::before {
  content: ""; position: absolute; inset: -6px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent, var(--orange)) 35%, transparent), transparent 70%);
  animation: ai-pulse 2.6s ease-in-out infinite;
}
@keyframes ai-pulse { 0%, 100% { opacity: .35; transform: scale(.9); } 50% { opacity: .9; transform: scale(1.12); } }
.ai-badge { display: inline-flex; align-items: center; gap: 6px; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .08em; color: var(--accent, var(--orange)); }
.ai-badge i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; animation: pl 1.6s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  .service--ai .service__icon::before, .service.is-ai .service__icon::before, .ai-badge i { animation: none; }
}
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; }
.step { padding: 30px 26px; display: flex; flex-direction: column; gap: 14px; border-right: 1px solid var(--line); background: var(--surface); }
.step:last-child { border-right: 0; }
.step__num { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font: 14px var(--f-mono); }
.step h3 { font-family: var(--f-display); font-weight: 700; font-size: 23px; }

/* featured work + mini visuals */
.featured { border-radius: 24px; }
.featured__body { padding: 36px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 44px; align-items: center; }
.metric { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.metric strong { font-family: var(--f-display); font-weight: 700; font-size: 26px; }
.metric span { font-size: 13px; color: var(--text-2); }
.chat-mock { background: var(--bg); border: 1px solid var(--line); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 12px; font-size: 15px; line-height: 1.55; }
.bubble { max-width: 86%; padding: 11px 15px; }
.bubble--me { align-self: flex-end; background: var(--orange); color: var(--bg); border-radius: 16px 16px 4px 16px; }
.bubble--ai { background: var(--surface-2); border: 1px solid var(--line); border-radius: 16px 16px 16px 4px; display: flex; flex-direction: column; gap: 10px; }
.cite { padding: 4px 8px; border-radius: 6px; background: rgba(54, 209, 230, .12); color: var(--cyan); font: 11px var(--f-mono); }
.mini { height: 170px; background: #12141A; position: relative; overflow: hidden; }
.mini--grid { background-image: linear-gradient(#1A1D25 1px, transparent 1px), linear-gradient(90deg, #1A1D25 1px, transparent 1px); background-size: 28px 28px; }
.bbox { position: absolute; border: 2px solid var(--c); border-radius: 6px; }
.bbox::before { content: attr(data-label); position: absolute; left: -2px; top: -22px; padding: 2px 8px; border-radius: 5px 5px 0 0; background: var(--c); color: var(--bg); font: 11px var(--f-mono); }
.mini--term { padding: 18px 20px; display: flex; flex-direction: column; gap: 9px; font: 12px var(--f-mono); color: var(--text-2); }
.mini--pipe { padding: 20px; display: flex; align-items: center; }
.pipe { display: flex; align-items: center; width: 100%; }
.pipe span { flex-shrink: 0; padding: 9px 11px; border-radius: 10px; border: 1px solid var(--line-2); font: 12px var(--f-mono); color: var(--text-2); }
.pipe i { flex: 1; height: 1px; background: var(--line-2); }
.lang { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: auto; padding-top: 10px; font-size: 13px; color: var(--text-2); }
.lang .link { margin-left: auto; }

/* lab notebook */
.cell { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; padding: 22px 20px; border-bottom: 1px solid var(--line); }
.cell:last-child { border-bottom: 0; }
.cell__in { font: 12px var(--f-mono); color: var(--text-3); padding-top: 3px; }
.cell a { align-self: flex-start; color: var(--text); text-decoration: none; font-family: var(--f-display); font-weight: 650; font-size: 21px; }
.cell a:hover { color: var(--orange); }
.pkg { margin: 0; padding: 18px 20px; overflow-x: auto; font: 13px/1.85 var(--f-mono); color: var(--soft); }

/* stack globe */
.stack-item { padding: 6px 10px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); font: 12px var(--f-mono); }
.cat-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text-2); font-size: 14px; }
.cat-btn[aria-pressed="true"] { background: var(--surface-2); color: var(--text); border-color: var(--c); }

/* now + repos */
.now { border-top: 1px solid var(--line); }
.now > div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.now dt { font: 12px var(--f-mono); padding-top: 3px; }
.now dd { margin: 0; font-size: 16px; line-height: 1.55; color: var(--soft); }
.repo { padding: 20px; gap: 10px; }
.repo__name { display: flex; align-items: center; gap: 8px; font: 14px var(--f-mono); color: var(--orange); }

/* experience */
.photo { width: 112px; height: 112px; border-radius: 22px; border: 1px dashed var(--line-3); background: var(--surface); display: grid; place-items: center; font: 12px var(--f-mono); color: var(--text-2); text-align: center; }
.gitlog { padding: 22px 20px; display: flex; flex-direction: column; font: 14px/1.6 var(--f-mono); }
.commit { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; padding-bottom: 22px; }
.commit:last-child { padding-bottom: 0; }
.commit > span { color: var(--cyan); }
.commit__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.commit__meta .hash { color: var(--orange); }
.commit__meta .when { margin-left: auto; font-size: 12px; color: var(--text-2); }
.commit h3 { font: 500 17px var(--f-body); color: var(--text); margin: 6px 0; }
.commit p { font: 300 15px/1.6 var(--f-body); color: var(--text-2); }

/* testimonials */
.quote { padding: 30px; gap: 22px; }
.quote__mark { font-family: var(--f-display); font-weight: 800; font-size: 64px; line-height: .6; height: 30px; }
.quote blockquote { margin: 0; font-size: 18px; line-height: 1.6; font-weight: 300; color: var(--soft); }
.quote figcaption { margin-top: auto; display: flex; align-items: center; gap: 12px; }
.avatar-ph { width: 42px; height: 42px; border-radius: 12px; background: var(--surface-2); border: 1px dashed var(--line-3); }

/* writing rows */
.post-rows { border-top: 1px solid var(--line); }
.post-row {
  display: grid; grid-template-columns: minmax(200px, 1fr) minmax(0, 2fr) auto; align-items: center; gap: 12px 24px;
  padding: 26px 12px; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; transition: background 150ms ease;
}
.post-row:hover { background: var(--surface); color: var(--text); }
.post-row__meta { display: flex; align-items: center; gap: 12px; font: 12px var(--f-mono); color: var(--text-2); }
.post-row__title { font-family: var(--f-display); font-weight: 650; font-size: 24px; line-height: 1.2; letter-spacing: -.015em; }
.post-row__time { font: 12px var(--f-mono); color: var(--text-2); }

/* contact */
.contact-title { font-family: var(--f-display); font-weight: 780; font-size: clamp(48px, 6.6vw, 96px); line-height: .94; letter-spacing: -.045em; }
.field { display: flex; flex-direction: column; gap: 8px; font-family: var(--f-mono); font-size: 14px; }
.field label { color: var(--text-2); }
.field label b { color: var(--cyan); font-weight: 400; }
.input {
  min-height: 46px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--bg); color: var(--text); font-family: var(--f-mono); font-size: 14px;
  transition: border-color 150ms ease;
}
textarea.input { padding: 12px 14px; line-height: 1.6; resize: vertical; }
.input:focus { outline: none; border-color: var(--orange); }
.term-out { padding: 24px; display: flex; flex-direction: column; gap: 10px; font: 14px/1.7 var(--f-mono); color: var(--text-2); }

/* command palette */
.palette { position: fixed; inset: 0; z-index: 50; display: none; align-items: flex-start; justify-content: center; padding: 96px 16px 16px; background: rgba(8, 9, 12, .72); }
.palette.is-open { display: flex; }
.palette__box { width: min(100%, 600px); background: var(--surface); border: 1px solid var(--line-2); border-radius: 18px; overflow: hidden; box-shadow: 0 40px 80px rgba(0, 0, 0, .6); }
.palette__head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.palette__head input { flex: 1; min-width: 0; min-height: 40px; border: none; background: transparent; font-size: 16px; outline: none; }
.palette__list { padding: 8px; display: flex; flex-direction: column; max-height: 360px; overflow-y: auto; }
.palette__list a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 0 12px; border-radius: 10px; color: var(--text); text-decoration: none; font-size: 15px; }
.palette__list a:hover, .palette__list a:focus-visible { background: var(--surface-2); color: var(--text); }
.palette__list small { font: 12px var(--f-mono); color: var(--text-3); }

/* chat (AI twin) */
.fab-dock { position: fixed; right: 22px; bottom: 22px; z-index: 45; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; pointer-events: none; }
.fab-dock > * { pointer-events: auto; }
.fab-row { display: flex; align-items: center; gap: 10px; }
.fab-top { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; background: rgba(8, 9, 12, .8); border: 1px solid var(--line-2); color: var(--text); }
.fab-top:hover { border-color: var(--text); color: var(--text); }
.fab-chat { border-radius: 999px; min-height: 50px; padding: 0 20px; box-shadow: 0 16px 40px -14px rgba(255, 133, 71, .8); }
.chat { width: min(92vw, 390px); background: rgba(15, 17, 22, .97); border: 1px solid var(--line-2); border-radius: 22px; overflow: hidden; display: none; flex-direction: column; box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .8); }
.chat.is-open { display: flex; }
.chat__head { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 18px; border-bottom: 1px solid var(--line); background: var(--bar); }
.chat__log { max-height: 330px; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 86%; padding: 11px 14px; font-size: 14px; line-height: 1.55; }
.msg--ai { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--line); border-radius: 16px 16px 16px 4px; color: #E6E8EE; }
.msg--me { align-self: flex-end; background: var(--orange); color: var(--bg); border-radius: 16px 16px 4px 16px; }
.typing { align-self: flex-start; display: flex; gap: 5px; padding: 12px 14px; border-radius: 16px 16px 16px 4px; background: var(--surface-2); border: 1px solid var(--line); }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--text-2); animation: pl 1.2s ease-in-out infinite; }
.typing i:nth-child(2) { animation-delay: .25s; } .typing i:nth-child(3) { animation-delay: .5s; }
.chat__suggest { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 12px; }
.chat__suggest button { min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--bar); color: var(--soft); font-size: 12px; }
.chat__form { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line); }
.chat__form input { flex: 1; min-width: 0; min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg); font-size: 14px; }

/* ==========================================================================
   Projects
   ========================================================================== */
.stat { padding: 8px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); color: var(--soft); font: 13px var(--f-mono); }
.heat { padding: 22px 24px; background: var(--surface-2); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px; }
.heat span { height: 14px; border-radius: 3px; }
.proj__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: auto; padding-top: 6px; }
.drawer { position: fixed; inset: 0; z-index: 60; display: none; justify-content: flex-end; }
.drawer.is-open { display: flex; }
.drawer__shade { position: absolute; inset: 0; border: none; padding: 0; background: rgba(8, 9, 12, .72); }
.drawer__panel { position: relative; width: min(100%, 600px); height: 100%; overflow-y: auto; background: var(--surface); border-left: 1px solid var(--line-2); display: flex; flex-direction: column; }
.drawer__body { padding: 32px 28px 40px; display: flex; flex-direction: column; gap: 26px; }
.drawer h2 { font-family: var(--f-display); font-weight: 750; font-size: 40px; line-height: 1; letter-spacing: -.03em; }
.metrics3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.metrics3 span { padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); font-size: 14px; line-height: 1.4; }
.arch { overflow-x: auto; }
.arch__row { display: flex; align-items: center; min-width: 940px; }
.arch__node { flex: 1; border: 1px solid var(--line-2); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.arch__node small { font: 11px var(--f-mono); color: var(--text-3); }
.arch__node b { font-size: 15px; font-weight: 500; }
.arch__row > i { width: 28px; height: 1px; background: var(--line-3); flex-shrink: 0; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; }
.table { width: 100%; min-width: 780px; border-collapse: collapse; font-size: 15px; }
.table th { text-align: left; padding: 18px 24px; font: 400 12px var(--f-mono); color: var(--text-3); border-bottom: 1px solid var(--line); }
.table td { padding: 20px 24px; border-bottom: 1px solid var(--line); transition: background 150ms ease; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--surface-2); }
.table td small { display: block; font-weight: 300; color: var(--text-2); font-size: 15px; }
.table td b { font-weight: 500; font-size: 16px; }
.table .mono { font-size: 12px; color: var(--text-2); }
.cta-card { background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: 48px 40px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px; }

/* ==========================================================================
   Blog
   ========================================================================== */
.diff { background: var(--bg); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; font: 13px/1.9 var(--f-mono); }
.diff div { padding: 0 16px; }
.diff .rm { background: rgba(255, 133, 71, .10); color: #FFB08A; }
.diff .add { background: rgba(54, 209, 230, .10); color: #8BE6F2; }
.search { position: relative; width: min(100%, 340px); }
.search svg { position: absolute; left: 14px; top: 15px; }
.search input { width: 100%; min-height: 46px; padding: 0 14px 0 40px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); font-size: 15px; }
.search input:focus { outline: none; border-color: var(--orange); }
.post-card__path { padding: 11px 18px; border-bottom: 1px solid var(--line); background: var(--bar); font: 11px var(--f-mono); color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post-card h3 { font-family: var(--f-display); font-weight: 680; font-size: 23px; line-height: 1.15; letter-spacing: -.02em; }
.post-card__foot { margin-top: auto; padding-top: 8px; display: flex; align-items: center; justify-content: space-between; font: 12px var(--f-mono); color: var(--text-2); }
.empty { border: 1px dashed var(--line-3); border-radius: 22px; padding: 44px 24px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.tag { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--text-2); text-decoration: none; font: 13px var(--f-mono); }
.tag:hover { border-color: var(--text); color: var(--text); }

/* ==========================================================================
   Post
   ========================================================================== */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 40; pointer-events: none; }
.progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--cyan), var(--orange)); border-radius: 0 2px 2px 0; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font: 13px var(--f-mono); color: var(--text-3); }
.crumbs a { color: var(--text-2); text-decoration: none; padding: 12px 0; }
.crumbs a:hover { color: var(--text); }
.outline { padding: 8px; display: flex; flex-direction: column; font-size: 14px; }
.outline a { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 10px; border-radius: 8px; color: var(--text-2); text-decoration: none; }
.outline a:hover { background: var(--surface-2); color: var(--text); }
.outline a::before { content: "#"; font: 11px var(--f-mono); color: var(--cyan); }
.prose { flex: 999 1 560px; min-width: 0; max-width: 760px; display: flex; flex-direction: column; gap: 22px; font-size: 18px; line-height: 1.75; font-weight: 300; color: var(--soft-2); }
.prose h2 { margin-top: 20px; font-family: var(--f-display); font-weight: 700; font-size: 32px; line-height: 1.15; letter-spacing: -.02em; color: var(--text); scroll-margin-top: 24px; }
.prose ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; }
.prose strong { font-weight: 500; color: var(--text); }
.prose a { color: var(--text); text-decoration-color: var(--orange); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.codeblock { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.codeblock__bar { display: flex; align-items: center; justify-content: space-between; padding: 6px 6px 6px 16px; border-bottom: 1px solid var(--line); background: var(--bar); font: 12px var(--f-mono); color: var(--text-2); }
.codeblock pre { margin: 0; padding: 20px; overflow-x: auto; font: 13.5px/1.8 var(--f-mono); color: var(--soft); }
.copy-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-2); background: transparent; color: var(--text-2); font: 12px var(--f-mono); }
.copy-btn.is-done { color: var(--cyan); }
.callout { border: 1px solid var(--orange); background: rgba(255, 133, 71, .08); border-radius: 16px; padding: 22px 24px; display: flex; flex-direction: column; gap: 8px; }
.callout p { font-size: 19px; line-height: 1.6; font-weight: 400; color: var(--text); }
.author { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 28px; display: flex; flex-wrap: wrap; gap: 22px; align-items: center; }
.monogram { width: 46px; height: 46px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line-2); display: grid; place-items: center; font: 13px var(--f-mono); color: var(--orange); flex-shrink: 0; }

/* ---------- Small screens ---------- */
@media (max-width: 720px) {
  .section { padding: 64px 0; }
  .post-row { grid-template-columns: 1fr; }
  .impact > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .step { border-right: 0; border-bottom: 1px solid var(--line); }
  .header-actions .search-btn span { display: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .pulse, .cur, .scroll-hint span::after, .typing i { animation: none; }
  .cd:hover, .btn--primary:hover { transform: none; }
}

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 70; transform: translate(-50%, 20px);
  padding: 12px 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line-2);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .5); font-size: 14px; opacity: 0; pointer-events: none;
  transition: opacity 200ms ease, transform 200ms ease;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
