/* ---------------------------------------------------------
   CV page: one A4 sheet in the portfolio's type and palette.
   On screen it sits on the cream desk with a bar above it; in print (and
   in the PDF, made by _motion/cv_pdf.sh) only the sheet prints, on white.
   Palette values match the light tokens in styles.css.
--------------------------------------------------------- */
:root {
  --cream: #f2efe6;
  --ink: #141310;
  --orange: #f0380a;
  --red-ink: #b92c06;
  --graphite: #615e55;
  --line: rgba(20, 19, 16, 0.18);
  --line-strong: rgba(20, 19, 16, 0.36);
  --sans: "DM Sans", Arial, sans-serif;
  --display: "Bebas Neue", Impact, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "DM Mono", "Courier New", monospace;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--cream);
  color: var(--ink);
  font: 400 15px / 1.45 var(--sans);
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  padding: 0 16px 64px;
}

a {
  color: inherit;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

h1,
h2,
h3,
p,
ul,
dl,
dd {
  margin: 0;
}

/* Bar: back to the portfolio, and the download */
.cv-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 210mm;
  margin: 0 auto;
  padding: 18px 0;
  font: 500 0.72rem / 1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cv-bar a {
  text-decoration: none;
}

.cv-bar__back:hover {
  color: var(--red-ink);
}

.cv-bar__download {
  padding: 13px 18px 12px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--cream);
  box-shadow: 5px 5px 0 var(--orange);
  transition:
    transform 0.3s cubic-bezier(0.19, 1, 0.22, 1),
    box-shadow 0.3s cubic-bezier(0.19, 1, 0.22, 1);
}

.cv-bar__download:hover,
.cv-bar__download:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 var(--orange);
}

/* The sheet */
.sheet {
  max-width: 210mm;
  min-height: 297mm;
  margin: 0 auto;
  padding: 10mm 14mm 8mm;
  background: #fffdf7;
  border: 1px solid var(--line);
  box-shadow: 0 1px 0 var(--line), 10px 10px 0 rgba(20, 19, 16, 0.06);
  font-size: 8.9pt;
  line-height: 1.34;
}

.cv-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8mm;
  padding-bottom: 4mm;
  border-bottom: 1.5px solid var(--ink);
}

.cv-head h1 {
  font: 400 40pt / 0.86 var(--display);
  letter-spacing: 0.005em;
  text-transform: uppercase;
}

.cv-head__role {
  margin-top: 2mm;
  font: italic 400 17pt / 1 var(--serif);
  color: var(--orange);
}

.cv-head__focus {
  margin-top: 2.2mm;
  font: 400 7.4pt / 1.3 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--graphite);
}

.cv-contact {
  padding: 0;
  list-style: none;
  font: 400 7.6pt / 1.65 var(--mono);
  text-align: right;
}

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

.cv-summary {
  margin-top: 3.4mm;
  font-size: 9.4pt;
  line-height: 1.45;
}

.cv-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 50mm;
  gap: 8mm;
  margin-top: 4mm;
}

h2 {
  margin: 0 0 2.6mm;
  padding-bottom: 1.4mm;
  border-bottom: 1px solid var(--line-strong);
  font: 400 13pt / 1 var(--display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

section + section {
  margin-top: 3.4mm;
}

.cv-item + .cv-item {
  margin-top: 2.5mm;
}

.cv-item h3 {
  font-size: 9.9pt;
  font-weight: 700;
  line-height: 1.25;
}

.cv-item__org {
  margin-top: 0.4mm;
}

.cv-item__meta {
  margin-top: 0.6mm;
  font: 400 7.4pt / 1.4 var(--mono);
  color: var(--graphite);
}

.cv-item__org span,
.cv-item__meta span {
  margin: 0 1.2mm;
  color: var(--red-ink);
}

.cv-item ul {
  margin-top: 1.1mm;
  padding: 0;
  list-style: none;
}

.cv-item li {
  position: relative;
  padding-left: 4mm;
}

.cv-item li + li {
  margin-top: 0.6mm;
}

.cv-item li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: var(--red-ink);
}

.cv-side .cv-item h3 {
  font-size: 9.8pt;
}

.cv-plain {
  font-size: 8.8pt;
}

.cv-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4mm;
  padding: 0;
  list-style: none;
}

.cv-tags li {
  padding: 0.9mm 2mm 0.7mm;
  border: 1px solid var(--line-strong);
  font: 400 7.6pt / 1.2 var(--mono);
}

.cv-langs div + div {
  margin-top: 1.6mm;
}

.cv-langs dt {
  font-weight: 700;
}

.cv-langs dd {
  font: italic 400 10.5pt / 1.2 var(--serif);
  color: var(--graphite);
}

/* Phones: the sheet becomes a plain page */
@media (max-width: 760px) {
  body {
    padding: 0 0 40px;
  }

  .cv-bar {
    padding: 14px 16px;
  }

  .sheet {
    min-height: 0;
    padding: 28px 18px;
    border-width: 1px 0;
    box-shadow: none;
    font-size: 15px;
  }

  .cv-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }

  .cv-head h1 {
    font-size: 3.4rem;
  }

  .cv-contact {
    text-align: left;
  }

  .cv-cols {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .cv-item h3,
  .cv-side .cv-item h3 {
    font-size: 1.05rem;
  }

  .cv-contact,
  .cv-item__meta,
  .cv-head__focus,
  .cv-tags li {
    font-size: 0.74rem;
  }
}

/* Print and PDF: just the sheet, on white, one A4 page */
@page {
  size: A4;
  margin: 0;
}

@media print {
  html,
  .sheet {
    background: #fff;
  }

  body {
    padding: 0;
  }

  .cv-bar {
    display: none;
  }

  .sheet {
    max-width: none;
    min-height: 0;
    margin: 0;
    border: 0;
    box-shadow: none;
  }

  a {
    text-decoration: none;
  }
}
