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

:root {
  /* Primary */

  --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 */

  /* 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: #ffffff;
  --Shadow: 0 0.4rem 0.4rem 0 rgba(0, 0, 0, 0.25);

  /* Font Weights */

  --Light: 300;
  --Regular: 400;
  --Medium: 500;
}

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

html {
  font-size: 62.5%;
}

body {
  font-family: "Rubik", serif;
  font-size: 1.8rem;
  font-weight: var(--Regular);
  background-color: var(--Navy-950);
  min-height: 100dvh;

  display: flex;
  justify-content: center;
  align-items: center;
}

main {
  width: 100%;
  max-width: 111.6rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 24.4rem);
  gap: 3.2rem;
  margin: 7.8rem;
}

.header {
  grid-row: 1/3;
  grid-column: 1/2;
  background-color: var(--Navy-900);
  border-radius: 1.5rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.header .container {
  background-color: var(--Purple-600);
  border-radius: 0 0 1.5rem 1.5rem;
  padding: 3.2rem;
  flex-grow: 1;
}

.user__image {
  width: 7.8rem;
  height: 7.8rem;
  border-radius: 999rem;
  border: 0.3rem solid var(--White);
  overflow: hidden;
  box-shadow: var(--Shadow);
  margin-bottom: 4rem;
}

.user__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

h1 {
  color: var(--Navy-200);
  font-size: 1.5rem;
  font-weight: var(--Regular);
  line-height: 1.8rem;
}

.user__name {
  font-size: 4rem;
  font-weight: var(--Light);
  line-height: 4.7rem;
  color: var(--White);
}

.header ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2.1rem;
  margin: 3.2rem;
  margin-top: 2.8rem;
}

.header a {
  text-decoration: none;
  color: var(--Purple-500);
  line-height: 2.1rem;
  transition: color 0.2s ease;
}

.header a:hover {
  color: var(--White);
}

.header a.active {
  color: var(--White);
}

section {
  padding-top: 4.5rem;
  border-radius: 1.5rem;
  background-position: top -1rem right 2rem, top;
  background-repeat: no-repeat;
}

.section-1 {
  background-image: url(/images/icon-work.svg),
    linear-gradient(to bottom, var(--Orange-300) 6rem, transparent 6rem);
}

.section-2 {
  background-image: url(/images/icon-play.svg),
    linear-gradient(to bottom, var(--Blue-300) 6rem, transparent 6rem);
}

.section-3 {
  background-image: url(/images/icon-study.svg),
    linear-gradient(to bottom, var(--Pink-400) 6rem, transparent 6rem);
}

.section-4 {
  background-image: url(/images/icon-exercise.svg),
    linear-gradient(to bottom, var(--Green-400) 6rem, transparent 6rem);
  background-position: top 0 right 2rem, top;
}

.section-5 {
  background-image: url(/images/icon-social.svg),
    linear-gradient(to bottom, var(--Purple-700) 6rem, transparent 6rem);
}

.section-6 {
  background-image: url(/images/icon-self-care.svg),
    linear-gradient(to bottom, var(--Yellow-300) 6rem, transparent 6rem);
}

.section__content {
  border-radius: 1.5rem;
  background-color: var(--Navy-900);
  height: 100%;
  padding: 3.2rem;
  display: flex;
  flex-direction: column;
  height: 100%;
}

section header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: auto;
}

h2 {
  font-size: 1.8rem;
  font-weight: var(--Medium);
  line-height: 2.1rem;
  color: var(--White);
}

section button {
  border: none;
  background-color: transparent;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

.current {
  font-size: 5.8rem;
  font-weight: var(--Light);
  line-height: 6.6rem;
  color: var(--White);
  margin-bottom: 0.8rem;
}

.previous {
  font-size: 1.5rem;
  font-weight: var(--Regular);
  line-height: 1.8rem;
  color: var(--Navy-200);
}

@media (max-width: 1130px) {
  main {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 21.3rem);
    gap: 2.4rem;
    margin: 7.8rem;
  }

  .header {
    grid-row: 1/2;
    grid-column: 1/-1;
    display: flex;
    flex-direction: column;
  }

  .header .container {
    display: flex;
    align-items: center;
    gap: 2.4rem;
  }

  .user__image {
    width: 6.4rem;
    height: 6.4rem;
    margin-bottom: 0;
  }

  .user__name {
    font-size: 2.4rem;
    line-height: 2.8rem;
    margin-top: 0.8rem;
    display: inline-block;
  }

  .header ul {
    flex-direction: row;
    justify-content: center;
    gap: 0.8rem;
    margin-top: 2.4rem;
  }

  .header li {
    width: 10.9rem;
    text-align: center;
  }

  section {
    padding-top: 3.3rem;
    background-size: 5.748rem, auto;
  }

  .section__content {
    padding: 2.4rem;
  }

  .current {
    font-size: 5.6rem;
  }
}

@media (max-width: 700px) {
  main {
    grid-template-columns: 1fr;
    grid-template-rows: 20.3rem repeat(6, 16rem);
    margin: 2.4rem;
  }

  section {
    padding-top: 3.8rem;
    background-size: 7.8rem, auto;
  }

  .section__content {
    display: grid;
    grid-template-columns: auto auto;
    grid-template-rows: min-content min-content;
    gap: 0.8rem;
    padding: 2.75rem 2.4rem;
  }

  section header {
    grid-column: 1/-1;
  }

  .current {
    font-size: 3.2rem;
    line-height: 3.8rem;
    margin-bottom: 0;
  }

  .previous {
    align-self: center;
    justify-self: flex-end;
  }
}

@media (max-width: 350px) {
  html {
    font-size: 50%;
  }
}

@media (max-width: 275px) {
  html {
    font-size: 40%;
  }
}
