/* ============================================
   VARIABLES — los colores y fuentes base
   ============================================ */
:root {
  --fondo:        #0a0a0a;   /* negro profundo */
  --fondo-2:      #111111;   /* gris muy oscuro para tarjetas */
  --borde:        #222222;   /* color de los bordes */
  --texto:        #e8e8e8;   /* blanco suave */
  --texto-dim:    #777777;   /* gris para texto secundario */
  --acento:       #c8f165;   /* verde lima — el color que te diferencia */
  --fuente-titulo: 'Syne', sans-serif;
  --fuente-mono:   'Space Mono', monospace;
}

/* ============================================
   RESET — limpiamos los estilos del navegador
   ============================================ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth; /* desplazamiento suave al hacer clic en enlaces */
}

/* ============================================
   BASE
   ============================================ */
body {
  background-color: var(--fondo);
  color: var(--texto);
  font-family: var(--fuente-mono);
  font-size: 16px;
  line-height: 1.7;
}

/* ============================================
   NAVEGACIÓN
   ============================================ */
nav {
  position: fixed;            /* siempre visible arriba */
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 4rem;
  background-color: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(10px); /* efecto de vidrio esmerilado */
  border-bottom: 1px solid var(--borde);
  z-index: 100;
}

.nav-logo {
  font-family: var(--fuente-titulo);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--acento);
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2.5rem;
}

nav a {
  color: var(--texto-dim);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  transition: color 0.2s ease;
}

nav a:hover {
  color: var(--acento);
}

/* ============================================
   SECCIÓN HÉROE
   ============================================ */
.hero {
  min-height: 100vh;          /* ocupa toda la pantalla */
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 4rem;
  position: relative;
  overflow: hidden;
}

.hero-etiqueta {
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  color: var(--acento);
  margin-bottom: 1.5rem;
  animation: aparecer 0.8s ease forwards;
}

.hero h1 {
  font-family: var(--fuente-titulo);
  font-weight: 800;
  font-size: clamp(4rem, 12vw, 9rem); /* tamaño flexible según pantalla */
  line-height: 0.95;
  letter-spacing: -0.03em;
  animation: aparecer 0.8s ease 0.1s both;
}

.acento {
  color: var(--acento);
}

.hero-sub {
  margin-top: 1.5rem;
  color: var(--texto-dim);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  animation: aparecer 0.8s ease 0.2s both;
}

.boton-principal {
  display: inline-block;
  margin-top: 2.5rem;
  padding: 0.9rem 2rem;
  background-color: var(--acento);
  color: #0a0a0a;
  font-family: var(--fuente-mono);
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: transform 0.2s ease, background-color 0.2s ease;
  animation: aparecer 0.8s ease 0.3s both;
  width: fit-content;
}

.boton-principal:hover {
  transform: translateY(-3px);
  background-color: #d4ff6e;
}

/* Círculo decorativo de fondo */
.hero-decoracion {
  position: absolute;
  right: -10rem;
  top: 50%;
  transform: translateY(-50%);
  width: 600px;
  height: 600px;
  border-radius: 50%;
  border: 1px solid var(--borde);
  pointer-events: none; /* no interfiere con clicks */
}

.hero-decoracion::before {
  content: '';
  position: absolute;
  inset: 60px;
  border-radius: 50%;
  border: 1px solid var(--borde);
}

/* ============================================
   SECCIONES GENERALES
   ============================================ */
.seccion {
  max-width: 1000px;
  margin: 0 auto;
  padding: 7rem 2rem;
  border-top: 1px solid var(--borde);
}

.etiqueta-seccion {
  display: block;
  font-size: 0.75rem;
  color: var(--acento);
  letter-spacing: 0.2em;
  margin-bottom: 1rem;
}

.seccion h2 {
  font-family: var(--fuente-titulo);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.seccion > p {
  color: var(--texto-dim);
  max-width: 600px;
  font-size: 0.95rem;
}

/* ============================================
   HABILIDADES — grilla de tarjetas
   ============================================ */
.grid-habilidades {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.tarjeta-habilidad {
  background-color: var(--fondo-2);
  border: 1px solid var(--borde);
  padding: 2rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.tarjeta-habilidad:hover {
  border-color: var(--acento);
  transform: translateY(-4px);
}

.icono-habilidad {
  display: block;
  font-size: 1.8rem;
  color: var(--acento);
  margin-bottom: 1rem;
}

.tarjeta-habilidad h3 {
  font-family: var(--fuente-titulo);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.tarjeta-habilidad p {
  font-size: 0.82rem;
  color: var(--texto-dim);
}

/* ============================================
   PROYECTOS — grilla de tarjetas
   ============================================ */
.grid-proyectos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.tarjeta-proyecto {
  background-color: var(--fondo-2);
  border: 1px solid var(--borde);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  transition: border-color 0.2s ease;
}

.tarjeta-proyecto:hover {
  border-color: var(--acento);
}

.proyecto-numero {
  font-size: 0.75rem;
  color: var(--texto-dim);
  letter-spacing: 0.15em;
}

.tarjeta-proyecto h3 {
  font-family: var(--fuente-titulo);
  font-size: 1.2rem;
}

.tarjeta-proyecto p {
  font-size: 0.85rem;
  color: var(--texto-dim);
  flex: 1; /* empuja el resto hacia abajo */
}

.proyecto-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.proyecto-tags span {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--acento);
  border: 1px solid var(--acento);
  padding: 0.2rem 0.6rem;
}

.enlace-proyecto {
  font-size: 0.82rem;
  color: var(--texto);
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: color 0.2s ease;
}

.enlace-proyecto:hover {
  color: var(--acento);
}

/* ============================================
   PROYECTOS EN VENTA
   ============================================ */
.seccion-venta {
  text-align: center;
}

.venta-coming {
  color: var(--acento);
  font-family: var(--fuente-titulo);
  font-size: clamp(2rem, 7vw, 5rem);
  font-weight: 800;
  line-height: 1;
  text-shadow: 0 0 24px rgba(200, 241, 101, 0.2);
  animation: venta-flotar 3.2s ease-in-out infinite;
}

.venta-coming span {
  display: inline-block;
  animation: venta-punto 1.4s ease-in-out infinite;
}

.venta-coming span:nth-child(2) {
  animation-delay: 0.18s;
}

.venta-coming span:nth-child(3) {
  animation-delay: 0.36s;
}

/* ============================================
   CONTACTO
   ============================================ */
.seccion-contacto {
  text-align: left;
}

.redes {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
}

.redes a {
  color: var(--texto-dim);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  transition: color 0.2s ease;
}

.redes a:hover {
  color: var(--acento);
}

/* ============================================
   FOOTER
   ============================================ */
footer {
  text-align: center;
  padding: 2rem;
  border-top: 1px solid var(--borde);
  font-size: 0.75rem;
  color: var(--texto-dim);
  letter-spacing: 0.1em;
}

/* ============================================
   ANIMACIÓN DE ENTRADA
   ============================================ */
@keyframes aparecer {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes venta-flotar {
  0%, 100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

@keyframes venta-punto {
  0%, 100% {
    opacity: 0.25;
    transform: translateY(0);
  }

  50% {
    opacity: 1;
    transform: translateY(-7px);
  }
}

/* ============================================
   PANTALLA DE CARGA
   ============================================ */
.pantalla-carga {
  position: fixed;
  inset: 0; /* equivale a top:0; right:0; bottom:0; left:0; */
  background-color: var(--fondo);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 999; /* siempre por encima de todo lo demás */
}

/* Cuando tiene la clase "activa", se hace visible */
.pantalla-carga.activa {
  opacity: 1;
  visibility: visible;
}

.loader {
  width: 46px;
  height: 46px;
  border: 3px solid var(--borde);
  border-top-color: var(--acento); /* este borde sí gira y se ve */
  border-radius: 50%;
  animation: girar 0.8s linear infinite;
}

.pantalla-carga p {
  font-family: var(--fuente-mono);
  color: var(--texto-dim);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
}

@keyframes girar {
  to {
    transform: rotate(360deg);
  }
}

/* ============================================
   RESPONSIVE — para celulares
   ============================================ */
@media (max-width: 768px) {
  nav {
    padding: 1rem 1.5rem;
  }

  nav ul {
    gap: 1.2rem;
  }

  .hero {
    padding: 0 1.5rem;
    padding-top: 6rem;
  }

  .hero-decoracion {
    display: none; /* ocultamos el círculo en móvil */
  }

  .seccion {
    padding: 4rem 1.5rem;
  }
}

/* Ajustes para pantallas estrechas y navegación por teclado. */
html { scroll-padding-top: 110px; }
body { overflow-wrap: anywhere; }
.grid-proyectos { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.tarjeta-proyecto { min-width: 0; display: flex; flex-direction: column; }
.enlace-proyecto { margin-top: auto; padding-top: 20px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--acento); outline-offset: 4px; }
@media (max-width: 640px) {
  nav { flex-wrap: wrap; gap: 12px; padding: 12px 18px; }
  nav ul { flex-wrap: wrap; gap: 10px 16px; }
  nav a { font-size: .75rem; }
  .hero h1 { font-size: clamp(3rem, 14vw, 5rem); }
  .hero { min-height: 85svh; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Fluid navigation and comfortable touch targets. */
nav ul { align-items: center; flex-wrap: wrap; }
nav a { display: inline-flex; align-items: center; min-height: 44px; }
nav { gap: 16px; padding-inline: clamp(18px, 4vw, 64px); }
.hero { padding-top: calc(var(--site-header-height, 90px) + 40px); padding-bottom: 56px; }
.boton-principal { max-width: 100%; }
.redes { flex-wrap: wrap; gap: 12px 28px; }
.redes a, .enlace-proyecto { min-height: 44px; display: inline-flex; align-items: center; }
@media (max-width: 400px) {
  nav ul { gap: 0 12px; }
  nav a { font-size: 11px; }
  .hero h1 { font-size: clamp(2.5rem, 13vw, 3.25rem); }
}
@media (hover: none) {
  .boton-principal:hover, .tarjeta-habilidad:hover { transform: none; }
}
