/* ==========================================================
   CALFER — Portafolio · Estética "Starfield-tech"
   Paleta: hueso / tinta / franja roja-naranja-ámbar
   ========================================================== */

:root {
  /* ===== Paleta Starfield (póster): blanco hueso + azul marino + rojo/naranja/oro ===== */
  --bone: #f4f5f7;           /* fondo base claro (off-white frío) */
  --bone-2: #e7e9ee;
  --paper: #ffffff;          /* blanco puro para tarjetas/superficies */
  --ink: #182338;            /* azul marino muy oscuro = texto/acento oscuro */
  --ink-2: #20293f;
  --ink-3: #2c3753;
  --red: #cc2436;
  --orange: #e76f38;
  --amber: #d8a23a;          /* oro un poco más oscuro para contraste sobre claro */
  --navy: #2f5180;           /* azul marino del reference */
  --blue: #3a6298;
  --line-light: rgba(var(--canvas-neutral), 0.16);   /* líneas finas azuladas (line-art) */
  --line-dark: rgba(var(--text-rgb), 0.12);    /* líneas finas oscuras sobre claro */
  --font-display: "DM Mono", "Space Grotesk", monospace;
  --font-mono: "DM Mono", "Space Grotesk", monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* ===== Tokens de tema (claro por defecto) ===== */
  --bg: var(--bone);            /* fondo de página */
  --bg-grad-top: var(--paper);  /* tope de gradientes de sección */
  --text: var(--ink);           /* texto principal */
  --text-rgb: 24, 35, 56;       /* para rgba(var(--text-rgb), a) */
  --surface-rgb: 255, 255, 255; /* tarjetas, paneles, nav (vidrio) */
  --surface2-rgb: 231, 233, 238;
  --scrim-rgb: 244, 245, 247;   /* velos y sombras de texto */
  --canvas-neutral: 47, 81, 128;/* trazos neutros de los canvas (navy) */
  --canvas-disc: 24, 35, 56;    /* disco bajo los logos del sistema solar */
  --marquee2-bg: var(--bone-2);
}

/* ===== MODO OSCURO ===== */
:root[data-theme="dark"] {
  --bg: #0f1116;
  --bg-grad-top: #161922;
  --text: #f1eef1;
  --text-rgb: 240, 238, 241;
  --surface-rgb: 33, 36, 45;
  --surface2-rgb: 23, 26, 33;
  --scrim-rgb: 15, 17, 22;
  --canvas-neutral: 233, 233, 240;
  --canvas-disc: 224, 226, 233;
  --amber: #e6b450;             /* oro un poco más brillante sobre oscuro */
  --navy: #6f97cd;              /* azul más claro para line-art legible en oscuro */
  --blue: #7ba2d6;
  --marquee2-bg: #161922;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-display);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  transition: background 0.4s var(--ease-out), color 0.4s var(--ease-out);
}

::selection { background: var(--orange); color: var(--ink); }

.mono { font-family: var(--font-mono); }

@media (pointer: fine) {
  body { cursor: none; }
  a, button { cursor: none; }
}

/* ============ CURSOR ============ */
.cursor, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  border-radius: 50%;
  display: none;
}
@media (pointer: fine) {
  .cursor, .cursor-ring { display: block; }
}
.cursor {
  width: 8px; height: 8px;
  background: var(--orange);
  transform: translate(-50%, -50%);
}
.cursor-ring {
  width: 36px; height: 36px;
  border: 1px solid var(--orange);
  transform: translate(-50%, -50%);
  transition: width 0.25s var(--ease-out), height 0.25s var(--ease-out),
              border-color 0.25s, opacity 0.25s;
  opacity: 0.6;
}
.cursor-ring.is-hover {
  width: 64px; height: 64px;
  border-color: var(--amber);
  opacity: 1;
}

/* ============ WARP (transición inmersiva entre secciones) ============ */
.warp {
  position: fixed;
  inset: 0;
  z-index: 9500;
  background: var(--ink);
  pointer-events: none;
  /* portal: se abre desde el punto de clic con un círculo (no lineal) */
  clip-path: circle(0% at var(--wx, 50%) var(--wy, 50%));
  visibility: hidden;
}
.warp.is-active { visibility: visible; }
.warp.is-opening {
  clip-path: circle(150% at var(--wx, 50%) var(--wy, 50%));
  transition: clip-path 0.5s cubic-bezier(0.7, 0, 0.84, 0);
}
.warp.is-closing {
  /* se cierra contrayéndose hacia el centro del destino: dirección distinta */
  clip-path: circle(0% at 50% 42%);
  transition: clip-path 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.warp__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.warp__hud {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.warp__jump {
  font-size: 0.72rem;
  letter-spacing: 0.5em;
  color: var(--amber);
  opacity: 0.85;
}
.warp__target {
  font-family: var(--font-display);
  font-size: clamp(2rem, 7vw, 5rem);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--bone);
  text-shadow: 0 0 50px rgba(238, 118, 35, 0.5);
}

@media (prefers-reduced-motion: reduce) {
  .warp { display: none; }
}

/* ============ ANIMACIONES BASE ============ */
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
.blink { animation: blink 1s steps(1) infinite; }

.reveal {
  opacity: 0;
  transform: translateY(42px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============ PRELOADER ============ */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.7s var(--ease-out), visibility 0.7s;
}
.preloader.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.preloader__inner {
  width: min(420px, 86vw);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.preloader__logo {
  display: flex;
  align-items: baseline;
  gap: 14px;
}
.preloader__brand {
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: 0.35em;
}
.preloader__stripe, .hero__stripe, .contact__stripe {
  display: flex;
  gap: 5px;
  align-items: center;
}
.preloader__stripe i, .hero__stripe i, .contact__stripe i {
  display: block;
  height: 10px;
  width: 32px;
}
.preloader__stripe i:nth-child(1), .hero__stripe i:nth-child(1), .contact__stripe i:nth-child(1) { background: var(--red); }
.preloader__stripe i:nth-child(2), .hero__stripe i:nth-child(2), .contact__stripe i:nth-child(2) { background: var(--orange); }
.preloader__stripe i:nth-child(3), .hero__stripe i:nth-child(3), .contact__stripe i:nth-child(3) { background: var(--amber); }

.preloader__terminal {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.8;
  color: rgba(var(--text-rgb), 0.55);
  min-height: 5.2em;
}
.preloader__terminal .ok { color: var(--amber); }
.preloader__bar {
  height: 3px;
  background: var(--ink-3);
  overflow: hidden;
}
.preloader__bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--red), var(--orange), var(--amber));
  transition: width 0.2s linear;
}
.preloader__pct {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--orange);
  text-align: right;
}

/* ============ NAV (isla flotante con cristal) ============ */
.nav {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1120px, calc(100% - 28px));
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px 10px 22px;
  border-radius: 999px;
  background: rgba(var(--surface-rgb), 0.6);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border: 1px solid rgba(var(--text-rgb), 0.12);
  box-shadow:
    inset 0 1px 0 rgba(var(--surface-rgb), 0.7),
    0 18px 44px -22px rgba(var(--text-rgb), 0.35);
  transition: background 0.4s, transform 0.4s var(--ease-out), box-shadow 0.4s, width 0.4s var(--ease-out);
}
.nav.is-scrolled {
  background: rgba(var(--surface-rgb), 0.82);
  box-shadow:
    inset 0 1px 0 rgba(var(--surface-rgb), 0.8),
    0 22px 50px -22px rgba(var(--text-rgb), 0.4);
}
.nav__logo {
  font-weight: 500;
  font-size: 1.15rem;
  letter-spacing: 0.3em;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
}
.nav__logo-dot {
  width: 8px; height: 8px;
  background: var(--orange);
  margin-left: 6px;
  display: inline-block;
  animation: blink 2s steps(1) infinite;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 24px);
  margin-left: auto; /* agrupa los controles a la derecha */
}
.nav__links a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.78rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  position: relative;
  padding: 4px 0;
}
.nav__links a:not(.nav__cta)::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease-out);
}
.nav__links a:not(.nav__cta):hover::after {
  transform: scaleX(1);
  transform-origin: left;
}
.nav__num {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--orange);
  margin-right: 6px;
}
.nav__cta {
  border: 1px solid var(--orange);
  padding: 9px 18px !important;
  border-radius: 999px;
  white-space: nowrap;
  transition: background 0.3s, color 0.3s;
}
.nav__cta:hover { background: var(--orange); color: var(--ink); }

/* toggle de idioma ES / EN */
.nav__lang {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: 1px solid var(--line-dark);
  padding: 7px 13px;
  border-radius: 999px;
  margin-left: clamp(12px, 2vw, 22px);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: rgba(var(--text-rgb), 0.55);
  transition: border-color 0.3s;
}
.nav__lang:hover { border-color: var(--orange); }
.nav__lang-opt { transition: color 0.3s; }
.nav__lang-opt.is-active { color: var(--amber); font-weight: 500; }
.nav__lang-sep { opacity: 0.4; }

/* toggle de tema claro / oscuro */
.nav__theme {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--line-dark);
  padding: 8px 10px;
  border-radius: 999px;
  margin-left: clamp(10px, 1.6vw, 16px);
  color: rgba(var(--text-rgb), 0.6);
  transition: border-color 0.3s, color 0.3s;
}
.nav__theme:hover { border-color: var(--orange); color: var(--orange); }
.nav__theme svg { width: 16px; height: 16px; display: block; }
.nav__theme .icon-sun { display: none; }
:root[data-theme="dark"] .nav__theme .icon-moon { display: none; }
:root[data-theme="dark"] .nav__theme .icon-sun { display: block; }

.nav__burger {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  padding: 8px;
}
.nav__burger span {
  display: block;
  width: 26px; height: 2px;
  background: var(--text);
  transition: transform 0.3s var(--ease-out), opacity 0.3s;
}
.nav__burger.is-open span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.nav__burger.is-open span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s, visibility 0.4s;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; }
.mobile-menu a {
  color: var(--bone);
  text-decoration: none;
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 920px) {
  .nav__links { display: none; }
  .nav__burger { display: flex; }
  .nav__lang { margin-left: auto; }
  .nav { top: 12px; padding: 8px 12px 8px 18px; }
  .nav__logo { font-size: 1rem; letter-spacing: 0.2em; }
}

/* ============ HERO ============ */
/* El wrapper alto + hero sticky convierte el scroll en una línea de tiempo:
   título → descenso por el corredor de datos, todo en un mismo plano. */
.hero-wrap {
  height: 560vh;
  position: relative;
}
.hero {
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 50% 110%, rgba(231, 111, 56, 0.14), transparent 62%),
    var(--bg);
}
.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero__hud {
  position: absolute;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  color: rgba(var(--text-rgb), 0.45);
  z-index: 3;
}
.hero__hud--tl { top: 92px; left: clamp(20px, 5vw, 64px); }
.hero__hud--tr { top: 92px; right: clamp(20px, 5vw, 64px); }
.hero__hud--bl { bottom: 28px; left: clamp(20px, 5vw, 64px); }
.hero__hud--br { bottom: 28px; right: clamp(20px, 5vw, 64px); }

.hero__content {
  position: relative;
  z-index: 4;
  text-align: center;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
}
.hero__tag {
  font-size: 0.75rem;
  letter-spacing: 0.35em;
  color: var(--amber);
}
.hero__title {
  font-size: clamp(4rem, 16vw, 12.5rem);
  font-weight: 500;
  line-height: 0.92;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.hero__title-line {
  display: block;
  background: linear-gradient(180deg, var(--text) 48%, var(--navy));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero__stripe i { height: 12px; width: clamp(48px, 9vw, 110px); }
.hero__sub {
  max-width: 560px;
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 300;
  color: rgba(var(--text-rgb), 0.78);
  line-height: 1.65;
}
.hero__actions {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
}

.hero__scroll {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 0.65rem;
  letter-spacing: 0.4em;
  color: rgba(var(--text-rgb), 0.5);
  z-index: 4;
}
.hero__scroll-line {
  width: 1px;
  height: 48px;
  background: var(--line-dark);
  position: relative;
  overflow: hidden;
}
.hero__scroll-line::after {
  content: "";
  position: absolute;
  top: -50%;
  left: 0;
  width: 100%;
  height: 50%;
  background: var(--orange);
  animation: scrollDrop 1.8s var(--ease-out) infinite;
}
@keyframes scrollDrop {
  0% { top: -50%; }
  100% { top: 110%; }
}

/* ============ INMERSIÓN (mensajes y HUD del descenso) ============ */
.dive__msg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
  width: min(680px, 88vw);
}
.dive__label {
  display: inline-block;
  font-size: 0.68rem;
  letter-spacing: 0.35em;
  color: var(--amber);
  border: 1px solid rgba(242, 179, 45, 0.45);
  padding: 6px 14px;
  margin-bottom: 22px;
  background: rgba(var(--surface-rgb), 0.55);
}
.dive__msg h2 {
  font-size: clamp(2.6rem, 8vw, 6rem);
  font-weight: 500;
  line-height: 1.0;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-shadow: 0 0 60px rgba(238, 118, 35, 0.35);
}
.dive__msg p {
  margin-top: 18px;
  font-weight: 300;
  font-size: clamp(0.95rem, 2vw, 1.2rem);
  color: rgba(var(--text-rgb), 0.75);
  letter-spacing: 0.04em;
}
.dive__hud {
  position: absolute;
  bottom: 26px;
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  color: rgba(var(--text-rgb), 0.5);
  z-index: 3;
  opacity: 0; /* aparece al sumergirse (lo controla JS) */
}
.dive__hud--bl { left: clamp(20px, 5vw, 64px); }
.dive__hud--br { right: clamp(20px, 5vw, 64px); }
.dive__hud #diveDepth { color: var(--orange); }
.dive__ok { color: var(--amber); }
.dive__vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 75% 75% at 50% 50%, transparent 55%, rgba(var(--scrim-rgb), 0.85));
}

@media (prefers-reduced-motion: reduce) {
  .hero-wrap { height: auto; }
  .hero { position: relative; height: auto; min-height: 100svh; }
  .dive__msg, .dive__hud, .dive__vignette { display: none; }
}

/* ============ BOTONES ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 30px;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: color 0.35s var(--ease-out);
}
.btn--solid {
  background: var(--orange);
  color: var(--ink);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}
.btn--solid::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--bone);
  transform: translateX(-101%);
  transition: transform 0.4s var(--ease-out);
}
.btn--solid:hover::before { transform: translateX(0); }
.btn--solid > * , .btn--solid { z-index: 1; }
.btn--solid span, .btn--solid { position: relative; }
.btn--ghost {
  border: 1px solid rgba(var(--text-rgb), 0.4);
  color: var(--text);
}
.btn--ghost:hover { border-color: var(--amber); color: var(--amber); }
.btn--big { padding: 22px 44px; font-size: 1rem; }
.btn__arrow { transition: transform 0.3s var(--ease-out); }
.btn:hover .btn__arrow { transform: translateX(6px); }

/* ============ MARQUEE ============ */
.marquee {
  background: var(--orange);
  color: var(--ink);
  overflow: hidden;
  padding: 14px 0;
  transform: rotate(-1.2deg) scale(1.04);
  margin: -10px 0;               /* solapa la línea de división de ambas secciones */
  position: relative;
  z-index: 6;
  border-top: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
}
.marquee--alt {
  transform: rotate(1.2deg) scale(1.04); /* inclinación opuesta para variar */
  background: var(--amber);
}
.marquee__track {
  display: flex;
  white-space: nowrap;
  animation: marquee 28s linear infinite;
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0.22em;
}
.marquee--alt .marquee__track { animation-direction: reverse; }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ============ SECCIONES ============ */
.section {
  position: relative;
  padding: clamp(90px, 12vw, 160px) clamp(20px, 6vw, 90px);
}
.section--light {
  background:
    linear-gradient(180deg, var(--bg-grad-top), var(--bg));
  color: var(--text);
}
/* índice de sección en azul marino (line-art) sobre fondo claro */
.section--light .section__index { color: var(--navy); }
.section--dark {
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
}
.section__head {
  margin-bottom: clamp(56px, 8vw, 100px);
  position: relative;
  z-index: 2;
}
.section__index {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.35em;
  color: var(--orange);
  border: 1px solid currentColor;
  padding: 6px 14px;
  margin-bottom: 26px;
}
.section__title {
  font-size: clamp(2.6rem, 7vw, 5.5rem);
  font-weight: 500;
  line-height: 1.02;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
.section__title em {
  font-style: normal;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--text);
}
.section__title--light em { -webkit-text-stroke: 1.5px var(--text); }
.section__lead {
  max-width: 540px;
  margin-top: 26px;
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.7;
  color: rgba(var(--text-rgb), 0.7);
}

/* ============ PROYECTOS ============ */
.projects {
  display: flex;
  flex-direction: column;
  gap: clamp(60px, 8vw, 110px);
}
.project {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(28px, 5vw, 70px);
  align-items: center;
  border: 1px solid rgba(var(--text-rgb), 0.12);
  border-radius: 4px;
  background:
    linear-gradient(150deg, #ffffff 0%, var(--bone) 52%, var(--bone-2) 100%);
  padding: clamp(22px, 3.5vw, 46px);
  position: relative;
  transform-style: preserve-3d;
  box-shadow:
    inset 0 1px 0 rgba(var(--surface-rgb), 0.9),
    0 2px 6px -2px rgba(var(--text-rgb), 0.16),
    0 26px 50px -30px rgba(var(--text-rgb), 0.5);
  transition: border-color 0.4s, box-shadow 0.45s var(--ease-out);
  will-change: transform;
}
.project:hover {
  border-color: rgba(238, 118, 35, 0.5);
  box-shadow:
    inset 0 1px 0 rgba(var(--surface-rgb), 0.9),
    0 4px 10px -2px rgba(var(--text-rgb), 0.18),
    0 40px 90px -36px rgba(216, 57, 51, 0.4);
}
.project::before {
  content: "";
  position: absolute;
  top: -1px; left: -1px;
  width: 26px; height: 26px;
  border-top: 3px solid var(--orange);
  border-left: 3px solid var(--orange);
  transition: width 0.35s var(--ease-out), height 0.35s var(--ease-out);
}
.project::after {
  content: "";
  position: absolute;
  bottom: -1px; right: -1px;
  width: 26px; height: 26px;
  border-bottom: 3px solid var(--orange);
  border-right: 3px solid var(--orange);
  transition: width 0.35s var(--ease-out), height 0.35s var(--ease-out);
}
.project:hover::before, .project:hover::after { width: 56px; height: 56px; }
.project--flip .project__visual { order: 2; }
.project--flip .project__info { order: 1; }

.project__visual {
  position: relative;
  aspect-ratio: 4 / 3;
  background:
    radial-gradient(ellipse 90% 70% at 50% 30%, #20222b, var(--ink) 70%);
  overflow: hidden;
  border-radius: 3px;
  transform: translateZ(40px); /* el "monitor" sobresale de la tarjeta (3D) */
  border: 1px solid rgba(242, 179, 45, 0.14);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.4),
    inset 0 24px 50px -24px rgba(0, 0, 0, 0.9),
    0 18px 36px -22px rgba(0, 0, 0, 0.7);
}
.project__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
/* esquinas tipo visor sobre la pantalla */
.project__visual::before {
  content: "";
  position: absolute;
  inset: 10px;
  pointer-events: none;
  z-index: 2;
  background:
    linear-gradient(var(--amber), var(--amber)) left top / 16px 1px no-repeat,
    linear-gradient(var(--amber), var(--amber)) left top / 1px 16px no-repeat,
    linear-gradient(var(--amber), var(--amber)) right bottom / 16px 1px no-repeat,
    linear-gradient(var(--amber), var(--amber)) right bottom / 1px 16px no-repeat;
  opacity: 0.5;
}
/* scanlines + viñeta para sensación de pantalla encendida */
.project__visual::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    repeating-linear-gradient(0deg, rgba(0,0,0,0.16) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse 75% 75% at 50% 50%, transparent 55%, rgba(0,0,0,0.55));
  mix-blend-mode: multiply;
}
.project__badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 3;
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  color: var(--amber);
  border: 1px solid rgba(242, 179, 45, 0.5);
  padding: 5px 10px;
  background: rgba(var(--text-rgb), 0.6);
  backdrop-filter: blur(4px);
}
.project__num {
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  color: var(--red);
}
.project__name {
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  font-weight: 500;
  line-height: 1.1;
  text-transform: uppercase;
  margin: 14px 0 18px;
}
.project__desc {
  font-weight: 300;
  line-height: 1.75;
  color: rgba(var(--text-rgb), 0.72);
  font-size: 0.98rem;
}
.project__tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0;
}
.project__tags li {
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid var(--line-light);
  padding: 5px 11px;
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.project__tags li:hover {
  background: var(--ink);
  color: var(--amber);
  border-color: var(--ink);
}
.project__metrics {
  display: flex;
  gap: clamp(18px, 3vw, 42px);
  border-top: 1px solid var(--line-light);
  padding-top: 20px;
}
.project__metrics div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.project__metrics strong {
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  font-weight: 500;
  color: var(--red);
}
.project__metrics span {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(var(--text-rgb), 0.55);
}

/* ============ TEATRO INMERSIVO DE PROYECTOS ============ */
.theater {
  background:
    radial-gradient(ellipse 90% 55% at 50% 0%, rgba(231, 111, 56, 0.10), transparent 62%),
    var(--bg);
  color: var(--text);
  position: relative;
  overflow: visible; /* imprescindible: permite el position:sticky de las escenas */
}
.theater__head {
  padding: clamp(90px, 12vw, 150px) clamp(20px, 6vw, 90px) 0;
  position: relative;
  z-index: 2;
}
.section__lead--light { color: rgba(var(--text-rgb), 0.65); }

/* cada escena: alta para "fijar" el escenario mientras se scrollea
   (más alto = la secuencia avanza más lento con la rueda del mouse) */
.scene { height: 320vh; position: relative; }
.scene__stage {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

/* gráfico a pantalla completa: el visual sale de la tarjeta y es el ambiente */
.scene__viz {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  will-change: transform, opacity;
  transform-origin: 50% 50%;
  /* difumina la animación en los bordes superior/inferior: sin cortes duros entre escenas */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 14%, #000 86%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 14%, #000 86%, transparent 100%);
}
.scene__canvas { width: 100%; height: 100%; display: block; }
.scene__scan {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(var(--text-rgb), 0.05) 0 1px, transparent 1px 3px);
  mix-blend-mode: normal;
}

/* palabra clave gigante: te sumerges en ella y la atraviesas */
.scene__word {
  position: absolute;
  inset: 0;
  z-index: 2;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(4rem, 20vw, 18rem);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: transparent;
  -webkit-text-stroke: 2px rgba(var(--canvas-neutral), 0.85);
  text-stroke: 2px rgba(var(--canvas-neutral), 0.85);
  white-space: nowrap;
  opacity: 0;
  transform-origin: 50% 50%;
  will-change: transform, opacity, filter;
  pointer-events: none;
}

/* información flotante (sin caja): cada capa aparece en su lugar */
.scene__content {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: clamp(20px, 6vw, 96px);
  transform: translateY(-50%);
  width: min(520px, 86vw);
}
.scene--right .scene__content {
  left: auto;
  right: clamp(20px, 6vw, 96px);
  text-align: right;
}
/* halo difuso de legibilidad detrás del texto (no es una tarjeta) */
.scene__content::before {
  content: "";
  position: absolute;
  inset: -40px -60px;
  background: radial-gradient(ellipse at center, rgba(var(--scrim-rgb), 0.82), rgba(var(--scrim-rgb), 0) 72%);
  filter: blur(12px);
  z-index: -1;
  pointer-events: none;
}
.scene__tag {
  display: inline-block;
  font-size: 0.64rem;
  letter-spacing: 0.28em;
  color: var(--amber);
  border: 1px solid rgba(242, 179, 45, 0.5);
  padding: 5px 11px;
  margin-bottom: 18px;
  opacity: 0;
  will-change: transform, opacity;
}
.scene__name {
  font-size: clamp(1.9rem, 3.8vw, 3.1rem);
  font-weight: 500;
  line-height: 1.05;
  text-transform: uppercase;
  color: var(--text);
  margin: 0 0 16px;
  text-shadow: 0 2px 22px rgba(var(--scrim-rgb), 0.95);
  opacity: 0;
  will-change: transform, opacity;
}
.scene__desc {
  font-weight: 300;
  font-size: 0.98rem;
  line-height: 1.7;
  color: rgba(var(--text-rgb), 0.85);
  max-width: 440px;
  text-shadow: 0 1px 14px rgba(var(--scrim-rgb), 0.95);
  opacity: 0;
  will-change: transform, opacity;
}
.scene--right .scene__desc { margin-left: auto; }
.scene__chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
  opacity: 0;
  will-change: transform, opacity;
}
.scene--right .scene__chips { justify-content: flex-end; }
.scene__chips li {
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid rgba(var(--text-rgb), 0.2);
  padding: 5px 11px;
  color: rgba(var(--text-rgb), 0.78);
  background: rgba(var(--surface-rgb), 0.6);
  backdrop-filter: blur(4px);
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.scene__chips li:hover { background: var(--orange); color: var(--ink); border-color: var(--orange); }

/* métricas: franja a lo ancho de la base de la escena (en otro lugar) */
.scene__metrics {
  position: absolute;
  left: 0; right: 0;
  bottom: clamp(34px, 7vh, 78px);
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: clamp(26px, 7vw, 100px);
  padding: 0 clamp(20px, 6vw, 96px);
  opacity: 0;
  will-change: transform, opacity;
}
.scene__metrics > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: center;
}
.scene__metrics strong {
  font-size: clamp(1.5rem, 2.8vw, 2.3rem);
  font-weight: 500;
  color: var(--red);
  text-shadow: 0 2px 16px rgba(var(--scrim-rgb), 0.95);
}
.scene__metrics span {
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(var(--text-rgb), 0.62);
}

/* ---- móvil / sin movimiento: escenas estáticas y legibles ---- */
@media (max-width: 880px) {
  .scene { height: auto; }
  .scene__stage { position: static; height: auto; min-height: 78vh; padding: 56px 20px; display: block; }
  .scene__viz { opacity: 0.28 !important; transform: none !important; }
  .scene__word {
    position: static;
    opacity: 0.5 !important;
    transform: none !important;
    font-size: clamp(2.4rem, 13vw, 5rem);
    margin: 0 0 18px;
    -webkit-text-stroke-width: 1.5px;
  }
  .scene__content {
    position: static;
    transform: none !important;
    width: 100%;
    text-align: left;
  }
  .scene--right .scene__content { text-align: left; }
  .scene__tag, .scene__name, .scene__desc, .scene__chips { opacity: 1 !important; transform: none !important; }
  .scene--right .scene__desc, .scene--right .scene__chips { margin-left: 0; justify-content: flex-start; }
  .scene__metrics {
    position: static;
    opacity: 1 !important;
    transform: none !important;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 24px;
    padding: 28px 0 0;
  }
  .scene__metrics > div { text-align: left; }
  /* hero menos interminable en móvil */
  .hero-wrap { height: 300vh; }
  /* franjas divisorias más compactas */
  .marquee { padding: 11px 0; margin: -8px 0; }
  .marquee__track { font-size: 0.8rem; letter-spacing: 0.16em; }
}
@media (prefers-reduced-motion: reduce) {
  .scene { height: auto; }
  .scene__stage { position: static; height: auto; padding: 50px 20px; display: block; }
  .scene__viz { opacity: 0.4 !important; transform: none !important; }
  .scene__word { position: static; opacity: 0.45 !important; transform: none !important; margin: 0 0 18px; }
  .scene__content { position: static; transform: none !important; }
  .scene__tag, .scene__name, .scene__desc, .scene__chips, .scene__metrics { opacity: 1 !important; transform: none !important; position: static; }
}

/* ============ CAPACIDADES ============ */
.caps__canvas, .contact__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.5;
  pointer-events: none;
}
.caps {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}
.cap {
  border: 1px solid var(--line-light);
  border-radius: 4px;
  padding: 34px 28px;
  background: rgba(var(--surface-rgb), 0.96);
  box-shadow:
    0 1px 0 rgba(var(--surface-rgb), 0.9) inset,
    0 18px 40px -28px rgba(var(--canvas-neutral), 0.4);
  transition: border-color 0.4s, transform 0.4s var(--ease-out), box-shadow 0.4s;
  will-change: transform;
}
.cap:hover {
  border-color: var(--orange);
  box-shadow: 0 26px 56px -28px rgba(216, 57, 51, 0.4);
}
.cap__icon {
  font-size: 0.8rem;
  color: var(--navy);
  letter-spacing: 0.2em;
  margin-bottom: 18px;
}
.cap h3 {
  font-size: 1.15rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
  color: var(--text);
}
.cap p {
  font-weight: 300;
  font-size: 0.88rem;
  line-height: 1.7;
  color: rgba(var(--text-rgb), 0.66);
  margin-bottom: 24px;
}
.cap__bar {
  height: 3px;
  background: rgba(var(--canvas-neutral), 0.14);
  overflow: hidden;
}
.cap__bar span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--red), var(--orange), var(--amber));
  transition: width 1.4s var(--ease-out) 0.3s;
}
.cap.is-visible .cap__bar span { width: var(--w); }

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

/* ===== SISTEMA SOLAR CALFER (canvas 3D · scroll-dive) ===== */
.solar {
  height: 260vh;
  position: relative;
  background:
    radial-gradient(ellipse 70% 60% at 50% 44%, rgba(231, 111, 56, 0.10), transparent 64%),
    var(--bg);
}
.solar__stage {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
}
.solar__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  touch-action: pan-y;
}
.solar__canvas:active { cursor: grabbing; }
.solar__hud {
  position: absolute;
  top: clamp(86px, 13vh, 130px);
  left: 0; right: 0;
  text-align: center;
  z-index: 3;
  pointer-events: none;
  padding: 0 20px;
}
.solar__index { color: var(--amber); }
.solar__hint {
  display: block;
  margin-top: 14px;
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  color: rgba(var(--text-rgb), 0.5);
}
/* ficha del planeta (definición + proyectos) */
.solar__panel {
  position: absolute;
  top: 50%;
  right: clamp(20px, 6vw, 80px);
  transform: translateY(-50%) scale(0.94);
  z-index: 5;
  width: min(360px, 86vw);
  padding: 26px 26px 28px;
  background: linear-gradient(155deg, rgba(var(--surface-rgb), 0.92), rgba(var(--surface2-rgb), 0.88));
  backdrop-filter: blur(12px);
  border: 1px solid rgba(var(--text-rgb), 0.14);
  border-left: 3px solid var(--orange);
  border-radius: 6px;
  box-shadow: 0 40px 80px -36px rgba(var(--text-rgb), 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}
.solar__panel:not([hidden]) { opacity: 1; transform: translateY(-50%) scale(1); pointer-events: auto; }
.solar__panel-x {
  position: absolute; top: 10px; right: 12px;
  background: none; border: 0; cursor: pointer;
  font-size: 1rem; color: rgba(var(--text-rgb), 0.5); line-height: 1;
}
.solar__panel-x:hover { color: var(--orange); }
.solar__panel-tag {
  display: inline-block;
  font-size: 0.6rem; letter-spacing: 0.26em;
  color: var(--amber);
  border: 1px solid rgba(242, 179, 45, 0.5);
  padding: 4px 10px;
  margin-bottom: 14px;
}
.solar__panel-name {
  font-size: 1.35rem; font-weight: 500; text-transform: uppercase;
  letter-spacing: 0.02em; color: var(--text); margin-bottom: 12px;
}
.solar__panel-desc {
  font-size: 0.9rem; line-height: 1.65; font-weight: 300;
  color: rgba(var(--text-rgb), 0.78); margin-bottom: 18px;
}
.solar__panel-proj { border-top: 1px dashed rgba(var(--text-rgb), 0.16); padding-top: 14px; }
.solar__panel-proj-k { display: block; font-size: 0.58rem; letter-spacing: 0.2em; color: var(--orange); margin-bottom: 6px; }
.solar__panel-proj-v { font-size: 0.84rem; color: rgba(var(--text-rgb), 0.72); line-height: 1.5; }

@media (max-width: 760px) {
  .solar { height: auto; }
  .solar__stage { position: static; height: 92vh; }
  .solar__panel { right: 50%; bottom: clamp(20px, 5vh, 50px); top: auto; transform: translate(50%, 0) scale(0.94); }
  .solar__panel:not([hidden]) { transform: translate(50%, 0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .solar { display: none; }
}

/* ============ PERFIL ============ */
.profile__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.45;
  pointer-events: none;
}

/* --- perfil editorial (sobre el campo de flujo interactivo) --- */
.profile2 {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: clamp(34px, 5vw, 58px);
}
.profile2__specs {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.spec {
  flex: 1 1 200px;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 13px 16px;
  background: rgba(var(--surface-rgb), 0.72);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(var(--canvas-neutral), 0.18);
  border-left: 3px solid var(--orange);
  border-radius: 3px;
  box-shadow: 0 10px 26px -18px rgba(var(--canvas-neutral), 0.5);
  transition: transform 0.3s var(--ease-out), border-color 0.3s;
}
.spec:hover { transform: translateY(-4px); border-left-color: var(--amber); }
.spec__k { font-size: 0.6rem; letter-spacing: 0.2em; color: var(--navy); }
.spec__v { font-size: 0.92rem; font-weight: 500; color: var(--text); }
.spec--live .spec__v i { color: var(--orange); font-size: 0.7em; margin-right: 5px; }

.profile2__bio {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 56px);
  max-width: 1000px;
}
.profile2__bio p {
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  font-weight: 300;
  line-height: 1.75;
  color: rgba(var(--text-rgb), 0.82);
}
.profile2__bio strong { font-weight: 400; color: var(--text); }
.profile2__stats {
  display: flex;
  gap: clamp(28px, 5vw, 70px);
  flex-wrap: wrap;
}
@media (max-width: 720px) {
  .profile2__bio { grid-template-columns: 1fr; gap: 14px; }
  /* perfil más liviano en móvil: fondo muy tenue, menos aire, chips compactos */
  .profile__canvas { opacity: 0.12; }
  .profile2 { gap: 26px; }
  .profile2__specs { gap: 10px; }
  .spec { flex: 1 1 100%; padding: 11px 14px; }
  .spec__v { font-size: 0.86rem; }
  .profile2__bio p { font-size: 0.95rem; }
  .profile2__stats { gap: 24px 36px; }
}

/* ===== CREDENCIALES / CERTIFICACIONES ===== */
.certs { margin-top: clamp(40px, 6vw, 72px); }
.certs__label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  color: var(--orange);
  margin-bottom: 22px;
}
.certs__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(14px, 2vw, 20px);
}
.cert {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid var(--line-light);
  border-left: 3px solid var(--a, var(--orange));
  border-radius: 6px;
  background: rgba(var(--surface-rgb), 0.55);
  box-shadow: 0 18px 40px -30px rgba(var(--canvas-neutral), 0.5);
  transition: border-color 0.4s, transform 0.4s var(--ease-out), box-shadow 0.4s;
}
/* esquina HUD (coherente con tarjetas y panel solar) */
.cert::after {
  content: "";
  position: absolute;
  top: -1px; right: -1px;
  width: 16px; height: 16px;
  border-top: 2px solid var(--a, var(--orange));
  border-right: 2px solid var(--a, var(--orange));
  opacity: 0.55;
  transition: width 0.35s var(--ease-out), height 0.35s var(--ease-out), opacity 0.35s;
}
.cert:hover {
  border-color: var(--a, var(--orange));
  transform: translateY(-3px);
  box-shadow: 0 28px 56px -28px rgba(var(--canvas-neutral), 0.7);
}
.cert:hover::after { width: 26px; height: 26px; opacity: 1; }
.cert__badge {
  flex: 0 0 auto;
  width: 48px; height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--a, var(--orange));
  border: 1.5px solid var(--a, var(--orange));
  border-radius: 10px;
  background: rgba(var(--surface-rgb), 0.5);
}
.cert__info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cert__issuer {
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(var(--text-rgb), 0.5);
}
.cert__name {
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--text);
}
.cert__date {
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  color: var(--a, var(--orange));
  margin-top: 2px;
}
/* aparición escalonada */
.cert.reveal:nth-child(2) { transition-delay: 0.08s; }
.cert.reveal:nth-child(3) { transition-delay: 0.16s; }
.cert.reveal:nth-child(4) { transition-delay: 0.24s; }
@media (max-width: 720px) {
  .certs__grid { grid-template-columns: 1fr; }
}

.profile {
  display: grid;
  grid-template-columns: minmax(280px, 400px) 1fr;
  gap: clamp(36px, 6vw, 90px);
  align-items: start;
  position: relative;
  z-index: 2;
}
.profile__card {
  border: 1px solid rgba(var(--text-rgb), 0.12);
  border-radius: 4px;
  background: linear-gradient(155deg, rgba(var(--surface-rgb), 0.92), rgba(var(--surface2-rgb), 0.86));
  backdrop-filter: blur(8px);
  color: var(--text);
  padding: 28px 26px;
  position: relative;
  box-shadow:
    inset 0 1px 0 rgba(var(--surface-rgb), 0.06),
    0 30px 60px -34px rgba(var(--canvas-neutral), 0.55);
  will-change: transform;
}
/* marco HUD de esquinas (consistente con el resto de la página) */
.profile__card::before,
.profile__card::after {
  content: "";
  position: absolute;
  width: 26px; height: 26px;
  pointer-events: none;
}
.profile__card::before {
  top: -1px; left: -1px;
  border-top: 3px solid var(--orange);
  border-left: 3px solid var(--orange);
}
.profile__card::after {
  bottom: -1px; right: -1px;
  border-bottom: 3px solid var(--orange);
  border-right: 3px solid var(--orange);
}
.profile__id {
  display: flex;
  justify-content: space-between;
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  color: rgba(var(--text-rgb), 0.6);
  margin-bottom: 22px;
}
.profile__status { color: var(--amber); }
.profile__avatar {
  position: relative;
  width: 150px;
  margin: 0 auto 26px;
  overflow: hidden;
}
.profile__avatar svg { display: block; width: 100%; }
.profile__avatar-ring {
  fill: none;
  stroke: var(--orange);
  stroke-width: 1.5;
  stroke-dasharray: 8 6;
  transform-origin: center;
  animation: spin 20s linear infinite;
}
.profile__avatar-fill { fill: var(--text); stroke: var(--bg); stroke-width: 1.5; }
.profile__scanline {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--amber), transparent);
  animation: scan 3s ease-in-out infinite;
  opacity: 0.8;
}
@keyframes scan {
  0%, 100% { top: 8%; }
  50% { top: 88%; }
}
.profile__data {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
}
.profile__data div {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dashed var(--line-dark);
  padding-bottom: 8px;
  transition: border-color 0.3s;
}
.profile__data div:hover { border-bottom-color: var(--orange); }
.profile__data span:first-child { color: rgba(var(--text-rgb), 0.5); }
.profile__data span:last-child { color: var(--amber); text-align: right; }

.profile__text p {
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  font-weight: 300;
  line-height: 1.75;
  color: rgba(var(--text-rgb), 0.78);
  margin-bottom: 24px;
}
.profile__text strong { font-weight: 400; color: var(--text); }
.profile__stats {
  display: flex;
  gap: clamp(24px, 4vw, 56px);
  margin-top: 38px;
  flex-wrap: wrap;
}
.stat strong {
  display: block;
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  font-weight: 500;
  color: var(--red);
  line-height: 1;
}
.stat > span:last-child {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(var(--text-rgb), 0.55);
}

@media (max-width: 880px) {
  .profile { grid-template-columns: 1fr; }
  .profile__card { max-width: 420px; }
}

/* ============ CONTACTO ============ */
.contact { text-align: center; }
.contact__inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  padding: clamp(40px, 6vw, 70px) 0;
}
/* marco HUD de transmisión */
.contact__inner::before,
.contact__inner::after {
  content: "";
  position: absolute;
  width: clamp(34px, 5vw, 64px);
  height: clamp(34px, 5vw, 64px);
  pointer-events: none;
  opacity: 0.7;
}
.contact__inner::before {
  top: 0; left: clamp(0px, 3vw, 40px);
  border-top: 2px solid var(--orange);
  border-left: 2px solid var(--orange);
}
.contact__inner::after {
  bottom: 0; right: clamp(0px, 3vw, 40px);
  border-bottom: 2px solid var(--orange);
  border-right: 2px solid var(--orange);
}
.contact__title {
  font-size: clamp(2.4rem, 7vw, 5.5rem);
  font-weight: 500;
  line-height: 1.05;
  text-transform: uppercase;
}
.contact__title em {
  font-style: normal;
  color: var(--orange);
}
.contact__lead {
  max-width: 480px;
  font-weight: 300;
  font-size: 1.05rem;
  line-height: 1.7;
  color: rgba(var(--text-rgb), 0.7);
}
.contact__channels {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 8px;
}
.contact__channel {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: rgba(var(--text-rgb), 0.78);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  border: 1px solid var(--line-dark);
  padding: 11px 16px;
  transition: border-color 0.3s, color 0.3s, background 0.3s;
}
.contact__channel:hover {
  border-color: var(--orange);
  color: var(--amber);
  background: rgba(238, 118, 35, 0.06);
}
.contact__channel-key {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: var(--orange);
  border-right: 1px solid var(--line-dark);
  padding-right: 10px;
}
.contact__channel-arrow {
  color: var(--orange);
  transition: transform 0.3s var(--ease-out);
}
.contact__channel:hover .contact__channel-arrow { transform: translateX(4px); }

.contact__stripe { margin-top: 16px; }
.contact__stripe i { width: clamp(40px, 8vw, 90px); }

/* ============ FOOTER ============ */
.footer {
  background: var(--marquee2-bg);
  border-top: 1px solid var(--line-dark);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(20px, 5vw, 64px);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: rgba(var(--text-rgb), 0.45);
}
.footer__sys { color: var(--amber); }

/* ============ ACCESIBILIDAD ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
