/* Inter, SIL Open Font License. Files in fonts/. */

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/inter-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/inter-latin-500-normal.woff2") format("woff2");
}

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/inter-latin-600-normal.woff2") format("woff2");
}

:root {
  --bg: #f3f2ee;
  --ink: #171714;
  --muted: #4a4a44;
  --line: #d9d8d2;
  --dot: rgba(23, 23, 20, 0.2);
  --hero: clamp(3rem, 15.2vw, 5.5rem);
  --title: 1.375rem;
  --body: 1.0625rem;
  --meta: 0.8125rem;
  color-scheme: light;
  background: var(--bg);
  color: var(--ink);
}

:root[data-theme="dark"] {
  --bg: #0e0e0c;
  --ink: #ecebe6;
  --muted: #a8a89f;
  --line: #2c2c28;
  --dot: rgba(236, 235, 230, 0.2);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e0e0c;
    --ink: #ecebe6;
    --muted: #a8a89f;
    --line: #2c2c28;
    --dot: rgba(236, 235, 230, 0.2);
    color-scheme: dark;
  }
}

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

html {
  background: var(--bg);
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, "Noto Sans", "Segoe UI", sans-serif;
  font-size: var(--body);
  font-weight: 400;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

#field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.top,
main,
.colophon {
  position: relative;
  z-index: 1;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 20;
  background: var(--ink);
  color: var(--bg);
  padding: 0.45rem 0.7rem;
  font-size: var(--meta);
}

.skip:focus {
  top: 0.6rem;
}

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

::selection {
  background: #d5d4cc;
  color: #171714;
}

:root[data-theme="dark"] ::selection {
  background: #3a3a34;
  color: #ecebe6;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) ::selection {
    background: #3a3a34;
    color: #ecebe6;
  }
}

.wrap {
  width: min(42rem, calc(100% - 2.5rem));
  margin-inline: auto;
}

h1, h2, h3, p, ul, dl, figure {
  margin: 0;
}

h1, h2, h3, p, li, dd, a, dt {
  overflow-wrap: break-word;
}

h1 {
  font-size: var(--hero);
  font-weight: 500;
  line-height: 0.96;
  letter-spacing: -0.045em;
}

h1 span {
  display: block;
}

h2 {
  font-size: var(--meta);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

h3 {
  font-size: var(--title);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

p, li, dd, .org {
  font-size: var(--body);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
}

a:hover {
  text-decoration-color: currentColor;
}

.meta,
nav a,
.theme,
.colophon,
.kicker,
h2,
.stack,
.links,
dt {
  font-size: var(--meta);
  line-height: 1.45;
}

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid transparent;
}

.top.is-scrolled {
  border-bottom-color: var(--line);
}

.top-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  min-height: 3.25rem;
  padding-block: 0.35rem;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1.05rem;
}

nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--muted);
  text-decoration: none;
}

nav a:hover {
  color: var(--ink);
}

.nav-wide {
  display: none;
}

.theme {
  margin-left: auto;
  min-width: 4.5rem;
  min-height: 2.5rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.theme:hover {
  border-color: var(--ink);
}

.hero {
  padding: 3.25rem 0 2.75rem;
}

.kicker {
  margin-bottom: 1.15rem;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.dek {
  max-width: 38em;
  margin-top: 1.6rem;
  text-wrap: balance;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
  margin-top: 1.5rem;
}

.hero-links a {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
}

section {
  scroll-margin-top: 4.5rem;
  padding: 2.75rem 0 0.25rem;
}

h2 {
  margin-bottom: 1.35rem;
}

h2 span {
  display: inline-block;
  min-width: 1.8em;
  letter-spacing: 0.08em;
}

.about p + p {
  margin-top: 1rem;
}

.card,
.role,
.school {
  border-top: 1px solid var(--line);
  padding: 1.35rem 0 1.45rem;
}

.cards .card:last-child,
.roles .role:last-child {
  border-bottom: 1px solid var(--line);
}

.card {
  display: grid;
  grid-template-columns: 2rem 1fr;
  column-gap: 0.65rem;
  align-items: start;
}

.num {
  font-size: var(--meta);
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  padding-top: 0.42rem;
}

.card-main .meta {
  margin-top: 0.3rem;
}

.card-main p + p {
  margin-top: 0.75rem;
}

.stack,
.links,
.meta {
  color: var(--muted);
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.15rem;
  margin-top: 0.95rem;
}

.todo {
  letter-spacing: 0.01em;
}

.role-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.2rem 1.25rem;
}

.role-head h3 {
  flex: 1 1 14rem;
  min-width: 0;
}

.role-when,
.school-when,
.when {
  color: var(--muted);
  font-size: var(--meta);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.org {
  margin-top: 0.2rem;
  color: var(--muted);
}

.role ul {
  margin-top: 0.75rem;
  padding: 0;
  list-style: none;
}

.role li {
  position: relative;
  padding-left: 0.95rem;
}

.role li + li {
  margin-top: 0.45rem;
}

.role li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 4px;
  height: 4px;
  background: var(--muted);
}

.school p + p {
  margin-top: 0.75rem;
}

.ledger {
  display: grid;
  gap: 0.85rem 1.25rem;
  margin: 0;
}

.ledger dt {
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ledger dd {
  margin: 0;
}

.ledger a {
  overflow-wrap: anywhere;
}

.colophon {
  padding: 2.5rem 0 3rem;
  color: var(--muted);
}

@media (max-width: 380px) {
  .wrap {
    width: calc(100% - 2rem);
  }

  .hero {
    padding-top: 2.4rem;
  }

  section {
    padding-top: 2.35rem;
  }
}

@media (min-width: 480px) {
  .nav-wide {
    display: inline-flex;
  }
}

@media (max-width: 640px) {
  .role-when,
  .school-when {
    margin-left: 0;
  }
}

@media (min-width: 900px) {
  .hero {
    padding: 4.5rem 0 3.25rem;
  }

  section {
    padding-top: 3.75rem;
  }

  .ledger {
    grid-template-columns: 10.25rem 1fr;
    align-items: baseline;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html.js .reveal {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }

  html.js .reveal.is-in {
    opacity: 1;
    transform: none;
  }

  html.js .card.reveal:nth-child(2) { transition-delay: 0.04s; }
  html.js .card.reveal:nth-child(3) { transition-delay: 0.08s; }
  html.js .card.reveal:nth-child(4) { transition-delay: 0.12s; }
}

@media (prefers-reduced-motion: reduce) {
  html.js .reveal {
    opacity: 1;
    transform: none;
  }
}

@media print {
  #field,
  .theme,
  .skip,
  .top {
    display: none !important;
  }

  html.js .reveal {
    opacity: 1 !important;
    transform: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .card,
  .role,
  .school {
    break-inside: avoid;
  }

  a {
    text-decoration: none;
  }
}
