: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%);

  /* Spacing */
  --spacing-l: 2rem;
  --spacing-m: 1.5rem;
  --spacing-s: 1rem;
}

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

body {
  display: grid;
  place-items: center;
  height: 100vh;
  background-color: var(--navy-950);
  color: white;
  font-family: "Rubik", sans-serif;
}

main {
  width: 85%;
  max-width: 1000px;
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: var(--spacing-m);
}

aside {
  background-color: var(--navy-900);
  border-radius: 0 0 10px 10px;
}

.user-profile {
  padding: var(--spacing-m);
  background-color: var(--purple-600);
  border-radius: 10px;

  img {
    width: 70px;
    height: 70px;
    border: 4px solid white;
    border-radius: 50%;
    margin-bottom: var(--spacing-l);
  }
  p {
    font-size: 0.85rem;
    font-weight: 300;
  }
  h1 {
    font-size: 2.5rem;
    font-weight: 300;
    padding-bottom: var(--spacing-m);
  }
}

nav {
  display: flex;
  flex-direction: column;
  padding: var(--spacing-m);

  ul {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-m);
  }
  li {
    list-style: none;
    color: var(--navy-200);
    cursor: pointer;
  }

  li:hover,
  li.active {
    color: white;
  }
}

.activity-wrapper {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-m);
  align-items: end;
}

.activity-card {
  position: relative;
  height: 100%;
}

.activity-icon {
  overflow: hidden;
  border-radius: 10px 10px 0 0;
  height: 3.75rem;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;

  svg {
    position: absolute;
    right: 1rem;
    top: -0.5rem;
  }
}

.activity {
  position: relative;
  margin-top: 2.75rem;
  background-color: var(--navy-900);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  padding: var(--spacing-m);
  gap: var(--spacing-m);
  z-index: 2;

  header {
    display: flex;
    justify-content: space-between;

    h2 {
      font-size: 1.125rem;
      font-weight: 300;
    }

    svg {
      cursor: pointer;
    }
  }
}

.activity:hover {
  background-color: var(--purple-500);
  cursor: pointer;
}

.activity-detail {
  display: flex;
  flex-direction: column;

  .spent-time {
    font-size: 3rem;
  }
}

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

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

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

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

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

.self-care {
  background-color: var(--yellow-300);
}

@media (max-width: 48rem) {
  body {
    padding: 4rem 0;
  }

  main,
  .activity-wrapper {
    grid-template-columns: 1fr;
  }

  .user-profile {
    display: flex;
    align-items: center;
    gap: var(--spacing-l);

    img {
      margin: 0;
    }

    h1 {
      font-size: 1.75rem;
      padding: 0;
    }
  }
  nav > ul {
    flex-direction: row;
    justify-content: space-between;
  }

  .activity-detail {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;

    .spent-time {
      font-size: 2rem;
      font-weight: 300;
    }

    .previous-time {
      padding-top: 0.25rem;
    }
  }

  .activity-icon {
    height: 3.25rem;
  }

  .activity {
    margin-top: 2.25rem;
  }
}
