:root {
  color-scheme: light dark;
  --bg: #f3efe6;
  --ink: #1a2330;
  --muted: #3f4a56;
  --line: #d5cdc0;
  --link: #15496a;
  --link-hover: #8c3a2f;
  --mark: #8c3a2f;
  --header: rgba(243, 239, 230, 0.92);
  --focus: #15496a;
  --serif: "Iowan Old Style", Palatino, "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --measure: 42rem;
  --space: clamp(1.25rem, 2vw, 2rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14181e;
    --ink: #ece7de;
    --muted: #c2bdb3;
    --line: #303844;
    --link: #9fd0e6;
    --link-hover: #f0b6a6;
    --mark: #e0a090;
    --header: rgba(20, 24, 30, 0.92);
    --focus: #9fd0e6;
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 4.5rem;
}

@media (max-width: 36rem) {
  html {
    scroll-padding-top: 8.5rem;
  }
}

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

main {
  flex: 1;
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  z-index: 2;
  padding: 0.5rem 0.75rem;
  background: var(--ink);
  color: var(--bg);
}

.skip:focus {
  top: 0.75rem;
}

a {
  color: var(--link);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--link-hover);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--header);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-block: 0.85rem;
}

.brand {
  color: inherit;
  font-family: var(--serif);
  font-size: 1.15rem;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.brand:hover {
  color: inherit;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
}

.nav a {
  color: var(--muted);
  font-size: 0.92rem;
  text-decoration: none;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

.hero {
  padding-block: clamp(3.5rem, 9vw, 6.5rem) clamp(2rem, 5vw, 3.5rem);
}

.kicker {
  margin: 0 0 0.8rem;
  color: var(--mark);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.15;
}

h1 {
  margin: 0;
  font-size: clamp(2.6rem, 7vw, 4.4rem);
  letter-spacing: -0.02em;
}

.role {
  margin: 0.85rem 0 0;
  font-size: 1.2rem;
}

.lede {
  max-width: 38rem;
  margin: 1.25rem 0 0;
  color: var(--muted);
  font-size: 1.12rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.25rem;
  margin-top: 1.75rem;
}

.actions a {
  font-weight: 600;
}

section {
  padding-bottom: clamp(2.2rem, 5vw, 3.5rem);
}

h2 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.7rem, 3vw, 2.15rem);
}

.section-note {
  margin: 0 0 0.4rem;
  color: var(--muted);
}

.entries {
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.entries li {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 0.35rem 1rem;
  padding: 1.15rem 0;
  border-top: 1px solid var(--line);
}

.entries time,
.year-gap {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.entries h3 {
  margin: 0;
  font-size: 1.22rem;
}

.entries h3 a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

.entries h3 a:hover {
  color: var(--link-hover);
}

.entries p {
  margin: 0.3rem 0 0;
  color: var(--muted);
}

.contact-list {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.contact-list li {
  padding: 0.7rem 0;
  border-top: 1px solid var(--line);
}

.contact-list a {
  font-family: var(--serif);
  font-size: 1.25rem;
}

.prose h1 {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
}

.prose {
  padding-block: clamp(2.5rem, 6vw, 4rem) 4rem;
}

.prose h2 {
  margin-top: 2rem;
  font-size: 1.45rem;
}

.prose p,
.prose li {
  max-width: 40rem;
}

.optout {
  font: inherit;
  color: var(--link);
  background: transparent;
  border: 0;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
}

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

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 1.4rem 2rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem 1.5rem;
}

.site-footer p {
  margin: 0;
}

.site-footer nav {
  display: flex;
  gap: 1rem;
}

.error-page {
  min-height: 70vh;
  display: grid;
  align-content: center;
}

::selection {
  background: #e7c7be;
  color: #1a2330;
}

@media (max-width: 40rem) {
  .entries li {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .year-gap {
    display: none;
  }
}

@media print {
  .site-header,
  .skip,
  .site-footer nav,
  .actions {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }

  a {
    color: #000;
    text-decoration: none;
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    word-break: break-all;
  }

  .entries li {
    break-inside: avoid;
  }
}
