@font-face {
  font-family: "Mona Sans";
  font-style: normal;
  font-weight: 200 900;
  font-stretch: 75% 125%;
  font-display: swap;
  src: url("/fonts/mona-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Mona Sans";
  font-style: normal;
  font-weight: 200 900;
  font-stretch: 75% 125%;
  font-display: swap;
  src: url("/fonts/mona-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Tokens. Paper, blue-black ink, a highlighter for "in progress" and a
   grader's red pen for failures. */
:root {
  --paper: #EDEFF2;
  --raised: #F7F8FA;
  --ink: #1B2236;
  --graphite: #525B6D;
  --rule: #C5CBD5;
  --rule-soft: #DCE0E6;
  --mark: #FFE04A;
  --mark-edge: #1B2236;
  --pen: #C42F3A;
  --on-mark: #1B2236;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3125rem;
  --step-2: clamp(1.3125rem, 1.05rem + 0.9vw, 1.625rem);
  --step-3: clamp(1.625rem, 1.2rem + 1.6vw, 2.25rem);

  --wrap: 75rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section-space: clamp(4rem, 9vw, 7.5rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121826;
    --raised: #192034;
    --ink: #E6E9EF;
    --graphite: #A0A8B8;
    --rule: #364058;
    --rule-soft: #262E43;
    --mark-edge: transparent;
    --pen: #FF7A7A;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Mona Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: var(--step-0);
  font-weight: 420;
  font-stretch: 100%;
  line-height: 1.6;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: var(--mark); color: var(--on-mark); }

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Links: underlined, and swiped with highlighter on hover. */
a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
  background-image: linear-gradient(var(--mark), var(--mark));
  background-repeat: no-repeat;
  background-position: 0 88%;
  background-size: 0% 0.5em;
  transition: background-size 220ms cubic-bezier(.3,.7,.2,1), color 120ms;
}
a:hover {
  background-size: 100% 0.5em;
  text-decoration-color: currentColor;
}
@media (prefers-color-scheme: dark) {
  a:hover { background-size: 100% 100%; background-position: 0 0; color: var(--on-mark); text-decoration-color: transparent; }
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.5rem 0.75rem;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
}
.skip:focus { top: 1rem; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Top bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
}
.topbar-inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1rem;
}
.wordmark {
  font-stretch: 125%;
  font-weight: 750;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.topbar nav ul { display: flex; gap: clamp(1rem, 3vw, 2rem); }
.topbar nav a { text-decoration: none; font-size: var(--step--1); font-weight: 520; }

/* Hero */
.hero { padding-block: clamp(2.5rem, 8vw, 6rem) 0; }

.name {
  font-size: clamp(3.75rem, 15.5vw, 13.5rem);
  font-weight: 820;
  font-stretch: 125%;
  line-height: 0.84;
  letter-spacing: -0.045em;
  margin-left: -0.035em;
}

.hero-body {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
  margin-top: clamp(2.25rem, 5vw, 4rem);
}
@media (min-width: 60rem) {
  .hero-body {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: start;
  }
}

.lede {
  font-size: var(--step-2);
  font-weight: 560;
  font-stretch: 106%;
  line-height: 1.3;
  letter-spacing: -0.012em;
  max-width: 30ch;
  text-wrap: pretty;
}
.role {
  margin-top: 1.25rem;
  color: var(--graphite);
  max-width: 38ch;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  margin-top: 2rem;
}
.actions a { font-weight: 560; }

.button {
  display: inline-block;
  padding: 0.7rem 1.15rem;
  border-radius: 4px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
  transition: transform 120ms, background-color 120ms, color 120ms;
}
.button:hover { background: var(--mark); color: var(--on-mark); }
.button:active { transform: translateY(1px); }

/* Eval monitor */
.monitor {
  position: relative;
  padding: clamp(1rem, 2.5vw, 1.5rem);
  background: var(--raised);
  border: 1px solid var(--rule);
  border-radius: 6px;
}
.monitor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.monitor-title { font-weight: 620; font-size: var(--step--1); }
.replay {
  font: inherit;
  font-size: var(--step--1);
  font-weight: 560;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  transition: background-color 120ms, border-color 120ms, color 120ms;
}
.replay:hover { background: var(--mark); border-color: var(--mark); color: var(--on-mark); }
.replay[aria-busy="true"] { color: var(--graphite); }

.cells {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 4px;
  border-radius: 2px;
}
@media (min-width: 30rem) { .cells { grid-template-columns: repeat(18, minmax(0, 1fr)); } }
@media (min-width: 60rem) { .cells { grid-template-columns: repeat(15, minmax(0, 1fr)); } }
@media (min-width: 72rem) { .cells { grid-template-columns: repeat(18, minmax(0, 1fr)); } }
.cells:focus-visible { outline-offset: 6px; }

.cell {
  display: block;
  aspect-ratio: 1;
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px var(--rule);
  transition: background-color 140ms, box-shadow 140ms;
}
.cell[data-s="setup"] { box-shadow: inset 0 0 0 1.5px var(--graphite); }
.cell[data-s="agent"] { background: var(--mark); box-shadow: inset 0 0 0 1px var(--mark-edge); }
.cell[data-s="verify"] {
  background: radial-gradient(circle, var(--on-mark) 0 22%, var(--mark) 24%);
  box-shadow: inset 0 0 0 1px var(--mark-edge);
}
.cell[data-s="pass"] { background: var(--ink); box-shadow: none; }
.cell[data-s="fail"] {
  box-shadow: inset 0 0 0 1.5px var(--pen);
  background: linear-gradient(to top right, transparent calc(50% - 0.9px), var(--pen) calc(50% - 0.9px) calc(50% + 0.9px), transparent calc(50% + 0.9px));
}
.cells .cell.is-active { outline: 2px solid var(--ink); outline-offset: 1px; }

.stats {
  display: grid;
  grid-template-columns: repeat(3, max-content);
  gap: 0.5rem clamp(1.5rem, 4vw, 2.5rem);
  margin-top: 1.25rem;
}
.stats dt { font-size: var(--step--1); color: var(--graphite); }
.stats dd { font-size: var(--step-1); font-weight: 620; line-height: 1.25; }
.stats > div:first-child dd { min-width: 6.2em; }
.stats > div:nth-child(2) dd { min-width: 2.6em; }

.legend {
  display: grid;
  grid-template-columns: repeat(2, max-content);
  gap: 0.4rem 1.5rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule-soft);
  font-size: var(--step--1);
  color: var(--graphite);
}
@media (min-width: 30rem) { .legend { grid-template-columns: repeat(3, max-content); } }
.legend li { display: flex; align-items: center; gap: 0.45rem; }
.legend .cell { width: 0.8rem; }

.monitor figcaption {
  margin-top: 1rem;
  font-size: var(--step--1);
  color: var(--graphite);
  max-width: 60ch;
}

.tip {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  min-width: 11rem;
  padding: 0.5rem 0.7rem;
  border-radius: 4px;
  background: var(--ink);
  color: var(--paper);
  font-size: var(--step--1);
  line-height: 1.4;
  transform: translate(-50%, calc(-100% - 10px));
  box-shadow: 0 6px 18px -8px rgb(10 14 24 / 0.45);
}
.tip strong { display: block; font-weight: 640; }

/* Sections: heading in a gutter, content to the right. */
.section {
  display: grid;
  gap: 1.25rem;
  padding-block: var(--section-space) 0;
}
.section > h2,
.contact > h2 {
  font-size: var(--step-0);
  font-weight: 760;
  font-stretch: 125%;
  letter-spacing: -0.005em;
  line-height: 1.3;
}
.section-body { padding-top: 0; }

@media (min-width: 60rem) {
  .section {
    grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
    gap: 2rem;
  }
  .section > h2 {
    position: sticky;
    top: 5rem;
    align-self: start;
    padding-top: 1.25rem;
    border-top: 2px solid var(--ink);
  }
  .section-body {
    padding-top: 1.25rem;
    border-top: 1px solid var(--rule);
  }
}

.prose { max-width: 64ch; }
.prose p + p { margin-top: 1em; }
.section-body.prose { max-width: none; }
.section-body.prose p { max-width: 64ch; }

h3 {
  font-size: var(--step-1);
  font-weight: 640;
  font-stretch: 108%;
  line-height: 1.3;
  letter-spacing: -0.008em;
  text-wrap: balance;
}

.when {
  color: var(--graphite);
  font-size: var(--step--1);
  padding-top: 0.2rem;
}

/* Work */
.jobs > li + li,
.schools > li + li {
  margin-top: clamp(2.25rem, 4vw, 3rem);
}
.job, .schools > li {
  display: grid;
  gap: 0.35rem;
}
@media (min-width: 45rem) {
  .job, .schools > li {
    grid-template-columns: 10.5rem minmax(0, 1fr);
    gap: 1.5rem;
  }
}
.job-note { margin-top: 0.25rem; color: var(--graphite); font-size: var(--step--1); }
.job-body ul { margin-top: 0.85rem; max-width: 66ch; }
.job-body li {
  position: relative;
  padding-left: 1.1rem;
}
.job-body li + li { margin-top: 0.55rem; }
.job-body li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.68em;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 1px;
  background: var(--ink);
}
.schools p:not(.when) { color: var(--graphite); }

/* Projects */
.project + .project {
  margin-top: clamp(3rem, 6vw, 4.5rem);
  padding-top: clamp(3rem, 6vw, 4.5rem);
  border-top: 1px solid var(--rule-soft);
}
.project h3 {
  font-size: var(--step-3);
  font-weight: 760;
  font-stretch: 118%;
  letter-spacing: -0.025em;
  line-height: 1.1;
}
.project h3 a { text-decoration: none; }
.project-what {
  margin-top: 0.6rem;
  font-size: var(--step-1);
  font-weight: 500;
  line-height: 1.4;
  max-width: 44ch;
  text-wrap: pretty;
}
.project .prose { margin-top: 1.25rem; }
.stack {
  margin-top: 1.25rem;
  color: var(--graphite);
  font-size: var(--step--1);
}
.links { margin-top: 0.5rem; font-weight: 560; }
.more {
  margin-top: clamp(3rem, 6vw, 4.5rem);
  color: var(--graphite);
  max-width: 64ch;
}
.more a { color: var(--ink); }

/* forkbench dumbbell chart */
.chart {
  position: relative;
  margin-top: 2rem;
  padding: clamp(1rem, 2.5vw, 1.5rem);
  background: var(--raised);
  border: 1px solid var(--rule);
  border-radius: 6px;
}
.chart-title { font-weight: 620; }
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  margin-top: 0.5rem;
  font-size: var(--step--1);
  color: var(--graphite);
}
.chart-legend li { display: flex; align-items: center; gap: 0.45rem; }

.dot {
  display: inline-block;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
}
.dot.is-fork { background: var(--ink); box-shadow: 0 0 0 2px var(--raised); }
.dot.is-scratch { background: var(--raised); box-shadow: inset 0 0 0 2px var(--graphite), 0 0 0 2px var(--raised); }

.db {
  --label-w: 8.5rem;
  --save-w: 3.25rem;
  --db-gap: 0.75rem;
  position: relative;
  margin-top: 1.25rem;
}
.db::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 1.5rem;
  left: calc(var(--label-w) + var(--db-gap));
  right: calc(var(--save-w) + var(--db-gap));
  background-image: linear-gradient(to right, var(--rule-soft) 1px, transparent 1px);
  background-size: 25% 100%;
  box-shadow: inset -1px 0 0 var(--rule-soft);
  pointer-events: none;
}
.db-row,
.db-axis {
  display: grid;
  grid-template-columns: var(--label-w) minmax(0, 1fr) var(--save-w);
  align-items: center;
  gap: var(--db-gap);
}
.db-row {
  position: relative;
  padding-block: 0.55rem;
  border-radius: 3px;
  cursor: default;
}
.db-row:hover, .db-row:focus-visible { background: color-mix(in srgb, var(--mark) 22%, transparent); }
.db-row:focus-visible { outline-offset: 0; }
.db-task { display: block; font-weight: 560; font-size: var(--step--1); line-height: 1.3; }
.db-size { display: block; font-size: 0.8125rem; color: var(--graphite); line-height: 1.3; }
.db-track {
  position: relative;
  height: 1.5rem;
}
.db-track .dot,
.db-line {
  position: absolute;
  top: 50%;
}
.db-track .dot { transform: translate(-50%, -50%); }
.db-line {
  height: 2px;
  transform: translateY(-50%);
  background: var(--graphite);
  opacity: 0.55;
}
.db-save {
  text-align: right;
  font-weight: 620;
  font-size: var(--step--1);
}
.db-axis { margin-top: 0.25rem; }
.db-ticks {
  position: relative;
  height: 1.25rem;
  font-size: 0.8125rem;
  color: var(--graphite);
}
.db-ticks span { position: absolute; top: 0; transform: translateX(-50%); }
.db-ticks span:first-child { transform: none; }
.db-ticks span:last-child { transform: translateX(-100%); }
.db-axis-end { font-size: 0.8125rem; color: var(--graphite); text-align: right; }

@media (max-width: 36rem) {
  .db { --save-w: 3rem; }
  .db::before { display: none; }
  .db-track {
    background: linear-gradient(var(--rule), var(--rule)) center / 100% 1px no-repeat;
  }
  .db-row, .db-axis { grid-template-columns: minmax(0, 1fr) var(--save-w); gap: 0.25rem var(--db-gap); }
  .db-label { grid-column: 1 / -1; }
  .db-axis > :first-child { display: none; }
}

.chart-note {
  margin-top: 1rem;
  font-size: var(--step--1);
  color: var(--graphite);
  max-width: 64ch;
}
.chart-table { margin-top: 1rem; font-size: var(--step--1); }
.chart-table summary {
  cursor: pointer;
  font-weight: 560;
  width: fit-content;
}
.table-scroll { overflow-x: auto; margin-top: 0.75rem; }
.chart-table table {
  border-collapse: collapse;
  min-width: 40rem;
}
.chart-table th, .chart-table td {
  text-align: left;
  padding: 0.45rem 1rem 0.45rem 0;
  border-bottom: 1px solid var(--rule-soft);
  vertical-align: top;
}
.chart-table thead th { font-weight: 600; color: var(--graphite); }
.chart-table tbody th { font-weight: 560; }
.chart-table td span { display: block; color: var(--graphite); font-size: 0.8125rem; }

/* Toolkit */
.toolkit > div {
  display: grid;
  gap: 0.15rem;
}
.toolkit > div + div { margin-top: 1rem; }
@media (min-width: 45rem) {
  .toolkit > div { grid-template-columns: 10.5rem minmax(0, 1fr); gap: 1.5rem; }
}
.toolkit dt { color: var(--graphite); font-size: var(--step--1); padding-top: 0.2rem; }
.toolkit dd { max-width: 60ch; }

/* Contact */
.contact {
  padding-block: calc(var(--section-space) * 1.15) var(--section-space);
}
.contact > h2 { margin-bottom: 1.5rem; }
.contact-line {
  font-size: var(--step-2);
  font-weight: 560;
  font-stretch: 106%;
  line-height: 1.3;
  letter-spacing: -0.012em;
  max-width: 32ch;
  text-wrap: pretty;
}
.email-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem 1.25rem;
  margin-top: clamp(1.5rem, 4vw, 2.5rem);
}
.email {
  font-size: clamp(1.4rem, 0.6rem + 4.1vw, 3.6rem);
  font-weight: 780;
  font-stretch: 120%;
  letter-spacing: -0.035em;
  line-height: 1.05;
  overflow-wrap: anywhere;
}
.copy {
  font: inherit;
  font-size: var(--step--1);
  font-weight: 560;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 0.35rem 0.8rem;
  cursor: pointer;
  transition: background-color 120ms, border-color 120ms, color 120ms;
}
.copy:hover, .copy.is-copied { background: var(--mark); border-color: var(--mark); color: var(--on-mark); }
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.75rem;
  margin-top: 2rem;
  font-weight: 560;
}

/* Footer */
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-block: 1.5rem 2.5rem;
  border-top: 1px solid var(--rule);
  font-size: var(--step--1);
  color: var(--graphite);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

@media print {
  .topbar, .monitor, .replay, .copy, .skip { display: none !important; }
  body { background: #fff; color: #000; }
}

/* 404 */
.notfound { padding-block: clamp(4rem, 18vh, 10rem); }
.notfound .cell { width: 3rem; margin-bottom: 2rem; }
.notfound h1 {
  font-size: var(--step-3);
  font-weight: 780;
  font-stretch: 120%;
  letter-spacing: -0.025em;
  line-height: 1.1;
}
.notfound h1 + p { margin-top: 1rem; color: var(--graphite); }
.notfound a { color: var(--ink); }
