/* ==========================================================================
   One-page CV — print-first document layout
   Used only by cv-onepage.html.

   Two deliberate constraints:

     1. Single column, no tables, no icons, no background artwork, because
        applicant tracking systems read the text layer and some parse HTML
        poorly.
     2. Content is sized to sit comfortably inside one A4 page, so ordinary
        differences in printer margins or font metrics cannot spill the CV
        onto a second page.
   ========================================================================== */

/* --- The sheet ---------------------------------------------------------- */

/* Fixed light colours on purpose: a CV is printed on white paper, so the
   on-screen preview must not follow the site's dark theme. */
.cv-sheet {
  --cv-ink: #10161c;
  --cv-soft: #3d4a57;
  --cv-muted: #5d6c7b;
  --cv-line: #ccd6e2;
  --cv-accent: #1c5f8f;

  box-sizing: border-box;
  width: 100%;
  max-width: 210mm;
  color: var(--cv-ink);
  background: #fff;
  font-size: 9.7pt;
  line-height: 1.4;
}

@media screen {
  body.cv-doc {
    background: var(--bg);
  }

  .cv-sheet {
    margin: 24px auto 3rem;
    padding: 15mm;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
  }
}

/* --- Screen toolbar (never printed) ------------------------------------- */

.cv-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 0.85rem 0;
}

.cv-bar .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}

.cv-bar-note {
  flex: 1 1 16rem;
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

/* --- Document typography ------------------------------------------------ */

/* Name block on the left, portrait on the right. The photo is fixed in length
   units so it prints at the same physical size everywhere. */
.cv-head {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
}

.cv-head-main {
  flex: 1 1 auto;
  min-width: 0;
}

.cv-photo {
  flex: 0 0 auto;
  width: 27mm;
  height: auto;
  border-radius: 2px;
  border: 1px solid var(--cv-line);
}

.cv-name {
  margin: 0;
  font-size: 20pt;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.cv-role {
  margin: 0.25rem 0 0.35rem;
  font-size: 10.4pt;
  font-weight: 600;
  color: var(--cv-accent);
}

.cv-contact {
  margin: 0;
  font-size: 8.8pt;
  color: var(--cv-muted);
}

.cv-contact a {
  color: inherit;
  text-decoration: none;
}

.cv-section {
  margin-top: 0.95rem;
}

.cv-section > h2 {
  margin: 0 0 0.35rem;
  padding-bottom: 0.18rem;
  border-bottom: 1px solid var(--cv-line);
  font-size: 9.3pt;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cv-accent);
}

.cv-item + .cv-item {
  margin-top: 0.5rem;
}

.cv-item-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.2rem 0.8rem;
}

.cv-item-title {
  font-weight: 700;
}

.cv-item-when {
  font-size: 8.8pt;
  color: var(--cv-muted);
  white-space: nowrap;
}

.cv-item-sub {
  margin: 0.05rem 0 0;
  font-size: 8.9pt;
  color: var(--cv-soft);
}

.cv-item-sub strong {
  color: var(--cv-ink);
}

.cv-list {
  margin: 0.2rem 0 0;
  padding-left: 1.1em;
}

.cv-list li {
  margin: 0.08rem 0;
}

.cv-line {
  margin: 0.22rem 0 0;
}

.cv-line:first-of-type {
  margin-top: 0;
}

.cv-line strong {
  color: var(--cv-ink);
}

/* --- Print -------------------------------------------------------------- */

@page {
  size: A4;
  margin: 12mm 13mm;
}

@media print {
  html,
  body.cv-doc {
    background: #fff;
  }

  .cv-bar,
  .no-print,
  .skip-link {
    display: none !important;
  }

  .cv-sheet {
    max-width: none;
    margin: 0;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .cv-sheet a {
    color: inherit;
    text-decoration: none;
  }

  /* Never split a section or an entry across two pages. */
  .cv-section,
  .cv-item {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .cv-section > h2 {
    break-after: avoid;
    page-break-after: avoid;
  }

  a[target="_blank"]::after {
    content: none !important;
  }
}
