/* Main site only. The standalone notebooks load notes.css. */
@font-face { font-family: "Wave"; src: url("/fonts/LTWave-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
:root {
  color-scheme: dark;
  --ground: #0a0a0a;
  --raised: #111111;
  --line: #262626;
  --ink: #ededed;
  --muted: #a1a1a1;
  --faint: #949494;
  --accent: #ffcc00;
  --relay-ease: cubic-bezier(.16,1,.3,1);
  --font-ui: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Wave", "Figtree", sans-serif;
  --font-mono: "IBM Plex Mono", "SF Mono", Menlo, Consolas, monospace;
  --measure-prose: 62ch;
}
* { box-sizing: border-box; }
body { max-width: 1100px; min-height: 100vh; margin: 0 auto; border-inline: 1px solid var(--line); display: flex; flex-direction: column; background: var(--ground); color: var(--ink); font: 18px/1.6 var(--font-ui); }
h1, h2, h3, p { margin: 0; overflow-wrap: break-word; }
h1, h2, h3 { font-weight: 700; }
h1, h2 { font-family: var(--font-display); }
h2 { font-size: 32px; line-height: 1.2; letter-spacing: -.02em; }
h3 { font-size: 23px; line-height: 1.3; letter-spacing: -.01em; }
a { color: inherit; text-underline-offset: 4px; touch-action: manipulation; }
a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
img, svg { max-width: 100%; }
main { flex: 1; }
.container { padding-inline: clamp(16px, 5vw, 60px); }
.meta, .eyebrow { color: var(--meta-ink); font: 500 13px/1.6 var(--font-mono); font-variant-numeric: tabular-nums; }
.eyebrow { margin-bottom: 8px; }
.skip { position: absolute; top: -100px; left: 16px; z-index: 10; padding: 12px 18px; background: var(--raised); }
.skip:focus { top: 8px; }
.site-header, .site-footer, .contact-section { background: var(--raised); }
.site-header { border-bottom: 1px solid var(--line); }
.header-inner, .footer-inner, .footer-end { display: flex; align-items: center; justify-content: space-between; gap: 8px 24px; }
.header-inner { min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; min-height: 44px; color: var(--ink); font: 600 16px/1.5 var(--font-ui); text-decoration: none; }
.brand-mark { display: inline-block; width: 40px; height: 40px; overflow: hidden; border: 1px solid var(--faint); }
.brand-mark img { display: block; width: 100%; height: 100%; object-fit: cover; }
.brand:is(:hover, :focus-visible) .brand-mark { border-color: var(--ink); }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px; font-size: 15px; }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 9px; white-space: nowrap; text-decoration: none; }
.site-nav a[aria-current] { text-decoration: underline; }
.site-nav a:hover, .site-nav a:focus-visible { background-color: var(--ground); text-decoration: underline; }
.hero { padding-block: clamp(32px, 5vw, 58px); }
.hero-title { font-size: clamp(42px, 7vw, 76px); line-height: 1.08; letter-spacing: -.035em; margin-bottom: 16px; }
.hero-tag { display: flex; align-items: center; gap: 10px; }
.hero-tag::before { content: ""; width: 8px; border-top: 4px solid var(--accent); }
.hero-block { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 32px 0 0; border: 1px solid var(--line); }
.hero-block > div { padding: 12px 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.hero-block > div:nth-child(2n) { border-right: 0; }
.hero-block > div:nth-last-child(-n + 2) { border-bottom: 0; }
.hero-block dt { margin-bottom: 4px; }
.hero-block dd { margin: 0; font: 600 15px/1.4 var(--font-ui); }
.bio { max-width: 62ch; color: var(--ink); text-wrap: pretty; }
.bio p + p { margin-top: 12px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.button, .topic, .action-link { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; font-weight: 700; }
.button { gap: 10px; }
.button, .topic { padding: 7px 12px; border: 1px solid var(--faint); text-decoration: none; }
.button-primary { background: var(--ink); color: var(--ground); }
.action-link:hover { background-color: var(--raised); color: var(--ink); text-decoration: underline; }
.level { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.8fr); align-items: start; gap: 24px 36px; padding-block: 38px; }
.level-label { position: sticky; top: 24px; }
.see-all { margin-top: 8px; }
.rows { min-width: 0; }
.row { position: relative; display: block; padding: 14px 12px; border-bottom: 1px solid var(--line); }
.row:first-child { border-top: 1px solid var(--line); }
.row-link::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 0; border-left: 2px solid var(--muted); transform: scaleY(0); transform-origin: top; pointer-events: none; }
.row-link:is(:hover, :focus-within) { background: var(--raised); }
.row-link:is(:hover, :focus-within)::before { transform: scaleY(1); }
.row:not(.row-link):focus-within { background: var(--raised); }
.row h2 { font-size: 25px; }
.row-description { margin-block: 4px; color: var(--muted); font-size: 16px; }
.row-details { margin-block: 4px; color: var(--muted); font-size: 16px; }
.row-details summary { display: flex; gap: 8px; align-items: baseline; cursor: pointer; list-style: none; }
.row-details summary::-webkit-details-marker { display: none; }
.row-details summary::before { content: "+" / ""; flex: none; font-family: var(--font-mono); }
.row-details[open] summary::before { content: "−" / ""; }
.row-details p { margin-block: 6px; }
.row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; }
.notebook-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.notebook {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--ground);
  text-decoration: none;
}
.notebook:is(:hover, :focus-visible) { border-color: var(--muted); background: var(--raised); text-decoration: none; }
.notebook-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 10px; }
.notebook-meta .slide-arrow { opacity: 0; }
.notebook:is(:hover, :focus-visible) .slide-arrow { opacity: 1; }
.post-tags { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--meta-ink); font: 13px/1.6 var(--font-mono); }
:is(.blog-rows, .title-block) .post-tags a { display: inline-flex; align-items: center; min-height: 24px; }
.post-tags a { padding-inline: 8px; border: 1px solid var(--faint); text-decoration: none; }
.post-tags a:is(:hover, :focus-visible) { color: var(--ground); background: var(--ink); text-decoration: none; }
.conduit { border-top: 1px solid var(--line); }
@media (min-width: 1101px) {
  html:has(.home) {
    background-color: var(--ground);
    background-image: linear-gradient(90deg, var(--line) 1px, transparent 1px),
      linear-gradient(var(--line) 1px, transparent 1px);
    background-size: 48px 48px;
    background-position: center top;
  }
  .conduit-inner { position: relative; }
  .conduit-inner::before, .conduit-inner::after {
    content: "";
    position: absolute;
    inset-block-start: 50%;
    width: calc((100vw - 1100px) / 2);
    border-top: 1px solid var(--line);
    pointer-events: none;
  }
  .conduit-inner::before { right: 100%; }
  .conduit-inner::after { left: 100%; }
  .home { overflow-x: clip; }
}
.conduit-inner { display: flex; align-items: center; gap: 14px; min-height: 24px; color: var(--meta-ink); font: 13px/1.6 var(--font-mono); }
.conduit-line { min-width: 24px; position: relative; flex: 1; margin-right: 4px; border-top: 1px solid var(--muted); }
.conduit-line::after { content: ""; position: absolute; right: -2px; top: -4px; width: 6px; height: 6px; border-top: 1px solid; border-right: 1px solid; transform: rotate(45deg); }
.conduit-nodes { position: absolute; inset: 0; }
.conduit-nodes::before, .conduit-nodes::after {
  content: "";
  position: absolute;
  top: -3px;
  left: 25%;
  width: 5px;
  height: 5px;
  box-shadow: inset 0 0 0 3px var(--muted);
}
.conduit-nodes::after { left: 67%; }
.contact-section, .site-footer { border-top: 1px solid var(--line); }
.contact { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 28px; padding-block: 30px; }
.contact h2 { margin-bottom: 10px; }
.contact p { color: var(--muted); }
.contact-address { margin-top: 12px; font-size: 16px; }
.contact-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.contact-actions .button { justify-content: space-between; min-width: 9.5em; }
.contact-actions .button-primary { grid-column: 1 / -1; }
button.button { font: inherit; font-size: 15px; font-weight: 700; color: var(--ink); background: transparent; cursor: pointer; }
button.button-primary { background: var(--ink); color: var(--ground); }
.button[hidden] { display: none; }
@media (min-width: 900px) {
  .contact { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
  .contact-actions { max-width: 30em; }
}
.site-footer { padding-block: 24px; }
.footer-frame { border: 1px solid var(--line); background: var(--ground); }
.footer-inner { flex-wrap: wrap; padding: 16px; }
.footer-mark { color: var(--ink); font: 700 20px/1.4 var(--font-display); }
.footer-end { padding-inline: 16px; border-top: 1px solid var(--line); background: var(--raised); }
.footer-end a { display: inline-flex; align-items: center; gap: .5em; min-height: 44px; }
.social-links { display: flex; flex-wrap: wrap; gap: 0 16px; font-size: 14px; }
.social-links a { display: inline-flex; align-items: center; min-height: 44px; }
.archive { padding-block: 42px 64px; }
.archive h1 { font-size: clamp(38px, 6vw, 60px); line-height: 1.1; margin-bottom: 12px; }
.topic-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 16px 24px; }
.topic { position: relative; }
.topic::after {
  content: "";
  position: absolute;
  inset: auto 12px 6px;
  border-bottom: 2px solid currentColor;
  transform: scaleX(0);
  transform-origin: left;
  pointer-events: none;
}
.topic[aria-current] { background: var(--ink); color: var(--ground); text-decoration: underline; }
.topic:is(:hover, :focus-visible) { border-color: var(--ink); }
.topic:is(:hover, :focus-visible)::after { transform: scaleX(1); }
.lost-heading { display: flex; align-items: center; gap: 12px 18px; }
.lost-heading .signal-track { flex: 1 1 80px; max-width: 160px; min-width: 36px; margin-bottom: 12px; }
.signal-track { display: block; position: relative; height: 11px; overflow: hidden; }
.signal-track::before { content: ""; position: absolute; inset: 5px 0 auto; border-top: 1px solid var(--muted); }
.signal-idle { --signal-background: var(--raised); margin: -4px 14px 6px; }
.signal-lost { --signal-background: var(--ground); }
.signal-sweep { position: absolute; inset: 0; visibility: hidden; }
.signal-sweep > span { position: absolute; inset: 0 0 0 auto; width: 34px; }
.signal-sweep > span:first-child { background: var(--signal-background); }
.signal-sweep > span:last-child {
  background: var(--muted);
  clip-path: polygon(0 5px, 6px 5px, 11px 0, 17px 9px, 22px 3px, 27px 6px, 30px 5px, 34px 5px, 34px 6px, 30px 6px, 27px 7px, 22px 5px, 17px 11px, 11px 2px, 6px 6px, 0 6px);
}
.lost-conduit { display: flex; align-items: center; gap: 13px; margin-block: 32px; color: var(--meta-ink); font: 13px var(--font-mono); }
.lost-conduit .conduit-line:first-child::after { content: none; }
.lost-levels { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.lost-levels a { display: grid; grid-template-columns: 48px minmax(0, 1fr) 16px; align-items: center; gap: 8px; min-height: 56px; padding-inline: 14px; background: var(--ground); font: 500 13px var(--font-mono); text-decoration: none; }
.lost-levels a:is(:hover, :focus-visible) { background: var(--raised); }
.lost-level { color: var(--faint); }
.lost-name { font: 15px var(--font-ui); }
.lost-page .button { margin-top: 20px; }
.level-gauge { display: none; }
@media (min-width: 1230px) {
  .level-gauge { display: grid; position: fixed; z-index: 3; top: 50%; right: calc(50% + 552px); transform: translateY(-50%); width: 60px; padding: 4px; border: 1px solid var(--faint); background: var(--raised); }
  .level-gauge a { display: grid; grid-template-columns: 12px 1fr; gap: 3px; align-items: center; min-height: 34px; border-inline-start: 1px solid var(--line); color: var(--ink); font: 500 12px/1 var(--font-mono); text-decoration: none; }
  .level-gauge a::before { content: ""; width: 8px; border-top: 2px solid var(--muted); transform-origin: left; }
  .level-gauge a[aria-current] { color: var(--ink); font-weight: 700; }
  .level-gauge a[aria-current]::before { border-top: 4px solid var(--accent); }
  .level-gauge a:is(:hover, :focus-visible) { color: var(--ink); background: var(--ground); text-decoration: underline; }
  .level-gauge a:is(:hover, :focus-visible)::before { transform: scaleX(1.5); }
  .level-gauge a:focus-visible { outline-offset: 0; }
}
@media (max-width: 700px) {
  .level { grid-template-columns: minmax(0, 1fr); padding-block: 28px; gap: 14px; }
  .level-label { position: static; }
  .lost-levels { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: no-preference) {
  .row-link { transition: transform 200ms var(--relay-ease); }
  .row-link::before { transition: transform 200ms var(--relay-ease); }
  .row-link:is(:hover, :focus-within) { transform: translateX(4px); }
  :is(.post-row, .bus-node):is(:hover, :focus-within) { transform: translateY(-4px); }
  .level-gauge a::before { transition: transform 200ms var(--relay-ease); }
  .conduit.has-played .conduit-line { animation: draw-conduit 320ms var(--relay-ease); }
  .signal-idle .signal-sweep { animation: sweep-signal 5s ease-in-out infinite paused; }
  .signal-idle.is-in-view .signal-sweep { animation-play-state: running; }
  .signal-lost.has-played .signal-sweep { animation: break-signal 900ms ease-in-out; }
  @keyframes sweep-signal {
    0% { visibility: visible; transform: translateX(-100%); }
    80%, 100% { visibility: visible; transform: translateX(34px); }
  }
  @keyframes break-signal {
    0% { visibility: visible; transform: translateX(-100%); }
    65% { visibility: visible; opacity: 1; }
    75%, 100% { visibility: visible; opacity: 0; transform: translateX(-40%); }
  }
  @keyframes draw-conduit {
    from { clip-path: inset(-6px 100% -6px 0); }
    to { clip-path: inset(-6px -4px -6px 0); }
  }
}

.single-post { max-width: calc(var(--measure-prose) + 48px); padding: 48px 24px 80px; margin: 0 auto; font: 20px/1.65 var(--font-body); }
.back-link { display: inline-flex; align-items: center; gap: 8px; position: relative; text-decoration: none; min-height: 44px; margin-bottom: 24px; font: 13px/1.6 var(--font-mono); color: var(--meta-ink); }
.back-arrow { display: inline-block; }
.back-link:is(:hover, :focus-visible) { color: var(--ink); text-decoration: none; }
.back-link::after { content: ""; position: absolute; inset: auto 0 12px 20px; border-bottom: 1px solid currentColor; transform: scaleX(0); transform-origin: left; pointer-events: none; }
.back-link:is(:hover, :focus-visible)::after { transform: scaleX(1); }
.article-header { padding-bottom: 18px; border-bottom: 1px solid var(--line); margin-bottom: 32px; }
.article-loop { margin-bottom: 16px; }
.article-header h1 { font: 700 clamp(34px, 5.5vw, 52px)/1.08 var(--font-display); letter-spacing: -.03em; margin-bottom: 16px; }
.article-header .post-tags { margin-top: 8px; }
.drawing-article { padding-top: 48px; padding-bottom: 80px; }
.article-sheet { border: 1px solid var(--line); padding: 20px; }
.sheet-ruler, .sheet-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; }
.sheet-ruler { padding: 0 4px 18px; border-bottom: 1px solid var(--line); }
.sheet-ruler .back-link { margin: 0; }
.title-block { margin: 20px 0 0 96px; border: 1px solid var(--line); }
.sheet-title { min-width: 0; padding: 18px 24px 14px; }
.sheet-register { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; padding: 6px 24px; border-top: 1px solid var(--line); }
.sheet-register .post-tags { min-width: 0; gap: 4px 10px; overflow-wrap: anywhere; }
.drawing-body { padding: 36px 64px 38px 96px; }
.article-toc { margin-bottom: 18px; padding-bottom: 8px; border-bottom: 1px solid var(--line); font: 15px/1.6 var(--font-ui); }
.article-toc summary { cursor: pointer; width: fit-content; padding-block: 4px; }
.article-toc ul { list-style: none; margin: 8px 0; padding-left: 0; }
.article-toc ul ul { padding-left: 1.25em; }
.article-toc a { display: inline-block; min-height: 24px; padding-block: 4px; }
.article-toc > nav > ul { counter-reset: contents; }
.article-toc > nav > ul > li { position: relative; padding-left: 32px; counter-increment: contents; }
.article-toc > nav > ul > li::before { content: counter(contents, decimal-leading-zero) / ""; position: absolute; left: 0; top: 6px; font: 12px/1.6 var(--font-mono); color: var(--ink); }
.drawing-body .prose { max-width: var(--measure-prose); counter-reset: section; font: 19px/1.7 var(--font-body); }
.drawing-body .prose > p:first-child { padding-bottom: 30px; border-bottom: 1px solid var(--line); margin-bottom: 38px; font-size: 21px; line-height: 1.65; }
.drawing-body .prose h2 { position: relative; counter-increment: section; margin: 40px 0 16px; font: 700 28px/1.3 var(--font-display); }
.drawing-body .prose h2::before { content: counter(section, decimal-leading-zero) / ""; position: absolute; left: -77px; top: 5px; width: 46px; padding-top: 9px; border-top: 1px solid var(--line); color: var(--ink); font: 700 16px/1.5 var(--font-mono); letter-spacing: 0; }
.drawing-body .prose h3 { margin: 28px 0 13px; font: 700 22px/1.3 var(--font-ui); }
.drawing-body .prose :is(h2, h3, h4, h5, h6) { scroll-margin-top: 24px; }
.prose .heading-anchor { display: inline-block; margin-inline-start: .35em; color: var(--ink); font: 500 14px var(--font-mono); text-decoration: none; opacity: 0; }
.prose :is(h2, h3, h4, h5, h6):is(:hover, :focus-within) .heading-anchor { opacity: 1; }
.prose :is(h2, h3):target { outline: 2px solid var(--accent); outline-offset: 4px; }
.drawing-body .prose > :last-child { margin-bottom: 0; }
.sheet-bottom { border-top: 1px solid var(--line); padding: 16px 6px 0; }
.drawing-after { margin-left: 116px; margin-right: 84px; }
.drawing-after .follow { border-left: 0; border-top: 1px solid var(--line); padding: 28px 0 0; margin-top: 44px; }
.drawing-after .follow-title { font-size: 26px; margin-bottom: 24px; }
.drawing-after .follow-links > div { border-top: 1px solid var(--line); padding-top: 16px; }
.drawing-after .follow-links a { font-weight: 700; }
.drawing-after .follow-links p { color: var(--ink); }
.prose { max-width: var(--measure-prose); overflow-wrap: anywhere; }
.prose p, .prose ul, .prose ol { margin: 0 0 24px; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li > ul, .prose li > ol { margin-bottom: 0; }
.prose h2 { font: 700 28px/1.2 var(--font-display); letter-spacing: -.02em; margin: 48px 0 14px; }
.prose h3 { font: 700 21px/1.3 var(--font-ui); margin: 32px 0 12px; }
.prose h4, .prose h5, .prose h6 { font-family: var(--font-ui); }
.prose blockquote { margin: 28px 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--line); font-style: italic; color: var(--muted); }
.prose code { font-family: var(--font-mono); font-size: .88em; padding: 2px 6px; background: var(--raised); border: 1px solid var(--line); overflow-wrap: anywhere; }
/* Posts whose headings already carry their own numbers skip the generated ones. */
.self-numbered .drawing-body .prose h2::before, .self-numbered .article-toc > nav > ul > li::before { content: none; }
.self-numbered .article-toc > nav > ul > li { padding-left: 0; }
.prose .highlight { min-width: 0; max-width: 100%; }
.prose pre { display: block; width: 100%; max-width: 100%; overflow-x: auto; margin: 0; padding: 20px 18px; background: var(--raised); color: var(--ink); font: 13px/1.85 var(--font-mono); white-space: pre; overflow-wrap: normal; }
.prose pre:focus-visible, .prose table:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.prose .chroma { color: var(--ink); }
.prose .chroma :is(.c, .c1, .cm, .cp, .cs) { color: var(--muted); }
.prose pre code { display: inline-block; min-width: 100%; padding: 0; border: 0; background: transparent; font-size: inherit; white-space: inherit; overflow-wrap: normal; }
.prose figure { margin: 28px 0; }
.prose figure.code-block { display: flow-root; min-width: 0; margin: 24px 0 32px; border: 1px solid var(--line); }
.prose figcaption { margin-top: 8px; text-align: left; font: 13px/1.6 var(--font-mono); color: var(--meta-ink); }
.prose figcaption.code-lang { margin: 0; padding: 8px 18px; border-bottom: 1px solid var(--line); background: var(--raised); color: var(--ink); text-transform: uppercase; }
.prose table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: 28px 0; font: 15px/1.6 var(--font-ui); }
.prose td, .prose th { padding: 8px 13px; border: 1px solid var(--line); text-align: left; }
.prose th { background: var(--raised); color: var(--muted); font: 12px/1.6 var(--font-mono); }
.prose img, .prose figure img { max-width: 100%; height: auto; }
.prose .footnotes { border-top: 1px solid var(--line); margin-top: 56px; padding-top: 20px; font: 15px/1.6 var(--font-ui); color: var(--meta-ink); }
.prose .footnotes > hr { display: none; }
.post-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; border-top: 1px solid var(--line); margin-top: 20px; padding-top: 12px; }
.post-nav a { display: flex; flex-direction: column; min-height: 44px; gap: 8px; padding: 8px 12px; text-decoration: none; }
.post-nav a:is(:hover, :focus-visible) { background: var(--raised); box-shadow: inset 2px 0 var(--muted); }
.post-nav a:is(:hover, :focus-visible) :is(.nav-title, .nav-label) { text-decoration: underline; }
.post-nav .next { grid-column: 2; text-align: right; }
.post-nav .nav-label { font: 13px/1.6 var(--font-mono); color: var(--meta-ink); }
.post-nav .nav-title { font: 400 15px/1.6 var(--font-ui); overflow-wrap: anywhere; }
.post-nav + .back-link, .prose + .back-link { margin-top: 32px; }
.follow { border-left: 3px solid var(--line); padding-left: 16px; margin-top: 32px; font: 15px/1.6 var(--font-ui); }
.follow-title { font: 700 24px/1.25 var(--font-ui); color: var(--ink); margin: 0 0 12px; }
.follow-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.follow-links > div { min-width: 0; }
.follow-links a { display: inline-flex; align-items: center; min-height: 44px; font: 700 16px/1.6 var(--font-ui); color: var(--ink); }
.follow-links p { margin: 0; color: var(--muted); }
.follow + .back-link { margin-top: 32px; }
@media (max-width: 700px) { .follow-links { grid-template-columns: minmax(0, 1fr); gap: 16px; } }
@media (max-width: 900px) {
  .title-block { margin-left: 48px; }
  .drawing-body { padding: 30px 12px 30px 48px; }
  .drawing-body .prose h2::before { left: -40px; width: 28px; }
  .drawing-after { margin-inline: 0; }
}
@media (max-width: 700px) {
  .single-post { padding: 32px 16px 64px; font-size: 18px; line-height: 1.6; }
  .prose h2 { font-size: 24px; }
  .prose pre { white-space: pre-wrap; overflow-wrap: anywhere; }
  .prose pre code { display: block; overflow-wrap: inherit; }
  .drawing-article { padding: 12px 18px 64px; }
  .article-sheet { border: 0; padding: 0; }
  .sheet-ruler { padding: 0 0 6px; }
  .title-block { margin: 12px 0 0; border: 0; }
  .sheet-title { padding: 0 0 12px; }
  .sheet-register { padding-inline: 0; border-bottom: 1px solid var(--line); }
  .drawing-body { padding: 16px 0 28px; }
  .drawing-body .prose { font-size: 18px; line-height: 1.65; }
  .drawing-body .prose > p:first-child { font-size: 20px; }
  .drawing-body .prose h2 { font-size: 25px; }
  .drawing-body .prose h2::before { position: static; display: inline-block; width: auto; margin-right: 12px; padding: 0; border: 0; vertical-align: baseline; }
  .sheet-bottom { padding-inline: 0; }
  .post-nav { grid-template-columns: minmax(0, 1fr); }
  .post-nav .next { grid-column: 1; text-align: left; }
}

/* Amicro interactions */
.reveal-line, .reveal-line > span { display: block; }

.magnetic { display: inline-flex; }
.button:hover, .button:focus-visible,
button.button:is(:hover, :focus-visible) {
  background: var(--ink);
  color: var(--ground);
  text-decoration: none;
}
.button-primary:is(:hover, :focus-visible),
button.button-primary:is(:hover, :focus-visible) {
  background: var(--ground);
  color: var(--ink);
}

.slide-link { gap: .35em; }
.slide-arrow { display: inline-block; }
:is(.slide-arrow, .glyph)::before { content: attr(data-glyph); }
:is(.slide-link:not(:where(.button)), .article-toc :where(a), .brand, .entry-title) { position: relative; text-decoration: none; }
:is(.slide-link:not(:where(.button)), .article-toc :where(a), .brand, .entry-title)::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  border-bottom: 2px solid currentColor;
  transform: scaleX(0);
  transform-origin: left;
  pointer-events: none;
}
:is(.slide-link:not(:where(.button)), .article-toc :where(a), .brand, .entry-title):is(:hover, :focus-visible)::after { transform: scaleX(1); }
.brand::after { inset: auto 0 9px 50px; }
.entry-title { display: inline-block; }
.entry-title, .read-entry, .site-footer a { text-decoration: none; }
:is(.read-entry, .site-footer a):is(:hover, :focus-visible) { background-color: var(--raised); text-decoration: underline; }
:is(.read-entry, .site-footer a) { position: relative; }
:is(.read-entry, .site-footer a)::after {
  content: "";
  position: absolute;
  inset: auto 0 6px;
  border-bottom: 2px solid currentColor;
  transform: scaleX(0);
  transform-origin: left;
}
:is(.read-entry, .site-footer a):is(:hover, :focus-visible)::after { transform: scaleX(1); }
:is(.read-entry, .site-footer a):is(:hover, :focus-visible) { text-decoration: none; }

@media (prefers-reduced-motion: no-preference) {
  .reveal-line.is-pending, .reveal-line.is-revealing { overflow: hidden; }
  .reveal-line.is-pending > span { transform: translateY(100%); }
  .reveal-line.is-revealing > span { animation: reveal-line 800ms var(--relay-ease) both; }
  .hero-title.is-revealing > span { animation-duration: 400ms; }
  .bio .reveal-line + .reveal-line.is-revealing > span { animation-delay: 150ms; }
  @keyframes reveal-line { from { transform: translateY(100%); } }

  .row-arrow { transform: translateX(-6px); transition: opacity 200ms var(--relay-ease), transform 200ms var(--relay-ease); }
  :is(.row-link, .bus-node, .lost-levels a):is(:hover, :focus-visible, :focus-within) .row-arrow { transform: none; }
  .topic::after, .back-link::after, .back-arrow { transition: transform 200ms var(--relay-ease); }
  .back-link:is(:hover, :focus-visible) .back-arrow { transform: translateX(-4px); }
  .slide-arrow { transition: transform 200ms var(--relay-ease); }
  .slide-link:is(:hover, :focus-visible) .slide-arrow { transform: translate(4px, -4px); }
  :is(.button, .notebook):is(:hover, :focus-visible) .slide-arrow { transform: translateX(4px); }
  :is(.slide-link:not(:where(.button)), .article-toc :where(a), .brand, .entry-title)::after { transition: transform 200ms var(--relay-ease); }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .magnetic .button:not(:focus-visible) {
    transform: var(--magnetic-offset, none);
    transition: transform 200ms var(--relay-ease);
  }
}

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

/* Purdue layers and level sections */
.stack-index { min-width: 0; margin-top: 28px; font: 500 13px/1.4 var(--font-mono); }
.stack-index .eyebrow { margin-bottom: 12px; }
.stack-index ol { list-style: none; margin: 0; padding: 0; }
.stack-index li { --tier-inset: 3px; position: relative; }
.stack-index li + li { margin-top: 4px; }
.stack-index li + li::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 50%;
  height: 4px;
  border-left: 1px solid var(--muted);
}
.stack-index li:nth-child(2) { --tier-inset: 6px; }
.stack-index li:nth-child(4) { --tier-inset: 9px; }
.stack-index li:nth-child(5) { --tier-inset: 12px; }
.stack-index li:nth-child(6) { --tier-inset: 15px; }
.stack-index a {
  position: relative;
  display: grid;
  grid-template-columns: 5ch minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  margin-inline: var(--tier-inset);
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-bottom: 3px solid var(--line);
  background: var(--raised);
  text-decoration: none;
}
.stack-name { color: var(--ink); font: 600 14px/1.3 var(--font-ui); }
.stack-count, .stack-level { color: var(--meta-ink); white-space: nowrap; }
.stack-index a[aria-current] { border-color: var(--accent); }
.stack-index a[aria-current] .stack-level { color: var(--accent); }
.stack-stripe {
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  border-top: 4px solid var(--accent);
  border-image: repeating-linear-gradient(135deg, var(--accent) 0 4px, var(--ground) 4px 8px) 100% 0 0;
  pointer-events: none;
}
.stack-index a:is(:hover, :focus-visible) {
  z-index: 1;
  margin-inline: 0;
  box-shadow: inset 0 -1px var(--meta-ink);
}
.stack-index a:is(:hover, :focus-visible) .stack-name { text-decoration: underline; }

.home .post-row h3 a { text-decoration: none; }
.home .post-row h3 a::after { content: ""; position: absolute; inset: 0; }
.home .post-row h3 a:focus-visible { outline: none; }
.home .post-row:has(h3 a:focus-visible) { outline: 2px solid var(--accent); outline-offset: 4px; }
.home .post-row:is(:hover, :focus-within) h3 a { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.row-link { padding-inline-end: 36px; }
.row-arrow { position: absolute; inset: 16px 12px auto auto; color: var(--ink); font: 500 14px/1.4 var(--font-mono); opacity: 0; pointer-events: none; }
.lost-levels .row-arrow { position: static; }
:is(.row-link, .bus-node, .lost-levels a):is(:hover, :focus-visible, :focus-within) .row-arrow { opacity: 1; }

.notebooks .level-label { position: relative; isolation: isolate; }
.level-numeral { display: none; }
.level-numeral::before { content: attr(data-numeral); }
.level-wide { grid-template-columns: minmax(0, 1fr); }
.level-wide:not(.notebooks) .level-label { position: static; }
.level-count { margin-top: 8px; }
.bus { position: relative; list-style: none; margin: 8px 0 0; padding: 0 0 0 32px; display: grid; gap: 28px; border-left: 1px solid var(--muted); }
.bus-node { position: relative; display: flex; flex-direction: column; gap: 6px; }
.bus-node::before { content: ""; position: absolute; left: -32px; top: 10px; width: 14px; border-top: 1px solid var(--muted); }
.bus-node::after { content: ""; position: absolute; left: -18px; top: 6px; width: 9px; height: 9px; border: 1px solid var(--muted); }
.bus-tags { margin-top: auto; }
.bus-po .meta { margin-right: 6px; }
@media (min-width: 900px) {
  .bus { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 28px; padding: 0; border-left: 0; border-top: 1px solid var(--muted); }
  .bus::after { content: ""; position: absolute; right: -2px; top: -4px; width: 6px; height: 6px; border-top: 1px solid var(--muted); border-right: 1px solid var(--muted); transform: rotate(45deg); }
  .bus-node { padding-top: 44px; }
  .bus-node::before { left: 0; top: 0; width: 0; height: 32px; border-top: 0; border-left: 1px solid var(--muted); }
  .bus-node::after { left: -4px; top: 32px; }
}
.cert-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.idmz-gate { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .cert-grid:not(:focus-within) .idmz-gate.is-opening {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
  }
  .idmz-gate > span {
    position: absolute;
    inset: 0 50% 0 0;
    background: var(--raised);
    --gate-offset: -100%;
    animation: open-idmz 800ms cubic-bezier(.65, 0, .35, 1) both;
  }
  .idmz-gate > span:last-child {
    inset: 0 0 0 50%;
    border-inline-start: 1px solid var(--accent);
    --gate-offset: 100%;
  }
  @keyframes open-idmz {
    25% { border-color: transparent; }
    to { transform: translateX(var(--gate-offset)); border-color: transparent; visibility: hidden; }
  }
}
.cert-tile { position: relative; display: grid; grid-template-columns: 100px minmax(0, 1fr) auto; align-items: center; gap: 8px 16px; padding: 6px 16px; background: var(--ground); }
.cert-tile .row-meta { justify-content: space-between; }
.cert-tile h3 { font-size: 18px; }
.cert-tile::before { content: ""; position: absolute; inset: 0 0 auto; height: 0; border-top: 2px solid var(--accent); transform: scaleX(0); transform-origin: left; }
.cert-tile:is(:focus-within, :has(a:hover)) { background: var(--raised); }
.cert-tile:is(:focus-within, :has(a:hover))::before { transform: scaleX(1); }

@media (min-width: 900px) {
  .hero { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr); grid-template-areas: "tag index" "title index" "copy index" "block block"; grid-template-rows: auto auto 1fr auto; column-gap: 36px; align-items: start; }
  .hero-tag { grid-area: tag; }
  .hero-title { grid-area: title; font-size: clamp(56px, 6.6vw, 88px); line-height: .98; letter-spacing: -.045em; margin-bottom: 14px; }
  .hero-copy { grid-area: copy; }
  .stack-index { grid-area: index; align-self: center; margin-top: 0; }
  .hero-block { grid-area: block; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 24px; }
  .hero-block > div { border-bottom: 0; }
  .hero-block > div:nth-child(2n) { border-right: 1px solid var(--line); }
  .hero-block > div:last-child { border-right: 0; }
  .level-numeral { position: absolute; z-index: -1; inset: auto auto -10px 0; display: block; font: 700 72px/.85 var(--font-display); color: var(--line); user-select: none; pointer-events: none; }
}
@media (min-width: 701px) {
  .notebook-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .cert-tile { grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 0 12px; padding: 10px 12px; }
  .cert-tile .row-description { grid-column: 1; }
  .cert-tile .row-meta { grid-area: 1 / 2 / span 2; flex-direction: column; align-items: flex-end; }
}
@media (prefers-reduced-motion: no-preference) {
  .stack-index li { animation: stack-descent 240ms var(--relay-ease) backwards; }
  html:has(.stack-index) { scroll-behavior: smooth; }
  .stack-index li:nth-child(1) { animation-delay: 60ms; }
  .stack-index li:nth-child(2) { animation-delay: 120ms; }
  .stack-index li:nth-child(3) { animation-delay: 180ms; }
  .stack-index li:nth-child(4) { animation-delay: 240ms; }
  .stack-index li:nth-child(5) { animation-delay: 300ms; }
  .stack-index li:nth-child(6) { animation-delay: 360ms; }
  .stack-index li:focus-within { animation: none; }
  @keyframes stack-descent { from { transform: translateY(-14px); opacity: 0; } }
  :is(.read-entry, .site-footer a)::after { transition: transform 200ms var(--relay-ease); }
  .cert-tile::before { transition: transform 200ms var(--relay-ease); }
  .footer-end a span { transition: transform 200ms var(--relay-ease); }
  .footer-end a:is(:hover, :focus-visible) span { transform: translateY(-3px); }
}

/* Home section compositions */
.history h2 { font-size: clamp(42px, 7vw, 84px); line-height: 1; }
.history-timeline { list-style: none; margin: 0; padding: 0 0 0 24px; border-inline-start: 1px solid var(--muted); }
.history-entry { position: relative; display: grid; gap: 6px 24px; padding-block: 16px 24px; }
.history-entry::before { content: ""; position: absolute; inset: 22px auto auto -29px; width: 9px; height: 9px; box-shadow: inset 0 0 0 5px var(--ground); border: 1px solid var(--muted); }
.history-entry + .history-entry { border-top: 1px solid var(--line); }
.history-entry h3 { font: 700 clamp(25px, 4vw, 46px)/1.1 var(--font-display); }
.idmz-heading { padding-block: clamp(24px, 4vw, 42px); background: var(--accent); color: var(--ground); box-shadow: 0 0 0 100vmax var(--accent); clip-path: inset(0 -100vmax); }
.idmz-heading :is(.eyebrow, .meta) { color: inherit; }
.idmz-heading h2 { font-size: clamp(34px, 6vw, 70px); line-height: 1.08; }
.idmz-heading .meta { margin-top: 8px; }
.cert-content { padding-block: 26px 38px; }
.projects {
  background: var(--raised);
}
.projects h2 { font-size: clamp(32px, 4.5vw, 54px); }
.bus-node { border: 1px solid var(--line); background: var(--ground); padding: 14px; min-width: 0; }
.bus-node:is(:hover, :focus-within),
.post-row:is(:hover, :focus-within) { box-shadow: inset 2px 0 var(--accent); }
.post-row.row-link::before { content: none; }
.post-row h2, .post-row h3 { padding-inline-end: 24px; }
@media (prefers-reduced-motion: no-preference) {
  .bus-node { transition: transform 200ms var(--relay-ease); }
  .home section.has-reveal:not(:focus-within) > * { animation: section-reveal 260ms var(--relay-ease) backwards; }
  .home section.has-reveal:not(:focus-within) > :nth-child(2) { animation-delay: 55ms; }
  .home section.has-reveal:not(:focus-within) > :nth-child(n+3) { animation-delay: 110ms; }
  @keyframes section-reveal {
    from { opacity: 0; transform: translateY(12px); }
  }
}
.writing .level-label { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
.writing .eyebrow { grid-column: 1 / -1; }
.writing h2 { font-size: clamp(40px, 6vw, 68px); line-height: 1; }
.writing .post-row { padding-block: clamp(20px, 4vw, 42px); }
.writing .post-row h3 { max-width: 27ch; font: 700 clamp(24px, 4vw, 44px)/1.1 var(--font-display); }
.writing .row-description { max-width: 64ch; margin-block: 12px; }
@media (min-width: 701px) {
  .history-entry { grid-template-columns: minmax(130px, 1fr) minmax(0, 4fr); }
  .history-entry > .meta { padding-top: 6px; }
}
@media (min-width: 900px) {
  .bus { padding-top: 28px; gap: 16px; }
  .bus-node::before { left: 14px; top: -29px; height: 28px; }
  .bus-node::after { left: 10px; top: -5px; box-shadow: inset 0 0 0 4px var(--ground); }
}

.reading-progress { position: fixed; inset: 0 0 auto; height: 3px; z-index: 5; background: var(--line); pointer-events: none; }
.reading-progress::before { content: ""; display: block; height: 100%; border-top: 3px solid var(--ink); transform: scaleX(var(--read-progress, 0)); transform-origin: left; }
.sheet-title { position: relative; }
.sheet-title::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; border-top: 4px solid var(--muted); border-image: repeating-linear-gradient(135deg, var(--muted) 0 4px, var(--ground) 4px 8px) 100% 0 0; }
@media (max-width: 700px) { .sheet-title::before { content: none; } }

.mobile-level-prefix { display: none; }
@media (max-width: 700px) {
  html:has(.level-gauge) {
    --level-bar-height: calc(45px + env(safe-area-inset-bottom));
    scroll-padding-bottom: calc(var(--level-bar-height) + 8px);
  }
  body.home { padding-bottom: calc(var(--level-bar-height) + 8px); }
  .hero { padding-block: 20px 24px; }
  .hero-title { margin-bottom: 10px; }
  .bio { font-size: 17px; line-height: 1.45; }
  .bio p + p { margin-top: 8px; }
  .hero-actions { margin-top: 12px; }
  .hero-block, .stack-index { margin-top: 16px; }
  .hero-block > div { padding: 7px 10px; }
  .hero-block dt { margin-bottom: 0; }
  .contact-actions { width: min(100%, 24em); }
  .contact-actions .button { min-width: 0; }
  .level-gauge {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    position: fixed;
    z-index: 5;
    inset: auto 0 0;
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--raised);
    border-top: 1px solid var(--line);
  }
  .level-gauge a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-top: 3px solid var(--faint);
    color: var(--ink);
    font: 500 12px/1 var(--font-mono);
    text-decoration: none;
  }
  .level-gauge a + a { border-inline-start: 1px solid var(--line); }
  .level-gauge a[aria-current] { border-top-color: var(--accent); color: var(--accent); font-weight: 700; }
  .level-gauge a:is(:hover, :focus-visible) { text-decoration: underline; }
  .level-gauge a:focus-visible { outline-offset: -3px; }
  .mobile-level-prefix { display: inline; }
}
