/* =============================================================================
   print.css — light-mode print sheet.
   Loaded with media="print", so it never touches the screen render.

   The screen theme is a pure-black canvas set with `!important` on html/body
   (spacex-theme.css section 0) and `color-scheme: dark` on the root. Printing
   that as-is either burns a page of toner or, with "background graphics" off,
   drops light text onto white paper and prints nothing legible. This sheet
   inverts the canvas, strips the site chrome, and lays the resume out as a
   document rather than a full-viewport stage.

   `!important` is used deliberately throughout: it is the only way to beat the
   `!important` canvas rules, and there is no cascade to protect here — this
   file is the last word for the print medium.
   ============================================================================= */

@page {
  size: auto;
  margin: 14mm 14mm 16mm;
}

/* -----------------------------------------------------------------------------
   1. Light canvas
   ----------------------------------------------------------------------------- */

html {
  color-scheme: light !important;
  background: #ffffff !important;
  scroll-behavior: auto !important;
}

html,
body {
  background: #ffffff !important;
  color: #000000 !important;
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

body {
  font-family: "Inter Tight", "Inter", Georgia, serif;
  font-size: 10.5pt;
  line-height: 1.45;
  letter-spacing: 0;
  /* Let the browser reflow to the sheet instead of honoring viewport units. */
  -webkit-print-color-adjust: economy;
  print-color-adjust: economy;
}

/* The dark theme paints text in --text (#f0f0fa) and --muted (55% white) on a
   great many selectors. Rather than chase each one, re-point the tokens: every
   `color: var(--text)` rule then resolves to ink. */
:root {
  --bg: #ffffff;
  --text: #000000;
  --muted: #3a3a3a;
  --muted-media: #3a3a3a;
  --ink: #000000;
  --ink-secondary: #3a3a3a;
  --ink-muted: #4a4a4a;
  --ink-on-dark: #000000;
  --accent: #000000;
  --paper: #ffffff;
  --paper-inset: #ffffff;
  --line: rgba(0, 0, 0, 0.22);
  --ghost-border: rgba(0, 0, 0, 0.28);
  --ghost-fill: transparent;
  --veil: transparent;
  --veil-strong: transparent;
  --gutter: 0px;
  --gutter-left: 0px;
  --gutter-right: 0px;
  --nav-h: 0px;
  --stage-min: 0;
}

.dk-main,
.dk-box,
.dk-box-1,
.dk-box-2,
.dk-box-3,
.dk-box-4,
.dk-box-5,
.dk-box-fullscreen,
main,
#main-content {
  background: transparent !important;
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
  padding: 0 !important;
  margin: 0 !important;
}

a,
a:visited {
  color: #000000 !important;
  text-decoration: none !important;
}

h1, h2, h3, h4, h5, h6 {
  color: #000000 !important;
  letter-spacing: 0.01em !important;
  line-height: 1.15 !important;
}

/* -----------------------------------------------------------------------------
   2. Strip the site chrome
   ----------------------------------------------------------------------------- */

.dk-navbar,
.dk-navbar-fullscreen,
.dk-navbar-sticky,
.dk-dropdown,
.dk-navbar-burger,
.skip-link,
.sx-footer,
.dk-footer-copyright,
.sx-media,
.sx-media-veil,
.sx-video,
.sx-poster,
.sx-scroll-hint,
.sx-btn,
.sx-btn-row,
.rs-toggle,
.rs-actions,
video,
iframe,
embed,
object,
noscript {
  display: none !important;
}

/* Section 12 hangs a hairline rule off ::after on every stage. Not on paper. */
.sx-stage::after,
.sx-cs-hero::after,
.sx-stage::before,
.sx-cs-hero::before {
  display: none !important;
  content: none !important;
}

/* -----------------------------------------------------------------------------
   3. Stages become plain blocks
   ----------------------------------------------------------------------------- */

.sx-stage,
.sx-stage--statement,
.sx-stage--center,
.sx-stage--cta,
.sx-cs-hero {
  display: block !important;
  position: static !important;
  min-height: 0 !important;
  height: auto !important;
  padding: 0 !important;
  margin: 0 !important;
  background: #ffffff !important;
  overflow: visible !important;
}

.sx-stage-inner {
  max-width: none !important;
  width: auto !important;
}

/* On the About page everything except the resume is screen furniture. */
#about main > section:not(#resume) {
  display: none !important;
}

/* -----------------------------------------------------------------------------
   4. The resume itself
   ----------------------------------------------------------------------------- */

/* Print the resume whether or not the reader expanded it on screen. */
#resume,
.rs {
  display: block !important;
  visibility: visible !important;
  /* Section 13 paints `.rs` solid black for the screen canvas. Without this the
     panel prints as a black slab wherever the reader has "background graphics"
     switched on, and the ink-on-white text below disappears into it. */
  background: #ffffff !important;
  height: auto !important;
  max-height: none !important;
  opacity: 1 !important;
  overflow: visible !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
}

.rs-doc {
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  color: #000000 !important;
  column-count: 1 !important;
}

/* Masthead */
.rs-name {
  font-family: "Space Grotesk", "Inter Tight", Helvetica, Arial, sans-serif;
  font-size: 21pt !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em !important;
  text-transform: uppercase !important;
  margin: 0 0 2pt !important;
  color: #000000 !important;
}

.rs-contact {
  display: block !important;
  font-size: 9pt !important;
  color: #333333 !important;
  margin: 0 0 10pt !important;
  padding: 0 0 9pt !important;
  border-bottom: 0.75pt solid #000000 !important;
  list-style: none !important;
}

.rs-contact li {
  display: inline !important;
  padding: 0 !important;
  margin: 0 !important;
}

.rs-contact li::before {
  display: none !important;
  content: none !important;
}

.rs-contact li + li::before {
  display: inline !important;
  content: "  ·  " !important;
  position: static !important;
  width: auto !important;
  height: auto !important;
  background: none !important;
  color: #767676 !important;
}

/* Section headings. On screen at >=900px `.rs-section` is a grid with the title
   in a left rail; on paper the measure is too narrow to spend 11rem on a rail,
   so it collapses back to a stacked head over full-width body. */
.rs-section {
  display: block !important;
  /* A heading stranded at the foot of a sheet is the classic resume print bug. */
  break-inside: auto;
  break-before: auto;
  margin: 0 0 10pt !important;
}

.rs-section-body {
  border-top: 0 !important;
  padding-top: 0 !important;
}

.rs-section-title {
  font-family: "Space Grotesk", "Inter Tight", Helvetica, Arial, sans-serif;
  font-size: 8.5pt !important;
  font-weight: 700 !important;
  letter-spacing: 0.18em !important;
  text-transform: uppercase !important;
  color: #000000 !important;
  margin: 0 0 6pt !important;
  padding: 0 0 3pt !important;
  border-bottom: 0.5pt solid rgba(0, 0, 0, 0.3) !important;
  break-after: avoid;
  page-break-after: avoid;
}

/* Entries */
.rs-entry {
  break-inside: avoid;
  page-break-inside: avoid;
  margin: 0 0 9pt !important;
  padding: 0 !important;
  border: 0 !important;
}

.rs-entry-head {
  display: block !important;
  margin: 0 0 2pt !important;
}

/* The head is the organization; `.rs-role` is the trailing job title. */
.rs-entry-head {
  font-family: "Space Grotesk", "Inter Tight", Helvetica, Arial, sans-serif;
  font-size: 10.5pt !important;
  font-weight: 700 !important;
  letter-spacing: 0.01em !important;
  text-transform: none !important;
  color: #000000 !important;
  margin: 0 0 1pt !important;
}

.rs-role {
  font-size: 10.5pt !important;
  font-weight: 500 !important;
  color: #000000 !important;
}

.rs-sep {
  font-weight: 400 !important;
  color: #767676 !important;
}

/* Bold lead-in on each achievement bullet. */
.rs-lead {
  font-weight: 700 !important;
  color: #000000 !important;
}

.rs-note,
.rs-skill {
  font-size: 10pt !important;
  color: #1a1a1a !important;
  margin: 0 0 2pt !important;
  max-width: none !important;
}

.rs-meta {
  font-family: "Space Grotesk", "Inter Tight", Helvetica, Arial, sans-serif;
  font-size: 8.5pt !important;
  font-weight: 500 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  color: #4a4a4a !important;
  margin: 1pt 0 3pt !important;
  display: block !important;
}

/* Bullets. The screen theme replaces the marker with an absolutely positioned
   ::before hairline; on paper a real disc reads better and survives reflow. */
.rs-entry ul {
  list-style: disc outside !important;
  margin: 0 0 0 13pt !important;
  padding: 0 !important;
}

.rs-entry li {
  position: static !important;
  padding-left: 0 !important;
  margin: 0 0 1.5pt !important;
  /* Section 13 caps the bullet at 68ch, which is the right measure on a wide
     screen but leaves ~160px of dead gutter down the right of every line on a
     Letter sheet — and costs pages. Paper gets the full column. */
  max-width: none !important;
  color: #1a1a1a !important;
  break-inside: avoid;
}

.rs-entry li::before {
  display: none !important;
  content: none !important;
}

.rs-summary {
  font-size: 10pt !important;
  color: #1a1a1a !important;
  margin: 0 0 10pt !important;
  max-width: none !important;
}

/* Print the destination of outbound links — the reader cannot click paper.
   Scoped to the resume so nav/footer links (already hidden) stay quiet, and
   mailto:/tel: are skipped because the label already shows the address. The
   contact row is excluded for the same reason: its links are already spelled
   out as their own URL, so appending it again just wrapped the line. */
#resume a[href^="http"]:not(.rs-contact a)::after {
  content: " (" attr(href) ")";
  font-size: 8pt;
  color: #666666;
  word-break: break-all;
}

/* Widow/orphan control for the running prose. */
p, li {
  orphans: 2;
  widows: 2;
}
