/* The whole page is one sheet of computation paper. Every box sits on the grid
   and every line of text sits on a ruled line, so --u and --bl drive the layout:
   --u is one square, --bl moves the grid down so ruled lines pass through baselines. */

@font-face { font-family: "CMU Serif"; src: url("/fonts/cmu-serif-roman.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "CMU Serif"; src: url("/fonts/cmu-serif-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "CMU Serif"; src: url("/fonts/cmu-serif-bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "CMU Typewriter"; src: url("/fonts/cmu-tt-roman.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "CMU Typewriter"; src: url("/fonts/cmu-tt-bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --u: 28px;
  --bl: 20px;
  --major: calc(5 * var(--u));
  /* the content column: as wide as 54 squares, never closer than --side to the edge */
  --maxw: calc(54 * var(--u));
  --side: calc(2 * var(--u));
  --bar: calc(2 * var(--u));

  --serif: "CMU Serif", "Latin Modern Roman", "STIX Two Text", "Times New Roman", serif;
  --mono: "CMU Typewriter", ui-monospace, "Cascadia Mono", Consolas, monospace;

  color-scheme: light;
  --paper: #eef3e7;
  --grid: #d6e2cf;
  --grid-major: #b9d0b2;
  --ink: #15211a;
  --ink-2: #3f4f45;
  --ink-3: #5c6c61;
  --axis: #1d2c23;
  --pen: #c32f18;
  --pen-2: #1c49ad;
  --pen-3: #8a5a00;
  --wash: rgb(195 47 24 / 0.1);
  --wash-2: rgb(28 73 173 / 0.1);
  --circle: #2c5a44;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #111e19;
  --grid: #1c2f27;
  --grid-major: #2b4539;
  --ink: #e9efe3;
  --ink-2: #bccabd;
  --ink-3: #93a596;
  --axis: #dfe8da;
  --pen: #ff8a70;
  --pen-2: #8fb6ff;
  --pen-3: #e8c46c;
  --wash: rgb(255 138 112 / 0.14);
  --wash-2: rgb(143 182 255 / 0.14);
  --circle: #8fd0ad;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  font-size: 19px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--bar) + var(--u));
}

body {
  margin: 0;
  position: relative;
  min-height: 100svh;
  overflow-x: hidden;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1rem;
  line-height: var(--u);
  font-kerning: normal;
  font-variant-ligatures: common-ligatures;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background-color: var(--paper);
  background-image:
    linear-gradient(to right, var(--grid-major) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-major) 1px, transparent 1px),
    linear-gradient(to right, var(--grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
  background-size:
    var(--major) var(--major),
    var(--major) var(--major),
    var(--u) var(--u),
    var(--u) var(--u);
  background-position:
    0 var(--bl),
    0 var(--bl),
    0 var(--bl),
    0 var(--bl);
}

p, ul, ol, dl, figure, h1, h2, h3, h4, blockquote, pre { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, svg, canvas { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }

a { color: inherit; text-decoration-line: underline; text-decoration-color: var(--pen); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--pen); }

:focus-visible { outline: 2px solid var(--pen); outline-offset: 2px; }

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

.skip { position: absolute; left: var(--u); top: -100px; z-index: 30; padding: 0 var(--u); background: var(--ink); color: var(--paper); }
.skip:focus { top: var(--u); }

.meta { font-style: italic; color: var(--ink-2); }

.katex { font-size: 1.08em; line-height: 1; }
/* inline maths and superscripts must not stretch their ruled line */
:not(.katex-display) > .katex .katex-base { margin-block: -0.6em; }
sup { font-size: 0.72em; line-height: 0; vertical-align: 0.42em; }
.nobr { white-space: nowrap; }

.text-btn {
  padding: 0; border: 0; background: none; cursor: pointer;
  text-decoration: underline; text-decoration-color: var(--pen); text-decoration-thickness: 1.5px; text-underline-offset: 3px;
}
.text-btn:hover { color: var(--pen); }

/* A sheet laid on top of the page: the LinkedIn card and the Euler widget. */
.sheet {
  border: 1.5px solid var(--axis);
  box-shadow: 5px 5px 0 var(--grid-major);
  background: var(--paper);
}

/* The content column, its left edge always on a vertical grid line ------------- */

.wrap {
  width: min(var(--maxw), calc(100vw - 2 * var(--side)));
  margin-left: max(var(--side), calc((100vw - var(--maxw)) / 2));
}
@supports (width: round(down, 1px, 1px)) {
  .wrap { margin-left: max(var(--side), round(down, calc((100vw - var(--maxw)) / 2), var(--u))); }
}

/* Top bar ------------------------------------------------------------------- */

.topbar {
  position: sticky; top: 0; z-index: 20;
  height: var(--bar);
  background: var(--paper);
  border-bottom: 1.5px solid var(--axis);
}
.topbar-inner { display: flex; align-items: center; gap: calc(2 * var(--u)); height: 100%; }
.wordmark { font-weight: 700; text-decoration: none; white-space: nowrap; }
.nav {
  flex: 1; min-width: 0; height: 100%;
  display: flex; align-items: center; justify-content: flex-end; gap: var(--u);
  overflow-x: auto; white-space: nowrap; scrollbar-width: none;
  font-size: 16px;
}
.nav::-webkit-scrollbar { display: none; }
.nav a { color: var(--ink-2); text-decoration: none; padding: 8px 0; }
.nav a:hover { color: var(--pen); }
.nav a.is-here { color: var(--ink); text-decoration: underline; text-decoration-color: var(--pen); text-decoration-thickness: 2px; text-underline-offset: 6px; }

.theme-toggle {
  flex: none;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 0 10px; margin: 0; height: var(--u);
  background: var(--paper); border: 1px solid var(--axis); border-radius: 0;
  font-size: 15px; cursor: pointer; touch-action: manipulation;
}
@media (hover: hover) {
  .theme-toggle:hover { color: var(--pen); border-color: var(--pen); }
}
.theme-toggle svg { width: 14px; height: 14px; }

/* Hero: the name is written by circles across the full width of the column ------ */

.hero { position: relative; }
.hero > .wrap { container-type: inline-size; }
.hero-canvas { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-stage {
  position: relative;
  margin-top: var(--u);
  height: calc(17cqw + var(--u));
}
@supports (width: round(up, 1px, 1px)) {
  .hero-stage { height: round(up, calc(17cqw + var(--u)), var(--u)); }
}
.hero-static { position: absolute; left: 0; top: 50%; translate: 0 -50%; width: 100%; }

.hero-row {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0 calc(2 * var(--u));
  margin-top: var(--u);
}
.hero-intro { grid-column: 1 / span 7; }
.lede { font-size: 25px; line-height: calc(1.5 * var(--u)); position: relative; top: 5px; }
.hero-links { margin-top: var(--u); display: flex; flex-wrap: wrap; gap: 0 calc(1.5 * var(--u)); }

.hero-card { grid-column: 8 / span 5; align-self: start; padding: var(--u); }

.linkedin { display: grid; grid-template-columns: calc(4 * var(--u)) minmax(0, 1fr); gap: 0 var(--u); font-size: 17px; }
.linkedin img { width: calc(4 * var(--u)); height: calc(4 * var(--u)); object-fit: cover; border: 1.5px solid var(--axis); background: #fff; }
.linkedin-text { min-width: 0; }

.card-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.card-head svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
.card-head b { font-size: 19px; }

/* Sections ------------------------------------------------------------------ */

main { position: relative; }
section { margin-top: calc(4 * var(--u)); }

h2 {
  font-size: 40px; line-height: calc(2 * var(--u)); font-weight: 700; letter-spacing: -0.005em;
  position: relative; top: 7.2px; margin-bottom: var(--u);
}
h3 { font-size: 23px; line-height: var(--u); font-weight: 700; position: relative; top: -0.8px; }

/* two sections side by side on a wide screen */
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 calc(4 * var(--u)); align-items: start; }
/* four short sections in two columns that end at about the same height; on a
   small screen they go back to reading order (see below) */
.col > section + section { margin-top: calc(3 * var(--u)); }

/* Lists on the ruled lines: a title line, then a paragraph */
.ledger li + li { margin-top: var(--u); }
.ledger .what { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--u); }
.ledger .what b { font-weight: 700; }
.ledger .when { margin-left: auto; font-family: var(--mono); font-size: 14px; color: var(--ink-3); white-space: nowrap; }
.ledger .what + p { color: var(--ink-2); }

/* Built: five products, each with a screenshot. On a laptop it's three across,
   then the two open-source apps side by side; on a wide screen all five in a row. */
.cards { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--u) calc(2 * var(--u)); }
@media (min-width: 1200px) {
  .built { grid-column: span 2; }
  .built:nth-child(n + 4) { grid-column: span 3; }
  .built:nth-child(n + 4) .built-shot { height: calc(10 * var(--u)); }
}
@media (min-width: 1600px) {
  .cards { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .built, .built:nth-child(n + 4) { grid-column: auto; }
  .built:nth-child(n + 4) .built-shot { height: calc(7 * var(--u)); }
}
.built h3 { font-size: 21px; }
.built p { font-size: 17px; color: var(--ink-2); }
.built .tag { font-family: var(--mono); font-size: 14px; color: var(--ink-3); }
.built-shot {
  display: block; height: calc(7 * var(--u)); overflow: hidden;
  border: 1.5px solid var(--axis); box-shadow: 5px 5px 0 var(--grid-major);
  /* the border sits on a grid line rather than between two */
  position: relative; top: var(--bl); margin-top: calc(1px - var(--u)); margin-bottom: calc(var(--u) - 1px);
}
.built-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top left; transition: scale 0.3s; }
.built-shot:hover { border-color: var(--pen); }
.built-shot:hover img { scale: 1.03; }

/* Drawn on the page's own grid --------------------------------------------- */

.plot text { fill: var(--ink-3); font: 13px var(--serif); font-variant-numeric: lining-nums; }
.plot .axis { stroke: var(--axis); stroke-width: 1.5; fill: none; }
.plot .tick { stroke: var(--axis); stroke-width: 1; }
.plot .dot { fill: var(--pen); }

/* Project Euler: a small sheet of graph paper under the LinkedIn card, naming the
   day's problem. It opens to show the problem: on a wide screen it drops down over
   the page, on a small one it opens in place. ------------------------------- */

.euler-slot { grid-column: 8 / span 5; position: relative; margin-top: var(--u); }
.euler-panel {
  margin: 0; padding: var(--u);
  border: 1.5px solid var(--axis);
  box-shadow: 5px 5px 0 var(--grid-major);
  background-color: var(--paper);
  background-image:
    linear-gradient(to right, var(--grid-major) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-major) 1px, transparent 1px),
    linear-gradient(to right, var(--grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
  background-size: var(--major) var(--major), var(--major) var(--major), var(--u) var(--u), var(--u) var(--u);
  background-position: 0 var(--bl), 0 var(--bl), 0 var(--bl), 0 var(--bl);
  background-attachment: local;
}
.euler-panel:not(.is-open):hover { border-color: var(--pen); }
.euler-panel h2 { font-size: inherit; line-height: var(--u); letter-spacing: 0; top: 0; margin: 0; }
.euler-intro { max-width: calc(25 * var(--u)); }
.euler-side { display: flow-root; }
.euler-panel:focus-visible { outline-offset: 0; }

.euler-toggle {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 12px; align-items: center;
  width: 100%; padding: 0; margin: 0; border: 0; background: none;
  font: inherit; line-height: inherit; color: inherit; text-align: left; cursor: pointer;
}
.euler-name { grid-row: 1; grid-column: 1; }
.euler-chev { grid-row: 1; grid-column: 2; width: 16px; height: 16px; transition: rotate 0.15s; }
.euler-peek {
  grid-row: 2; grid-column: 1 / -1;
  font-size: 15px; line-height: var(--u); font-weight: 400; font-style: italic; color: var(--ink-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.euler-toggle:hover .euler-name, .euler-toggle:hover .euler-chev { color: var(--pen); }
.euler-panel.is-open .euler-chev { rotate: 180deg; }
.euler-panel.is-open .euler-peek { display: none; }

@media (min-width: 1200px) and (min-height: 560px) {
  .nav .nav-euler { display: none; }
  /* holds the closed card's height, so opening it doesn't move the page */
  .euler-slot { min-height: 87px; }
  .euler-panel {
    --u: 21px;
    --bl: 15px;
    --major: calc(5 * var(--u));
    display: flex; flex-direction: column;
    font-size: 15.5px; line-height: var(--u);
  }
  .euler-panel.is-open {
    position: absolute; z-index: 18; top: 0; left: 0; width: 100%;
    max-height: min(calc(100vh - 2 * var(--bar)), 756px);
    overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--ink-3) transparent;
  }
  .euler-panel .euler-body { display: flex; flex-direction: column; }
  .euler-panel .euler-peek { font-size: 13.5px; }
  .euler-panel .euler-chev { width: 12px; height: 12px; }
  .euler-panel h3 { font-size: 18px; top: -0.8px; }
  .euler-panel .euler { display: block; margin: 0; }
  .euler-panel .euler-side { margin-top: var(--u); }
  .euler-panel .euler-intro { order: 2; max-width: none; margin-top: var(--u); font-size: 13.5px; color: var(--ink-2); }
  .euler-panel .euler-credit, .euler-panel .spiral-key { font-size: 13.5px; line-height: var(--u); }
  .euler-panel .spiral .cell text { font-size: 11.5px; }
  .euler-panel .euler-statement .note,
  .euler-panel .euler-statement .smaller,
  .euler-panel .euler-statement .smallest,
  .euler-panel .euler-statement .small_notice { font-size: 13.5px; }
  .euler-panel .euler-statement .monospace { font-size: 10px; line-height: 15px; max-height: calc(7 * var(--u)); }
  .euler-panel .euler-code { font-size: 13px; }
}

.euler { display: grid; grid-template-columns: minmax(0, 1fr) calc(10 * var(--u)); gap: 0 calc(3 * var(--u)); max-width: calc(34 * var(--u)); margin-top: var(--u); }
.euler-main { min-width: 0; }
.euler-statement { margin-top: var(--u); }
.euler-statement p + p, .euler-statement ul { margin-top: var(--u); }
.euler-statement table { border-collapse: collapse; margin: var(--u) 0; }
.euler-statement td { padding: 0 6px; }
.euler-statement img { max-width: 100%; height: auto; margin: var(--u) auto; background: #fff; }
.euler-statement .katex-display { margin: var(--u) 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.euler-statement .center { text-align: center; }
.euler-statement .monospace { font-family: var(--mono); font-size: 14px; line-height: 21px; max-height: calc(7 * var(--u)); overflow: auto; scrollbar-width: thin; }
.euler-statement .monospace:not(.break_word) { white-space: nowrap; }
.euler-statement .break_word { word-break: break-all; }
.euler-statement .red { color: var(--pen); font-weight: 700; }
.euler-statement .note, .euler-statement .smaller, .euler-statement .smallest, .euler-statement .small_notice { font-size: 17px; color: var(--ink-2); }
.euler-statement .margin_left { margin-left: var(--u); }
.euler-statement .tooltiptext { display: none; }
.euler-block { margin-top: var(--u); }
.euler-block > h4 { font-size: inherit; font-weight: 700; line-height: var(--u); }
.euler-approach p + p, .euler-approach ul, .euler-approach ol { margin-top: var(--u); }
.euler-approach ul { list-style: disc; padding-left: var(--u); }
.euler-approach ol { list-style: decimal; padding-left: var(--u); }
.euler-approach h5 { margin: var(--u) 0 0; font-size: inherit; font-weight: 700; }
.euler-approach .katex-display { margin: var(--u) 0; overflow-x: auto; overflow-y: hidden; }
code, pre { font-family: var(--mono); }
:not(pre) > code { font-size: 0.95em; }
.euler-code {
  overflow-x: auto; padding: 0 0 0 var(--u); border-left: 2px solid var(--axis);
  font-size: 16px; line-height: var(--u); tab-size: 4;
}
.tok-k { font-weight: 700; }
.tok-c { font-style: italic; color: var(--ink-3); font-family: var(--serif); }
.tok-s { color: var(--pen-2); }
.tok-n { color: var(--pen); }
.answer-row { display: flex; align-items: baseline; gap: var(--u); margin-top: var(--u); }
.answer-value { font-family: var(--mono); }
.euler-credit { margin-top: var(--u); font-size: 15px; color: var(--ink-3); }

.spiral { overflow: visible; }
.spiral .frame { fill: none; stroke: var(--axis); stroke-width: 1; }
.spiral .cell { cursor: pointer; }
.spiral .cell rect { fill: transparent; }
.spiral .cell text { font: 13px var(--serif); fill: var(--ink-3); text-anchor: middle; font-variant-numeric: lining-nums; }
.spiral .cell.solved rect { fill: var(--wash); }
.spiral .cell.solved text { fill: var(--ink); font-weight: 700; }
.spiral .cell.written rect { fill: var(--pen); }
.spiral .cell.written text { fill: var(--paper); font-weight: 700; }
.spiral .cell.current rect { stroke: var(--ink); stroke-width: 2; }
.spiral .cell:hover rect { stroke: var(--pen); stroke-width: 2; }
.spiral .cell:focus { outline: none; }
.spiral .cell:focus-visible rect { stroke: var(--pen); stroke-width: 3; }
.spiral-key { font-size: 15px; line-height: 21px; color: var(--ink-2); margin-top: calc(var(--u) / 2); }

/* Contact ------------------------------------------------------------------ */

.contact { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0 calc(4 * var(--u)); }
.contact > :first-child { grid-column: 1 / span 5; }
.contact > .embed { grid-column: 6 / span 7; }
.big-mail { font-size: 30px; line-height: calc(2 * var(--u)); overflow-wrap: anywhere; position: relative; top: 9.6px; }
.contact-row { display: flex; flex-wrap: wrap; gap: 0 var(--u); align-items: baseline; }
.contact-note { margin-top: var(--u); color: var(--ink-2); }

.repos { margin-top: var(--u); }
.repo { display: grid; grid-template-columns: minmax(0, 1fr) calc(11 * var(--u)); gap: 0 var(--u); }
.repo + .repo { margin-top: var(--u); }
.repo-name { font-weight: 700; }
.repo-name a { text-decoration-thickness: 1.5px; }
.repo-desc { color: var(--ink-2); font-size: 17px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.repo-lane { position: relative; height: var(--u); }

.site-footer { margin-top: calc(4 * var(--u)); padding-bottom: calc(3 * var(--u)); display: flex; justify-content: space-between; gap: var(--u); color: var(--ink-2); font-size: 17px; }
.qed { font-size: 22px; color: var(--ink); }

/* Narrower screens ---------------------------------------------------------- */

@media (max-width: 1199px) {
  :root { --u: 24px; --bl: 17px; --side: var(--u); }
  html { font-size: 17px; }
  .topbar-inner { gap: var(--u); }
  .nav { justify-content: flex-start; font-size: 15px; }
  .lede { font-size: 21px; top: 4px; }
  h2 { font-size: 32px; top: 6px; }
  h3 { font-size: 20px; }
  .euler-slot { max-width: calc(20 * var(--u)); }
  .pair { grid-template-columns: minmax(0, 1fr); }
  .quad { display: flex; flex-direction: column; }
  .quad .col { display: contents; }
  #experience { order: 1; }
  #education { order: 2; }
  #teaching { order: 3; }
  #sport { order: 4; }
  /* the 12-column rows stack: their gaps alone would be wider than a phone */
  .hero-row, .contact { display: block; }
  .hero-card { max-width: calc(20 * var(--u)); margin-top: calc(2 * var(--u)); }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--u) calc(2 * var(--u)); }
  /* an odd card out at the end takes the whole row */
  .built:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .built-shot { height: calc(9 * var(--u)); }
  .contact > .embed { margin-top: calc(2 * var(--u)); }
  .euler { grid-template-columns: minmax(0, 1fr); }
  .euler-side { margin-top: var(--u); }
  .euler-statement .monospace { font-size: 11px; line-height: 16px; }
  .euler-code { font-size: 14px; padding: 0 var(--u) 0 calc(var(--u) / 2); }
  .big-mail { font-size: 22px; }
  .site-footer { font-size: 15px; }
}

/* on a tablet the two hero cards sit side by side under the intro */
@media (min-width: 760px) and (max-width: 1199px) {
  .hero-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 calc(2 * var(--u)); align-items: start; }
  .hero-intro { grid-column: 1 / -1; }
  .hero-card, .euler-slot { grid-column: auto; max-width: none; margin-top: calc(2 * var(--u)); }
}

@media (max-width: 759px) {
  .wordmark { display: none; }
  .theme-toggle { width: 44px; height: 36px; justify-content: center; padding: 0; }
  .theme-toggle span { display: none; }
  .hero-stage { height: calc(45cqw + var(--u)); }
  @supports (width: round(up, 1px, 1px)) {
    .hero-stage { height: round(up, calc(45cqw + var(--u)), var(--u)); }
  }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .built:last-child:nth-child(odd) { grid-column: auto; }
  .built-shot { height: auto; aspect-ratio: 728 / 448; }
  .repo { grid-template-columns: minmax(0, 1fr); }
  .repo-lane { display: none; }
}

@media (max-width: 480px) {
  .linkedin { grid-template-columns: minmax(0, 1fr); }
  .linkedin-text { margin-top: var(--u); }
  .ledger .when { margin-left: 0; white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .built-shot img { transition: none; }
}

/* Print: a plain document. No grid, nothing interactive. --------------------- */

@media print {
  @page { size: A4; margin: 16mm 17mm 15mm; }
  :root, :root[data-theme="dark"] {
    --u: 16px; --bl: 0px; --paper: #fff; --ink: #000; --ink-2: #222; --ink-3: #444; --axis: #000; --pen: #000; --side: 0px;
    color-scheme: light;
  }
  html { font-size: 11pt; }
  body { background: none !important; line-height: 1.32; min-height: 0; overflow: visible; }
  a { text-decoration: none; }
  .topbar, .skip, .hero-canvas, .hero-stage, .hero-card, .built-shot, .no-print, #euler, #contact, .site-footer { display: none !important; }
  .wrap { width: auto; margin: 0; }
  main { display: flex; flex-direction: column; }
  .pair, .quad .col { display: contents; }
  #education { order: -1; }
  .hero h1.sr-only { position: static; width: auto; height: auto; margin: 0; clip: auto; overflow: visible; font-size: 24pt; font-weight: 700; line-height: 1.15; }
  .hero-row { display: block; margin: 3pt 0 0; }
  .lede { font-size: 11pt; line-height: 1.32; top: 0; }
  .print-only { display: block !important; }
  section { margin-top: 11pt; padding-top: 0 !important; }
  h2 { font-size: 13pt; line-height: 1.2; top: 0; margin-bottom: 4pt; padding-bottom: 2pt; border-bottom: 0.75pt solid #000; break-after: avoid; }
  h3 { font-size: 11pt; line-height: 1.25; top: 0; break-after: avoid; }
  .cards { display: block; }
  .built { margin-top: 6pt; break-inside: avoid; }
  .built p { font-size: 11pt; }
  .ledger li { margin-bottom: 4pt; break-inside: avoid; }
  .ledger .what + p { color: #222; }
  .ledger .when { font-size: 9pt; }
  .meta { color: #222; }
}
.print-only { display: none; }
