:root {
  --bg: #f7f5f0;
  --surface: #ffffff;
  --ink: #1c2329;
  --muted: #4a5560;
  --rule: #d9d4c9;
  --accent: #1f4e6b;
  --accent-ink: #ffffff;
  --mast: #1f3a4d;
  --mast-ink: #f4f1ea;
  --mast-muted: #c9d3da;
  --measure: 46rem;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14191d;
    --surface: #1b2227;
    --ink: #e6e2da;
    --muted: #a9b3bb;
    --rule: #2f3a42;
    --accent: #8cc3e6;
    --accent-ink: #0d1418;
    --mast: #0f1a22;
    --mast-ink: #f1ede6;
    --mast-muted: #a9b8c3;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
}

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1.25rem;
}

a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, .skip:focus {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--surface);
  color: var(--ink);
}
.skip:focus { left: 0.5rem; z-index: 10; }

.masthead {
  background: var(--mast);
  color: var(--mast-ink);
  padding: 3.5rem 0 2.75rem;
}
.masthead h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.1rem, 6vw, 3rem);
  line-height: 1.1;
  margin: 0.25rem 0 0.6rem;
  letter-spacing: -0.01em;
}
.eyebrow {
  margin: 0;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mast-muted);
}
.headline {
  margin: 0;
  font-size: 1.2rem;
  color: var(--mast-muted);
}
.masthead-link { margin: 1.25rem 0 0; }
.masthead a { color: var(--mast-ink); }

main { padding-top: 1rem; padding-bottom: 2rem; }

section {
  padding: 2rem 0 0.5rem;
  border-bottom: 1px solid var(--rule);
}
section:last-of-type { border-bottom: 0; }

h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.45rem;
  margin: 0 0 0.9rem;
}
h3 {
  font-size: 1.08rem;
  margin: 0;
}

.lead { font-size: 1.15rem; }

.areas { margin: 0; }
.areas > div { margin: 0 0 1.1rem; }
.areas dt { font-weight: 650; }
.areas dd { margin: 0.15rem 0 0; color: var(--muted); }

.roles { list-style: none; margin: 0; padding: 0; }
.roles > li {
  padding: 0 0 1.4rem 1rem;
  border-left: 3px solid var(--rule);
  margin-bottom: 1.4rem;
}
.role-meta {
  margin: 0.1rem 0 0.5rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0 1rem;
}
.dates { font-variant-numeric: tabular-nums; white-space: nowrap; }
.roles ul { margin: 0; padding-left: 1.1rem; }
.roles ul li { margin-bottom: 0.4rem; }
.roles p { margin-top: 0; }

.button {
  display: inline-block;
  padding: 0.65rem 1.1rem;
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
  border-radius: 4px;
  font-weight: 600;
}
.button:hover { text-decoration: underline; }

.footer {
  padding-top: 1rem;
  padding-bottom: 2.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.notfound { padding-top: 4rem; padding-bottom: 4rem; }
.notfound h1 { font-family: var(--serif); }

@media (max-width: 34rem) {
  body { font-size: 1rem; }
  .masthead { padding: 2.5rem 0 2rem; }
  .role-meta { display: block; }
  .dates { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

@media print {
  :root {
    --bg: #ffffff; --surface: #ffffff; --ink: #000000; --muted: #333333;
    --rule: #bbbbbb; --accent: #000000; --mast: #ffffff; --mast-ink: #000000; --mast-muted: #333333;
  }
  body { font-size: 10.5pt; line-height: 1.45; }
  .skip, .masthead-link { display: none; }
  .masthead { padding: 0 0 0.5rem; border-bottom: 1px solid #000; }
  .wrap { max-width: none; padding: 0; }
  section { padding: 0.8rem 0 0.2rem; break-inside: auto; }
  .roles > li { break-inside: avoid; border-left-color: #999; }
  h2, h3 { break-after: avoid; }
  .button { background: none; color: #000; padding: 0; font-weight: normal; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.9em; }
  .button::after { content: "" !important; }
}
