@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");
@import url("/styles/variables.css");

html {
  scroll-behavior: smooth;
}

* {
  margin: 0;
}

body {
  height: 100vh;
  font-family: Roboto;
  font-weight: 300;
  font-size: 1rem;
}

a {
  font-weight: 350;
  transition: color 0.5s ease, font-size 0.5s ease;
  color: var(--dark-red);
  cursor: pointer;
}

a:hover {
  color: var(--hover);
  font-size: 1.1em;
}

/* Hero */
.bgimg-1 {
  background-image: url(../assets/img/leone-venter-VieM9BdZKFo-unsplash.jpeg);
  min-height: 100vh;
}

.bgimg-1,
.bgimg-2,
.bgimg-3,
.bgimg-4 {
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
}

.name,
.scroll,
.about,
.learning-path,
.projects {
  display: flex;
  align-items: center;
  justify-content: center;
}

.language {
  align-self: start;
  margin-top: 1rem;
  opacity: 0.8;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.language > a {
  display: flex;
  align-items: center;
}

.flag-icon.selected {
  outline: 3px solid var(--dark-red);
}

.name {
  grid-area: 2 / 1 / 3 / 3;
}

.menu {
  grid-area: 3 / 1 / 4 / 2;
  align-self: flex-end;
  margin-bottom: 3rem;
  font-size: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.menu > div {
  display: flex;
  align-items: center;
}

.menu > div > a {
  font-weight: 450;
}

h1 {
  font-size: 5rem;
  font-weight: 400;
  color: var(--dark-red);
}

.scroll {
  grid-area: 3 / 2 / 4 / 3;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding-bottom: 3rem;
}

.arrow {
  color: rgb(99, 56, 56);
  font-size: 2.5rem;
  color: var(--dark-red);
  animation: change-color 2s infinite alternate;
}
.arrow.bottom {
  margin-top: -1rem;
  animation-delay: 0.5s;
}

/* About Me */

.about,
.learning-path,
.projects {
  margin: 0;
  padding: 10rem 4rem;
  background-color: var(--greyge);
  flex-direction: column;
  gap: 1rem;
}

.about > p,
.learning-path > p,
.projects > p {
  color: var(--grey);
  line-height: 2rem;
  max-width: 1000px;
  text-align: justify;
  font-size: 1.2rem;
}

h2 {
  font-size: 3.5rem;
  font-weight: 400;
  color: rgb(69, 32, 32);
  text-align: center;
}

/* Learning Path */

.bgimg-2 {
  background-image: url(../assets/img/leone-venter-pVt9j3iWtPM-unsplash.jpeg);
  min-height: 50vh;
  align-items: center;
  justify-content: left;
}

.bgimg-2 > h2,
.bgimg-3 > h2 {
  grid-area: 2 / 3 / 3 / 4;
  text-align: left;
}

/* Projects */
.project-name {
  font-weight: 400;
}

.bgimg-3 {
  background-image: url(../assets/img/nordwood-themes-EZSm8xRjnX0-unsplash.jpeg);
  min-height: 50vh;
  align-items: center;
  justify-content: left;
}

.projects > .note {
  color: var(--mid-red);
  font-style: italic;
  font-size: 1rem;
  line-height: 1.2rem;
}

.bgimg-4 {
  background-image: url(../assets/img/ben-kolde-FaPxZ88yZrw-unsplash.jpeg);
  min-height: 100vh;
  align-items: center;
}

.bgimg-4 > h2 {
  grid-area: 2 / 2 / 3 / 3;
  text-align: center;
}

.menu-down {
  grid-area: 3 / 2 / -1 / 3;
  justify-self: center;
  align-self: flex-end;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 3rem;
}

.menu-down > div {
  display: flex;
  align-items: center;
}

.menu-down > div > a {
  font-weight: 450;
}

.up {
  display: flex;
  align-items: center;
  font-weight: 450;
}

.pic-author {
  grid-area: 3 / 1 / -1 / 2;
  font-size: 0.7rem;
  color: var(--grey);
  opacity: 80%;
  align-self: flex-end;
  margin-bottom: 1rem;
}

.pic-author > a {
  color: var(--grey);
}

/* Animation */
@keyframes change-color {
  0% {
    color: rgb(73, 24, 24);
  }
  50% {
    color: rgb(249, 204, 58);
  }
  100% {
    color: transparent;
  }
}

/* tablet */

@media (600px < width < 1000px) {
  h1 {
    font-size: 3rem;
    /* font-weight: 400; */
  }
  h2 {
    font-size: 2rem;
  }
  .about,
  .learning-path,
  .projects {
    min-height: 100vh;
    padding: 3rem 3rem;
  }
  .about > p,
  .learning-path > p,
  .projects > p {
    font-size: 1rem;
    line-height: 2rem;
  }
  .bgimg-2 > h2,
  .bgimg-3 > h2 {
    grid-area: 2 / 2 / 2 / 4;
    text-align: right;
    color: var(--dark-red);
    text-shadow: 1px 1px 2px var(--light-grey);
  }
  .bgimg-3 > h2 {
    padding-right: 1rem;
  }
  .bgimg-4 > h2 {
    grid-area: 2 / 1 / 3 / -1;
    text-shadow: 1px 0 10px var(--light-grey);
  }
  .projects > .note {
    font-size: 0.8rem;
  }
}

/* mobile */

@media (width <= 600px) {
  h1 {
    font-size: 3rem;
  }
  h2 {
    font-size: 2rem;
  }
  .bgimg-1 {
    background-position: 75% 50%;
  }
  .bgimg-2 {
    background-position: 20% 50%;
  }
  .bgimg-3 {
    background-position: 90% 50%;
  }
  .about,
  .learning-path,
  .projects {
    min-height: 100vh;
    padding: 2rem;
  }

  .about > p,
  .learning-path > p,
  .projects > p {
    font-size: 0.9rem;
    line-height: 1.8rem;
  }

  .projects > .note {
    font-size: 0.7rem;
    line-height: 1rem;
  }

  .bgimg-2 > h2,
  .bgimg-3 > h2,
  .bgimg-4 > h2 {
    grid-area: 2 / 1 / 2 / -1;
    text-shadow: 1px 0 15px var(--light-grey);
  }
}
