/* ==========================================================================
   /cv — the sheet, lit on the stage
   --------------------------------------------------------------------------
   v3 set the CV on the Paper theme. v4's stage is dark, but a CV is a sheet
   of paper, so the sheet keeps the design system's Paper colours exactly
   and sits on the dark stage like a page under a lamp. The metrics are the
   web reading sizes from v3; the A4 originals are the PDFs.
   ========================================================================== */

.sheet {
  --paper:           #faf8f4;
  --paper-raised:    #f2eee7;
  --paper-band:      #1c1a17;
  --paper-ink:       #1c1a17;
  --paper-muted:     #56504a;
  --paper-subtle:    #6f6860;
  --paper-on-band:   #f7f3ec;
  --paper-on-band-2: #b9ae9e;
  --paper-accent:    #7a5228;
  --paper-accent-on: #c9a36a;
  --paper-rule:      #8f857a;
  --paper-hair:      #ddd5c8;

  position: relative;
  max-width: 52rem;
  margin: 0 auto;
  background: var(--paper);
  color: var(--paper-ink);
  box-shadow:
    0 2px 4px rgba(0, 0, 0, .4),
    0 40px 100px rgba(0, 0, 0, .65),
    0 0 160px rgba(var(--bronze-rgb), .14);
}
.sheet strong { color: var(--paper-ink); font-weight: 600; }

.cv-main { padding-block: clamp(7rem, 14vh, 9rem) var(--section-y); }

.cv-top {
  display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between;
  gap: 1.5rem 2rem;
  max-width: calc(52rem + 2 * var(--gutter));
  margin-bottom: 2.5rem;
}
.cv-top-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: var(--t-h2);
  line-height: 1.05;
  letter-spacing: -.02em;
}
.cv-top-note { margin-top: .75rem; color: var(--ink-muted); max-width: 26rem; }

/* One arrival: the sheet turns to face the reader, then the page is still,
   because this page exists to be read. */
html.motion .sheet {
  opacity: 0;
  transform: perspective(1800px) rotateX(14deg) translateY(60px) scale(.97);
  transform-origin: 50% 0;
  animation: sheet-settle 1.4s var(--ease-out) .15s forwards;
}
@keyframes sheet-settle {
  to { opacity: 1; transform: perspective(1800px) rotateX(0) translateY(0) scale(1); }
}

/* ----- Masthead --------------------------------------------------------- */

.sheet-band {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  column-gap: 2rem;
  align-items: start;
  padding: 3.5rem 3.5rem 2.25rem;
  background: var(--paper-band);
  color: var(--paper-on-band);
}
.sheet-portrait { width: 120px; height: 120px; object-fit: cover; }
.sheet-name {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.25rem, 5vw, 3.125rem);
  line-height: 1.08;
  letter-spacing: -.015em;
  color: var(--paper-on-band);
}
.sheet-name-rule { width: 44px; height: 1px; margin: 1rem 0 .75rem; background: var(--paper-accent-on); border: 0; }
.sheet-title {
  font-size: .71875rem;
  font-weight: 500;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--paper-accent-on);
}
.sheet-contact { margin-top: 1.375rem; font-size: var(--t-small); line-height: 1.75; color: var(--paper-on-band-2); }
.sheet-contact a { border-bottom: 1px solid transparent; transition: border-color var(--dur-1), color var(--dur-1); }
.sheet-contact a:hover { color: var(--paper-on-band); border-bottom-color: var(--paper-accent-on); }
.sheet-contact .sep { margin-inline: .2rem; color: var(--paper-accent-on); }

/* ----- Body ------------------------------------------------------------- */

.sheet-body { padding: 3.5rem; }
.sheet-lede {
  max-width: 44rem;
  margin-bottom: 3.5rem;
  font-family: var(--font-serif);
  font-size: var(--t-lede);
  line-height: 1.62;
}

.cv-section { margin-bottom: 3.5rem; }
.cv-section:last-child { margin-bottom: 0; }
.cv-section-label {
  display: block;
  margin-bottom: .5rem;
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--paper-accent);
}
.cv-section-rule { height: 1px; margin: 0 0 1.375rem; background: var(--paper-rule); border: 0; }

.cv-entry { margin-bottom: 2.25rem; }
.cv-entry:last-child { margin-bottom: 0; }
.cv-entry-head { display: flex; align-items: baseline; justify-content: space-between; gap: .875rem; }
.cv-org { font-size: 1.1875rem; line-height: 1.3; font-weight: 600; }
.cv-meta {
  flex: none;
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--paper-subtle);
  text-align: right;
}
.cv-role { margin: .15rem 0 .875rem; font-size: var(--t-small); font-style: italic; color: var(--paper-muted); }

.cv-list { max-width: 48rem; }
.cv-list li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: .6rem;
  color: var(--paper-muted);
}
.cv-list li:last-child { margin-bottom: 0; }
.cv-list li::before {
  content: "";
  position: absolute; left: 0; top: .78em;
  width: .45rem; height: 1px;
  background: var(--paper-accent);
}

.cv-group { margin-bottom: 2.25rem; }
.cv-group:last-child { margin-bottom: 0; }
.cv-group-label {
  display: block;
  margin-bottom: .875rem;
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--paper-accent);
}

.cv-skill-row {
  display: grid;
  grid-template-columns: 10.5rem minmax(0, 1fr);
  gap: .875rem;
  padding: .875rem 0;
  border-top: 1px solid var(--paper-hair);
}
.cv-skill-row:first-child { border-top: 0; padding-top: 0; }
.cv-skill-key {
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--paper-accent);
  line-height: var(--lh-body);
}
.cv-skill-val { color: var(--paper-muted); }
.cv-skill-val .sep { color: var(--paper-rule); margin-inline: .15rem; }

.cv-strip {
  max-width: 48rem;
  padding: .875rem 1.375rem;
  background: var(--paper-raised);
  border-radius: var(--radius-sm);
  color: var(--paper-muted);
}
.cv-strip .sep { margin-inline: .2rem; color: var(--paper-accent); }

/* ----- Downloads -------------------------------------------------------- */

.cv-downloads {
  max-width: 52rem;
  margin: 4rem auto 0;
  padding-top: 2.25rem;
  border-top: 1px solid var(--rule);
}
.cv-downloads h2 { font-family: var(--font-serif); font-weight: 400; font-size: var(--t-h3); line-height: 1.2; margin-bottom: .75rem; }
.cv-downloads p { max-width: 46rem; color: var(--ink-muted); }
.cv-downloads .actions { margin-top: 1.5rem; }

/* ----- Responsive ------------------------------------------------------- */

@media (max-width: 48rem) {
  .sheet-band { grid-template-columns: 1fr; row-gap: 1.375rem; padding: 2.25rem 1.375rem; }
  .sheet-body { padding: 2.25rem 1.375rem; }
  .cv-entry-head { flex-direction: column; gap: .15rem; }
  .cv-meta { text-align: left; }
  .cv-skill-row { grid-template-columns: 1fr; gap: .25rem; }
}
@media (max-width: 30rem) {
  .cv-downloads .btn, .cv-top .btn { width: 100%; justify-content: center; }
}

/* ----- Print: the chrome comes off and the sheet prints clean ----------- */

@media print {
  html, body { background: #fff !important; }
  .header, .footer, .cv-top, .cv-downloads, .skip, .wa, .grain, .cursor, .chapter { display: none !important; }
  .cv-main { padding: 0; }
  .sheet { max-width: none; box-shadow: none; opacity: 1 !important; transform: none !important; animation: none !important; }
}
