:root {
  /* Layout */
  --layout-mobile: 375px;
  --layout-desktop: 1440px;

  /* Colors */
  --color-purple-50: hsl(260, 100%, 95%);
  --color-purple-300: hsl(264, 82%, 80%);
  --color-purple-500: hsl(263, 55%, 52%);
  --color-white: hsl(0, 0%, 100%);
  --color-grey-100: hsl(214, 17%, 92%);
  --color-grey-200: hsl(0, 0%, 81%);
  --color-grey-400: hsl(224, 10%, 45%);
  --color-grey-500: hsl(217, 19%, 35%);
  --color-dark-blue: hsl(219, 29%, 14%);
  --color-black: hsl(0, 0%, 7%);

  /* Typography */
  /* - Weights: 500, 600 */
  --typography-font-size: 13px;
  --typography-font-family: "Barlow Semi Condensed";
}

* {
  margin: 0;
  padding: 0;

  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 1029px;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  background-color: rgb(245, 245, 245);

  font-family: var(--typography-font-family);
}

p {
  font-size: var(--typography-font-size);
}

main {
  padding-block: 72px;
  max-width: 306px;
}

.card {
  position: relative;

  background-color: var(--color-white);
  color: var(--color-black);

  border-radius: 8px;

  padding: 32px 32px 32px 32px;
  margin-bottom: 32px;

  box-shadow: 38px 60px 32px 0px var(--color-grey-200);
}

.card:last-child {
  margin-bottom: 0;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  border-radius: inherit;
}

.card:hover::after {
  background-color: rgba(0, 0, 0, 0.1);
}

.card-link {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.color-light {
  color: var(--color-white);
}

.author {
  margin-bottom: 16px;
}

hgroup h1 {
  font-size: 20px;
  font-weight: 500;
  line-height: 1.5rem;

  margin-bottom: 16px;
}

hgroup p {
  letter-spacing: 0.2px;
  font-weight: 300;
  line-height: 1.1rem;
}

.author-photo,
.author-data {
  display: inline-block;
  vertical-align: middle;
}

.author-photo {
  width: 32px;
  margin-right: 12px;
  border-radius: 50%;
  border: 2px solid var(--color-grey-200);
  overflow: hidden;
}

.border-purple {
  border-color: var(--color-purple-500);
}

.author-photo img {
  width: 100%;
  height: 100%;

  object-fit: cover;
  vertical-align: middle;
}

.author-bio {
  font-weight: 100;
  font-size: 11px;
}

#daniel {
  background-color: var(--color-purple-500);
}

#jonathan {
  background-color: var(--color-grey-500);
}

#patrick {
  background-color: var(--color-black);
}


.background-icon {
  display: none;
}

@media (min-width: 420px) {
  main {
    margin-top: 86px;
    max-width: 500px;
    margin-inline: auto;
    display: grid;
    grid-template-areas:
      "first  first"
      "second third"
      "forth  forth"
      "fifth  fifth";
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: stretch;
  }

  .card {
    margin-bottom: 0;
  }

  #daniel {
    grid-area: first;
  }

  #junathan {
    grid-area: second;
  }

  #jeanette {
    grid-area: third;
  }

  #patrick {
    grid-area: forth;
  }

  #kira {
    grid-area: fifth;
  }

  .background-icon {
    display: inline-block;
    position: absolute;
    top: 0;
    right: 60px;
    z-index: 0;
  }

  .background-icon ~ .author,
  .background-icon ~ hgroup {
    position: relative;

    z-index: 1;
  }
}

@media (min-width: 960px) {
  main {
    margin-top: 28px;

    max-width: 1120px;
    grid-template-areas:
      "first first second fifth"
      "third forth forth  fifth";
    grid-template-columns: 1fr 1fr 1fr 1fr;
    row-gap: 28px;
  }
}
