@import url("https://fonts.googleapis.com/css2?family=Barlow+Semi+Condensed:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");

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

body {
  font-family: "Barlow Semi Condensed", sans-serif;
  background-color: #f5f5f6;
  font-size: 14px;
}

.main {
  margin: 4rem 9rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

div {
  border-radius: 8px;
}

h2 {
  position: relative;
  font-size: 19px;
  font-weight: 600;
  margin: 1rem 0;
  z-index: 1;
}

.main .three-col {
  grid-column: span 3;
  width: 100%;
}

.main .three-col .top {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
}

.quote {
  position: absolute;
  top: 0rem;
  right: 4.5rem;
}

.quote img {
  height: 119px;
  width: 119px;
  border-radius: 0;
}
.main .three-col .top .first {
  position: relative;
  background-color: #7541c8;
  color: #fff;
  grid-column: span 2;
  padding: 2.5rem;
  box-shadow: 30px 50px 30px rgba(0, 0, 0, 0.16);
}

.main .three-col .top .last {
  background-color: #48556a;
  color: #fff;
  grid-column: span 1;
  padding: 2.5rem;
  box-shadow: 30px 50px 30px rgba(0, 0, 0, 0.16);
}

.main .three-col .bottom {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  z-index: 1;
}

.main .three-col .bottom .first {
  background-color: #fff;
  grid-column: span 1;
  padding: 2.5rem;
  box-shadow: 30px 50px 30px rgba(0, 0, 0, 0.16);
}
.main .three-col .bottom .last {
  background-color: #19212e;
  color: #fff;
  grid-column: span 2;
  padding: 2.5rem;
  box-shadow: 30px 50px 30px rgba(0, 0, 0, 0.16);
}

.main .one-col {
  position: relative;
  background-color: #fff;
  grid-column: span 1;
  padding: 2.5rem;
  box-shadow: 30px 50px 30px rgba(0, 0, 0, 0.16);
  z-index: 1;
}

.avatar {
  display: flex;
  gap: 1rem;
}

.avatar h3 {
  font-size: 18px;
  font-weight: 500;
  margin: 0;
}

img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.attribution {
  font-size: 11px;
  text-align: center;
}
.attribution a {
  color: hsl(228, 45%, 44%);
}

.attribution a:hover {
  text-decoration: underline;
}

/* Responsive Styles */
/*Tablet */
@media (max-width: 860px) {
  .main {
    margin: 1rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
  }

  .three-col,
  .one-col {
    width: 100%;
    display: flex;
    flex-direction: column;
  }

  .three-col .top,
  .three-col .bottom {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 0;
  }

  .three-col .top .first,
  .three-col .top .last,
  .three-col .bottom .first,
  .three-col .bottom .last {
    grid-column: auto;
    box-shadow: none; /* optional: remove or reduce box-shadow for small screens */
    padding: 2rem;
    width: 100%;
  }

  h2 {
    font-size: 16px;
  }

  body {
    font-size: 13px;
  }
}

/* Mobile */
@media (max-width: 450px) {
  .quote {
    display: none;
  }

  .main {
    margin: 1.5rem;
    display: flex !important;
    flex-direction: column;
    gap: 2rem;
  }

  .three-col,
  .three-col .top,
  .three-col .bottom,
  .one-col {
    display: flex !important;
    flex-direction: column;
    width: 100%;
  }

  .three-col .top .first,
  .three-col .top .last,
  .three-col .bottom .first,
  .three-col .bottom .last,
  .one-col {
    width: 100%;
    padding: 1.8rem;
    box-shadow: none;
  }

  .quote {
    display: none;
  }

  h2 {
    font-size: 16px;
  }

  .avatar h3 {
    font-size: 16px;
  }

  small {
    font-size: 12px;
  }
}
