:root {
  color-scheme: light;
  --ink: #243344;
  --navy: #16304f;
  --blue: #426887;
  --subtle: #5e6e7e;
  --line: #cbd7e1;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 10pt;
  line-height: 1.45;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: #e9edf1;
  color: var(--ink);
}

main { padding: 24px 0; }

.sheet {
  width: 210mm;
  min-height: 297mm;
  margin: 0 auto 24px;
  padding: 16mm 17mm;
  background: #fff;
  box-shadow: 0 10px 35px rgb(15 35 59 / 12%);
}

.sheet:last-child { margin-bottom: 0; }

h1, h2, h3, p, ul { margin-top: 0; }

a {
  color: var(--navy);
  text-decoration-color: #8faac1;
  text-underline-offset: 2px;
  overflow-wrap: anywhere;
}

a:hover, a:focus-visible { color: #316994; }

.hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12mm;
  padding-bottom: 7mm;
  border-bottom: 1.5px solid var(--navy);
}

.hero-copy { min-width: 0; }

.eyebrow {
  margin: 0 0 2.5mm;
  color: var(--blue);
  font-size: 8pt;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
}

h1 {
  margin-bottom: 1mm;
  color: var(--navy);
  font-size: 29pt;
  line-height: 1.07;
  letter-spacing: -.04em;
}

.job-title {
  margin-bottom: 5mm;
  color: var(--blue);
  font-size: 11pt;
  font-weight: 600;
}

.contact {
  display: flex;
  flex-wrap: wrap;
  column-gap: 3.5mm;
  row-gap: 1.3mm;
  max-width: 132mm;
  font-size: 8.5pt;
  font-style: normal;
  line-height: 1.3;
}

.contact > * { white-space: nowrap; }

.portrait {
  flex: none;
  display: block;
  width: 34mm;
  height: 34mm;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 35%;
  border: 2px solid var(--line);
}

.cv-section { margin-top: 7mm; }

h2 {
  display: flex;
  align-items: center;
  gap: 4mm;
  margin-bottom: 3mm;
  color: var(--navy);
  font-size: 9pt;
  font-weight: 700;
  letter-spacing: .095em;
  line-height: 1.25;
  text-transform: uppercase;
  break-after: avoid;
}

h2::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--line);
}

p { margin-bottom: 0; }

.entry { margin-bottom: 5mm; break-inside: avoid; }
.entry:last-child { margin-bottom: 0; }

.entry-head { margin-bottom: 2mm; }

h3 {
  margin-bottom: .6mm;
  color: var(--navy);
  font-size: 10pt;
  line-height: 1.3;
}

h3 span { color: var(--blue); font-weight: 600; }

.meta {
  color: var(--subtle);
  font-size: 8.5pt;
}

ul { margin-bottom: 0; padding-left: 5mm; }
li { padding-left: 1mm; margin-bottom: 1.25mm; }
li:last-child { margin-bottom: 0; }
li::marker { color: var(--blue); }

.more-link { margin-top: 2mm; font-size: 8.5pt; }

.continuation {
  display: flex;
  justify-content: space-between;
  padding-bottom: 3mm;
  border-bottom: 1px solid var(--line);
  color: var(--blue);
  font-size: 8pt;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.project-list a { font-weight: 700; }
.skill-list, .plain-list { list-style: none; padding-left: 0; }
.skill-list li, .plain-list li { padding-left: 0; }
.skill-list strong, .plain-list strong { color: var(--navy); }

.two-page { font-size: 11pt; line-height: 1.5; }
.two-page .cv-section { margin-top: 9mm; }
.two-page h2 { margin-bottom: 3.5mm; font-size: 9.5pt; }
.two-page h3 { font-size: 11pt; }
.two-page .entry { margin-bottom: 7mm; }
.two-page li { margin-bottom: 1.6mm; }

.one-page { font-size: 8.65pt; line-height: 1.31; }
.one-page .sheet { padding: 10mm 12mm; }
.one-page .hero { gap: 6mm; padding-bottom: 3.5mm; }
.one-page .eyebrow { margin-bottom: 1mm; font-size: 7pt; }
.one-page h1 { font-size: 23pt; }
.one-page .job-title { margin-bottom: 2mm; font-size: 9.4pt; }
.one-page .contact { max-width: 143mm; font-size: 7.5pt; column-gap: 2.5mm; row-gap: .8mm; }
.one-page .portrait { width: 28mm; height: 28mm; }
.one-page .cv-section { margin-top: 3.7mm; }
.one-page h2 { margin-bottom: 1.6mm; font-size: 8pt; }
.one-page h3 { font-size: 8.8pt; }
.one-page .meta { font-size: 7.4pt; }
.one-page .entry { margin-bottom: 2.7mm; }
.one-page .entry-head { margin-bottom: 1mm; }
.one-page li { margin-bottom: .55mm; }
.one-page .more-link { margin-top: 1mm; font-size: 7.5pt; }

@media screen and (max-width: 820px) {
  main { padding: 0; }
  .sheet {
    width: 100%;
    min-height: 0;
    padding: 24px;
    margin-bottom: 12px;
    box-shadow: none;
  }
  .hero { gap: 16px; }
  .portrait { width: 90px; height: 90px; }
  .contact > * { white-space: normal; }
  .one-page .sheet { padding: 24px; }
  .one-page .portrait { width: 75px; height: 75px; }
}

@media screen and (max-width: 440px) {
  h1 { font-size: 25pt; }
  .job-title { font-size: 10pt; }
  .portrait { width: 70px; height: 70px; }
}

@page { size: A4 portrait; margin: 0; }

@media print {
  html, body { margin: 0; background: #fff; }
  main { padding: 0; }
  .sheet {
    width: 210mm;
    height: 297mm;
    min-height: 0;
    margin: 0;
    padding: 16mm 17mm;
    box-shadow: none;
    break-inside: avoid;
  }
  .sheet:not(:last-child) { break-after: page; }
  .portrait { width: 34mm; height: 34mm; }
  .contact > * { white-space: nowrap; }
  .one-page .sheet { padding: 10mm 12mm; }
  .one-page .portrait { width: 28mm; height: 28mm; }
  .cv-section, .entry { break-inside: avoid; }
  h2, h3 { break-after: avoid; }
  a { text-decoration-color: var(--subtle); }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
