:root {
  --bg: #fbfaf7;
  --text: #1d1d1b;
  --muted: #5f5e5a;
  --rule: #e4e1da;
  --accent: #2b50c8;
  --accent-text: #ffffff;
  --tag: #efece5;
  --serif: "Iowan Old Style", Charter, "Palatino Linotype", Palatino, Georgia, ui-serif, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141413;
    --text: #ecebe6;
    --muted: #a3a19a;
    --rule: #2e2d2a;
    --accent: #8ea6ff;
    --accent-text: #10172e;
    --tag: #24231f;
  }
}

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

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

body {
  margin: 0 auto;
  max-width: 46rem;
  padding: clamp(2.5rem, 8vw, 5rem) 1rem 3rem;
  background: var(--bg);
  color: var(--text);
  font: 1.0625rem/1.65 var(--sans);
  font-variant-numeric: tabular-nums;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
  line-height: 1.25;
}

p,
ul,
ol,
dl {
  margin: 0 0 1rem;
}

/* Intro */

.intro h1 {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 7vw, 3.5rem);
  letter-spacing: -0.01em;
}

.role {
  margin: 0.25rem 0 1.5rem;
  color: var(--muted);
  font-size: 1.125rem;
}

.lead {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 3vw, 1.45rem);
  line-height: 1.5;
}

.talk {
  margin-top: 1.5rem;
  font-weight: 500;
}

.talk + .actions {
  margin-top: 0;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.button {
  display: inline-block;
  padding: 0.6rem 1.1rem;
  border: 1px solid var(--accent);
  border-radius: 6px;
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.button.primary {
  background: var(--accent);
  color: var(--accent-text);
}

.button:hover {
  text-decoration: underline;
}

/* Sections */

section {
  margin-top: 3.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--rule);
}

h2 {
  margin-bottom: 1.25rem;
  color: var(--muted);
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

h3 {
  font-family: var(--serif);
  font-size: 1.2rem;
}

h3 span {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 400;
}

.note,
.meta {
  color: var(--muted);
  font-size: 0.9375rem;
}

.tag {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.05rem 0.45rem;
  border-radius: 4px;
  background: var(--tag);
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 500;
  vertical-align: 0.2em;
}

/* Selected work */

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

.work li {
  margin-bottom: 1.75rem;
}

.work h3 {
  margin-bottom: 0.3rem;
}

.work h3 a {
  color: inherit;
  text-decoration-color: var(--rule);
}

.work h3 a:hover {
  text-decoration-color: currentColor;
}

.work p {
  margin-bottom: 0.3rem;
}

/* Experience */

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

.timeline > li {
  margin-bottom: 2.25rem;
}

.when {
  margin-bottom: 0.25rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.timeline h3 {
  margin-bottom: 0.6rem;
}

.timeline ul {
  padding-left: 1.1rem;
  list-style: disc;
}

.timeline ul li {
  margin-bottom: 0.4rem;
}

ul.plain {
  padding-left: 0;
  list-style: none;
}

ul.plain li {
  margin-bottom: 0.35rem;
}

@media (min-width: 40rem) {
  .timeline > li {
    display: grid;
    grid-template-columns: 9rem 1fr;
    column-gap: 1.5rem;
  }

  .when {
    padding-top: 0.2rem;
  }
}

/* Skills */

.skills > div {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--rule);
}

.skills dt {
  font-weight: 600;
}

.skills dd {
  margin: 0;
  color: var(--muted);
}

@media (min-width: 40rem) {
  .skills > div {
    display: grid;
    grid-template-columns: 9rem 1fr;
    column-gap: 1.5rem;
  }
}

/* Footer */

footer {
  margin-top: 3.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.875rem;
}

.profiles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  font-size: 1rem;
}

/* Print: a clean PDF CV */

@media print {
  @page {
    margin: 16mm 18mm;
  }

  :root {
    --bg: #ffffff;
    --text: #000000;
    --muted: #444444;
    --rule: #cccccc;
    --accent: #000000;
    --accent-text: #000000;
    --tag: #eeeeee;
  }

  body {
    max-width: none;
    padding: 0;
    font-size: 10pt;
    line-height: 1.45;
  }

  section,
  footer {
    margin-top: 1.25rem;
    padding-top: 0.75rem;
  }

  .button,
  .button.primary {
    padding: 0;
    border: 0;
    background: none;
    color: var(--text);
  }

  .work li,
  .timeline > li,
  .skills > div {
    break-inside: avoid;
  }

  h2 {
    break-after: avoid;
  }
}
