@font-face {
  font-family: "Paper Mono";
  src: url("/v3-assets/fonts/PaperMonoVF.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}

:root {
  --paper: #fbfaf7;
  --ink: #191917;
  --body: #3e3c38;
  --muted: #67635c;
  --line: #c9c5bc;
  --edge: #e8e5de;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --paper: #141413;
  --ink: #ecebe6;
  --body: #c9c6be;
  --muted: #9b978e;
  --line: #4a4842;
  --edge: #2e2d2a;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #141413;
    --ink: #ecebe6;
    --body: #c9c6be;
    --muted: #9b978e;
    --line: #4a4842;
    --edge: #2e2d2a;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.65 Geist, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--paper); padding: 8px 12px; }

.wrap { max-width: 648px; margin: 0 auto; padding: 80px 24px 0; }
.wrap > * + * { margin-top: 64px; }
.page .wrap { padding-top: 64px; }
.page .wrap > * + * { margin-top: 52px; }

/* site navigation, same on every page */
.site-nav { max-width: 648px; margin: 0 auto; padding: 28px 24px 0; }
.site-nav nav { display: flex; justify-content: space-between; align-items: center; gap: 8px 24px; flex-wrap: wrap; }
.site-nav ul { display: flex; gap: 20px; margin: 0; padding: 0; list-style: none; flex-wrap: wrap; }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; color: var(--muted); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav ul a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 6px; }
.site-nav .nav-home { font-family: "Cal Sans", Geist, system-ui, sans-serif; font-size: 18px; color: var(--ink); }

/* footer, same on every page */
.foot-wrap { padding-top: 96px; padding-bottom: 72px; }
.site-foot p { color: var(--body); }

h1 { margin: 0; font-family: "Cal Sans", Geist, system-ui, sans-serif; font-weight: 400; font-size: 32px; line-height: 1.15; }
h2 { margin: 0 0 14px; font-size: 15px; font-weight: 500; color: var(--muted); }
h3 { margin: 0 0 8px; font-size: 17px; font-weight: 500; }
p { margin: 0; }
p + p { margin-top: 16px; }
strong { font-weight: 500; }

.lede { font-size: 21px; line-height: 1.45; }
.muted { color: var(--muted); }
.body { color: var(--body); }
.mono { font-family: "Paper Mono", ui-monospace, monospace; font-size: 14px; color: var(--muted); }
.mono a { color: var(--muted); }

.back { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; color: var(--muted); }
.head > * + * { margin-top: 20px; }
.intro { margin-top: 20px; }

.ascii { margin: 0 0 24px; font-family: "Paper Mono", ui-monospace, monospace; font-size: 7px; line-height: 1.15; color: #a8a49b; white-space: pre; overflow: hidden; }
ascii-art { display: block; margin-bottom: 24px; height: 64px; overflow: hidden; color: #a8a49b; font-size: 7px; }

.shot { display: block; width: 100%; height: auto; border-radius: 6px; box-shadow: 0 0 0 1px var(--edge); }
.shot-link { display: block; text-decoration: none; }

.feature + .feature { margin-top: 28px; }
.feature .row { margin-top: 14px; }
.feature p { margin-top: 10px; color: var(--body); }

.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; line-height: 1.5; }
.row { display: flex; justify-content: space-between; gap: 24px; align-items: baseline; }
.row > .mono { white-space: nowrap; }

.foot-line { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 16px; }
.theme { min-height: 44px; padding: 0; border: 0; background: none; font: inherit; color: var(--muted); cursor: pointer; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }

.button { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 6px; background: var(--ink); color: var(--paper); text-decoration: none; font-weight: 500; font-size: 16px; border: 0; cursor: pointer; }
.button:hover { color: var(--paper); }

/* wide blocks that leave the reading column */
.wide-img { width: min(820px, 100vw - 48px); margin-left: calc(50% - min(410px, 50vw - 24px)); }
.scrolly {
  width: min(1096px, 100vw - 48px);
  margin-left: calc(50% - min(548px, 50vw - 24px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}
.scrolly .steps > div { padding: 18vh 0; }
.scrolly .steps > div:first-of-type { padding-top: 24px; }
.scrolly .steps p { color: var(--body); }
.scrolly figure { margin: 0; position: sticky; top: 96px; }
.scrolly figcaption, .caption { margin-top: 10px; font-size: 14px; line-height: 1.5; color: var(--muted); }

/* photo gallery: full-width lead, then rows of two and three */
.gallery { width: min(820px, 100vw - 48px); margin: 28px 0 0 calc(50% - min(410px, 50vw - 24px)); display: flex; flex-direction: column; gap: 8px; }
.gallery img { display: block; width: 100%; height: auto; border-radius: 6px; background: var(--edge); }
.g-row { display: grid; gap: 8px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-2 img { aspect-ratio: 4 / 3; object-fit: cover; }
.g-3 img { aspect-ratio: 3 / 4; object-fit: cover; object-position: center 30%; }
.gallery .caption { margin-top: 2px; }

.timeline li { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; }
.timeline .mono { padding-top: 3px; }

.next { display: flex; justify-content: space-between; gap: 16px; }
.next a { display: inline-flex; align-items: center; min-height: 44px; }

.exp + .exp { margin-top: 22px; }
.exp .shot-link + p { margin-top: 14px; }

/* resume */
.resume .wrap { max-width: 776px; padding-top: 80px; font-size: 15px; line-height: 1.55; }
.resume .wrap > * + * { margin-top: 40px; }
.resume h1 { font-size: 30px; }
.resume h2 { font-size: 14px; margin-bottom: 12px; }
.resume .item + .item { margin-top: 14px; }
.resume .item p { color: var(--body); margin-top: 4px; }
.resume .bar { display: flex; justify-content: flex-end; align-items: center; gap: 16px; }
.resume .site-nav { max-width: 776px; }
.resume .foot-wrap { max-width: 776px; }

@media (max-width: 860px) {
  .scrolly { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .scrolly figure { position: static; order: -1; }
  .scrolly .steps > div { padding: 0; }
  .scrolly .steps > div + div { margin-top: 28px; }
}
@media (max-width: 560px) {
  .wrap, .page .wrap { padding: 48px 20px 0; }
  .site-nav { padding: 16px 20px 0; }
  .site-nav ul { gap: 16px; }
  .foot-wrap { padding-top: 72px; padding-bottom: 56px; }
  .wrap > * + * { margin-top: 52px; }
  h1 { font-size: 28px; }
  body { font-size: 16px; }
  .wide-img, .scrolly, .gallery { width: 100%; margin-left: 0; }
  .g-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-3 img:last-child { grid-column: span 2; aspect-ratio: 4 / 3; }
  .ascii { font-size: 6px; }
  .timeline li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}

@media print {
  .no-print { display: none !important; }
  body { background: #fff; color: #000; }
  .resume .wrap { padding: 0; max-width: none; }
  a { text-decoration: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
