:root {
  --paper: #fafaf9;
  --ink: #0f172a;
  --muted: #475569;
  --rule: #e2e8f0;
  --accent: #1d4ed8;
  --accent-hover: #1e40af;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --measure: 42rem;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--paper);
  color-scheme: light;
}

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

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

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

code {
  font-family: var(--mono);
  font-size: 0.9em;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1em;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  padding: 0.5rem 0.8rem;
  background: var(--ink);
  color: var(--paper);
}

.skip-link:focus {
  top: 1rem;
}

.wrap {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

/* Header */
.site-header {
  width: 100%;
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}

.site-header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.025em;
  text-decoration: none;
  transition: opacity 150ms ease;
}

.wordmark:hover {
  opacity: 0.85;
}

.wordmark-logo {
  width: 1.75rem;
  height: 1.75rem;
  display: block;
  object-fit: contain;
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.75rem;
  font-size: 0.95rem;
  font-weight: 500;
}

.site-header nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.2rem 0;
  border-bottom: 2px solid transparent;
  transition: color 150ms ease, border-color 150ms ease;
}

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

.site-header nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
  border-bottom-color: var(--accent);
}

/* Hero */
.hero {
  padding-top: clamp(3.5rem, 10vh, 6rem);
  padding-bottom: clamp(3.5rem, 10vh, 6rem);
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.85rem;
}

.hero h1 {
  max-width: 28ch;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.hero .lede {
  max-width: var(--measure);
  margin-top: 1.25rem;
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1.55;
}

.hero .byline {
  max-width: var(--measure);
  color: var(--muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.25rem;
  background: var(--ink);
  color: #ffffff !important;
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: 4px;
  text-decoration: none;
  transition: background 150ms ease, transform 150ms ease;
}

.button:hover {
  background: var(--accent);
  color: #ffffff !important;
  transform: translateY(-1px);
}

.ghost-link {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.5rem;
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 150ms ease;
}

.ghost-link:hover {
  color: var(--ink);
}

.actions a:not(.button):not(.ghost-link) {
  color: var(--ink);
  font-weight: 500;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

.actions a:not(.button):not(.ghost-link):hover {
  color: var(--accent);
}

/* Main and sections */
main {
  display: block;
  padding-bottom: 5rem;
}

.section {
  display: grid;
  gap: 1.5rem 3rem;
  padding-top: 3.5rem;
  padding-bottom: 1.5rem;
}

.section > h2 {
  font-size: 1.25rem;
}

.section > div {
  max-width: var(--measure);
}

@media (min-width: 56rem) {
  .section {
    grid-template-columns: 13rem minmax(0, 1fr);
  }
}

.intro {
  font-size: 1.125rem;
}

.items {
  margin: 0;
  padding: 0;
  list-style: none;
}

.items > li + li {
  margin-top: 2rem;
}

.items h3 {
  font-size: 1.125rem;
  margin-bottom: 0.4rem;
}

.items p {
  margin-bottom: 0.5rem;
}

.meta {
  font-size: 0.9375rem;
  color: var(--muted);
}

.aside {
  margin-top: 2rem;
  color: var(--muted);
}

/* People */
.people {
  display: grid;
  gap: 1.1rem 2rem;
  margin: 1.75rem 0 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 40rem) {
  .people {
    grid-template-columns: 1fr 1fr;
  }
}

.people p {
  margin: 0;
}

.people br {
  display: none;
}

.people + h3 {
  margin-top: 2.25rem;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.people strong {
  display: block;
  font-weight: 600;
}

.people span {
  display: block;
  font-size: 0.9375rem;
  color: var(--muted);
}

/* Papers */
.papers {
  margin: 0;
  padding: 0;
  list-style: none;
}

.papers li > p {
  margin: 0;
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  gap: 0 0.75rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--rule);
}

.papers time {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.papers a {
  color: var(--ink);
  text-decoration: none;
}

.papers a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.papers span {
  grid-column: 2;
  display: block;
  font-size: 0.9375rem;
  color: var(--muted);
}

.papers strong {
  font-weight: 600;
  color: var(--ink);
}

.papers + h3 {
  margin-top: 2.25rem;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

/* Software */
.code-list ~ h3 {
  margin: 2rem 0 0.5rem;
  font-size: 1rem;
}

.code-list dt {
  font-family: var(--mono);
  font-size: 0.975rem;
}

.code-list dd {
  margin: 0.15rem 0 1.1rem;
}

.code-list dd code {
  white-space: nowrap;
}

/* Footer */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-top: 2rem;
  padding-bottom: 3rem;
  border-top: 1px solid var(--rule);
  font-size: 0.9375rem;
  color: var(--muted);
}

.site-footer p {
  margin: 0;
}
