/* The résumé as paper (templates/resume.html). White US Letter in every design and both color schemes: it is a sheet
   lying on the page, not part of the page. Sizes are in points and inches so the screen and the printed PDF set the
   same lines; js/paper.js deals the content onto Letter pages on wide screens. Fonts are static instances (not
   variable) so Chrome embeds them as real text fonts in the PDF, which résumé parsers read. */

@font-face { font-family: "Paper Serif"; src: url("../fonts/paper/source-serif-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Paper Serif"; src: url("../fonts/paper/source-serif-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Paper Serif"; src: url("../fonts/paper/source-serif-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Paper Sans"; src: url("../fonts/paper/source-sans-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Paper Sans"; src: url("../fonts/paper/source-sans-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

.paper {
  --ink: #1b1b1b;
  --ink-2: #4a4a4a;
  --ink-3: #6b6b6b;
  --accent: #23415f;
  --rule: #c9c9c9;
  --serif: "Paper Serif", Georgia, "Times New Roman", serif;
  --sans: "Paper Sans", "Helvetica Neue", Arial, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  padding: 28px 16px 72px;
  color-scheme: light;
}

/* The row above the paper (each design's Download PDF and the like), lined up with the sheet's edges. */
main > .paper-intro { box-sizing: border-box; width: min(100% - 32px, 8.5in); margin: 0 auto; padding: 32px 0 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }

.paper .sheet {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  max-width: 8.5in;
  padding: clamp(22px, 6vw, 0.6in);
  background: #fff;
  color: var(--ink);
  border-radius: 2px;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.18), 0 10px 30px rgb(0 0 0 / 0.22), 0 0 0 1px rgb(0 0 0 / 0.06);
  font: 400 9.75pt/1.38 var(--serif);
  text-align: left;
  overflow-wrap: break-word;
}
/* Paged (js/paper.js, wide screens): each sheet is a whole Letter page, its body the fixed text area above the folio. */
.paper.is-paged .sheet { width: 8.5in; height: 11in; padding: 0.6in; }
.paper.is-paged .sheet-body { height: 9.45in; overflow: hidden; }

.paper .sheet * { box-sizing: border-box; }
.paper .sheet :where(h1, h2, h3, h4, p, ul, li) { margin: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; letter-spacing: normal; text-transform: none; }
.paper .sheet :where(h1, h2, h3, h4)::before, .paper .sheet :where(h1, h2, h3, h4)::after { content: none; }
.paper .sheet a { color: inherit; text-decoration: none; background: none; border: 0; }
.paper .sheet a:hover { text-decoration: underline; text-underline-offset: 2px; }
.paper .sheet a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.paper .sheet strong { font-weight: 600; color: var(--ink); }

/* Header: name, title, one line of contacts, a rule. */
.paper .sheet .rp-head { text-align: center; padding-bottom: 9pt; border-bottom: 1.25pt solid var(--ink); margin-bottom: 2pt; }
.paper .sheet .rp-name { font: 600 24pt/1.1 var(--serif); letter-spacing: 0.01em; color: var(--ink); }
.paper .sheet .rp-title { margin-top: 3pt; font: 400 9.5pt/1.3 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-2); }
.paper .sheet .rp-contact { margin-top: 6pt; font: 400 9pt/1.4 var(--sans); color: var(--ink-2); }
.paper .sheet .rp-sep { margin: 0 0.5em; color: var(--ink-3); }

/* Section headings: small spaced capitals in the one accent color, over a hairline. */
.paper .sheet .rp-h { margin: 13pt 0 7pt; padding-bottom: 2.5pt; border-bottom: 0.75pt solid var(--rule); font: 600 9pt/1.2 var(--sans); letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); }

/* A job: role and dates on one line, company under it in italic. */
.paper .sheet .rp-job + .rp-job { margin-top: 12pt; }
.paper .sheet :is(.rp-job-head, .rp-edu) { display: grid; grid-template-columns: 1fr auto; column-gap: 12pt; align-items: baseline; }
.paper .sheet .rp-edu + .rp-edu { margin-top: 6pt; }
.paper .sheet .rp-role { font: 600 10.5pt/1.3 var(--sans); color: var(--ink); }
.paper .sheet .rp-place { font-weight: 400; color: var(--ink-2); }
.paper .sheet .rp-when { font: 400 9pt/1.3 var(--sans); color: var(--ink-2); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.paper .sheet .rp-org { grid-column: 1 / -1; font: italic 400 9.75pt/1.35 var(--serif); color: var(--ink-2); }
.paper .sheet .rp-over { margin: 3pt 0 1pt; font-size: 9.25pt; color: var(--ink-2); }

.paper .sheet .rp-gh { margin: 6pt 0 2pt; font: 600 8.25pt/1.3 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.paper .sheet .rp-list { padding-left: 13pt; list-style: disc outside; }
.paper .sheet .rp-list > li { display: list-item; margin: 0 0 1.75pt; padding-left: 1pt; }
.paper .sheet .rp-list > li::marker { color: var(--ink-3); font-size: 0.85em; }
.paper .sheet .rp-tech { margin-top: 5pt; font: 400 8.75pt/1.4 var(--sans); color: var(--ink-2); }
.paper .sheet .rp-tech strong { font-weight: 600; color: var(--ink-2); }

/* The folio js/paper.js adds to each page when there is more than one. */
.paper .sheet .sheet-foot { position: absolute; left: 0.6in; right: 0.6in; bottom: 0.6in; display: flex; justify-content: space-between; font: 400 7.75pt/1 var(--sans); letter-spacing: 0.04em; color: var(--ink-3); }

@media (max-width: 640px) {
  .paper { padding: 16px 0 48px; gap: 20px; }
  .paper .sheet .rp-name { font-size: 21pt; }
  .paper .sheet .rp-contact { display: flex; flex-direction: column; gap: 2pt; }
  .paper .sheet .rp-sep { display: none; }
  .paper .sheet :is(.rp-job-head, .rp-edu) { grid-template-columns: 1fr; }
  .paper .sheet .rp-when { text-align: left; }
}

/* Print: only the paper. Paged sheets print one per page with the same text area as the screen; unpaged (printed
   from a phone or with the script off), the browser breaks pages itself. */
@page { size: letter; margin: 0.6in; }
@media print {
  body:has([data-paper]) > :not(main) { display: none !important; }
  main:has(> [data-paper]) > :not([data-paper]) { display: none !important; }
  html:has([data-paper]), body:has([data-paper]), main:has(> [data-paper]) { background: #fff !important; color: #000 !important; margin: 0 !important; padding: 0 !important; max-width: none !important; min-height: 0 !important; border: 0 !important; box-shadow: none !important; }
  .paper { display: block; padding: 0; gap: 0; }
  .paper .sheet, .paper.is-paged .sheet { width: auto; max-width: none; height: auto; padding: 0; margin: 0; border-radius: 0; box-shadow: none; }
  .paper.is-paged .sheet { height: 9.79in; break-after: page; }
  .paper.is-paged .sheet:last-child { break-after: auto; }
  .paper .sheet .sheet-foot { left: 0; right: 0; bottom: 0; }
  .paper .sheet a:hover { text-decoration: none; }
  .paper:not(.is-paged) :is(.rp-list > li, .rp-job-head, .rp-edu, .rp-tech) { break-inside: avoid; }
  .paper:not(.is-paged) :is(.rp-h, .rp-gh, .rp-job-head, .rp-over) { break-after: avoid; }
}
