:root {
  --bg: #f7f5f0;
  --surface: #ffffff;
  --text: #1c1e22;
  --muted: #5d6169;
  --line: #e2ded5;
  --accent: #1f5f8b;
  --accent-ink: #ffffff;
  --tag: #ece8df;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14161a;
    --surface: #1b1e23;
    --text: #e8e6e1;
    --muted: #9ca1aa;
    --line: #2b2f36;
    --accent: #7fb6dc;
    --accent-ink: #0f1a22;
    --tag: #23272d;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.65 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; margin: 0; }
h1, h2 { font-family: Fraunces, Georgia, serif; font-weight: 600; letter-spacing: -0.01em; }
ul { margin: 0; padding: 0; }

.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .wrap { padding: 0 32px; } }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: var(--surface); padding: 8px 12px; z-index: 10; }

/* Hero */
.hero { padding: 88px 0 56px; border-bottom: 1px solid var(--line); }
.eyebrow { margin: 0 0 12px; font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
h1 { font-size: clamp(2.6rem, 8vw, 4.25rem); }
.role { margin: 8px 0 0; font-size: 1.25rem; font-weight: 500; color: var(--accent); }
.lede { max-width: 62ch; margin: 24px 0 0; font-size: 1.125rem; color: var(--muted); }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn {
  display: inline-block; padding: 11px 20px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  font-weight: 500; text-decoration: none; transition: transform .15s, border-color .15s;
}
.btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.stats { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 48px; }
.stats li { border-top: 2px solid var(--text); padding-top: 12px; }
.stats strong { display: block; font-family: Fraunces, Georgia, serif; font-size: 2rem; font-weight: 600; line-height: 1; }
.stats span { font-size: .875rem; color: var(--muted); }

/* Sections */
main section { padding: 56px 0; border-bottom: 1px solid var(--line); }
h2 { font-size: 1.75rem; margin-bottom: 28px; }

.timeline { list-style: none; margin: 0; padding: 0; }
.job { display: grid; gap: 4px 32px; padding: 24px 0; border-top: 1px solid var(--line); }
.job:first-child { border-top: 0; padding-top: 0; }
@media (min-width: 720px) { .job { grid-template-columns: 170px 1fr; } }
.when { font-size: .875rem; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 3px; }
.job h3 { font-size: 1.125rem; font-weight: 600; }
.org { margin: 2px 0 12px; font-weight: 500; }
.org span { font-weight: 400; color: var(--muted); }
.job ul { padding-left: 1.1em; }
.job li { margin: 6px 0; }
.job li::marker { color: var(--accent); }

.skills { display: grid; gap: 28px; }
@media (min-width: 640px) { .skills { grid-template-columns: 1fr 1fr; } }
.skills h3 { font-size: .8rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { background: var(--tag); padding: 6px 12px; border-radius: 999px; font-size: .9rem; }

.split { display: grid; gap: 48px; }
@media (min-width: 640px) { .split { grid-template-columns: 1fr 1fr; } }
.plain { list-style: none; }
.plain li { padding: 8px 0; border-top: 1px solid var(--line); }
.plain li:first-child { border-top: 0; padding-top: 0; }
.edu { margin: 0; }
.muted { color: var(--muted); }

.contact { text-align: center; border-bottom: 0 !important; padding: 72px 0 !important; }
.contact h2 { margin-bottom: 8px; }
.contact p { margin: 0 0 24px; color: var(--muted); }
.actions.center { justify-content: center; margin-top: 0; }

footer { padding: 24px 16px 48px; font-size: .85rem; color: var(--muted); text-align: center; }

@media (max-width: 480px) {
  .hero { padding-top: 56px; }
  .stats { gap: 10px; }
  .stats strong { font-size: 1.6rem; }
  .btn { flex: 1 1 100%; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}

/* Print: the page itself prints as a clean one-page résumé */
@media print {
  :root { --bg: #fff; --text: #000; --muted: #444; --line: #ccc; --accent: #000; --tag: #fff; }
  body { font-size: 10pt; line-height: 1.4; }
  .hero { padding: 0 0 12px; }
  .actions, .stats, .contact, footer, .skip { display: none; }
  main section { padding: 14px 0; break-inside: avoid; }
  h2 { font-size: 13pt; margin-bottom: 8px; }
  .job { padding: 6px 0; grid-template-columns: 130px 1fr; }
  .tags li { border: 1px solid var(--line); padding: 2px 8px; }
  a { color: inherit; text-decoration: none; }
}
