:root {
  --accent: #ef443a;
  --paper: #fff;
  --ink: #0e1624;
  --muted-band: #f0f0f0;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: #222;
  color: #273244;
  font-family: "DejaVu Sans", "Liberation Sans", Arial, sans-serif;
  font-size: 10.4pt;
  font-weight: 300;
  line-height: 1.45;
}

.preview {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 8px;
}

.page {
  position: relative;
  width: 210mm;
  min-height: 297mm;
  margin: 0 auto;
  overflow: hidden;
  background: var(--paper);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
}

.topbar {
  height: 10.4mm;
  background: var(--accent);
  color: #fff;
  font-size: 10.5pt;
  font-weight: 300;
  line-height: 10.4mm;
}

.topbar div {
  margin-left: 25.5mm;
}

.hero {
  display: grid;
  grid-template-columns: 41.4mm 1fr;
  column-gap: 12.7mm;
  min-height: 77.4mm;
  padding: 10.8mm 25.5mm 13mm;
  background: var(--muted-band);
}

.profile-photo {
  width: 41.4mm;
  height: 44.3mm;
  margin-top: 2.5mm;
  background-repeat: no-repeat;
  border: 1px solid #d6d6d6;
}

.person h1 {
  margin: 2.7mm 0 7.2mm;
  color: var(--accent);
  font-size: 27pt;
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: 0;
}

dl {
  display: grid;
  row-gap: 2.15mm;
  margin: 0 0 0 2mm;
}

dl div {
  display: grid;
  grid-template-columns: 49mm 1fr;
}

dt,
dd {
  margin: 0;
}

dd span,
.skill-values span {
  display: block;
}

.content {
  padding: 12.4mm 25.5mm 0;
}

.page-two-content {
  padding-top: 20.4mm;
}

.cv-section {
  margin: 0 0 8mm;
}

.cv-section h2 {
  margin: 0 0 6mm;
  color: #000;
  font-size: 18pt;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0;
}

.entry {
  display: grid;
  grid-template-columns: 48.8mm 1fr;
  column-gap: 0;
  margin-bottom: 3.1mm;
}

.entry-meta {
  padding-top: 0.3mm;
}

.entry-meta div:first-child,
.entry-meta div:nth-child(2),
.entry-subtitle {
  font-style: italic;
}

.entry-title {
  color: #000;
  font-weight: 400;
}

.entry-title-highlight {
  color: #000;
  font-weight: 600;
}

.entry-title-highlight + .entry-subtitle,
.entry-title-highlight ~ ul {
  color: #202a3a;
}

ul {
  margin: 0.2mm 0 0;
  padding-left: 4.7mm;
}

li {
  margin: 0;
  padding-left: 1mm;
}

.continuation {
  margin-bottom: 7mm;
}

.skills-section {
  margin-top: 8.5mm;
}

.skill-row {
  display: grid;
  grid-template-columns: 48.8mm 1fr;
  margin-bottom: 8.3mm;
}

.skill-row:last-child {
  margin-bottom: 0;
}

.page-number {
  position: absolute;
  right: 25.5mm;
  bottom: 6.5mm;
  color: var(--accent);
  font-size: 10pt;
}

.motivation-content {
  padding: 10.5mm 25.5mm 0;
  font-size: 10.5pt;
  line-height: 1.34;
}

.letter-header {
  display: grid;
  grid-template-columns: 1fr 58mm;
  column-gap: 12mm;
  align-items: start;
  margin-bottom: 8.5mm;
}

.motivation-continuation {
  padding-top: 20.4mm;
}

.letter-sender {
  line-height: 1.42;
}

.letter-sender span,
.letter-signature span {
  display: block;
}

.letter-sender strong {
  display: block;
  color: #000;
  font-weight: 600;
}

.letter-date {
  color: #000;
  text-align: right;
}

.letter-body h1 {
  margin: 0 0 6.5mm;
  color: var(--accent);
  font-size: 20.5pt;
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: 0;
}

.letter-body p {
  margin: 0 0 3mm;
  hyphens: auto;
  text-align: justify;
  text-align-last: left;
}

.letter-signature {
  margin-top: 4.5mm;
}

.letter-signature strong {
  display: block;
  margin-top: 4.5mm;
  color: #000;
  font-weight: 400;
}

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

@media print {
  html,
  body {
    width: 210mm;
    background: #fff;
  }

  .preview {
    display: block;
    padding: 0;
  }

  .page {
    width: 210mm;
    min-height: 297mm;
    margin: 0;
    box-shadow: none;
    break-after: page;
  }

  .page:last-child {
    break-after: auto;
  }

}
