/* Dedicated A4 CV stylesheet. Domain data and language stay shared with the site. */
@page {
  size: A4 portrait;
  margin: 13mm 15mm 14mm;
}

@media print {
  html, body {
    color-scheme: light;
    margin: 0;
    padding: 0;
    background: #fff !important;
    color: #20262c;
    font: 10pt/1.38 Arial, "Liberation Sans", sans-serif;
    overflow: visible !important;
    height: auto;
    min-height: 0;
  }

  body::before, body::after, #ascii-bg, .topbar, .terminal, .hero-actions,
  .printer-panel, .project-modal, .print-cv-trigger {
    display: none !important;
  }

  body.print-cv-ready > :not(#printCV) {
    display: none !important;
  }

  body.print-cv-ready > #printCV {
    display: block !important;
  }

  .print-cv {
    width: 100%;
    margin: 0;
    padding: 0;
    font: 10pt/1.38 Arial, "Liberation Sans", sans-serif;
    color: #20262c;
    background: #fff;
  }

  .print-cv *, .print-cv *::before, .print-cv *::after {
    box-sizing: border-box;
    animation: none !important;
    transition: none !important;
    text-shadow: none !important;
    box-shadow: none !important;
    transform: none !important;
  }

  .print-cv h1, .print-cv h2, .print-cv h3, .print-cv p,
  .print-cv dl, .print-cv dd, .print-cv ul {
    margin: 0;
    padding: 0;
  }

  .print-cv a {
    color: inherit;
    text-decoration: none;
    overflow-wrap: anywhere;
  }

  .cv-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 32mm;
    gap: 9mm;
    align-items: start;
    padding-bottom: 5mm;
    border-bottom: 1pt solid #384852;
    break-inside: avoid;
  }

  .print-cv h1 {
    font-size: 26pt;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -.5pt;
    color: #17232d;
  }

  .print-cv .cv-title {
    margin: 2mm 0 3mm;
    font-size: 11pt;
    line-height: 1.4;
    color: #384852;
  }

  .cv-contacts {
    display: grid;
    gap: .5mm;
    font-size: 8.4pt;
    line-height: 1.35;
  }

  .cv-photo {
    display: block;
    width: 32mm;
    height: 32mm;
    object-fit: contain;
    object-position: center top;
    image-rendering: auto;
    border: .5pt solid #d3d9dd;
  }

  .print-cv .cv-section {
    margin-top: 4mm;
    padding: 0;
    border: 0;
  }

  .print-cv h2 {
    margin-bottom: 2mm;
    padding-bottom: 1mm;
    border-bottom: .5pt solid #b9c2c8;
    color: #273a48;
    font-size: 11pt;
    font-weight: 700;
    line-height: 1.3;
    break-after: avoid;
  }

  .print-cv h3 {
    font-size: 10pt;
    font-weight: 700;
    line-height: 1.35;
    break-after: avoid;
  }

  .print-cv p, .print-cv li {
    orphans: 3;
    widows: 3;
  }

  .cv-skills {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.8mm 6mm;
    font-size: 8.1pt;
    line-height: 1.35;
  }

  .cv-skill {
    display: grid;
    grid-template-columns: 9mm minmax(0, 1fr);
    gap: 2mm;
    break-inside: avoid;
  }

  .cv-skill dt {
    font-weight: 700;
    color: #384852;
  }

  .cv-career-entry {
    margin-bottom: 3mm;
    break-inside: avoid;
  }

  .cv-job-heading, .cv-project-heading {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 4mm;
  }

  .cv-period {
    flex-shrink: 0;
    font-size: 8.5pt;
    color: #4b555e;
  }

  .print-cv .cv-organization {
    margin-bottom: 1mm;
    font-size: 9pt;
    font-weight: 600;
    color: #4b555e;
  }

  .cv-description {
    font-size: 9pt;
    line-height: 1.4;
    white-space: pre-line;
  }

  .print-cv .cv-second-page {
    break-before: page;
    margin-top: 0;
  }

  .cv-project {
    margin-top: 3mm;
    break-inside: avoid;
  }

  .cv-project p {
    margin-top: 1mm;
    font-size: 9pt;
    line-height: 1.4;
  }

  .print-cv .cv-group-title {
    margin: 3mm 0 1mm;
    font-size: 11pt;
    color: #273a48;
  }

  .cv-client {
    font-size: 8pt;
    text-align: right;
    color: #4b555e;
  }

  .print-cv .cv-technologies {
    font-size: 8pt;
    color: #4b555e;
  }

  .print-cv .cv-principles {
    padding-left: 4mm;
    font-size: 9pt;
  }

  .cv-principles li {
    padding-left: .5mm;
    margin-bottom: 1mm;
  }
}
