@import url("https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,300..900;1,300..900&display=swap");

:root {
  --purple-600: hsl(246, 80%, 60%);
  --orange-300: hsl(15, 100%, 70%); /* work */
  --blue-300: hsl(195, 74%, 62%); /* play */
  --pink-400: hsl(348, 100%, 68%); /* study */
  --green-400: hsl(145, 58%, 55%); /* exercise */
  --purple-700: hsl(264, 64%, 52%); /* social */
  --yellow-300: hsl(43, 84%, 65%); /* self care */
  --navy-950: hsl(226, 43%, 10%);
  --navy-900: hsl(235, 46%, 20%);
  --purple-500: hsl(235, 45%, 61%);
  --navy-200: hsl(236, 100%, 87%);
}

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

html {
  background-color: var(--navy-950);
  color: white;
  font-family: "Rubik", san-serif;
  font-weight: 300;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

section {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto;
  gap: 2rem;
  margin: 2rem 0;
}

section[hidden] {
  display: none;
}

[role="tab"][aria-selected="true"] {
  color: white;
}

h1 {
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--navy-200);
}

h2 {
  font-size: 1.2rem;
  font-weight: 500;
}

button {
  background: unset;
  border: unset;
  color: var(--purple-500);
  padding: 1rem;
  font-size: 1.1rem;
  font-weight: 300;
  cursor: pointer;
  transition: all 0.3s ease;
}

button:hover,
button:focus,
button:active {
  color: white;
}

button:hover img,
button:focus img,
button:active img {
  filter: brightness(4);
}

footer {
  margin-top: auto;
  margin-bottom: 2rem;
}

.profile {
  background-color: var(--navy-900);
  border-radius: 1rem;
  width: 100%;
}

.profile-header {
  background-color: var(--purple-600);
  border-radius: 1rem;
  padding: 2rem;
  display: flex;
  gap: 2rem;
  align-items: center;
}

.avatar {
  width: 5rem;
  height: 5rem;
  border-radius: 2.5rem;
  border: 3px solid white;
}

.name {
  display: block;
  font-size: 1.6rem;
  color: white;
  margin-top: 0.5rem;
}

.buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

button.menu {
  width: 100%;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  color: white;
}
.category {
  border-radius: 1rem;
  height: max-content;
}

.category.work {
  background: var(--orange-300) url("./images/icon-work.svg") no-repeat;
  background-position: right 20px top -10px;
}

.category.play {
  background: var(--blue-300) url("./images/icon-play.svg") no-repeat;
  background-position: right 20px top -10px;
}

.category.study {
  background: var(--pink-400) url("./images/icon-study.svg") no-repeat;
  background-position: right 20px top -10px;
}

.category.exercise {
  background: var(--green-400) url("./images/icon-exercise.svg") no-repeat;
  background-position: right 20px top -4px;
}

.category.social {
  background: var(--purple-700) url("./images/icon-social.svg") no-repeat;
  background-position: right 20px top -10px;
}

.category.self-care {
  background: var(--yellow-300) url("./images/icon-self-care.svg") no-repeat;
  background-position: right 20px top -10px;
}

.category > div {
  background-color: var(--navy-900);
  border-radius: 1rem;
  padding: 2rem;
  margin-top: 2.75rem;
}

.times {
  display: flex;
  gap: 2rem;
  justify-content: space-between;
  align-items: center;
  margin: 1rem 0 0 0;
}

.current-time {
  font-size: 2rem;
}

.previous-time {
  color: var(--navy-200);
  font-size: 0.9rem;
}

@media (min-width: 45rem) {
  section {
    grid-template-columns: repeat(3, 1fr);
  }
  .times {
    display: block;
  }
  .current-time {
    font-size: 3rem;
  }
}

@media (min-width: 70rem) {
  main {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 2rem;
    flex: unset;
    margin: auto;
    max-width: 80rem;
  }
  section {
    margin: 0;
  }
  .profile {
    height: 100%;
    display: flex;
    flex-direction: column;
  }
  .profile-header {
    height: 100%;
    flex: 1;
    flex-direction: column;
    align-items: start;
  }
  .menu {
    margin-bottom: 2rem;
  }
  .name {
    font-size: 2.4rem;
  }
  .buttons {
    flex-direction: column;
    align-items: start;
    padding: 2rem;
    gap: 1rem;
  }
  button {
    padding: 0.25rem;
  }
}
