/* Print stylesheet — clean PDF export of the academic profile.
   Hides chrome (sidenav, language toggle, tweaks panel) and reflows
   the document into a single readable column. */

@media print {
  @page {
    size: A4;
    margin: 18mm 16mm 18mm 16mm;
  }

  html, body {
    background: #fff !important;
    color: #111 !important;
    font-size: 10.5pt;
    line-height: 1.45;
  }

  /* Hide UI chrome */
  .topbar,
  .sidenav,
  .twk-panel,
  .lang,
  [data-tweaks-toolbar],
  .footer button {
    display: none !important;
  }

  /* Reflow shell into single column */
  .shell {
    display: block !important;
    padding: 0 !important;
  }
  .main {
    max-width: 100% !important;
    padding-bottom: 0 !important;
    gap: 28pt !important;
  }

  /* Hero: portrait centered, smaller */
  .hero {
    page-break-after: avoid;
    padding: 0 0 24pt !important;
    border-bottom: 0.5pt solid #999 !important;
    margin-bottom: 28pt;
  }
  .hero[data-layout="portrait"] .hero-photo,
  .hero-photo {
    max-width: 90pt !important;
    aspect-ratio: 1/1 !important;
    border-radius: 50% !important;
    margin: 0 auto 14pt !important;
  }
  .hero-name {
    font-size: 28pt !important;
    text-align: center !important;
  }
  .hero-eyebrow {
    font-size: 8pt !important;
    margin-bottom: 14pt !important;
  }
  .hero-titles { text-align: center; font-size: 10.5pt; }

  /* Section heads */
  .section {
    page-break-inside: auto;
    break-inside: auto;
    margin-bottom: 0 !important;
  }
  .section-head {
    page-break-after: avoid;
    border-bottom: 0.5pt solid #999;
    padding-bottom: 4pt;
    margin-bottom: 12pt;
  }
  .section-title {
    font-size: 18pt !important;
    color: #111 !important;
  }
  .section-num {
    color: #555 !important;
    font-size: 8pt !important;
  }

  /* Metrics: 4x3 stays */
  .metrics-grid { border-color: #999 !important; }
  .metric .num { font-size: 22pt !important; color: #111 !important; }
  .metric .lbl { font-size: 7.5pt !important; }

  /* Lists: keep year-on-left rhythm but compact */
  .pub-list li,
  .projects-list li,
  .awards-list li,
  .thesis-list li,
  .news li,
  .roles li,
  .chapter-list li,
  .courses li,
  .cert-list li {
    padding: 6pt 0 !important;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .pub-title,
  .course-name,
  .awards-list .ttl,
  .books-authored .ttl,
  .timeline .title {
    font-size: 11pt !important;
    color: #111 !important;
  }
  .pub-authors, .pub-venue, .pub-index,
  .timeline .where, .awards-list .where,
  .thesis-list .student {
    font-size: 9pt !important;
    color: #444 !important;
  }
  .pub-year, .yr, .news-date, .timeline .years {
    color: #555 !important;
    font-size: 9pt !important;
  }

  /* Books cards: keep clean */
  .books-authored {
    grid-template-columns: 1fr 1fr !important;
    gap: 10pt !important;
  }
  .books-authored li {
    background: transparent !important;
    border: 0.5pt solid #999 !important;
    padding: 10pt !important;
  }

  /* SDG pills */
  .sdg-pill {
    background: transparent !important;
    border: 0.5pt solid #999 !important;
    padding: 3pt 6pt !important;
    font-size: 9pt !important;
  }
  .sdg-pill .n { color: #555 !important; }

  /* Office hours */
  .hours > div { padding: 8pt 0 !important; }
  .hours .day { font-size: 14pt !important; color: #111 !important; }
  .hours .time { color: #444 !important; }

  /* Contact: keep two columns, smaller */
  .contact-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 18pt !important;
  }
  .contact-block .lbl { color: #555 !important; }
  .contact-block address div, .contact-block .links a { font-size: 10pt !important; }

  /* Accent: keep red as ink-emphasis (printers handle this fine) */
  .pub-year, .pub-index, .yr, .news-date,
  .timeline .years, .timeline .title em,
  .awards-list .yr, .roles .yr, .roles .role + .where,
  .metric .num, .sdg-pill .n {
    /* Already styled via accent — keep their values */
  }

  /* Force-show all anchors */
  a, a:link, a:visited { color: #111 !important; text-decoration: none !important; border: 0 !important; }

  /* Page breaks between major sections */
  #publications, #books, #projects, #advising, #teaching, #awards, #education, #roles, #contact {
    page-break-before: auto;
  }

  /* Hide drop cap in print — looks awkward */
  .prose p:first-of-type::first-letter {
    font-size: inherit !important;
    color: inherit !important;
    float: none !important;
    padding: 0 !important;
  }

  /* Footer */
  .footer {
    margin-top: 24pt !important;
    padding: 8pt 0 !important;
    font-size: 8pt !important;
    color: #555 !important;
    border-top: 0.5pt solid #999 !important;
  }
}
