/* ─── Design Tokens ──────────────────────────────────────────────── */
:root {
  --color-bg:          #080808;
  --color-surface:     #111111;
  --color-surface-2:   #161616;
  --color-border:      #1e1e1e;
  --color-border-soft: #282828;
  --color-text:        #f0ede8;
  --color-text-muted:  #666666;
  --color-text-dim:    #333333;
  --color-accent:      #6db5ff;
  --color-accent-dim:  #001a33;
  --color-accent-glow: rgba(109, 181, 255, 0.12);

  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --radius-full: 9999px;

  --size-xs: 0.75rem;
  --size-xl: 2rem;
}

/* ─── Reset ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }

/* ─── Fallback de fuentes ───────────────────────────────────────────
   Cuando Inter no carga (iOS Lockdown Mode bloquea web fonts, bloqueadores
   de contenido, etc.), el sistema usa San Francisco / Segoe UI / Roboto,
   que rinden más ligeros. JS detecta el fallo y marca html.fonts-fallback;
   aquí compensamos el peso para conservar la jerarquía visual. */
html.fonts-fallback .hero-title,
html.fonts-fallback .hero-name,
html.fonts-fallback .about-heading,
html.fonts-fallback .work-heading,
html.fonts-fallback .process-heading,
html.fonts-fallback .exp-heading,
html.fonts-fallback .lang-heading,
html.fonts-fallback .skills-heading,
html.fonts-fallback .edu-heading,
html.fonts-fallback .ds-heading,
html.fonts-fallback .contact-heading,
html.fonts-fallback .stat-value {
  font-weight: 800;
}

/* En iOS usamos San Francisco directamente: nativa, instantánea y sin
   depender de descargar Inter (Lockdown Mode bloquea web fonts). */
html.ios { --font-sans: -apple-system, BlinkMacSystemFont, system-ui, sans-serif; }

/* ─── Scroll Progress ────────────────────────────────────────────── */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-accent), rgba(109,181,255,0.4));
  z-index: 999;
  width: 0%;
  transition: width 0.1s linear;
  box-shadow: 0 0 8px rgba(109, 181, 255, 0.5);
}

/* ─── Aurora Background ──────────────────────────────────────────── */
.aurora {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.aurora-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.035;
  animation: aurora-drift var(--dur, 20s) ease-in-out infinite alternate;
}
.aurora-orb-1 {
  width: 800px; height: 800px;
  background: radial-gradient(circle, #6db5ff 0%, transparent 70%);
  top: -200px; left: -200px;
  --dur: 25s;
}
.aurora-orb-2 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, #4af542 0%, transparent 70%);
  top: 40%; right: -100px;
  --dur: 18s;
  animation-delay: -8s;
}
.aurora-orb-3 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, #f5f542 0%, transparent 70%);
  bottom: -100px; left: 30%;
  --dur: 22s;
  animation-delay: -12s;
}
@keyframes aurora-drift {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(80px, 60px) scale(1.1); }
  66%  { transform: translate(-40px, 100px) scale(0.9); }
  100% { transform: translate(60px, -40px) scale(1.05); }
}

/* ─── Particle Canvas ────────────────────────────────────────────── */
#particle-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 1;
}

/* ─── Noise Texture ──────────────────────────────────────────────── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px;
  opacity: 0.02;
  mix-blend-mode: overlay;
}

/* ─── Layout ─────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 2;
}
section { padding: 8rem 0; position: relative; }
.divider { border: none; border-top: 1px solid var(--color-border); position: relative; z-index: 2; }

/* ─── Reveal Animations ──────────────────────────────────────────── */
.reveal-wrap { overflow: hidden; }
.reveal { display: block; transform: translateY(100%); opacity: 0; }
.reveal.is-visible { transform: translateY(0); opacity: 1; transition: transform 0.9s var(--ease-out), opacity 0.9s var(--ease-out); }

.fade-up { opacity: 0; transform: translateY(40px); transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out); }
.fade-up.is-visible { opacity: 1; transform: translateY(0); }

.fade-left { opacity: 0; transform: translateX(-30px); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); }
.fade-left.is-visible { opacity: 1; transform: translateX(0); }

/* ─── Cursor ─────────────────────────────────────────────────────── */
#cursor-dot {
  position: fixed;
  width: 8px; height: 8px;
  background: var(--color-accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.1s, width 0.2s, height 0.2s, background 0.2s;
  mix-blend-mode: difference;
}
#cursor-ring {
  position: fixed;
  width: 40px; height: 40px;
  border: 1px solid rgba(109,181,255,0.4);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: transform 0.15s var(--ease-out), width 0.3s var(--ease-out), height 0.3s var(--ease-out), border-color 0.2s;
}
body:has(a:hover) #cursor-dot,
body:has(button:hover) #cursor-dot { width: 16px; height: 16px; }
body:has(a:hover) #cursor-ring,
body:has(button:hover) #cursor-ring { width: 60px; height: 60px; border-color: rgba(109,181,255,0.7); }

/* ─── Nav ────────────────────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0.85rem 2rem;
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0.6rem 0.5rem 1.25rem;
  border-radius: 6rem;
  background: rgba(8,8,8,0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--color-border);
  transition: box-shadow 0.4s, border-color 0.4s;
}
nav.scrolled .nav-inner {
  box-shadow: 0 12px 32px rgba(0,0,0,0.45);
}
.nav-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.nav-logo {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 0;
  text-decoration: none;
  position: relative;
  z-index: 2;
}
.logo-wrap {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  overflow: hidden;
}
.logo-half {
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--color-text);
  line-height: 1;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation-duration: 0.6s;
  animation-fill-mode: both;
  animation-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1);
}
.logo-left  { animation-name: logo-slide-left;  animation-delay: 0.1s; }
.logo-right { animation-name: logo-slide-right; animation-delay: 0.2s; }
@keyframes logo-slide-left  { from { transform: translateX(8px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes logo-slide-right { from { transform: translateX(-8px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.nav-logo:hover .logo-left  { transform: translateX(-2px); }
.nav-logo:hover .logo-right { transform: translateX(2px); }
.logo-dot {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1;
  transition: color 0.2s;
}
.hero-name {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  font-family: var(--font-sans);
  padding-left: 0.75rem;
  border-left: 1px solid var(--color-border);
}
.nav-end {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  transition: color 0.2s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 1px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.25s var(--ease-out);
}
.nav-links a:hover { color: var(--color-text); }
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-cta {
  color: var(--color-bg) !important;
  background: var(--color-accent);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  font-weight: 500;
  transition: all 0.2s var(--ease-out) !important;
  box-shadow: 0 0 0 0 rgba(109,181,255,0.4);
}
.nav-cta:hover { opacity: 0.9; box-shadow: 0 0 20px rgba(109,181,255,0.25); }
.nav-cta::after { display: none !important; }

/* ─── Hero ───────────────────────────────────────────────────────── */
#hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 6rem;
  padding-top: 100px;
  position: relative;
  overflow: hidden;
}
/* Unicorn Studio embed — capa más profunda del hero (debajo de grid-bg, shapes, portrait y contenido). */
.hero-bg-unicorn {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: 1;
}
/* Fallback animado CSS — visible cuando Unicorn no carga (mobile/WebGL fail).
   El canvas de Unicorn, cuando existe, aparece encima y lo tapa. */
.hero-bg-unicorn::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 100% 80% at 70% 20%, rgba(109,181,255,0.13) 0%, transparent 55%),
    radial-gradient(ellipse 60% 60% at 15% 75%, rgba(109,181,255,0.07) 0%, transparent 50%),
    radial-gradient(ellipse 40% 40% at 85% 80%, rgba(160,120,255,0.06) 0%, transparent 45%);
  animation: hero-ambient 14s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes hero-ambient {
  0%   { opacity: 0.5; transform: scale(1)    translate(0,    0); }
  50%  { opacity: 0.9; transform: scale(1.04) translate(-1%, 1.5%); }
  100% { opacity: 0.6; transform: scale(1.08) translate(2%, -1%); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-bg-unicorn::before { animation: none; }
}
.hero-bg-unicorn > div {
  width: 100% !important;
  height: 100% !important;
  display: block;
}
.hero-bg-unicorn canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
  position: relative;
  z-index: 1;
}
/* Video mobile-only — oculto en desktop */
.hero-bg-video {
  display: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  opacity: 0.8;
}
@media (max-width: 960px) {
  .hero-bg-video { display: block; }
  .hero-bg-unicorn canvas { display: none; }
}
/* Ocultar badge "Made with Unicorn Studio" inyectado por el runtime. */
.hero-bg-unicorn a[href*="unicorn.studio"],
.hero-bg-unicorn a[href*="unicorn.studio"] img {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
@media (prefers-reduced-motion: reduce) {
  /* No ocultamos el contenedor — el gradiente estático sigue visible.
     Solo cancelamos la animación del gradiente (ya hecho arriba) y saltamos WebGL. */
  .hero-bg-unicorn canvas { display: none; }
}

/* Reveal escalonado: en carga inicial solo se ven el embed Unicorn y la franja
   negra; el resto del contenido del hero (eyebrow, title, subtitle, actions,
   portrait, scroll-hint) hace fade-in tras inicializar Unicorn. */
#hero[data-state="loading"] > *:not(.hero-bg-unicorn):not(.hero-band) {
  opacity: 0;
}
#hero[data-state="ready"] > *:not(.hero-bg-unicorn):not(.hero-band) {
  opacity: 1;
  transition: opacity 0.7s ease-out;
}

/* Franja negra de 90px FUERA del embed, pegada justo donde el embed termina.
   - En desktop el embed cubre todo el hero → franja queda al bottom del hero.
   - En mobile el embed termina en el bottom del .hero-portrait → franja queda
     justo debajo del portrait, ocupando 90px hacia abajo. */
.hero-band {
  --band-h: 90px;
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(var(--unicorn-bottom, var(--band-h)) - var(--band-h));
  height: var(--band-h);
  background: #000;
  pointer-events: none;
  z-index: 1;
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--color-border) 1px, transparent 1px),
    linear-gradient(90deg, var(--color-border) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.35;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 0%, transparent 100%);
}
.grid-cursor {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image:
    linear-gradient(rgba(109,181,255,0.3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(109,181,255,0.3) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(circle 200px at var(--mx, -999px) var(--my, -999px), black 0%, transparent 100%);
  -webkit-mask-image: radial-gradient(circle 200px at var(--mx, -999px) var(--my, -999px), black 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.hero-shapes { display: none; position: absolute; inset: 0; pointer-events: none; overflow: visible; z-index: 0; }
.hero-shape {
  position: absolute;
  border: 1px solid rgba(109,181,255,0.3);
  border-radius: var(--radius-lg);
  will-change: translate, rotate;
}
.hero-shape-1 { width: 300px; height: 300px; top: 10%; right: 5%; --dur: 9s; }
.hero-shape-2 { width: 180px; height: 180px; top: 60%; right: 20%; --dur: 7s; animation-delay: -3s; border-radius: 50%; }
.hero-shape-3 {
  width: 140px; height: 122px;
  top: 4%; left: 0;
  --dur: 11s; animation-delay: -5s;
  border: none;
  border-radius: 0;
  background: transparent;
}
.hero-shape-3 svg { width: 100%; height: 100%; }
@keyframes float-shape {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.5; }
  50% { transform: translateY(-20px) rotate(5deg); opacity: 1; }
}

.hero-eyebrow { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.5rem; }
.status-dot {
  width: 8px; height: 8px;
  background: var(--color-accent);
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
}
.status-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: var(--color-accent);
  opacity: 0.3;
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.3; }
  50% { transform: scale(2); opacity: 0; }
}
.hero-eyebrow-text {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}
.hero-title {
  font-size: clamp(3rem, 6vw, 6rem);
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -0.035em;
  margin-bottom: 2rem;
}
/* Reserve right-side space ONLY when the portrait is visible (≥961px).
   Fluid: caps at 10rem on mid screens, then INTERPOLATES DOWN
   to 6rem at 1900px+ so the title can extend more on large desktops. */
@media (min-width: 961px) {
  .hero-title { padding-right: clamp(8rem, 16vw, 12rem); }
}
@media (min-width: 1600px) {
  .hero-title {
    /* Linear taper from 10rem @ 1600px → 6rem @ 1900px, then floor at 6rem. */
    padding-right: max(6rem, calc(10rem - (100vw - 1600px) * 4 / 300));
  }
}
.hero-title em { font-style: normal; color: transparent; -webkit-text-stroke: 1px #7a90a6; }
.hero-title .accent-word { color: var(--color-accent); }
.hero-subtitle {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  max-width: 520px;
  line-height: 1.75;
  margin-bottom: 3rem;
}
.hero-actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }

.hero-scroll-hint {
  position: absolute;
  bottom: 5rem; right: 2rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-text-dim);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  writing-mode: vertical-rl;
}
.scroll-line {
  width: 1px; height: 48px;
  background: linear-gradient(to bottom, var(--color-accent), transparent);
  animation: scroll-down 1.8s ease-in-out infinite;
}
@keyframes scroll-down {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ─── Buttons ────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s var(--ease-out);
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.05);
  opacity: 0;
  transition: opacity 0.2s;
}
.btn:hover::before { opacity: 1; }
.btn-primary {
  background: var(--color-accent);
  color: var(--color-bg);
  box-shadow: 0 0 0 0 rgba(109,181,255,0.3);
}
.btn-primary:hover {
  box-shadow: 0 0 30px rgba(109,181,255,0.25), 0 8px 30px rgba(109,181,255,0.1);
  transform: translateY(-2px);
}
.btn-ghost {
  border-color: var(--color-border);
  color: var(--color-text-muted);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover {
  border-color: var(--color-text-muted);
  color: var(--color-text);
  transform: translateY(-2px);
}

/* ─── Stats Bar ──────────────────────────────────────────────────── */
.stats-bar {
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: 2rem 0;
}
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { display: flex; flex-direction: column; gap: 0.25rem; }
.stat-value {
  font-size: var(--size-xl);
  font-weight: 700;
  letter-spacing: -0.03em;
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  line-height: 1;
  height: 1em;                  /* clip to one item-height — slot-machine window */
}
.stat-roll {
  display: block;
  will-change: transform;
}
.stat-roll-item {
  display: block;
  line-height: 1;
}
.stat-label { font-size: var(--size-xs); color: var(--color-text-muted); letter-spacing: 0.05em; text-transform: uppercase; }

/* ─── Section Labels ─────────────────────────────────────────────── */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--color-accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  position: relative;
}
.section-label::before { content: ''; display: block; width: 24px; height: 1px; background: var(--color-accent); }
.section-label::after {
  content: '';
  position: absolute;
  inset: -4px -8px;
  border-radius: var(--radius-full);
  background: var(--color-accent-glow);
  opacity: 0;
  transition: opacity 0.3s;
}
.section-label:hover::after { opacity: 1; }

/* ─── Section Headings (shared base) ────────────────────────────── */
.about-heading, .work-heading, .process-heading,
.exp-heading, .lang-heading, .skills-heading, .edu-heading {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 3rem;
}
.about-heading { margin-bottom: 1.5rem; } /* override: tighter */
.work-heading  { margin-bottom: 0; }      /* override: handled by work-header gap */

/* ─── Glow Cards ─────────────────────────────────────────────────── */
.glow-card {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: border-color 0.3s, transform 0.3s var(--ease-out), box-shadow 0.3s;
  overflow: hidden;
}
.glow-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(109,181,255,0.04), transparent 40%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
  z-index: 0;
}
.glow-card:hover::before { opacity: 1; }
.glow-card:hover {
  border-color: rgba(109,181,255,0.3);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 0 1px rgba(109,181,255,0.08);
  transform: translateY(-4px);
}

/* ─── About ──────────────────────────────────────────────────────── */
#about .container { display: grid; grid-template-columns: 1fr 1fr; gap: 6rem; align-items: start; }
.about-heading em { font-style: normal; color: var(--color-accent); }
.about-body p { color: var(--color-text-muted); margin-bottom: 1rem; line-height: 1.8; }
.about-right { display: flex; flex-direction: column; gap: 1rem; }

/* ─── Skill Groups & Tags ────────────────────────────────────────── */
.skill-group {
  padding: 1.25rem 1.5rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: border-color 0.25s, background 0.25s;
}
.skill-group:hover { border-color: rgba(109,181,255,0.2); background: rgba(109,181,255,0.02); }
.skill-group-title {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--color-text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.skill-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  transition: all 0.2s;
  cursor: default;
}
.tag:hover { border-color: var(--color-accent); color: var(--color-accent); }
.tag.accent {
  background: var(--color-accent-dim);
  border-color: rgba(109,181,255,0.3);
  color: var(--color-accent);
}

/* ─── Work ───────────────────────────────────────────────────────── */
.work-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 3rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.work-grid {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  gap: 1rem;
  padding-bottom: 1rem;
  scrollbar-width: none;
}
.work-grid::-webkit-scrollbar { display: none; }
.work-card {
  flex-shrink: 0;
  width: calc((100% - 3rem) / 3.2);
  scroll-snap-align: start;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.3s var(--ease-out), transform 0.3s var(--ease-out), box-shadow 0.3s;
  position: relative;
  transform-style: preserve-3d;
}
.work-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(109,181,255,0.05) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
}
.work-card:hover {
  border-color: rgba(109,181,255,0.4);
  box-shadow: 0 30px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(109,181,255,0.1);
}
.work-card:hover::after { opacity: 1; }
.work-card-visual {
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.work-card-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 60%, var(--color-surface) 100%);
}
.work-card-visual svg { opacity: 0.12; transition: opacity 0.4s, transform 0.6s var(--ease-out); }
.work-card:hover .work-card-visual svg { opacity: 0.25; transform: scale(1.05); }
.work-card-body { padding: 1.5rem; position: relative; z-index: 1; }
.work-card-meta { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; }
.work-card-type { font-size: 0.75rem; font-family: var(--font-mono); color: var(--color-accent); letter-spacing: 0.04em; }
.work-card-year { font-size: 0.75rem; font-family: var(--font-mono); color: var(--color-text-dim); }
.work-card-title { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 0.5rem; transition: color 0.2s; }
.work-card:hover .work-card-title { color: var(--color-accent); }
.work-card-desc { font-size: 0.875rem; color: var(--color-text-muted); line-height: 1.65; margin-bottom: 1rem; }
.work-card-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.work-card-arrow {
  position: absolute;
  top: 1.5rem; right: 1.5rem;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  display: flex; align-items: center; justify-content: center;
  color: var(--color-text-muted);
  opacity: 0;
  transform: translateY(6px) rotate(-45deg);
  transition: all 0.3s var(--ease-out);
}
.work-card:hover .work-card-arrow {
  opacity: 1;
  transform: translateY(0) rotate(0deg);
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* Work card visual themes */
.work-card-visual.theme-a { background: linear-gradient(135deg, #0a1500 0%, #1a2a00 100%); }
.work-card-visual.theme-b { background: linear-gradient(135deg, #001020 0%, #002030 100%); }
.work-card-visual.theme-c { background: linear-gradient(135deg, #150010 0%, #280020 100%); }
.work-card-visual.theme-d { background: linear-gradient(135deg, #080815 0%, #151525 100%); }
.work-card-visual.theme-e { background: linear-gradient(135deg, #001518 0%, #002830 100%); }
.work-card-visual.theme-f { background: linear-gradient(135deg, #150a00 0%, #251800 100%); }
.work-card-visual.theme-g { background: linear-gradient(135deg, #0a0018 0%, #150030 100%); }
.work-card-visual.theme-h { background: linear-gradient(135deg, #180500 0%, #2a0a00 100%); }
.work-card-visual.theme-i { background: linear-gradient(135deg, #000a18 0%, #001530 100%); }
.work-card-visual.theme-j { background: linear-gradient(135deg, #120800 0%, #1e1000 100%); }

/* ─── Work Carousel Controls ──────────────────────────────────── */
.carousel-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.carousel-btn {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text-muted);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, opacity 0.2s;
}
.carousel-btn:hover { border-color: var(--color-accent); color: var(--color-accent); }
.carousel-btn:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }
.carousel-btn:disabled { opacity: 0.3; pointer-events: none; }
.carousel-dots { display: flex; align-items: center; gap: 0.375rem; flex: 1; }
.carousel-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  border: none;
  background: var(--color-border);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, width 0.3s var(--ease-out), border-radius 0.3s;
}
.carousel-dot[aria-selected="true"] { background: var(--color-accent); width: 18px; border-radius: 3px; }
.carousel-dot:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  .work-grid { scroll-behavior: auto; }
  .carousel-dot { transition: background 0.2s; }
}

/* ─── Process Steps ──────────────────────────────────────────────── */
.process-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.process-step {
  padding: 1.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s, background 0.25s, transform 0.25s var(--ease-out);
  background: var(--color-surface);
}
.process-step::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-accent), rgba(109,181,255,0.3));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease-out);
}
.process-step:hover { border-color: rgba(109,181,255,0.25); background: rgba(109,181,255,0.02); transform: translateY(-3px); }
.process-step:hover::before { transform: scaleX(1); }
.step-num { font-size: 0.75rem; font-family: var(--font-mono); color: var(--color-accent); margin-bottom: 1rem; letter-spacing: 0.04em; }
.step-title { font-size: 1.125rem; font-weight: 600; margin-bottom: 0.5rem; letter-spacing: -0.01em; transition: color 0.3s var(--ease-out); }
.step-body { font-size: 0.875rem; color: var(--color-text-muted); line-height: 1.65; transition: color 0.3s var(--ease-out); }
/* Hover: inversión de tonos title ↔ body. */
.process-step:hover .step-title { color: var(--color-text-muted); }
.process-step:hover .step-body  { color: var(--color-text); }

/* ─── Experience ─────────────────────────────────────────────────── */
.experience-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  padding-left: 2rem;
}
.experience-grid::before {
  content: '';
  position: absolute;
  left: 0; top: 12px; bottom: 12px;
  width: 1px;
  background: linear-gradient(to bottom, var(--color-accent), rgba(109,181,255,0.3), transparent);
}
.exp-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  position: relative;
  transition: border-color 0.25s, transform 0.25s var(--ease-out), background 0.25s;
}
.exp-card:hover { border-color: rgba(109,181,255,0.3); transform: translateX(6px); background: rgba(109,181,255,0.01); }
.exp-card::before {
  content: '';
  position: absolute;
  left: calc(-2rem - 4px); top: 1.25rem;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--color-accent);
  border: 2px solid var(--color-bg);
  box-shadow: 0 0 12px rgba(109,181,255,0.5);
}
.exp-header { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.25rem; }
.exp-role { font-size: 1.125rem; font-weight: 600; letter-spacing: -0.01em; }
.exp-company {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--color-accent);
  background: var(--color-accent-dim);
  border: 1px solid rgba(109,181,255,0.2);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
}
.exp-date { font-size: 0.75rem; font-family: var(--font-mono); color: var(--color-text-muted); margin-bottom: 0.75rem; }
.exp-desc { font-size: 0.875rem; color: var(--color-text-muted); line-height: 1.75; }
.exp-highlight {
  margin-top: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-left: 2px solid var(--color-accent);
  font-size: 0.78rem;
  color: var(--color-accent);
  font-family: var(--font-mono);
  background: var(--color-accent-dim);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  line-height: 1.5;
}

/* ─── Languages ─────────────────────────────────────────────────── */
.lang-list { display: flex; flex-direction: column; gap: 2rem; max-width: 560px; }
.lang-item { display: flex; flex-direction: column; gap: 0.75rem; }
.lang-meta { display: flex; align-items: center; justify-content: space-between; }
.lang-name { font-size: 1.125rem; font-weight: 600; letter-spacing: -0.01em; }
.lang-level { font-size: 0.75rem; font-family: var(--font-mono); color: var(--color-text-muted); letter-spacing: 0.05em; text-transform: uppercase; }
.lang-badge {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.625rem;
  border-radius: var(--radius-full);
}
.lang-badge.native {
  background: var(--color-accent-dim);
  border: 1px solid rgba(109,181,255,0.3);
  color: var(--color-accent);
}
.lang-track {
  height: 6px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.lang-fill {
  height: 100%;
  width: 0;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--color-accent), rgba(109,181,255,0.45));
  box-shadow: 0 0 10px rgba(109,181,255,0.25);
  transition: width 1.2s var(--ease-out) 0.5s;
}
.lang-item.is-visible .lang-fill { width: var(--fill); }

/* ─── DS Feature ─────────────────────────────────────────────────── */
.ds-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 3rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.ds-card::before {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(109,181,255,0.05) 0%, transparent 70%);
  animation: orb-spin 12s linear infinite;
}
@keyframes orb-spin {
  from { transform: rotate(0deg) translateX(50px); }
  to   { transform: rotate(360deg) translateX(50px); }
}
.ds-heading {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 1.5rem;
}
.ds-body { color: var(--color-text-muted); line-height: 1.8; margin-bottom: 2rem; }
.ds-tokens { display: flex; flex-direction: column; gap: 0.75rem; }
.token-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  transition: border-color 0.2s, background 0.2s;
}
.token-row:hover { border-color: rgba(109,181,255,0.2); background: rgba(109,181,255,0.02); }
.token-swatch { width: 20px; height: 20px; border-radius: var(--radius-sm); flex-shrink: 0; }
.token-name { color: var(--color-accent); flex: 1; }
.token-value { color: var(--color-text-muted); }

/* ─── Education ─────────────────────────────────────────────────── */
.edu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.edu-dots { display: none; }
.edu-item {
  padding: 1.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s, background 0.25s;
}
.edu-item::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-accent), rgba(109,181,255,0.3));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease-out);
}
.edu-item:hover { border-color: rgba(109,181,255,0.25); background: rgba(109,181,255,0.02); }
.edu-item:hover::before { transform: scaleX(1); }
.edu-date { font-size: 0.72rem; font-family: var(--font-mono); color: var(--color-accent); margin-bottom: 0.75rem; letter-spacing: 0.04em; }
.edu-title { font-size: 1rem; font-weight: 600; margin-bottom: 0.75rem; letter-spacing: -0.01em; }
.edu-body { font-size: 0.85rem; color: var(--color-text-muted); line-height: 1.65; }
.edu-license { display: block; margin-top: 0.5rem; font-family: var(--font-mono); font-size: 0.7rem; color: var(--color-text-dim); }
.edu-badges { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1rem; }

/* ─── Contact ────────────────────────────────────────────────────── */
#contact { padding-bottom: 8rem; }
.contact-inner {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  background: var(--color-surface);
}
.contact-inner::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 700px; height: 400px;
  background: radial-gradient(ellipse, rgba(109,181,255,0.06) 0%, transparent 70%);
  animation: contact-glow 6s ease-in-out infinite alternate;
}
@keyframes contact-glow {
  from { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
  to   { opacity: 1;   transform: translate(-50%, -50%) scale(1.2); }
}
.contact-heading {
  font-size: 4rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.0;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}
.contact-sub { font-size: 1.125rem; color: var(--color-text-muted); margin: 0 auto 2.5rem; max-width: 420px; position: relative; z-index: 1; }
.contact-links { display: flex; align-items: center; justify-content: center; gap: 1rem; flex-wrap: wrap; position: relative; z-index: 1; }
.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  font-size: 0.875rem;
  color: var(--color-text-muted);
  transition: all 0.25s var(--ease-out);
  backdrop-filter: blur(8px);
}
.contact-link:hover { border-color: var(--color-accent); color: var(--color-accent); transform: translateY(-3px); box-shadow: 0 10px 30px rgba(109,181,255,0.1); }
.contact-link.primary { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-bg); font-weight: 600; }
.contact-link.primary:hover { opacity: 0.9; color: var(--color-bg); box-shadow: 0 10px 40px rgba(109,181,255,0.25); }

/* ─── Skills Full Grid ───────────────────────────────────────────── */
.skills-full { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.skills-dots { display: none; }

/* ─── Footer ─────────────────────────────────────────────────────── */
footer { border-top: 1px solid var(--color-border); padding: 2.5rem 0 2rem; position: relative; z-index: 2; }
.footer-contact { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.625rem 2rem; margin-bottom: 2rem; }
.footer-contact-item { display: flex; align-items: center; gap: 0.625rem; font-size: 0.8rem; color: var(--color-text-muted); }
.footer-contact-item svg { flex-shrink: 0; color: var(--color-accent); }
.footer-contact-item strong { color: var(--color-text); font-weight: 600; margin-right: 0.25rem; }
.footer-contact-item a { color: var(--color-text-muted); text-decoration: none; transition: color 0.2s; }
.footer-contact-item a:hover { color: var(--color-accent); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--color-border); padding-top: 1.25rem; }
.footer-copy, .footer-made { font-size: 0.75rem; color: var(--color-text-dim); }
.footer-made { font-family: var(--font-mono); }
.footer-signature { width: 12%; opacity: 0.88; filter: drop-shadow(0 0 8px rgba(109,181,255,0.18)); flex-shrink: 0; }

/* ─── Marquee ────────────────────────────────────────────────────── */
.h-scroll-wrapper { overflow: hidden; position: relative; }
.marquee-track { display: flex; gap: 2rem; animation: marquee 30s linear infinite; width: max-content; }
.marquee-track:hover { animation-play-state: paused; }
.marquee-item { flex-shrink: 0; font-family: var(--font-mono); font-size: 0.75rem; color: var(--color-text-dim); letter-spacing: 0.1em; white-space: nowrap; }
.marquee-item span { color: var(--color-accent); margin: 0 0.5rem; }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ─── Gradient Line Divider ──────────────────────────────────────── */
.gradient-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
  background-size: 200% 100%;
  animation: gradient-slide 3s ease infinite;
  margin: 0; border: none;
  position: relative; z-index: 2;
}
@keyframes gradient-slide {
  0%   { background-position: -100% 0; }
  100% { background-position: 200% 0; }
}

/* ─── Section overrides ──────────────────────────────────────────── */
#value-proposition .process-steps,
#certifications .process-steps { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }


/* ─── Logo Cloud / Clientes ─────────────────────────────────────── */
#clients {
  padding: 5rem 0 4rem;
  position: relative;
  overflow: hidden;
}
.clients-glow {
  position: absolute;
  top: -10%; left: 50%;
  transform: translateX(-50%);
  width: 70vw; height: 60vh;
  background: radial-gradient(ellipse at top, rgba(255,255,255,0.055) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
  filter: blur(24px);
}
.clients-header {
  text-align: center;
  margin-bottom: 2.5rem;
  position: relative;
  z-index: 1;
}
.clients-eyebrow {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  letter-spacing: 0.01em;
  margin-bottom: 0.6rem;
}
.clients-heading {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.25;
}
.clients-muted {
  color: var(--color-text-muted);
  font-weight: 400;
}
.clients-rule {
  height: 1px;
  background: var(--color-border);
  mask-image: linear-gradient(to right, transparent, black 18%, black 82%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 18%, black 82%, transparent);
  position: relative; z-index: 1;
}
.clients-slider-wrap {
  overflow: hidden;
  padding: 1.75rem 0;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  position: relative; z-index: 1;
}
.clients-track {
  display: flex;
  align-items: center;
  gap: 4rem;
  width: max-content;
  animation: clients-scroll 120s linear infinite;
}
.clients-track:hover { animation-play-state: paused; }
.logo-item {
  color: var(--color-text-muted);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  opacity: 0.45;
  transition: opacity 0.3s, color 0.3s;
  user-select: none;
  pointer-events: none;
  line-height: 1;
}
.clients-track:hover .logo-item { pointer-events: auto; }
.clients-track:hover .logo-item:hover { opacity: 1; color: var(--color-text); }

/* Personalización de cada wordmark */
.logo-novicell  { font-size: 1rem; letter-spacing: 0.04em; text-transform: uppercase; }
.logo-deacero   { font-size: 1.15rem; font-weight: 800; letter-spacing: -0.03em; }
.logo-cloudworks { font-size: 0.95rem; letter-spacing: 0.01em; }
.logo-smc       { font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700; }
.logo-baxi      { font-size: 1.2rem; font-weight: 800; letter-spacing: 0.02em; text-transform: uppercase; }
.logo-numintec  { font-size: 0.95rem; letter-spacing: -0.02em; font-weight: 500; }
.logo-casino    { font-size: 0.85rem; letter-spacing: 0.03em; font-weight: 500; }
.logo-eurogrup  { font-size: 1rem; letter-spacing: -0.01em; }
.logo-delta     { font-size: 0.9rem; letter-spacing: -0.01em; font-weight: 500; }
.logo-ohmybrand { font-size: 0.9rem; letter-spacing: 0.01em; font-style: italic; }

@keyframes clients-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ─── Cards sobre la cuadrícula cursor ──────────────────────────── */
.work-card,
.process-step,
.glow-card,
.exp-card {
  position: relative;
}
.work-card:hover,
.process-step:hover,
.glow-card:hover,
.exp-card:hover {
  z-index: 5;
  background: var(--color-bg);
}

/* ─── Value Proposition — icono hover ───────────────────────────── */
.vp-icon {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
  opacity: 0;
  transform: translateY(-10px) scale(0.6);
  transition: opacity 0.3s var(--ease-out) 0.06s, transform 0.42s var(--ease-spring) 0.06s;
  pointer-events: none;
}
.process-step:hover .vp-icon,
.principle-step:hover .vp-icon {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ─── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 900px) {
  #about .container { grid-template-columns: 1fr; gap: 3rem; }
  .work-card { width: 85vw; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .process-steps { grid-template-columns: repeat(2, 1fr); }
  .ds-card { grid-template-columns: 1fr; gap: 2rem; }
  .nav-links { display: none; }
  .skills-full {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    gap: 1rem;
    padding-bottom: 1rem;
    scrollbar-width: none;
  }
  .skills-full::-webkit-scrollbar { display: none; }
  .skills-full .skill-group {
    flex-shrink: 0;
    width: 85vw;
    scroll-snap-align: start;
    opacity: 1 !important;
    transform: none !important;
  }
  .skills-dots {
    display: flex;
    justify-content: center;
    gap: 0.375rem;
    margin-top: 1rem;
  }
  .edu-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    gap: 1rem;
    padding-bottom: 1rem;
    scrollbar-width: none;
  }
  .edu-grid::-webkit-scrollbar { display: none; }
  .edu-grid .edu-item {
    flex-shrink: 0;
    width: 85vw;
    scroll-snap-align: start;
    opacity: 1 !important;
    transform: none !important;
  }
  .edu-dots {
    display: flex;
    justify-content: center;
    gap: 0.375rem;
    margin-top: 1rem;
  }
}
@media (max-width: 560px) {
  .container { padding: 0 1rem; }
  .hero-title { font-size: 2.8rem; }
  section { padding: 5rem 0; }
  .contact-heading { font-size: 2.5rem; }
  .process-steps { grid-template-columns: 1fr; }
  .contact-inner { padding: 3rem 1.5rem; }
  #cursor-dot, #cursor-ring { display: none; }
}

/* ═══════════════════════════════════════════════════════════════════
   HERO PORTRAIT OVERLAY — Carlos face + AI helmet w/ goo-blob cursor
   Adopts the index hero background; positions the portrait at the
   bottom-right of the hero, beside the CTA button.
   ═══════════════════════════════════════════════════════════════════ */
.hero-portrait {
  position: absolute;
  right: -2vw;
  bottom: -11vw;
  width: clamp(500px, 50vw, 1050px);
  height: auto;
  aspect-ratio: 10 / 11;
  pointer-events: none;
  z-index: 1;                         /* above grid bg, below container z=2 */
}
.hero-portrait-layers {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero-portrait img, .hero-portrait svg.hero-portrait-helmet {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  opacity: 1;
  will-change: transform;
}
.hero-portrait-face {
  z-index: 1;
  --face-cx: 50%;
  --face-cy: 50%;
  mask: radial-gradient(
    ellipse 28% 24% at var(--face-cx) var(--face-cy),
    rgba(0,0,0,0.86) 0%,
    rgba(0,0,0,0.96) 55%,
    rgba(0,0,0,1)    85%
  );
  -webkit-mask: radial-gradient(
    ellipse 28% 24% at var(--face-cx) var(--face-cy),
    rgba(0,0,0,0.86) 0%,
    rgba(0,0,0,0.96) 55%,
    rgba(0,0,0,1)    85%
  );
  mask-mode: alpha;
  -webkit-mask-mode: alpha;
}
.hero-portrait-helmet {
  z-index: 2;
  opacity: 0.81;
}

/* On narrow screens we keep the portrait in flow (relative) — it appears
   below the hero text and uses a randomised cursor simulation so the
   blob/parallax effects stay alive without a real pointer. */
@media (max-width: 960px) {
  #hero {
    padding-top: 90px;
    padding-bottom: 3rem;
    justify-content: flex-start;        /* let items flow top → bottom on mobile */
  }
  /* En mobile el embed Unicorn termina donde acaba .hero-portrait */
  .hero-bg-unicorn {
    bottom: var(--unicorn-bottom, 0px);
    opacity: 0.7;
  }
  /* Franja negra más alta en mobile */
  .hero-band { --band-h: 160px; }
  /* Eyebrow text más claro en mobile */
  .hero-eyebrow-text { color: #fafafa; }
  /* On mobile JS moves .hero-portrait INSIDE .container, placed between
     .hero-eyebrow and .hero-title — flows in normal block layout. */
  .hero-portrait {
    position: relative;
    right: 4rem;
    bottom: -1rem;
    height: auto;
    width: 130%;
    /* max-width: 360px; */
    aspect-ratio: 10 / 11;
    margin: 1.25rem auto 1.5rem;
    align-self: center;
    display: block;
  }
  .hero-title { padding-right: 0; }     /* no need to reserve space on mobile */

  /* Lang-switch: misma altura que nav-cta y borde accent */
  .lang-switch {
    padding: 0.4rem 0.75rem;
    border-color: var(--color-accent);
  }

  /* Ocultar hero-name en mobile */
  .hero-name { display: none; }
}

/* ═══ lang-switch ══════════════════════════════════════════════════════════ */
.lang-switch {
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  cursor: pointer;
  transition: border-color 0.2s;
}
.lang-switch:hover { border-color: var(--color-text-muted); }
.lang-opt {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--color-text-dim);
  letter-spacing: 0.06em;
  transition: color 0.2s;
}
.lang-opt.active { color: var(--color-accent); font-weight: 600; }
.lang-sep { font-size: 0.75rem; color: var(--color-text-dim); }


/* ═══ Page loader ════════════════════════════════════════════════════════════ */
#site-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--color-bg, #000);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}
#site-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.site-loader-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent, #6db5ff);
  animation: loaderPulse 1.2s ease-in-out infinite;
}
.site-loader-dot:nth-child(2) { animation-delay: 0.2s; }
.site-loader-dot:nth-child(3) { animation-delay: 0.4s; }
#site-loader-dots {
  display: flex;
  gap: 8px;
}
@keyframes loaderPulse {
  0%, 80%, 100% { opacity: 0.15; transform: scale(0.8); }
  40%            { opacity: 1;    transform: scale(1);   }
}
