:root {
  --card-strip-h: 3rem;
  --card-overlap: 5px;
}

/* ===== RESET ===== */

html {
  min-height: 100%;
}

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

body,
h1,
h2,
p,
blockquote {
  margin-block-end: 0;
  margin: 0;
}

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

/* ===== BASE STYLES ===== */

main {
  margin-top: 5rem;
  margin-bottom: 5rem;
}

body {
  font-family: Rubik, sans-serif;
  margin: auto;
  text-align: center;
  background-color: hsl(226, 43%, 10%);
  color: white;
}

button {
  background-color: hsl(235, 46%, 20%);
  border: none;
  color: hsl(235, 45%, 61%);
  font-size: 1rem;
  padding-top: 1rem;
}

h1 {
  line-height: 25px;
  text-align: left;
}

h2 {
  font-weight: 400;
}

/* ===== MOBILE ===== */

.app-container {
  max-width: 325px;
  margin: auto;
  margin-bottom: 3rem;
  background-color: hsl(226, 43%, 10%);
}

.app-header,
.work,
.play,
.study,
.exercise,
.social,
.self-care {
  margin-bottom: 1.5rem;
}

.header-profile {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  background-color: hsl(246, 80%, 60%);
  padding: 1.7rem 2rem;
  border-radius: 15px;
  position: relative;
  z-index: 1;
}

.profile-img {
  border: 3px solid white;
  border-radius: 50%;
  max-width: 70px;
}

.report {
  font-size: 1rem;
  font-weight: 300;
  color: #cdcdcd;
}

.name {
  font-size: 1.5rem;
  font-weight: 300;
  margin-top: -0.5rem;
}

.header-timeframes {
  display: flex;
  flex-direction: row;
  margin: auto;
  justify-content: space-between;
  align-items: center;
  background-color: hsl(235, 46%, 20%);
  padding: 1.5rem 3rem;
  margin-top: -1rem;
  z-index: 0;
  border-radius: 0 0 15px 15px;
}

.header-timeframes button {
  position: relative;
}

.daily:hover,
.weekly:hover,
.monthly:hover {
  cursor: pointer;
  color: white;
}

button.active {
  color: white;
}

.work-header,
.play-header,
.study-header,
.exercise-header,
.social-header,
.self-care-header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.work-main,
.play-main,
.study-main,
.exercise-main,
.social-main,
.self-care-main {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
}

.content {
  background-color: hsl(235, 46%, 20%);
  padding: 1.5rem;
  border-radius: 15px;
  position: relative;
  z-index: 1;
  margin-top: -1rem;
}

.content:hover {
  background-color: hsl(237, 34%, 33%);
}

.work-bg,
.play-bg,
.study-bg,
.exercise-bg,
.social-bg,
.self-care-bg {
  min-height: 3rem;
  position: relative;
  z-index: 0;
  border-radius: 15px 15px 0 0;
  padding-right: 0.1rem;
  background-repeat: no-repeat;
  background-position-x: 94%;
  background-position-y: -6px;
  background-size: 60px;
}

.work-bg {
  background-color: hsl(15, 100%, 70%);
  background-image: url("./images/icon-work.svg");
}

.play-bg {
  background-color: hsl(195, 74%, 62%);
  background-image: url("./images/icon-play.svg");
}

.study-bg {
  background-color: hsl(348, 100%, 68%);
  background-image: url("./images/icon-study.svg");
}

.exercise-bg {
  background-color: hsl(145, 58%, 55%);
  background-image: url("./images/icon-exercise.svg");
  background-position-y: 2px;
}

.social-bg {
  background-color: hsl(264, 64%, 52%);
  background-image: url("./images/icon-social.svg");
  background-position-y: -10px;
}

.self-care-bg {
  background-color: hsl(43, 84%, 65%);
  background-image: url("./images/icon-self-care.svg");
  background-position-y: -12px;
}

.activity {
  font-size: 1rem;
}

.current-hrs {
  font-size: 1.6rem;
  font-weight: 300;
}

.previous-hrs {
  font-size: 0.8rem;
  font-weight: 300;
  color: hsl(236, 100%, 87%);
}

/* ===== TABLET ===== */

@media (min-width: 768px) {
  .app-header,
  .work,
  .play,
  .study,
  .exercise,
  .social,
  .self-care {
    margin: 0;
  }

  .app-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 1.5rem;
    grid-template-areas:
      "app-header   app-header"
      "work         play"
      "study        exercise"
      "social       self-care";
    max-width: 600px;
  }

  .app-header {
    grid-area: app-header;
    /* margin: 0; */
  }

  h1 {
    line-height: 33px;
  }

  .header-timeframes {
    justify-content: space-around;
  }

  button {
    font-size: 1.1rem;
  }

  .work-bg,
  .play-bg,
  .study-bg,
  .exercise-bg,
  .social-bg,
  .self-care-bg {
    min-height: 3.5rem;
  }

  .work {
    grid-area: work;
  }

  .play {
    grid-area: play;
  }

  .study {
    grid-area: study;
  }

  .exercise {
    grid-area: exercise;
  }

  .social {
    grid-area: social;
  }

  .self-care {
    grid-area: self-care;
  }

  .header-profile {
    justify-content: space-evenly;
  }
  .profile-img {
    max-width: 90px;
  }

  .report {
    font-size: 1.2rem;
  }

  .name {
    font-size: 2rem;
  }

  .current-hrs {
    font-size: 1.8rem;
  }
}

/* ===== DESKTOP ===== */

@media (min-width: 1024px) {
  .app-header,
  .work,
  .play,
  .study,
  .exercise,
  .social,
  .self-care {
    margin: 0;
  }

  h1 {
    line-height: 45px;
  }

  .work,
  .play,
  .study,
  .exercise,
  .social,
  .self-care {
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    border-radius: 15px 15px 15px 15px;
    padding-top: calc(var(--card-strip-h) - var(--card-overlap));
  }

  .content {
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: center;
    margin: 0rem;
    transform: none;
    position: relative;
    z-index: 1;
    border-radius: 15px 15px 15px 15px;
    padding: 1.5rem;
  }

  .app-container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 2rem;
    grid-template-areas:
      "app-header     work      play      study"
      "app-header     exercise  social    self-care";
    max-width: 1100px;
    margin-top: 10rem;
  }

  .app-header {
    display: flex;
    flex-direction: column;
  }

  .header-profile {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 2rem 2rem;
  }

  .profile-img {
    margin: 0;
    margin-bottom: 0.5rem;
  }

  .name {
    font-size: 2.8rem;
    margin-bottom: 0.5rem;
  }

  .header-timeframes {
    display: flex;
    flex-direction: column;
    max-width: 100%;
    gap: 0.5rem;
    align-items: flex-start;
    margin: 0;
    padding: 2.5rem 2rem;
    margin-top: -1.5rem;
    height: 12rem;
  }

  .monthly {
    margin-bottom: 2rem;
  }

  .activity {
    font-size: 1.2rem;
  }

  .work-bg,
  .play-bg,
  .study-bg,
  .exercise-bg,
  .social-bg,
  .self-care-bg {
    height: 5rem;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: var(--card-strip-h);
    z-index: 0;
  }

  .exercise-bg {
    background-position-y: 7px;
  }

  .self-care-bg {
    background-position-y: -6px;
  }

  .work-header,
  .play-header,
  .study-header,
  .exercise-header,
  .social-header,
  .self-care-header {
    margin-bottom: 1.1rem;
  }

  .work-main,
  .play-main,
  .study-main,
  .exercise-main,
  .social-main,
  .self-care-main {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }
  .current-hrs {
    font-size: 2.9rem;
    margin-bottom: 0.5rem;
  }

  .previous-hrs {
    font-size: 1rem;
  }
}

/* ===== FOOTER ===== */

footer {
  position: fixed;
  z-index: -1;
  left: 0;
  bottom: 0;
  width: 100%;
  color: white;
  text-align: center;
  margin-bottom: 3px;
}

.attribution {
  font-size: 11px;
  text-align: center;
}
.attribution a {
  color: hsl(228, 45%, 44%);
}
