:root {
  --bg: #fbfaf8;
  --text: #1a1a1c;
  --muted: #6b6b70;
  --line: #e6e3de;
  --accent: #1f3a5f;
  --accent-text: #ffffff;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121315;
    --text: #ececee;
    --muted: #9b9ba2;
    --line: #26272b;
    --accent: #a9c1e3;
    --accent-text: #121315;
    color-scheme: dark;
  }
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

p { margin: 0; }
a { color: inherit; }

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

.wrap {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 16px;
  top: 16px;
  z-index: 10;
  background: var(--bg);
  padding: 8px 12px;
}

/* Navigation */

.nav {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.nav-name {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 500;
  text-decoration: none;
}

.nav nav {
  display: flex;
  gap: 20px;
}

.nav nav a {
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

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

/* Hero */

.hero {
  display: grid;
  grid-template-columns: 168px 1fr;
  gap: 40px;
  align-items: center;
  padding-top: 88px;
  padding-bottom: 48px;
}

.portrait {
  width: 168px;
  height: 168px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--line);
}

.eyebrow {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 6vw, 54px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
}

.lede {
  font-size: 18px;
  color: var(--muted);
  max-width: 34em;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  margin-top: 28px;
}

.button {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  padding: 10px 18px;
  border-radius: 999px;
  transition: opacity 0.15s ease;
  overflow-wrap: anywhere;
}

.button:hover { opacity: 0.88; }

.text-link {
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1px;
  transition: border-color 0.15s ease;
}

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

/* Sections */

.section {
  padding-top: 24px;
  padding-bottom: 24px;
}

h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 30px;
  line-height: 1.2;
  margin: 0 0 24px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}

h3.group {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 40px 0 8px;
}

h2 + h3.group { margin-top: 0; }

.prose p + p { margin-top: 1em; }
.prose { font-size: 17px; }

.prose-lead {
  font-size: 17px;
  color: var(--muted);
}

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

.certs li + li { margin-top: 4px; }

.certs .muted { white-space: normal; }

/* Entries */

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

.entry {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 24px;
  padding: 18px 0;
}

.entry + .entry { border-top: 1px solid var(--line); }

.when {
  font-size: 14px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  padding-top: 2px;
}

.role {
  font-weight: 600;
}

.org {
  color: var(--muted);
  font-size: 15px;
}

.desc {
  margin-top: 8px;
  font-size: 15px;
}

.post-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 14px;
}

.roles {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  font-size: 15px;
}

.roles li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 0;
}

.roles li + li { border-top: 1px dashed var(--line); }

.muted {
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Contact and footer */

.contact .hero-links { margin-top: 20px; }

.footer {
  padding-top: 32px;
  padding-bottom: 48px;
  font-size: 13px;
  color: var(--muted);
}

.footer p {
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

/* Small screens */

@media (max-width: 680px) {
  .wrap { padding: 0 16px; }

  .nav nav { display: none; }

  .hero {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-top: 48px;
    padding-bottom: 40px;
  }

  .portrait {
    width: 120px;
    height: 120px;
  }

  .lede { font-size: 17px; }

  .section {
    padding-top: 16px;
    padding-bottom: 16px;
  }

  h2 { padding-top: 32px; }

  .entry {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .roles li {
    flex-direction: column;
    gap: 0;
  }
}
