/* ============================================================
   PRINT STYLESHEET — 8.5 × 11 in (US Letter)
   Applied via media="print".
   Design tokens from theme.css still apply.
   ============================================================ */

@page {
  size: letter;
  margin: 1in;
}

/* --- HIDE INTERACTIVE ELEMENTS --- */
.site-header,
.site-sidebar,
.reading-list,
.bookmark-btn,
.expand-btn,
.entry-footer,
.entry-preview,
.print-modal-overlay,
.entry-tags,
.no-print {
  display: none !important;
}

/* --- BASE --- */
body {
  font-size: var(--print-font-size);
  line-height: var(--print-line-height);
  color: #000;
  background: #fff;
}

.layout {
  display: block;
  max-width: none;
}

.content {
  max-width: none;
  padding: 0;
}

/* --- INTRO --- */
.dossier-intro {
  margin-bottom: 1.5em;
  padding-bottom: 1em;
  border-bottom: 1pt solid #000;
  page-break-after: avoid;
}

.dossier-intro h1 {
  font-size: 16pt;
}

.dossier-intro .subtitle {
  font-size: 11pt;
  color: #333;
}

/* --- SECTIONS --- */
.dossier-section > h2 {
  font-size: 13pt;
  border-bottom: 1pt solid #000;
  margin-bottom: 0.75em;
  padding-bottom: 0.25em;
  page-break-after: avoid;
}

.subsection h3 {
  font-size: 11pt;
  page-break-after: avoid;
}

/* --- ENTRIES --- */
.entry {
  border: none;
  border-bottom: 0.5pt solid #ccc;
  border-radius: 0;
  padding: 0.5em 0;
  margin-bottom: 0.5em;
  page-break-inside: avoid;
}

.entry:hover {
  border-color: #ccc;
}

.entry-title {
  font-size: var(--print-font-size);
}

.entry-meta {
  font-size: 9pt;
  color: #555;
}

/* In print: show all body content expanded, hide interactive elements */
.entry-body {
  font-size: var(--print-font-size);
  max-height: none !important;
  overflow: visible !important;
  opacity: 1 !important;
}

.entry-preview {
  display: none !important; /* hide thumbnail preview in print — body has full text */
}

.expand-btn,
.entry-footer {
  display: none !important;
}

.entry-thumb-placeholder {
  display: none !important;
}

.entry-body figure {
  margin: 0.5em 0;
  page-break-inside: avoid;
}

.entry-body figure img,
.entry-body figure video {
  max-width: 100%;
  max-height: 3in;
}

.entry-body figcaption {
  font-size: 8pt;
  color: #555;
  font-style: italic;
}

/* --- TABLES --- */
.compact-table {
  font-size: 9.5pt;
}

.compact-table th,
.compact-table td {
  padding: 0.25em 0.5em;
}

/* --- READING LIST PRINT MODE --- */
/* When printing reading list only, hide non-bookmarked entries */
body.print-reading-list .entry:not(.bookmarked) {
  display: none !important;
}

body.print-reading-list .subsection:not(:has(.entry.bookmarked)) {
  display: none !important;
}

body.print-reading-list .dossier-section:not(:has(.entry.bookmarked)) {
  display: none !important;
}

/* Print header for reading list mode */
.print-reading-list-header {
  display: none;
}

body.print-reading-list .print-reading-list-header {
  display: block;
  font-family: var(--font-heading);
  font-size: 10pt;
  color: #555;
  margin-bottom: 1em;
  font-style: italic;
}

/* --- CV SECTION ---
   Typography matched to CV-Styles.html (Kappenstein-CV-2026-2-STYLED.docx):
   Georgia throughout. Title 12pt bold #bd3b17, H1 8.5pt bold #757679,
   H2 8.5pt bold #bd3b17, H3 8.5pt regular #231f20, Normal/H4 7.5pt
   regular #57585a, H5 8.5pt italic #231f20. Line spacing 1.11×.
   ------------------------------------------------------------ */

.cv-section {
  margin-bottom: 1.5em;
  page-break-inside: avoid;
}

/* H1 equivalent — section headers like "Academic History" */
.cv-section-title {
  font-family: Georgia, serif;
  font-size: 8.5pt;
  font-weight: bold;
  color: #757679;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.75em;
  padding-top: 1em;
  border-top: 0.5pt solid #ccc;
  page-break-after: avoid;
}

/* H2 equivalent — subsection headers like "Education" */
.cv-subsection-title {
  font-family: Georgia, serif;
  font-size: 8.5pt;
  font-weight: bold;
  color: #bd3b17;
  margin-bottom: 0.5em;
  page-break-after: avoid;
}

/* Normal/H4 — body text in cv entries */
.cv-entry {
  display: grid;
  grid-template-columns: 90pt 1fr;
  gap: 0.25em 0.75em;
  margin-bottom: 0.35em;
  font-family: Georgia, serif;
  font-size: 7.5pt;
  line-height: 1.11;
  color: #57585a;
  page-break-inside: avoid;
}

/* H3 equivalent — entry titles (strong text inside cv-content) */
.cv-content strong {
  font-family: Georgia, serif;
  font-size: 7.5pt;
  font-weight: normal;
  color: #231f20;
}

.cv-year {
  font-family: Georgia, serif;
  font-size: 7.5pt;
  color: #231f20;
  white-space: nowrap;
}

.cv-content {
  font-family: Georgia, serif;
  font-size: 7.5pt;
  color: #57585a;
}

.cv-desc {
  font-family: Georgia, serif;
  font-size: 7pt;
  color: #57585a;
  line-height: 1.11;
  margin-top: -0.15em;
  margin-bottom: 0.25em;
}

/* H5 equivalent — italic subheadings */
.cv-subheading {
  font-family: Georgia, serif;
  font-size: 8.5pt;
  font-style: italic;
  font-weight: normal;
  color: #231f20;
}

/* Tighten the CV subsection wrapper */
.cv-subsection {
  margin-bottom: 0.75em;
}

/* --- LINKS --- */
a {
  color: #000;
  text-decoration: none;
}

/* --- PAGE BREAKS --- */
.dossier-section {
  page-break-before: auto;
}

.dossier-section:first-of-type {
  page-break-before: avoid;
}
