/* units: rem for everything that scales with user font size; px only for 1px hairlines */
:root {
  color-scheme: light dark;
  --bg: #fcfcfa;
  --fg: #1c1c1c;
  --muted: #6e6e6e;
  --rule: #e4e2dd;
  --accent: #2f5d3a;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161615;
    --fg: #e8e6e1;
    --muted: #9a9891;
    --rule: #2e2d2a;
    --accent: #8fbf9a;
  }
}

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

body {
  background: var(--bg);
  color: var(--fg);
  font: 1rem/1.6 system-ui, sans-serif;
  max-width: 60rem;
  margin: 0 auto;
  padding: 4rem 1.25rem;
}

header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.avatar {
  width: 12rem;
  height: 12rem;
  border-radius: 24%;
  object-fit: cover;
}

@media (max-width: 32rem) {
  body {
    padding: 2rem 1rem;
  }
  header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .avatar {
    width: 8rem;
    height: 8rem;
  }
}

h1 {
  font-size: 1.5rem;
  font-weight: 600;
}

.birthname {
  font-size: 0.95rem;
  font-weight: 400;
  font-style: italic;
  color: var(--muted);
  white-space: nowrap;
}

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

header nav {
  margin-top: 0.75rem;
  display: flex;
  gap: 1rem;
}

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

h3 a {
  color: inherit;
  text-decoration: none;
}

h3 a:hover {
  text-decoration: underline;
}

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

h2 {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.entry {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.entry h3 {
  font-size: 1rem;
  font-weight: 600;
}

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

.skill-row {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

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

.authors {
  font-size: 0.9rem;
}

.where {
  color: var(--muted);
  font-size: 0.9rem;
}

.note {
  color: var(--muted);
  font-size: 0.85rem;
  font-style: italic;
}

@media (max-width: 34rem) {
  .entry,
  .skill-row {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
}

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

@media print {
  /* ponytail: everything is rem-based, so one root knob scales the whole page */
  html {
    font-size: 12px;
  }
  body {
    padding: 0;
    max-width: none;
    background: #fff;
    color: #000;
  }
  a {
    color: inherit;
    text-decoration: none;
  }
  footer,
  header nav a[href="cv.pdf"] {
    display: none;
  }
  header nav a {
    color: var(--accent);
    text-decoration: underline;
  }
  .avatar {
    width: 7rem;
    height: 7rem;
  }
  section {
    margin-top: 1.75rem;
  }
  header,
  section,
  .entry {
    break-inside: avoid;
  }
  h2 {
    break-after: avoid;
  }
}

@page {
  margin: 16mm 18mm;
}
