/* natecv.com resume page.
   Tokens and fonts match assets/site.css. Change a token there first, then mirror it here.
   One column, plain text, so a parser reads it in order. Screen first, print at the end. */

@font-face { font-family: "Source Serif 4"; src: url("../fonts/woff2/SourceSerif4-Variable.v2.woff2") format("woff2"); font-weight: 400 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("../fonts/woff2/SourceSans3-Variable.v2.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }

:root {
  --serif: "Source Serif 4", ui-serif, Georgia, serif;
  --sans: "Source Sans 3", ui-sans-serif, system-ui, sans-serif;

  --onyx: #141414;
  --parchment: #F8F6F1;
  --pollen: #FFCF70;
  --willow: #A4CC8F;
  --fuchsia: #FF3366;

  --paper: var(--parchment);
  --ink-strong: var(--onyx);
  --ink: #2B2923;
  --ink-body: #45423B;
  --ink-muted: #66635C;
  --outline: #DEDAD3;
  --outline-strong: #AEAAA4;
  --outline-control: #838078;
  --state-ink: #C71E4C;

  --frame: clamp(20px, 5vw, 80px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scrollbar-color: var(--outline-strong) var(--paper); }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-body);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-feature-settings: "pnum" 1;
  font-optical-sizing: auto;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--fuchsia); color: var(--onyx); }
:focus-visible { outline: 2px solid var(--fuchsia); outline-offset: 2px; border-radius: 2px; }

h1, h2, h3, h4, p, ul, dl, dd { margin: 0; }
/* Body copy is sans. Serif is for headings. */
h1, h2, h3, h4 { font-family: var(--serif); }
ul { padding: 0; list-style: none; }

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--willow);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color 120ms var(--ease), text-decoration-color 120ms var(--ease);
}
a:hover { color: var(--state-ink); text-decoration-color: var(--state-ink); text-decoration-thickness: 2px; }

.stop { color: var(--pollen); }
.nb { white-space: nowrap; }

.skip {
  position: absolute; left: var(--frame); top: -100px; z-index: 10;
  padding: 12px 20px; background: var(--onyx); color: var(--parchment);
  font: 600 0.75rem/1rem var(--sans); letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none;
  border-radius: 4px;
}
.skip:focus { top: 12px; color: var(--parchment); }

/* ---------- The bar: back to the site, and the PDF ---------- */

.bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  width: min(100% - 2 * var(--frame), 44rem); margin-inline: auto;
  padding-block: 12px; border-bottom: 1px solid var(--outline);
}
.bar__mark {
  display: inline-flex; align-items: center; min-height: 44px; white-space: nowrap;
  font: 900 1.125rem/1 var(--serif); letter-spacing: -0.01em; color: var(--ink-strong); text-decoration: none;
}
.bar__mark:hover { color: var(--ink-strong); text-decoration: underline; text-decoration-color: var(--willow); text-decoration-thickness: 2px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; min-width: 44px; padding: 12px 20px; white-space: nowrap;
  font: 600 0.75rem/1rem var(--sans); letter-spacing: 0.12em; text-transform: uppercase; font-feature-settings: "case" 1;
  text-decoration: none; border-radius: 4px; border: 1px solid var(--ink-strong);
  background: var(--ink-strong); color: var(--parchment);
  transition: background-color 220ms var(--ease), border-color 220ms var(--ease);
}
.btn:hover { background: var(--ink); border-color: var(--ink); color: var(--parchment); text-decoration: none; }

/* ---------- The page ---------- */

.page { width: min(100% - 2 * var(--frame), 44rem); margin-inline: auto; padding-block: 48px 96px; }

.head h1 {
  font-size: clamp(2.75rem, 10vw, 4.5rem); font-weight: 900; line-height: 0.95; letter-spacing: -0.03em;
  font-variation-settings: "opsz" 60; color: var(--ink-strong);
}
/* The pollen full stop is drawn, not typed, so the name copies and parses clean. */
.dot { display: inline-block; width: 0.2em; height: 0.2em; margin-left: 0.035em; fill: var(--pollen); }

.head__role { margin-top: 16px; font-size: 1.125rem; line-height: 1.45; color: var(--ink); text-wrap: pretty; }

.contact {
  display: flex; flex-wrap: wrap; gap: 0 24px; margin-top: 8px;
  font: 400 0.9375rem/1.5rem var(--sans); font-feature-settings: "lnum" 1, "pnum" 1; color: var(--ink-muted);
}
.contact a { display: inline-block; padding-block: 10px; }

h2 {
  margin-top: 40px; padding-top: 12px; border-top: 1px solid var(--outline-strong);
  font: 600 0.75rem/1rem var(--sans); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-muted);
}
h2 + * { margin-top: 16px; }

.job__title { font-size: 1.375rem; font-weight: 600; line-height: 1.3; letter-spacing: -0.005em; color: var(--ink-strong); }
.job__org { color: var(--ink); }
.job__when { font-feature-settings: "lnum" 1, "pnum" 1; }
.job__note { margin-top: 4px; font: 400 0.9375rem/1.5rem var(--sans); color: var(--ink-muted); font-feature-settings: "lnum" 1, "pnum" 1; }

.credit { color: var(--ink); max-width: 36em; text-wrap: pretty; }

.practice { margin-top: 24px; font-size: 1.1875rem; font-weight: 600; line-height: 1.4; color: var(--ink-strong); }

.items { margin-top: 8px; }
.items li { padding-left: 1.25em; text-wrap: pretty; }
.items li + li { margin-top: 8px; }
/* A short rule marks each item. It is a border, so it prints, and it adds no character to the text.
   It stays in the flow: a positioned item is painted late, and the PDF would then hold
   every list after every heading. */
.items li::before {
  content: ""; display: inline-block; width: 0.6em; margin: 0 0.65em 0 -1.25em;
  border-top: 1px solid var(--outline-control); vertical-align: 0.3em;
}
.items b { font-weight: 600; color: var(--ink-strong); }

/* Label and list run on in one line of text: "Languages. PHP 8, JavaScript". */
.pairs > div { text-wrap: pretty; }
.pairs > div + div { margin-top: 8px; }
.pairs dt, .pairs dd { display: inline; }
.pairs dt { font-weight: 600; color: var(--ink-strong); }

.more { margin-top: 40px; padding-top: 12px; border-top: 1px solid var(--outline); font: 400 0.9375rem/1.5rem var(--sans); color: var(--ink-muted); }

@media (prefers-reduced-motion: reduce) {
  a, .btn { transition: none; }
}

/* ---------- Print: US Letter, two pages ---------- */

@page { size: Letter; margin: 0.55in 0.75in 0.6in; }

@media print {
  html { font-size: 9.6pt; }
  body {
    background: none; color: var(--ink); font-size: 1rem; line-height: 1.4;
    /* Default glyphs only. Oldstyle figures and ligatures are swapped glyphs,
       and some PDF text extractors cannot map those back to characters. */
    font-feature-settings: normal; font-variant-ligatures: none;
    /* The body is Source Sans, whose word space is narrow. See the note below. */
    word-spacing: 0.08em;
  }
  .bar, .skip { display: none; }
  .page { width: auto; padding: 0; }
  a { color: inherit; text-decoration: none; }

  /* Tight display type and Source Sans both set a narrow word space. Some text
     extractors find words by the gap alone, so open it a little on paper. */
  .head h1 { font-size: 30pt; word-spacing: 0.1em; }
  .contact, .job__note, .more, h2 { word-spacing: 0.08em; }
  .head__role { margin-top: 6pt; font-size: 1.125rem; }
  .contact { margin-top: 3pt; gap: 0 14pt; font-size: 0.9375rem; line-height: 1.4; color: var(--ink); font-feature-settings: normal; }
  .contact a { padding: 0; }

  /* Wide tracking reads as "S U M M A R Y" to some extractors, so headings close up on paper. */
  h2 { margin-top: 11pt; padding-top: 4pt; font-size: 0.78rem; letter-spacing: 0.04em; color: var(--ink-body); break-after: avoid; }
  h2 + * { margin-top: 4pt; }
  .job__title { font-size: 1.2rem; }
  .job__when, .job__note { font-feature-settings: normal; }
  .job__note { margin-top: 1pt; font-size: 0.9375rem; line-height: 1.4; color: var(--ink-body); }
  .job, .practice, .credit { break-after: avoid; }
  .credit { max-width: none; }
  .practice { margin-top: 7pt; font-size: 1.0625rem; }
  .items { margin-top: 2pt; }
  .items li { break-inside: avoid; }
  .items li + li { margin-top: 2.5pt; }
  .pairs > div { break-inside: avoid; }
  .pairs > div + div { margin-top: 2.5pt; }
  .more { margin-top: 10pt; padding-top: 4pt; font-size: 0.9375rem; line-height: 1.4; color: var(--ink-body); }
}
