:root {
  --bg: #f7f5f0;
  --text: #1f1d1a;
  --muted: #6b665e;
  --rule: #e2ded5;
  --accent: #8a4b2a;

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161513;
    --text: #ebe7df;
    --muted: #9a948a;
    --rule: #2c2a26;
    --accent: #d9956c;
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.1875rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 38rem;
  margin: 0 auto;
  padding: 6rem 1.25rem 4rem;
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: text-decoration-color 0.15s ease, color 0.15s ease;
}

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

/* Intro */

h1 {
  margin: 0 0 1.25rem;
  font-size: 2.5rem;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.lede {
  margin: 0;
  font-size: 1.375rem;
  line-height: 1.5;
  color: var(--text);
}

/* Sections */

section {
  margin-top: 4rem;
}

h2 {
  margin: 0 0 1.25rem;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

p {
  margin: 0 0 1rem;
}

/* Experience */

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

.timeline li {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 1.5rem;
  padding: 1rem 0;
  border-top: 1px solid var(--rule);
}

.timeline li:last-child {
  border-bottom: 1px solid var(--rule);
}

.when {
  font-family: var(--sans);
  font-size: 0.8125rem;
  color: var(--muted);
  padding-top: 0.3rem;
  font-variant-numeric: tabular-nums;
}

.timeline h3 {
  margin: 0;
  font-size: 1.1875rem;
  font-weight: 500;
}

.timeline p {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 1.0625rem;
}

/* Links */

.links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
}

/* Footer */

footer {
  margin-top: 5rem;
  font-family: var(--sans);
  font-size: 0.8125rem;
  color: var(--muted);
}

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

  h1 {
    font-size: 2.125rem;
  }

  .lede {
    font-size: 1.25rem;
  }

  .timeline li {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .when {
    padding-top: 0;
  }
}
