/* ============================================================================
   Résumé documents — a white, flowing, printable page.

   On screen: a letter-width sheet floating on the site's dark ground, sized in
   rem so it scales with the reader's browser font-size preference.
   On paper and in the generated PDF: the sheet *is* the page, and the type
   switches to points so the printed measure is exact.
   The prototype's <doc-page> pagination component is replaced by the print
   engine itself — no JavaScript is involved.
   ========================================================================= */

.resume-toolbar {
  max-width: 53.125rem; /* 8.5in at the default font size */
  margin: 0 auto;
  padding: 1.125rem 1rem 0.25rem;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.resume-toolbar .back-link {
  font-size: var(--fs-14);
  color: var(--color-accent-300);
  text-decoration: none;
  white-space: nowrap;
}
.resume-toolbar .back-link:hover { text-decoration: underline; }
.resume-toolbar .spacer { flex: 1; }
.resume-toolbar .role-label {
  font-size: var(--fs-13);
  color: var(--text-muted);
}

/* — the document — */
.doc {
  max-width: 53.125rem;
  margin: 0 auto 3.5rem;
  padding: 3.4375rem 3.4375rem; /* 0.55in at the default font size */
  background: #ffffff;
  color: #23242e;
  font-family: var(--font-body);
  font-size: 0.875rem;  /* 10.5pt */
  line-height: 1.45;
  border-radius: var(--radius-sm);
  box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.45);
}

.doc a {
  color: var(--color-accent-800); /* 10.3:1 on white; -700 is 6.8:1 */
  text-decoration: underline;
  text-underline-offset: 2px;
}
.doc a:hover { color: var(--color-accent-900); }

.doc-header {
  border-bottom: 2px solid var(--color-accent);
  padding-bottom: 0.5rem;
}
.doc-name {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1.75rem;   /* 21pt */
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0;
  color: #16171f;
}
.doc-role {
  margin: 0.3125rem 0 0;
  font-size: 0.79rem;   /* 9.5pt */
  color: var(--color-accent-800);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.doc-contact {
  margin: 0.3125rem 0 0;
  font-size: 0.79rem;   /* 9.5pt */
  color: #33354a; /* 12:1 on white */
}
.doc-summary {
  margin: 0.625rem 0 0;
  font-size: 0.917rem;  /* 11pt */
  color: #33354a;
}

.doc h2 {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.833rem;  /* 10pt */
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-accent-800);
  margin: 0.875rem 0 0.375rem;
  border-bottom: 1px solid #e2e2ea;
  padding-bottom: 0.25rem;
}
.doc-body { margin-top: 0.625rem; }
.doc-body > h2:first-child { margin-top: 0; }

/* A job block never splits across a page break. */
.doc-job {
  margin-bottom: 0.625rem;
  break-inside: avoid;
}
.doc-job h3 {
  margin: 0;
  font-size: 0.875rem;  /* 10.5pt */
  font-weight: 400;
  font-family: var(--font-body);
  line-height: 1.4;
  letter-spacing: 0;
  color: #23242e;
}
.doc-job h3 strong { font-weight: 600; }
.doc-job ul {
  margin: 0.1875rem 0 0;
  padding-left: 0.875rem;
}
.doc-job li { margin-bottom: 0.125rem; }

/* Compact two-column reference lists (standards, certifications, education). */
.doc-cols {
  margin: 0;
  padding-left: 0.875rem;
  font-size: 0.833rem;  /* 10pt */
  color: #33354a;
  columns: 2;
  column-gap: 1.75rem;
}
.doc-cols li { break-inside: avoid; }

/* Below roughly 40em the two-column reference lists become one column, and the
   sheet drops its paper padding — the document reflows like any other page. */
@media (max-width: 40em) {
  .doc { padding: 1.5rem 1.25rem; }
  .doc-cols { columns: 1; }
}

/* — print — */
@page {
  size: Letter portrait;
  margin: 0.55in;
}
@media print {
  .no-print { display: none !important; }
  html, body {
    background: #ffffff !important;
    color: #23242e;
  }
  .doc {
    max-width: none;
    margin: 0;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    /* Points on paper: the printed measure is fixed, so it is stated exactly. */
    font-size: 10.5pt;
    line-height: 1.3;
  }
  .doc-name { font-size: 21pt; }
  .doc-role, .doc-contact { font-size: 9.5pt; }
  .doc-summary { font-size: 11pt; }
  .doc h2 { font-size: 10pt; }
  .doc-job h3 { font-size: 10.5pt; line-height: 1.3; }
  .doc-cols { font-size: 10pt; columns: 2; }
  .doc a { color: var(--color-accent-800); }
}
