/* =========================================================
   Leonardo Arias — Portafolio de animación
   Estética: showreel oscuro, cinematográfico, tipografía grande.
   Sin dependencias ni build. Un solo archivo de estilos.
   ========================================================= */

:root {
  /* Paleta */
  --fondo:        #0b0b0d;
  --fondo-2:      #121216;
  --superficie:   #16161b;
  --superficie-2: #1d1d24;
  --borde:        #2a2a33;
  --texto:        #f4f3ee;
  --texto-tenue:  #a3a09a;
  --texto-suave:  #6f6d68;

  /* Acento cálido tipo cine */
  --acento:       #ff5a3c;
  --acento-2:     #ffb020;
  --acento-glow:  rgba(255, 90, 60, 0.35);

  /* Tipografía */
  --display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --cuerpo:  "Inter", system-ui, -apple-system, sans-serif;

  /* Medidas */
  --ancho: 1200px;
  --radio: 16px;
  --trans: 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  font-family: var(--cuerpo);
  background: var(--fondo);
  color: var(--texto);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Grano sutil sobre todo el fondo */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.05; letter-spacing: -0.02em; }

/* ===================== Navegación ===================== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(20px, 5vw, 56px);
  transition: background var(--trans), border-color var(--trans), padding var(--trans);
  border-bottom: 1px solid transparent;
}
.nav--scrolled {
  background: rgba(11, 11, 13, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--borde);
  padding-top: 14px;
  padding-bottom: 14px;
}
.nav__marca {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav__punto {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--acento);
  box-shadow: 0 0 12px var(--acento-glow);
  animation: latido 2.4s ease-in-out infinite;
}
@keyframes latido {
  0%, 100% { transform: scale(1);   opacity: 1; }
  50%      { transform: scale(1.4); opacity: 0.6; }
}
.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.5vw, 34px);
}
.nav__links a {
  font-size: 0.92rem;
  color: var(--texto-tenue);
  transition: color 0.25s;
  position: relative;
}
.nav__links a:not(.nav__cta)::after {
  content: "";
  position: absolute;
  left: 0; bottom: -5px;
  width: 0; height: 2px;
  background: var(--acento);
  transition: width 0.3s;
}
.nav__links a:hover { color: var(--texto); }
.nav__links a:not(.nav__cta):hover::after { width: 100%; }
.nav__cta {
  padding: 8px 18px;
  border: 1px solid var(--borde);
  border-radius: 999px;
  color: var(--texto) !important;
  transition: background 0.25s, border-color 0.25s;
}
.nav__cta:hover { background: var(--acento); border-color: var(--acento); color: #130a08 !important; }

.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px;
}
.nav__burger span {
  width: 26px; height: 2px;
  background: var(--texto);
  transition: transform 0.3s, opacity 0.3s;
}

/* ===================== Héroe ===================== */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px clamp(20px, 5vw, 56px) 80px;
  max-width: var(--ancho);
  margin: 0 auto;
  z-index: 2;
}
.hero__fondo {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: -1;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: flotar 16s ease-in-out infinite;
}
.blob--1 { width: 460px; height: 460px; background: var(--acento);   top: -80px;  right: 4%;  }
.blob--2 { width: 380px; height: 380px; background: var(--acento-2); bottom: 2%; left: -60px; animation-delay: -5s; opacity: 0.28; }
.blob--3 { width: 300px; height: 300px; background: #7a3cff;         top: 36%;   left: 44%;  animation-delay: -9s; opacity: 0.22; }
@keyframes flotar {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(40px, -30px) scale(1.12); }
  66%      { transform: translate(-30px, 24px) scale(0.92); }
}
.hero__eyebrow {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.78rem;
  color: var(--acento);
  margin-bottom: 26px;
}
.hero__titulo {
  font-size: clamp(2.8rem, 9vw, 6.4rem);
  font-weight: 700;
  margin-bottom: 30px;
}
.hero__titulo .linea { display: block; }
.linea--acento {
  background: linear-gradient(100deg, var(--acento), var(--acento-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero__bajada {
  max-width: 540px;
  font-size: clamp(1rem, 1.6vw, 1.18rem);
  color: var(--texto-tenue);
  margin-bottom: 40px;
}
.hero__bajada strong { color: var(--texto); font-weight: 600; }
.hero__botones { display: flex; flex-wrap: wrap; gap: 14px; }

.btn {
  font-family: var(--display);
  font-weight: 500;
  font-size: 0.98rem;
  padding: 14px 28px;
  border-radius: 999px;
  transition: transform 0.25s, box-shadow 0.25s, background 0.25s, color 0.25s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn--solido {
  background: var(--acento);
  color: #130a08;
  box-shadow: 0 8px 30px var(--acento-glow);
}
.btn--solido:hover { transform: translateY(-3px); box-shadow: 0 14px 40px var(--acento-glow); }
.btn--linea {
  border: 1px solid var(--borde);
  color: var(--texto);
}
.btn--linea:hover { border-color: var(--texto); transform: translateY(-3px); }

.hero__scroll {
  position: absolute;
  bottom: 30px; left: 50%;
  transform: translateX(-50%);
  width: 26px; height: 42px;
  border: 2px solid var(--texto-suave);
  border-radius: 14px;
}
.hero__scroll span {
  position: absolute;
  left: 50%; top: 8px;
  width: 4px; height: 8px;
  margin-left: -2px;
  background: var(--acento);
  border-radius: 2px;
  animation: baja 1.6s ease-in-out infinite;
}
@keyframes baja {
  0%   { transform: translateY(0);  opacity: 0; }
  40%  { opacity: 1; }
  100% { transform: translateY(16px); opacity: 0; }
}

/* ===================== Secciones genéricas ===================== */
.seccion {
  position: relative;
  z-index: 2;
  max-width: var(--ancho);
  margin: 0 auto;
  padding: clamp(70px, 10vw, 130px) clamp(20px, 5vw, 56px);
}
.seccion__cab { margin-bottom: 48px; }
.seccion__kicker {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.74rem;
  color: var(--acento);
  margin-bottom: 14px;
}
.seccion__titulo { font-size: clamp(2rem, 5vw, 3.4rem); margin-bottom: 18px; }
.seccion__intro {
  max-width: 560px;
  color: var(--texto-tenue);
  font-size: 1.05rem;
}

/* ===================== Reel ===================== */
.reel__marco {
  aspect-ratio: 16 / 9;
  border-radius: var(--radio);
  overflow: hidden;
  border: 1px solid var(--borde);
  background: var(--superficie);
}
.reel__marco iframe,
.reel__marco video { width: 100%; height: 100%; border: 0; display: block; }
.reel__poster {
  width: 100%; height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,90,60,0.22), transparent 60%),
    radial-gradient(circle at 75% 70%, rgba(255,176,32,0.18), transparent 55%),
    var(--fondo-2);
}
.reel__play {
  width: 84px; height: 84px;
  border-radius: 50%;
  background: var(--acento);
  box-shadow: 0 0 40px var(--acento-glow);
  position: relative;
  transition: transform 0.3s;
}
.reel__marco:hover .reel__play { transform: scale(1.08); }
.reel__play::after {
  content: "";
  position: absolute;
  top: 50%; left: 54%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 14px 0 14px 24px;
  border-color: transparent transparent transparent #130a08;
}
.reel__texto { color: var(--texto-tenue); font-family: var(--display); letter-spacing: 0.06em; }
.reel__pie { margin-top: 20px; color: var(--texto-suave); font-size: 0.95rem; }
.reel__pie a { color: var(--acento); }

/* ===================== Rejilla de obras ===================== */
.galeria--alt { background:
  linear-gradient(180deg, transparent, rgba(255,255,255,0.015), transparent); }

.rejilla {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
}
.rejilla__vacio {
  grid-column: 1 / -1;
  padding: 48px;
  text-align: center;
  color: var(--texto-suave);
  border: 1px dashed var(--borde);
  border-radius: var(--radio);
}

.tarjeta {
  position: relative;
  border-radius: var(--radio);
  overflow: hidden;
  background: var(--superficie);
  border: 1px solid var(--borde);
  cursor: pointer;
  transition: transform var(--trans), border-color var(--trans), box-shadow var(--trans);
}
.tarjeta:hover {
  transform: translateY(-6px);
  border-color: var(--acento);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}
.tarjeta__media {
  aspect-ratio: 4 / 3;
  position: relative;
  overflow: hidden;
}
.tarjeta__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2,0.7,0.2,1);
}
.tarjeta:hover .tarjeta__media img { transform: scale(1.07); }
/* Póster generado por CSS cuando no hay imagen */
.tarjeta__poster {
  width: 100%; height: 100%;
  display: flex;
  align-items: flex-end;
  padding: 18px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 2.6rem;
  color: rgba(255,255,255,0.14);
}
.tarjeta__etiqueta {
  position: absolute;
  top: 12px; left: 12px;
  font-family: var(--display);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(11,11,13,0.72);
  backdrop-filter: blur(6px);
  color: var(--texto);
  border: 1px solid var(--borde);
}
.tarjeta__ver {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(11,11,13,0.55);
  opacity: 0;
  transition: opacity 0.3s;
}
.tarjeta:hover .tarjeta__ver { opacity: 1; }
.tarjeta__ver span {
  font-family: var(--display);
  font-size: 0.9rem;
  padding: 10px 20px;
  border: 1px solid var(--texto);
  border-radius: 999px;
}
.tarjeta__cuerpo { padding: 18px 20px 22px; }
.tarjeta__titulo { font-size: 1.22rem; margin-bottom: 6px; }
.tarjeta__meta { color: var(--texto-suave); font-size: 0.86rem; margin-bottom: 10px; }
.tarjeta__desc { color: var(--texto-tenue); font-size: 0.92rem; }

/* ===================== Sobre mí ===================== */
.sobre__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}
.sobre__texto p { color: var(--texto-tenue); margin-top: 18px; max-width: 48ch; }
.sobre__texto strong { color: var(--texto); }
.sobre__skills { position: sticky; top: 110px; }
.sobre__skills h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--texto-suave);
  margin: 0 0 14px;
}
.sobre__skills h3:nth-of-type(2) { margin-top: 30px; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 9px; }
.chips li {
  font-family: var(--display);
  font-size: 0.86rem;
  padding: 8px 15px;
  border: 1px solid var(--borde);
  border-radius: 999px;
  color: var(--texto);
  background: var(--superficie);
  transition: border-color 0.25s, color 0.25s;
}
.chips li:hover { border-color: var(--acento); color: var(--acento); }

/* ===================== Contacto ===================== */
.contacto { text-align: center; }
.contacto__cont { max-width: 680px; margin: 0 auto; }
.contacto__titulo { font-size: clamp(2.2rem, 6vw, 4rem); margin: 14px 0 18px; }
.contacto__bajada { color: var(--texto-tenue); font-size: 1.1rem; margin-bottom: 34px; }
.contacto__correo {
  display: inline-block;
  font-family: var(--display);
  font-size: clamp(1.3rem, 4vw, 2.1rem);
  font-weight: 600;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--acento);
  transition: color 0.25s, letter-spacing 0.25s;
}
.contacto__correo:hover { color: var(--acento); letter-spacing: 0.01em; }
.redes {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 40px;
}
.redes a {
  font-family: var(--display);
  font-size: 0.92rem;
  padding: 10px 20px;
  border: 1px solid var(--borde);
  border-radius: 999px;
  color: var(--texto-tenue);
  transition: color 0.25s, border-color 0.25s, transform 0.25s;
}
.redes a:hover { color: var(--texto); border-color: var(--texto); transform: translateY(-3px); }

/* ===================== Pie ===================== */
.pie {
  position: relative;
  z-index: 2;
  max-width: var(--ancho);
  margin: 0 auto;
  padding: 36px clamp(20px, 5vw, 56px) 60px;
  border-top: 1px solid var(--borde);
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--texto-suave);
  font-size: 0.9rem;
}
.pie__sep { color: var(--borde); }
.pie__top { margin-left: auto; color: var(--texto-tenue); transition: color 0.25s; }
.pie__top:hover { color: var(--acento); }

/* ===================== Lightbox ===================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(6,6,8,0.92);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 5vw, 60px);
  gap: 20px;
  animation: aparece 0.3s ease;
}
.lightbox[hidden] { display: none; }
@keyframes aparece { from { opacity: 0; } to { opacity: 1; } }
.lightbox__cerrar {
  position: absolute;
  top: 24px; right: 28px;
  background: none;
  border: 1px solid var(--borde);
  color: var(--texto);
  width: 44px; height: 44px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s;
}
.lightbox__cerrar:hover { background: var(--acento); border-color: var(--acento); color: #130a08; }
.lightbox__cont {
  width: min(960px, 100%);
  max-height: 70vh;
  border-radius: var(--radio);
  overflow: hidden;
  border: 1px solid var(--borde);
}
.lightbox__cont img,
.lightbox__cont iframe,
.lightbox__cont video { width: 100%; height: 100%; max-height: 70vh; object-fit: contain; border: 0; display: block; background: #000; }
.lightbox__info { text-align: center; max-width: 600px; }
.lightbox__info h3 { font-size: 1.5rem; margin-bottom: 8px; }
.lightbox__info p { color: var(--texto-tenue); }

/* ===================== Animación de aparición ===================== */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2,0.7,0.2,1);
}
[data-reveal].visible { opacity: 1; transform: none; }

/* ===================== Responsive ===================== */
@media (max-width: 760px) {
  .nav__burger { display: flex; }
  .nav__links {
    position: fixed;
    top: 0; right: 0;
    height: 100svh;
    width: min(78vw, 320px);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 26px;
    padding: 40px;
    background: var(--fondo-2);
    border-left: 1px solid var(--borde);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.2,0.7,0.2,1);
  }
  .nav__links.abierto { transform: translateX(0); }
  .nav__links a { font-size: 1.2rem; }
  .sobre__grid { grid-template-columns: 1fr; }
  .sobre__skills { position: static; }
  .burger--x span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .burger--x span:nth-child(2) { opacity: 0; }
  .burger--x span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* Respeta a quien prefiere menos movimiento */
@media (prefers-reduced-motion: reduce) {
  *, *::after, *::before { animation: none !important; transition: none !important; }
  [data-reveal] { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
