:root {
  /* Colors*/

  --Orange-300: hsl(15, 100%, 70%);
  --Blue-300: hsl(195, 74%, 62%);
  --Pink-400: hsl(348, 100%, 68%);
  --Green-400: hsl(145, 58%, 55%);
  --Yellow-300: hsl(43, 84%, 65%);
  --Purple-700: hsl(264, 64%, 52%);
  --Purple-600: hsl(246, 80%, 60%);
  --Purple-500: hsl(235, 45%, 61%);

  --Grey-200: hsl(0, 0%, 85%);
  --Navy-950: hsl(226, 43%, 10%);
  --Navy-900: hsl(235, 46%, 20%);
  --Navy-800: hsl(235, 41%, 34%);
  --Navy-200: hsl(236, 100%, 87%);

  /* Typography*/
  --font-family: "Rubik", sans-serif;
  --text-preset-1: 300 3.1rem / 1.2 var(--font-family);
  --text-preset-2: 300 2.2rem / 1.3 var(--font-family);
  --text-preset-3: 300 1.7rem / 1.4 var(--font-family);
  --text-preset-4: 300 1.3rem / 1.5 var(--font-family);
  --text-preset-5-medium: 500 1rem / 1.4 var(--font-family);
  --text-preset-5-regular: 400 1rem / 1.4 var(--font-family);
  --text-preset-6: 400 0.8rem / 1.3 var(--font-family);
}

/* Reset styles */

.attribution {
  font-size: 11px;
  text-align: center;
  margin-top: 3rem;
}
.attribution a {
  color: var(--Orange-300);
}

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

html {
  font-family: var(--font-family);
  font-size: 18px;
}

body {
  background-color: var(--Navy-950);
  min-height: 100vh;
  height: 100%;
  display: flex;
  justify-content: center;
  flex-direction: column;
  padding: 1rem;
}

h2,
h1,
h3,
li {
  color: white;
}

p {
  color: var(--Navy-200);
}

.main-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.3rem;
}

.title-image > img {
  object-fit: contain;
}

img {
  z-index: 1;
}

section {
  background-color: var(--Navy-900);
  max-height: 80%;
}

#personal-infos {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-left: 1rem;
}

.card-avatar {
  border-radius: 15px;
  background-color: var(--Navy-900);
}

.section-avatar {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding-inline: 1.95rem;

  min-height: 65%;
  width: 100%;
  border-radius: 15px;
  background-color: var(--Purple-600);
}

.section-avatar > img {
  border: 3px solid white;
  border-radius: 50%;
  height: 64px;
}

ul {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  list-style-type: none;
  padding-block: 1.3rem;
}

li {
  padding-inline: 1.5rem;
  font-weight: 300;
  font-size: 1rem;
  color: var(--Purple-500);
  cursor: pointer;
}

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

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

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

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

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

.card-selfcare {
  background-color: var(--Yellow-300);
}

h1 {
  font: var(--text-preset-4);
}

h2 {
  font: var(--text-preset-3);
}

h3 {
  font: var(--text-preset-5-regular);
}

p {
  font: var(--text-preset-6);
}

/* Active state */

section:hover {
  background-color: var(--Navy-800);
}

li:hover {
  color: white;
}

.card > img:hover {
  cursor: pointer;
}

/* Mobile layout */

.main-container {
  margin: auto;
}

.card-avatar {
  min-height: 200px;
}

.card {
  position: relative;
  min-height: 160px;
  overflow-x: hidden;
  border-radius: 15px;
  cursor: pointer;
}

.card > img {
  z-index: 0;
  position: absolute;
  right: 0;
  top: -5%;
}

section {
  position: absolute;
  z-index: 1;
  width: 100%;
  min-height: 75%;
  bottom: 0;
  border-radius: 15px;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  gap: 2rem;
  padding-inline: 1.3rem;
  padding-block: 1.5rem;
}

.title-image,
.hours {
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

@media screen and (min-width: 630px) and (max-width: 1024px) {
  .main-container {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    /* min-height: 677px; */
  }

  ul {
    max-width: 60%;
    margin-inline: auto;
  }

  .card {
    min-height: 215px;
  }

  section {
    min-height: 80%;
  }

  .card-avatar {
    grid-column: span 3;
  }

  .hours {
    flex-direction: column;
    justify-content: center;
    align-items: start;
    margin-top: -1.5rem;
  }

  h2 {
    font: var(--text-preset-1);
    /* margin-top: 1rem; */
  }
}

@media screen and (min-width: 1024px) {
  .main-container {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 1fr);
    min-height: 520px;
    max-width: 1150px;
    margin: auto;
  }

  .card-avatar {
    grid-row: span 2;
  }

  .section-avatar {
    padding-top: 2rem;
  }

  .section-avatar,
  ul {
    flex-direction: column;
    align-items: start;
    gap: 2rem;
  }

  #personal-infos {
    margin-left: 0;
  }

  h1 {
    font: var(--text-preset-2);
  }

  h2 {
    font: var(--text-preset-1);
    padding-bottom: 0.5rem;
  }

  .hours {
    flex-direction: column;
    margin-top: -1rem;
    align-items: start;
  }

  section {
    min-height: 83%;
    padding: 1.7rem;
  }
}
