:root {
  color-scheme: light dark;

  --paper: #eeeeee;
  --raised: #eeeeee;
  --ink: #2f3432;
  --muted: #6c7570;
  --rule: #d0d6d4;
  --accent: #5e786d;
  --accent-ink: #eeeeee;

  --display: Courier, mono;
  --sans: Courier, mono;
  --mono: Courier, mono;

  --page: 47rem;
  --measure: 33rem;
  --label-col: 7.5rem;
  --gutter: 2.25rem;
  --step: 3.75rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #3d4340;
    --raised: #3d4340;
    --ink: #eeeeee;
    --muted: #9aa5a0;
    --rule: #4a524e;
    --accent: #a8c0b4;
    --accent-ink: #232927;
  }
}

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

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

body {
  margin: 0;
  padding: 0 16px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
  line-height: 1.7;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: var(--page);
  margin: 0 auto;
  padding: clamp(1.75rem, 5vw, 3rem) 0 clamp(3rem, 7vw, 5rem);
}

/* ---- links ---- */

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: text-decoration-color 120ms ease, color 120ms ease;
}

a:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

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

/* ---- top bar ---- */

.topbar {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.topbar .mark {
  letter-spacing: 0.14em;
  text-decoration: none;
}

.work .name a {
  text-decoration-color: var(--muted);
}

/* ---- masthead ---- */

.masthead {
  margin: clamp(3.5rem, 12vw, 7rem) 0 var(--step);
}

h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2rem, 1.5rem + 2.6vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.masthead .role {
  max-width: 28rem;
  margin: 1.5rem 0 0;
  font-family: var(--display);
  font-size: clamp(1rem, 0.95rem + 0.35vw, 1.1875rem);
  line-height: 1.5;
}

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

section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem var(--gutter);
  padding-top: var(--step);
  border-top: 1px solid var(--rule);
  margin-top: var(--step);
}

section:first-of-type {
  border-top: 0;
  padding-top: 0;
}

h2 {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.body > * + * {
  margin-top: 1.1em;
}

.body > :first-child {
  margin-top: 0;
}

p {
  margin: 0;
  max-width: var(--measure);
}

strong,
b {
  font-weight: 600;
}

@media (min-width: 46rem) {
  section {
    grid-template-columns: var(--label-col) minmax(0, 1fr);
  }

  h2 {
    padding-top: 0.45rem;
  }
}

/* ---- work list ---- */

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

.work li + li {
  margin-top: 1.5rem;
}

.work .name {
  font-family: var(--display);
  font-size: 1.0625rem;
  line-height: 1.4;
}

.work .what {
  display: block;
  max-width: var(--measure);
}

.work .when {
  display: block;
  font-size: 0.8125rem;
  color: var(--muted);
}

.certs {
  font-size: 0.8125rem;
  color: var(--muted);
}

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

footer {
  margin-top: var(--step);
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

footer p {
  margin: 0;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0ms !important;
  }
}
