/* CV page: the home layout (one 55-cell column at the golden section), read from content/cv.tex.
   The whole page is set in Plex Sans (a CV is read, not scanned as code; the site navigation keeps its mono).
   Plex Sans figures are tabular by default, so dates still line up. An entry is a title in Plex Sans 600, its dates,
   the place beneath, then the rows with a hanging dash. Nothing is boxed: H2 hairlines separate sections,
   a row of space separates entries. */
.cv-page .page :is(h1,h2,h3,p,dt,dd,a,button,span,li){font-family:var(--sans)}
.cv-page .crumb{margin-bottom:var(--l)}
.cv-info{margin-top:var(--l)}
.cv-info dd a{word-break:break-all}
.cv-toc{margin-top:var(--l);display:flex;flex-wrap:wrap;gap:0 calc(2*var(--cell))}
.cv-toc a{white-space:nowrap}
.cv-actions{margin-top:var(--l)}
.cv-page .sec{margin-top:calc(2*var(--l))}
.cv-entries{margin-top:var(--l);display:grid;row-gap:var(--l)}
/* hierarchy: the name at three times body size (in Plex Sans it fits the column; phones keep twice, see home.css),
   section headings at one and a half, entry titles at body size in 600 */
@media (min-width:37.5em){.cv-page .intro h1{font-size:calc(3*var(--b));line-height:calc(2*var(--l))}}
.cv-page .sechead h2{font-size:calc(1.5*var(--b));line-height:calc(2*var(--l))}
.cv-page .intro .role{font-weight:400}
/* the top block in the order a reader wants it: who, contact, the PDF, then the section links */
.cv-page .intro{display:flex;flex-direction:column}
.cv-page .intro .cv-actions{order:1}
.cv-page .intro .cv-toc{order:2}
/* dates: a mono line under the title; where the left margin is wide enough (20 cells) they hang in it, set right,
   so the title has the whole column and the dates read down the page as one list */
.cv-head{position:relative}
.cv-head .when{display:block;white-space:nowrap}
@media (min-width:70em){
  .cv-head .when{position:absolute;top:0;right:calc(100% + 2*var(--cell));text-align:right}
  /* a group label without dates (Talks, iGEM advisor) hangs in the same margin, so it reads as a label, not an entry */
  .cv-head:not(:has(.when)) h3{position:absolute;top:0;right:calc(100% + 2*var(--cell));width:calc(18*var(--cell));text-align:right}
  .cv-head:not(:has(.when))+.cv-items{margin-top:0}
}
/* narrower: the dates come first, above the title, so they can be scanned down the page; a dateless group label is
   set in 400, so it does not read as an entry title */
@media (max-width:69.99em){
  .cv-head{display:flex;flex-direction:column-reverse}
  .cv-head:not(:has(.when)) h3{font-weight:400}
}
.cv-items{margin-top:calc(.5*var(--l))}
/* the place is secondary to the title: italic, not a second bold line */
.cv-entry .where{font-style:italic}
/* a quarter line between rows, so multi-line rows read as separate items; balanced last lines (no lone word) */
.cv-items li{position:relative;padding-left:calc(2*var(--cell));text-wrap:pretty}
.cv-items li+li{margin-top:calc(.25*var(--l))}
.cv-items li::before{content:"\2013";position:absolute;left:0;font-family:var(--mono)}
.cv-items em{font-style:italic}
.cv-table{margin-top:var(--l);grid-template-columns:max-content minmax(0,1fr);row-gap:calc(.5*var(--l))}
/* wide: the skill names hang in the date margin, set right, so each description has the whole column */
@media (min-width:70em){.cv-table{margin-left:calc(-20*var(--cell));grid-template-columns:calc(18*var(--cell)) minmax(0,1fr)}
  .cv-table dt{text-align:right}}
.nobr{white-space:nowrap}
.cv-table dt{font-weight:600}
.cv-note{margin-top:var(--l)}
.cv-page .sec:has(>.cv-note){margin-top:var(--l)}
/* narrow windows: dates drop under the title; the skills table stacks */
@media (max-width:37.5em){
  .cv-table{grid-template-columns:minmax(0,1fr);row-gap:0}
  .cv-table dd+dt{margin-top:calc(.5*var(--l))}
}
@media print{
  .cv-toc,.cv-actions,.crumb{display:none}
  .cv-entry{break-inside:avoid}
  .cv-page .sec{margin-top:var(--l)}
  .cv-entries{row-gap:calc(.5*var(--l))}
  /* paper: the row gaps that help on screen cost a page */
  .cv-items li+li{margin-top:0}
  .cv-items{margin-top:calc(.25*var(--l))}
  .cv-page .intro h1{font-size:calc(2*var(--b))}
  .cv-page .intro .cv-info{margin-top:calc(.5*var(--l))}
  .sechead{break-after:avoid}
  .cv-page a[href^="mailto:"]::after{content:none}
}
.cv-page sup{line-height:0;font-size:.7em}
