:root {
  --Red: hsl(0, 78%, 62%);
  --Cyan: hsl(180, 62%, 55%);
  --Orange: hsl(34, 97%, 64%);
  --Blue: hsl(212, 86%, 64%);
  --Grey500: hsl(234, 12%, 34%);
  --Grey400: hsl(212, 6%, 44%);
  --White: hsl(0, 0%, 100%);
  --fontsize: 14px;
  --weight200: 200;
  --weight400: 400;
  --weight600: 600;
}

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

body {
  font-family: "Poppins", sans-serif;
  background-color: hsl(0, 0%, 98%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.main {
  max-width: 1200px;
  width: 100%;
}

.heading {
  text-align: center;
  margin-bottom: 4rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.heading h1 {
  font-weight: var(--weight600);
  color: var(--Grey500);
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.heading h2 {
  font-weight: var(--weight200);
  color: var(--Grey400);
  font-size: 2rem;
}

.heading p {
  color: var(--Grey400);
  font-size: var(--fontsize);
}

.card-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 2rem;
  position: relative;
}

.card {
  background-color: var(--White);
  border-radius: 0.5rem;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  padding: 2rem;
  display: flex;
  flex-direction: column;
}

.card h3 {
  color: var(--Grey500);
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.card p {
  color: var(--Grey400);
  font-size: 0.875rem;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.card img {
  align-self: flex-end;
  width: 3.5rem;
  height: auto;
  margin-top: auto;
}

#supervisor {
  grid-column: 1;
  grid-row: 1 / span 2;
  border-top: 4px solid var(--Cyan);
  align-self: center;
}

#team-builder {
  grid-column: 2;
  grid-row: 1 / 2;
  border-top: 4px solid var(--Red);
}

#karma {
  grid-column: 2;
  grid-row: 2 / 2;
  border-top: 4px solid var(--Orange);
}

#calculator {
  grid-column: 3;
  grid-row: 1 / span 2;
  border-top: 4px solid var(--Blue);
  align-self: center;
}

@media (max-width: 768px) {
  .card-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 350px;
    margin: 0 auto;
  }

  .heading {
    margin-bottom: 3rem;
    padding: 0 1rem;
  }

  .heading h1 {
    font-size: 1.4rem;
  }

  .heading h2 {
    font-size: 1.4rem;
  }

  .heading p {
    font-size: 0.85rem;
    margin-top: 1rem;
  }

  .card {
    width: 100%;
    height: auto;
    padding: 1.5rem;
  }

  #supervisor {
    order: 1;
  }

  #team-builder {
    order: 2;
  }

  #karma {
    order: 3;
  }

  #calculator {
    order: 4;
  }
}
