/* ==========================================================================
   Print — turn the site into a clean black-on-white document.

   The screen version is animated and full of chrome (nav, menu, the metal
   intro, scroll cues, interactive demos); none of that belongs on paper. The
   project case studies are the real target — a recruiter prints or PDFs a
   write-up — so those come out as tidy documents. The home page is linearised
   best-effort: its sticky-scrub and horizontal reel are collapsed back into
   normal top-to-bottom flow. Loaded with media="print", so it costs nothing on
   screen.
   ========================================================================== */

@page { margin: 18mm 15mm; }

/* Undo the motion system: reveal everything scroll animation hides, stop all
   transforms/animation, and drop the whole thing to ink-on-white. display:none
   (below) still wins over these, so chrome stays hidden. */
*, *::before, *::after {
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
  transition: none !important;
  background: transparent !important;
  box-shadow: none !important;
  text-shadow: none !important;
  color: #111 !important;
  filter: none !important;
}
html, body { background: #fff !important; }
body { font-size: 11pt; line-height: 1.5; }

/* Screen chrome and things that can't print. */
#nav, .nav, #menu, #intro, .intro, #transition,
.hero__scrollcue, .hero__media, .hero__traces,
canvas, [data-zhong],
.themes, .menu__themes,
.kmeans, .guitar__strings, .guitar__keys, .guitar__panel, .guitar__hint {
  display: none !important;
}

/* Collapse sticky / horizontal-scroll layouts into normal flow. */
.hero, .hero__sticky, .hero__content,
.reel, .reel__stage, .reel__sticky, .reel__lift, .reel__item,
.rail, .rail__sticky, .rail__pane,
section {
  position: static !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  width: auto !important;
  overflow: visible !important;
  visibility: visible !important;
  clip-path: none !important;
}
.reel__item, .rail__pane {
  display: block !important;
  margin: 0 0 10mm !important;
  page-break-inside: avoid;
}

/* Keep figures, code, and metric blocks whole across page breaks. */
figure, img, .project__fig, .project__code, .project__data,
.project__metric, .project__block { page-break-inside: avoid; }
img { max-width: 100% !important; height: auto !important; }
h1, h2, h3 { page-break-after: avoid; }

/* Links: spell out external destinations so a printout stands on its own. */
a { text-decoration: underline; }
a[href^="http"]::after {
  content: " (" attr(href) ")";
  font-size: .85em;
  color: #555 !important;
  word-break: break-all;
}
