:root {
  --bg: #070B0E; --surface: #0B1418; --deep: #050809; --hair: #112026; --border: #1C3A42;
  --text: #DCEFF2; --strong: #F2FBFC; --muted: #6F8A92; --sec: #9FB6BC;
  --acc: #22D3EE; --acc-h: #67E8F9; --coral: #FB7185; --on-acc: #031418;
  --scan: rgba(255, 255, 255, .025);
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
  --sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --bg: #F2F7F8; --surface: #FFFFFF; --deep: #E8F0F2; --hair: #DCE7EA; --border: #B5CBD1;
    --text: #0B1418; --strong: #02070A; --muted: #52707A; --sec: #355660;
    --acc: #0E7490; --acc-h: #155E75; --coral: #BE123C; --on-acc: #FFFFFF;
    --scan: rgba(0, 0, 0, .03); color-scheme: light;
  }
}
[data-theme="light"] {
  --bg: #F2F7F8; --surface: #FFFFFF; --deep: #E8F0F2; --hair: #DCE7EA; --border: #B5CBD1;
  --text: #0B1418; --strong: #02070A; --muted: #52707A; --sec: #355660;
  --acc: #0E7490; --acc-h: #155E75; --coral: #BE123C; --on-acc: #FFFFFF;
  --scan: rgba(0, 0, 0, .03); color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.65 var(--sans); overflow-x: hidden;
}
h1, h2, h3, p, ul, ol, pre { margin: 0; }
a { color: var(--acc); text-underline-offset: 3px; }
a:hover { color: var(--acc-h); }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.wrap { max-width: 1168px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--acc); color: var(--on-acc); padding: 12px 16px; }
.skip:focus { left: 8px; top: 8px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--acc); margin-right: 9px; flex: none; }

/* header */
.hdr { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--hair); }
.hdr-in { display: flex; align-items: center; gap: 8px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; min-height: 44px; margin-right: auto; font: 700 14px/1 var(--mono); color: var(--strong); text-decoration: none; white-space: nowrap; min-width: 0; }
.nav { display: none; }
.nav a { display: flex; align-items: center; min-height: 48px; padding: 0 24px; font: 500 15px/1 var(--mono); color: var(--sec); text-decoration: none; }
.nav a:hover { color: var(--acc); }
.nav.open { display: block; position: absolute; left: 0; right: 0; top: 100%; background: var(--bg); border-bottom: 1px solid var(--border); }
.hbtn { min-height: 44px; min-width: 44px; padding: 0 12px; background: transparent; color: var(--sec); border: 1px solid var(--border); border-radius: 8px; font: 500 13px/1 var(--mono); cursor: pointer; }
.hbtn:hover { color: var(--acc); border-color: var(--acc); }
.theme-btn .lbl { display: none; }
html:not(.js) .menu-btn, html:not(.js) .theme-btn { display: none; }
html:not(.js) .nav { display: flex; flex-wrap: wrap; }
html:not(.js) .nav a { padding: 0 12px; }
section[id] { scroll-margin-top: 68px; }

/* shared */
.prompt { font: 500 14px/1.4 var(--mono); color: var(--muted); margin-bottom: 12px; }
.ps { color: var(--acc); margin-right: 6px; }
h1, h2, h3 { font-family: var(--mono); color: var(--strong); line-height: 1.15; }
h2 { font-size: clamp(26px, 6vw, 38px); font-weight: 700; margin-bottom: 16px; }
.lead { color: var(--sec); max-width: 70ch; margin-bottom: 32px; }
.sec { padding: 64px 0; }
.sec.alt { background: var(--surface); border-block: 1px solid var(--hair); }
.label { font: 500 13px/1.4 var(--mono); color: var(--muted); margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-block; padding: 3px 9px; border: 1px solid var(--border); border-radius: 999px; font: 500 12px/1.4 var(--mono); color: var(--sec); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 20px; min-width: 0; }
.sec.alt .card { background: var(--bg); }
.two { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 8px; border: 1px solid var(--acc); font: 500 15px/1.2 var(--mono); text-decoration: none; max-width: 100%; overflow-wrap: anywhere; }
.btn-primary { background: var(--acc); color: var(--on-acc); }
.btn-primary:hover { background: var(--acc-h); color: var(--on-acc); border-color: var(--acc-h); box-shadow: 0 0 22px color-mix(in srgb, var(--acc) 35%, transparent); }
.btn-ghost { background: transparent; color: var(--acc); }
.btn-ghost:hover { color: var(--acc-h); border-color: var(--acc-h); box-shadow: 0 0 22px color-mix(in srgb, var(--acc) 25%, transparent); }
.scan { position: relative; isolation: isolate; }
.scan::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: repeating-linear-gradient(0deg, var(--scan) 0 1px, transparent 1px 3px); }

/* hero */
.hero { padding: 56px 0 48px; }
.hero-grid { display: grid; gap: 40px; grid-template-columns: minmax(0, 1fr); }
.hero h1 { font-size: clamp(40px, 9vw, 76px); font-weight: 700; letter-spacing: -.02em; margin-bottom: 28px; }
.tagline { font: 500 clamp(16px, 4.2vw, 24px)/1.3 var(--mono); color: var(--strong); margin-bottom: 32px; white-space: nowrap; }
.typed { display: inline-block; overflow: hidden; vertical-align: bottom; }
.cursor { display: inline-block; width: .6ch; height: 1.15em; margin-left: 3px; background: var(--coral); vertical-align: text-bottom; }
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-img { justify-self: center; }
.headshot { width: 168px; height: 168px; border-radius: 50%; object-fit: cover; display: block; margin: 0 auto; }
.headshot.ph { display: flex; align-items: center; justify-content: center; padding: 24px; text-align: center; border: 1px dashed var(--border); background: var(--surface); color: var(--muted); font: 500 13px/1.5 var(--mono); }
.pipe { border-block: 1px solid var(--hair); background: var(--deep); }
.pipe-in { display: flex; flex-direction: column; gap: 4px; padding-block: 14px; font: 500 14px/1.5 var(--mono); }
.pipe b { color: var(--acc); font-weight: 500; }

/* search */
.sbox { border: 1px solid var(--border); border-radius: 999px; padding: 10px 18px; margin-bottom: 18px; font: 400 15px/1.4 var(--mono); color: var(--strong); background: var(--deep); overflow-wrap: anywhere; }
.results { list-style: none; padding: 0; display: grid; gap: 18px; }
.r-url { font: 400 13px/1.4 var(--mono); color: var(--muted); overflow-wrap: anywhere; }
.r-title { font: 500 17px/1.35 var(--sans); color: var(--acc); }
.r-snip { color: var(--sec); font-size: 16px; }
.ai { order: -1; }
.ai-lines { display: grid; gap: 14px; }
.ai-line { color: var(--strong); }
.cite { display: inline-block; min-width: 20px; padding: 0 5px; margin-left: 4px; border: 1px solid var(--border); border-radius: 5px; font: 500 12px/18px var(--mono); text-align: center; color: var(--acc); vertical-align: 1px; }
.sources { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 8px; }

/* facts */
.triples { list-style: none; padding: 0; font: 400 14px/1.6 var(--mono); }
.triples li { padding: 10px 0; border-bottom: 1px solid var(--hair); min-height: 44px; overflow-wrap: anywhere; }
.t-s { color: var(--coral); }
.t-p { color: var(--muted); }
.triples a, .links-row a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; justify-content: center; padding: 0 6px; margin-block: -10px; }
.triples .links-row a { margin-block: 0; }
.links-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.links-row .c { color: var(--muted); margin-right: 4px; }
.code { background: var(--deep); border: 1px solid var(--hair); border-radius: 8px; padding: 16px; overflow-x: auto; max-width: 100%; font: 400 13px/1.65 var(--mono); color: var(--text); tab-size: 2; }
.code code { font: inherit; }
.tk-k { color: var(--acc); } .tk-s { color: var(--strong); } .tk-p { color: var(--muted); } .tk-c { color: var(--muted); font-style: italic; }

/* graph */
.graph { position: relative; border: 1px solid var(--hair); border-radius: 10px; padding: 12px; background-color: var(--deep); background-image: linear-gradient(var(--hair) 1px, transparent 1px), linear-gradient(90deg, var(--hair) 1px, transparent 1px); background-size: 48px 48px; }
.g-center { display: flex; align-items: center; justify-content: center; min-height: 56px; margin-bottom: 8px; border: 1px solid var(--acc); border-radius: 10px; background: var(--surface); color: var(--strong); font: 700 17px/1.2 var(--mono); box-shadow: 0 0 24px color-mix(in srgb, var(--acc) 20%, transparent); position: relative; z-index: 2; }
.g-nodes { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.g-n { display: flex; align-items: center; gap: 10px; min-height: 48px; }
.g-line { display: none; }
.g-edge { flex: 0 0 9.2em; text-align: right; white-space: nowrap; font: 500 12px/1.2 var(--mono); color: var(--coral); }
.g-edge::after { content: " →"; }
.g-edge:empty::after { content: ""; }
.g-node { flex: 1; min-width: 0; display: inline-flex; align-items: center; min-height: 48px; padding: 0 16px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--strong); font: 500 15px/1.2 var(--mono); text-decoration: none; overflow-wrap: anywhere; }
a.g-node { color: var(--acc); }
.g-node.ph { border-style: dashed; color: var(--muted); background: transparent; }
.g-node:hover, .g-node:focus-visible { border-color: var(--acc); box-shadow: 0 0 20px color-mix(in srgb, var(--acc) 30%, transparent); }
.g-n:has(.g-node:hover) .g-edge, .g-n:has(.g-node:focus-visible) .g-edge { color: var(--coral); text-shadow: 0 0 10px var(--coral); }

/* projects */
.projects { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); }
.pcard { display: block; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 22px; text-decoration: none; color: var(--text); min-width: 0; }
.pcard:hover { border-color: var(--acc); box-shadow: 0 0 28px color-mix(in srgb, var(--acc) 18%, transparent); color: var(--text); }
.p-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; font: 400 13px/1.4 var(--mono); color: var(--muted); margin-bottom: 10px; }
.tag { color: var(--acc); font-weight: 500; }
.pcard h3 { font-size: 22px; margin-bottom: 8px; }
.pcard p { color: var(--sec); margin-bottom: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* work */
.log { list-style: none; padding: 0; font: 400 15px/1.55 var(--mono); border-top: 1px solid var(--hair); }
.log li { display: grid; gap: 4px 20px; padding: 14px 0; border-bottom: 1px solid var(--hair); }
.log .yr { color: var(--acc); font-weight: 500; }
.log .msg { font-family: var(--sans); font-size: 16px; color: var(--text); }
.vids { display: grid; gap: 16px; list-style: none; padding: 0; }
.vids a { display: block; min-height: 44px; padding: 16px; border: 1px solid var(--border); border-radius: 10px; text-decoration: none; background: var(--surface); }
.vids h3 { font-size: 18px; color: var(--acc); margin-bottom: 6px; }
.vids p { color: var(--sec); }

/* contact + footer */
.contact { padding-bottom: 72px; }
.contact h2 { margin-bottom: 24px; }
.ftr { border-top: 1px solid var(--hair); background: var(--deep); padding: 48px 0 24px; font-size: 16px; }
.ftr-grid { display: grid; gap: 32px; grid-template-columns: minmax(0, 1fr); }
.ftr-name { font: 700 18px/1.2 var(--mono); color: var(--strong); margin-bottom: 10px; display: flex; align-items: center; }
.ftr-bio { color: var(--sec); margin-bottom: 12px; max-width: 46ch; }
.plain { list-style: none; padding: 0; }
.plain a, .plain .flat { display: flex; align-items: center; min-height: 44px; overflow-wrap: anywhere; }
.plain .flat { color: var(--sec); }
.plain.inline { display: flex; flex-wrap: wrap; gap: 0 14px; }
.plain.inline a { min-width: 44px; justify-content: center; }
.ftr-bottom { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--hair); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 14px; }
.mono-s { font-family: var(--mono); }

/* 360px safety */
@media (max-width: 340px) { .tagline { font-size: 14px; } }
@media (max-width: 380px) { .hbtn { padding: 0 8px; } .hdr-in { gap: 6px; } }

/* 761+ */
@media (min-width: 761px) {
  .sec { padding: 96px 0; }
  .hero { padding: 96px 0 80px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .hero-img { justify-self: end; }
  .headshot { width: 240px; height: 240px; }
  .nav { display: flex; margin-left: auto; position: static; }
  .nav a { padding: 0 14px; }
  .nav.open { position: static; border: 0; background: none; display: flex; }
  .brand { margin-right: 0; font-size: 15px; }
  .menu-btn { display: none; }
  .theme-btn .lbl { display: inline; }
  .pipe-in { flex-direction: row; justify-content: space-between; align-items: center; }
  .two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ai { order: 0; }
  .projects { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .log li { grid-template-columns: 130px minmax(0, 1fr); }
  .ftr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vids { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .graph { height: 560px; padding: 0; }
  .g-center { position: absolute; left: 50%; top: 50%; translate: -50% -50%; margin: 0; padding: 0 28px; min-height: 60px; }
  .g-nodes { display: block; }
  .g-n { position: absolute; inset: 0; display: block; pointer-events: none; min-height: 0; }
  .g-line { display: block; position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
  .g-line line { stroke: var(--coral); stroke-width: 1; opacity: .5; vector-effect: non-scaling-stroke; }
  .g-n:has(.g-node:hover) line, .g-n:has(.g-node:focus-visible) line { opacity: 1; stroke-width: 2; }
  .g-edge { position: absolute; translate: -50% -50%; flex: none; padding: 2px 8px; background: var(--deep); border-radius: 4px; white-space: nowrap; }
  .g-edge::after { content: none; }
  .g-edge:empty { display: none; }
  .g-node { position: absolute; translate: -50% -50%; flex: none; pointer-events: auto; white-space: nowrap; min-height: 44px; }
}
@media (min-width: 1101px) {
  .ftr-grid { grid-template-columns: 1.5fr 1fr 1fr 1.2fr; }
}

/* motion: everything below is absent under prefers-reduced-motion: reduce */
@keyframes type { from { width: 0; } to { width: calc(var(--tag-len) * 1ch); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes drift { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(6px, -4px); } 50% { transform: translate(-4px, 6px); } 75% { transform: translate(-6px, -3px); } }
@media (prefers-reduced-motion: no-preference) {
  .typed:not(.js-type) { width: 0; animation: type 1.7s steps(var(--tag-len)) .5s forwards; }
  .typed.js-type { width: auto; animation: none; overflow: visible; min-height: 1.25em; }
  .cursor { animation: blink 1.05s steps(1) infinite; }
  .js .ai-line { opacity: 0; }
  .js .ai.in .ai-line { animation: fadein .6s ease forwards; }
  .btn, .pcard, .g-node, .hbtn { transition: box-shadow .2s, border-color .2s, background-color .2s, color .2s; }
}

/* generated by build.js from data.json */
:root{--tag-len:29}
@media (min-width:761px){.g-n[data-k="0"] .g-node{left:50.00%;top:15.00%}.g-n[data-k="0"] .g-edge{left:50.00%;top:30.75%}.g-n[data-k="1"] .g-node{left:83.77%;top:32.50%}.g-n[data-k="1"] .g-edge{left:68.58%;top:40.38%}.g-n[data-k="2"] .g-node{left:83.77%;top:67.50%}.g-n[data-k="2"] .g-edge{left:68.58%;top:59.63%}.g-n[data-k="3"] .g-node{left:50.00%;top:85.00%}.g-n[data-k="3"] .g-edge{left:50.00%;top:69.25%}.g-n[data-k="4"] .g-node{left:16.23%;top:67.50%}.g-n[data-k="4"] .g-edge{left:31.42%;top:59.63%}.g-n[data-k="5"] .g-node{left:16.23%;top:32.50%}.g-n[data-k="5"] .g-edge{left:31.42%;top:40.38%}}
@media (prefers-reduced-motion:no-preference){.js .ai.in .ai-line:nth-child(1){animation-delay:0.3s}.js .ai.in .ai-line:nth-child(2){animation-delay:1.2s}.js .ai.in .ai-line:nth-child(3){animation-delay:2.1s}.js .ai.in .ai-line:nth-child(4){animation-delay:3.0s}}
@media (min-width:761px) and (prefers-reduced-motion:no-preference){.g-n[data-k="0"] .g-node{animation:drift 7.0s ease-in-out 0.0s infinite}.g-n[data-k="1"] .g-node{animation:drift 8.5s ease-in-out -1.7s infinite}.g-n[data-k="2"] .g-node{animation:drift 10.0s ease-in-out -3.4s infinite}.g-n[data-k="3"] .g-node{animation:drift 7.0s ease-in-out -5.1s infinite}.g-n[data-k="4"] .g-node{animation:drift 8.5s ease-in-out -6.8s infinite}.g-n[data-k="5"] .g-node{animation:drift 10.0s ease-in-out -8.5s infinite}}
