* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Ubuntu", sans-serif;
  color: var(--white-font-secondary);
}

:root {
  /* Backgrounds */
  --primary-bg: #252525;
  --secondary-bg: #303030;
  /* Fonts */
  --white-font-primary: #ededed;
  --white-font-secondary: #c8c8c8;
  --dark-font: #5e5e5e;
  --blue-font: #3ae5ff;
  --red-font: #ff4d65;

  /* Gradients */
  --metal-light: #f0f0f0;
  --metal-dark: #b7f8ff;
}

#preloader {
  position: fixed;
  inset: 0;
  background: var(--primary-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

#preloader lottie-player {
  width: 180px;
  height: 180px;
}

#preloader.hide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

body,
nav,
.nav-items {
  background-color: var(--primary-bg);
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(37, 37, 37, 0.85), rgba(37, 37, 37, 1));
  background-size:
    20px 20px,
    100% 100%;
}

h3,
p {
  font-size: 1.2em;
  font-weight: 200;
  line-height: 1.4em;
  color: var(--white-font-secondary);
}

h1 {
  padding-bottom: 0.3em;
  line-height: 1.1em;
  font-size: 2.5em;
  font-weight: 400;
  font-family: "Antonio";
  /* color: var(--white-font-primary); */
  color: var(--blue-font);
  /* background: linear-gradient(90deg, var(--metal-light), var(--metal-dark)); 
   color: transparent; 
  -webkit-background-clip: text; 
  -webkit-text-fill-color: transparent; 
  background-clip: text;  */
}

.nav-header {
  display: flex;
  justify-content: space-around;
  height: 60px;
  width: 100%;
  position: fixed;
}

.nav-items {
  display: flex;
  justify-content: center;
}

li {
  align-content: center;
  list-style-type: none;
  padding: 10px;
  height: 60px;
}

.nav-items a {
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 1.5em;
  font-weight: 300;
  font-size: 1em;
}

.nav-items a:hover,
.nav-items i:hover {
  background-color: var(--secondary-bg);
  color: var(--blue-font);
}

.nav-items i {
  font-size: 1.2em;
}

.logo {
  display: flex;
  align-self: center;
}

.logo img {
  width: 60px;
  height: auto;
  margin-left: 0.8em;
}

img {
  height: 35px;
}

.hamburguer-menu {
  display: none;
  cursor: pointer;
}

.main-home-container,
.main-project-container,
.main-about-container,
.main-contact-container {
  display: flex;
  justify-content: center;
  width: 100%;
  padding: 4em 0 4em 0;
}

.main-contact-container {
  padding-top: 8em;
}

.main-home-container {
  flex-direction: column;
  align-items: center;
}

.hero-section {
  padding: 2em 0 4em 0;
  text-align: center;
}

.hero-section h1 {
  font-size: 2.5em;
  color: var(--blue-font);
}

.hero-section h3 {
  font-size: 1.9em;
}

#typed-text {
  color: var(--dark-font);
}

#hero-blue {
  color: var(--blue-font);
}

#hero-red {
  color: var(--red-font);
}

.main-contact-container {
  flex-direction: column;
  align-items: center;
  justify-content: start;
  height: 85vh;
}

.main-contact-container h1 {
  padding-bottom: 1em;
}

.contact-text-container {
  display: flex;
  gap: 5em;
}

.main-contact-container h1 {
  text-align: center;
}

.contact-item {
  display: flex;
  flex-direction: column;
}

.key-contact {
  color: var(--dark-font);
}

.value-contact {
  color: var(--white-font-primary);
}

.btn-download-container {
  background-color: var(--white-font-primary);
  margin-top: 4em;
  display: flex;
  border-radius: 1.2em;
}

.btn-download {
  padding: 10px 20px;
  text-decoration: none;
  color: var(--dark-font);
}

.btn-download-container:hover {
  background: var(--blue-font);
}

.btn-download i {
  color: var(--dark-font);
}

.img-about-container {
  width: 30%;
  padding-top: 5em;
}

.img-about-container img {
  width: 100%;
  max-width: 400px;
  height: auto;
}

.text-about-container {
  width: 40%;
  padding: 4em 0 5em 5em;
}

.grid-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.grid-gallery,
.hero-section {
  width: 65%;
}

.item-gallery {
  flex: 1 1 40%;
  min-width: 200px;
  width: 300px;
  height: 400px;
  text-align: center;
  background: var(--secondary-bg);
  border-radius: 1em;
  /* position: relative; */
  overflow: hidden;
}

.item-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition:
    transform 0.3s ease,
    filter 0.3s ease; /* <-- importante */
}

/* .overlay-project {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.7); 
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 1em;
  font-family: "Antonio";
  font-size: 2em;
  color: var(--white-font-primary);
} */

/* .item-gallery:hover .overlay-project {
  opacity: 1;
} */

.container-project {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 700px;
  width: 95%;
}

.header-project {
  display: flex;
  justify-content: start;
  padding: 3em 0 2em 0;
  width: 98%;
}

.text-project {
  padding-left: 0.5em;
}

.back-to-projects i {
  font-size: 1.5em;
  padding: 0.5em;
  color: var(--dark-font);
}

.back-to-projects i:hover {
  color: var(--blue-font);
}

#project-images {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#project-images img {
  display: block;
  width: 100%;
  max-width: 700px;
  height: auto;
  border-radius: 0.5em;
}

.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 20px;
  width: 40px;
  height: 40px;
  border: none;
  background-color: var(--secondary-bg);
  color: var(--white-font-primary);
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: none;
  justify-content: center;
  align-items: center;
}

.scroll-top:hover {
  background-color: var(--primary-bg);
}

.footer-container {
  height: 50px;
  margin-top: 4em;
  display: flex;
  justify-content: center;
}

small {
  font-weight: 300;
  color: var(--dark-font);
}

@media (max-width: 1200px) {
  .grid-gallery,
  .hero-section {
    width: 90%;
  }
}

@media (max-width: 1000px) {
  .main-container {
    padding: 6em 0 4em 0;
  }

  .nav-header {
    display: flex;
    justify-content: space-between;
  }

  .item-gallery {
    flex: 1 1 calc(50% - 20px);
  }

  .main-about-container {
    flex-direction: column-reverse;
    align-items: center;
    padding-top: 6em;
  }

  .img-about-container {
    width: 60%;
    display: flex;
    padding-top: 2em;
    text-align: center;
  }

  .text-about-container {
    width: 80%;
    padding-top: 2em;
  }
}

@media (max-width: 900px) {
  .contact-text-container {
    flex-direction: column;
    align-content: center;
    gap: 2em;
  }

  .text-about-container {
    width: 90%;
    padding: 0;
  }

  .grid-gallery,
  .hero-section {
    width: 95%;
  }

  .item-gallery {
    flex: 1 1 100%;
    width: 100%;
  }

  /* .item-gallery img:hover {
    opacity: 0.7;
  } */

  .nav-items {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 60px;
    padding: 1em;
    left: 0;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition:
      max-height 0.5s ease,
      opacity 0.5s ease;
    background-color: var(--primary-bg);
    z-index: 998;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  }

  .nav-items.open {
    max-height: 100vh;
    opacity: 1;
  }

  .nav-items li {
    transform: translateY(-20px);
    opacity: 0;
    transition:
      transform 0.3s ease,
      opacity 0.3s ease;
  }

  .nav-items.open li {
    transform: translateY(0);
    opacity: 1;
  }

  .nav-items.open li:nth-child(1) {
    transition-delay: 0.05s;
  }
  .nav-items.open li:nth-child(2) {
    transition-delay: 0.1s;
  }
  .nav-items.open li:nth-child(3) {
    transition-delay: 0.15s;
  }
  .nav-items.open li:nth-child(4) {
    transition-delay: 0.2s;
  }
  .nav-items.open li:nth-child(5) {
    transition-delay: 0.25s;
  }
  .nav-items.open li:nth-child(6) {
    transition-delay: 0.3s;
  }

  .nav-items a {
    font-size: 1.4em;
  }

  .hamburguer-menu {
    display: flex;
    justify-content: center;
    width: 60px;
    height: 60px;
  }

  .hamburguer-menu i {
    align-content: center;
    font-size: 20px;
    transition: transform 0.6s ease;
    margin-right: 0.5em;
  }
}
