:root { color-scheme: light; }
html { scroll-behavior: smooth; }
* { box-sizing: border-box; }
body { margin: 0; overflow-x: hidden; background: var(--bg); color: var(--fg);
  font-family: 'Newsreader', Georgia, serif; font-size: 17px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; transition: background .35s, color .35s; }
a { color: inherit; text-decoration: none; }
::selection { background: color-mix(in oklab, var(--acc) 22%, transparent); }
.katex { font-size: 1.05em !important; }

[data-theme="light"] { --bg:oklch(0.975 0.008 85); --bg2:oklch(0.955 0.012 85); --card:oklch(0.968 0.009 85);
  --fg:oklch(0.22 0.015 60); --mut:oklch(0.45 0.012 60); --faint:oklch(0.6 0.012 60);
  --rule:oklch(0.885 0.012 85); --acc:oklch(0.55 0.13 30); --moss:oklch(0.5 0.1 155);
  --bloom1:oklch(0.52 0.1 155); --bloom2:oklch(0.58 0.13 32); --bloom3:oklch(0.68 0.11 78); --bloom4:oklch(0.52 0.09 348); }
[data-theme="dark"] { --bg:oklch(0.205 0.012 90); --bg2:oklch(0.235 0.012 90); --card:oklch(0.245 0.012 90);
  --fg:oklch(0.93 0.008 90); --mut:oklch(0.72 0.01 90); --faint:oklch(0.6 0.01 90);
  --rule:oklch(0.32 0.012 90); --acc:oklch(0.76 0.12 40); --moss:oklch(0.78 0.11 155);
  --bloom1:oklch(0.78 0.11 155); --bloom2:oklch(0.76 0.12 40); --bloom3:oklch(0.82 0.11 88); --bloom4:oklch(0.72 0.1 348); color-scheme: dark; }

.mono, .eyebrow, .num, .tag, .post-meta, .tags, .project-meta, .project-when, .label, .meta-link,
.site-header nav, .wordmark span, .site-footer, .hint, .status, .proj-open, .slot-label, .where, .method dt {
  font-family: 'JetBrains Mono', ui-monospace, monospace; text-transform: uppercase; letter-spacing: .14em; }

.site-header { position: sticky; top: 0; z-index: 40; display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 4px 24px; padding: 9px clamp(18px,4vw,44px); min-height: 62px;
  background: var(--bg); border-bottom: 1px solid var(--rule); }
.wordmark { display: flex; align-items: baseline; gap: 10px; }
.wordmark span { font-size: clamp(10px,2.4vw,12px); letter-spacing: .16em; white-space: nowrap; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--acc); }
.site-header nav { display: flex; flex: 1 1 auto; align-items: center; justify-content: flex-end;
  gap: clamp(13px,2.6vw,28px); font-size: clamp(10px,2.2vw,11px); color: var(--mut); white-space: nowrap; }
.site-header nav a { transition: color .2s; }
.site-header nav a:hover { color: var(--fg); }
#theme-toggle { width: 28px; height: 28px; padding: 0; border: 0; background: none; color: var(--fg);
  cursor: pointer; display: flex; align-items: center; justify-content: center; }
#theme-toggle svg { width: 17px; height: 17px; }

#rail { position: fixed; left: 16px; top: 84px; bottom: 28px; width: 30px; z-index: 30; pointer-events: none; display: none; }
#rail canvas { width: 100%; height: 100%; display: block; }

.hero { position: relative; min-height: calc(100svh - 72px); display: flex; align-items: center;
  padding: 64px 0; overflow: hidden; border-bottom: 1px solid var(--rule); }
#garden { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-veil { position: absolute; inset: 0; pointer-events: none; }
.hero-inner { position: relative; width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 clamp(18px,4vw,44px);
  animation: riseIn .9s cubic-bezier(.2,.7,.2,1) both; }
@keyframes riseIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.eyebrow { display: flex; align-items: center; gap: 12px; font-size: 11px; letter-spacing: .18em;
  color: var(--mut); margin-bottom: 28px; }
.eyebrow .rule { width: 34px; height: 1px; background: var(--moss); }
h1 { margin: 0; max-width: 15ch; font-weight: 300; font-size: clamp(44px,6.2vw,88px);
  line-height: 1.03; letter-spacing: -.02em; text-wrap: pretty; }
.lede { margin: 32px 0 0; max-width: 48ch; font-size: 20px; line-height: 1.6; color: var(--mut); text-wrap: pretty; }
.cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; }
.btn { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  padding: 13px 22px; border: 1px solid var(--fg); border-radius: 999px; transition: all .22s; }
.btn:hover { background: var(--fg); color: var(--bg); }
.btn.ghost { border-color: var(--rule); color: var(--mut); }
.btn.ghost:hover { background: none; border-color: var(--fg); color: var(--fg); }
.hint { margin-top: 34px; font-size: 10px; letter-spacing: .16em; color: var(--faint);
  font-family: 'JetBrains Mono', monospace; text-transform: uppercase; pointer-events: none; }

.band { max-width: 1180px; margin: 0 auto; padding: clamp(68px,9vw,110px) clamp(18px,4vw,44px) 30px; }
.page-top { padding-top: clamp(56px,7vw,88px); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.section-title { display: flex; align-items: baseline; gap: 18px; margin-bottom: 14px; }
.num { font-size: 11px; letter-spacing: .18em; color: var(--acc); }
h2 { margin: 0; font-weight: 300; font-size: clamp(30px,3.6vw,46px); letter-spacing: -.015em; }
.section-lede { margin: 0 0 44px; max-width: 54ch; color: var(--mut); font-size: 18px; }
.meta-link { font-size: 11px; color: var(--mut); }
.meta-link:hover { color: var(--acc); }
.empty { color: var(--faint); font-size: 18px; padding: 30px 0; border-top: 1px solid var(--rule); }

.post-row { display: block; padding: 30px 18px; border-top: 1px solid var(--rule); transition: background .2s, padding .2s; }
.post-row:last-of-type { border-bottom: 1px solid var(--rule); }
.post-row:hover { background: var(--bg2); padding-left: 28px; }
.post-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 16px; margin-bottom: 12px; }
.post-title { font-size: clamp(23px,2.6vw,29px); font-weight: 400; letter-spacing: -.01em; }
.tag { font-size: 10px; letter-spacing: .16em; color: var(--moss); }
.post-blurb { margin: 0 0 18px; max-width: 62ch; font-size: 17px; line-height: 1.6; color: var(--mut); }
.post-meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: 10px; color: var(--faint); }
.post-meta.top { margin-bottom: 20px; }

.project-highlight { padding: 30px; border: 1px solid var(--rule); border-left: 2px solid var(--moss);
  background: var(--bg2); margin-bottom: 34px; }
.project-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  font-size: 10px; letter-spacing: .16em; color: var(--faint); margin-bottom: 12px; }
.project-highlight h3 { margin: 0 0 12px; font-weight: 400; font-size: 26px; letter-spacing: -.01em; }
.project-highlight p { margin: 0; color: var(--mut); font-size: 17px; line-height: 1.65; max-width: 60ch; }

.project-row { display: grid; grid-template-columns: clamp(72px,9vw,116px) minmax(0,1fr);
  gap: clamp(18px,3vw,40px); padding: 32px 16px; border-top: 1px solid var(--rule);
  transition: background .2s, padding .2s; }
.project-row:last-of-type { border-bottom: 1px solid var(--rule); }
.project-row:hover { background: var(--bg2); padding-left: 26px; }
.project-when { font-size: 10px; color: var(--faint); line-height: 1.7; }
.project-when .year { font-size: 13px; color: var(--fg); letter-spacing: .08em; }
.project-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 14px; margin-bottom: 10px; }
.project-head h3 { margin: 0; font-weight: 400; font-size: clamp(24px,2.8vw,31px); letter-spacing: -.015em; }
.project-row p { margin: 0 0 14px; color: var(--mut); font-size: 17px; line-height: 1.6; max-width: 58ch; }
.tags { font-size: 10px; color: var(--faint); }
.moss { color: var(--moss); font-family: 'JetBrains Mono', monospace; font-size: 10px;
  letter-spacing: .16em; text-transform: uppercase; }
.faint { color: var(--faint); font-family: 'JetBrains Mono', monospace; font-size: 10px;
  letter-spacing: .16em; text-transform: uppercase; }

.ledger > :last-child { border-bottom: 1px solid var(--rule); }

.proj > summary { display: grid; grid-template-columns: clamp(72px,9vw,116px) minmax(0,1fr);
  gap: clamp(18px,3vw,40px); padding: 32px 16px; border-top: 1px solid var(--rule);
  cursor: pointer; list-style: none; transition: background .2s, padding .2s; }
.proj > summary::-webkit-details-marker { display: none; }
.proj > summary::marker { content: ''; }
.proj > summary:hover { background: var(--bg2); padding-left: 26px; }
.proj > summary h3 { margin: 0; font-weight: 400; font-size: clamp(24px,2.8vw,31px); letter-spacing: -.015em; }
.proj > summary p { margin: 0 0 14px; color: var(--mut); font-size: 17px; line-height: 1.6; max-width: 58ch; }
.proj-open { display: flex; align-items: center; gap: 10px; font-size: 10px; color: var(--faint); }
.chev { position: relative; display: block; width: 11px; height: 11px; flex: none;
  transition: transform .3s cubic-bezier(.2,.7,.2,1); }
.chev::before, .chev::after { content: ''; position: absolute; background: var(--moss); }
.chev::before { left: 0; top: 5px; width: 11px; height: 1px; }
.chev::after { left: 5px; top: 0; width: 1px; height: 11px; }
.proj[open] .chev { transform: rotate(45deg); }

.proj-detail { display: grid; grid-template-columns: clamp(72px,9vw,116px) minmax(0,1fr);
  gap: clamp(18px,3vw,40px); padding: 0 16px 46px; }
.proj-detail > div:last-child { border-left: 1px solid color-mix(in oklab, var(--moss) 45%, transparent);
  padding-left: clamp(20px,3vw,30px); animation: unfold .38s cubic-bezier(.2,.7,.2,1) both; }
@keyframes unfold { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.slots { display: grid; gap: 34px; max-width: 62ch; }
.slot-label { font-size: 10px; letter-spacing: .18em; color: var(--faint); margin-bottom: 13px; }
.slot > p { margin: 0; color: var(--mut); font-size: 18px; line-height: 1.65; }
.method { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 10px clamp(16px,2.4vw,28px);
  align-items: baseline; margin: 0; }
.method dt { font-size: 10px; color: var(--moss); }
.method dd { margin: 0; color: var(--mut); }
.where { display: grid; gap: 11px; font-size: 11px; letter-spacing: .12em; }
.where a { display: flex; align-items: baseline; gap: 10px; width: fit-content;
  border-bottom: 1px solid var(--rule); padding-bottom: 4px; transition: border-color .2s; }
.where a:hover { border-color: var(--acc); }
.where a span + span, .where .none { color: var(--faint); }
.proj-img { margin: 0; max-width: 520px; }
.proj-img img, .proj-img video { display: block; width: 100%; height: auto; border: 1px solid var(--rule); }

.about { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px,100%),1fr));
  gap: clamp(40px,5vw,64px); align-items: start; padding-bottom: clamp(72px,10vw,120px); }
.about-lede { margin: 0; font-size: 21px; line-height: 1.6; max-width: 50ch; text-wrap: pretty; }
.email { display: inline-block; margin-top: 34px; font-family: 'JetBrains Mono', monospace; font-size: 12px;
  letter-spacing: .14em; text-transform: uppercase; border-bottom: 1px solid var(--acc); padding-bottom: 5px; }
.elsewhere { border-left: 1px solid var(--rule); padding-left: clamp(20px,3vw,34px); min-width: 0; }
.label { font-size: 10px; letter-spacing: .18em; color: var(--faint); margin-bottom: 22px; }
.links { display: flex; flex-direction: column; gap: 12px; font-size: 17px; margin-bottom: 34px; }
.links a { border-bottom: 1px solid var(--rule); width: fit-content; padding-bottom: 3px; }
.links a:hover { border-color: var(--acc); }
.note { margin: 0; font-size: 14px; line-height: 1.6; color: var(--faint); max-width: 34ch; }

.prose { max-width: 68ch; }
.prose h1 { font-size: clamp(34px,4.4vw,54px); max-width: 22ch; margin-bottom: 28px; }
.prose h2 { font-size: 28px; margin: 44px 0 14px; }
.prose p { font-size: 19px; line-height: 1.7; color: var(--mut); }
.prose a { border-bottom: 1px solid var(--acc); }
.prose blockquote { margin: 28px 0; padding-left: 22px; border-left: 2px solid var(--moss); color: var(--mut); }
.prose code { font-family: 'JetBrains Mono', monospace; font-size: .88em; background: var(--bg2); padding: 2px 6px; }
.prose pre { background: var(--bg2); padding: 18px; overflow-x: auto; border: 1px solid var(--rule); }
.prose pre code { background: none; padding: 0; }

.site-footer { border-top: 1px solid var(--rule); background: var(--bg2); display: flex; flex-wrap: wrap;
  gap: 18px; justify-content: space-between; max-width: 1180px; margin: 0 auto;
  padding: 34px clamp(18px,4vw,44px); font-size: 10px; letter-spacing: .16em; color: var(--faint); }

@media (min-width: 1180px) { #rail { display: block; } }
@media (prefers-reduced-motion: reduce) { .hero-inner { animation: none; } html { scroll-behavior: auto; }
  .proj-detail > div:last-child { animation: none; } }
