@page { size: A4; margin: 15mm 17mm; }

body { margin: 0; color: #201c27; font: 10pt/1.35 Arial, sans-serif; }
main { display: flex; flex-direction: column; }
h1, h2, h3, p, dl, dd { margin: 0; }
h1 { font-size: 25pt; line-height: 1.1; }
h2 { font-size: 15pt; color: #472967; margin: 4mm 0 2mm; }
h2, h3 { break-after: avoid; }
em { font-style: normal; }
a { color: inherit; }

body > :not(main), .skip, main > :not(.hero-editions, #profilo, #percorso),
.cover-nav, #partita, .cv-studio, .cv-byline, .cv-actions, #statistiche,
.career-brief, .section-label, .view-switch, .years, .cv-download,
.chapter-id, .related-roles, .chapter-content > p, .timeline-heading,
.portrait, #profile-title, .bio, dialog, dialog::backdrop { display: none !important; }

.cv-role { margin: 1mm 0; font-size: 13pt; }
.print-contact[hidden], .print-profile-title[hidden] { display: block; }
.print-contact { margin-bottom: 2mm; }
.cv-intro { max-width: 150mm; }
#profilo { order: 1; }
#percorso { order: 2; }
.skills > div { display: grid; grid-template-columns: 32mm 1fr; gap: 2mm; margin: .7mm 0; }
.skills dt { font-weight: bold; }

.chapter-content dl > div { padding: 1.8mm 0; border-top: .2mm solid #d6cfdb; break-inside: avoid; }
.chapter-content dt { font-size: 9pt; color: #50405d; }
.chapter-content p { margin-top: .4mm; }
.chapter h3 { margin: 3mm 0 1mm; }

/* Print every original chapter without JS, or the complete date view when available. */
.chapter[hidden], #cronologia:has(#timeline-entries > dl) { display: block; }
.chapters:has(+ #cronologia #timeline-entries > dl) { display: none; }

@font-face { font-family: 'CV Display'; src: url('/fonts/zalando-sans-expanded-latin.woff2') format('woff2'); font-weight: 100 900; }
@font-face { font-family: 'CV Sans'; src: url('/fonts/dm-sans.ttf') format('truetype'); font-weight: 100 900; }

@page {
  size: A4; margin: 13mm 15mm 15mm;
  @top-left { content: "MaKuMo NET"; font: bold 8pt Arial, sans-serif; color: #582d70; }
  @top-right { content: "Samuel Buccheri  /  Curriculum vitae"; font: 8pt Arial, sans-serif; color: #49404a; }
  @bottom-left { content: "makumo.net"; font: bold 8pt Arial, sans-serif; color: #582d70; }
  @bottom-right { content: counter(page) " / " counter(pages); font: 8pt Arial, sans-serif; color: #49404a; }
}
body:has(> #print-cv) > :not(#print-cv) { display: none !important; }
body > #print-cv[hidden] { display: block !important; }
.print-edition { color: #282232; font: 10pt/1.38 'CV Sans', sans-serif; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
.cv-sheet { border-top: 1.1pt solid #482553; }
.cv-sheet + .cv-sheet { break-before: page; }
.print-identity, .print-history-heading { display: flex; justify-content: space-between; align-items: center; gap: 5mm; }
.print-identity { padding: 5mm 0; }
.print-identity h1 { font: 760 34pt/.99 'CV Display', sans-serif; letter-spacing: -1.8pt; }
.print-identity h1 span { display: block; color: #613276; }
.print-identity .cv-role { margin-top: 2.5mm; font-size: 13pt; font-weight: 650; }
.print-portrait { width: 23mm; height: 23mm; border-radius: 50%; }
.print-etna { display: block; width: 100%; height: 46mm; object-fit: cover; object-position: center 54%; border-radius: 1mm 11mm 1mm 1mm; }
.print-about { margin: 4mm 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8mm; }
.print-about .bio { display: block !important; }
.print-subhead, .print-history-title h2 { font-family: 'CV Display', sans-serif; color: #3b204d; letter-spacing: -.5pt; }
.print-subhead { border-top: .7pt solid #987da0; padding: 3mm 0 1.5mm; margin: 4mm 0 0; font-size: 14pt; }
.print-edition .skills > div { grid-template-columns: 31mm 1fr; padding: 1.05mm 0; margin: 0; border-bottom: .35pt solid #ded5de; }
.print-edition .skills dt { color: #533165; }
.print-current { background: #f2ebf4; border-left: 2pt solid #75438a; padding: 3mm 4mm; }
.print-current dt, .print-period, .print-roles dt { font-size: 9pt; font-weight: 650; color: #603771; }
.print-current b, .print-roles b { font-size: 11.2pt; font-weight: 750; }
.print-current p, .print-roles p { margin-top: .6mm; }
.print-city { font-size: 9pt; color: #594d5e; }
.print-project a { font-weight: 700; color: #59316f; }
.print-signature { display: grid; justify-items: center; }
.print-brand { width: 5.5mm; height: 5.5mm; object-fit: contain; }
.print-contact-link { display: inline-flex; align-items: center; gap: 1.2mm; margin-top: 1.5mm; color: #59316f; font-weight: 650; }
.print-history-heading { padding: 4mm 0; margin-bottom: 1.5mm; }
.print-history-title h2 { margin: 0 0 1.6mm; font-size: 23pt; line-height: 1.03; }
.print-circuits { display: block; width: 50mm; height: 24mm; object-fit: cover; object-position: 68% 52%; border-radius: 0 6mm 0 0; }
.print-roles > div { display: grid; grid-template-columns: 29mm 1fr; gap: 4mm; padding: 2.7mm 0; border-top: .55pt solid #c9bbca; break-inside: avoid; }
.print-roles dt { padding-top: .7mm; }
