/* The resume picked up off the desk: its printed pages held up over the room, and the PDF
   to keep. Classes prefixed rs-. The pages are set like the Google Doc they print from
   (Arial, a letter page's 1in margins, 11pt type), measured in its own points (--pt), so a
   page keeps its proportions at any width; on a phone the type stops shrinking and reflows. */
.rs-host {
  /* a letter page at 96dpi, or the window less its gutters (and a classic scrollbar: resume.js sets --sbw) */
  --pw: min(816px, calc(100vw - 32px - var(--sbw, 0px)));
  --pt: calc(var(--pw) / 612);          /* one of the PDF's points, at that size */
  position: fixed; inset: 0; z-index: 8;
  display: none;
  overflow: hidden auto; overscroll-behavior: contain;
  scroll-padding-top: 64px; /* Page Down and Space keep lines clear of the bar */
  padding: 0 16px 28px;
  font: 14px/1.4 Arial, Helvetica, sans-serif; color: #000;
}
.rs-host.rs-open { display: block; }
.rs-host *, .rs-host *::before, .rs-host *::after { box-sizing: border-box; }
/* only a look: the wheel and clicks beside the pages go to the host, which scrolls and closes */
.rs-back { position: fixed; inset: 0; background: rgba(8, 10, 14, 0.84); pointer-events: none; animation: rs-fade 0.25s ease-out both; }
@keyframes rs-fade { from { opacity: 0; } }
/* lifted off the desk: up from where the sheets lie, bottom right, turning square as it comes */
@keyframes rs-lift { from { transform: translate(22vw, 38vh) rotate(-7deg) scale(0.42); opacity: 0; } 30% { opacity: 1; } }
.rs-box { position: relative; z-index: 1; width: var(--pw); margin: 0 auto; transform-origin: 80% 100%; animation: rs-lift 0.46s cubic-bezier(0.2, 0.9, 0.3, 1.04) both; }
.rs-still .rs-box { animation: rs-fade 0.2s ease-out both; }
.rs-box:focus { outline: none; }

/* the bar: stays at the top while the pages scroll under it */
.rs-bar {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; gap: 8px;
  margin: 0 -16px; padding: 16px 16px 14px;
  background: linear-gradient(rgba(8, 10, 14, 0.94) 72%, rgba(8, 10, 14, 0));
  font: 11px/1.5 var(--mono); letter-spacing: 0.14em; color: var(--hud-ink);
}
.rs-title { margin: 0 auto 0 0; font: inherit; font-weight: 600; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rs-bar .chip { flex: none; }
.rs-pdf { color: #ffe9a8; border-color: rgba(255, 216, 120, 0.45); }
.rs-pdf:hover { border-color: rgba(255, 216, 120, 0.8); }
.rs-host a:focus-visible, .rs-host button:focus-visible { outline: 2px solid #f5b66e; outline-offset: 2px; }
.rs-sheet a:focus-visible { outline-color: #1B5790; } /* amber vanishes on white paper */

/* a printed page */
.rs-sheet {
  position: relative; width: 100%;
  min-height: calc(var(--pw) * 11 / 8.5);
  margin: 0 0 22px;
  padding: calc(72 * var(--pt));
  background: #fff; color: #000;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 16px 44px rgba(0, 0, 0, 0.55);
  font-size: max(12.5px, calc(11 * var(--pt)));
  line-height: 1.32; /* the doc's 1.15 spacing, in Arial */
  overflow-wrap: break-word;
}
.rs-sheet p, .rs-sheet h2, .rs-sheet h3, .rs-sheet ul { margin: 0; }
.rs-sheet a { color: #1155cc; }
.rs-name { font-size: max(21px, calc(23 * var(--pt))); line-height: 1.15; font-weight: bold; margin-top: calc(24 * var(--pt)) !important; }
.rs-label { font-weight: bold; margin-top: calc(16 * var(--pt)) !important; }
.rs-head { font-size: max(16px, calc(17 * var(--pt))); line-height: 1.2; font-weight: bold; margin: calc(20 * var(--pt)) 0 calc(14 * var(--pt)) !important; }
.rs-head.rs-indent { font-style: italic; padding-left: calc(30 * var(--pt)); }
/* the PDF's rules: page 1's run 75-536pt, the two over EXPERIENCE and EDUCATION 105-506pt */
.rs-rule { height: 0; margin: calc(20 * var(--pt)) calc(4 * var(--pt)) calc(4 * var(--pt)) calc(3 * var(--pt)); border: 0; border-top: 1px solid #a8a8a8; }
.rs-rule.rs-short { margin-left: calc(33 * var(--pt)); margin-right: calc(34 * var(--pt)); }
.rs-sheet > .rs-rule:first-child { margin-top: calc(2 * var(--pt)); }
/* the achievements: italic, a round bullet at 18pt, the words at 36pt, a blank line between */
.rs-wins { padding: 0 0 0 calc(36 * var(--pt)); font-style: italic; list-style: none; }
.rs-wins li { position: relative; margin-bottom: 1.32em; }
.rs-wins li::before { content: "●"; content: "●" / ""; position: absolute; left: calc(-18 * var(--pt)); font-style: normal; font-size: 0.9em; }
/* the experience: all italic, each company bold, a gap above each */
.rs-job, .rs-line { font-style: italic; }
.rs-when { white-space: nowrap; }
.rs-earlier { margin-top: calc(14 * var(--pt)) !important; }
.rs-job { margin-top: calc(14 * var(--pt)) !important; }
.rs-sheet > .rs-job:first-child { margin-top: 0 !important; }
.rs-head + .rs-job { margin-top: 0 !important; }

.rs-foot { margin: 0; text-align: center; font: 11px/1.5 var(--mono); letter-spacing: 0.12em; color: rgba(246, 241, 231, 0.7); }
.rs-coarse { display: none; }
@media (hover: none) and (pointer: coarse) { .rs-fine { display: none; } .rs-coarse { display: inline; } }

/* phones: a page as wide as the window allows, the margins a phone can spare */
@media (max-width: 600px) {
  .rs-sheet { padding: 26px 20px 30px; min-height: 0; }
  .rs-xword, .rs-who { display: none; }
  .rs-title { font-size: 10px; letter-spacing: 0.1em; }
}
/* fingers: the download and the close 44px, as the CD player's and the gallery's buttons are */
@media (pointer: coarse) {
  .rs-bar .chip { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 0.4em; }
  .rs-x { min-width: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .rs-box, .rs-back { animation: rs-fade 0.15s ease-out both; }
}
@media print {
  /* printed from here: just the pages */
  body:has(.rs-open) > :not(#resume-host) { display: none !important; }
  html:has(.rs-open), html:has(.rs-open) body { height: auto !important; overflow: visible !important; }
  .rs-host.rs-open { position: static; overflow: visible; padding: 0; }
  .rs-back, .rs-bar, .rs-foot { display: none; }
  .rs-box { animation: none; width: auto; }
  .rs-sheet { box-shadow: none; margin: 0; min-height: 0; break-after: page; }
}
