@import url('https://fonts.googleapis.com/css2?family=PT+Serif&family=Vollkorn&display=swap');

:root {
  --horizontal-margin: 14vw;
}

@media only screen and (max-width: 992px) {
  :root {
    --horizontal-margin: 5vw;
  }
}

/* Header */
header {
  min-height: 20vmin;
  margin: 10vh var(--horizontal-margin, 20vw);

  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  align-items: center;
  justify-content: space-between;
  gap: 2em;
}

header h1 {
  font-size: 36px;
}

section {
  font-size: 18px;
  line-height: 27px;
}

section h2 {
  margin-bottom: 10px;
  text-transform: uppercase;
}

@media only screen and (max-width: 992px) {
  section p {
    font-size: 14px;
    line-height: 21px;
  }
}

/* Main */
main {
  min-height: 75vh;
  margin: 0 var(--horizontal-margin, 20vw);
  margin-bottom: 5vh;

  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 80px;
}

main > *:nth-child(3n - 1) > .card-wrapper {
  margin-top: 50px;
}

.card-wrapper {
  display: flex;
}

.avatar p {
  font-size: 18px;
  font-weight: 600;
}

.role {
  writing-mode: vertical-lr;
  text-transform: uppercase;
  font-size: 12px;
}

@media only screen and (max-width: 600px) {
  main {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  main > *:nth-child(3n - 1) > .card-wrapper {
    /* reset the margin applied on larger screens */
    margin-top: 0;
  }

  main > *:nth-child(2n + 2) .card-wrapper {
    margin-top: 40px;
  }

  .avatar p {
    font-size: 14px;
  }

  .role {
    font-size: 10px;
  }
}

/* Footer */
footer {
  height: 5vh;

  display: flex;
  align-items: flex-end;
  justify-content: center;
  text-align: center;
  margin-bottom: 1rem;
  color: #a9a9a9;
}

footer a {
  color: #a9a9a9;
  text-decoration: underline;
}
