:root {
  color-scheme: light dark;

  --background-color: #fbfbfb;
  --text-color: #333333;

  --text-small: 0.85rem;

  --space-0: 5rem;
  --space-1: 2rem;
  --space-2: 1rem;
  --space-3: 0.5rem;
}

@media screen and (prefers-color-scheme: dark) {
  :root {
    --background-color: #061826;
    --text-color: #d6d6d6;
  }
}

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

* {
  margin: 0;
}

a {
  text-underline-offset: 0.2rem;
}

p,
h1,
h2,
h3,
h4,
li {
  overflow-wrap: break-word;
}

p,
li {
  text-wrap: pretty;
}

p,
ul {
  margin-bottom: var(--space-2);
}

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

h1,
h2,
h3,
h4 {
  font-family: "Geologica", sans-serif;
  text-wrap: balance;
}

h1 {
  font-size: 3.8rem;
  font-weight: 800;
  margin-bottom: var(--space-2);
}

h2 {
  font-size: 2.4rem;
  font-weight: 800;

  margin-top: var(--space-1);
  margin-bottom: var(--space-2);
}

h3 {
  font-size: 1.4rem;
  font-weight: 700;
}

h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: var(--space-3);
}

html {
  font-size: 115%;

  padding-top: var(--space-0);
  padding-bottom: var(--space-0);
}

body {
  -webkit-font-smoothing: antialiased;

  background: var(--background-color);
  color: var(--text-color);
  font-family: "SN Pro", sans-serif;
  font-synthesis: none;
  line-height: 1.4;
  margin-inline: auto;
  width: min(72ch, 100% - 2rem);
}

#employments > section,
#education > section {
  margin-bottom: var(--space-1);
}

.dates {
  font-size: var(--text-small);
  font-weight: 500;
  margin-bottom: var(--space-3);
}

.organisation {
  border-bottom: 1px solid lightgray;
  font-weight: 500;
  padding-bottom: var(--space-3);
}

.project + .project {
  margin-top: var(--space-1);
}

.tags {
  font-size: var(--text-small);
  margin-bottom: 0;
}

@media screen {
  h1,
  h2,
  h3,
  h4 {
    letter-spacing: -0.05rem;
  }

  .print-only,
  .sep {
    display: none;
  }

  .location {
    width: 100%;
  }

  .contact {
    column-gap: 1.2rem;
    display: flex;
    flex-wrap: wrap;
    row-gap: 1rem;
  }

  .contact li {
    min-width: 0;
  }

  .contact a {
    align-items: center;
    column-gap: 0.2rem;
    display: inline-flex;
  }

  .contact svg {
    flex-shrink: 0;
    height: 1.4em;
    width: 1.4em;
  }

  #employments > section,
  #education > section {
    align-items: baseline;
    column-gap: 1rem;
    display: flex;
    flex-wrap: wrap;
  }

  .dates {
    flex: 0 0 22ch;
  }

  .detail {
    flex: 1 1 40ch;
  }

  .tags {
    display: flex;
    flex-flow: row wrap;
    gap: 0.6rem;
    text-transform: lowercase;
  }

  .tag {
    background-color: #f3de8a;
    border-radius: 0.4rem;
    color: #444;
    font-weight: 500;
    padding: 0.05rem 0.6rem;
  }
}

@font-face {
  font-display: swap;
  font-family: "Geologica";
  font-style: normal;
  font-weight: 100;
  src: url("fonts/geologica/geologica-v5-latin_latin-ext-100.woff2")
    format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "Geologica";
  font-style: normal;
  font-weight: 200;
  src: url("fonts/geologica/geologica-v5-latin_latin-ext-200.woff2")
    format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "Geologica";
  font-style: normal;
  font-weight: 300;
  src: url("fonts/geologica/geologica-v5-latin_latin-ext-300.woff2")
    format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "Geologica";
  font-style: normal;
  font-weight: 400;
  src: url("fonts/geologica/geologica-v5-latin_latin-ext-regular.woff2")
    format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "Geologica";
  font-style: normal;
  font-weight: 500;
  src: url("fonts/geologica/geologica-v5-latin_latin-ext-500.woff2")
    format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "Geologica";
  font-style: normal;
  font-weight: 600;
  src: url("fonts/geologica/geologica-v5-latin_latin-ext-600.woff2")
    format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "Geologica";
  font-style: normal;
  font-weight: 700;
  src: url("fonts/geologica/geologica-v5-latin_latin-ext-700.woff2")
    format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "Geologica";
  font-style: normal;
  font-weight: 800;
  src: url("fonts/geologica/geologica-v5-latin_latin-ext-800.woff2")
    format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "Geologica";
  font-style: normal;
  font-weight: 900;
  src: url("fonts/geologica/geologica-v5-latin_latin-ext-900.woff2")
    format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "SN Pro";
  font-style: normal;
  font-weight: 200;
  src: url("fonts/sn-pro/sn-pro-v1-latin_latin-ext-200.woff2") format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "SN Pro";
  font-style: italic;
  font-weight: 200;
  src: url("fonts/sn-pro/sn-pro-v1-latin_latin-ext-200italic.woff2")
    format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "SN Pro";
  font-style: normal;
  font-weight: 300;
  src: url("fonts/sn-pro/sn-pro-v1-latin_latin-ext-300.woff2") format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "SN Pro";
  font-style: italic;
  font-weight: 300;
  src: url("fonts/sn-pro/sn-pro-v1-latin_latin-ext-300italic.woff2")
    format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "SN Pro";
  font-style: normal;
  font-weight: 400;
  src: url("fonts/sn-pro/sn-pro-v1-latin_latin-ext-regular.woff2")
    format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "SN Pro";
  font-style: italic;
  font-weight: 400;
  src: url("fonts/sn-pro/sn-pro-v1-latin_latin-ext-italic.woff2")
    format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "SN Pro";
  font-style: normal;
  font-weight: 500;
  src: url("fonts/sn-pro/sn-pro-v1-latin_latin-ext-500.woff2") format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "SN Pro";
  font-style: italic;
  font-weight: 500;
  src: url("fonts/sn-pro/sn-pro-v1-latin_latin-ext-500italic.woff2")
    format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "SN Pro";
  font-style: normal;
  font-weight: 600;
  src: url("fonts/sn-pro/sn-pro-v1-latin_latin-ext-600.woff2") format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "SN Pro";
  font-style: italic;
  font-weight: 600;
  src: url("fonts/sn-pro/sn-pro-v1-latin_latin-ext-600italic.woff2")
    format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "SN Pro";
  font-style: normal;
  font-weight: 700;
  src: url("fonts/sn-pro/sn-pro-v1-latin_latin-ext-700.woff2") format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "SN Pro";
  font-style: italic;
  font-weight: 700;
  src: url("fonts/sn-pro/sn-pro-v1-latin_latin-ext-700italic.woff2")
    format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "SN Pro";
  font-style: normal;
  font-weight: 800;
  src: url("fonts/sn-pro/sn-pro-v1-latin_latin-ext-800.woff2") format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "SN Pro";
  font-style: italic;
  font-weight: 800;
  src: url("fonts/sn-pro/sn-pro-v1-latin_latin-ext-800italic.woff2")
    format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "SN Pro";
  font-style: normal;
  font-weight: 900;
  src: url("fonts/sn-pro/sn-pro-v1-latin_latin-ext-900.woff2") format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "SN Pro";
  font-style: italic;
  font-weight: 900;
  src: url("fonts/sn-pro/sn-pro-v1-latin_latin-ext-900italic.woff2")
    format("woff2");
}

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

@media print {
  :root {
    --space-0: 3rem;
    --space-1: 2rem;
    --space-2: 1rem;
    --space-3: 0.5rem;
  }

  html {
    font-size: 100%;
    padding: 0;
  }

  body {
    background: none;
    font-variant-ligatures: none;
    width: auto;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.4rem;
    text-transform: uppercase;
  }

  h3 {
    font-size: 1.2rem;
  }

  h1,
  h2,
  h3,
  .dates {
    break-after: avoid;
  }

  .organisation + .project {
    break-before: avoid;
  }

  p,
  li {
    break-inside: avoid;
  }

  a {
    color: inherit;
  }

  strong.print-only {
    font-family: "Geologica", sans-serif;
  }

  .contact svg,
  .pdf,
  .screen-only {
    display: none;
  }

  .contact li,
  .dates,
  .tag {
    white-space: nowrap;
  }

  .dates {
    margin-bottom: 0;
  }

  .tags {
    break-before: avoid;
    text-wrap: balance;
  }
}
