/*
 * CV sheets: the same markup is shown in the preview, drawn into the PDF (pdf.js reads the
 * computed layout) and printed. Paper is always white whatever the app theme.
 * Only solid fills and borders are used, since that is what the PDF writer redraws.
 */
@font-face { font-family: 'CV Sans'; src: url('../fonts/IBMPlexSans-Regular.ttf') format('truetype'); font-weight: 400; font-style: normal; font-display: block; }
@font-face { font-family: 'CV Sans'; src: url('../fonts/IBMPlexSans-Italic.ttf') format('truetype'); font-weight: 400; font-style: italic; font-display: block; }
@font-face { font-family: 'CV Sans'; src: url('../fonts/IBMPlexSans-Medium.ttf') format('truetype'); font-weight: 500; font-display: block; }
@font-face { font-family: 'CV Sans'; src: url('../fonts/IBMPlexSans-SemiBold.ttf') format('truetype'); font-weight: 600; font-display: block; }
@font-face { font-family: 'CV Sans'; src: url('../fonts/IBMPlexSans-Bold.ttf') format('truetype'); font-weight: 700; font-display: block; }
@font-face { font-family: 'CV Serif'; src: url('../fonts/IBMPlexSerif-Regular.ttf') format('truetype'); font-weight: 400; font-display: block; }
@font-face { font-family: 'CV Serif'; src: url('../fonts/IBMPlexSerif-Medium.ttf') format('truetype'); font-weight: 500; font-display: block; }
@font-face { font-family: 'CV Serif'; src: url('../fonts/IBMPlexSerif-SemiBold.ttf') format('truetype'); font-weight: 600; font-display: block; }

.cv-sheet { --pad-x: 17mm; position: relative; box-sizing: border-box; width: 210mm; height: 297mm; padding: 15mm var(--pad-x) 17mm; margin: 0 auto 16px; overflow: hidden; background: #fff; color: #1c1f24; box-shadow: 0 1px 3px rgba(0, 0, 0, .15), 0 10px 30px -14px rgba(0, 0, 0, .35); }
.cv-sheet.paper-letter { width: 215.9mm; height: 279.4mm; }
.cv-sheet:last-child { margin-bottom: 0; }
.cv-measure, .cv-pdf-stage { position: absolute; left: -12000px; top: 0; pointer-events: none; }
.cv-measure { visibility: hidden; }

.cv-doc { font: 10pt/1.42 'CV Sans', 'Noto Sans', 'Segoe UI', sans-serif; color: #1c1f24; }
.cv-doc.size-small { font-size: 9.2pt; line-height: 1.36; }
.cv-doc h1, .cv-doc h2, .cv-doc p { margin: 0; }
.cv-doc strong { font-weight: 600; }
.cv-doc em { font-style: italic; }
.cv-headwrap { display: flow-root; padding-bottom: 4px; }
.cv-block { display: flow-root; }
.cv-block.cv-first { padding-top: 10px; }
/* Rules are solid colours (no transparency): the PDF writer redraws borders as plain lines. */
.cv-block h2 { font: 600 8.4pt/1.3 'CV Sans', sans-serif; letter-spacing: .09em; text-transform: uppercase; color: var(--accent); padding-bottom: 3px; border-bottom: .75pt solid #dfe2e7; margin-bottom: 6px; }
.font-serif .cv-name, .font-serif .cv-block h2 { font-family: 'CV Serif', Georgia, serif; }
.font-serif .cv-block h2 { text-transform: none; letter-spacing: 0; font-size: 11pt; font-weight: 600; }
.cv-block h2.cv-cont { color: #7a7f88; }

/* Header */
.cv-head { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; }
.cv-head-main { min-width: 0; flex: 1; }
.cv-dated { font-size: 8.5pt; color: #5b616a; text-align: right; }
.cv-doctype { font: 600 7.4pt 'CV Sans', sans-serif; letter-spacing: .14em; text-transform: uppercase; color: #8a8f97; margin-bottom: 3px; }
.cv-name { font: 600 23pt/1.08 'CV Sans', sans-serif; color: #111317; letter-spacing: -.015em; }
.cv-headline { margin-top: 4px; font-size: 10.8pt; font-weight: 500; color: var(--accent); }
.cv-contact { margin-top: 7px; display: flex; flex-wrap: wrap; gap: 2px 8px; font-size: 8.9pt; color: #3f444c; }
.cv-sep { color: #b3b7be; }
.cv-facts { display: flex; flex-wrap: wrap; gap: 3px 18px; margin: 7px 0 0; font-size: 9pt; }
.cv-facts div { display: flex; gap: 6px; align-items: baseline; }
.cv-facts dt { color: #80858e; font-size: 7.2pt; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.cv-facts dd { margin: 0; font-weight: 500; }
.cv-photo { flex-shrink: 0; overflow: hidden; background: #eef0f3; width: 30mm; height: 38mm; }
.cv-photo.portrait, .cv-photo.square { border: .75pt solid #dfe2e7; }
.cv-photo.square, .cv-photo.circle { width: 32mm; height: 32mm; }
.cv-photo.circle { border-radius: 50%; }
.cv-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cv-head.photo-left { flex-direction: row-reverse; justify-content: flex-end; }
.cv-head.photo-top { flex-direction: column-reverse; align-items: center; gap: 10px; }
.cv-head.photo-top .cv-head-main { width: 100%; }

/* Entries */
.cv-entry { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'what when'; column-gap: 14px; padding-bottom: 8px; }
.cv-when { grid-area: when; color: #5b616a; font-size: 8.8pt; white-space: nowrap; font-variant-numeric: tabular-nums; padding-top: 1px; }
.cv-what { grid-area: what; min-width: 0; }
.cv-entry-title { font-weight: 600; color: #111317; }
.cv-entry-sub { color: #555b64; font-size: 9.1pt; }
.cv-bullets { margin-top: 3px; font-size: 9.4pt; line-height: 1.4; }
.cv-bl { display: flex; gap: 7px; padding-bottom: 1.5px; }
.cv-dot { color: var(--accent); flex-shrink: 0; }
.cv-line { padding-bottom: 3px; }
.cv-muted { color: #6b7079; }
.cv-p { padding-bottom: 3px; }
.cv-cite { display: flex; gap: 6px; padding-bottom: 4px; font-size: 9.4pt; }
.cv-cite-n { color: #6b7079; min-width: 16px; }
.cv-refs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; font-size: 9.2pt; }
.cv-closing { padding-top: 14px; }
.cv-sign { display: flex; justify-content: space-between; gap: 30px; padding-top: 20px; }
.cv-sign span { flex: 1; border-top: .75pt solid #555b64; padding-top: 4px; font-size: 8.5pt; color: #4f545c; }
.cv-consent { padding-top: 14px; font-size: 7.5pt; line-height: 1.35; color: #6b7079; }
.cv-foot { position: absolute; left: var(--pad-x); right: var(--pad-x); bottom: 6mm; display: flex; justify-content: space-between; padding-top: 2mm; border-top: .75pt solid #e8eaee; font: 7.2pt 'CV Sans', sans-serif; color: #8a8f97; }

/* Classic: centred serif name over an accent rule; the most conservative choice */
.cv-classic .cv-head-main { text-align: center; }
.cv-classic .cv-name { font-family: 'CV Serif', Georgia, serif; font-weight: 500; font-size: 24pt; letter-spacing: 0; }
.cv-classic .cv-contact, .cv-classic .cv-facts { justify-content: center; }
.cv-classic .cv-headwrap { padding-bottom: 9px; border-bottom: 1.5pt solid var(--accent); }
.cv-classic .cv-head.photo-right .cv-head-main, .cv-classic .cv-head.photo-left .cv-head-main { text-align: left; }
.cv-classic .cv-head.photo-right .cv-contact, .cv-classic .cv-head.photo-left .cv-contact, .cv-classic .cv-head.photo-right .cv-facts, .cv-classic .cv-head.photo-left .cv-facts { justify-content: flex-start; }

/* Compact: dense one-page résumé with strong rules, as US recruiters expect */
.cv-compact { font-size: 9.6pt; line-height: 1.34; }
.cv-compact .cv-name { font-size: 21pt; font-weight: 700; letter-spacing: -.02em; }
.cv-compact .cv-doctype { display: none; }
.cv-compact .cv-headwrap { padding-bottom: 6px; }
.cv-compact .cv-block.cv-first { padding-top: 8px; }
.cv-compact .cv-block h2 { color: #111317; border-bottom: 1.25pt solid var(--accent); font-weight: 700; letter-spacing: .08em; margin-bottom: 5px; }
.cv-compact .cv-entry { padding-bottom: 6px; }
.cv-compact .cv-when { color: #2f343b; font-weight: 500; }
.cv-compact .cv-bullets { font-size: 9.2pt; margin-top: 2px; }

/* Tabular (Lebenslauf / Europass): dates in a left column */
.cv-detailed .cv-entry { grid-template-columns: 30mm minmax(0, 1fr); grid-template-areas: 'when what'; column-gap: 10px; }
.cv-detailed .cv-when { white-space: normal; color: #3f444c; }
.cv-detailed .cv-block h2 { color: #111317; border-left: 3pt solid var(--accent); padding: 0 0 3px 7px; border-bottom: .75pt solid #e3e6ea; margin-bottom: 7px; }
.cv-detailed .cv-line, .cv-detailed .cv-p, .cv-detailed .cv-cite, .cv-detailed .cv-refs { margin-left: calc(30mm + 10px); }
.cv-detailed .cv-headwrap { border-bottom: .75pt solid #dfe2e7; padding-bottom: 10px; }
.cv-detailed .cv-closing .cv-p, .cv-detailed .cv-consent { margin-left: 0; }

/* Modern: accent header band and a tinted side column (no sheet padding; columns pad themselves).
   Side and main columns must keep the same top and bottom padding: cv.js measures .cv-main's. */
.cv-sheet.lay-modern { padding: 0; --pad-x: 12mm; }
.cv-modern { height: 100%; display: flex; flex-direction: column; }
.cv-modern .cv-headwrap { background: var(--accent); color: #ffffff; padding: 12mm 12mm 9mm; }
.cv-modern .cv-name { color: #ffffff; font-size: 25pt; }
.cv-modern .cv-doctype { color: #d6dfe9; }
.cv-modern .cv-headline { color: #ffffff; }
.cv-modern .cv-contact { color: #f2f5f8; }
.cv-modern .cv-sep { color: #b9c6d3; }
.cv-modern .cv-facts dt { color: #d6dfe9; }
.cv-modern .cv-facts dd { color: #ffffff; }
.cv-modern .cv-photo { background: #ffffff; border: 0; }
.cv-modern .cv-photo.portrait, .cv-modern .cv-photo.square { border: 2pt solid #ffffff; }
.cv-cols { flex: 1; display: grid; grid-template-columns: 64mm minmax(0, 1fr); min-height: 0; }
.cv-side { background: #f2f4f7; padding: 5mm 7mm 16mm 10mm; font-size: 9.2pt; min-width: 0; overflow-wrap: anywhere; }
.cv-main { padding: 5mm 12mm 16mm 8mm; min-width: 0; }
.cv-side .cv-block h2 { border-bottom-color: #d3d8df; }
.cv-side .cv-line { padding-bottom: 5px; }
.lay-modern .cv-foot { border-top: 0; }

/* Right-to-left CVs */
.cv-sheet[dir="rtl"] .cv-detailed .cv-block h2 { border-left: 0; border-right: 3pt solid var(--accent); padding: 0 7px 3px 0; }
.cv-sheet[dir="rtl"] .cv-detailed .cv-line, .cv-sheet[dir="rtl"] .cv-detailed .cv-p, .cv-sheet[dir="rtl"] .cv-detailed .cv-cite, .cv-sheet[dir="rtl"] .cv-detailed .cv-refs { margin-left: 0; margin-right: calc(30mm + 10px); }

#print-root { display: none; }
@media print {
  #print-root { display: block; }
  #print-root .cv-sheet { margin: 0; }
}
