/* CV: one document window on the desktop. Printing it produces David_Carroll_CV.pdf. */

.window--doc {
  width: min(100% - 2 * var(--gutter) - 8px, 54rem);
  margin: 2rem auto 4rem;
}
.window--doc > .titlebar { position: sticky; top: var(--menubar); z-index: 10; }
.window--doc .closebox { text-decoration: none; }

.page {
  padding: clamp(1.5rem, 5vw, 3.5rem) clamp(1.25rem, 6vw, 4.5rem) 3rem;
  max-width: 47rem;
  margin: 0 auto;
}
.page h1 {
  margin: 0;
  font: 700 clamp(2.25rem, 6vw, 3.75rem)/1 var(--pixel);
  letter-spacing: .01em;
  text-transform: uppercase;
  text-wrap: balance;
}
.page p.contact {
  margin: .9rem 0 0;
  font: 400 1.0625rem/1.4 var(--pixel);
}
.page p.contact a { text-decoration: none; border-bottom: 1px solid currentColor; }

.page h2 {
  width: fit-content;
  max-width: 100%;
  margin: 3.25rem 0 1.1rem;
  padding: .45rem .7rem .4rem;
  background: var(--ink); color: var(--paper);
  font: 700 1.1875rem/1.3 var(--pixel);
  letter-spacing: .03em;
  text-transform: uppercase;
  scroll-margin-top: calc(var(--menubar) + 3rem);
}
.page h3 {
  display: flex; align-items: center; gap: .75rem;
  margin: 2.1rem 0 .6rem;
  font: 600 1rem/1.3 var(--pixel);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.page h3::after { content: ""; flex: 1; border-top: 1px solid var(--ink); }
.page h2 + h3 { margin-top: 1.25rem; }

.page p { margin: .55rem 0; max-width: 70ch; }
.page strong { font-weight: 700; }
.page ul { margin: .4rem 0 .8rem; padding: 0; list-style: none; }
.page li {
  position: relative;
  margin: 0; padding: .3rem 0 .3rem 1.4rem;
  max-width: 70ch;
}
.page li::before {
  content: ""; position: absolute; left: .15rem; top: .95em;
  width: 6px; height: 6px; background: var(--ink);
}
.page li ul { margin: .2rem 0 0; }
.page li li::before { background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--ink); }
.page li a, .page p a { overflow-wrap: anywhere; }

.window--doc .statusbar a { text-decoration: none; }

@media (max-width: 40rem) {
  :root { --gutter: .5rem; }
  .window--doc { margin-top: 1rem; }
  .menu > ul { position: fixed; left: .5rem; right: .5rem; min-width: 0; top: calc(var(--menubar) + .25rem); }
  .infobar .count { display: none; }
}

/* ---------- Print: the PDF ---------- */
@page {
  size: letter;
  margin: .7in .75in .75in;
  @bottom-left { content: "David R. Carroll · Curriculum Vitae · October 2026"; font: 400 7.5pt "Tiny5", monospace; color: #000; }
  @bottom-right { content: counter(page) " / " counter(pages); font: 400 7.5pt "Tiny5", monospace; color: #000; }
}
@media print {
  :root, :root[data-theme="dark"] { --ink: #000; --paper: #fff; color-scheme: light; }
  html, body { background: #fff; }
  body { font-size: 9.6pt; line-height: 1.42; }
  .menubar, .skip, .window--doc > .titlebar, .window--doc > .infobar, .window--doc > .statusbar { display: none; }
  .window--doc { width: auto; margin: 0; border: 0; }
  .window--doc::after { display: none; }
  .page { padding: 0; max-width: none; }
  .page h1 { font-size: 26pt; }
  .page p.contact { font-size: 10pt; margin-top: 6pt; }
  .page h2 {
    margin: 18pt 0 7pt; padding: 3pt 6pt 2.5pt; font-size: 10.5pt;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
    break-after: avoid;
  }
  .page h3 { margin: 11pt 0 3pt; font-size: 8.6pt; break-after: avoid; }
  .page p, .page li { max-width: none; }
  .page li { padding: 1.6pt 0 1.6pt 12pt; break-inside: avoid; }
  .page li::before { width: 4pt; height: 4pt; top: .72em; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .page a { text-decoration: none; }
  .page a:hover { background: none; color: inherit; }
}
