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

/* Animación del gradiente de fondo */
@keyframes moveGradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

body {
  background: linear-gradient(
    45deg,
    hsl(222, 84%, 10%),
    /* Azul muy oscuro */ hsl(222, 84%, 15%),
    /* Azul oscuro */ hsl(222, 84%, 10%) /* Azul muy oscuro */
  );
  background-size: 400% 400%; /* Ampliar el gradiente para que se desplace más */
  animation: moveGradient 10s ease infinite; /* Animación de desplazamiento más rápida */
  margin: 0;
  padding: 0;
  font-family: "Roboto Mono", monospace;
  color: #fff;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  overflow: hidden;
  position: relative;
  cursor: none;
  opacity: 0;
  animation: fadeIn 1s ease-in-out forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

/* Animación del gradiente rotativo */
@keyframes rotate {
  0% {
    transform: rotate(0deg);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  }
  50% {
    transform: rotate(180deg);
    border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%;
  }
  100% {
    transform: rotate(360deg);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  }
}

.gradient-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: -1;
  pointer-events: none;
}

.gradient {
  --size: 300px;
  --speed: 10s; /* Más lento para que sea visible */
  --easing: linear;
  width: var(--size);
  height: var(--size);
  filter: blur(calc(var(--size) / 5));
  background-image: linear-gradient(hsl(222, 84%, 30%), hsl(164, 79%, 40%));
  animation: rotate var(--speed) var(--easing) infinite;
  position: absolute;
  pointer-events: none;
  will-change: transform, opacity;
  transition: opacity 0.3s ease;
  opacity: 1; /* Asegurarse de que sea visible */
}

header {
  position: fixed;
  top: 0;
  right: 0;
  padding: 1rem;
  background-color: transparent;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: flex-end;
  align-items: center;
}

nav a {
  color: white;
  text-decoration: none;
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  transition: text-shadow 0.3s ease;
}

nav a:hover {
  font-weight: bold;
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
}

.contact-info {
  position: fixed;
  bottom: 0;
  width: 100%;
  margin: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.contact-info a {
  color: white;
  align-self: flex-end;
  margin-right: 1rem;
  text-decoration: none;
  transition: text-shadow 0.3s ease;
}

.contact-info a:hover {
  font-weight: bold;
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
}

.contact-info .name {
  color: white;
  align-self: flex-start;
  margin-left: 1rem;
  font-weight: bold;
  animation: slideIn 1s ease-out forwards;
}

@keyframes slideIn {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.contact-info p {
  color: white;
  align-self: flex-end;
  margin: 0 1rem;
}

.tech-stack {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1rem;
  text-align: center;
  color: white;
}

.tech-items {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.tech-item {
  display: flex;
  align-items: center;
  margin: 10px;
  transition: transform 0.3s ease, color 0.3s ease;
}

.tech-item i {
  margin-right: 5px;
  transition: transform 0.3s ease, color 0.3s ease;
}

.tech-item:hover i {
  transform: scale(1.5);
  color: hsl(0, 0%, 100%);
}

.cursor-dot {
  width: 5px;
  height: 5px;
  background-color: white;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
  position: fixed;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
}

.cursor-outline {
  width: 30px;
  height: 30px;
  border: 1px solid white;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
  position: fixed;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

@media (max-width: 768px) {
  .contact-info {
    position: fixed;
    text-align: right;
    margin: 1rem;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
  }

  .contact-info p:last-child {
    font-size: 0.7rem;
  }

  .contact-info .name {
    align-self: flex-end;
  }

  .tech-stack {
    width: 90%;
    padding: 0 1rem;
  }

  nav {
    gap: 0.75rem;
  }
}
