@font-face {
  font-family: "Source Sans 3";
  src: url("/assets/fonts/source-sans-3-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "Source Serif 4";
  src: url("/assets/fonts/source-serif-4-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "Source Serif 4";
  src: url("/assets/fonts/source-serif-4-latin-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 400 600;
  font-display: swap;
}

@font-face {
  font-family: "Special Elite";
  src: url("/assets/fonts/special-elite-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --bg: #ddd6c6;
  --surface: #fffdf8;
  --text: #2a2218;
  --text-muted: #5d5548;
  --text-subtle: #746c60;
  --accent: #6e3a1e;
  --border: rgba(40, 34, 26, 0.16);
  --border-strong: rgba(40, 34, 26, 0.22);
  --type-prose-body: 17px;
  --type-prose-h1: 1.85rem;
  --type-prose-label: 0.9rem;
  --type-entry-title: 1.02rem;
  --type-entry-date: 0.92rem;
  --type-entry-summary: 0.96rem;
  --type-home-name: 1.08rem;
  --type-home-label: 0.98rem;
  --type-home-body: var(--type-prose-body);
  --type-home-postcard-body: 1rem;
  --type-home-project-title: var(--type-entry-title);
  --type-home-project-desc: var(--type-entry-summary);
  --shadow:
    0 2px 4px rgba(0, 0, 0, 0.06),
    0 10px 28px rgba(30, 20, 10, 0.11),
    0 24px 70px rgba(30, 20, 10, 0.09);
}

@view-transition {
  navigation: auto;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  margin: 0;
  background: var(--bg);
}

body {
  margin: 0;
  position: relative;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  isolation: isolate;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.08;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='500' height='500'%3E%3Cfilter id='a'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.6' numOctaves='5' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23a)'/%3E%3C/svg%3E");
  background-size: 360px;
  z-index: 0;
}

img {
  display: block;
  max-width: 100%;
  -webkit-user-drag: none;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid rgba(110, 58, 30, 0.78);
  outline-offset: 4px;
}

.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;
}

.page-header,
.page-shell,
.home-header,
.main,
.site-footer {
  position: relative;
  z-index: 1;
}

@keyframes page-fade-in {
  from {
    opacity: 0.98;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes page-fade-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0.985;
    transform: translateY(-4px);
  }
}

@media (min-width: 821px) and (prefers-reduced-motion: no-preference) {
  ::view-transition-group(root) {
    animation-duration: 180ms;
    animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
  }

  ::view-transition-old(root) {
    animation: page-fade-out 180ms both;
  }

  ::view-transition-new(root) {
    animation: page-fade-in 220ms both;
  }
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none;
  }
}

.page-header {
  position: fixed;
  top: 2rem;
  left: max(1.25rem, calc((100vw - 920px) / 2 + 1rem));
  padding: 0;
  z-index: 20;
}

.site-back {
  display: inline;
  font-family: "Special Elite", cursive;
  font-size: var(--type-entry-title);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  font-variant-ligatures: none;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 90ms ease-out;
}

.site-back:hover,
.site-back:focus-visible {
  color: var(--accent);
}

.page-shell {
  max-width: 920px;
  margin: 0 auto;
  padding: 3rem 1.5rem 6rem 4.5rem;
}

.prose {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: var(--type-prose-body);
  line-height: 1.72;
  color: var(--text);
}

.prose h1 {
  margin: 0 0 0.75rem;
  font-size: var(--type-prose-h1);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0;
}

.prose .meta,
.cv-page .meta {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-top: 1.1rem;
  margin-bottom: 2.5rem;
  padding-top: 0.95rem;
  border-top: 1px dotted var(--border);
  font-family: "Source Sans 3", sans-serif;
  font-size: var(--type-prose-label);
  line-height: 1.6;
  color: var(--text-muted);
}

.prose .meta-links,
.cv-page .meta-links {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
}

.prose .meta-label {
  display: inline-flex;
  align-items: center;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.prose .meta-separator,
.cv-page .meta-separator {
  display: inline-flex;
  align-items: center;
  margin: 0 0.55rem;
  color: var(--text-subtle);
}

.prose .meta-date,
.cv-page .meta-date {
  display: inline-flex;
  align-items: center;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.prose .meta a,
.cv-page .meta a {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: color 0.2s ease;
}

.prose .meta a:hover,
.prose .meta a:focus-visible,
.cv-page .meta a:hover,
.cv-page .meta a:focus-visible {
  color: var(--text);
}

.prose h2 {
  position: relative;
  margin: 3.35rem 0 1.05rem;
  padding-left: 0.78rem;
  font-family: "Source Sans 3", sans-serif;
  font-size: var(--type-prose-label);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.04em;
  color: rgba(72, 65, 55, 0.96);
  text-transform: none;
}

.prose h2::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 0.28rem;
  height: 0.9em;
  border-radius: 999px;
  background: rgba(110, 58, 30, 0.34);
  transform: translateY(-50%);
}

.prose p {
  margin: 0 0 1.15rem;
}

.prose hr {
  margin: 1.8rem 0 1.45rem;
  border: 0;
  border-top: 1px solid var(--border);
}

.prose hr.meta-divider {
  margin: 1.1rem 0 2.5rem;
  border-top: 1px dotted var(--border);
}

.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  overflow-wrap: anywhere;
}

.prose a:hover {
  text-decoration-thickness: 2px;
}

.prose em {
  font-style: italic;
}

.prose code,
.prose .spec {
  font-family: "SF Mono", "Menlo", "Consolas", monospace;
}

.prose code {
  font-size: 0.88em;
  background: rgba(40, 34, 26, 0.06);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

.prose .example-run {
  position: relative;
  width: 100%;
  margin: 2.35rem 0 3.15rem;
}

.prose .example-layout {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: clamp(1rem, 2.2vw, 1.45rem);
  align-items: stretch;
}

.prose .example-panel {
  min-width: 0;
  background: transparent;
}

.prose .example-panel--grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.78rem;
  align-self: stretch;
  padding: 0.2rem 0 0;
  background: transparent;
}

.prose .example-panel--net {
  position: relative;
  min-height: clamp(25rem, 48vw, 32rem);
  overflow: hidden;
}

.prose .petri-legend,
.prose .grid-controls,
.prose .run-selector,
.prose .grid-ledger {
  font-family: "Source Sans 3", sans-serif;
}

.prose .run-selector,
.prose .grid-controls {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.58rem;
  width: max-content;
  max-width: 100%;
  font-size: 0.78rem;
  line-height: 1.35;
}

.prose .run-selector {
  padding-bottom: 0.16rem;
}

.prose .grid-controls {
  padding-top: 0.04rem;
}

.prose .grid-world {
  width: auto;
  max-width: 100%;
  margin: 0;
}

.prose .grid-world--ascii {
  display: block;
  padding: 0.18rem 0 0.08rem;
  border: 0;
  background: transparent;
  box-shadow: none;
  font-family: "SF Mono", "Menlo", "Consolas", monospace;
  font-size: clamp(0.8rem, 0.95vw, 0.92rem);
  line-height: 1.66;
  letter-spacing: -0.01em;
  color: rgba(32, 27, 22, 0.9);
  white-space: pre;
  overflow-x: auto;
}

.prose .grid-ledger {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.28rem;
  width: max-content;
  max-width: 100%;
  margin: 0;
  padding-top: 0.56rem;
  border-top: 1px solid rgba(40, 34, 26, 0.1);
}

.prose .grid-ledger div {
  display: grid;
  grid-template-columns: 2.65rem minmax(0, 1fr);
  align-items: baseline;
  column-gap: 0.45rem;
  min-width: 0;
}

.prose .grid-ledger dt,
.prose .grid-ledger dd {
  margin: 0;
}

.prose .grid-ledger dt {
  font-size: 0.68rem;
  line-height: 1.2;
  color: rgba(93, 85, 72, 0.58);
}

.prose .grid-ledger dd {
  overflow: hidden;
  font-family: "SF Mono", "Menlo", "Consolas", monospace;
  font-size: 0.76rem;
  line-height: 1.25;
  color: rgba(40, 34, 26, 0.9);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prose .run-selector button,
.prose .grid-control {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(93, 85, 72, 0.76);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: color 90ms ease-out;
}

.prose .run-selector button:hover,
.prose .run-selector button:focus-visible,
.prose .grid-control:hover,
.prose .grid-control:focus-visible,
.prose .run-selector button.is-active,
.prose .grid-control.is-active {
  color: var(--accent);
}

.prose .run-selector button:focus-visible,
.prose .grid-control:focus-visible {
  outline: 2px solid rgba(110, 58, 30, 0.36);
  outline-offset: 3px;
}

.prose .petri-legend {
  position: absolute;
  top: 0.05rem;
  right: 0.15rem;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.72rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  font-size: 0.7rem;
  line-height: 1;
  color: rgba(93, 85, 72, 0.68);
  letter-spacing: 0.02em;
  pointer-events: none;
}

.prose .petri-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0;
  color: inherit;
  white-space: nowrap;
}

.prose .petri-legend-swatch {
  display: inline-block;
  width: 0.36rem;
  height: 0.36rem;
  border-radius: 999px;
  flex: 0 0 auto;
}

.prose .petri-legend-swatch--executor {
  background: rgba(25, 21, 17, 0.9);
}

.prose .petri-legend-swatch--state {
  border: 1px solid rgba(40, 34, 26, 0.32);
  background: rgba(255, 253, 248, 0.2);
}

.prose .petri-legend-swatch--tool {
  border: 1px solid rgba(40, 34, 26, 0.22);
  background: rgba(40, 34, 26, 0.07);
}

.prose .petri-flow {
  position: absolute;
  inset: 0.95rem -0.35rem 0 -0.35rem;
  font-family: "Source Sans 3", sans-serif;
}

.prose .petri-flow .react-flow__renderer {
  background: transparent;
}

.prose .petri-flow .react-flow__pane {
  cursor: default;
}

.prose .petri-flow .react-flow__node {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.prose .petri-flow-node {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 118px;
  min-height: 1.78rem;
  padding: 0 0.7rem;
  border: 1px solid rgba(40, 34, 26, 0.3);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.2);
  color: rgba(72, 65, 55, 0.92);
  font-size: 0.76rem;
  line-height: 1;
  letter-spacing: 0.018em;
  white-space: nowrap;
}

.prose .petri-flow-node--model {
  width: 150px;
  min-height: 2.18rem;
  border: 1px solid rgba(25, 21, 17, 0.94);
  border-radius: 4px;
  background: rgba(25, 21, 17, 0.94);
  box-shadow: none;
  color: rgba(255, 253, 248, 0.96);
  font-size: 0.86rem;
  font-weight: 500;
}

.prose .petri-flow-node--tool {
  width: 104px;
  min-height: 1.62rem;
  padding: 0 0.55rem;
  border-color: rgba(40, 34, 26, 0.24);
  background: rgba(40, 34, 26, 0.06);
  font-size: 0.7rem;
  color: rgba(72, 65, 55, 0.88);
}

.prose .petri-flow .react-flow__handle {
  width: 1px;
  height: 1px;
  border: 0;
  background: transparent;
  opacity: 0;
}

.prose .petri-flow .react-flow__edge-path {
  stroke: rgba(40, 34, 26, 0.22);
  stroke-width: 1.1;
}

.prose .petri-flow .react-flow__edge.is-active .react-flow__edge-path,
.prose .petri-flow .react-flow__edge-path.is-active {
  stroke: rgba(110, 58, 30, 0.96);
  stroke-width: 1.85;
}

.prose .petri-moving-token {
  fill: rgba(110, 58, 30, 0.98);
  stroke: rgba(255, 253, 248, 0.86);
  stroke-width: 1.2;
  filter: drop-shadow(0 0 4px rgba(110, 58, 30, 0.22));
  pointer-events: none;
}

.prose .planner-readout {
  position: absolute;
  left: 0.15rem;
  bottom: 0.15rem;
  z-index: 6;
  display: block;
  max-width: calc(100% - 0.3rem);
  min-height: 1rem;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.66rem;
  font-weight: 500;
  line-height: 1.2;
  color: rgba(72, 65, 55, 0.82);
  letter-spacing: 0.035em;
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}

.prose .planner-readout[hidden] {
  display: none;
}

.prose .planner-readout span {
  display: inline-block;
  margin-right: 0.38rem;
  opacity: 0;
  transform: translateY(1px);
  animation: planner-readout-in 140ms ease-out forwards;
}

.prose .planner-readout-model,
.prose .planner-readout-value {
  color: rgba(40, 34, 26, 0.9);
  font-weight: 600;
}

.prose .planner-readout-key {
  color: rgba(93, 85, 72, 0.66);
  font-weight: 500;
}

.prose .planner-readout-separator {
  color: rgba(40, 34, 26, 0.4);
  margin-right: 0.42rem;
}

@keyframes planner-readout-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.prose .spec {
  font-size: 0.82em;
  color: var(--text-muted);
}

.prose .arrow-list {
  margin: 0.75rem 0 1.15rem;
  padding: 0;
  list-style: none;
}

.prose .arrow-list li {
  position: relative;
  margin-bottom: 0.35rem;
  padding-left: 1.25rem;
}

.prose .arrow-list li::before {
  content: ">";
  position: absolute;
  left: 0;
  color: var(--text-muted);
}

.prose .math {
  margin: 0.75rem 0;
  text-align: center;
  font-style: italic;
}

.prose .technical-note,
.prose .code-example {
  margin: 1.15rem 0 1.55rem;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(40, 34, 26, 0.14);
  border-left: 3px solid rgba(110, 58, 30, 0.42);
  border-radius: 3px;
  background: rgba(40, 34, 26, 0.032);
}

.prose .equation {
  margin: 0 0 0.75rem;
  text-align: center;
  font-family: "SF Mono", "Menlo", "Consolas", monospace;
  font-size: 0.95em;
  font-style: normal;
  color: var(--text);
}

.prose .symbol-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.35rem;
  margin: 0;
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.prose .symbol-list div {
  display: grid;
  grid-template-columns: minmax(4.5rem, 0.28fr) 1fr;
  gap: 0.8rem;
  align-items: baseline;
}

.prose .symbol-list dt,
.prose .symbol-list dd {
  margin: 0;
}

.prose .symbol-list dt {
  color: var(--text);
}

.prose .code-example-label {
  display: block;
  margin: 0 0 0.55rem;
  font-family: "SF Mono", "Menlo", "Consolas", monospace;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent);
  text-transform: uppercase;
}

.prose .code-example pre {
  margin: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  font-family: "SF Mono", "Menlo", "Consolas", monospace;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--text);
}

.prose .code-example code {
  display: block;
  padding: 0;
  border-radius: 0;
  background: transparent;
  font-size: inherit;
}

.prose .excerpt {
  margin: 1.25rem 0 1.5rem;
  padding: 1rem 1.25rem 0.95rem;
  background: rgba(40, 34, 26, 0.035);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 2px;
  font-size: 0.92em;
  line-height: 1.65;
  color: var(--text-muted);
}

.prose .excerpt-label {
  display: block;
  margin: 0 0 0.5rem;
  font-family: "SF Mono", "Menlo", "Consolas", monospace;
  font-size: 0.78em;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--text-subtle);
  text-transform: uppercase;
}

.prose .excerpt p {
  margin-bottom: 0;
}

.table-wrap {
  margin: 1rem 0 1.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-wrap:focus-visible {
  outline: 2px solid rgba(110, 58, 30, 0.78);
  outline-offset: 4px;
}

.table-wrap table {
  min-width: 30rem;
  margin: 0;
}

.prose table caption {
  margin: 0 0 0.35rem;
  caption-side: top;
  text-align: left;
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-subtle);
  letter-spacing: 0.03em;
}

.table-wrap.compact-table {
  margin: -0.15rem 0 1.65rem;
}

.table-wrap.compact-table table {
  min-width: 26rem;
  font-size: 0.82em;
}

.table-wrap.compact-table th,
.table-wrap.compact-table td {
  padding: 0.28rem 0.5rem;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88em;
}

.prose th {
  padding: 0.4rem 0.6rem;
  border-bottom: 2px solid var(--border-strong);
  text-align: left;
  font-family: "Source Sans 3", sans-serif;
  font-weight: 600;
  color: var(--text-muted);
}

.prose td {
  padding: 0.35rem 0.6rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.prose .results-table-wrap {
  margin-bottom: 0.9rem;
}

.prose .results-table th[scope="rowgroup"] {
  width: 34%;
  border-bottom: 1px solid rgba(40, 34, 26, 0.18);
  font-family: "Source Sans 3", sans-serif;
  font-weight: 600;
  color: var(--text);
  vertical-align: middle;
}

.prose .results-table .section-start th,
.prose .results-table .section-start td {
  border-top: 1px solid rgba(40, 34, 26, 0.18);
}

.prose .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.prose .table-note {
  margin: 0.1rem 0 1.65rem;
  padding: 0.8rem 0.95rem 0.78rem;
  border: 1px solid rgba(110, 58, 30, 0.18);
  border-left: 3px solid rgba(110, 58, 30, 0.48);
  border-radius: 3px;
  background: rgba(40, 34, 26, 0.035);
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.prose .table-note-label {
  display: block;
  margin-bottom: 0.28rem;
  font-family: "SF Mono", "Menlo", "Consolas", monospace;
  font-size: 0.72em;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent);
  text-transform: uppercase;
}

.prose .table-note p {
  margin: 0;
}

.site-footer {
  position: fixed;
  right: 0;
  bottom: 1rem;
  left: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  z-index: 10;
}

.contact {
  display: flex;
  justify-content: center;
  gap: 1.75rem;
}

.contact a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  color: var(--text-muted);
  text-decoration: none;
}

.contact a:hover {
  color: var(--text);
}

.copyright {
  margin: 0;
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.78rem;
  color: var(--text-muted);
}

@media (min-width: 1180px) {
  :root {
    --type-prose-body: 18px;
    --type-prose-h1: 2.05rem;
    --type-prose-label: 0.93rem;
    --type-entry-title: 1.08rem;
    --type-entry-date: 0.96rem;
    --type-entry-summary: 1rem;
    --type-home-name: 1.12rem;
    --type-home-label: 1rem;
  }

  .page-header {
    left: max(1.25rem, calc((100vw - 1100px) / 2 + 0.9rem));
  }

  .page-shell {
    max-width: 1100px;
    padding: 3.35rem 2.25rem 6.25rem 5.25rem;
  }

  .prose {
    line-height: 1.75;
  }
}

@media (max-width: 980px) and (min-width: 701px) {
  .page-header {
    position: fixed;
    top: 1.35rem;
    left: max(1rem, calc((100vw - 860px) / 2 + 0.75rem));
    margin: 0;
    padding: 0;
  }

  .page-shell {
    max-width: 860px;
    padding: 1.15rem 1.25rem 4rem 4rem;
  }

  .site-back {
    min-width: 2rem;
    min-height: 2rem;
  }

  .site-footer {
    position: static;
    margin-top: auto;
    padding: 1.75rem 1rem 1.75rem;
  }

}

@media (max-width: 940px) {
  .prose .example-layout {
    grid-template-columns: 1fr;
  }

  .prose .example-panel--grid {
    order: 1;
    padding: 0;
    border-right: 0;
  }

  .prose .example-panel--net {
    order: 2;
    min-height: clamp(29rem, 76vw, 38rem);
  }
}

@media (max-width: 700px) {
  :root {
    --type-prose-body: 16px;
    --type-prose-h1: 1.5rem;
    --type-entry-title: 0.94rem;
    --type-entry-date: 0.86rem;
    --type-entry-summary: 0.9rem;
    --type-home-name: 1rem;
    --type-home-label: 0.94rem;
  }

  .page-header {
    display: none;
  }

  .page-shell {
    padding: 1rem 1rem 3.5rem;
  }

  .prose .meta,
  .cv-page .meta {
    justify-content: flex-start;
    margin-bottom: 2.25rem;
  }

  .prose .run-selector,
  .prose .grid-controls {
    gap: 0.55rem;
  }

  .prose .example-layout {
    grid-template-columns: 1fr;
  }

  .prose .example-panel--net {
    min-height: clamp(27rem, 98vw, 34rem);
  }

  .prose .example-panel--grid {
    width: 100%;
  }

  .prose .grid-ledger {
    gap: 0.32rem 0.58rem;
  }
}

@media (max-width: 700px) {
  .prose figure.benchmark-figure {
    max-width: 100%;
  }

  .table-wrap {
    margin: 0.85rem 0 1.35rem;
  }

  .table-wrap table {
    min-width: 24rem;
  }

  .prose table {
    font-size: 0.83em;
  }

  .prose th,
  .prose td {
    padding: 0.32rem 0.45rem;
  }

  .prose figure {
    margin: 1.1rem 0 1.35rem;
  }

  .prose figure.benchmark-figure,
  .prose figure.benchmark-figure--sweep,
  .prose figure.benchmark-figure--bars {
    max-width: 100%;
  }

  .prose figcaption {
    font-size: 0.79rem;
  }

  .prose .technical-note,
  .prose .code-example {
    padding: 0.82rem 0.85rem;
  }

  .prose .symbol-list div {
    grid-template-columns: 1fr;
    gap: 0.08rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}


.prose figure {
  margin: 1.5rem 0 1.75rem;
}

.prose .result-lead {
  margin: 0.4rem 0 1rem;
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.94em;
  line-height: 1.58;
  color: var(--text-muted);
}

.prose figure img {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--surface);
}

.prose .figure-full-link {
  display: inline-flex;
  margin: 0 0 0.42rem;
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-muted);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.prose .figure-frame {
  padding: 0.58rem;
  border: 1px solid rgba(40, 34, 26, 0.18);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.78), rgba(255, 253, 248, 0.48)),
    rgba(40, 34, 26, 0.045);
  box-shadow:
    inset 0 0 0 1px rgba(255, 253, 248, 0.34),
    0 1px 2px rgba(40, 34, 26, 0.04);
}

.prose .figure-frame img {
  border: 1px solid rgba(40, 34, 26, 0.2);
  border-radius: 3px;
  background: #fffdf8;
  filter: contrast(1.08) saturate(0.96);
}

.figure-expand {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.figure-expand img {
  pointer-events: none;
}

.figure-lightbox {
  width: min(96vw, 90rem);
  max-width: none;
  max-height: 92vh;
  padding: 0.85rem;
  border: 1px solid rgba(40, 34, 26, 0.24);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.96);
  box-shadow: var(--shadow);
}

.figure-lightbox::backdrop {
  background: rgba(42, 34, 24, 0.48);
  backdrop-filter: blur(2px);
}

.figure-lightbox button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-out;
}

.figure-lightbox img {
  width: 100%;
  max-height: calc(92vh - 1.7rem);
  height: auto;
  object-fit: contain;
  border: 1px solid rgba(40, 34, 26, 0.18);
  border-radius: 4px;
  background: #fffdf8;
}

.prose figcaption {
  margin-top: 0.55rem;
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.prose figure.benchmark-figure {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.prose figure.benchmark-figure--sweep {
  max-width: 760px;
}

.prose figure.benchmark-figure--moons {
  max-width: 520px;
}

.prose figure.benchmark-figure--bars {
  max-width: 860px;
}

.prose figure.benchmark-figure img {
  display: block;
  width: 100%;
  height: auto;
}


.entry-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 0;
  border-top: 1px dotted var(--border);
}

.prose a.entry-project,
.prose a.entry-project:hover,
.prose a.entry-project:focus-visible,
.prose a.entry-project:visited {
  position: relative;
  display: block;
  margin: 0 -0.55rem;
  padding: 0.72rem 0.55rem 0.78rem 0.9rem;
  border-bottom: 1px dotted var(--border);
  line-height: 1.5;
  text-decoration: none;
  transition: border-color 90ms ease-out;
}

.prose a.entry-project::before {
  content: "";
  position: absolute;
  top: 0.98rem;
  bottom: 0.98rem;
  left: 0.25rem;
  width: 2px;
  border-radius: 999px;
  background: rgba(110, 58, 30, 0.42);
  opacity: 0;
  transform: scaleY(0.55);
  transform-origin: center;
  transition:
    opacity 90ms ease-out,
    transform 90ms ease-out;
}

.prose a.entry-project:hover,
.prose a.entry-project:focus-visible {
  border-bottom-color: rgba(110, 58, 30, 0.34);
}

.prose a.entry-project:hover::before,
.prose a.entry-project:focus-visible::before {
  opacity: 1;
  transform: scaleY(1);
}

.entry-project-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.18rem;
  line-height: 1.45;
}

.entry-project-name {
  display: inline;
  font-family: "Special Elite", cursive;
  font-size: var(--type-entry-title);
  font-weight: 400;
  color: var(--text);
  transition: color 90ms ease-out;
}

.entry-project-date {
  display: inline;
  font-family: "Special Elite", cursive;
  font-size: var(--type-entry-date);
  color: var(--text-muted);
  transition: color 90ms ease-out;
}

.entry-project-separator {
  display: inline;
  font-family: "Special Elite", cursive;
  font-size: var(--type-entry-date);
  color: var(--text-subtle);
}

.entry-project-date::after {
  content: ">";
  display: inline-block;
  margin-left: 0.35em;
  font-family: "Special Elite", cursive;
  font-size: var(--type-entry-title);
  color: var(--text-muted);
  transition:
    color 90ms ease-out,
    transform 90ms ease-out;
}

.entry-project-desc {
  display: block;
  margin-top: 0.16rem;
  font-family: "Source Sans 3", sans-serif;
  font-size: var(--type-entry-summary);
  line-height: 1.5;
  color: var(--text-muted);
  transition: color 90ms ease-out;
}

.entry-project:hover .entry-project-name,
.entry-project:focus-visible .entry-project-name {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.entry-project:hover .entry-project-date,
.entry-project:focus-visible .entry-project-date {
  color: var(--text-muted);
}

.entry-project:hover .entry-project-desc,
.entry-project:focus-visible .entry-project-desc {
  color: var(--text);
}

.entry-project:hover .entry-project-date::after,
.entry-project:focus-visible .entry-project-date::after {
  color: var(--accent);
  transform: translateX(2px);
}

.article-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 3.2rem;
  padding-top: 1.15rem;
  border-top: 1px dotted var(--border);
}

.prose .article-nav-link,
.prose a.article-nav-link:hover,
.prose a.article-nav-link:focus-visible,
.prose a.article-nav-link:visited {
  display: block;
  padding: 0.8rem 0.9rem 0.9rem;
  border: 1px solid rgba(40, 34, 26, 0.1);
  border-radius: 6px;
  background: rgba(255, 253, 248, 0.16);
  color: var(--text);
  text-decoration: none;
  transition:
    background-color 90ms ease-out,
    border-color 90ms ease-out,
    box-shadow 90ms ease-out;
}

.prose a.article-nav-link:hover,
.prose a.article-nav-link:focus-visible {
  background: rgba(40, 34, 26, 0.035);
  border-color: rgba(110, 58, 30, 0.2);
  box-shadow: inset 0 0 0 1px rgba(40, 34, 26, 0.035);
}

.article-nav-link--disabled {
  opacity: 0.62;
}

.article-nav-link--next {
  grid-column: 2;
  text-align: right;
}

.article-nav-kicker {
  display: block;
  margin-bottom: 0.2rem;
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.article-nav-title {
  display: block;
  font-family: "Special Elite", cursive;
  font-size: var(--type-entry-title);
  line-height: 1.35;
  color: var(--text);
  transition: color 90ms ease-out;
}

.article-nav-link:hover .article-nav-title,
.article-nav-link:focus-visible .article-nav-title {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

@media (max-width: 700px) {
  .article-nav {
    grid-template-columns: 1fr;
  }

  .article-nav-link--next {
    grid-column: auto;
    text-align: left;
  }
}
