:root {
  --font-color: #ddd;
  --bg-color: #282e34;
  --link-color: #fff;
}

body {
  margin: 0;
  padding: 0;
  font-family: sans-serif;
  color: var(--font-color);
  background-color: var(--bg-color);
  font-size: 1.5rem;
}

.rounded-button {
  display: inline-block;
  height: 50px;
  width: 50px;
  cursor: pointer;
  border-radius: 50%;
  border: none;
  outline: none;
  box-shadow: 0px 0px 10px 5px solid rgba(0, 0, 0, 0.3);
}

/* Languages */
#languages {
  position: absolute;
  width: 185px;
  top: 30px;
  right: 10px;
}

.icon {
  background-size: cover;
}

.br {
  background-image: url(assets/br-icon.png);
}

.us {
  background-image: url(assets/us-icon.png);
}

/* Back to top */
#btn-scroll-to-top {
  position: fixed;
  display: none;
  bottom: 30px;
  right: 50px;
  background-color: var(--font-color);
  color: var(--bg-color);
}

.material-symbols-outlined {
  transform: scale(1.5);
}

/* Image Sections */
.img {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  height: 80vh;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

.one {
  background-image: url(assets/forest.jpg);
}

.two {
  background-image: url(assets/rainforest.jpg);
}

.three {
  background-image: url(assets/desert.jpg);
}

.four {
  background-image: url(assets/city.jpg);
}

.title {
  padding: 20px;
  text-transform: uppercase;
  font-weight: lighter;
  letter-spacing: 5px;
  background-color: var(--bg-color);
}

.subtitle {
  text-align: center;
}

/* Text Sections */
.txt {
  padding: 50px 20vw;
  background-color: var(--bg-color);
  box-shadow: 2px 2px 1px 1px solid rgba(0, 0, 0, 0.5);
}

.txt p {
  line-height: 1.7;
  text-indent: 1.5rem;
}

a::before {
  display: inline-block;
}

a {
  color: var(--link-color);
  text-decoration: none;
}

.src::after {
  font-family: "Material Symbols Outlined";
  content: "\e89e";
}

a:hover {
  text-decoration: underline;
}

.footer {
  display: flex;
  height: 5rem;
  flex-flow: column nowrap;
  justify-content: flex-end;
  align-items: center;
  font-size: 1.1rem;
  background-color: var(--bg-color);
  padding: 10px;
}

.credits {
  padding-bottom: 0.5rem;
}

#resources {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

/* Below 1200px width */
@media only screen and (max-width: 1200px) {
  #btn-scroll-to-top {
    right: 20px;
    bottom: 20px;
  }

  .img {
    background-attachment: inherit;
  }

  .txt {
    padding: 30px 10vw;
  }
}

@media only screen and (max-width: 768px) {
  .rounded-button {
    height: 60px;
    width: 60px;
  }

  #languages {
    top: 50px;
    right: calc(100% / 2 - 185px / 2); /* 185px: width of #languages element */
  }

  #btn-scroll-to-top {
    right: 10px;
    bottom: 10px;
  }

  .txt {
    padding: 20px 5vw;
  }
}

@media (orientation: portrait) and (max-width: 600px) {
  .footer {
    align-items: flex-start;
  }

  .credits {
    padding: 0 0.5rem;
  }

  #resources {
    display: block;
  }

  #resources span {
    display: block;
  }
}
