@media print {
  @page {
    size: A4;
    margin: 8mm;
  }

  html,
  body {
    width: auto;
    height: auto;
    margin: 0;
    padding: 0;
    overflow: visible;
    background: #fff;
  }

  body {
    font-size: 10.5pt;
    line-height: 1.35;
  }

  .resume-actions,
  .download-btn {
    display: none !important;
  }

  .resume-container {
    width: 100%;
    max-width: none;
    margin: 0;
    grid-template-columns: 56mm minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    grid-template-areas: 'profile content' 'details content';
    border-radius: 0;
    box-shadow: none;
    break-inside: auto;
  }

  .left-column {
    padding: 4mm;
    border-radius: 0;
    background-color: #232f3e;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .profile {
    padding-bottom: 2mm;
    break-inside: avoid;
    break-after: avoid;
  }

  .left-column img {
    width: 96px;
    height: 96px;
    margin-bottom: 2mm;
  }

  .profile h1 {
    font-size: 21pt;
  }

  .specialty,
  .contact-details {
    font-size: 9.5pt;
    line-height: 1.35;
  }

  .contact-details {
    margin-top: 2.5mm;
    padding-top: 2.5mm;
  }

  .contact-details p + p {
    margin-top: 1.5mm;
  }

  .sidebar-details {
    padding-top: 2mm;
    break-inside: auto;
  }

  .left-section + .left-section {
    margin-top: 2.5mm;
  }

  .left-section h2 {
    font-size: 12pt;
    padding-bottom: 2mm;
    margin-bottom: 2mm;
  }

  .left-section li {
    font-size: 10pt;
    margin-bottom: 1mm;
  }

  .skill-group li {
    margin-bottom: 0.5mm;
  }

  .skill-group + .skill-group {
    margin-top: 2.5mm;
  }

  .skill-group h3 {
    font-size: 10pt;
    margin-bottom: 1mm;
  }

  .right-column {
    padding: 0 0 0 5mm;
    break-inside: auto;
  }

  .section {
    margin-bottom: 2.5mm;
    break-inside: auto;
  }

  .section h2 {
    font-size: 13pt;
    padding-bottom: 2mm;
    margin-bottom: 2.5mm;
  }

  .title {
    font-size: 10.5pt;
    line-height: 1.35;
  }

  .right-column small {
    font-size: 9.5pt;
  }

  .experience-item + .experience-item,
  .education-item + .education-item {
    margin-top: 1.5mm;
    padding-top: 1.5mm;
  }

  .experience-item > p + p,
  .experience-highlights {
    margin-top: 1.5mm;
  }

  .experience-highlights li + li {
    margin-top: 1mm;
  }

  /* Keep individual entries together, without locking entire sections. */
  .experience-item,
  .education-item,
  .skill-group,
  .left-section > ul {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  h1,
  h2,
  h3 {
    page-break-after: avoid;
    break-after: avoid;
  }

  p,
  li {
    orphans: 3;
    widows: 3;
  }

  a,
  .left-column a {
    color: inherit;
    text-decoration: none;
  }
}
