/* Durable document print rules: independent from screen/mobile breakpoints. */
@media print {
  @page { size: A4; margin: 14mm; }
  body:has(.cv-page), body:has(.profile-page) { margin:0!important; background:#fff!important; }
  .cv-page, .profile-page { overflow:visible!important; background:#fff!important; }
  .cv-page *, .profile-page * { box-sizing:border-box; }
  .cv-hero, .profile-hero { break-inside:avoid; page-break-inside:avoid; }
  .cv-hero-copy, .profile-hero-copy { min-width:0; }
  .cv-hero h1, .profile-hero h1 { margin:12px 0 0!important; padding:0!important; min-height:0!important; font-size:34px!important; line-height:1.1!important; }
  .cv-hero-copy, .profile-hero-copy { display:block!important; grid-column:auto!important; }
  .cv-portrait, .profile-signature.has-photo { grid-column:auto!important; grid-row:auto!important; }
  .cv-intro, .profile-lead { font-size:14px!important; line-height:1.55!important; }
  .cv-body { display:block!important; padding:24px 0 0!important; }
  .cv-expertise { position:static!important; margin:0 0 26px; break-inside:avoid; page-break-inside:avoid; }
  .cv-expertise ul { display:grid!important; grid-template-columns:repeat(2,minmax(0,1fr))!important; gap:0 24px!important; margin-top:12px; }
  .cv-expertise li { min-width:0; overflow-wrap:anywhere; font-size:11px; line-height:1.45; font-weight:400; padding:7px 0; }
  .cv-history, .cv-history-section { display:block!important; min-width:0; }
  .cv-history-section[data-cv-section="career"],
  .cv-history-section[data-cv-section="education"] {
    break-before:page; page-break-before:always; margin-top:0!important;
  }
  .cv-section-head { break-after:avoid; page-break-after:avoid; }
  .cv-row { display:grid!important; grid-template-columns:80px minmax(0,1fr) 110px!important; gap:14px!important; break-inside:avoid; page-break-inside:avoid; }
  .cv-row>div { min-width:0; overflow-wrap:anywhere; }
  .cv-row h3 { break-after:avoid; page-break-after:avoid; }
  .cv-personal { break-inside:avoid; page-break-inside:avoid; padding:24px 0!important; }
  .cv-personal h2 { font-size:13px!important; font-weight:400!important; line-height:1.6!important; letter-spacing:normal!important; }
  .profile-reading, .profile-reading-grid, .profile-story { display:block!important; overflow:visible!important; height:auto!important; }
  .profile-section { display:block; break-inside:avoid; page-break-inside:avoid; }
  .profile-section h2 { break-after:avoid; page-break-after:avoid; margin-bottom:14px; line-height:1.2; }
  .profile-section p, .cv-detail { orphans:3; widows:3; }
  .profile-aside { break-inside:avoid; page-break-inside:avoid; }
}