:root {
  /* Primary */

  --Purple-600: hsl(246, 80%, 60%);
  --Orange-300: hsl(15, 100%, 70%);
  --Blue-300: hsl(195, 74%, 62%);
  --Pink-400: hsl(348, 100%, 68%);
  --Green-400: hsl(145, 58%, 55%);
  --Purple-700: hsl(264, 64%, 52%);
  --Yellow-300: hsl(43, 84%, 65%);

  /* Neutral */

  --Navy-950: hsl(226, 43%, 10%);
  --Navy-900: hsl(235, 46%, 20%);
  --Purple-500: hsl(235, 45%, 61%);
  --Navy-200: hsl(236, 100%, 87%);
  --White: #fff;
}

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

html {
  font-size: 62.5%;
}

body {
  min-height: 100vh;
  font-family: "Rubik", sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
  font-size: 18px;
  color: var(--White);
  background-color: var(--Navy-950);
  border: 1px solid var(--Navy-950);
}

img {
  display: block;
  max-width: 100%;
}

.grid {
  display: grid;
  gap: 1.4em;
  margin: 4em auto;
  width: 90%;
  max-width: 360px;
}

.card {
  position: relative;
  height: 175px;
  padding-top: 12%;
  border-radius: 10px;
  font-family: inherit;
  overflow: hidden;
}

.card__img {
  position: absolute;
  top: -11px;
  right: 20px;
  z-index: 0;
}

.card--profile {
  padding: 0;
  height: 200px;
  background-color: var(--Navy-900);
}

.card__header {
  display: flex;
  align-items: center;
  height: 70%;
  padding: 0 1.6em;
  background-color: var(--Purple-600);
  border-radius: 10px;
}

.card__header > div:first-child {
  width: 60px;
  height: 60px;
  margin-right: 1.6rem;
  border: 2px solid var(--White);
  border-radius: 50%;
}

.card__intro p:first-child {
  margin-bottom: 0.4rem;
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--Navy-200);
}

.card__intro p:last-child {
  font-size: 2.4rem;
  font-weight: 300;
}

.card__links {
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 30%;
  color: var(--Navy-200);
}

.card__links button {
  font-size: 1.8rem;
  font-family: inherit;
  color: inherit;
  border: none;
  background-color: transparent;
  opacity: 0.5;
  cursor: pointer;
}

.card__links button:hover {
  color: #fff;
  opacity: 1;
}

.card__links .active {
  color: var(--White);
  opacity: 1;
}

.card__layout {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  padding: 1.8em 1.4em;
  background-color: var(--Navy-900);
  border-radius: 10px;
  cursor: pointer;
}

.card__layout:hover:after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #fff;
  filter: opacity(20%);
}

.card__title img {
  cursor: pointer;
}

.card__title,
.card__description {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card__description > p:first-child {
  font-size: 3rem;
  font-weight: 300;
}

.card__description > p:last-child {
  font-size: 1.6rem;
  color: var(--Navy-200);
}

.card--work {
  background-color: var(--Orange-300);
}

.card--play {
  background-color: var(--Blue-300);
}

.card--study {
  background-color: var(--Pink-400);
}

.card--exercise {
  background-color: var(--Green-400);
}

.card--exercise > .card__img {
  top: 0px;
}

.card--social {
  background-color: var(--Purple-700);
}

.card--selfcare {
  background-color: var(--Yellow-300);
}

@media (min-width: 769px) {
  body {
    display: flex;
    align-items: center;
  }

  .grid {
    place-content: center;
    grid-template-columns: repeat(auto-fill, 220px);
    max-width: 1200px;
  }

  .card {
    height: 230px;
    padding-top: 19%;
  }

  .card--profile {
    grid-row: 1 / 3;
    height: auto;
    padding-top: 0;
  }

  .card__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.8em;
    height: 65%;
    padding: 1.8em 1.6em;
  }

  .card__header > div:first-child {
    width: 75px;
    height: 75px;
  }

  .card__intro p:last-child {
    font-size: 3.4rem;
  }

  .card__links {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: flex-start;
    height: 35%;
    padding: 1.4em;
  }

  .card__layout {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    height: 100%;
    padding: 1.8em 1.4em;
    background-color: var(--Navy-900);
    border-radius: 10px;
  }

  .card__description {
    flex-direction: column;
    align-items: flex-start;
  }

  .card__description p:first-child {
    margin-bottom: 0.1em;
    font-size: 5rem;
  }
}
