/* ============================================================
   Print / "Download PDF" stylesheet.
   Strips the webcore chrome (mascot, marquee, dark header/footer,
   sticky nav, decorative pixel bars) down to a clean, readable,
   recruiter-friendly single document. Loaded only for media=print,
   i.e. only when the browser's print dialog / "Save as PDF" runs.
   ============================================================ */

@page {
  size: A4;
  margin: 14mm 16mm;
}

@media print {

  /* Force full-color rendering of badges/chips regardless of the
     browser's "background graphics" print setting. */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }

  /* Force the light palette on paper even if dark mode is active on screen. */
  html, html[data-theme="dark"] {
    --bg: #ffffff;
    --bg-alt: #f7f4fb;
    --surface: #ffffff;
    --text: #1a1420;
    --text-dim: #4a4453;
    --border: #d9d0ec;
    --header-bg: #ffffff;
    --header-text: #1a1420;
  }

  html, body {
    background: #fff !important;
    font-size: 10.5pt;
  }

  a { color: var(--purple) !important; text-decoration: none !important; }

  /* ---------- hide all screen-only chrome ---------- */
  .site-header,
  .site-footer,
  .hero-bg,
  .hero-mascot-col,
  .hero-copy .eyebrow,
  .hero-copy h1,
  .hero-copy .role,
  .cta-row,
  .hero-photo-col,
  .pixel-strip,
  .pixel-bullet,
  .timeline::before,
  .timeline-dot,
  #print-cv-hero,
  #theme-toggle {
    display: none !important;
  }

  /* ---------- print-only header ---------- */
  .print-header {
    display: flex !important;
    align-items: center;
    gap: 16px;
    margin: 0 0 10mm;
    border-bottom: 2px solid var(--purple);
    padding-bottom: 6mm;
  }
  .print-photo {
    width: 26mm;
    height: 26mm;
    object-fit: cover;
    border: 2px solid var(--purple);
    flex-shrink: 0;
  }
  .print-header-text h1 { font-size: 20pt; margin: 0 0 2pt; }
  .print-role { font-size: 12pt; font-weight: 700; color: var(--purple); margin: 0 0 4pt; }
  .print-contact { font-size: 9.5pt; color: var(--text-dim); margin: 0; }
  .print-contact a { color: var(--text-dim) !important; }

  /* ---------- layout: strip decorative spacing ---------- */
  .hero { background: none !important; padding: 0 !important; }
  .hero-grid { display: block !important; }
  .hero-copy .lede { max-width: none; margin: 0 0 8pt; color: var(--text); }
  .tag-row { margin: 0 0 4mm; }

  .section,
  .section.alt {
    max-width: none !important;
    padding: 5mm 0 !important;
    background: none !important;
  }
  .section.alt > * { max-width: none; }

  .section h2 {
    font-size: 13pt;
    margin-bottom: 6pt;
    break-after: avoid;
    page-break-after: avoid;
  }
  h3 { break-after: avoid; page-break-after: avoid; }

  .about-grid { gap: 6mm; }
  .about-text p:first-child::first-letter { font-size: 1em; font-weight: inherit; float: none; }
  .fact-card { border: 1px solid var(--border); break-inside: avoid; page-break-inside: avoid; padding: 3mm 4mm; }

  /* ---------- skills ---------- */
  .skills-grid { gap: 4pt; }
  .skill-bar { break-inside: avoid; page-break-inside: avoid; }
  .bar-track { border-width: 1px; }

  /* ---------- timeline ---------- */
  .timeline { padding-left: 0; }
  .timeline-item {
    padding-left: 0;
    margin-bottom: 5mm;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .timeline-item.current .timeline-content {
    box-shadow: none;
    border: none;
    border-left: 3px solid var(--purple);
    padding-left: 8pt;
    margin: 0;
  }
  .timeline-top { gap: 5pt; margin-bottom: 3pt; }
  .level-badge { font-size: 7pt; }
  .timeline-date { font-size: 8.5pt; }
  .current-badge { color: #1a8f4c !important; background: none !important; padding: 0; }
  .timeline-content h3 { font-size: 11pt; }
  .timeline-org { margin-bottom: 3pt; }
  .timeline-content ul { margin-bottom: 4pt; }

  .stack-chips .chip { border-width: 1px; padding: 1pt 6pt; font-size: 7.5pt; }
  .stack-chips .chip.loot { border-width: 1px; }
}
