@import url("https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,200..600;1,600&display=swap");

:root {
  --base: #fff;
  --bg: #d4e5f6;
  --bg-lite: #f0f8ff;
  --bg-shadow: #ddd;
  --emphasis: #004177;
  --text: #000;
  --subheader: #000;
}

@media screen {
  .dark-theme {
    --base: #101010;
    --bg: #042240;
    --bg-lite: #0d375c;
    --bg-shadow: #000;
    --emphasis: #efdb6d;
    --text: #d9d9d9;
    --subheader: #f3f3f3;
  }
}

body {
  background-color: var(--base);
  color: var(--text);
}

main {
  --page-margin: 1cm;
  --content-margin: 1rem;

  --text-small: 0.8rem;
  --text-large: 1.1rem;

  display: grid;
  font-family: "Raleway", sans-serif;
  font-size: 11pt;
  grid-auto-flow: column;
  grid-template-columns: 5rem 1fr;
  margin: auto;
  max-width: 900px;
  overflow: hidden;
  padding-bottom: 2rem;
  position: relative;

  & > * {
    position: relative;
  }

  &::before {
    background-color: var(--bg-lite);
    content: "";
    display: block;
    height: 59cm;
    left: 0;
    position: absolute;
    top: 0;
    width: 4.75rem;
    /*z-index: -1;*/
  }
}

h1,
h2 {
  color: var(--emphasis);
  font-weight: 250;
  letter-spacing: 0.1rem;
  line-height: 1;
  text-transform: uppercase;
}

h3,
h4 {
  color: var(--subheader);
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 1.5rem;
}

h3 {
  font-size: 1.25rem;
}

h4 {
  font-size: 1.1rem;
}

a {
  cursor: pointer;
}

a:not(:hover) {
  text-decoration: none;
}

strong {
  color: var(--emphasis);
  font-weight: 600;
}

header {
  background-color: var(--bg);
  grid-column: 1;
  height: 10rem;
  padding: var(--page-margin);
  width: 10rem;

  & h1,
  & h3 {
    margin: 0;
    white-space: nowrap;
  }
}

.contact {
  font-size: var(--text-small);
  font-variant-numeric: lining-nums;
  grid-column: 2;
  text-align: right;

  & ul {
    list-style: none;
    margin: 0;
    padding-right: var(--page-margin);
    padding-top: var(--page-margin);
  }
}

.about,
.education,
.skills,
.jobs,
.interests {
  grid-column: 2;

  & > * {
    padding-right: var(--page-margin);
  }

  & h2 {
    background-color: var(--bg);
    margin-left: -2.5rem;
    padding: 0.5rem 2.5rem;
  }

  & h4 {
    background-color: var(--bg);
    display: inline-block;

    font-variant-numeric: lining-nums;
    font-weight: 400;
    margin-left: -1.5rem;
    padding: 0.125rem 1.5rem;
  }

  & ul {
    list-style-type: square;
    margin-bottom: 0;
    padding-left: 1rem;

    p + & {
      margin-top: 0.25rem;
    }
  }

  & li {
    font-size: var(--text-small);
    font-weight: 300;

    &::marker {
      color: var(--emphasis);
    }
  }
}

.skills,
.education {
  & li strong {
    font-size: var(--text-large);
  }
}

@media print {
  body {
    margin: 0;
  }

  @page {
    margin: 0 !important;
  }

  .jobs .page-break {
    height: var(--page-margin);
  }
}

@media screen and (max-width: 600px) {
  main {
    grid-template-columns: 0.5rem 1fr;

    --page-margin: 0.5rem;

    &::after {
      display: none;
    }

    & h1 {
      font-size: 2rem;
    }
  }

  .contact {
    align-self: end;
    line-height: 1.1;
  }
}

@media screen {
  .paper {
    & main {
      box-shadow: 0 0 5px var(--bg-shadow);

      /* using printable dimensions, then rems in the inner styles */
      max-width: 21cm;
      background-repeat: repeat-y;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' stroke='red' width='21cm' height='29.7cm' %3E%3Cline x1='0' x2='100%' y1='100%' y2='100%' /%3E%3C/svg%3E%0A");
    }

    & .jobs .page-break {
      height: var(--page-margin);
    }
  }
}
