:root {
  --accent: #20349f;
  --accent-muted: #0f6e56;
  --fg: #1a1a1a;
  --fg-muted: #4b5563;
  --rule: #d1d5db;
  --icon-size: 15px;
}

@page {
  size: A4;
  margin: 1cm 1.4cm;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 8pt;
  color: var(--fg);
  line-height: 1.45;
}

a {
  color: var(--fg);
  text-decoration: none;
}

@media screen {
  a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
  }
}

.cv-heading {
  margin-bottom: 0.3em;
}

.cv-name {
  font-family: "IBM Plex Mono", monospace;
  font-size: 25pt;
  font-weight: 700;
  color: var(--fg);
  margin: 0;
  line-height: 1;
  margin-bottom: 0.05em;
}

.contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2em;
  margin-top: -0.25em;
  margin-bottom: -0.5em;
}

.contact-entry {
  display: inline-flex;
  align-items: center;
  gap: 0.25em;
  white-space: nowrap;
}

.contact-entry svg {
  width: var(--icon-size);
  height: var(--icon-size);
  color: var(--accent);
}

.contact-entry span,
.contact-entry a {
  font-weight: 700;
  font-size: 8pt;
  color: var(--fg);
  text-decoration: none;
}

.cv-section {
  margin-top: 0.7em;
}

.section-heading {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12pt;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0.35em 0 0;
  padding-bottom: 0.15em;
  border-bottom: 1px solid var(--rule);
}

.summary {
  font-size: 8pt;
  line-height: 1.35;
  margin: 0.25em 0 0.1em;
}

.skills-inline {
  font-size: 8pt;
  line-height: 1.35;
  margin: 0.25em 0 0.1em;
}

.skill-name {
  color: var(--accent-muted);
  font-weight: 700;
  font-size: 8pt;
  margin-right: 0.35em;
}

.skill-keywords {
  font-size: 8pt;
}

.company-name {
  font-size: 9.5pt;
  font-weight: 700;
  color: var(--accent-muted);
  margin: 0.3em 0 0.1em;
}

.section-heading + .company-name {
  margin-top: 0.05em;
}

.job {
  margin-left: 0.75em;
  margin-bottom: 0.5em;
}

.job-header {
  display: flex;
  justify-content: flex-start;
  align-items: baseline;
  gap: 0.25em;
  margin: 0.15em 0;
}

.separator {
  color: var(--fg-muted);
  font-weight: 400;
}

.job-title {
  color: var(--fg);
  font-size: 8.5pt;
  font-weight: 800;
}

.job-title a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 2px;
}

.job-dates {
  color: var(--fg-muted);
  font-size: 7pt;
  font-weight: 500;
  white-space: nowrap;
  font-style: italic;
}

.job-summary {
  font-size: 8pt;
  margin: 0.15em 0;
  line-height: 1.35;
}

.job-highlights {
  list-style: disc;
  margin-left: 1.2em;
  margin-top: 0.1em;
  font-size: 8pt;
}

.job-highlights li {
  margin-bottom: 0.15em;
  line-height: 1.3;
}

@media screen {
  html {
    background-color: #f3f4f6;
  }
  body {
    max-width: 21cm;
    margin: 2rem auto;
    padding: 1cm 1.5cm;
    background-color: #ffffff;
    box-shadow:
      0 4px 6px -1px rgba(0, 0, 0, 0.1),
      0 2px 4px -1px rgba(0, 0, 0, 0.06);
  }
}

@media screen {
  @media (prefers-color-scheme: dark) {
    html {
      background-color: #1a1a1a;
    }
  }

  @media (max-width: 800px) {
    body {
      margin: 0;
      width: 100%;
      box-shadow: none;
      padding: 1.5rem 1rem;
    }
  }

  @media (max-width: 600px) {
    .job-header {
      flex-wrap: wrap;
    }
    .job-header .separator {
      display: none;
    }
    .job-dates {
      flex-basis: 100%;
      white-space: normal;
    }
    .cv-name {
      font-size: 18pt;
    }
  }
}

@media screen {
  .contacts {
    margin-top: 0.3em;
  }
}

@media print {
  .cv-heading {
    margin-bottom: 0.2em;
  }

  .cv-name {
    font-size: 22pt;
    margin-bottom: 0.04em;
  }

  .contacts {
    gap: 0.8em;
    margin-top: -0.1em;
    margin-bottom: -0.2em;
  }

  body {
    font-size: 8pt;
    line-height: 1.4;
  }

  .summary {
    font-size: 8pt;
    line-height: 1.35;
    margin: 0.2em 0 0.1em;
  }

  .cv-section {
    break-inside: auto;
    margin-top: 0.4em;
  }
  .section-heading {
    font-size: 11pt;
    break-after: avoid;
    margin-top: 0.12em;
    margin-bottom: 0;
    padding-bottom: 0.1em;
  }
  .company-name {
    break-after: avoid;
    font-size: 8.5pt;
    margin: 0.15em 0 0.08em;
  }
  .job {
    margin-bottom: 0.18em;
    margin-left: 0.6em;
  }
  .job + .job {
    margin-top: 0.08em;
  }
  .job-header {
    break-after: avoid;
    margin: 0.1em 0;
  }
  .job-title {
    font-size: 8pt;
  }
  .job-dates {
    font-size: 6.5pt;
  }
  .job-summary {
    font-size: 8pt;
    margin: 0.1em 0;
    line-height: 1.3;
  }
  .job-highlights {
    margin-top: 0.05em;
    margin-left: 1em;
  }
  .job-highlights li {
    margin-bottom: 0.1em;
    line-height: 1.3;
  }
  .skills-inline {
    font-size: 8pt;
    line-height: 1.3;
    margin: 0.12em 0 0.06em;
  }
  .skill-name {
    font-size: 8pt;
  }
  .company-name {
    break-after: avoid;
    font-size: 8.5pt;
    margin: 0.15em 0 0.08em;
  }
  .job {
    margin-bottom: 0.18em;
    margin-left: 0.6em;
  }
  .job + .job {
    margin-top: 0.08em;
  }
  .job-header {
    break-after: avoid;
    margin: 0.1em 0;
  }
  .job-title {
    font-size: 8pt;
  }
  .job-dates {
    font-size: 6.5pt;
  }
  .job-summary {
    font-size: 8pt;
    margin: 0.1em 0;
    line-height: 1.3;
  }
  .job-highlights {
    margin-top: 0.05em;
    margin-left: 1em;
  }
  .job-highlights li {
    margin-bottom: 0.1em;
    line-height: 1.3;
  }
  .skills-inline {
    font-size: 8pt;
    line-height: 1.3;
    margin: 0.12em 0 0.06em;
  }
  .skill-name {
    font-size: 8pt;
  }
  .certifications {
    font-size: 8pt;
    margin-top: 0.06em;
  }
}
