:root {
  --Moderate-violet: hsl(263, 55%, 52%);
  --Light-violet: hsl(264, 82%, 70%);
  --Very-dark-grayish-blue: hsl(217, 19%, 35%);
  --Very-dark-blackish-blue: hsl(219, 29%, 14%);
  --White: hsl(0, 0%, 100%);
  --Light-White-50: hsl(0, 0%, 100%, 50%);
  --Light-White-70: hsl(0, 0%, 100%, 70%);
  --Light-grayish-blue: hsl(210, 46%, 95%);
  --sp-xs: 0.25em;
  --sp-sm: 0.5em;
  --sp-md: 0.75em;
  --sp-lg: 1em;
  --sp-2xlg: 1.5em;
  --sp-3xlg: 1.75em;
  --sp-4xlg: 2em;
  --sp-5xlg: 2.25em;
  --sp-6xlg: 2.5em;
  --sp-7xlg: 3em;
  --sp-8xlg: 4em;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 1rem;
  font-family: "Barlow Semi Condensed";
}

body {
  background-color: var(--Light-grayish-blue);
}

section {
  max-inline-size: 327px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr;
  row-gap: var(--sp-2xlg);
  margin-block: var(--sp-7xlg);
}

@media screen and (min-width: 1440px) {
  section {
    max-inline-size: 1100px;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: auto auto;
    column-gap: var(--sp-4xlg);
  }

  .user-1 {
    grid-column: 1/3;
    padding-bottom: 0;
  }

  .user-2 {
    grid-column: 3/4;
  }

  .user-5 {
    grid-column: 4/5;
    grid-row: 1/-1;
  }

  .user-4 {
    grid-column: 2/4;
  }
}

.card {
  border-radius: 8px;
  padding-inline: var(--sp-4xlg);
  padding-block: var(--sp-3xlg);
  &.user-1 {
    background-color: var(--Moderate-violet);
    position: relative;

    & .quotation {
      position: absolute;
      z-index: 1;
      top: 0;
      right: 20px;
      width: 105px;
    }

    & .testimonial {
      position: relative;
      z-index: 3;
      margin-block-start: var(--sp-md);
      font-weight: 600;
      font-size: 1.25rem;
      color: var(--White);
      line-height: 1.5;
    }

    & .bio {
      margin-block-start: var(--sp-5xlg);
      font-weight: 500;
      font-size: 0.8125rem;
      line-height: 1.75;
      color: var(--Light-White-70);
    }
  }

  &.user-2 {
    background-color: var(--Very-dark-grayish-blue);
    & .profile-container {
      & .profile-img {
        border: none;
      }
    }
    & .testimonial {
      margin-block-start: var(--sp-md);
      font-weight: 600;
      font-size: 1.25rem;
      color: var(--White);
      line-height: 1.5;
    }

    & .bio {
      margin-block-start: var(--sp-lg);
      font-weight: 500;
      font-size: 0.8125rem;
      line-height: 1.75;
      color: var(--Light-White-70);
    }
  }

  &.user-3 {
    background-color: var(--White);
    box-shadow: 40px 60px 50px -47px rgba(72, 85, 106, 0.2474);
    & .profile-container {
      & .profile-img {
        border: none;
      }
      & .profile-info {
        & .profile-name {
          color: var(--Very-dark-blackish-blue);
          font-weight: 500;
          line-height: 0.8125;
          font-size: 0.8125rem;
        }

        & .profile-tag {
          color: rgba(85, 106, 100, 0.5);
          font-weight: 500;
          line-height: 0.6875;
          font-size: 0.6875rem;
        }
      }
    }

    & .testimonial {
      margin-block-start: var(--sp-xs);
      font-weight: 600;
      font-size: 1.25rem;
      color: rgba(72, 85, 106, 1);
      line-height: 1.3;
    }

    & .bio {
      margin-block-start: var(--sp-lg);
      font-weight: 500;
      font-size: 0.8125rem;
      line-height: 1.75;
      color: rgba(72, 85, 106, 0.7);
    }
  }

  &.user-4 {
    background-color: var(--Very-dark-blackish-blue);

    & .profile-container {
      & .profile-info {
        & .profile-name {
          color: var(--White);
          font-weight: 500;
          line-height: 0.8125;
          font-size: 0.8125rem;
        }

        & .profile-tag {
          color: var(--Light-White-50);
          font-weight: 500;
          line-height: 0.6875;
          font-size: 0.6875rem;
        }
      }
    }

    & .testimonial {
      margin-block-start: var(--sp-xs);
      font-weight: 600;
      font-size: 1.25rem;
      color: var(--Light-grayish-blue);
      line-height: 1.3;
    }

    & .bio {
      margin-block-start: var(--sp-lg);
      font-weight: 500;
      font-size: 0.8125rem;
      line-height: 1.75;
      color: var(--Light-White-70);
    }
  }

  &.user-5 {
    background-color: var(--White);
    box-shadow: 40px 60px 50px -47px rgba(72, 85, 106, 0.2474);
    & .profile-container {
      & .profile-img {
        border: none;
      }

      & .profile-info {
        & .profile-name {
          color: var(--Very-dark-blackish-blue);
          font-weight: 500;
          line-height: 0.8125;
          font-size: 0.8125rem;
        }

        & .profile-tag {
          color: rgba(85, 106, 100, 0.5);
          font-weight: 500;
          line-height: 0.6875;
          font-size: 0.6875rem;
        }
      }
    }

    & .testimonial {
      margin-block-start: var(--sp-xs);
      font-weight: 600;
      font-size: 1.25rem;
      color: rgba(72, 85, 106, 1);
      line-height: 1.3;
    }

    & .bio {
      margin-block-start: var(--sp-lg);
      font-weight: 500;
      font-size: 0.8125rem;
      line-height: 1.75;
      color: rgba(72, 85, 106, 0.7);
    }
  }

  & .profile-container {
    display: flex;
    align-items: center;
    column-gap: var(--sp-lg);

    & .profile-info {
      display: flex;
      flex-direction: column;
      gap: var(--sp-sm);

      & .profile-name {
        color: var(--White);
        font-weight: 500;
        line-height: 0.8125;
        font-size: 0.8125rem;
      }

      & .profile-tag {
        color: var(--Light-White-50);
        font-weight: 500;
        line-height: 0.6875;
        font-size: 0.6875rem;
      }
    }

    & .profile-img {
      max-inline-size: var(--sp-5xlg);
      block-size: auto;
      height: 35px;
      width: 35px;
      border-radius: 50%;
      border: 2px solid var(--Light-violet);
    }
  }
}
