/* Resume page: print styles and resume-specific layout.
   resume.html is also the source of the canonical PDF (printed with headless
   Chrome on A4), so the print block below is the PDF's stylesheet.
   Base web styles for .resume-doc / .resume-item live in styles.css. */

/* ---------- Web ---------- */
.resume-actions {
  margin-top: var(--s-6);
}

/* Label-led lists (skills) read better without bullets. */
.resume-doc > section > ul {
  padding-left: 0;
  list-style: none;
}

.resume-doc > section > ul > li + li {
  margin-top: var(--s-2);
}

/* Long addresses in the contact line may break rather than overflow at 320px. */
.resume-doc__contact a {
  overflow-wrap: anywhere;
}

/* ---------- Print / PDF ---------- */
@media print {
  @page {
    size: A4;
    margin: 14mm 14mm 16mm;
  }

  /* Force a light palette even when the viewer has chosen the dark theme. */
  :root {
    color-scheme: light !important;
    --bg: #fff !important;
    --surface: #fff !important;
    --surface-2: #fff !important;
    --text: #000 !important;
    --text-muted: #000 !important;
    --border: #000 !important;
    --border-strong: #000 !important;
    --accent: #000 !important;
    --accent-hover: #000 !important;
  }

  html,
  body {
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
    color: #000 !important;
  }

  /* Only the resume document prints. */
  body > :not(main),
  .skip-link,
  .site-header,
  .site-footer,
  .page-head,
  .resume-actions,
  .gap,
  [data-gap],
  .no-print {
    display: none !important;
  }

  main > :not(.resume-doc):not(:has(.resume-doc)) {
    display: none !important;
  }

  main,
  main > .container {
    display: block;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0;
  }

  .resume-doc {
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    color: #000;
    font-family: var(--font-sans);
    font-size: 10pt;
    line-height: 1.35;
    text-rendering: auto;
    /* Keep every word as separate, extractable glyphs in the PDF. */
    font-variant-ligatures: none;
    font-feature-settings: "liga" 0, "clig" 0, "calt" 0;
  }

  .resume-doc * {
    color: #000 !important;
    background: transparent !important;
    box-shadow: none !important;
    letter-spacing: 0;
    font-variant-ligatures: none;
    font-feature-settings: "liga" 0, "clig" 0, "calt" 0;
  }

  /* Links: the visible text already shows the address. */
  .resume-doc a {
    color: #000 !important;
    text-decoration: none !important;
  }

  /* Header */
  .resume-doc__header {
    margin: 0 0 6pt;
  }

  .resume-doc__header h2 {
    margin: 0 0 2pt;
    padding: 0;
    border: 0;
    font-size: 20pt;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0;
    text-transform: none;
  }

  .resume-doc__role {
    margin: 0 0 2pt;
    font-size: 10.5pt;
    font-weight: 600;
  }

  .resume-doc__contact {
    margin: 0;
    font-size: 9.5pt;
  }

  /* Section headings */
  .resume-doc section > h2 {
    margin: 10pt 0 4pt;
    padding: 0 0 2pt;
    border: 0;
    border-bottom: 0.75pt solid #000;
    font-size: 9.5pt;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.05em;
    text-transform: uppercase;
  }

  .resume-doc h2,
  .resume-doc h3,
  .resume-item__row,
  .resume-item__sub {
    break-after: avoid;
    page-break-after: avoid;
  }

  .resume-doc h3 {
    margin: 0;
    font-size: 10.5pt;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0;
    text-wrap: wrap;
  }

  /* Text */
  .resume-doc p,
  .resume-doc ul {
    margin: 0 0 4pt;
  }

  .resume-doc ul {
    padding-left: 12pt;
  }

  .resume-doc > section > ul {
    padding-left: 0;
  }

  .resume-doc li + li,
  .resume-doc > section > ul > li + li {
    margin-top: 1.5pt;
  }

  .resume-doc strong {
    font-weight: 700;
  }

  .resume-doc p,
  .resume-doc li {
    orphans: 3;
    widows: 3;
  }

  .resume-doc li {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  /* Entries */
  .resume-item {
    margin: 0 0 7pt;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .resume-item__row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 0 12pt;
  }

  .resume-item__row span {
    font-size: 9.5pt;
    white-space: nowrap;
  }

  .resume-item__sub {
    margin: 0 0 2pt;
    font-style: italic;
  }

  .resume-item ul {
    margin-bottom: 0;
  }

  .resume-doc > section:last-child > :last-child {
    margin-bottom: 0;
  }
}
