/* ==========================================================================
   Print Styles — resume.html only
   Linked via <link media="print"> so it never loads on other pages.
   ========================================================================== */

@page {
  size: A4;
  margin: 1.5cm;
}

@media print {
  /* ------------------------------------------------------------------
     1. Hide non-content elements
     ------------------------------------------------------------------ */
  header,
  nav,
  .chat-widget,
  .chatbot-widget,
  .cta-section,
  footer,
  .footer,
  .resume-actions,
  /* animation / scroll wrappers that JS may leave partially invisible */
  .reveal:not(.active) {
    display: none !important;
  }

  /* ------------------------------------------------------------------
     2. Page & body reset
     ------------------------------------------------------------------ */
  *,
  *::before,
  *::after {
    background: #fff !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  html,
  body {
    background: #fff !important;
    color: #000 !important;
    font-family: "Inter", Arial, Helvetica, sans-serif;
    font-size: 11pt;
    line-height: 1.5;
    width: 100%;
    margin: 0;
    padding: 0;
  }

  /* ------------------------------------------------------------------
     3. Typography — pt units for A4 printing
     ------------------------------------------------------------------ */
  h1 {
    font-size: 18pt;
    margin-bottom: 4pt;
  }

  h2,
  .resume-section-title {
    font-size: 14pt;
    margin-top: 14pt;
    margin-bottom: 6pt;
    border-bottom: 1pt solid #555;
    padding-bottom: 3pt;
    page-break-after: avoid;
    break-after: avoid;
  }

  h3 {
    font-size: 12pt;
    margin-bottom: 4pt;
  }

  p,
  li {
    font-size: 11pt;
    orphans: 3;
    widows: 3;
  }

  /* ------------------------------------------------------------------
     4. Page-break rules — keep cards / list items together
     ------------------------------------------------------------------ */
  .timeline-item,
  .skill-category,
  .resume-section,
  .resume-header {
    break-inside: avoid;
    page-break-inside: avoid; /* legacy fallback */
  }

  /* ------------------------------------------------------------------
     5. Layout fixes — strip screen-only chrome
     ------------------------------------------------------------------ */
  .container {
    max-width: 100% !important;
    padding: 0 !important;
  }

  .section {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  /* Make sure reveal elements that are already active show fully */
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }

  /* Links — show URL inline for anchor text that isn't self-explanatory */
  a[href^="http"]::after,
  a[href^="https"]::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    color: #444 !important;
  }

  /* Suppress URL expansion for buttons / icon-only links */
  .btn::after,
  .footer-social a::after,
  nav a::after {
    content: "" !important;
  }

  /* ------------------------------------------------------------------
     6. Printed URL footer via CSS
     ------------------------------------------------------------------ */
  body::after {
    content: "jasonrae.ai";
    display: block;
    text-align: center;
    font-size: 9pt;
    color: #555 !important;
    margin-top: 24pt;
    border-top: 1pt solid #ccc;
    padding-top: 6pt;
    letter-spacing: 0.05em;
  }
}
