:root {
  --light: hsl(0 0% 97%);
  --dark: hsl(0, 0%, 0%, 0.9);
  --colour: #003638;
}

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

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  color: var(--dark);
  background-image: radial-gradient(hsl(0deg 8% 96%), hsl(0deg 8% 90%));
  background-attachment: fixed;
  font-family: "Source Sans Pro", sans-serif;
  font-size: 16px;
}

h1,
h2 {
  font-family: "Bebas Neue", sans-serif;
  font-weight: 400;
  margin: 0;
  line-height: 1;
}

h1 {
  font-size: 4em;
}

h2 {
  position: relative;
  display: inline-block;
  min-width: 250px;
  padding: 8px 16px 4px 32px;
  margin-top: 32px;
  margin-left: -32px;
  font-size: 2em;
  color: var(--light);
  background-color: var(--dark);
}

h2:first-child {
  margin-top: 0;
}

h2::after {
  content: "";
  position: absolute;
  top: 0;
  left: 100%;
  border-top: 22px solid transparent;
  border-bottom: 22px solid transparent;
  border-left: 22px solid var(--dark);
}

h3 {
  margin-top: 16px;
  margin-bottom: 0;
  font-size: 1.5em;
  font-weight: 400;
  color: hsl(0, 0%, 0%, 0.6);
}

a {
  color: hsl(210deg 100% 60%);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

p,
ul {
  margin-top: 16px;
  margin-bottom: 0;
}

li + li {
  margin-top: 4px;
}

.page {
  display: grid;
  grid-template-columns: 2fr 1fr;
  margin: 32px;
  background-color: var(--light);
  max-width: 1000px;
  box-shadow: 0 1px 2px 0 hsl(0, 0%, 0%, 0.1), 0 2px 10px 0 hsl(0, 0%, 0%, 0.1);
  border-radius: 2px;
}

.page > :nth-child(1) {
  grid-column: 1;
  grid-row: 1;
}

.page > .contact {
  grid-column: 2;
  grid-row: 1 / 3;
}

.page > :nth-child(3) {
  grid-column: 1;
  grid-row: 2;
}

header,
main {
  display: flex;
}

.content {
  padding-top: 32px;
  padding-right: 32px;
  padding-left: 32px;
}

.page > :last-child {
  padding-bottom: 32px;
}

.intro {
  margin-top: 16px;
}

.experience {
  margin-top: 16px;
}

.experience p {
    margin-top: 4px;
}
.experience ul {
    margin-top: 6px;
}

.name {
  font-weight: 600;
}

.secondary {
  color: var(--light);
  background-color: var(--colour);
}

.secondary h2 {
  background-color: var(--light);
  color: var(--colour);
  min-width: calc(100% + 32px);
}

.secondary h2::after {
  border-left-color: var(--light);
}

.contact {
  display: flex;
  flex-direction: column;
  row-gap: 16px;
  padding-top: 32px;
}

.contact > div:not(.skills) {
  display: flex;
  align-items: center;
}

.contact a {
  color: inherit;
}

.contact svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  margin-right: 8px;
}

.skills {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  row-gap: 8px;
  margin-top: 16px;
}

.skills div {
  display: flex;
  align-items: center;
}

.dot {
  width: 6px;
  height: 6px;
  margin-top: 1px;
  margin-right: 4px;
  background-color: currentColor;
  border-radius: 50%;
}

.dot:last-of-type {
  margin-right: 8px;
}

@media screen and (max-width: 750px) {
  .page {
    margin: 0;
    box-shadow: none;
  }
}

@media screen and (max-width: 650px) {
  .page {
    grid-template-columns: 1fr;
  }

  .page > :nth-child(1),
  .page > .contact,
  .page > :nth-child(3) {
    grid-column: 1;
    grid-row: auto;
  }

  .contact {
    order: 4;
    position: relative;
    padding-top: 64px;
    padding-bottom: 32px;
  }

  .contact::before {
    position: absolute;
    content: "";
    height: 1px;
    top: 32px;
    right: 32px;
    left: 32px;
    border-top: 1px solid rgb(255 255 255 / 10%);
  }
}

.no {
  opacity: 0.25;
}

@media print {
  :root {
    --light: #fff;
  }

  body {
    background-image: none;
    font-size: 12px;
  }

  h1 {
    font-size: 2.5em;
  }

  h2 {
    font-size: 1.5em;
    margin-top: 16px;
    padding: 4px 12px 2px 16px;
    margin-left: -16px;
  }

  h2::after {
    display: none;
  }

  .page {
    display: block;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    box-shadow: none;
    border-radius: 0;
    overflow: hidden;
  }

  .page > .contact {
    float: right;
    width: 34%;
    clear: right;
  }

  .page > :nth-child(1) {
    float: left;
    width: 64%;
  }

  .page > :nth-child(3) {
    clear: both;
    width: 100%;
    float: none;
  }

  .content {
    padding: 8px 16px;
  }

  .content:nth-last-child(2) {
    padding-bottom: 8px;
  }

  .secondary {
    background-color: transparent;
    color: var(--dark);
  }

  .contact {
    row-gap: 8px;
    padding: 12px 16px;
  }

  .contact::after {
    display: none;
  }

  .contact svg {
    width: 16px;
    height: 16px;
  }

  p,
  ul {
    margin-top: 6px;
  }

  .experience {
    margin-top: 6px;
  }

  .experience ul {
    margin-top: 4px;
  }

  .intro {
    margin-top: 6px;
  }

  .skills {
    row-gap: 4px;
    margin-top: 8px;
  }

  .dot {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  section,
  .experience {
    break-inside: avoid;
  }

  .page-break {
    break-before: page;
    page-break-before: always;
  }

  h2 {
    break-after: avoid;
  }

  a {
    color: var(--dark);
  }

  .contact a {
    color: inherit;
  }

}
