.circulos {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: -1;
  filter: blur(20px); /* Reducido de 40px a 20px para mejor rendimiento */
  animation: circulo1 80s linear infinite both; /* Ralentizado de 50s a 80s */
}

.circulos .circulo {
  position: absolute;
  width: 50%;
  height: 50%;
  animation: circulo1 80s linear infinite both; /* Ralentizado de 50s a 80s */
}

.circulos .circulo1 {
  top: 0;
  left: 0;
}

.circulos .circulo1 .path {
  fill: rgba(28, 129, 72, 0.994);
}

.circulos .circulo2 {
  top: 0;
  right: 0;
}

.circulos .circulo2 .path {
  fill: rgba(70, 17, 139, 0.993);
}

.circulos .circulo3 {
  bottom: 0;
  left: 0;
}

.circulos .circulo3 .path {
  fill: rgba(223, 163, 12, 0.986);
}

.circulos .circulo4 {
  bottom: 0;
  right: 0;
}

.circulos .circulo4 .path {
  fill: rgba(11, 11, 204, 0.998);
}

.header {
  width: 100%;
  min-height: 4em;
  padding: 1em;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.header .nav {
  text-align: end;
}

.header .ul {
  padding: 1rem;
}

.header .li {
  margin: 0 1.2em;
  display: inline-block;
}

.header .li .a {
  position: relative;
  transition: color 0.3s ease;
}

.header .li .a:hover {
  color: turquoise;
}

.header .li .a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 0;
  background-color: turquoise;
  transition: width 0.3s ease;
}

.header .li .a:hover::after {
  width: 100%;
}

.main {
  margin: 0 0 1em;
  text-align: center;
  position: relative;
  z-index: 2;
}

.seccion {
  width: 100%;
  min-height: 80vh;
  padding: 2em;
  display: flex;
  flex-flow: column wrap;
  justify-content: center;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.452);
}

.seccion .info {
  font-size: 1.2em;
  animation: aparecer1 2s ease 1 both;
}

.seccion .ul {
  display: flex;
  flex-flow: row wrap;
  justify-content: center;
  align-items: center;
  margin: 2em 0 0;
}

.seccion .ul .li {
  margin: 0 2em; /* Reduced from 10em to 2em for better spacing */
}

.seccion .li .a {
  text-transform: uppercase;
  width: 150px; /* Fixed width */
  height: 40px; /* Fixed height */
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 600;
  border: 2px solid rgb(255, 255, 255, 0.2);
  padding: 1em 1em 1em;
  border-radius: 25px;
  transition: all 0.4s ease;
  animation: aparecer1 2s ease 1 backwards;
}

.seccion .li .a[title="Github"] {
  animation-delay: 0.5s;
}

.seccion .ul .li .a:hover {
  border-color: white;
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.seccion .h2 {
  font-family: var(--tipo-principal);
  font-size: 4.5em;
  font-weight: 700;
  line-height: 1.1em;
  color: rgba(255, 255, 255, 0.95);
  letter-spacing: -0.02em;
  margin-bottom: 0.2em;
}

.works {
  z-index: 2;
  color: white;
}

.works .h2 {
  margin: 0 0 0.8rem;
  color: inherit;
}

.seccion .h3 {
  font-family: var(--tipo-principal);
  font-size: 2.8em;
  padding: 1rem 0;
  font-style: italic;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 1rem;
}

.works .p {
  font-size: 1.3rem;
  font-weight: 400;
  max-width: 700px;
  line-height: 1.6;
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.9);
}

.seccion .grid {
  width: 90%;
  margin: 2em 0;
  max-width: 1200px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5em;
}

.seccion .article {
  width: 100%;
  background: rgba(4, 26, 1, 0.866);
  min-height: 10vh;
  display: flex;
  flex-flow: column nowrap;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  border: 5px solid whitesmoke;
  padding: 0.5em;
  animation: border-animation 5s linear infinite;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.seccion .article:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

@keyframes border-animation {
  25% {
    border-color: rgb(200, 157, 29);
  }
  50% {
    border-color: rgb(18, 111, 14);
  }
  75% {
    border-color: rgb(56, 18, 102);
  }
}

.seccion .figure {
  width: 100%;
  height: 220px;
  overflow: hidden;
}

.seccion .img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.seccion .article:hover .img {
  transform: scale(1.1);
}

.seccion .h4 {
  width: 100%;
  height: 100%;
  position: absolute;
  bottom: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  flex-flow: row wrap;
  justify-content: center;
  align-items: center;
  color: rgb(240, 240, 240);
  font-size: 1.6em;
  font-weight: 500;
  font-style: normal;
  text-align: center;
  opacity: 0;
  transition: all 0.5s ease;
  transform: translateY(20px);
}

.seccion .article:hover .h4 {
  opacity: 1;
  transform: translateY(0);
}

.about {
  z-index: 3;
}

.about .h2 {
  margin: 0 0 1.5rem;
}

.about .p {
  max-width: 800px;
  text-align: left;
  margin: 0 0 1.5rem;
  font-size: 1.2em;
  letter-spacing: 0.02rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.9);
}

.about .rrss {
  width: 100%;
  display: flex;
  flex-flow: row wrap;
  justify-content: center;
  align-items: center;
  margin-top: 2rem;
}

.about .li {
  margin: 0 1.5em;
}

.about .a {
  border: none !important;
  transition: transform 0.3s ease;
}

.about .a:hover {
  transform: translateY(-5px);
}

.about .svg {
  width: 2.5em;
  height: 2.5em;
  border: 0px solid transparent;
  transition: fill 0.3s ease;
}

.about .svg:hover {
  fill: turquoise;
}

.footer {
  text-align: center;
  padding: 2em 0;
  position: relative;
  z-index: 2;
  color: white;
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  background-color: rgba(0, 0, 0, 0.2);
}

.footer a {
  transition: color 0.3s ease;
}

.footer a:hover {
  color: turquoise !important;
}

@keyframes circulo1 {
  from {
    transform: rotate(0deg) scale(2.4);
  }

  to {
    transform: rotate(360deg) scale(2.2);
  }
}

@keyframes aparecer1 {
  from {
    opacity: 0;
    transform: translateY(50%);
  }

  to {
    opacity: 1;
    transform: translateY(0%);
  }
}

/* Optimizamos el cursor personalizado que puede causar lag */
#cursor {
  width: 3em; /* Reducido de 5em a 3em */
  height: 3em; /* Reducido de 5em a 3em */
  background-color: white;
  position: fixed;
  z-index: 3;
  pointer-events: none;
  border-radius: 50%;
  top: 0;
  left: 0;
  mix-blend-mode: difference;
  will-change: transform; /* Mejora el rendimiento de animaciones */
  transform: translateZ(0); /* Habilita aceleración por hardware */
}

#cursor.mini {
  transform: scale(0.6) translateZ(0);
  transition: all 0.1s linear;
}


