:root {
  --color-work: hsl(15, 100%, 70%);
  --color-play: hsl(195, 74%, 62%);
  --color-study: hsl(348, 100%, 68%);
  --color-exercise: hsl(145, 58%, 55%);
  --color-social: hsl(264, 64%, 52%);
  --color-self-care: hsl(43, 84%, 65%);
}

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

.dashboard.daily .timeframe:not(.daily) {
  display: none;
}

.dashboard.weekly .timeframe:not(.weekly) {
  display: none;
}

.dashboard.monthly .timeframe:not(.monthly) {
  display: none;
}

.dashboard .current-time,
.dashboard .previous-time {
  visibility: hidden;
  transform: scaleY(-1);
  transition: transform 200ms ease;
}

.dashboard.vertical-flip .current-time,
.dashboard.vertical-flip .previous-time {
  transform: scaleY(1);
}

.dashboard.content-visible .current-time,
.dashboard.content-visible .previous-time {
  visibility: visible;
}

.button.clicked {
  color: white;
}

body {
  min-width: 20rem;
  background-color: hsl(226deg, 43%, 10%);
  font-family: "Rubik", sans-serif, Arial, Helvetica;
  font-size: 1.125rem;
  color: White;
  padding-block: 3.75rem;
  padding-inline: 1.5rem;
  display: flex;
  justify-content: center;
}

.dashboard {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.header {
  background-color: hsl(235deg, 46%, 20%);
  border-radius: 1rem;
  overflow: hidden;
}

.profile {
  background-color: hsl(246deg, 80%, 60%);
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 1rem;
  padding: 2rem;
}

.profile-picture {
  width: 4.5rem;
  height: 4.5rem;
  border: 0.2rem solid white;
  border-radius: 50%;
}

.heading {
  font-size: 1em;
  font-weight: 400;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.heading span {
  font-size: 0.75em;
  color: hsl(236deg, 100%, 87%);
}
.heading strong {
  font-size: 1.25em;
  font-weight: 300;
}

.dashboard-display-controller {
  padding: 1rem;
  display: flex;
  justify-content: space-between;
}

.button {
  all: unset;
  padding: 0.5rem;
  font-weight: 300;
  color: hsl(235deg, 45%, 61%);
}

.button:hover {
  color: white;
  cursor: pointer;
}

.tracker {
  background-color: hsl(235deg, 46%, 20%);
  border-radius: 1rem;
  padding: 1.5rem;
  padding-inline: clamp(1.25rem, 6.4vw, 1.5rem);
  -webkit-margin-before: 2.5rem;
          margin-block-start: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
}

.tracker:hover {
  cursor: pointer;
  background-color: hsl(235deg, 46%, 30%);
}

.tracker::before {
  content: "";
  height: 100%;
  width: 100%;
  border-radius: 1rem;
  background-color: var(--before-background-color);
  background-image: var(--before-svg);
  background-repeat: no-repeat;
  background-position: right 1rem top -0.25rem;
  position: absolute;
  top: -2.25rem;
  left: 0;
  z-index: -1;
}

.activity {
  font-size: 1em;
  font-weight: 500;
}

.timeframe {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.current-time {
  font-size: 1.75em;
  font-weight: 300;
}

.previous-time {
  font-size: 0.8em;
  color: hsl(236deg, 100%, 87%);
  display: flex;
  flex-flow: row wrap;
  justify-content: flex-end;
}
.previous-time time {
  -webkit-padding-start: 0.25rem;
          padding-inline-start: 0.25rem;
}

.tracker-settings {
  all: unset;
  padding: 0.5rem;
  width: -webkit-fit-content;
  width: -moz-fit-content;
  width: fit-content;
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  right: 1rem;
}

.tracker-settings:hover {
  cursor: pointer;
}
.tracker-settings:hover .ellipsis-icon path {
  fill: white;
}

@media screen and (max-width: 22.5rem) {
  body {
    padding-inline: 1rem;
  }
  .dashboard {
    width: 100%;
  }
  .profile {
    padding-inline: 1rem;
    justify-content: center;
  }
}
@media screen and (min-width: 30rem) {
  body {
    padding-inline: unset;
    min-height: 100vh;
    align-items: center;
  }
  .dashboard {
    width: 90%;
    max-width: 29rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }
  .header {
    grid-column: 1/3;
  }
  .profile {
    justify-content: center;
    gap: 2rem;
  }
  .heading strong {
    font-size: 2em;
  }
  .dashboard-display-controller {
    padding-inline: 1.5rem;
  }
  .tracker {
    max-width: 16rem;
    gap: 1rem;
  }
  .timeframe {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .current-time {
    font-size: 2.5em;
  }
}
@media screen and (min-width: 64rem) {
  .dashboard {
    max-width: unset;
    width: unset;
    grid-template-columns: repeat(2, 12rem);
    grid-template-areas: "head   work    play    study" "head   exercise social self-care";
  }
  .dashboard .header {
    grid-area: head;
  }
  .dashboard .work {
    grid-area: work;
  }
  .dashboard .play {
    grid-area: play;
  }
  .dashboard .study {
    grid-area: study;
  }
  .dashboard .exercise {
    grid-area: exercise;
  }
  .dashboard .social {
    grid-area: social;
  }
  .dashboard .self-care {
    grid-area: self-care;
  }
  .header {
    display: flex;
    flex-direction: column;
  }
  .profile {
    flex-direction: column;
    align-items: flex-start;
    justify-content: start;
    flex: 1;
    padding: 1.5rem;
  }
  .profile strong {
    font-size: 1.75em;
  }
  .profile-picture {
    width: 4rem;
    height: 4rem;
  }
  .dashboard-display-controller {
    flex-direction: column;
  }
  .button {
    font-size: 0.85em;
  }
  .tracker {
    min-width: 12.5rem;
  }
  .activity {
    font-size: 0.85em;
  }
  .previous-time {
    font-size: 0.7em;
  }
  .tracker-settings svg {
    width: 1em;
  }
}