/* CV page (Figma "CV — 1280" and "CV — 390", D71): the site's header (Home pill, and from 781px the two download pills), then one
   content column read top to bottom (ATS and copy-paste friendly). Colours and fonts are the site's, through tokens and the
   text roles in css/ds.css; no gradients, radii or shadows on the text, no pictures. The markup is generated by
   scripts/build-cv.mjs from content/cv.json. @media print makes the PDF: the same markup on white paper. */
body {
  --content: min(var(--layout-content-width), 100% - 2 * var(--layout-margin));
}
.cv-download { display: none; }
.cv-intro__print { display: none; } /* the PDF's contact line (D88); the chips do this job on screen */
/* The header stays put while the CV scrolls under it (D86), on the page-colour fade the home page's header uses */
.site-header { position: fixed; inset: 0 0 auto; z-index: var(--site-header-z); display: flex; align-items: center; justify-content: space-between; height: var(--size-header); padding-inline: var(--inset-wide); }
.site-header::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--site-header-gradient); pointer-events: none; }
.site-header__downloads { display: flex; gap: var(--gap-group); margin: 0; padding: 0; list-style: none; }
.cv { width: var(--content); margin-inline: auto; padding-block: var(--layout-section-padding-y); padding-top: calc(var(--size-header) + var(--layout-section-padding-y)); display: flex; flex-direction: column; gap: var(--spacing-80); } /* the fixed header's height first */
.cv > article { display: contents; }
.cv-intro { display: flex; flex-direction: column; gap: var(--gap-group); }
.cv-intro__name { color: var(--text-secondary); }
.cv-intro__subtitle, .cv-intro__line { color: var(--text-body); }
.cv-intro__actions { display: flex; flex-wrap: wrap; gap: var(--gap-stack); }
.cv-intro__actions .action-chip { background: var(--surface-tint); }
@media (hover: hover) { .cv-intro__actions .action-chip:hover { background: var(--surface-tint-hover); } }
.cv-section { display: flex; flex-direction: column; gap: var(--gap-block); }
.cv-section--text { gap: var(--gap-stack); }
.cv-section__heading { color: var(--text-secondary); }
.cv-summary { color: var(--text-body); }
.cv-section--roles, .cv-section--labelled { gap: var(--gap-block); }
.cv-role, .cv-line { display: flex; flex-direction: column; gap: var(--gap-tight); }
.cv-role__title, .cv-role__dates, .cv-line__label { color: var(--text-accent); }
.cv-role__text, .cv-line__text { color: var(--text-body); }
.cv-role__list { margin: 0; padding-left: var(--inset-panel); color: var(--text-body); }
.cv-role__list li + li { margin-top: var(--gap-tight); }
/* Quiet reading cue: a role's text rests dimmed and comes to full strength as it crosses the middle of the screen. Only where
   scroll-driven animation exists and motion is allowed; otherwise (and in print) every role is at full strength. */
@keyframes cv-reading { 0%, 100% { opacity: var(--opacity-65); } 30%, 70% { opacity: 1; } }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .cv-role:not(.cv-role--current) :is(.cv-role__text, .cv-role__list) { animation: cv-reading linear both; animation-timeline: view(); } /* only the running text dims (8.2:1 at the floor); the accent title and dates stay full strength */
  }
}
@media (max-width: 780px) {
  .site-header { padding-inline: var(--inset-panel); }
  .site-header__downloads { display: none; }
  .cv-download { display: block; }
  .cv-download > summary { list-style: none; }
  .cv-download > summary::-webkit-scrollbar, .cv-download > summary::-webkit-details-marker { display: none; }
  /* the open panel is the shared .wg-toc-panel (css/ds.css), full width under the header */
  .cv-download__panel { position: absolute; top: 100%; left: 0; right: 0; }
  .cv { padding-block: var(--gap-block); padding-top: calc(var(--size-header) + var(--gap-block)); gap: var(--gap-section); }
  .cv-intro { gap: var(--gap-stack); }
  .cv-intro__actions { flex-direction: column; align-items: flex-start; gap: var(--gap-group); }
  .cv-intro__actions .action-chip { height: var(--size-touch); }
  .cv-section, .cv-section--roles { gap: var(--gap-stack); }
  .cv-section--labelled { gap: var(--gap-tight); }
  .cv .cv-role__list li + li { margin-top: var(--gap-hair); }
}
/* ---------- print: the PDF ---------- */
@media print {
  /* @raw-ok:start layout: paper size, margins and scale of the PDF (A4, two pages). Print sizes (D90): 0.84 makes body and dates
     10.1pt and the headline 11.3pt, so nothing is under 10pt (it was 0.72: body 8.6pt, dates 5.4pt) */
  @page { size: A4; margin: 10mm 14mm; }
  .cv { zoom: 0.84; }
  /* @raw-ok:end */
  html, body { background: none; }
  .site-header { display: none; }
  .cv { width: 100%; padding-block: 0; gap: var(--gap-stack); }
  .cv, .cv *, .cv .action-chip { color: var(--text-on-light); }
  .cv-intro { gap: var(--gap-hair); }
  /* D88: the chips give way to one plain contact line with the website; capitals are left out of the PDF because a transformed
     label is saved as pieces ("IOLI.XA / NTHAKI@GM") and cannot be pasted whole */
  .cv-intro__actions { display: none; }
  .cv-intro__print { display: block; }
  .cv :is(.label-section, .label-nav, .statement) { text-transform: none; }
  /* D89: a quieter, finished look for the PDF, in existing roles only: the page's accent on white for the headline, section
     titles and dates, a hairline above each section, role titles in bold with the dates under them. Text
     stays in the markup's order and in normal case, so it still pastes whole. */
  .cv-intro__subtitle { color: var(--text-accent-on-light); }
  .cv-intro__print { margin-top: var(--gap-tight); }
  .cv-intro { margin-bottom: var(--gap-tight); }
  .cv-section { padding-top: var(--gap-stack); border-top: var(--border-1) solid var(--border-color-divider); }
  .cv .cv-section__heading { color: var(--text-accent-on-light); }
  .cv .cv-role { gap: var(--gap-hair); }
  .cv .cv-role__title { font: var(--type-body-highlight); font-weight: var(--type-strong-weight); color: var(--text-on-light); }
  .cv .cv-role__dates { font: var(--type-body-default); color: var(--text-accent-on-light); } /* on its own line under the title, so it sits in the same place whatever the title's length; the body role, because the caption role's 10px mono came out at 5.4pt (D90) */
  .cv .cv-line { gap: 0; }
  .cv .cv-line__text { text-wrap: balance; } /* no one-word last line ("Code" alone), which the extraction put before its sentence */
  .cv .cv-line__label { font: var(--type-body-default); font-weight: var(--type-strong-weight); }
  /* a role may continue on the next page between its bullets, but never leaves its title or date alone at a page's foot */
  .cv-line, .cv-role li { break-inside: avoid; }
  .cv-role__title, .cv-role__dates, .cv-role__text, .cv-section__heading { break-after: avoid; }
  .cv .cv-role:not(.cv-role--current) :is(.cv-role__text, .cv-role__list) { animation: none; opacity: 1; } /* same specificity as the screen cue, which otherwise stayed on and greyed the PDF's older roles */
  .cv-section, .cv-section--roles, .cv-section--labelled { gap: var(--gap-group); }
}
