/* CV stylesheet — single column and semantic, so applicant tracking systems
   parse it correctly and it prints to a clean PDF straight from the browser. */

:root {
  --ink: #16151a;
  --muted: #55535c;
  --rule: #ddd9d4;
  --accent: #b6431c;
  --paper: #ffffff;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root { --ink: #ecebe9; --muted: #a5a2aa; --rule: #333036; --paper: #131215; --accent: #ef8a5f; }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 10.5pt;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
.cv a[href^="http"], .cv a[href^="mailto"] { border-bottom: 1px solid var(--rule); }
.cv a:hover { color: var(--accent); border-color: var(--accent); }

.cv-nav {
  max-width: 46rem;
  margin: 0 auto;
  padding: 1.25rem 1.5rem 0;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.cv-nav a { border-bottom: 1px solid var(--rule); }
.cv-nav button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--rule);
  padding: 0;
  cursor: pointer;
}
.cv-nav button:hover, .cv-nav a:hover { color: var(--accent); border-color: var(--accent); }

.cv {
  max-width: 46rem;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* ---- header ---- */
.cv-head { margin-bottom: 1.75rem; }
.cv-head h1 {
  font-size: 1.85rem;
  letter-spacing: -0.02em;
  margin: 0 0 0.15rem;
}
.cv-label { margin: 0 0 0.5rem; color: var(--muted); font-size: 1rem; }
.cv-contact { margin: 0; font-size: 0.86rem; color: var(--muted); }

/* ---- sections ---- */
.cv section { margin-top: 1.6rem; }
.cv h2 {
  font-size: 0.76rem;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--accent);
  margin: 0 0 0.75rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--rule);
}
.cv p { margin: 0 0 0.4rem; }

.entry { margin-bottom: 1rem; break-inside: avoid; }
.entry:last-child { margin-bottom: 0; }
.entry-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.1rem;
}
.entry-head .role { font-weight: 650; }
.entry-head .dates {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--muted);
  white-space: nowrap;
}
.entry .org { color: var(--muted); font-size: 0.92rem; }
.entry ul { margin: 0.35rem 0 0; padding-left: 1.1rem; }
.entry li { margin-bottom: 0.2rem; }

/* ---- skills ---- */
dl.skills { margin: 0; display: grid; grid-template-columns: 13rem 1fr; gap: 0.35rem 1rem; }
dl.skills dt { font-weight: 650; }
dl.skills dd { margin: 0; color: var(--muted); }
@media (max-width: 34rem) {
  dl.skills { grid-template-columns: 1fr; gap: 0.1rem; }
  dl.skills dd { margin-bottom: 0.5rem; }
}

/* ---- publications ---- */
ol.pubs { margin: 0; padding: 0; list-style: none; }
ol.pubs li {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
  break-inside: avoid;
}
.pub-year { font-family: var(--mono); font-size: 0.76rem; color: var(--accent); padding-top: 0.15rem; }
.pub-body { color: var(--muted); }
.pub-body a { color: var(--ink); font-weight: 550; }
@media (max-width: 34rem) {
  ol.pubs li { grid-template-columns: 1fr; gap: 0.1rem; }
}

/* ---- print ----
   Force light ink on white regardless of the viewer's theme, and keep
   entries from splitting across pages. */
@media print {
  @page { margin: 14mm 15mm; }
  :root {
    --ink: #000; --muted: #333; --rule: #bbb; --paper: #fff; --accent: #000;
  }
  html, body { background: #fff; color: #000; font-size: 9.6pt; }
  .no-print { display: none !important; }
  .cv { max-width: none; margin: 0; padding: 0; }
  .cv a { border-bottom: 0; }
  /* Surface link targets that would otherwise be lost on paper. */
  .pub-body a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.78em;
    color: #555;
    word-break: break-all;
  }
  .cv h2 { break-after: avoid; }
  section { break-inside: auto; }
}

.former-name {
  margin-top: 1.4rem;
  font-size: 0.82rem;
  color: var(--muted);
  font-style: italic;
}
