@page {
  margin: 1.5cm 2cm;
}

@media print {

  /* Reset to black on white */
  :root {
    --color-background: #fff;
    --color-text: #000;
    --color-text-grey: #555;
    --color-light: #eee;
    --color-black: #000;
    --color-white: #fff;
  }

  html {
    background: #fff;
    color: #000;
    font-size: 12pt;
  }

  body {
    max-width: 100%;
    padding: 1.5cm 2cm;
    margin: 0;
  }

  /* Hide navigation, footer, social — but keep the logo */
  .menu,
  .footer,
  .social,
  .pagination,
  .carbonbadge {
    display: none !important;
  }

  .header {
    padding: 0 0 1.5rem 0;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #ccc;
  }

  .logo {
    font-size: 1.4rem;
    color: #000;
    text-decoration: none;
  }

  /* Remove backgrounds and shadows */
  * {
    background: transparent !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  /* Links: show URL after link text */
  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
    color: #555;
    word-break: break-all;
  }

  /* Don't expand internal or javascript links */
  a[href^="#"]::after,
  a[href^="javascript:"]::after {
    content: "";
  }

  /* Text */
  .text {
    line-height: 1.6;
  }

  .text pre {
    border: 1px solid #ccc;
    background: #f5f5f5 !important;
    color: #000 !important;
    padding: 1rem;
    white-space: pre-wrap;
    word-break: break-word;
  }

  .text code {
    background: #f5f5f5 !important;
    color: #000 !important;
    border: 1px solid #ddd;
  }

  .text blockquote {
    border-left: 3px solid #000;
    color: #333;
  }

  /* Avoid page breaks inside elements */
  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
  }

  p, blockquote, pre, figure {
    page-break-inside: avoid;
  }

  img {
    max-width: 100%;
    page-break-inside: avoid;
  }

  /* Certification block */
  .certification {
    border: 1px solid #ccc !important;
  }

  .certification-badge-img {
    width: 80px;
    height: 80px;
  }

}
