@page {
  margin: 17mm 16mm 18mm;
}

@media print {
  html,
  body {
    width: auto;
    min-height: 0;
    background: #fff !important;
    color: #111 !important;
    font-size: 10pt;
    line-height: 1.4;
    -webkit-print-color-adjust: economy;
    print-color-adjust: economy;
  }

  #site-nav,
  .nav-toggle,
  #bg-canvas,
  .scroll-cue,
  .hero-actions,
  .hero-social,
  .affiliations,
  .filter-bar,
  .pub-actions,
  .pub-toggle,
  .lightbox-prev,
  .lightbox-next,
  .lightbox-close,
  #lightbox,
  #gallery,
  #contact-form,
  .footer-social,
  .back-to-top,
  .pause-motion,
  .grecaptcha-badge {
    display: none !important;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
    background-image: none !important;
  }

  .container {
    max-width: none !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .section,
  #hero {
    min-height: 0 !important;
    padding: 7mm 0 !important;
    border: 0 !important;
    background: #fff !important;
  }

  .section + .section {
    border-top: 0.5pt solid #b7b7b7 !important;
  }

  .section-head {
    max-width: none !important;
    margin: 0 0 5mm !important;
    text-align: left !important;
  }

  .section-head p {
    margin-top: 2mm;
  }

  h1,
  h2,
  h3,
  h4 {
    color: #000 !important;
    break-after: avoid;
    page-break-after: avoid;
  }

  h1 {
    font-size: 24pt !important;
  }

  h2 {
    font-size: 17pt !important;
    margin-bottom: 3mm !important;
  }

  h3 {
    font-size: 12pt !important;
  }

  p,
  li,
  .stat-label,
  .timeline-dates,
  .pub-venue,
  .collab-name,
  .loc {
    color: #222 !important;
  }

  a,
  a:visited {
    color: #111 !important;
    text-decoration: underline;
    overflow-wrap: anywhere;
  }

  img {
    max-width: 100% !important;
    height: auto !important;
  }

  .hero-inner {
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    gap: 7mm !important;
    align-items: start !important;
  }

  .hero-panel {
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
  }

  .hero-portrait-wrap img,
  .hero-visual img {
    width: 34mm !important;
    max-height: 52mm !important;
    object-fit: cover;
    border: 0.5pt solid #999 !important;
    border-radius: 0 !important;
  }

  .grid-2,
  .grid-3,
  .grid-4,
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 4mm !important;
  }

  .credential-card,
  .card,
  .pub-item,
  .stat-tile,
  .project-card {
    padding: 3mm !important;
    border: 0.5pt solid #b7b7b7 !important;
    border-radius: 0 !important;
    background: #fff !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .credential-badge {
    max-width: 12mm !important;
    max-height: 12mm !important;
  }

  .stat-tile {
    min-height: 0 !important;
  }

  .stat-icon {
    font-size: 13pt !important;
  }

  .stat-value {
    font-size: 20pt !important;
  }

  .timeline {
    margin: 0 !important;
    padding-left: 6mm !important;
  }

  .timeline::before,
  .timeline-item::before {
    background: #666 !important;
  }

  .timeline-item {
    margin: 0 0 4mm !important;
    padding: 0 0 4mm 5mm !important;
    border-bottom: 0.5pt solid #d0d0d0;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .timeline-item:last-child {
    border-bottom: 0;
  }

  .pub-item[hidden],
  .pub-abstract,
  .project-details {
    display: block !important;
  }

  .pub-abstract,
  .project-details {
    max-height: none !important;
    opacity: 1 !important;
    margin-top: 2mm !important;
  }

  .collab-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  .collab img {
    width: 18mm !important;
    height: 18mm !important;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }

  #site-footer {
    padding: 5mm 0 0 !important;
    color: #333 !important;
    border-top: 0.5pt solid #b7b7b7;
  }

  /* Document typography and neutral ink palette, independent of screen tokens. */
  :root {
    --color-text: #202020;
    --color-text-muted: #444;
    --color-text-faint: #555;
    --color-accent: #263d35;
    --space-8: 6mm;
    --space-9: 8mm;
  }

  body {
    font-family: Georgia, "Times New Roman", serif !important;
    font-size: 10.5pt !important;
    line-height: 1.5 !important;
  }

  html, body, main, .section {
    overflow: visible !important;
    height: auto !important;
  }

  p, li { orphans: 3; widows: 3; }
  p { margin: 0 0 2mm; }
  h1, h2, h3, h4, .eyebrow, .credential-dates, .timeline-dates {
    font-family: Arial, Helvetica, sans-serif !important;
    letter-spacing: normal !important;
    line-height: 1.3 !important;
  }
  h2 { font-size: 16pt !important; }
  h4 { font-size: 11pt !important; margin: 0 0 1mm !important; }
  .eyebrow { font-size: 8pt !important; letter-spacing: .12em !important; margin-bottom: 2mm !important; }
  .section-head { break-inside: avoid; break-after: avoid; }
  .section-head p { font-size: 10pt !important; max-width: none; }
  a, a:visited { text-decoration: none; }

  canvas, dialog, .floating-page-controls, #motion-toggle,
  .hero-bottom, .affiliation-strip, .portrait-side-note, .portrait-caption,
  .footer-explore, .identity-note, .contact-extras, .status-dot,
  .project-expand-hint, .spinner {
    display: none !important;
  }
  #hero::before, #hero::after, .section::before, .section::after,
  .section-head::after, .portrait-composition::before,
  .credential-card::before, .credential-card::after,
  .timeline::before, .timeline-item::before, .timeline-item::after {
    display: none !important;
  }
  .reveal, .pub-item, .portrait-composition {
    transform: none !important;
    opacity: 1 !important;
    filter: none !important;
    visibility: visible !important;
  }

  #hero { padding-top: 0 !important; border-bottom: 1pt solid #263d35 !important; }
  .hero-inner { text-align: left !important; grid-template-columns: minmax(0, 1fr) 32mm !important; }
  #hero-title { font-size: 23pt !important; line-height: 1.15 !important; margin: 0 0 4mm !important; }
  .hero-role { font-size: 8pt !important; margin: 0 0 3mm !important; }
  .hero-tagline { font-size: 10.5pt !important; line-height: 1.5 !important; max-width: none !important; }
  .hero-location { margin-top: 3mm !important; font-size: 8.5pt !important; }
  .hero-motto { margin: 3mm 0 !important; padding-left: 3mm; border-color: #999; }
  .hero-motto p { font-size: 10pt !important; }
  .hero-visual, .portrait-composition, .portrait-frame {
    display: block !important;
    padding: 0 !important;
    width: 32mm !important; margin: 0 !important; min-height: 0 !important;
    aspect-ratio: auto !important; background: transparent !important;
    break-inside: avoid;
  }
  .hero-visual img { display: block; width: 32mm !important; height: 43mm !important; }

  /* Normal block flow allows reliable pagination and preserves chronology. */
  .job-history, .credential-stack, .credential-timeline,
  .timeline-cols, .timeline.societies-timeline, #pub-list {
    display: block !important; padding: 0 !important; margin: 0 0 5mm !important;
  }
  .card, .pub-item, .project-card, .job-history > .credential-card {
    min-height: 0 !important;
    border: 0 !important;
    border-bottom: .5pt solid #ddd !important;
    padding: 3mm 0 !important;
    margin: 0 0 2mm !important;
  }
  .credential-card { display: flex !important; align-items: flex-start !important; gap: 4mm !important; }
  .credential-card > div { min-width: 0; }
  .credential-badge { flex: 0 0 10mm; width: 10mm !important; object-fit: contain; }
  .credential-card .where, .credential-card .loc { font-size: 9.5pt !important; margin-bottom: 1mm !important; }
  .credential-dates, .timeline-dates { font-size: 8.5pt !important; margin-bottom: 1mm !important; }
  .timeline, .timeline-item { padding-left: 0 !important; border-left: 0 !important; }
  .timeline-item { padding-bottom: 3mm !important; margin-bottom: 3mm !important; }
  .reviewer-list, .course-list { columns: 2; column-gap: 7mm; }
  .reviewer-conferences { text-align: left; }
  #teaching .course-title { white-space: normal !important; font-size: 10pt !important; }
  #teaching .course-details { font-size: 8.5pt !important; line-height: 1.4 !important; }

  .pub-item, .project-card { break-inside: auto; page-break-inside: auto; }
  .pub-top { break-after: avoid; }
  .pub-title { font-size: 11pt !important; }
  .pub-badge { font: 7pt Arial, sans-serif !important; padding: 1mm 2mm; border-color: #999; }
  .pub-authors, .pub-venue { font-size: 9pt !important; break-after: avoid; }
  .pub-abstract, .project-details {
    height: auto !important; overflow: visible !important;
    font-size: 9.5pt !important; line-height: 1.5 !important;
    border: 0 !important; padding: 2mm 0 0 !important;
  }
  .pub-links { display: none !important; }
  .project-card > img { width: 30mm !important; max-height: 22mm !important; object-fit: contain; }
  .project-body { padding: 2mm 0 !important; }
  .stat-value { font-variant-numeric: tabular-nums; }
  .stat-value[data-count] { font-size: 0 !important; }
  .stat-value[data-count]::after { content: attr(data-count); font-size: 20pt; }
  .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
  .stat-label { font-size: 8.5pt !important; }
  .contact-layout { display: block !important; }
  .contact-email { font-size: 12pt !important; }
  #site-footer { background: #fff !important; font-size: 8pt !important; text-align: left; }

  /* Keep highlights, tags and decorative text fills off the printed page. */
  body *,
  body *::before,
  body *::after {
    background-color: transparent !important;
    background-image: none !important;
    color: #222 !important;
    -webkit-text-fill-color: currentColor !important;
    -webkit-text-stroke-width: 0 !important;
    text-shadow: none !important;
    box-shadow: none !important;
    -webkit-print-color-adjust: economy !important;
    print-color-adjust: economy !important;
  }

  body h1, body h2, body h3, body h4,
  body strong, body b {
    color: #000 !important;
  }

  body mark {
    font-weight: 700;
    padding: 0;
  }

  /* Override the alternate section fills and the contact-specific background. */
  html body main > section.section.alt,
  html body #facts,
  html body #talks,
  html body #panels,
  html body #teaching,
  html body #contact,
  html body #contact-form,
  html body #contact-form .field input,
  html body #contact-form .field textarea {
    background: #fff !important;
    background-image: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  html body main > section.section.alt::before,
  html body main > section.section.alt::after,
  html body .nav-backdrop {
    display: none !important;
  }

  /* Separate entries with whitespace rather than screen-style boxes. */
  body .card,
  body .job-history > .credential-card,
  body .stat-tile,
  body .pub-item,
  body .timeline-item,
  body .chip,
  body .tag,
  body .pub-badge,
  body .country-stamp,
  body .credential-badge,
  body .teaching-institute h3 img,
  body #hero-photo {
    border: 0 !important;
    outline: 0 !important;
    border-radius: 0 !important;
  }

  body .pub-badge { padding: 0 !important; }
  body .stat-tile { padding: 2mm 0 !important; }
}
