/* ============================================================
   RESUME / 26 — A4 document in the portfolio's type system.
   Screen: a paper sheet on the site background.
   Print:  exactly A4, no site chrome.
   ============================================================ */

.resume-page {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(13,13,11,.06), transparent 55%),
    var(--paper);
}

.resume-page main { padding: calc(var(--header) + var(--space-6)) 0 var(--space-10); }

/* Toolbar (screen only) */
.resume-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--space-5);
  margin-bottom: var(--space-5);
}
.resume-toolbar .kicker { margin: 0; color: var(--muted); }
.resume-toolbar__actions { display: flex; align-items: center; gap: var(--space-5); flex-wrap: wrap; }
.resume-toolbar .btn { cursor: pointer; }

/* The sheet */
.resume {
  --r-ink: #0d0d0b;
  --r-soft: #3b382f;
  --r-muted: #625b4f;
  --r-rule: rgba(13, 13, 11, .22);
  --r-rule-soft: rgba(13, 13, 11, .11);
  --r-red: #b92b17;
  --r-paper: #f4eee3;

  width: 210mm;
  max-width: 100%;
  min-height: 297mm;
  margin: 0 auto;
  padding: 14mm 15mm 12mm;
  display: flex;
  flex-direction: column;
  background: var(--r-paper);
  color: var(--r-ink);
  box-shadow: 0 24px 60px -24px rgba(13,13,11,.42), 0 0 0 1px rgba(13,13,11,.08);
  font-family: var(--font-body);
  font-size: 10.2pt;
  line-height: 1.45;
  text-wrap: pretty;
}

.resume a { color: inherit; text-decoration: none; border-bottom: 1px solid rgba(13,13,11,.28); }
.resume a:hover { color: var(--r-red); border-color: var(--r-red); }

/* Header */
.r-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10mm;
  align-items: start;
  padding-bottom: 5mm;
  border-bottom: 1.5pt solid var(--r-ink);
}
.r-eyebrow,
.r-label,
.r-entry__when,
.r-qr figcaption,
.r-work__meta,
.r-facts dt,
.r-foot {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: .12em;
}
.r-eyebrow {
  margin: 0 0 2.5mm;
  color: var(--r-muted);
  font-size: 6.8pt;
}
.r-name {
  margin: 0;
  font-family: var(--font-accent);
  font-size: 32pt;
  font-weight: 700;
  line-height: .92;
  letter-spacing: -.045em;
}
.r-name span { color: var(--r-red); }
.r-role {
  margin: 2.5mm 0 0;
  font-size: 11.2pt;
  font-weight: 500;
  letter-spacing: -.01em;
}
.r-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 1mm 5mm;
  margin: 3mm 0 0;
  padding: 0;
  list-style: none;
  color: var(--r-soft);
  font-size: 8.4pt;
}
.r-contact li { display: flex; align-items: baseline; gap: 1.5mm; }
.r-contact li + li::before {
  content: "";
  width: 1.2mm;
  height: 1.2mm;
  margin-right: 2mm;
  background: var(--r-red);
  align-self: center;
}

/* QR */
.r-qr { margin: 0; width: 27mm; text-align: left; }
.r-qr img { display: block; width: 27mm; height: 27mm; }
.r-qr figcaption {
  margin-top: 1.6mm;
  color: var(--r-muted);
  font-size: 5.9pt;
  line-height: 1.35;
  letter-spacing: .1em;
}

/* Profile */
.r-profile {
  margin: 5mm 0 0;
  padding: 0 0 4.5mm;
  border-bottom: 1px solid var(--r-rule);
  font-size: 10.4pt;
  line-height: 1.5;
  max-width: 62ch;
  color: var(--r-soft);
}
.r-profile strong { color: var(--r-ink); font-weight: 600; }

/* Grid */
.r-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.62fr) minmax(0, 1fr);
  gap: 0 9mm;
  margin: 5mm 0 6mm;
}
.r-side { border-left: 1px solid var(--r-rule-soft); padding-left: 7mm; }

/* Sections */
.r-section + .r-section { margin-top: 6mm; }
.r-section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 4mm;
  padding-bottom: 1.4mm;
  margin-bottom: 3mm;
  border-bottom: 1px solid var(--r-ink);
}
.r-label {
  margin: 0;
  font-size: 6.9pt;
  font-weight: 500;
}
.r-label b { color: var(--r-red); font-weight: 500; }
.r-section__count {
  font-family: var(--font-mono);
  font-size: 6.3pt;
  letter-spacing: .1em;
  color: var(--r-muted);
}

/* Experience */
.r-entry + .r-entry { margin-top: 4.5mm; padding-top: 4.5mm; border-top: 1px solid var(--r-rule-soft); }
.r-entry__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 4mm;
}
.r-entry__role {
  margin: 0;
  font-size: 11.2pt;
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 1.2;
}
.r-entry__when {
  flex: none;
  font-size: 6.4pt;
  color: var(--r-muted);
  white-space: nowrap;
}
.r-entry__org {
  margin: .8mm 0 0;
  font-size: 9pt;
  color: var(--r-soft);
}
.r-entry__org strong { font-weight: 600; color: var(--r-ink); }

.r-bullets { margin: 2.4mm 0 0; padding: 0; list-style: none; }
.r-bullets li {
  position: relative;
  padding-left: 3.6mm;
  color: var(--r-soft);
  break-inside: avoid;
}
.r-bullets li + li { margin-top: 1.4mm; }
.r-bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .58em;
  width: 1.3mm;
  height: 1.3mm;
  background: var(--r-red);
}

/* Selected work */
.r-work { margin: 0; padding: 0; list-style: none; }
.r-work li {
  padding: 2.4mm 0;
  border-bottom: 1px solid var(--r-rule-soft);
  break-inside: avoid;
}
.r-work li:first-child { padding-top: 0; }
.r-work li:last-child { border-bottom: 0; padding-bottom: 0; }
.r-work__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 3mm;
}
.r-work__name { margin: 0; font-size: 10.2pt; font-weight: 600; }
.r-work__name a { border-bottom: 0; }
.r-work__meta {
  flex: none;
  font-size: 6.2pt;
  color: var(--r-muted);
  white-space: nowrap;
}
.r-work__note { margin: .6mm 0 0; color: var(--r-soft); font-size: 9pt; line-height: 1.42; }

/* Side facts */
.r-facts { margin: 0; }
.r-facts div { display: flex; gap: 3mm; padding: 1.8mm 0; border-bottom: 1px solid var(--r-rule-soft); }
.r-facts div:last-child { border-bottom: 0; }
.r-facts dt {
  flex: none;
  width: 17mm;
  color: var(--r-muted);
  font-size: 6.2pt;
  padding-top: .35mm;
}
.r-facts dd { margin: 0; font-size: 8.4pt; line-height: 1.4; }

.r-skills { margin: 0; }
.r-skills div + div { margin-top: 2.6mm; }
.r-skills dt {
  margin: 0 0 .7mm;
  font-family: var(--font-mono);
  font-size: 6.2pt;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--r-muted);
}
.r-skills dd { margin: 0; font-size: 8.4pt; line-height: 1.45; }

.r-note {
  margin-top: 4mm;
  padding: 2.6mm 3mm;
  border: 1px solid var(--r-ink);
  font-size: 7.8pt;
  line-height: 1.4;
}
.r-note strong { display: block; font-family: var(--font-mono); font-size: 6.2pt; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 1mm; }

/* Footer */
.r-foot {
  display: flex;
  justify-content: space-between;
  gap: 5mm;
  margin-top: auto;
  padding-top: 4mm;
  border-top: 1px solid var(--r-rule);
  color: var(--r-muted);
  font-size: 5.9pt;
}
.r-foot a { border: 0; }

/* Screen-only responsive */
@media screen and (max-width: 900px) {
  .resume { padding: 10mm 8mm; font-size: 9.6pt; }
  .r-grid { grid-template-columns: 1fr; gap: 5.5mm; }
  .r-side { border-left: 0; padding-left: 0; }
  .r-head { gap: 6mm; }
  .r-name { font-size: 26pt; }
}
@media screen and (max-width: 560px) {
  .resume-toolbar { flex-direction: column; align-items: flex-start; gap: var(--space-3); }
  .resume-toolbar__actions { width: 100%; gap: var(--space-4); }
  .resume { padding: 8mm 6mm; font-size: 10pt; }
  .r-head { grid-template-columns: 1fr; }
  .r-qr { width: 24mm; }
  .r-qr img { width: 24mm; height: 24mm; }
  .r-name { font-size: 24pt; }
  .r-entry__head { display: block; }
  .r-entry__when { margin-top: .6mm; }
}

/* Print: exact A4 */
@page { size: A4; margin: 11mm 13mm; }

@media print {
  html, body { background: #fff !important; }
  .skip-link,
  .site-head,
  .site-foot,
  .resume-toolbar,
  .trace { display: none !important; }

  .resume-page main { padding: 0 !important; }
  .resume-page .shell { width: 100% !important; max-width: none !important; padding: 0 !important; margin: 0 !important; }

  .resume {
    width: auto;
    max-width: none;
    min-height: 273mm;
    margin: 0;
    padding: 0;
    background: #fff;
    color: #0d0d0b;
    box-shadow: none;
    font-size: 10.8pt;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .resume a { border-bottom: 0; }
  .resume a[href^="http"]::after { content: none !important; }
  .r-name { font-size: 34pt; }
  .r-role { font-size: 11.5pt; }
  .r-head { padding-bottom: 6mm; }
  .r-profile { margin-top: 5mm; padding-bottom: 5mm; }
  .r-grid { margin-top: 6mm; gap: 0 9mm; }
  .r-section + .r-section { margin-top: 7mm; }
  .r-entry + .r-entry { margin-top: 5mm; padding-top: 5mm; }
  .r-work li { padding: 2.6mm 0; }
  .r-entry__role { font-size: 12.4pt; }
  .r-work__name { font-size: 10.6pt; }
  .r-work__note { font-size: 9.4pt; }
  .r-skills dd, .r-facts dd { font-size: 9.4pt; }
  .r-note { font-size: 8.6pt; padding: 3.2mm 3.4mm; }
  .r-foot { margin-top: auto; padding-top: 3mm; }

  .r-entry, .r-work li, .r-note, .r-skills div, .r-facts div { break-inside: avoid; }
  .r-section__head { break-after: avoid; }
}
