:root {
  color-scheme: dark;
  --bg: #000510;
  --bg-alt: #020818;
  --surface: rgba(10, 20, 40, 0.6);
  --surface-solid: #0a1428;
  --text: #f5f5f5;
  --text-muted: #8892a4;
  
  /* Colores de las partículas */
  --accent-cyan: #00D4FF;
  --accent-magenta: #FF00FF;
  --accent-pink: #FF69B4;
  --accent-green: #00FF88;
  --accent: var(--accent-cyan);
  --accent-soft: rgba(0, 212, 255, 0.15);
  
  --line: rgba(0, 212, 255, 0.12);
  --shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
  --radius: 20px;
  --font-title: "Space Grotesk", sans-serif;
  --font-body: "Sora", sans-serif;
  
  /* Glow effects */
  --glow-cyan: 0 0 30px rgba(0, 212, 255, 0.4);
  --glow-magenta: 0 0 30px rgba(255, 0, 255, 0.4);
  --glow-pink: 0 0 30px rgba(255, 105, 180, 0.4);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
}

img {
  display: block;
  width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  background: var(--bg);
  position: relative;
}

/* Fondo de estrellas global */
.page::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(1px 1px at 20% 30%, rgba(0, 212, 255, 0.8), transparent),
    radial-gradient(1px 1px at 40% 70%, rgba(255, 0, 255, 0.6), transparent),
    radial-gradient(1px 1px at 50% 20%, rgba(255, 105, 180, 0.7), transparent),
    radial-gradient(1.5px 1.5px at 60% 80%, rgba(0, 255, 136, 0.6), transparent),
    radial-gradient(1px 1px at 70% 40%, rgba(0, 212, 255, 0.5), transparent),
    radial-gradient(1px 1px at 80% 10%, rgba(255, 0, 255, 0.4), transparent),
    radial-gradient(1px 1px at 10% 90%, rgba(0, 255, 136, 0.5), transparent),
    radial-gradient(1px 1px at 90% 60%, rgba(255, 105, 180, 0.5), transparent),
    radial-gradient(1px 1px at 30% 50%, rgba(0, 212, 255, 0.4), transparent),
    radial-gradient(1.5px 1.5px at 15% 15%, #fff, transparent),
    radial-gradient(1px 1px at 45% 85%, #fff, transparent),
    radial-gradient(1px 1px at 75% 25%, rgba(255, 255, 255, 0.8), transparent),
    radial-gradient(1px 1px at 85% 75%, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(1px 1px at 25% 65%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1px 1px at 55% 45%, rgba(255, 255, 255, 0.4), transparent);
  background-size: 250px 250px;
  animation: twinkleStars 8s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

@keyframes twinkleStars {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.8; }
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.35s ease, border-color 0.35s ease, backdrop-filter 0.35s ease;
}

.site-header.is-solid {
  backdrop-filter: blur(16px);
  background: rgba(0, 5, 16, 0.85);
  border-bottom-color: var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 6vw;
}

.logo img {
  width: 180px;
  filter: invert(1) brightness(1.15);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.nav-links a {
  position: relative;
  padding-bottom: 6px;
  color: var(--text-muted);
  line-height: 1;
}

.nav-links a.active,
.nav-links a:hover {
  color: var(--accent-cyan);
}

.nav-links a.active::after,
.nav-links a:hover::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-magenta));
}

/* Language Toggle Button */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 5px 12px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  transition: all 0.3s ease;
  margin-left: 12px;
  line-height: 1;
}

.lang-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-cyan);
}

.lang-option {
  color: var(--text-muted);
  transition: color 0.3s ease;
  cursor: pointer;
}

.lang-option.active {
  color: var(--accent-cyan);
}

.lang-option:hover {
  color: var(--text);
}

.lang-divider {
  color: var(--line);
  font-weight: 300;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  gap: 6px;
}

.nav-toggle span {
  display: block;
  width: 28px;
  height: 2px;
  background: var(--text);
}

.hero {
  position: relative;
  min-height: 100vh;
  height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  text-align: left;
  padding: 0;
  perspective: 900px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(244, 196, 0, 0.12), transparent 45%),
    radial-gradient(circle at 80% 10%, rgba(255, 255, 255, 0.04), transparent 60%),
    #0b0c10;
  filter: saturate(1.02) contrast(1.05);
  transform: translateY(var(--hero-offset, 0px)) scale(1.05);
  animation: slowZoom 18s ease-in-out infinite alternate;
  z-index: 0;
}

.hero-3d {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  opacity: 0.95;
  mask-image: radial-gradient(circle at 50% 50%, black 0%, black 60%, transparent 80%);
}

.hero-3d canvas {
  width: 100%;
  height: 100%;
  display: block;
  position: absolute;
  top: 0;
  left: 0;
}

#hero-canvas-glow {
  z-index: 0;
  filter: blur(6px) brightness(160%);
  mix-blend-mode: screen;
}

#hero-canvas {
  z-index: 1;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 12px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-magenta), var(--accent-pink));
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s ease infinite;
  margin: 0 0 16px;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero h1 {
  font-family: var(--font-title);
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  text-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
}

.hero-lead {
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  color: var(--text-muted);
  margin-bottom: 28px;
  text-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.btn {
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.2em;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn.primary {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-magenta));
  color: #000;
  box-shadow: var(--glow-cyan);
}

.btn.primary:hover {
  box-shadow: 0 0 40px rgba(0, 212, 255, 0.6), 0 0 60px rgba(255, 0, 255, 0.3);
}

.btn.ghost {
  border: 1px solid var(--accent-cyan);
  color: var(--accent-cyan);
  background: transparent;
}

.btn.ghost:hover {
  background: rgba(0, 212, 255, 0.1);
  box-shadow: var(--glow-cyan);
}

.btn:hover {
  transform: translateY(-2px);
}

.hero-meta {
  display: flex;
  justify-content: flex-start;
  gap: 18px;
  margin-top: 28px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-muted);
}

.image-banner {
  position: relative;
  background: url("assets/images/hero/00.webp") center/cover no-repeat fixed;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  z-index: 2;
}

.image-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: 
    linear-gradient(180deg, rgba(0, 5, 16, 1) 0%, rgba(0, 5, 16, 0.85) 15%, rgba(0, 5, 16, 0.7) 50%, rgba(0, 5, 16, 0.85) 85%, rgba(0, 5, 16, 1) 100%),
    linear-gradient(120deg, rgba(0, 5, 16, 0.6), transparent 70%);
  pointer-events: none;
}

.image-banner-content {
  position: relative;
  z-index: 1;
  max-width: 640px;
}

.scroll-indicator {
  position: absolute;
  bottom: 40px;
  width: 28px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 8px;
}

.scroll-indicator span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent-cyan);
  animation: bounce 2s infinite;
  box-shadow: 0 0 10px var(--accent-cyan);
}

.section {
  padding: 90px 6vw;
  position: relative;
  z-index: 2;
  background: var(--bg);
}

.section-header {
  max-width: 640px;
  margin: 0 auto 48px;
  text-align: center;
}

.section-header h2 {
  font-family: var(--font-title);
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 0 0 12px;
}

.section-header p {
  margin: 0;
  color: var(--text-muted);
}

.about-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.section.about {
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
}

.card {
  background: var(--surface);
  backdrop-filter: blur(20px);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
  position: relative;
}

.card:hover {
  transform: translateY(-8px);
  border-color: rgba(0, 212, 255, 0.3);
  box-shadow: var(--shadow), var(--glow-cyan);
}

/* Filtro Instagram para imágenes */
.card img {
  position: relative;
  filter: saturate(0.85) contrast(1.08);
  transition: filter 0.4s ease, transform 0.4s ease;
}

/* Contenedor de imagen en card */
.card-image {
  position: relative;
  overflow: hidden;
}

.card-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 35%, rgba(0, 0, 0, 0.55) 100%);
  pointer-events: none;
  z-index: 1;
  opacity: 1;
  transition: opacity 0.4s ease;
}

.card:hover .card-image::after {
  opacity: 0.6;
}

.card:hover img {
  filter: saturate(1.05) contrast(1.1);
  transform: scale(1.03);
}

.card-body {
  padding: 24px;
}

.card h3 {
  font-family: var(--font-title);
  margin: 0 0 8px;
}

.subtitle {
  color: var(--accent-pink);
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.2em;
  margin: 0 0 12px;
}

.studio {
  background: linear-gradient(160deg, 
    rgba(0, 212, 255, 0.08), 
    rgba(255, 0, 255, 0.05),
    var(--bg));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 2;
}

.studio-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.studio-block {
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(0, 5, 16, 0.7);
  backdrop-filter: blur(10px);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.studio-block:hover {
  transform: translateY(-4px);
  border-color: var(--accent-magenta);
  box-shadow: var(--glow-magenta);
}

.studio-block h3 {
  margin-top: 0;
  font-family: var(--font-title);
}

.portfolio-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.section.portfolio {
  background: var(--bg);
}

.portfolio-card {
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: left;
  padding: 0;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
  position: relative;
  display: flex;
  flex-direction: column;
}

.portfolio-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4), 0 0 30px rgba(0, 212, 255, 0.15);
  border-color: rgba(0, 212, 255, 0.3);
}

/* Contenedor de imagen con viñeta */
.portfolio-card-image {
  position: relative;
  overflow: hidden;
}

.portfolio-card-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.5) 100%);
  pointer-events: none;
  z-index: 1;
  opacity: 0.8;
  transition: opacity 0.4s ease;
}

.portfolio-card:hover .portfolio-card-image::after {
  opacity: 0.5;
}

.portfolio-card img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.9) contrast(1.05);
  transition: transform 0.4s ease, filter 0.4s ease;
}

.portfolio-card:hover img {
  transform: scale(1.05);
  filter: saturate(1.1) contrast(1.08);
}

.card-info {
  padding: 18px 20px 20px;
  position: relative;
  z-index: 3;
  background: var(--surface-solid);
  flex-shrink: 0;
}

.card-info h3 {
  margin: 0 0 6px;
  font-family: var(--font-title);
  font-size: 1.1rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-info p {
  margin: 0;
  color: var(--accent-cyan);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.contact {
  background: linear-gradient(180deg, var(--bg), var(--bg-alt));
  position: relative;
  z-index: 2;
}

.contact-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.contact-card {
  padding: 26px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: blur(20px);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-card:hover {
  border-color: var(--accent-green);
  box-shadow: var(--glow-cyan);
}

.social-links {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 16px;
}

.social-links a {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  transition: color 0.3s ease, transform 0.3s ease;
  font-size: 14px;
}

.social-links a svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.social-links a:hover {
  color: var(--accent-cyan);
  transform: translateX(4px);
}

.social-links a:hover svg {
  transform: scale(1.15);
}

/* Colores específicos por red social */
.social-links a:nth-child(1):hover { color: #1877f2; } /* Facebook */
.social-links a:nth-child(2):hover { color: #fff; }    /* X/Twitter */
.social-links a:nth-child(3):hover { color: #ff0000; } /* YouTube */
.social-links a:nth-child(4):hover { color: #0a66c2; } /* LinkedIn */

.site-footer {
  text-align: center;
  padding: 30px 6vw 50px;
  color: var(--text-muted);
  font-size: 13px;
  border-top: 1px solid var(--line);
  position: relative;
  z-index: 1;
  background: linear-gradient(180deg, transparent, rgba(0, 212, 255, 0.03));
}

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 100;
}

.modal.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 7, 9, 0.85);
}

.modal-card {
  position: relative;
  background: rgba(10, 20, 40, 0.98);
  backdrop-filter: blur(30px);
  border-radius: var(--radius);
  padding: 24px;
  width: min(1200px, 95vw);
  height: min(85vh, 800px);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow), 0 0 60px rgba(0, 212, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-magenta));
  color: #000;
  font-size: 20px;
  font-weight: 300;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  z-index: 10;
}

.modal-close:hover {
  transform: rotate(90deg) scale(1.1);
  box-shadow: var(--glow-cyan);
}

.modal-header {
  flex-shrink: 0;
  padding-right: 50px;
}

.modal-header h3 {
  margin: 0;
  font-family: var(--font-title);
  font-size: 1.4rem;
}

.modal-tags {
  margin: 4px 0 0;
  color: var(--accent-cyan);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.2em;
}

.modal-body {
  display: flex;
  gap: 16px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.modal-media {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  min-height: 0;
}

.modal-main {
  background: rgba(0, 5, 16, 0.95);
  border-radius: 12px;
  position: relative;
  border: 1px solid var(--line);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 0;
}

.modal-main img {
  max-height: 100%;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
}

.modal-video {
  display: none;
}

.modal-video.active {
  display: flex;
  flex: 1;
  min-height: 0;
  background: rgba(0, 5, 16, 0.95);
  border-radius: 12px;
  border: 1px solid var(--line);
  overflow: hidden;
}

.modal-video iframe {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 8px;
}

/* Sidebar de thumbnails */
.modal-thumbs {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px;
  width: 110px;
  flex-shrink: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-cyan) transparent;
}

.modal-thumbs::-webkit-scrollbar {
  width: 4px;
}

.modal-thumbs::-webkit-scrollbar-track {
  background: transparent;
}

.modal-thumbs::-webkit-scrollbar-thumb {
  background: var(--accent-cyan);
  border-radius: 2px;
}

.modal-thumbs img {
  width: 100%;
  height: 60px;
  flex-shrink: 0;
  object-fit: cover;
  object-position: center;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.2s ease, opacity 0.2s ease;
  opacity: 0.5;
}

.modal-thumbs img:hover {
  opacity: 0.8;
}

.modal-thumbs img.active {
  border-color: var(--accent-cyan);
  opacity: 1;
}

/* Botón de video en thumbnails */
.video-thumb {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 100%;
  height: 60px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #ff0000, #cc0000);
  border: 2px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: white;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
}

.video-thumb svg {
  width: 20px;
  height: 20px;
}

.video-thumb:hover {
  background: linear-gradient(135deg, #ff3333, #ff0000);
}

.video-thumb.active {
  border-color: white;
}

.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  color: white;
  font-size: 22px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  z-index: 5;
  /* Prevenir zoom y highlight en móvil */
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

.modal-nav:hover {
  background: rgba(255, 255, 255, 0.3);
}

.modal-nav:active {
  transform: translateY(-50%) scale(0.95);
  background: rgba(255, 255, 255, 0.35);
}

.modal-nav.prev {
  left: 12px;
}

.modal-nav.next {
  right: 12px;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered reveal for grid items */
.about-grid .reveal:nth-child(1) { transition-delay: 0s; }
.about-grid .reveal:nth-child(2) { transition-delay: 0.1s; }
.about-grid .reveal:nth-child(3) { transition-delay: 0.2s; }

.portfolio-grid .reveal:nth-child(1) { transition-delay: 0s; }
.portfolio-grid .reveal:nth-child(2) { transition-delay: 0.08s; }
.portfolio-grid .reveal:nth-child(3) { transition-delay: 0.16s; }
.portfolio-grid .reveal:nth-child(4) { transition-delay: 0.24s; }
.portfolio-grid .reveal:nth-child(5) { transition-delay: 0.32s; }
.portfolio-grid .reveal:nth-child(6) { transition-delay: 0.4s; }
.portfolio-grid .reveal:nth-child(7) { transition-delay: 0.48s; }
.portfolio-grid .reveal:nth-child(8) { transition-delay: 0.56s; }
.portfolio-grid .reveal:nth-child(9) { transition-delay: 0.64s; }

@keyframes slowZoom {
  0% {
    transform: scale(1.05) translateY(0);
  }
  100% {
    transform: scale(1.1) translateY(-10px);
  }
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(8px);
  }
}

@media (max-width: 900px) {
  .modal-body {
    flex-direction: column;
  }
  
  .modal-thumbs {
    flex-direction: row;
    width: 100%;
    max-height: none;
    height: auto;
    overflow-x: auto;
    overflow-y: hidden;
  }
  
  .modal-thumbs::-webkit-scrollbar {
    height: 5px;
    width: auto;
  }
  
  .modal-thumbs img,
  .modal-thumbs .video-thumb {
    width: 90px;
    height: 55px;
  }

  .modal-thumbs img {
    width: 80px;
    height: 55px;
  }
}

@media (max-width: 760px) {
  .nav-links {
    position: fixed;
    top: 70px;
    right: 6vw;
    flex-direction: column;
    background: rgba(0, 5, 16, 0.95);
    backdrop-filter: blur(20px);
    padding: 18px 22px;
    border-radius: 18px;
    border: 1px solid var(--line);
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    align-items: flex-start;
    gap: 14px;
  }

  .nav-links.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .lang-toggle {
    margin-left: 0;
    margin-top: 8px;
  }

  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
  }

  .hero-meta {
    flex-direction: column;
  }

  .hero-3d {
    opacity: 0.7;
    mask-image: none;
  }

  .hero-actions,
  .hero-meta {
    justify-content: center;
  }
}

@media (max-width: 520px) {
  .hero-actions {
    flex-direction: column;
  }

  .modal-card {
    padding: 20px;
  }
}

/* ================================
   DRONE LETTER HERO STYLES
   ================================ */

.drone-hero {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  min-height: 100vh;
  background: #000510;
  overflow: hidden;
  z-index: 0;
}

.drone-container {
  position: absolute;
  inset: 0;
  cursor: pointer;
}

.drone-container canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* Click Hint - follows mouse */
.drone-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  pointer-events: none;
  z-index: 10;
  opacity: 1;
  transition: opacity 0.5s ease;
}

.drone-hint-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  transform: translate(-50%, -50%);
  animation: dronePulse 2s ease-in-out infinite;
}

.drone-hint-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(0, 212, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.3s ease;
}

.drone-hint-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(0, 212, 255, 0.8);
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.6);
}

.drone-hint p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin: 0;
  white-space: nowrap;
  transition: opacity 0.5s ease;
}

/* Después del primer click, ocultar el texto */
.drone-hint.clicked p {
  opacity: 0;
  pointer-events: none;
}

@keyframes dronePulse {
  0%, 100% {
    opacity: 0.6;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.08);
  }
}

/* Remove Overlay Content - keeping section for potential future use */
.drone-overlay {
  display: none;
}

.drone-overlay-text {
  text-align: center;
}

.drone-eyebrow {
  color: #00D4FF;
  font-size: clamp(12px, 2vw, 16px);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-weight: 300;
  margin: 0 0 16px;
  animation: dronePulse 2s ease-in-out infinite;
}

.drone-title {
  color: rgba(255, 255, 255, 0.8);
  font-size: clamp(18px, 3vw, 28px);
  font-weight: 200;
  letter-spacing: 0.05em;
  margin: 0;
}

/* Gradient Overlays for Depth */
.drone-gradient-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 150px;
  background: linear-gradient(to top, var(--bg), transparent);
  pointer-events: none;
  z-index: 4;
}

.drone-gradient-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(to bottom, rgba(0, 5, 16, 0.6), transparent);
  pointer-events: none;
  z-index: 4;
}

/* Scroll indicator adjustments for drone hero */
.drone-hero .scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

/* Download wallpaper button */
.download-wallpaper {
  position: absolute;
  bottom: 30px;
  right: 30px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 30px;
  padding: 10px 18px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.3s ease;
}

.download-wallpaper svg {
  width: 18px;
  height: 18px;
}

.download-wallpaper:hover {
  background: rgba(0, 212, 255, 0.2);
  border-color: var(--accent-cyan);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 212, 255, 0.3);
}

.download-wallpaper:active {
  transform: translateY(0);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .download-wallpaper {
    bottom: 20px;
    right: 20px;
    padding: 8px 14px;
    font-size: 10px;
  }
  
  .download-wallpaper span {
    display: none;
  }
  
  .download-wallpaper svg {
    width: 20px;
    height: 20px;
  }
  
  .drone-overlay {
    padding-bottom: 100px;
  }
  
  .drone-hint-circle {
    width: 40px;
    height: 40px;
  }
  
  .drone-hint-dot {
    width: 10px;
    height: 10px;
  }
  
  .drone-hint p {
    font-size: 12px;
  }
}

/* ================================
   MOBILE TOUCH IMPROVEMENTS
   ================================ */

/* Prevenir zoom accidental en iOS */
@media (max-width: 768px) {
  /* Hero móvil - más corto para facilitar scroll */
  .drone-hero {
    height: 85vh;
    min-height: 500px;
    max-height: 700px;
  }
  
  /* El container del canvas permite scroll pass-through */
  .drone-container {
    touch-action: pan-y pinch-zoom;
  }
  
  /* Hint para móvil: tap en lugar de click */
  .drone-hint p {
    content: 'Tap para dispersar';
  }
  
  /* Modal botones de navegación más grandes y táctiles */
  .modal-nav {
    width: 56px;
    height: 56px;
    font-size: 24px;
    /* Evitar zoom accidental con touch-action */
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }
  
  .modal-nav.prev {
    left: 8px;
  }
  
  .modal-nav.next {
    right: 8px;
  }
  
  /* Modal cerrar botón más grande */
  .modal-close {
    width: 48px;
    height: 48px;
    font-size: 24px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }
  
  /* Modal card ocupa toda la pantalla en móvil */
  .modal-card {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    border-radius: 0;
    padding: 16px;
  }
  
  /* Layout vertical en móvil */
  .modal-body {
    flex-direction: column;
    gap: 12px;
  }
  
  /* Thumbnails horizontales en móvil */
  .modal-thumbs {
    flex-direction: row;
    width: 100%;
    height: auto;
    max-height: 70px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 0;
    order: 2; /* Mover debajo de la imagen */
    -webkit-overflow-scrolling: touch;
  }
  
  .modal-thumbs img {
    width: 60px;
    height: 50px;
    flex-shrink: 0;
  }
  
  .modal-thumbs .video-thumb {
    width: 60px;
    height: 50px;
  }
  
  /* Imagen principal más grande */
  .modal-media {
    order: 1;
    flex: 1;
    min-height: 0;
  }
  
  /* Área táctil para swipe */
  .modal-main {
    touch-action: pan-x pinch-zoom;
    user-select: none;
    -webkit-user-select: none;
  }
  
  /* Scroll indicator móvil */
  .drone-hero .scroll-indicator {
    bottom: 20px;
  }
}

/* Extra pequeño - teléfonos */
@media (max-width: 480px) {
  .drone-hero {
    height: 75vh;
    min-height: 400px;
    max-height: 600px;
  }
  
  /* Ocultar hint en pantallas muy pequeñas */
  .drone-hint p {
    display: none;
  }
  
  .modal-nav {
    width: 48px;
    height: 48px;
    font-size: 20px;
  }
  
  .modal-card {
    padding: 12px;
  }
  
  .modal-header h3 {
    font-size: 1.1rem;
  }
  
  .modal-thumbs {
    max-height: 60px;
  }
  
  .modal-thumbs img,
  .modal-thumbs .video-thumb {
    width: 50px;
    height: 45px;
  }
}
