/* ============================================================
   RECRUITER VIEW (/cv/) AND PRINT
   A separate document, not a theme. Warm paper, ink rather than pure
   black, one slate accent that prints well. It stays light even when
   the reader's system is dark: it is a document, and documents are
   read on paper colours.
   ============================================================ */
.cv-doc { display: none; }

body.plain {
  --paper:   #f4f2ed;
  --paper-2: #eceae3;
  --ink:     #1b1f27;
  --ink-2:   #3d4451;
  --ink-3:   #5b6371;
  --rule:    #d9d5cb;
  --slate:   #1f4e6b;
  /* The shared chrome reads these tokens, so the bar and buttons take
     the document's palette too. */
  --bg: var(--paper-2); --surface: var(--paper); --surface-2: var(--paper-2);
  --line: var(--rule); --line-2: #c9c4b8;
  --txt: var(--ink); --txt-dim: var(--ink-2); --txt-mute: var(--ink-3);
  --accent: var(--slate); --accent-hover: #16394f; --on-accent: #fbfaf7;
  --hud-bg: rgba(236,234,227,.92);
  color-scheme: light;
  background: var(--paper-2); color: var(--ink);
}
body.plain main, body.plain .site-foot, body.plain .cv-offer,
body.plain .hud-nav, body.plain .hud-burger { display: none !important; }
body.plain .cv-doc { display: block; }

.cv-paper {
  --measure: 60ch;
  max-width: 880px; margin: 32px auto 60px; padding: 54px 60px 44px;
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--rule); border-radius: 6px;
  box-shadow: 0 1px 3px rgba(27,31,39,.06), 0 12px 40px -24px rgba(27,31,39,.28);
  line-height: 1.6;
}
.cv-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 30px; }
.cv-name { font: 700 2.375rem/1.05 var(--display); letter-spacing: -.025em; color: var(--ink); }
.cv-headline { font-size: var(--t-s); font-weight: 600; color: var(--slate); margin-top: 8px; }
.cv-contact { margin-top: 12px; font-size: var(--t-s); color: var(--ink-2); }
.cv-contact a { color: var(--ink-2); text-decoration: none; border-bottom: 1px solid var(--rule); }
.cv-contact a:hover { color: var(--slate); border-color: var(--slate); }
.cv-contact i { margin: 0 5px; color: var(--ink-3); font-style: normal; }
.cv-dl { flex: none; }

.cv-avail {
  display: flex; flex-wrap: wrap; gap: 10px 32px; margin: 22px 0 4px; padding: 13px 18px;
  background: var(--paper-2); border-radius: 6px; font-size: var(--t-s); color: var(--ink-2);
}
.cv-avail b { font-size: var(--t-xs); font-weight: 700; color: var(--ink-3); margin-right: 8px; }

.cv-sec { margin-top: 32px; }
.cv-sec h2 {
  font-size: var(--t-xs); font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--slate); padding-bottom: 7px; margin-bottom: 15px; border-bottom: 2px solid var(--slate);
}
.cv-summary { color: var(--ink-2); max-width: var(--measure); }
.cv-summary + .cv-summary { margin-top: 10px; }
.cv-list { display: grid; gap: 10px; }
.cv-list li { position: relative; padding-left: 19px; color: var(--ink-2); max-width: var(--measure); }
.cv-list li::before { content: ''; position: absolute; left: 3px; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: var(--slate); }
.cv-list-tight { gap: 6px; }

.cv-skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 14px 34px; }
.cv-skill-group h3 { font-size: var(--t-xs); font-weight: 700; color: var(--ink-3); margin-bottom: 4px; }
.cv-skill-group p { color: var(--ink-2); font-size: var(--t-s); }
.cv-soft { margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--rule); }

.cv-role, .cv-proj { margin-bottom: 20px; }
.cv-role:last-child, .cv-proj:last-child { margin-bottom: 0; }
.cv-role-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; }
.cv-role-head h3 { font-size: var(--t-body); font-weight: 700; }
.cv-org { font-weight: 400; color: var(--ink-2); }
.cv-dates { flex: none; font: 400 var(--t-xs)/1.6 var(--mono); color: var(--ink-3); }
.cv-loc { font-size: var(--t-s); color: var(--ink-3); margin: 1px 0 9px; }
.cv-proj p { color: var(--ink-2); margin-top: 5px; max-width: var(--measure); }
.cv-tech { font-size: var(--t-s); }
.cv-tech b, .cv-course b { color: var(--ink-2); font-weight: 700; }
.cv-course { font-size: var(--t-s); color: var(--ink-2); margin-top: 4px; max-width: var(--measure); }

.cv-refs { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px 30px; }
.cv-ref { display: grid; gap: 1px; }
.cv-ref b { font-weight: 700; }
.cv-ref span { font-size: var(--t-s); color: var(--ink-2); }
.cv-ref em { font-style: normal; font-size: var(--t-s); color: var(--ink-3); }
.cv-ref-note { margin-top: 12px; font-size: var(--t-s); color: var(--ink-3); }

.cv-sec-keywords { margin-top: 26px; }
.cv-keys summary {
  cursor: pointer; list-style: none; display: flex; gap: 10px; padding: 9px 0;
  font-size: var(--t-xs); font-weight: 700; color: var(--ink-3); border-top: 1px solid var(--rule);
}
.cv-keys summary::-webkit-details-marker { display: none; }
.cv-keys summary::after { content: '+'; margin-left: auto; }
.cv-keys[open] summary::after { content: '–'; }
.cv-keywords { font-size: var(--t-xs); line-height: 1.9; color: var(--ink-3); padding-bottom: 6px; }

.cv-foot {
  display: flex; justify-content: space-between; gap: 16px; margin-top: 38px; padding-top: 16px;
  border-top: 1px solid var(--rule); font-size: var(--t-xs); color: var(--ink-3);
}

@media screen and (max-width: 760px) {
  .cv-paper { margin: 16px 12px 40px; padding: 30px 20px; }
  .cv-head { flex-direction: column; gap: 16px; }
  .cv-name { font-size: clamp(1.75rem, 7.5vw, 2.125rem); }
  .cv-contact { line-height: 2; }
  .cv-avail { flex-direction: column; gap: 6px; }
  .cv-skills, .cv-refs { grid-template-columns: 1fr; }
  .cv-role-head { flex-direction: column; gap: 1px; }
  .cv-foot { flex-direction: column; gap: 4px; }
}

/* ── Print ────────────────────────────────────────────────
   Printing any page prints the CV: a recruiter who presses Ctrl+P on
   the main page wants the document, not thirteen screens of it. */
@media print {
  @page { margin: 14mm 16mm; }
  body { background: #fff !important; color: #1b1f27; }
  .hud, .cv-offer, main, .site-foot, .skip-link, .tip { display: none !important; }
  .cv-doc { display: block !important; }
  .cv-paper {
    --paper: #fff; --paper-2: #f2f1ed; --ink: #1b1f27; --ink-2: #3d4451; --ink-3: #5b6371;
    --rule: #d9d5cb; --slate: #1f4e6b;
    margin: 0; padding: 0; max-width: none; border: 0; border-radius: 0; box-shadow: none;
    background: #fff; font-size: 9.5pt; line-height: 1.4;
    /* The type tokens are rem-based, so the paper's own font-size never
       reaches them; print needs its own scale. Full line length too:
       paper is narrower than a screen, and the measure cap wasted it. */
    --t-xs: 7.5pt; --t-s: 8.6pt; --t-body: 9.5pt; --measure: none;
  }
  .cv-skills { grid-template-columns: 1fr 1fr; gap: 6px 24px; }
  .cv-summary + .cv-summary { margin-top: 4px; }
  .cv-refs { grid-template-columns: repeat(4, 1fr); gap: 4px 16px; }
  .cv-loc { margin-bottom: 4px; }
  .cv-foot { margin-top: 12px; padding-top: 6px; }
  /* Referees split across a page break read as names with no roles. */
  .cv-sec:has(.cv-refs), .cv-ref { break-inside: avoid; }
  .cv-sec { margin-top: 10px; }
  .cv-sec h2 { margin-bottom: 6px; }
  .cv-role, .cv-proj { margin-bottom: 7px; }
  .cv-summary + .cv-summary { margin-top: 2px; }
  .cv-soft { margin-top: 6px; padding-top: 6px; }
  /* Two pages: on paper, the soft-skills line and the bare location
     under each job are the cheapest lines to lose. */
  .cv-dl, .cv-sec-keywords, .cv-soft, .cv-where { display: none; }
  .cv-name { font-size: 22pt; }
  .cv-sec h2 { font-size: 8.5pt; margin-bottom: 8px; padding-bottom: 4px; }
  .cv-role, .cv-proj { break-inside: avoid; }
  .cv-list { gap: 3px; }
  .cv-avail { margin-top: 12px; padding: 8px 12px; }
  a { color: inherit; text-decoration: none; }
}
