:root {
  color-scheme: light dark;
  --bg: #faf9f7;
  --text: #33302c;
  --text-strong: #171513;
  --muted: #77716a;
  --accent: #8f0d0d;
  --accent-soft: #b8451f;
  --rule: #e5e1db;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171513;
    --text: #cfc9c1;
    --text-strong: #f2eee8;
    --muted: #8d867d;
    --accent: #e8927c;
    --accent-soft: #d9a05b;
    --rule: #2e2b27;
  }
}

* {
  margin: 0;
  box-sizing: border-box;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 42rem;
  margin: 0 auto;
  padding: 5rem 1.5rem 3rem;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 120ms ease;
}

a:hover {
  color: var(--accent-soft);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.muted {
  color: var(--muted);
}

/* ---- hero ---- */

.hero {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 3.5rem;
}

.portrait {
  border-radius: 50%;
  width: 160px;
  height: 160px;
  object-fit: cover;
  flex-shrink: 0;
}

h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 2.375rem;
  line-height: 1.15;
  color: var(--text-strong);
  letter-spacing: -0.01em;
}

.degree {
  font-weight: 400;
  color: var(--muted);
}

.role {
  margin-top: 0.6rem;
  font-size: 1.0625rem;
  color: var(--text-strong);
}

.tagline {
  margin-top: 0.35rem;
  font-family: var(--serif);
  font-style: italic;
  color: var(--muted);
}

/* ---- sections ---- */

section {
  margin-bottom: 3rem;
}

section p + p {
  margin-top: 1rem;
}

h2 {
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.5rem;
  margin-bottom: 1.25rem;
}

/* ---- cv rows ---- */

.cv {
  list-style: none;
  padding: 0;
}

.cv li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem;
  padding: 0.45rem 0;
}

.cv-what {
  display: flex;
  flex-direction: column;
}

.cv-role {
  color: var(--text-strong);
  font-weight: 500;
}

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

.cv-when {
  color: var(--muted);
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ---- highlights ---- */

.highlights {
  list-style: none;
  padding: 0;
}

.highlights li {
  padding: 0.3rem 0 0.3rem 1.4rem;
  position: relative;
}

.highlights li::before {
  content: "";
  position: absolute;
  left: 0.2em;
  top: 0.78em;
  width: 0.45em;
  height: 0.45em;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.55;
}

/* ---- footer ---- */

footer {
  border-top: 1px solid var(--rule);
  padding-top: 2rem;
  margin-top: 4rem;
}

.links {
  display: flex;
  gap: 1.75rem;
  align-items: center;
}

.links a {
  color: var(--muted);
  display: inline-flex;
}

.links a:hover {
  color: var(--accent);
}

.links svg {
  height: 1.35rem;
  width: auto;
}

.colophon {
  margin-top: 1.5rem;
  font-size: 0.8125rem;
  color: var(--muted);
}

/* ---- small screens ---- */

@media (max-width: 540px) {
  main {
    padding-top: 3rem;
  }

  .hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
  }

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

  h1 {
    font-size: 2rem;
  }

  .cv li {
    flex-direction: column;
    gap: 0;
    padding: 0.6rem 0;
  }
}
