:root {
  color-scheme: dark;
  --bg: #0f1115;
  --surface: #181b22;
  --surface-2: #20242d;
  --border: #2a2f3a;
  --fg: #e9eaee;
  --muted: #9aa0ad;
  --accent: #ffaf24;
  --on-accent: #1a1204;
  --radius: 20px;
}
* { box-sizing: border-box; }
body {
  margin: 0 auto;
  padding: 0 16px;
  max-width: 46rem;
  background: var(--bg);
  color: var(--fg);
  font: 1.0625rem/1.65 ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", sans-serif;
}
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  align-items: center;
  margin: 1.25rem 0 0;
  padding: 0.5rem 0.75rem 0.5rem 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
}
header .name { display: flex; align-items: center; gap: 0.6rem; font-weight: 700; color: var(--fg); text-decoration: none; }
header .name img { flex-shrink: 0; width: 2.5rem; height: 2.5rem; aspect-ratio: 1; border-radius: 50%; object-fit: cover; border: 2px solid var(--accent); }
nav { display: flex; flex-wrap: wrap; gap: 0.25rem; }
nav a { padding: 0.35rem 0.9rem; border-radius: 999px; color: var(--muted); text-decoration: none; font-size: 0.95rem; }
nav a:hover { color: var(--fg); background: var(--surface-2); }
nav a[aria-current] { background: var(--accent); color: var(--on-accent); font-weight: 600; }

main > h1 { margin: 2.5rem 0 1rem; font-size: 2.2rem; line-height: 1.15; }
main > h1::after { content: ""; display: block; width: 3rem; height: 0.3rem; margin-top: 0.7rem; border-radius: 999px; background: var(--accent); }
h2 { margin: 2.5rem 0 0.25rem; font-size: 1.4rem; }

/* italic line under h2 (role, place, dates) becomes a pill */
h2 + p > em:only-child {
  display: inline-block;
  padding: 0.15rem 0.8rem;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-style: normal;
  font-size: 0.88rem;
}

/* lists render as rounded cards */
main ul {
  list-style: none;
  margin: 0.9rem 0;
  padding: 0.4rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
main li { position: relative; padding: 0.55rem 0 0.55rem 1.1rem; }
main li + li { border-top: 1px solid var(--border); }
main li::before { content: ""; position: absolute; left: 0; top: 1.15rem; width: 0.45rem; height: 0.45rem; border-radius: 50%; background: var(--accent); }

code, pre { font: 0.9em ui-monospace, SFMono-Regular, Menlo, monospace; }
code { padding: 0.1em 0.4em; border-radius: 8px; background: var(--surface-2); }
pre { overflow-x: auto; padding: 1rem 1.25rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
pre code { padding: 0; background: none; }

footer { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 3rem 0 2rem; }
footer a { padding: 0.4rem 1rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--fg); text-decoration: none; font-size: 0.9rem; }
footer a:hover { border-color: var(--accent); color: var(--accent); }

@media (max-width: 560px) {
  header { padding: 0.75rem; border-radius: 24px; gap: 0.6rem; }
  nav { width: 100%; justify-content: space-between; gap: 0; }
  nav a { padding: 0.4rem 0.6rem; font-size: 0.9rem; }
  main > h1 { margin-top: 2rem; font-size: 1.9rem; }
  h2 + p > em:only-child { border-radius: 14px; }
  main ul { padding: 0.25rem 1rem; }
}
