html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  height: 100%;
}

#gradient-canvas {
  position: fixed;
  top: 0;
  left: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
}

body {
  text-align: center;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

body.fade-in {
  opacity: 1;
}

h1 {
  font-family: "Bodoni Moda", serif;
  font-style: italic;
  color: #d1a1a1;
}

p {
  font-family: "Poppins", serif;
  font-size: 1rem;
  margin-left: 10px;
  margin-right: 10px;
  color: #d1a1a1;
  text-align: left;
}

.logo-img {
  width: 50px;
  height: 50px;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  cursor: pointer;
}

.logo-img:hover {
  transform: scale(1.1);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 5%;
  background-color: transparent;
  border-bottom: 2px solid #d1a1a1;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: color 0.3s ease, transform 0.3s ease;
}

.nav-left, .nav-right {
  display: flex;
  flex-grow: 1;
  justify-content: space-evenly;
}

.nav-link {
  text-decoration: none;
  color: #d1a1a1;
  font-family: "Poppins", serif;
  font-size: 15px;
  font-weight: 300;
  transition: 0.3s ease;
}

.nav-link.active {
  color: #a86565;
  font-weight: bold;
  pointer-events: none;
}

.nav-link:hover {
  color: #a86565;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: #d1a1a1;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  position: absolute;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  background: #fde9ec;
  width: 200px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 10px;
  border-radius: 10px;
  text-align: center;
}

.mobile-menu.active {
  display: flex;
}

.tech-stack-section {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 30rem;
  padding: 40px; 
}

.tech-stack-title {
  font-style: italic;
  flex: 1;
  text-align: left;
  padding-left: 10%;
  padding-right: 10%;
  opacity: 0;
  transform: translateX(-50px);
  animation: fadeSlide 1s ease-out forwards;
}

.tech-stack-title h1 {
  font-size: 5rem;
}

.tech-stack-title:nth-child(1) {
  animation-delay: 0.5s;
}

.tech-content {
  flex: 2;
  display: flex;
  max-width: 40rem;
  flex-direction: column;
  gap: 2rem;
  padding-right: 10%;
  padding-top: 5%;
  opacity: 0;
  transform: translateX(-50px);
  animation: fadeSlide 1s ease-out forwards;
}

.tech-content:nth-child(2) {
  animation-delay: 1s; 
}

.tech-description {
  line-height: 1.6;
}

.tech-type {
  margin-top: -5%;
}

.tech-type p {
  font-size: 1.2rem;
}

.tech-grid-languages {
  display: grid;
  grid-template-columns: repeat(6, 1fr); 
  gap: 1rem;
  margin-top: -5%;
}

.tech-grid-tools {
  display: grid;
  grid-template-columns: repeat(5, 1fr); 
  gap: 1rem;
  margin-top: -5%;
}

.tech-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tech-item img {
  width: 50px;
  height: 50px;
  border: 3px solid #d1a1a1;
  border-radius: 50%;
  padding: 0.5rem;
  background-color: transparent;
  transform: scale(0.8);
  animation: fadeInScale 0.6s ease forwards;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.tech-item:nth-child(1) img { animation-delay: 0.1s; }
.tech-item:nth-child(2) img { animation-delay: 0.2s; }
.tech-item:nth-child(3) img { animation-delay: 0.3s; }
.tech-item:nth-child(4) img { animation-delay: 0.4s; }
.tech-item:nth-child(5) img { animation-delay: 0.5s; }
.tech-item:nth-child(6) img { animation-delay: 0.6s; }

.tech-item img:hover {
  transform: scale(1.1);
  transition: transform 1s ease;
  background-color: #d1a1a1
}

.tech-item p {
  margin-top: 0.5rem;
  font-size: 1rem;
  text-align: center;
}

@media (max-width: 1024px) {
  h1 {
    margin-top: -1%;
  }

  .navbar {
    background-color: transparent;
    backdrop-filter: blur(10px);
  }

  .tech-stack-section {
    flex-direction: column;
    height: auto;
    text-align: center;
  }

  .tech-stack-title {
    text-align: center;
    padding-left: 0;
    margin-bottom: -5%;
    padding-right: 0;
    padding-left: 0;
    transform: translateY(-50px); 
    animation: fadeSlideFromTop 1s ease-out forwards;
    animation-delay: 0.5s;
  }

  .tech-content {
    align-items: center;
    padding-right: 0;
    padding-top: 0;
    transform: translateY(-50px); 
    animation: fadeSlideFromTop 1s ease-out forwards;
    animation-delay: 1s;
  }

  .tech-content p {
    text-align: center;
  }

  .tech-grid-languages,
  .tech-grid-tools {
    width: 30rem;
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-left, .nav-right {
    display: none;
  }

  .hamburger {
    display: block;
  }

  .navbar {
    background-color: transparent;
    backdrop-filter: blur(10px);
  }

  h1 {
    margin-top: -1%;
  }

  .tech-stack-section {
    flex-direction: column;
    height: auto;
    text-align: center;
  }

  .tech-stack-title {
    text-align: center;
    padding-left: 0;
    margin-bottom: -5%;
    padding-right: 0;
    padding-left: 0;
  }

  .tech-stack-title h1 {
    font-size: 4rem;
  }

  .tech-content {
    align-items: center;
    padding-right: 0;
  }

  .tech-grid-languages,
  .tech-grid-tools {
    width: 20rem;
    grid-template-columns: repeat(2, 1fr);
  }
}

@keyframes fadeSlide {
  0% {
    opacity: 0;
    transform: translateX(-50px); 
  }
  100% {
    opacity: 1;
    transform: translateX(0); 
  }
}

@keyframes fadeSlideFromTop {
  0% {
    opacity: 0;
    transform: translateY(-50px);
  }
  100% {
    opacity: 1;
    transform: translateY(0); 
  }
}