/* ============================================================
   CV / Resume page styling
   Scoped via body.cv-page (set in qmd frontmatter)
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Source+Sans+3:ital,wght@0,300;0,400;0,600;0,700;1,400&family=Source+Serif+4:wght@200;300;400&display=swap");

body.cv-page {
  --cv-text:    #1f2329;
  --cv-muted:   #53595f;
  --cv-soft:    #495057;
  --cv-rule:    #cdd1d5;
  --cv-accent:  #353a40;
  --cv-navy:    #073763;
}

body.cv-page,
body.cv-page main.content {
  font-family: "Source Sans 3", "Helvetica Neue", system-ui, -apple-system, sans-serif;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--cv-text);
}

/* center the document column, give it Butterick-ish margins */
body.cv-page main.content {
  max-width: 44rem;
  margin: 0 auto;
}

/* hide the empty Quarto title block (no `title:` set) so spacing tightens */
body.cv-page #title-block-header { display: none; }

/* ---- Name ---- */

body.cv-page .cv-name {
  font-family: "Gill Sans", "Gill Sans MT", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-weight: 350;
  font-size: 2.6rem;
  letter-spacing: 0.22em;
  text-align: center;
  color: var(--cv-navy);
  margin: 1.75rem 0 0.6rem 0;
  text-indent: 0.15em;
  line-height: 1.1;
  border: 0;
  padding: 0;
}

/* TOC: keep but tone down */
body.cv-page #TOC,
body.cv-page #toc-title {
  font-size: 0.82rem;
}
body.cv-page #toc-title {
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cv-muted);
}

/* ---- Header (contact + action buttons) ---- */

body.cv-page .cv-contact {
  text-align: center;
  margin: 0.25rem 0 0 0;
  color: var(--cv-text);
}
body.cv-page .cv-contact p { margin: 0; }
body.cv-page .cv-contact a {
  margin: 0 0.35rem;
  white-space: nowrap;
}

body.cv-page .cv-actions {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 0.85rem 0 0 0;
}
body.cv-page .cv-actions p { margin: 0; display: flex; gap: 0.5rem; }

body.cv-page .cv-action {
  font-size: 0.78rem;
  padding: 3px 10px;
  border: 1px solid #adb5bd;
  border-radius: 4px;
  color: var(--cv-muted) !important;
  white-space: nowrap;
  letter-spacing: 0.04em;
  transition: color 120ms ease, border-color 120ms ease;
}
body.cv-page .cv-action:hover {
  color: var(--cv-accent) !important;
  border-color: var(--cv-accent);
}

body.cv-page hr.cv-rule {
  border: 0;
  border-top: 1px solid var(--cv-rule);
  margin: 1.5rem 0 1.25rem 0;
}

/* ---- Section headings ---- */

/* Section heading — large, dominant, with rule above. */
body.cv-page main h2 {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cv-navy);
  margin: 3.75rem 0 1rem 0;
  padding-top: 1.35rem;
  padding-bottom: 0;
  border: 0;
  border-top: 1px solid var(--cv-rule);
}

/* Subsection heading — small-caps look, no rule. */
body.cv-page main h3 {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;

  margin: 2.6rem 0 0.2rem 0;
  border: 0;
  padding: 0;
}

/* When h3 directly follows a section heading (no entries between), pull it close */
body.cv-page section.level2 > section.level3:nth-child(2) > h3 {
  margin-top: 0.6rem;
}

/* ---- Entry header (title + right-aligned timeline) ---- */

body.cv-page .cv-entry {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin: 2rem 0 0.1rem 0;
}

body.cv-page h3 + .cv-entry {
  margin-top: 0.1rem;
}

body.cv-page .cv-entry-title {
  font-weight: 600;
  color: var(--cv-muted);
}

body.cv-page .cv-entry-date {
  color: var(--cv-muted);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  white-space: nowrap;
}

body.cv-page .cv-entry-link {
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--cv-muted) !important;
  margin-left: 0.35em;
}

/* Link placed at the bottom of an entry, on its own line below the description. */
body.cv-page .cv-entry-link-wrap {
  margin: 0.35rem 0 0 0;
  font-size: 0.85rem;
}
body.cv-page .cv-entry-link-wrap a {
  color: var(--cv-muted) !important;
}

/* ---- Body text under entries ---- */

body.cv-page main p {
  margin: 0.15rem 0 0.45rem 0;
}

body.cv-page main em {
  color: var(--cv-soft);
  font-style: italic;
}

/* italic-only paragraphs (institution / venue lines) get a touch less bottom space */
body.cv-page main p > em:only-child {
  color: var(--cv-soft);
}

/* ---- Bullets — gentler than default ---- */

body.cv-page main ul {
  list-style: none;
  padding-left: 0.5rem;
  margin: 0.4rem 0 0.6rem 0;
}

body.cv-page main ul li {
  position: relative;
  padding-left: 1rem;
  margin-bottom: 0.18rem;
}

body.cv-page main ul li::before {
  content: "\2022"; /* • */
  position: absolute;
  left: 0.1rem;
  top: 0;
  font-size: 0.85em;
  line-height: inherit;
  color: #8a8f95;
}

/* ---- Plain entry variant (e.g. publications): title not bold ---- */

body.cv-page .cv-entry--plain .cv-entry-title {
  font-weight: 400;
  color: var(--cv-text);
}

/* ---- Author bold (from bold-author.lua): soften it ---- */

body.cv-page span[style*="#707070"] strong {
  font-weight: 600;
}

/* ---- Print: ensure clean output if user prints the HTML page ---- */

@media print {
  body.cv-page #quarto-header,
  body.cv-page #quarto-margin-sidebar,
  body.cv-page .cv-actions { display: none; }

  body.cv-page main.content { max-width: 100%; }
}
