:root {
  /* Colours */

  /* Primary */

  --moderate-violet: hsl(263, 55%, 52%);
  --very-dark-grayish-blue: hsl(217, 19%, 35%);
  --very-dark-blackish-blue: hsl(219, 29%, 14%);
  --white: hsl(0, 0%, 100%);

  /* Neutral */

  --light-gray: hsl(0, 0%, 81%);
  --light-grayish-blue: hsl(210, 46%, 95%);

  /* Typography */

  --font-medium-weight: 500;
  --font-semi-bold: 600;
}

/* Basic reset */

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

* {
  margin: 0;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-color: var(--light-grayish-blue);
  font-family: "Barlow Semi Condensed", system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell,
    "Open Sans", "Helvetica Neue", sans-serif;
  font-weight: var(--font-medium-weight);
  color: var(--white);
  -webkit-font-smoothing: antialiased;
}

/* Font sizing, weight and opacity */

h2 {
  font-size: 1.25rem;
  font-weight: var(--font-semi-bold);
}

blockquote + blockquote {
  opacity: 50%;
}

blockquote + blockquote,
.name {
  font-size: 0.813rem;
}

.title {
  font-size: 0.688rem;
  opacity: 50%;
}

/* Card font and background colours */

.card1 {
  background-color: var(--moderate-violet);
}

.card1 blockquote:first-of-type {
  position: relative;
  z-index: 1;
}

.card1::after {
  content: url("./images/bg-pattern-quotation.svg");
  position: absolute;
  top: 0;
  right: 1.75rem;
}

.card2 {
  background-color: var(--very-dark-grayish-blue);
}

.card4 {
  background-color: var(--very-dark-blackish-blue);
}

.card3,
.card5 {
  background-color: var(--white);
  color: var(--very-dark-grayish-blue);
}

.card4 blockquote:first-of-type {
  color: var(--light-grayish-blue);
}

.card1 blockquote:last-of-type {
  color: var(--light-gray);
}

/* Card padding / margins /  border radius / box shadow*/

.card {
  padding: 1.625rem 2rem 2rem 2rem;
  box-shadow: 40px 60px 50px -47px rgba(72, 85, 106, 0.247378);
  border-radius: 0.5rem;
  position: relative;
}

.card blockquote:first-of-type {
  margin: 1.1rem 0 2.5rem 0;
}

/* Profile pic */

img {
  border-radius: 50%;
}

.card4 img {
  border: 2px solid #733fc8;
}

.card1 img {
  border: 2px solid #a775f1;
}

/* user details */

.user {
  display: flex;
  align-items: center;
  column-gap: 1rem;
}

.user-details {
  display: flex;
  flex-direction: column;
}

/* Layout */

.main-container {
  display: grid;
  max-width: 1100px;
  row-gap: 1.5rem;
  padding: 4.5rem 1.5rem;
}

@media screen and (min-width: 700px) {
  .main-container {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
    gap: 1.5rem;
  }

  .card blockquote:first-of-type {
    margin-bottom: 1.5rem;
  }

  .card1,
  .card3 {
    grid-column: 1 / 2;
  }

  .card2,
  .card4 {
    grid-column: 2 / 3;
  }

  .card5 {
    grid-column: 1 / 3;
  }
}

@media screen and (min-width: 900px) {
  .main-container {
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(2, auto);
  }

  .card1 {
    grid-column: 1 / 5;
  }

  .card2 {
    grid-column: 5 / 7;
  }

  .card3 {
    grid-column: 1 / 3;
  }

  .card4 {
    grid-column: 3 / 7;
  }

  .card5 {
    grid-area: 1 / 7 / 3 / 9;
  }

  .card1::after {
    right: 4.5rem;
  }
}
