/* ===== Print Styles (US Letter, High-Contrast) ===== */

/* Default print variables */
:root {
  --photo-height: 100px;  /* default print headshot size */
  --photo-width: auto;
  --link: #0b5fff;        /* keep links blue for contrast if printed in color */
}

/* Page setup */
@page {
  size: Letter;
  margin: 8mm;            /* tight margins to help fit one page */
}

/* High-contrast print defaults (Helvetica, 12pt minimum) */
html, body {
  color: #000 !important;
  background: #fff !important;
  font-family: Helvetica, Arial, sans-serif !important;
  font-size: 12pt !important;   /* minimum 12pt */
  line-height: 1.35;
  margin: 0;
  padding: 0;
}

.page { max-width: 100% !important; margin: 0 !important; }

/* Preserve mobile-friendly stacking logic in print */
.top-container {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important; /* two columns on print */
  gap: 6mm !important;
  margin-bottom: 8mm !important;
}

/* Headshot uses same vars; smaller by default in print */
.right-column img,
.large-photo {
  max-width: 100% !important;
  width: var(--photo-width) !important;
  height: var(--photo-height) !important;
  display: block;
  border: 0 !important;
  border-radius: 0 !important;
  object-fit: cover;
}

/* Type hierarchy (compact) */
h1 {
  font-size: 16pt;
  line-height: 1.2;
  margin: 0 0 4pt 0;
  color: #000 !important;
}
h2 {
  font-size: 13pt;
  line-height: 1.2;
  margin: 8pt 0 4pt 0;
  border: 0 !important;
  padding: 0 !important;
  color: #000 !important;
}

p, li, address {
  font-size: 12pt;
  margin: 0 0 3pt 0;
}
ul {
  padding-left: 16pt;
  margin: 3pt 0 6pt 0;
}
address { white-space: pre-line; }

/* Links: keep blue for contrast (if printed in color). Show URLs after text. */
a { color: var(--link) !important; text-decoration: underline; }
a[href^="http"]:after,
a[href^="mailto:"]:after,
a[href^="tel:"]:after {
  content: " (" attr(href) ")";
  font-size: 10pt;
}

/* Avoid awkward page breaks */
section, h1, h2, ul, p, address { page-break-inside: avoid; }
.top-container, .content {
  page-break-before: avoid;
  page-break-after: avoid;
}

/* Remove decorative effects when printing */
* {
  background: transparent !important;
  box-shadow: none !important;
  text-shadow: none !important;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

/* ===== Utility Classes for Print ===== */

/* High-contrast container remains enforced */
.hc {
  font-family: Helvetica, Arial, sans-serif !important;
  color: #000 !important;
  font-size: 12pt !important;
  line-height: 1.35;
}

/* Optional: shrink fonts just enough to fit a single page when needed.
   Apply this class to your main wrapper, e.g. <main class="page fit-print"> */
.fit-print {
  font-size: 11pt !important;          /* gentle global shrink */
  line-height: 1.3 !important;
}
.fit-print h1 { font-size: 15pt !important; }
.fit-print h2 { font-size: 12pt !important; }
.fit-print p,
.fit-print li,
.fit-print address { font-size: 11pt !important; }

/* Optional: slightly reduce the headshot in fit mode */
.fit-print .large-photo,
.fit-print .right-column img {
  --photo-height: 90px;
}