/* Print layout of the three CVs (short, compact, full).
   Linked with media="print" on the CV pages only.

   Zero page margins leave no room for the header and footer that browsers
   add on their own (title, URL, date, page numbers): Chrome, Edge and Brave
   then omit them; in Firefox and Safari it depends on the print dialog.
   The margins are recreated as padding of <main>, and box-decoration-break
   repeats that padding at the top and bottom of every printed page. */

@page { size: A4; margin: 0; }

html, body {
  margin: 0 !important;
  padding: 0 !important;
  background: #fff !important;
  min-width: 0 !important;      /* Bootstrap 4 forces 992px in print */
}
.container { min-width: 0 !important; }

main {
  display: block !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 15mm 18mm !important;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* --- Short CV: one page ----------------------------------------------- */

main .page-head, main .wrap {
  padding: 0 !important;
  margin: 0 !important;
  max-width: none !important;
  background: none !important;
  border: 0 !important;
}
.page-head h1 { font-size: 17pt; line-height: 1.2; margin: 0 0 5mm; }
.cv-page { display: block !important; padding: 0 !important; }
.cv-text { max-width: none; font-size: 11pt; line-height: 1.45; }
.cv-text p + p { margin-top: 3mm; }
.cv-text a { color: #000 !important; text-decoration: none; }
.cv-text a::after { content: none !important; }   /* no URLs after links */

/* Contacts: only the address block of the footer, as a closing line */
.site-footer {
  border: 0 !important;
  padding: 0 18mm 15mm !important;
  font-size: 9pt;
  color: #333 !important;
  break-inside: avoid;
}
.site-footer__inner { display: block !important; padding: 0 !important; }
.site-footer__inner > :not(address), .site-footer__legal { display: none !important; }
.site-footer address {
  display: flex; flex-wrap: wrap; column-gap: 1.2em;   /* one line, items spaced */
  border-top: .5pt solid #999; padding-top: 2mm; line-height: 1.4;
}
.site-footer address br { display: none; }
.site-footer a { color: #333 !important; text-decoration: none; }
.site-footer a::after { content: none !important; }

/* --- Compact and full CVs --------------------------------------------- */

.cv-doc { max-width: none; font-size: 10pt; line-height: 1.4; }
.cv-section + .cv-section { margin-top: 6mm; }
.cv-section > h2 { font-size: 13pt; margin-bottom: 2.5mm; break-after: avoid; }
.cv-section h3 { font-size: 10.5pt; margin: 4mm 0 1.5mm; break-after: avoid; }
.cv-section h4 { font-size: 10pt; margin: 3mm 0 1mm; break-after: avoid; }
.cv-item { grid-template-columns: 26mm 1fr; break-inside: avoid; }
.cv-doc .chips, .cv-doc .pub__links { display: none !important; }
.cv-doc a { color: #000 !important; text-decoration: none; }
.cv-doc a::after { content: none !important; }
.cv-doc .pub { break-inside: avoid; padding-block: 1.5mm; border: 0 !important; }
