@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/InterVariable.woff2") format("woff2");
}

@font-face {
  font-family: Univers;
  src: url("fonts/universltstd-webfont.woff2") format("woff2"),
       url("fonts/universltstd-webfont.woff") format("woff");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: UniversBold;
  src: url("fonts/universltstd-bold-webfont.woff2") format("woff2"),
       url("fonts/universltstd-bold-webfont.woff") format("woff");
  font-weight: bold;
  font-style: normal;
}

@page {
  size: A4 portrait;
  margin: 1.35cm;
}

:root {
  --black: rgb(31, 31, 31);
  --grey: rgb(112, 112, 112);
  --grey-light: rgb(220, 220, 220);
  --orange: rgb(253, 113, 34);

  --left-col: 24ch;
  --right-col: 62ch;
  --column-gap: 0.55cm;

  --space-xxs: 0.06cm;
  --space-xs: 0.1cm;
  --space-s: 0.16cm;
  --space-m: 0.24cm;
  --space-l: 0.36cm;
  --space-xl: 0.5cm;
}

html,
body {
  -moz-osx-font-smoothing: auto;
  -webkit-font-smoothing: antialiased;
  font-smoothing: antialiased;
  text-rendering: geometricPrecision;
  font: 9.5pt / 1.32 Inter, system-ui, -apple-system, sans-serif;
  color: var(--black);
  margin: 0;
  padding: 0;
}

body {
  display: grid;
  grid-template-columns: var(--left-col) var(--right-col);
  column-gap: var(--column-gap);
  row-gap: var(--space-s);
}

/* Typography */

h1,
h2 {
  font-family: UniversBold, "Helvetica Neue", sans-serif;
  font-weight: bold;
  margin: 0;
  line-height: 1.15;
}

h3,
h4 {
  font-family: Univers, "Helvetica Neue", sans-serif;
  font-weight: normal;
  margin: 0;
  line-height: 1.2;
}

h1 {
  font-size: 16pt;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 10pt;
}

h3 {
  font-size: 9.5pt;
}

h4 {
  font-size: 9pt;
  color: var(--grey);
}

p {
  margin: 0;
  max-width: 60ch;
}

a,
a:hover,
a:visited,
a:focus {
  text-decoration: none;
  color: var(--black);
  outline: none;
}

/* Lists */

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

li {
  position: relative;
  margin: 0 0 var(--space-xs) 0;
  padding-left: 0.32cm;
}

li::before {
  content: "—";
  position: absolute;
  left: -0.08cm;
  color: var(--grey);
  font-weight: normal;
}

/* Shared grid */

header,
main {
  display: grid;
  grid-template-columns: subgrid;
  grid-column: 1 / -1;
  column-gap: 0;
}

header {
  align-items: baseline;
  row-gap: var(--space-xxs);
}

main {
  row-gap: var(--space-l);
}

/* Header */

header h1 {
  grid-column: 1;
}

header h2 {
  grid-column: 2;
  font-family: Univers, "Helvetica Neue", sans-serif;
  font-weight: normal;
  font-size: 11pt;
  padding-left: var(--space-s);
}

/* Sections */

main section {
  display: grid;
  grid-template-columns: subgrid;
  grid-column: 1 / -1;
  row-gap: var(--space-xs);
}

main section:not(#education) {
  padding-bottom: var(--space-m);
  border-bottom: 0.4pt solid var(--grey-light);
}

/* Default section placement */

section:not(#contact, #experience) h2,
section:not(#contact, #experience) h3 {
  grid-column: 1;
}

section:not(#contact, #experience) p,
section:not(#contact, #experience) > ul {
  grid-column: 2;
}

/* Profile */

#profile {
  grid-column: 2;
  row-gap: 0;
}

#profile h2 {
  display: none;
}

#profile p {
  grid-column: 2;
  padding-left: var(--space-s);
}

/* Contact */

#contact {
  grid-column: 1;
  grid-row: 1;
}

#contact h2,
#contact dt {
  display: none;
}

#contact dl,
#contact dt,
#contact dd {
  padding: 0;
  margin: 0;
}

#contact dd {
  display: block;
  line-height: 1.42;
}

/* Skills */

#skills {
  row-gap: var(--space-xs);
}

#skills h2 {
  display: none;
}

#skills h3 {
  margin: 0;
}

#skills ul {
  margin-bottom: var(--space-xs);
}

#skills li {
  margin-bottom: var(--space-xxs);
}

/* Experience */

#experience {
  display: grid;
  grid-template-columns: subgrid;
  row-gap: var(--space-s);
}

#experience h2 {
  grid-column: 1;
}

#experience ul.experience-list {
  display: grid;
  grid-template-columns: var(--left-col) var(--right-col);
  column-gap: var(--column-gap);
  grid-column: 1 / -1;
  row-gap: var(--space-s);
  list-style: none;
  margin: 0;
  padding: 0;
}

#experience ul.experience-list > li {
  display: grid;
  grid-template-columns: var(--left-col) var(--right-col);
  column-gap: var(--column-gap);
  grid-column: 1 / -1;
  row-gap: var(--space-xs);
  list-style: none;
  margin: 0;
  padding: 0;

  break-inside: avoid;
  page-break-inside: avoid;
  -webkit-column-break-inside: avoid;
}

#experience ul.experience-list > li::before {
  content: none;
}

.job-details {
  grid-column: 1;
  max-width: 22ch;
  text-wrap: balance;
}

.job-details h3 {
  margin-bottom: var(--space-xxs);
}

.job-details h4 {
  margin-bottom: var(--space-xs);
}

.job-description {
  grid-column: 2;
}

.job-description ul {
  margin: 0;
  padding: 0;
}

.job-description li {
  margin: 0 0 var(--space-xs) 0;
  padding-left: 0.32cm;
}

#experience {
  padding-bottom: 2em!important;
}

#education {
}

/* Print flow control */

h1,
h2,
h3,
h4 {
  page-break-after: avoid;
  break-after: avoid;
}

#experience ul.experience-list > li,
#education {
  page-break-inside: avoid;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
}

a[href]::after {
  content: "";
}