/* ==========================================================================
   brettdavis.ai - Print
   Turns the Resume page into a clean A4 document via the browser's
   print-to-PDF. Loaded on all pages (harmless), designed for /resume/.
   ========================================================================== */

@media print {

  /* Page setup */
  @page {
    size: A4;
    margin: 18mm 16mm;
  }

  html { scroll-behavior: auto; }

  body {
    background: #fff;
    color: #000;
    font-size: 10.5pt;
    line-height: 1.5;
  }

  /* Strip the chrome */
  .site-header,
  .site-footer,
  .skip-link,
  .no-print,
  .nav-toggle,
  .button { display: none !important; }

  /* Reveal everything immediately - no JS in print context */
  [data-reveal],
  .gap-rule::after {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .container { max-width: none; padding-inline: 0; }
  .section, .case-hero, .case-section { padding-block: 0; }

  /* Typography scaled for paper */
  h1 { font-size: 22pt; margin-bottom: 4pt; }
  h2 { font-size: 13pt; margin-bottom: 6pt; }
  h3 { font-size: 11pt; }
  p, li { max-width: none; }

  /* Resume-specific layout */
  .resume-section {
    display: block;
    border-top: 1pt solid #ccc;
    padding: 10pt 0;
    break-inside: avoid;
  }

  .resume-section .case-section__label {
    position: static;
    margin-bottom: 4pt;
  }

  .fact-panel { border-color: #ccc; padding-block: 8pt; margin-top: 8pt; }

  /* Keep experience entries together on one page where possible */
  .xp-entry { break-inside: avoid; }

  /* Show link destinations for the contact line only */
  .print-contact a::after {
    content: " (" attr(href) ")";
    font-size: 8.5pt;
    color: #555;
  }
  .print-contact a[href^="mailto"]::after {
    content: "";
  }

  a { text-decoration: none; color: #000; }
}
