/* CV Once templates. Shared by the builder preview, print/PDF and the static template and example pages.
   Physical units (pt, mm) so the screen preview matches the printed page. The sheet is always white paper,
   in dark mode too. Print margins come from an @page rule set per template (render.js pageBox). */
.cv {
  --ink: #1b2127; --muted: #545e68; --rule: #cfd5db; --accent: #2f4858;
  --sans: "Helvetica Neue", Helvetica, Arial, "Liberation Sans", Arimo, FreeSans, sans-serif;
  --serif: Charter, "Bitstream Charter", Georgia, Cambria, "Times New Roman", "Liberation Serif", Tinos, FreeSerif, serif;
  box-sizing: border-box; width: 210mm; min-height: 297mm; padding: 14mm 16mm; margin: 0;
  background: #fff; color: var(--ink); font-family: var(--sans); font-size: 10.5pt; line-height: 1.38;
  text-align: left; overflow-wrap: break-word; -webkit-print-color-adjust: exact; print-color-adjust: exact;
  font-kerning: normal; hyphens: manual;
}
.cv.paper-letter { width: 215.9mm; min-height: 279.4mm; }
.cv.f-serif { font-family: var(--serif); }
.cv *, .cv *::before, .cv *::after { box-sizing: border-box; }
.cv :where(h1, h2, h3, p, ul) { margin: 0; padding: 0; font-size: inherit; font-weight: inherit; line-height: inherit; letter-spacing: normal; font-family: inherit; }
.cv :where(a) { color: inherit; text-decoration: none; }
.cv strong { font-weight: 700; }

/* header */
.cv-head { display: flex; gap: 6mm; align-items: flex-start; }
.cv-id { flex: 1; min-width: 0; }
.cv-name { font-size: 22pt; line-height: 1.1; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }
.cv-headline { font-size: 11.5pt; color: var(--muted); margin-top: 2.5pt; }
.cv-contact { list-style: none; display: flex; flex-wrap: wrap; gap: 1pt 11pt; margin-top: 6pt; font-size: 9.5pt; color: var(--muted); }
.cv-contact li { white-space: nowrap; }
.cv-details { font-size: 9pt; color: var(--muted); margin-top: 4pt; }
.cv-photo { width: 30mm; height: 38mm; object-fit: cover; border-radius: 1.5mm; order: 2; flex: none; }

/* sections */
.cv-sec { margin-top: 12pt; }
.cv-h { font-size: 10pt; font-weight: 700; text-transform: uppercase; letter-spacing: 0.09em; color: var(--accent);
  border-bottom: 0.75pt solid var(--rule); padding-bottom: 2.5pt; margin-bottom: 4pt; break-after: avoid; page-break-after: avoid; }
.cv-entry { margin-top: 7pt; break-inside: avoid; page-break-inside: avoid; }
.cv-h + .cv-entry { margin-top: 3pt; }
.cv-keep { break-inside: avoid; page-break-inside: avoid; }
.cv-entry-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; column-gap: 8pt; }
.cv-title { font-weight: 400; flex: 1 1 60%; min-width: 0; }
.cv-role { font-weight: 700; }
.cv-dates, .cv-loc { white-space: nowrap; }
.cv-meta { font-size: 9.5pt; color: var(--muted); text-align: right; flex: 0 1 auto; margin-left: auto; }
.cv-detail { font-size: 9.5pt; color: var(--muted); margin-top: 1pt; }
.cv-bullets { margin-top: 2.5pt; padding-left: 12pt; }
.cv-bullets li { margin-top: 1.5pt; padding-left: 1pt; }
.cv-bullets li::marker { color: var(--accent); }
.cv-list { list-style: none; }
.cv-list li { margin-top: 2pt; break-inside: avoid; }
.cv-summary p + p { margin-top: 4pt; }
.cv-sec.s-summary .cv-h { margin-bottom: 4pt; }

/* Location and dates flow inline after the title (no wide gap that text extraction would read as a column). */
.t-clarity .cv-entry-head, .t-compact .cv-entry-head { display: block; }
.t-clarity .cv-title, .t-compact .cv-title { display: inline; }
.t-clarity .cv-meta, .t-compact .cv-meta { display: inline-block; max-width: 100%; text-align: left; margin: 0; }
.t-clarity .cv-meta::before, .t-compact .cv-meta::before { content: "  ·  "; white-space: pre; color: var(--rule); }
.t-ledger .cv-entry-head, .t-academic .cv-entry-head { display: block; }
.t-ledger .cv-meta, .t-academic .cv-meta { text-align: left; margin: 0; }

/* ---- Clarity: the plain default ---- */
.t-clarity .cv-head { border-bottom: 2pt solid var(--accent); padding-bottom: 8pt; }

/* ---- Ledger: traditional serif, centred header ---- */
.t-ledger { font-size: 10.5pt; line-height: 1.36; }
.t-ledger .cv-head { text-align: center; display: block; padding-bottom: 7pt; border-bottom: 0.75pt solid var(--ink); }
.t-ledger .cv-name { font-size: 21pt; font-weight: 400; letter-spacing: 0.06em; text-transform: uppercase; }
.t-ledger .cv-headline { font-style: italic; color: var(--ink); }
.t-ledger .cv-contact { justify-content: center; gap: 1pt 0; color: var(--ink); }
.t-ledger .cv-contact li + li::before { content: "·"; margin: 0 6pt; color: var(--muted); }
.t-ledger .cv-h { color: var(--ink); font-weight: 700; font-size: 10.5pt; letter-spacing: 0.12em; border-bottom: 0.5pt solid var(--ink); }
.t-ledger .cv-meta { font-style: italic; color: var(--ink); }
.t-ledger .cv-org { font-style: italic; }
.t-ledger .cv-bullets li::marker { color: var(--ink); }

/* ---- Meridian: accent headings, dates on the right edge ---- */
.t-meridian .cv-name { color: var(--accent); font-size: 23pt; }
.t-meridian .cv-head { padding-bottom: 2pt; }
.t-meridian .cv-sec { margin-top: 13pt; }
.t-meridian .cv-h { border: 0; padding: 0 0 0 7pt; border-left: 3pt solid var(--accent); text-transform: none; letter-spacing: 0.01em; font-size: 12pt; color: var(--accent); margin-bottom: 4pt; line-height: 1.15; }
.t-meridian .cv-entry-head { display: block; }
.t-meridian .cv-meta { color: var(--accent); font-weight: 600; font-size: 9.3pt; text-align: left; margin: 1pt 0 0; }
.t-meridian .cv-loc { color: var(--muted); font-weight: 400; }
.t-meridian .cv-org { color: var(--muted); }

/* ---- Compact: dense, one-page US résumé ---- */
.t-compact { font-size: 9.6pt; line-height: 1.3; padding: 11mm 13mm; }
.t-compact .cv-head { display: block; border-bottom: 1.25pt solid var(--ink); padding-bottom: 5pt; }
.t-compact .cv-name { font-size: 18pt; }
.t-compact .cv-headline { font-size: 10pt; margin-top: 1pt; }
.t-compact .cv-contact { margin-top: 3pt; font-size: 9pt; gap: 0 9pt; }
.t-compact .cv-sec { margin-top: 8pt; }
.t-compact .cv-h { font-size: 9.4pt; padding-bottom: 1.5pt; margin-bottom: 2pt; color: var(--ink); }
.t-compact .cv-entry { margin-top: 4.5pt; }
.t-compact .cv-meta, .t-compact .cv-detail { font-size: 9pt; }
.t-compact .cv-bullets { margin-top: 1pt; padding-left: 11pt; }
.t-compact .cv-bullets li { margin-top: 0.5pt; }

/* ---- Two-column layouts. DOM order stays head, main, side; grid only moves them visually. ---- */
.cv-cols { display: grid; column-gap: 7mm; align-items: start; }
.cv-cols.side-left { grid-template-columns: 52mm 1fr; grid-template-areas: "side main"; }
.cv-cols.side-right { grid-template-columns: 1fr 54mm; grid-template-areas: "main side"; column-gap: 11mm; }
.cv-main { grid-area: main; min-width: 0; }
.cv-side { grid-area: side; min-width: 0; font-size: 9.5pt; }
.cv-side .cv-sec:first-child, .cv-main .cv-sec:first-child { margin-top: 0; }

/* Sidebar */
.t-sidebar .cv-head { border-left: 4pt solid var(--accent); padding: 1pt 0 1pt 9pt; margin-bottom: 13pt; }
.t-sidebar .cv-name { font-size: 24pt; }
.t-sidebar .cv-side { border-right: 0.75pt solid var(--rule); padding-right: 6mm; }
.t-sidebar .cv-side .cv-h { border: 0; padding: 0; margin-bottom: 3pt; }
.t-sidebar .cv-side .cv-list li { margin-top: 3.5pt; }
.t-sidebar .cv-side .cv-sep { display: block; height: 0; overflow: hidden; }
.t-sidebar .cv-side strong { display: block; }
.t-sidebar .cv-main .cv-entry-head { display: block; }
.t-sidebar .cv-main .cv-meta { text-align: left; margin: 0; }

/* Split */
.t-split .cv-head { display: block; padding-bottom: 10pt; margin-bottom: 12pt; border-bottom: 0.75pt solid var(--rule); }
.t-split .cv-name { font-size: 26pt; font-weight: 800; letter-spacing: -0.02em; }
.t-split .cv-headline { color: var(--accent); font-weight: 600; font-size: 12pt; }
.t-split .cv-side { background: #f2f4f6; padding: 4mm 4mm 2mm; border-radius: 1.5mm; font-size: 10pt; }
.t-split .cv-side .cv-h { border-color: #d9dee3; }
.t-split .cv-side .cv-sep { display: block; height: 0; overflow: hidden; }
.t-split .cv-side strong { display: block; }
.t-split .cv-side .cv-sec + .cv-sec { margin-top: 10pt; }
.t-split .cv-h { text-transform: none; letter-spacing: 0; font-size: 12pt; color: var(--ink); border-bottom: 0; padding-bottom: 0; }
.t-split .cv-main .cv-h::after { content: ""; display: block; width: 14mm; height: 2pt; background: var(--accent); margin-top: 3pt; }
.t-split .cv-main .cv-entry-head { display: block; }
.t-split .cv-main .cv-meta { text-align: left; margin: 0; }

/* ---- Continental: date column, optional photo ---- */
.t-continental .cv-head { padding-bottom: 8pt; border-bottom: 0.75pt solid var(--rule); }
.t-continental .cv-name { font-size: 22pt; font-weight: 600; }
.t-continental .cv-h { text-transform: none; letter-spacing: 0.01em; font-size: 12pt; font-weight: 600; color: var(--accent); }
.t-continental .cv-line { padding-left: 39mm; text-indent: -39mm; }
.t-continental .cv-when { display: inline-block; width: 34mm; margin-right: 5mm; text-align: right; text-indent: 0; font-weight: 400; font-size: 9.5pt; color: var(--muted); white-space: nowrap; }
.t-continental .cv-what { padding-left: 39mm; }
.t-continental .cv-meta { text-align: left; margin: 0; }
.t-continental .cv-list { padding-left: 39mm; }
.t-continental .cv-summary { padding-left: 39mm; }

/* ---- Academic: serif, generous margins, no page limit ---- */
.t-academic { font-size: 11pt; line-height: 1.4; padding: 18mm 20mm; }
.t-academic .cv-head { display: block; border-bottom: 0.5pt solid var(--ink); padding-bottom: 8pt; }
.t-academic .cv-name { font-size: 20pt; font-weight: 400; }
.t-academic .cv-headline { color: var(--ink); font-style: italic; }
.t-academic .cv-contact { color: var(--ink); font-size: 10pt; }
.t-academic .cv-h { text-transform: none; letter-spacing: 0; font-size: 12.5pt; font-weight: 700; color: var(--ink); border: 0; padding: 0; margin-bottom: 3pt; }
.t-academic .cv-sec { margin-top: 14pt; }
.t-academic .cv-org { font-style: italic; }
.t-academic .cv-meta { color: var(--ink); }
.t-academic .cv-bullets li::marker { color: var(--ink); }

@media print {
  .cv, .t-compact, .t-academic { width: auto !important; min-height: 0 !important; padding: 0 !important; margin: 0 !important; box-shadow: none !important; }
}
