:root {
  color-scheme: light dark;
  --paper: #F6F5F2;
  --ink: #0F2A44;
  --text: #2A3542;
  --muted: #5F6873;
  --line: #E2DED5;
  --accent: #2946B0;
  --accent-soft: #2946B01f;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0B1724;
    --ink: #EEF0F3;
    --text: #CDD3DB;
    --muted: #8C96A3;
    --line: #1F2D3D;
    --accent: #9DB1FF;
    --accent-soft: #9DB1FF26;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 17px/1.62 var(--sans);
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 700px;
  margin: 0 auto;
  padding: 88px 24px 72px;
}

h1, h2, h3 { color: var(--ink); margin: 0; font-weight: 600; }

h1 {
  font-family: var(--serif);
  font-size: clamp(2.3rem, 6vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
}

h2 {
  font-family: var(--serif);
  font-size: 1.45rem;
  line-height: 1.2;
  margin-bottom: 14px;
}

h3 { font-size: 1.02rem; line-height: 1.35; }

p { margin: 0 0 12px; }

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--accent-soft);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s ease;
}
a:hover { text-decoration-color: currentColor; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

h3 a { color: var(--ink); text-decoration-color: var(--line); }
h3 a:hover { color: var(--accent); text-decoration-color: currentColor; }

::selection { background: var(--accent-soft); }

/* Intro */

.intro { margin-bottom: 64px; }

.role { margin: 10px 0 18px; color: var(--muted); font-size: 1.05rem; }

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-bottom: 30px;
  font-size: 0.95rem;
}

.lede { font-size: 1.12rem; line-height: 1.6; color: var(--ink); margin: 0; }

/* Sections */

section, .contact {
  border-top: 1px solid var(--line);
  padding-top: 28px;
  margin-top: 52px;
}

.meta { color: var(--muted); font-size: 0.9rem; margin-bottom: 10px; }

.item { margin-top: 26px; }
.item h3 { margin-bottom: 2px; }
.item .meta { margin-bottom: 8px; }

/* Experience and education */

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

.timeline li {
  display: grid;
  grid-template-columns: 9.5rem 1fr;
  gap: 18px;
  padding: 14px 0;
}
.timeline li + li { border-top: 1px dashed var(--line); }

.timeline .when {
  color: var(--muted);
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
  margin: 2px 0 0;
}

.timeline h3 { margin-bottom: 4px; }

.timeline .title {
  display: block;
  font-weight: 400;
  color: var(--muted);
  font-size: 0.95rem;
}

.timeline li p:last-child { margin-bottom: 0; }

/* Contact */

.contact { padding-bottom: 8px; }
.contact .emails { font-size: 1.12rem; line-height: 1.8; }
.contact .emails .meta { margin-left: 8px; font-size: 0.85rem; }

@media (max-width: 600px) {
  body { font-size: 16px; }
  .page { padding: 56px 16px 56px; }
  .intro { margin-bottom: 48px; }
  .lede { font-size: 1.06rem; }
  section, .contact { margin-top: 40px; }
  .timeline li { grid-template-columns: 1fr; gap: 2px; }
}

@media print {
  body { background: #fff; color: #000; }
  a { color: inherit; text-decoration: none; }
  .page { padding: 0; }
}
