::selection {
  background: rgba(96, 200, 255, 0.35);
  color: #fff;
}

/* ===== CSS CUSTOM PROPERTIES FOR ANIMATIONS ===== */
@property --border-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

/* ===== FIRE INTRO OVERLAY ===== */
#fire-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: all;
  transition: opacity 3.4s ease-in;
}
#fire-overlay.fade-out {
  opacity: 0;
  pointer-events: none;
  transition: opacity 3.4s ease-in !important;
}
#fire-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* =============================================
   VARIABLES — Aquí controlas todos los colores,
   fuentes y espacios del sitio desde un solo lugar.
   Cambia un valor y se actualiza en toda la página.
   ============================================= */
:root {
  /* Tipografía, espacios y radios — siempre iguales en ambos temas */
  --font-sans: 'Sora', system-ui, sans-serif;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.5rem;
  --font-size-2xl: 2rem;
  --font-size-3xl: 3rem;
  --font-size-4xl: 4rem;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 3rem;
  --space-xl: 9rem;
  --radius: 12px;
  --radius-lg: 20px;
  --transition: 0.3s ease;
  --max-width: 1100px;

  /* Colores — Modo claro (default) */
  --color-bg: #c4d4e8;
  --color-surface: #b6c8e0;
  --color-text: #0a1525;
  --color-text-muted: #2e4463;
  --color-accent: #c9522e;
  --color-accent-light: rgba(201,82,46,0.08);
  --color-border: #7a9ec4;
  --navbar-bg: rgba(196,212,232,0.95);
  --btn-primary-bg: #c9522e;
  --btn-primary-color: #ffffff;
  --btn-primary-border: #c9522e;
  --btn-ghost-color: #1c1412;
  --btn-ghost-border: rgba(28,20,18,0.3);
  --btn-cv-bg: rgba(52,211,153,0.07);
  --btn-cv-color: #0d9f6e;
  --btn-cv-border: rgba(52,211,153,0.35);
}

/* Colores — Modo oscuro */
[data-theme="dark"] {
  --color-bg: #1c2030;
  --color-surface: #232840;
  --color-text: #ede9e1;
  --color-text-muted: rgba(237,233,225,0.8);
  --color-accent: #e2694a;
  --color-accent-light: rgba(226,105,74,0.12);
  --color-border: rgba(255,255,255,0.08);
  --navbar-bg: rgba(6,8,14,0.92);
  --btn-primary-bg: #e2694a;
  --btn-primary-color: #ffffff;
  --btn-primary-border: #e2694a;
  --btn-ghost-color: rgba(237,233,225,0.85);
  --btn-ghost-border: rgba(255,255,255,0.2);
  --btn-cv-bg: rgba(52,211,153,0.1);
  --btn-cv-color: #34d399;
  --btn-cv-border: rgba(52,211,153,0.35);
}

/* ===== FLUID CURSOR CANVAS ===== */
#fluid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9998;
  pointer-events: none;
  mix-blend-mode: screen;
}

[data-theme="light"] #fluid {
  mix-blend-mode: multiply;
}

/* ===== RESET y BASE ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%; /* Prevents iOS font scaling on orientation change */
  font-size: 16px;
  overflow-x: hidden; /* Previene scroll horizontal en toda la página */
}

body {
  overflow-x: hidden;
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1;
}

h1, h2, h3, h4 {
  text-wrap: balance;
  font-feature-settings: 'kern' 1, 'liga' 1;
}

img {
  display: block;
  max-width: 100%;
  height: 100%;
  object-fit: cover; /* Las imágenes llenan su contenedor sin distorsionarse */
}

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

ul { list-style: none; }

/* ===== UTILIDADES ===== */
.container {
  /* Limita el ancho máximo y centra el contenido */
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section {
  padding: var(--space-xl) 0;
}

/* Etiqueta pequeña que aparece sobre los títulos de sección */
.section-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-xs);
}

.section-header {
  margin-bottom: var(--space-lg);
}

.section-header h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
  text-shadow:
    0 0 6px rgba(255,255,255,0.6),
    0 0 18px rgba(255,255,255,0.3),
    0 0 40px rgba(255,255,255,0.12);
}

/* ===== BOTONES ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 100px; /* Botones tipo píldora */
  font-size: var(--font-size-base);
  font-weight: 500;
  cursor: pointer;
  transition: color 0.28s ease, transform 0.28s ease, box-shadow var(--transition), border-color var(--transition), background-color var(--transition);
  transform-origin: center center;
  will-change: transform, color, box-shadow;
  border: 2px solid transparent;
  background-clip: padding-box;
  overflow: hidden;
  position: relative;
  z-index: 0;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  transform: translateX(-101%);
  transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: -1;
}

/* Ensure icons inside buttons align nicely */
.btn svg {
  width: 1em;
  height: 1em;
  vertical-align: middle;
  margin-right: 0.5rem;
  flex-shrink: 0;
}

.btn:hover {
  transform: translateY(-1px) scale(1.04);
}

/* Botón principal */
.btn-primary {
  background-color: var(--btn-primary-bg);
  color: var(--btn-primary-color);
  border-color: var(--btn-primary-border);
  box-shadow: 0 4px 16px rgba(226,105,74,0.25);
  animation: btn-pulse 2.8s ease-in-out infinite;
  overflow: hidden;
}

/* 4 — Glow pulsante en reposo */
@keyframes btn-pulse {
  0%, 100% { box-shadow: 0 4px 16px rgba(226,105,74,0.25); }
  50%       { box-shadow: 0 4px 28px rgba(226,105,74,0.55), 0 0 40px rgba(226,105,74,0.2); }
}

.btn-primary:hover {
  opacity: 0.88;
  box-shadow: 0 8px 28px rgba(226,105,74,0.45);
  animation: none;
}

/* 2 — Shimmer de luz que cruza el botón */
.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(255,255,255,0.18) 50%,
    transparent 100%
  );
  transform: skewX(-20deg);
  animation: btn-shimmer 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes btn-shimmer {
  0%        { left: -75%; opacity: 0; }
  10%       { opacity: 1; }
  40%, 100% { left: 130%; opacity: 0; }
}

/* Botón fantasma */
.btn-ghost {
  background-color: transparent;
  color: var(--btn-ghost-color);
  border-color: var(--btn-ghost-border);
  box-shadow: none;
}

.btn-ghost::before {
  background-color: rgba(128,128,128,0.10);
}

.btn-ghost:hover {
  border-color: var(--color-text);
  box-shadow: none;
}

.btn-ghost:hover::before {
  transform: translateX(0);
}

/* Botón Contact me — outline morado */
.btn-contact {
  background-color: rgba(124,111,255,0.1);
  color: #a89fff;
  border-color: rgba(124,111,255,0.4);
  box-shadow: 0 4px 16px rgba(124,111,255,0.2);
  overflow: hidden;
  animation: btn-pulse-purple 2.8s ease-in-out infinite;
}

@keyframes btn-pulse-purple {
  0%, 100% { box-shadow: 0 4px 16px rgba(124,111,255,0.2); }
  50%       { box-shadow: 0 4px 28px rgba(124,111,255,0.5), 0 0 40px rgba(124,111,255,0.15); }
}

.btn-contact::before {
  background-color: rgba(124,111,255,0.1);
}

.btn-contact:hover {
  color: #fff;
  background-color: rgba(124,111,255,0.2);
  border-color: rgba(124,111,255,0.7);
  box-shadow: 0 8px 28px rgba(124,111,255,0.4);
  animation: none;
}

.btn-contact:hover::before {
  transform: translateX(0);
}

[data-theme="light"] .btn-contact {
  background-color: rgba(124,111,255,0.08);
  color: #5b4eff;
  border-color: rgba(124,111,255,0.35);
}

[data-theme="light"] .btn-contact:hover {
  background-color: rgba(124,111,255,0.16);
  color: #4338ca;
  border-color: rgba(124,111,255,0.6);
  box-shadow: 0 4px 18px rgba(124,111,255,0.2);
}

/* Shimmer morado */
.btn-contact::after {
  content: '';
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(180,160,255,0.2) 50%,
    transparent 100%
  );
  transform: skewX(-20deg);
  animation: btn-shimmer-purple 4s ease-in-out infinite 0.9s;
  pointer-events: none;
}

@keyframes btn-shimmer-purple {
  0%        { left: -75%; opacity: 0; }
  10%       { opacity: 1; }
  40%, 100% { left: 130%; opacity: 0; }
}

/* Botón CV */
.btn-cv {
  background-color: var(--btn-cv-bg);
  color: var(--btn-cv-color);
  border-color: var(--btn-cv-border);
  box-shadow: 0 4px 16px rgba(52,211,153,0.2);
  animation: btn-pulse-emerald 2.8s ease-in-out infinite;
}

@keyframes btn-pulse-emerald {
  0%, 100% { box-shadow: 0 4px 16px rgba(52,211,153,0.2); }
  50%       { box-shadow: 0 4px 28px rgba(52,211,153,0.5), 0 0 40px rgba(52,211,153,0.15); }
}

.btn-cv::before {
  background-color: rgba(52,211,153,0.1);
}

.btn-cv:hover {
  box-shadow: 0 8px 28px rgba(52,211,153,0.35);
  animation: none;
}

.btn-cv:hover::before {
  transform: translateX(0);
}

/* Shimmer esmeralda */
.btn-cv::after {
  content: '';
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(52,211,153,0.22) 50%,
    transparent 100%
  );
  transform: skewX(-20deg);
  animation: btn-shimmer-emerald 4s ease-in-out infinite 1.8s;
  pointer-events: none;
}

@keyframes btn-shimmer-emerald {
  0%        { left: -75%; opacity: 0; }
  10%       { opacity: 1; }
  40%, 100% { left: 130%; opacity: 0; }
}

.btn-large {
  padding: 1rem 2.5rem;
  font-size: var(--font-size-lg);
}

.btn-download {
  padding: 0.75rem 1.1rem;
  border-radius: 999px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 18px 40px rgba(30, 30, 30, 0.08);
  transition: transform var(--transition), background-color var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.btn-download:hover {
  background: var(--color-accent-light);
  border-color: var(--color-accent);
  box-shadow: 0 22px 48px rgba(30, 30, 30, 0.1);
}

.download-card {
  margin-top: var(--space-lg);
  padding: 1rem 1.25rem;
  border-radius: calc(var(--radius) / 1.2);
  background-color: transparent;
  border: 1px solid var(--color-border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem;
}

.download-text {
  flex: 1 1 200px;
  font-size: 0.98rem;
  color: var(--color-text-muted);
}

.download-icon {
  font-size: 0.95rem;
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;         /* Siempre visible aunque hagas scroll */
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem var(--space-lg);
  background: var(--navbar-bg);
  backdrop-filter: blur(12px);       /* Efecto de vidrio esmerilado */
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  transition: padding var(--transition);
}

/* Logo / inicial en la navbar */
.nav-logo {
  font-size: var(--font-size-xl);
  font-weight: 600;
  color: var(--color-accent);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  line-height: 1;
}

/* ── Nav logo animations ── */
@keyframes logo-hue-rotate {
  0%   { -webkit-filter: drop-shadow(0 0 7px rgba(96,200,255,0.6));  filter: drop-shadow(0 0 7px rgba(96,200,255,0.6)); }
  33%  { -webkit-filter: drop-shadow(0 0 7px rgba(45,212,191,0.6));  filter: drop-shadow(0 0 7px rgba(45,212,191,0.6)); }
  66%  { -webkit-filter: drop-shadow(0 0 7px rgba(124,111,255,0.6)); filter: drop-shadow(0 0 7px rgba(124,111,255,0.6)); }
  100% { -webkit-filter: drop-shadow(0 0 7px rgba(96,200,255,0.6));  filter: drop-shadow(0 0 7px rgba(96,200,255,0.6)); }
}

@keyframes logo-ring-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes logo-screen-flash {
  0%, 100% { opacity: 1; }
  40%       { opacity: 0.25; }
  70%       { opacity: 0.9; }
}



.logo-ring-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}


.logo-minimal {
  animation: logo-hue-rotate 4s ease-in-out infinite;
  transition: transform 0.3s cubic-bezier(0.16,1,0.3,1);
}

/* Wavy signal line — seamless continuous flow */
@keyframes logo-wave-sweep {
  from { stroke-dashoffset: 30; }
  to   { stroke-dashoffset: -30; }
}
.logo-pulse-line {
  stroke-dasharray: 15 15;
  opacity: 0.85;
  animation: logo-wave-sweep 3s linear infinite;
}



/* UA initials */
.logo-initials {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--color-accent);
  opacity: 0.85;
  margin-left: 0.4rem;
  line-height: 1;
}

/* Hover: screen flash + scale */
.nav-logo:hover .logo-minimal {
  transform: scale(1.1);
}
.nav-logo:hover .logo-minimal rect {
  animation: logo-screen-flash 0.5s ease-in-out 1;
}

/* Scroll flash — triggered via JS adding .logo-flash */
.logo-minimal.logo-flash rect {
  animation: logo-screen-flash 0.5s ease-in-out 1;
}

.nav-links {
  display: flex;
  gap: 4px;
  align-items: center;
  position: relative;
  background: rgba(128,128,128,0.07);
  border: 0.5px solid rgba(128,128,128,0.12);
  border-radius: 999px;
  padding: 5px 6px;
}

.nav-pill {
  position: absolute;
  top: 5px;
  left: 6px;
  height: calc(100% - 10px);
  border-radius: 999px;
  background: var(--color-accent-light);
  border: 0.5px solid rgba(226,105,74,0.25);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease, width 0.35s cubic-bezier(0.16,1,0.3,1), transform 0.35s cubic-bezier(0.16,1,0.3,1);
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: color 0.25s ease, text-shadow 0.25s ease;
  position: relative;
  padding: 5px 14px;
  border-radius: 999px;
  white-space: nowrap;
}

.nav-links a:hover {
  color: #fff;
  text-shadow:
    0 0 6px rgba(90,175,255,1),
    0 0 18px rgba(90,175,255,0.85),
    0 0 40px rgba(90,175,255,0.5),
    0 0 70px rgba(90,175,255,0.2);
}

[data-theme="light"] .nav-links a:hover {
  color: #1a3a8f;
  text-shadow:
    0 0 6px rgba(60,120,220,0.8),
    0 0 18px rgba(60,120,220,0.5),
    0 0 40px rgba(60,120,220,0.25);
}

/* Botón toggle de tema oscuro/claro */
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: background-color var(--transition), border-color var(--transition), color var(--transition);
  flex-shrink: 0;
}

.theme-toggle:hover {
  border-color: var(--color-accent);
  transform: scale(1.08);
}

/* Icono según el tema activo */
.theme-toggle::after {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  line-height: 1;
}
.theme-toggle { position: relative; }
[data-theme="dark"] .theme-toggle::after  { content: '☀️'; }
[data-theme="light"] .theme-toggle::after { content: '🌙'; }

/* Botón hamburguesa — visible solo en móvil */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition), background-color var(--transition);
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(3.5rem + 80px) var(--space-lg) calc(4rem + 24px);
  position: relative;
  overflow: hidden; /* Evita scroll horizontal por el blob decorativo */
}

.hero-content {
  max-width: 720px;
  position: relative;
  z-index: 1;
  width: 100%;
}

/* Texto pequeño encima del nombre */
.hero-eyebrow {
  font-size: var(--font-size-xl);
  color: var(--color-text-muted);
  font-weight: 300;
  margin-bottom: var(--space-xs);
}

/* Nombre grande */
.hero-name {
  font-size: clamp(3.75rem, 10vw, 6.5rem); /* Más grande y adaptable */
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-sm);
}

.hero-tagline {
  font-size: clamp(1rem, 2.2vw, 2.2rem);
  color: var(--color-text-muted);
  font-weight: 300;
  margin: 0 0 var(--space-lg);
  letter-spacing: 0.02em;
  line-height: 1.7;
  white-space: nowrap;
  padding-bottom: 0.2em;
  overflow: visible;
}

/* Name and tagline stylized "fire" effects */
.name-fire,
.tagline-fire {
  display: inline-block;
  position: relative;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  background-size: 200% 100%;
  line-height: 1.4;
  padding-bottom: 0.2em;
  white-space: nowrap;
}

.name-fire {
  background-image: linear-gradient(100deg, #60c8ff 0%, #7c6fff 35%, #e2694a 70%, #ff9f4a 100%);
  background-size: 200% 100%;
  text-shadow: 0 2px 8px rgba(120,100,255,0.2), 0 6px 24px rgba(226,105,74,0.15);
  filter: drop-shadow(0 4px 14px rgba(100,120,255,0.15));
  animation: flame 3s linear infinite, flicker 5s infinite, gradient-shift 6s ease infinite;
}
@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.name-fire::before {
  display: none;
}
.name-fire::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 100%;
  width: 10px;
  height: 10px;
  background: radial-gradient(circle, rgba(0,200,255,0.57) 0%, rgba(0,120,200,0.30) 40%, transparent 70%);
  transform: translateX(-50%);
  border-radius: 50%;
  filter: blur(3.6px);
  opacity: 0;
  animation: ember 3s linear infinite;
}


.tagline-fire {
  background-image: linear-gradient(90deg, #e2e8f0 0%, #94a3b8 60%, #cbd5e1 100%);
  text-shadow: 0 2px 8px rgba(226,232,240,0.15), 0 6px 24px rgba(148,163,184,0.1);
  filter: drop-shadow(0 4px 14px rgba(148,163,184,0.1));
  animation: flame 3s linear infinite, flicker 5s infinite;
}

[data-theme="light"] .tagline-fire {
  background-image: linear-gradient(90deg, #1e40af 0%, #2563eb 50%, #1d4ed8 100%);
  text-shadow: none;
  filter: drop-shadow(0 2px 8px rgba(37,99,235,0.2));
}
.tagline-fire::before {
  display: none;
}

@keyframes flame {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes flicker {
  0%,100% { transform: translateY(0); opacity:1; }
  40% { transform: translateY(-0.6px); opacity:0.985; }
  60% { transform: translateY(0.4px); opacity:0.995; }
}
@keyframes ember {
  0% { opacity: 0; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-6px); }
  100% { opacity: 0; transform: translateY(-14px); }
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
}

.hero-cta .btn-cv {
  flex: 0 0 auto;
  width: fit-content;
  align-self: center;
}

/* Blob decorativo de fondo */
.hero-blob {
  position: absolute;
  top: -20%;
  right: -15%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--color-accent-light) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.6;
}

/* ===== SOBRE MÍ ===== */
.about {
  background-color: var(--color-surface);
}

/* Layout de dos columnas: imagen + texto */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr; /* La columna de texto es un poco más ancha */
  gap: var(--space-xl);
  align-items: center;
}

/* Contenedor de la foto */
.image-wrapper {
  border-radius: var(--radius-lg);
  padding: 3px;
  background: conic-gradient(from var(--border-angle), #e2694a 0%, #5aaeff 35%, #a855f7 65%, #e2694a 100%);
  animation: border-rotate 4s linear infinite;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15), 0 0 40px rgba(226,105,74,0.12);
  width: 100%;
  height: auto;
}

@keyframes border-rotate {
  to { --border-angle: 360deg; }
}

.image-wrapper img {
  border-radius: calc(var(--radius-lg) - 3px);
  display: block;
  width: 100%;
  height: auto;
}

/* Estado placeholder cuando no hay imagen */
.image-wrapper.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}

.image-wrapper.placeholder::after {
  content: 'Tu foto aquí';
}

.about-text h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: var(--space-sm);
  line-height: 1.1;
  letter-spacing: -0.025em;
  text-shadow:
    0 0 6px rgba(255,255,255,0.6),
    0 0 18px rgba(255,255,255,0.3),
    0 0 40px rgba(255,255,255,0.12);
}

.about-text p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-sm);
  line-height: 1.75;
  font-size: 1.0125rem;
}

/* Lista de habilidades en formato de badges */
.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: var(--space-md);
}

.skills-list li {
  background: var(--color-accent-light);
  color: var(--color-accent);
  border: 1px solid rgba(226,105,74,0.25);
  padding: 0.4rem 1rem;
  border-radius: 100px;
  font-size: var(--font-size-sm);
  font-weight: 500;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.skills-list li:hover {
  background: rgba(226,105,74,0.18);
  border-color: rgba(226,105,74,0.6);
  box-shadow: 0 0 10px rgba(226,105,74,0.2);
  transform: translateY(-2px);
}

/* ===== PROYECTOS — CINEMATIC ===== */

.projects-cinematic {
  position: relative;
}

.scene-label-header {
  text-align: center;
  padding: var(--space-xl) 0 var(--space-lg);
}
.scene-label-header .section-label {
  display: block;
  margin-bottom: 0.5rem;
}

.project-scene {
  position: relative;
  height: 100vh;
  min-height: 560px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.scene-bg {
  position: absolute;
  inset: -8%;
  background-size: cover;
  background-position: center;
  will-change: transform;
}

.scene-overlay {
  position: absolute;
  inset: 0;
}
.scene-overlay--purple {
  background: linear-gradient(to top, rgba(30,10,60,0.92) 0%, rgba(30,10,60,0.5) 40%, rgba(0,0,0,0.15) 100%);
}
.scene-overlay--blue {
  background: linear-gradient(to top, rgba(5,20,50,0.92) 0%, rgba(5,20,50,0.5) 40%, rgba(0,0,0,0.15) 100%);
}
.scene-overlay--teal {
  background: linear-gradient(to top, rgba(4,30,30,0.92) 0%, rgba(4,30,30,0.5) 40%, rgba(0,0,0,0.15) 100%);
}

.scene-content {
  position: relative;
  z-index: 2;
  padding: 3rem clamp(1.5rem, 6vw, 6rem);
  max-width: 780px;
  transform: translateY(28px);
  opacity: 0;
  transition: transform 0.85s cubic-bezier(0.16,1,0.3,1), opacity 0.85s ease;
}
.project-scene.scene-in .scene-content {
  transform: translateY(0);
  opacity: 1;
}

.scene-num {
  display: block;
  font-size: clamp(4rem, 10vw, 8rem);
  font-weight: 700;
  line-height: 0.9;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,0.12);
  letter-spacing: -4px;
  margin-bottom: 0.5rem;
  pointer-events: none;
  user-select: none;
}

.scene-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-bottom: 0.75rem;
}

.scene-title {
  font-size: clamp(1.4rem, 3.5vw, 2.4rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.scene-desc {
  font-size: clamp(0.88rem, 1.5vw, 1rem);
  color: rgba(255,255,255,0.72);
  line-height: 1.7;
  max-width: 620px;
  margin-bottom: 0.75rem;
}
.scene-desc strong { color: rgba(255,255,255,0.95); }

.scene-award {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.6;
}
.scene-award strong { color: rgba(255,255,255,0.8); }

.scene-link {
  color: rgba(96,200,255,0.9);
  text-decoration: none;
  transition: color 0.2s, text-shadow 0.2s;
}
.scene-link:hover {
  color: rgba(96,200,255,1);
  text-shadow: 0 0 8px rgba(96,200,255,0.6);
}

/* ===== PROYECTOS — TABS ===== */

.projects-tabs {
  position: relative;
  overflow: hidden;
}

/* Tab nav */
.ptab-nav {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.ptab-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.55);
  padding: 0.55rem 1.2rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background 0.3s, border-color 0.3s, color 0.3s, box-shadow 0.3s;
  white-space: nowrap;
}
.ptab-btn:hover {
  color: rgba(255,255,255,0.9);
}
.ptab-btn.active {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.45);
  color: #fff;
}
/* color glow por tab */
.ptab-btn[data-tab="0"] {
  border-color: rgba(255,160,80,0.4);
  box-shadow: 0 0 10px rgba(255,160,80,0.15);
}
.ptab-btn[data-tab="0"]:hover,
.ptab-btn[data-tab="0"].active {
  border-color: rgba(255,160,80,0.75);
  box-shadow: 0 0 18px rgba(255,160,80,0.3);
  color: #fff;
}
.ptab-btn[data-tab="1"] {
  border-color: rgba(124,111,255,0.4);
  box-shadow: 0 0 10px rgba(124,111,255,0.15);
}
.ptab-btn[data-tab="1"]:hover,
.ptab-btn[data-tab="1"].active {
  border-color: rgba(124,111,255,0.75);
  box-shadow: 0 0 18px rgba(124,111,255,0.3);
  color: #fff;
}
.ptab-btn[data-tab="2"] {
  border-color: rgba(96,200,255,0.4);
  box-shadow: 0 0 10px rgba(96,200,255,0.15);
}
.ptab-btn[data-tab="2"]:hover,
.ptab-btn[data-tab="2"].active {
  border-color: rgba(96,200,255,0.75);
  box-shadow: 0 0 18px rgba(96,200,255,0.3);
  color: #fff;
}
.ptab-btn[data-tab="3"] {
  border-color: rgba(45,212,191,0.4);
  box-shadow: 0 0 10px rgba(45,212,191,0.15);
}
.ptab-btn[data-tab="3"]:hover,
.ptab-btn[data-tab="3"].active {
  border-color: rgba(45,212,191,0.75);
  box-shadow: 0 0 18px rgba(45,212,191,0.3);
  color: #fff;
}
/* contorno pulse en tabs inactivas */
.ptab-btn[data-tab="0"]:not(.active) { animation: pulse-orange 2s ease-in-out infinite; }
.ptab-btn[data-tab="1"]:not(.active) { animation: pulse-purple 2s ease-in-out infinite; }
.ptab-btn[data-tab="2"]:not(.active) { animation: pulse-blue   2s ease-in-out infinite; }
.ptab-btn[data-tab="3"]:not(.active) { animation: pulse-teal   2s ease-in-out infinite; }

@keyframes pulse-orange {
  0%, 100% { box-shadow: none; border-color: rgba(255,160,80,0.2); }
  50%       { box-shadow: 0 0 6px rgba(255,160,80,0.2); border-color: rgba(255,160,80,0.45); }
}
@keyframes pulse-purple {
  0%, 100% { box-shadow: none; border-color: rgba(124,111,255,0.2); }
  50%       { box-shadow: 0 0 6px rgba(124,111,255,0.2); border-color: rgba(124,111,255,0.45); }
}
@keyframes pulse-blue {
  0%, 100% { box-shadow: none; border-color: rgba(96,200,255,0.2); }
  50%       { box-shadow: 0 0 6px rgba(96,200,255,0.2); border-color: rgba(96,200,255,0.45); }
}
@keyframes pulse-teal {
  0%, 100% { box-shadow: none; border-color: rgba(45,212,191,0.2); }
  50%       { box-shadow: 0 0 6px rgba(45,212,191,0.2); border-color: rgba(45,212,191,0.45); }
}

/* Stage with animated background */
.ptab-stage {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.ptab-bg {
  position: absolute;
  inset: 0;
  will-change: background;
  transition: background 0.7s cubic-bezier(0.4,0,0.2,1);
  background: radial-gradient(ellipse at 20% 60%, rgba(124,111,255,0.35) 0%, transparent 65%),
              radial-gradient(ellipse at 80% 30%, rgba(96,200,255,0.15) 0%, transparent 55%),
              var(--color-surface);
}
.ptab-stage[data-bg="0"] .ptab-bg,
.projects-tabs[data-active="0"] .ptab-bg {
  background: radial-gradient(ellipse at 20% 60%, rgba(255,160,80,0.28) 0%, transparent 65%),
              radial-gradient(ellipse at 80% 30%, rgba(124,111,255,0.15) 0%, transparent 55%),
              var(--color-surface);
}
.projects-tabs[data-active="1"] .ptab-bg {
  background: radial-gradient(ellipse at 20% 60%, rgba(124,111,255,0.35) 0%, transparent 65%),
              radial-gradient(ellipse at 80% 30%, rgba(96,200,255,0.15) 0%, transparent 55%),
              var(--color-surface);
}
.projects-tabs[data-active="2"] .ptab-bg {
  background: radial-gradient(ellipse at 15% 70%, rgba(96,200,255,0.35) 0%, transparent 65%),
              radial-gradient(ellipse at 85% 25%, rgba(45,212,191,0.15) 0%, transparent 55%),
              var(--color-surface);
}
.projects-tabs[data-active="3"] .ptab-bg {
  background: radial-gradient(ellipse at 25% 55%, rgba(45,212,191,0.35) 0%, transparent 65%),
              radial-gradient(ellipse at 75% 35%, rgba(96,200,255,0.12) 0%, transparent 55%),
              var(--color-surface);
}

/* Panels */
.ptab-panel {
  display: none;
  grid-template-columns: 1fr 1.3fr;
  gap: 2rem;
  padding: 2rem;
  opacity: 0;
  transform: translateX(18px);
  transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.16,1,0.3,1);
}
.ptab-panel.active {
  display: grid;
  opacity: 1;
  pointer-events: all;
  transform: translateX(0);
}

.ptab-image {
  border-radius: 16px;
  overflow: hidden;
  background: rgba(0,0,0,0.2);
  aspect-ratio: 4 / 3;
}
.ptab-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}
.ptab-image--contain {
  background: #eef2f7;
  padding: 1rem;
}
.ptab-image--contain img {
  object-fit: contain;
}
.ptab-image--empty {
  background: rgba(255,255,255,0.04);
  border: 1px dashed rgba(255,255,255,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ptab-image--empty::after {
  content: 'imagen próximamente';
  font-size: 0.75rem;
  color: rgba(255,255,255,0.2);
  font-family: monospace;
  letter-spacing: 0.05em;
}

.ptab-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.75rem;
}
.ptab-tag {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}
.ptab-info h3 {
  font-size: clamp(1.1rem, 2.2vw, 1.6rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.ptab-info p {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.68);
  line-height: 1.7;
}
.ptab-info p strong { color: rgba(255,255,255,0.95); }
.ptab-award {
  font-size: 0.8rem !important;
  color: rgba(255,255,255,0.45) !important;
}
.ptab-award strong { color: rgba(255,255,255,0.75) !important; }
.ptab-link {
  color: rgba(96,200,255,0.9);
  text-decoration: none;
  transition: color 0.2s, text-shadow 0.2s;
}
.ptab-link:hover {
  color: rgba(96,200,255,1);
  text-shadow: 0 0 8px rgba(96,200,255,0.6);
}

/* Mobile */
@media (max-width: 600px) {
  .ptab-panel, .ptab-panel.active {
    grid-template-columns: 1fr;
    position: relative;
    padding: 1.25rem;
  }
  .ptab-image { min-height: 180px; }
  .ptab-btn { font-size: 0.72rem; padding: 0.45rem 0.9rem; }
}


/* ===== HOBBIES / CARRUSEL ===== */
.hobbies {
  background-color: var(--color-bg);
}

.section-subtitle {
  color: var(--color-text-muted);
  font-size: var(--font-size-lg);
  margin-top: 0.5rem;
}

/* Contenedor principal del carrusel */
.carousel {
  position: relative;
  overflow: hidden;             /* Oculta los slides que están fuera del área visible */
  border-radius: var(--radius-lg);
  user-select: none;            /* Evita que se seleccione texto al arrastrar */
  outline: 1px solid rgba(0,0,0,0.7);
  box-shadow: 0 0 18px rgba(0,0,0,0.9), 0 0 40px rgba(0,0,0,0.5), 0 0 80px rgba(0,0,0,0.25);
  padding-bottom: 60px;
}

/* La "pista": contiene todos los slides en fila horizontal */
.carousel-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1); /* Animación suave al deslizar */
  will-change: transform;       /* Pista al navegador para optimizar la animación */
}

/* Cada diapositiva ocupa exactamente el 100% del contenedor */
.carousel-slide {
  min-width: 100%;
  display: grid;
  grid-template-columns: 1.4fr 1fr; /* Imagen grande a la izquierda, texto a la derecha */
  gap: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* Zona de la imagen */
.slide-image {
  aspect-ratio: 4 / 3;
  background: var(--color-border);
  overflow: hidden;
  position: relative;
}

.slide-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.carousel-slide:hover .slide-image img {
  transform: scale(1.04);
}

/* Galería multi-imagen */
/* ── Opción B: un foto a la vez ── */
.slide-viewer {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #0d0f1a;
  aspect-ratio: 4 / 3;
}

[data-theme="light"] .slide-viewer {
  background: #dbeafe;
}

.slide-viewer-images {
  position: relative;
  width: 100%;
  height: 100%;
}

.slide-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.45s ease;
  cursor: zoom-in;
  display: block;
}

.slide-img.active {
  opacity: 1;
}

/* Flechas dentro del viewer */
.slide-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  background: rgba(5,6,14,0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
}
.slide-nav:hover {
  background: rgba(90,175,255,0.25);
  transform: translateY(-50%) scale(1.1);
}
.slide-nav--prev { left: 10px; }
.slide-nav--next { right: 10px; }

/* Counter "1 / 4" */
.slide-counter {
  position: absolute;
  bottom: 10px;
  right: 14px;
  z-index: 2;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.75);
  background: rgba(5,6,14,0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 3px 9px;
  border-radius: 20px;
  pointer-events: none;
}

/* ── Opción C: foto grande + tira de miniaturas ── */
.slide-viewer--thumbs {
  aspect-ratio: unset;
  background: transparent;
  overflow: visible;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.slide-viewer-main {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #0d0f1a;
  aspect-ratio: 4 / 3;
  flex-shrink: 0;
}

.slide-thumbs {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.slide-thumbs::-webkit-scrollbar { display: none; }

.slide-thumb {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: 7px;
  cursor: pointer;
  opacity: 0.5;
  border: 2px solid transparent;
  transition: opacity 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.slide-thumb:hover { opacity: 0.8; transform: scale(1.05); }
.slide-thumb.active {
  opacity: 1;
  border-color: rgba(90,175,255,0.8);
}

/* Placeholder cuando no hay imagen */
.slide-image.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  background: linear-gradient(135deg, var(--color-border) 0%, var(--color-surface) 100%);
}

.slide-image.placeholder::after {
  content: 'Tu foto aquí';
}

/* Zona de texto / caption */
.slide-caption {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem;
  gap: var(--space-sm);
}

/* Emoji del hobby */
.slide-emoji {
  font-size: 2.5rem;
  line-height: 1;
}

.slide-caption h3 {
  font-size: var(--font-size-xl);
  font-weight: 600;
  line-height: 1.2;
}

.slide-caption p {
  color: var(--color-text-muted);
  font-size: var(--font-size-base);
  line-height: 1.7;
}

/* Botones de navegación (flechas) */
.carousel-btn {
  position: absolute;
  bottom: 0.6rem;
  top: auto;
  transform: none;
  background: var(--color-bg);
  border: 1.5px solid rgba(226,105,74,0.8);
  color: rgba(226,105,74,1);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--transition), box-shadow var(--transition), border-color var(--transition);
  z-index: 10;
  box-shadow: 0 0 8px rgba(226,105,74,0.4), 0 0 20px rgba(226,105,74,0.15);
}

.carousel-btn:hover {
  background: rgba(226,105,74,0.12);
  border-color: rgba(226,105,74,1);
  color: rgba(226,105,74,1);
  box-shadow: 0 0 12px rgba(226,105,74,0.7), 0 0 30px rgba(226,105,74,0.3);
  transform: scale(1.08);
}

.carousel-btn--prev { left: 1rem; }
.carousel-btn--next { right: 1rem; }

/* Puntos indicadores */
.carousel-dots {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 10;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-border);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background-color var(--transition), transform var(--transition);
}

.carousel-dot.active {
  background: var(--color-accent);
  width: 24px;             /* El punto activo se alarga */
  border-radius: 4px;
}

/* ===== RESPONSIVE — Carrusel ===== */
@media (max-width: 700px) {
  .carousel-slide {
    grid-template-columns: 1fr;  /* Una columna en móvil: imagen arriba, texto abajo */
  }

  .slide-image {
    aspect-ratio: 16 / 9;
  }

  .slide-caption {
    padding: var(--space-md);
    gap: var(--space-xs);
  }

  .slide-caption h3 {
    font-size: var(--font-size-lg);
  }

  .slide-emoji {
    font-size: 2rem;
  }

  .carousel-btn {
    width: 44px;
    height: 44px;
    font-size: 0.9rem;
  }
}

/* ===== CONTACTO ===== */
.contact {
  background: var(--color-surface);
}

.contact-inner {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.contact-inner h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: var(--space-sm);
}

.contact-inner > p {
  color: var(--color-text-muted);
  font-size: var(--font-size-lg);
  margin-bottom: 0;
}

/* ── Status badge ── */
.contact-status {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: rgba(34,197,94,0.08);
  border: 1px solid rgba(34,197,94,0.25);
  color: rgb(34,197,94);
  padding: 0.38rem 1rem;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  margin-bottom: 1.5rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: rgb(34,197,94);
  border-radius: 50%;
  flex-shrink: 0;
  animation: pulse-green 2s ease-in-out infinite;
}

@keyframes pulse-green {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.6); }
  50%       { box-shadow: 0 0 0 5px rgba(34,197,94,0); }
}

/* ── Context meta ── */
.contact-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 2rem;
  margin: 1.4rem 0 2.2rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

/* ── Contact cards ── */
.contact-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 340px));
  gap: 1rem;
  justify-content: center;
}

.contact-card--wa .contact-card-icon {
  background: rgba(37,211,102,0.1);
  color: #25d366;
}

.contact-card--wa:hover {
  border-color: #25d366;
  box-shadow: 0 8px 28px rgba(37,211,102,0.14);
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1.2rem 1.25rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-align: left;
  transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.contact-card:hover {
  border-color: var(--color-accent);
  box-shadow: 0 8px 28px rgba(226,105,74,0.14);
  transform: translateY(-3px);
}

.contact-card-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--color-accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--color-accent);
}

.contact-card-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 0.2rem;
}

.contact-card-value {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 860px) {
  .contact-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .contact-cards {
    grid-template-columns: 1fr;
  }
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.40rem;
  height: 2.40em;
  color: var(--color-text-muted);
  margin-right: 0;
}

.social-icon svg {
  width: 100%;
  height: 100%;
  display: block;
  fill: currentColor;
}

.social-links a:hover .social-icon {
  color: var(--color-text);
}

/* ===== EXPERIENCE — TIMELINE ===== */
.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-left: 2rem;
}

/* 1. LINE DRAW — la línea crece de arriba a abajo al entrar en view */
.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: linear-gradient(to bottom, var(--color-accent), rgba(99,102,241,0.4), transparent);
  transform-origin: top;
  transform: scaleY(0);
  transition: transform 1.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.timeline.line-drawn::before {
  transform: scaleY(1);
}

.timeline-item {
  position: relative;
  padding: 0 0 2.5rem 2rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

/* Stagger cascade: cada tarjeta entra con un delay escalonado */
.timeline-item:nth-child(1) { transition-delay: 0.05s; }
.timeline-item:nth-child(2) { transition-delay: 0.22s; }
.timeline-item:nth-child(3) { transition-delay: 0.39s; }
.timeline-item:nth-child(4) { transition-delay: 0.56s; }

.timeline-marker {
  position: absolute;
  left: -0.4rem;
  top: 8px;
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 0 10px rgba(226,105,74,0.6);
  border: 2px solid var(--color-bg);
}

/* Radar ping: ring que se expande y desvanece en loop */
.timeline-marker::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1.5px solid rgba(226,105,74,0.7);
  animation: radar-ping 2.4s ease-out infinite;
}

/* Desfase entre dots para que no pulsen en sincronía */
.timeline-item:nth-child(2) .timeline-marker::after { animation-delay: 0.6s; }
.timeline-item:nth-child(3) .timeline-marker::after { animation-delay: 1.2s; }
.timeline-item:nth-child(4) .timeline-marker::after { animation-delay: 1.8s; }

@keyframes radar-ping {
  0%   { transform: scale(1);   opacity: 0.75; }
  70%  { transform: scale(2.6); opacity: 0;    }
  100% { transform: scale(2.6); opacity: 0;    }
}

.timeline-card {
  position: relative;
  background: rgba(35, 40, 64, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 1.4rem 1.6rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.2);
}
[data-theme="light"] .timeline-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: 0 4px 24px rgba(37,99,235,0.06);
}

/* 4. TENURE BAR — barra que se llena proporcionalmente a la duración del rol */
.timeline-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--color-accent), rgba(99,102,241,0.6));
  border-radius: 14px 14px 0 0;
  transition: width 1.1s cubic-bezier(0.4, 0, 0.2, 1) 0.5s;
}
.timeline-item.visible .timeline-card::before {
  width: 100%;
}

/* 2. BORDER TRACE — borde neon que se revela de izquierda a derecha al entrar */
.timeline-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 14px;
  border: 1px solid rgba(226,105,74,0.5);
  clip-path: inset(0 100% 0 0 round 14px);
  transition: clip-path 0.9s cubic-bezier(0.4, 0, 0.2, 1) 0.2s;
  pointer-events: none;
}
.timeline-item.visible .timeline-card::after {
  clip-path: inset(0 0% 0 0 round 14px);
}

/* Logo de empresa */
.company-logo {
  width: 48px;
  height: 48px;
  border-radius: 5px;
  object-fit: cover;
  flex-shrink: 0;
}
.company-logo--light {
  background: #fff;
  padding: 3px;
  object-fit: contain;
}

/* Empresa como header cuando agrupa varios roles */
.timeline-company--header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--font-size-sm);
  font-weight: 700;
  color: var(--color-accent);
  letter-spacing: 0.03em;
  margin-bottom: 1rem;
}

.timeline-company {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Bloque individual de un rol dentro de una tarjeta agrupada */
.timeline-role-block {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Separador entre roles de la misma empresa */
.timeline-role-divider {
  height: 1px;
  background: var(--color-border);
  margin: 1.1rem 0;
}

.timeline-card:hover {
  border-color: rgba(226,105,74,0.35);
  box-shadow: 0 4px 24px rgba(226,105,74,0.07);
}

.timeline-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
  flex-wrap: wrap;
}

.timeline-title-group {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.timeline-role {
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--color-text);
  margin: 0;
}

.timeline-company {
  font-size: var(--font-size-sm);
  color: var(--color-accent);
  font-weight: 500;
}

.timeline-date {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  white-space: nowrap;
  padding-top: 0.1rem;
}

.timeline-bullets {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.timeline-bullets li {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  padding-left: 1rem;
  position: relative;
  line-height: 1.55;
}

.timeline-bullets li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--color-accent);
  opacity: 0.7;
}

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* 3. TAG POP-IN — cada tag aparece con micro-scale en cascada */
.timeline-tags span {
  font-size: 0.72rem;
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
  background: rgba(52,211,153,0.08);
  border: 1px solid rgba(52,211,153,0.2);
  color: var(--color-text-muted);
  opacity: 0;
  transform: scale(0.7) translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.timeline-item.visible .timeline-tags span {
  opacity: 1;
  transform: scale(1) translateY(0);
  animation: tag-glow-pulse 2.8s ease-in-out infinite;
}

@keyframes tag-glow-pulse {
  0%, 100% {
    border-color: rgba(52,211,153,0.2);
    box-shadow: none;
  }
  50% {
    border-color: rgba(52,211,153,0.65);
    box-shadow: 0 0 7px rgba(52,211,153,0.2);
  }
}
/* Delays escalonados — cubre hasta 10 tags */
.timeline-item.visible .timeline-tags span:nth-child(1)  { transition-delay: 0.60s; }
.timeline-item.visible .timeline-tags span:nth-child(2)  { transition-delay: 0.67s; }
.timeline-item.visible .timeline-tags span:nth-child(3)  { transition-delay: 0.74s; }
.timeline-item.visible .timeline-tags span:nth-child(4)  { transition-delay: 0.81s; }
.timeline-item.visible .timeline-tags span:nth-child(5)  { transition-delay: 0.88s; }
.timeline-item.visible .timeline-tags span:nth-child(6)  { transition-delay: 0.95s; }
.timeline-item.visible .timeline-tags span:nth-child(7)  { transition-delay: 1.02s; }
.timeline-item.visible .timeline-tags span:nth-child(8)  { transition-delay: 1.09s; }
.timeline-item.visible .timeline-tags span:nth-child(9)  { transition-delay: 1.16s; }
.timeline-item.visible .timeline-tags span:nth-child(10) { transition-delay: 1.23s; }

/* ===== EDUCATION & CERTIFICATIONS ===== */
/* Education featured card */
.edu-featured {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  background: var(--color-surface);
  border: 1px solid rgba(180, 30, 60, 0.5);
  border-radius: 14px;
  padding: 1.4rem 1.6rem;
  margin-bottom: 2rem;
  box-shadow: 0 0 12px rgba(180, 30, 60, 0.15), 0 0 28px rgba(180, 30, 60, 0.07);
  transition: box-shadow 0.3s, border-color 0.3s;
}

.edu-featured:hover {
  border-color: rgba(180, 30, 60, 0.8);
  box-shadow: 0 0 18px rgba(180, 30, 60, 0.3), 0 0 40px rgba(180, 30, 60, 0.12);
}

.edu-featured-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(96,200,255,0.1);
  border: 1px solid rgba(96,200,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #60c8ff;
}

.edu-featured-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
}

.edu-featured-body strong {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.4;
}

.edu-featured-body span {
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

.edu-featured-year {
  font-size: 0.72rem;
  font-weight: 600;
  color: #60c8ff;
  background: rgba(96,200,255,0.1);
  border: 1px solid rgba(96,200,255,0.2);
  border-radius: 99px;
  padding: 0.25rem 0.7rem;
  flex-shrink: 0;
}

/* Certifications label */
.edu-certs-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
  opacity: 0.6;
  margin-bottom: 1.2rem;
}

/* Badge wall */
.badge-wall {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.cert-badge {
  background: var(--color-surface);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 14px;
  padding: 1.4rem 1rem 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.55rem;
  position: relative;
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.12), 0 0 30px rgba(255, 255, 255, 0.06);
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.2s;
}

.cert-badge:hover {
  border-color: rgba(255, 255, 255, 0.65);
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.16), 0 0 40px rgba(255, 255, 255, 0.06), 0 4px 20px rgba(0,0,0,0.15);
  transform: translateY(-3px);
}

[data-theme="light"] .cert-badge {
  border-color: rgba(30,64,175,0.45);
  box-shadow: 0 0 14px rgba(30,64,175,0.2), 0 0 30px rgba(30,64,175,0.08);
}
[data-theme="light"] .cert-badge:hover {
  border-color: rgba(30,64,175,0.75);
  box-shadow: 0 0 18px rgba(30,64,175,0.3), 0 0 40px rgba(30,64,175,0.12), 0 4px 20px rgba(0,0,0,0.08);
}


.cert-badge-year {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--color-text-muted);
  opacity: 0.7;
}

.cert-hex {
  position: relative;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.2rem;
}

.cert-hex svg:first-child {
  position: absolute;
  top: 0;
  left: 0;
}

.cert-hex svg:last-child {
  position: relative;
  z-index: 1;
}

.cert-badge-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.3;
}

.cert-badge-issuer {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  margin: 0;
}

.cert-badge-issuer-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.cert-issuer-logo {
  width: 16px;
  height: 16px;
  object-fit: contain;
  border-radius: 3px;
  opacity: 0.85;
}

.cert-issuer-logo--lg {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  opacity: 0.9;
}

.cert-issuer-logo--cover {
  width: 28px;
  height: 28px;
  object-fit: cover;
  border-radius: 6px;
  opacity: 0.9;
}

/* Línea conectora entre tarjetas de educación */
.edu-connector {
  position: relative;
  height: 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: -1.2rem;
  margin-bottom: -0.8rem;
  z-index: 1;
}

.edu-connector-line {
  width: 2px;
  height: 100%;
  background: linear-gradient(to bottom, rgba(96,200,255,0.3), rgba(96,200,255,0.1));
  border-radius: 2px;
}

.edu-connector-dot {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #60c8ff;
  box-shadow: 0 0 8px rgba(96,200,255,0.8);
  top: 0;
  animation: edu-dot-travel 2.4s ease-in-out infinite;
}

@keyframes edu-dot-travel {
  0%   { top: 0;    opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { top: calc(100% - 7px); opacity: 0; }
}

/* Partícula flotante en cert-badges */
.cert-badge::after {
  content: '';
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(96,200,255,0.7);
  box-shadow: 0 0 6px rgba(96,200,255,0.5);
  bottom: 20%;
  left: 50%;
  transform: translateX(-50%);
  animation: cert-particle 3.5s ease-in-out infinite;
  pointer-events: none;
}

.cert-badge:nth-child(2)::after { animation-delay: 0.9s; }
.cert-badge:nth-child(3)::after {
  animation-delay: 1.8s;
  background: rgba(124,111,255,0.7);
  box-shadow: 0 0 6px rgba(124,111,255,0.5);
}
.cert-badge:nth-child(4)::after {
  animation-delay: 2.7s;
  background: rgba(124,111,255,0.7);
  box-shadow: 0 0 6px rgba(124,111,255,0.5);
}

@keyframes cert-particle {
  0%   { opacity: 0; transform: translateX(-50%) translateY(0);     }
  15%  { opacity: 1; }
  85%  { opacity: 0.6; }
  100% { opacity: 0; transform: translateX(-50%) translateY(-40px); }
}

/* Animación escalonada en badge-wall */
.badge-wall .cert-badge:nth-child(1) { animation-delay: 0ms; }
.badge-wall .cert-badge:nth-child(2) { animation-delay: 200ms; }
.badge-wall .cert-badge:nth-child(3) { animation-delay: 400ms; }
.badge-wall .cert-badge:nth-child(4) { animation-delay: 600ms; }

/* Animación escalonada en edu-featured */
.edu-featured:nth-of-type(1) { animation-delay: 0ms; }
.edu-featured:nth-of-type(2) { animation-delay: 200ms; }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.edu-featured.visible,
.cert-badge.visible {
  animation: fade-up 0.5s ease both;
}

.cert-badge-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  color: var(--color-text-muted);
  text-decoration: none;
  margin-top: 0.2rem;
  opacity: 0.7;
  transition: opacity 0.2s, color 0.2s;
}

.cert-badge-link:hover {
  opacity: 1;
  color: #60c8ff;
}

[data-theme="light"] .edu-featured-icon {
  background: rgba(96,150,255,0.08);
  border-color: rgba(96,150,255,0.2);
  color: #1a56db;
}

[data-theme="light"] .edu-featured-year {
  color: #1a56db;
  background: rgba(96,150,255,0.08);
  border-color: rgba(96,150,255,0.2);
}

@media (max-width: 600px) {
  .edu-grid {
    grid-template-columns: 1fr;
  }
  .timeline {
    padding-left: 1.4rem;
  }
  .timeline-item {
    padding-left: 1.4rem;
  }
  .timeline-header {
    flex-direction: column;
    gap: 0.3rem;
  }
}

/* ===== FOOTER ===== */
.footer {
  padding: var(--space-md) 0;
  border-top: 1px solid var(--color-border);
  text-align: center;
}

.footer p {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

/* ===== ANIMACIONES ===== */

/* Fade-in para el hero — activo de entrada */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease forwards;
}

.fade-in:nth-child(1) { animation-delay: 0.1s; }
.fade-in:nth-child(2) { animation-delay: 0.25s; }
.fade-in:nth-child(3) { animation-delay: 0.4s; }
.fade-in:nth-child(4) { animation-delay: 0.55s; }

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Reveal — se activa con JavaScript cuando el elemento entra en pantalla */
.reveal {
  opacity: 0;
  transform: translateY(48px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ===== RESPONSIVE — TABLET ===== */
@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr; /* Una columna en tablet */
    gap: var(--space-lg);
  }

  .image-wrapper {
    max-width: 340px;
    margin: 0 auto;
  }

  .project-scene { min-height: 480px; }
}

/* ===== RESPONSIVE — MÓVIL ===== */
@media (max-width: 600px) {
  :root {
    --space-xl: 4rem;
    --space-lg: 2rem;
  }

  /* ── Navbar ── */
  .navbar {
    padding: 1rem var(--space-sm);
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg);
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
  }

  .nav-links.open { display: flex; }

  .nav-links a {
    padding: 0.85rem 0;
    width: 100%;
    text-align: center;
    font-size: var(--font-size-base);
  }

  .nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.active span:nth-child(2) { opacity: 0; }
  .nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* ── Hero ── */
  .hero {
    padding: calc(3rem + 60px) var(--space-sm) var(--space-lg);
  }

  .hero-cta {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .hero-cta .btn {
    width: 100%;
    justify-content: center;
  }

  .hero-blob {
    width: 300px;
    height: 300px;
    right: -30%;
    top: 10%;
  }

  .hero-tagline {
    font-size: 0.85rem;
    white-space: nowrap;
    letter-spacing: 0;
  }

  /* ── Sections ── */
  .section { padding: 3rem 0; }

  .about,
  .contact,
  .hobbies {
    background-color: var(--color-bg);
  }

  /* ── About ── */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* ── Projects ── */
  .project-scene { height: 100svh; min-height: 420px; }
  .scene-content { padding: 2rem 1.5rem; }

  /* ── Hobbies / Carousel ── */
  .carousel-slide {
    grid-template-columns: 1fr;
  }

  /* Viewer en móvil.
     El viewer (flex-shrink:0, aspect-ratio:4/3) expande la columna del grid
     a ~403px. Con overflow:hidden lo contenemos en la celda del grid,
     y aspect-ratio 16/9 + flex-shrink:1 hacen que el main se ajuste al ancho. */
  .slide-viewer--thumbs {
    overflow: hidden;
    gap: 0;
  }

  .slide-viewer-main {
    flex-shrink: 1;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 10px 10px 0 0;
  }

  /* Thumbnails más pequeñas */
  .slide-thumb {
    width: 46px;
    height: 46px;
    border-radius: 5px;
  }

  /* Caption con menos padding, sin conflicto con botones */
  .slide-caption {
    padding: 1.25rem 1rem 1rem;
    gap: 0.4rem;
    overflow: visible;
    height: auto;
  }

  /* En mobile el carousel no puede tener overflow:hidden fijo — el caption
     queda debajo del viewer y se cortaría.
     overflow-x: clip recorta los slides laterales sin crear un scroll container,
     permitiendo que el caption crezca verticalmente sin cortarse. */
  .carousel {
    overflow-x: clip;
    overflow-y: visible;
  }

  .carousel-track {
    align-items: flex-start;
  }

  .carousel-slide {
    overflow: visible;
  }

  .slide-caption h3 { font-size: var(--font-size-base); }
  .slide-caption p  { font-size: 0.82rem; }
  .slide-emoji      { font-size: 1.6rem; }

  /* Botones de categoría (← →): sacarlos del flujo absoluto en móvil
     y crear espacio para ellos con padding-bottom en el carousel */
  .carousel {
    padding-bottom: 3rem;
  }

  .carousel-btn {
    bottom: 0.5rem;
    width: 34px;
    height: 34px;
    font-size: 0.85rem;
  }

  .carousel-dots {
    bottom: 0.7rem;
  }

  /* Flechas del viewer más pequeñas */
  .slide-nav {
    width: 30px;
    height: 30px;
    font-size: 1rem;
  }

  /* ── Contact ── */
  .contact-inner h2 { font-size: var(--font-size-2xl); }

  .contact-meta {
    flex-direction: column;
    gap: 0.3rem;
    align-items: center;
  }

  /* ── Back to top ── */
  #back-to-top {
    bottom: 1.25rem;
    right: 1.25rem;
    width: 38px;
    height: 38px;
  }
}

/* ===== AURORA BACKGROUND ===== */
#aurora {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.aurora-blob {
  position: absolute;
  border-radius: 50%;
  will-change: transform;
}

.aurora-blob--a {
  width: 65vmax;
  height: 65vmax;
  background: radial-gradient(circle, rgba(55,100,255,0.18) 0%, transparent 70%);
  filter: blur(40px);
  top: -20vmax;
  left: -15vmax;
  animation: aurora-a 14s ease-in-out infinite alternate;
}

.aurora-blob--b {
  width: 55vmax;
  height: 55vmax;
  background: radial-gradient(circle, rgba(130,45,210,0.14) 0%, transparent 70%);
  filter: blur(50px);
  bottom: -18vmax;
  right: -12vmax;
  animation: aurora-b 18s ease-in-out infinite alternate;
}

.aurora-blob--c {
  width: 40vmax;
  height: 40vmax;
  background: radial-gradient(circle, rgba(226,105,74,0.09) 0%, transparent 70%);
  filter: blur(60px);
  top: 40%;
  right: 10%;
  animation: aurora-c 22s ease-in-out infinite alternate;
}

@keyframes aurora-a {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(10vmax, 8vmax) scale(1.18); }
}

@keyframes aurora-b {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-8vmax, -6vmax) scale(1.14); }
}

@keyframes aurora-c {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-5vmax, 7vmax) scale(1.2); }
}

[data-theme="light"] .aurora-blob--a {
  background: radial-gradient(circle, rgba(80,110,230,0.22) 0%, transparent 65%);
  filter: blur(45px);
}
[data-theme="light"] .aurora-blob--b {
  background: radial-gradient(circle, rgba(160,80,200,0.18) 0%, transparent 65%);
  filter: blur(50px);
}
[data-theme="light"] .aurora-blob--c {
  background: radial-gradient(circle, rgba(201,82,46,0.20) 0%, transparent 65%);
  filter: blur(55px);
}

/* ===== LIGHTBOX ===== */
#lightbox {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#lightbox.open {
  opacity: 1;
  pointer-events: all;
}

#lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 6, 14, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

#lightbox-content {
  position: relative;
  z-index: 1;
  max-width: 72vw;
  max-height: 78vh;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0,0,0,0.6);
  background: #0d0f1a;
  display: flex;
  align-items: center;
  justify-content: center;
}

#lightbox-img {
  max-width: 72vw;
  max-height: 78vh;
  object-fit: contain;
  display: block;
  border-radius: 14px;
  transition: opacity 0.2s ease;
}

#lightbox-img.switching {
  opacity: 0;
}

#lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 0.5px solid rgba(255,255,255,0.2);
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

#lightbox-close:hover {
  background: rgba(255,255,255,0.2);
  transform: scale(1.1);
}

#lightbox-prev,
#lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 0.5px solid rgba(255,255,255,0.15);
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  line-height: 1;
}

#lightbox-prev { left: 1rem; }
#lightbox-next { right: 1rem; }

#lightbox-prev:hover,
#lightbox-next:hover {
  background: rgba(255,255,255,0.18);
  transform: translateY(-50%) scale(1.08);
}

#lightbox-prev.hidden,
#lightbox-next.hidden {
  opacity: 0;
  pointer-events: none;
}

/* ===== NEON WAVES ===== */
#neon-waves {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 55vh;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}

[data-theme="light"] #neon-waves {
  opacity: 0.25;
}

/* ===== CUSTOM CURSOR TRAIL ===== */
@media (hover: hover) and (pointer: fine) {
  body, a, button, .btn, label { cursor: none; }

  #cursor-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 99999;
  }
}

/* ===== SCROLL INDICATOR ===== */
.scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  opacity: 0.45;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.scroll-indicator.hidden {
  opacity: 0;
}

.scroll-indicator-line {
  width: 1px;
  height: 52px;
  background: linear-gradient(to bottom, transparent, var(--color-text));
  position: relative;
  overflow: hidden;
}

.scroll-indicator-line::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--color-accent);
  animation: scroll-drop 1.6s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes scroll-drop {
  0%   { top: -100%; opacity: 1; }
  80%  { top: 100%;  opacity: 1; }
  100% { top: 100%;  opacity: 0; }
}

.scroll-indicator-label {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

@media (max-width: 600px) {
  .scroll-indicator { display: none; }
}


/* ===== GRAIN TEXTURE OVERLAY ===== */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9997;
  opacity: 0.038;
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='256' height='256'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='256' height='256' filter='url(%23n)'/></svg>");
  background-size: 200px 200px;
  animation: grain-shift 0.35s steps(1) infinite;
}

@keyframes grain-shift {
  0%   { background-position: 0 0; }
  25%  { background-position: -52px -28px; }
  50%  { background-position: -105px 47px; }
  75%  { background-position: 33px -80px; }
}

/* ===== ACTIVE NAV LINK ===== */
.nav-links a.nav-active {
  color: rgba(255,255,255,0.95);
  text-shadow: 0 0 8px rgba(90,175,255,0.8), 0 0 22px rgba(90,175,255,0.4);
}

[data-theme="light"] .nav-links a.nav-active {
  color: var(--color-accent);
  text-shadow: 0 0 8px rgba(226,105,74,0.5), 0 0 22px rgba(226,105,74,0.25);
}

/* ===== TYPEWRITER CURSOR ===== */
.typewriter {
  border-right: 2px solid currentColor;
  animation: blink-cursor 0.65s step-end infinite;
}

@keyframes blink-cursor {
  50% { border-color: transparent; }
}

/* ===== MOBILE OPTIMIZATIONS (iOS & Android) ===== */

/* Remove 300ms tap delay on all interactive elements */
a, button, [role="button"], input, select, textarea, label {
  touch-action: manipulation;
}

/* Remove iOS tap highlight flash */
* {
  -webkit-tap-highlight-color: transparent;
}

/* Fix iOS 100vh bug — use dvh when supported */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
}

/* iOS safe area insets (notch / Dynamic Island / home indicator) */
.navbar {
  padding-left: max(var(--space-md), env(safe-area-inset-left));
  padding-right: max(var(--space-md), env(safe-area-inset-right));
}

body {
  padding-bottom: env(safe-area-inset-bottom);
}

/* Disable heavy animations on mobile to save battery and improve scroll */
@media (max-width: 768px) {
  /* Grain texture is expensive on mobile — reduce it */
  body::after {
    animation: none;
    opacity: 0.02;
  }

  /* Aurora blobs: simpler animation */
  .aurora-blob {
    animation-duration: 20s !important;
    filter: blur(60px) !important;
  }

  /* Disable cert particle floats on mobile */
  .cert-badge::after {
    display: none;
  }

  /* Ensure tap targets are at least 44px (Apple & Google guidelines) */
  .nav-links a,
  .btn,
  .contact-card,
  .cert-badge-link,
  .theme-toggle,
  .nav-toggle,
  .ptab-btn {
    min-height: 44px;
  }

  .carousel-btn {
    width: 44px;
    height: 44px;
    min-height: 0;
  }

  /* ptab-nav: horizontal scroll on very small screens */
  .ptab-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
  }
  .ptab-nav::-webkit-scrollbar { display: none; }

  /* Disable tab pulse animations on mobile — saves battery */
  .ptab-btn[data-tab="0"]:not(.active),
  .ptab-btn[data-tab="1"]:not(.active),
  .ptab-btn[data-tab="2"]:not(.active),
  .ptab-btn[data-tab="3"]:not(.active) {
    animation: none;
  }

  /* Fluid cursor canvas hidden on touch devices */
  #fluid {
    display: none;
  }

  /* Reduce box-shadow complexity on mobile */
  .edu-featured {
    box-shadow: 0 0 8px rgba(180, 30, 60, 0.1);
  }

  .cert-badge {
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.07);
  }

  /* Navbar icon: smaller on mobile */
  .logo-minimal {
    width: 44px;
    height: 36px;
  }

  /* Disable heavy SVG animations on mobile */
  .logo-pulse-line {
    animation: none;
    opacity: 0.7;
  }
  .logo-minimal {
    animation: none;
    -webkit-filter: drop-shadow(0 0 5px rgba(96,200,255,0.4));
    filter: drop-shadow(0 0 5px rgba(96,200,255,0.4));
  }

  /* Simplify tech pill neon on mobile */
  .techstack-category--cloud .tech-pill,
  .techstack-category--lang .tech-pill,
  .techstack-category--tools .tech-pill {
    box-shadow: none;
  }

  /* Simplify carousel neon border on mobile */
  .carousel {
    box-shadow: 0 0 10px rgba(0,0,0,0.6);
  }
}

/* Smooth momentum scrolling on iOS */
@supports (-webkit-overflow-scrolling: touch) {
  html {
    -webkit-overflow-scrolling: touch;
  }
}

/* Reduce motion for users who prefer it (accessibility + battery) */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .aurora-blob,
  body::after,
  .cert-badge::after,
  .edu-connector-dot,
  .logo-minimal,
  .logo-pulse-line {
    animation: none !important;
  }
}

.typewriter-flash {
  animation: tw-flash 1.8s ease forwards;
}

@keyframes tw-flash {
  0%   { text-shadow: none; color: inherit; }
  15%  { text-shadow:
           0 0 6px  rgba(255,255,255,1),
           0 0 18px rgba(226,105,74,1),
           0 0 40px rgba(226,105,74,0.95),
           0 0 80px rgba(90,175,255,0.9),
           0 0 140px rgba(90,175,255,0.6),
           0 0 220px rgba(90,175,255,0.25);
         color: #fff; }
  40%  { text-shadow:
           0 0 10px rgba(226,105,74,0.8),
           0 0 35px rgba(226,105,74,0.6),
           0 0 70px rgba(90,175,255,0.5),
           0 0 120px rgba(90,175,255,0.2);
         color: #fff; }
  70%  { text-shadow:
           0 0 6px rgba(226,105,74,0.35),
           0 0 20px rgba(90,175,255,0.2);
         color: inherit; }
  100% { text-shadow: none; color: inherit; }
}


/* ===== SECTION DIVIDERS ===== */
.section-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(226,105,74,0.4) 30%,
    rgba(99,102,241,0.4) 70%,
    transparent 100%
  );
  margin: 0;
}

/* ===== BACK TO TOP ===== */
#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 500;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 1px solid rgba(226,105,74,0.4);
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15), 0 0 12px rgba(226,105,74,0.15);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.2s ease;
}

#back-to-top.visible {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

#back-to-top:hover {
  box-shadow: 0 6px 20px rgba(226,105,74,0.35);
  transform: translateY(-2px);
}

/* ===== SCROLL PROGRESS BAR ===== */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #60c8ff, #7c6fff, #e2694a);
  z-index: 10000;
  transition: width 0.1s linear;
  pointer-events: none;
}

/* ===== AVAILABILITY BADGE ===== */
.availability-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  border-radius: 99px;
  background: rgba(52,211,153,0.1);
  border: 1px solid rgba(52,211,153,0.3);
  color: #34d399;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
}
.availability-badge .pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  animation: pulse-green 2s ease infinite;
}
@keyframes pulse-green {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
}

/* ===== COPY EMAIL TOAST ===== */
#email-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--color-surface);
  border: 1px solid rgba(52,211,153,0.4);
  color: #34d399;
  padding: 0.65rem 1.4rem;
  border-radius: 99px;
  font-size: 0.85rem;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 9999;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}
#email-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== STATS COUNTER ===== */
.stats-row {
  display: flex;
  gap: 2rem;
  margin-top: 1.8rem;
  flex-wrap: wrap;
}
.stat-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.stat-number {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  color: var(--color-text);
  background: linear-gradient(100deg, #60c8ff, #7c6fff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-label {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.2rem;
}

/* ===== TECH STACK ===== */
.techstack {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}
.techstack-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  margin-bottom: 1.2rem;
}
.techstack-category {
  margin-bottom: 1.1rem;
}
.techstack-cat-label {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
  opacity: 0.55;
  margin-bottom: 0.55rem;
}
.techstack-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.tech-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.85rem;
  border-radius: 99px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  font-size: 0.78rem;
  color: var(--color-text-muted);
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
[data-theme="light"] .tech-pill {
  background: rgba(0,0,0,0.03);
  border: 1px solid rgba(0,0,0,0.1);
}
/* Cloud & Platforms — azul */
.techstack-category--cloud .tech-pill {
  border-color: rgba(96,200,255,0.45);
  box-shadow: 0 0 8px rgba(96,200,255,0.2), inset 0 0 6px rgba(96,200,255,0.04);
}
.techstack-category--cloud .tech-pill:hover {
  border-color: rgba(96,200,255,0.65);
  background: rgba(96,200,255,0.08);
  box-shadow: 0 0 10px rgba(96,200,255,0.15);
  color: var(--color-text);
}

/* Languages — teal */
.techstack-category--lang .tech-pill {
  border-color: rgba(45,212,191,0.45);
  box-shadow: 0 0 8px rgba(45,212,191,0.2), inset 0 0 6px rgba(45,212,191,0.04);
}
.techstack-category--lang .tech-pill:hover {
  border-color: rgba(45,212,191,0.65);
  background: rgba(45,212,191,0.08);
  box-shadow: 0 0 10px rgba(45,212,191,0.15);
  color: var(--color-text);
}

/* Tools & DevOps — morado */
.techstack-category--tools .tech-pill {
  border-color: rgba(124,111,255,0.45);
  box-shadow: 0 0 8px rgba(124,111,255,0.2), inset 0 0 6px rgba(124,111,255,0.04);
}
.techstack-category--tools .tech-pill:hover {
  border-color: rgba(124,111,255,0.65);
  background: rgba(124,111,255,0.08);
  box-shadow: 0 0 10px rgba(124,111,255,0.15);
  color: var(--color-text);
}
.tech-pill svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ===== DOWNLOAD CV BTN ===== */

/* ===== PTAB LIGHT MODE ===== */
[data-theme="light"] .ptab-btn {
  color: rgba(0,0,0,0.6);
}
[data-theme="light"] .ptab-tag             { color: rgba(0,0,0,0.5) !important; }
[data-theme="light"] .ptab-info h3         { color: rgba(0,0,0,0.88) !important; }
[data-theme="light"] .ptab-info p          { color: rgba(0,0,0,0.7) !important; }
[data-theme="light"] .ptab-info p strong   { color: rgba(0,0,0,0.88) !important; }
[data-theme="light"] .ptab-award           { color: rgba(0,0,0,0.65) !important; }
[data-theme="light"] .ptab-award strong    { color: rgba(0,0,0,0.75) !important; }
[data-theme="light"] .ptab-link            { color: rgba(30,100,180,0.9); }
[data-theme="light"] .ptab-link:hover      { color: rgba(30,100,180,1); text-shadow: 0 0 8px rgba(30,100,180,0.3); }
[data-theme="light"] .ptab-btn:hover { color: rgba(0,0,0,0.9); }
[data-theme="light"] .ptab-btn.active { color: rgba(0,0,0,0.9); }

[data-theme="light"] .ptab-btn[data-tab="0"] { background: rgba(220,100,20,0.1);  border-color: rgba(220,100,20,0.45); }
[data-theme="light"] .ptab-btn[data-tab="1"] { background: rgba(100,80,220,0.1);  border-color: rgba(100,80,220,0.4); }
[data-theme="light"] .ptab-btn[data-tab="2"] { background: rgba(30,140,200,0.1);  border-color: rgba(30,140,200,0.4); }
[data-theme="light"] .ptab-btn[data-tab="3"] { background: rgba(20,160,140,0.1);  border-color: rgba(20,160,140,0.4); }

[data-theme="light"] .ptab-btn[data-tab="0"]:hover,
[data-theme="light"] .ptab-btn[data-tab="0"].active { background: rgba(220,100,20,0.18); border-color: rgba(220,100,20,0.7);  box-shadow: 0 0 12px rgba(220,100,20,0.2); }
[data-theme="light"] .ptab-btn[data-tab="1"]:hover,
[data-theme="light"] .ptab-btn[data-tab="1"].active { background: rgba(100,80,220,0.18); border-color: rgba(100,80,220,0.65); box-shadow: 0 0 12px rgba(100,80,220,0.18); }
[data-theme="light"] .ptab-btn[data-tab="2"]:hover,
[data-theme="light"] .ptab-btn[data-tab="2"].active { background: rgba(30,140,200,0.18); border-color: rgba(30,140,200,0.65); box-shadow: 0 0 12px rgba(30,140,200,0.18); }
[data-theme="light"] .ptab-btn[data-tab="3"]:hover,
[data-theme="light"] .ptab-btn[data-tab="3"].active { background: rgba(20,160,140,0.18); border-color: rgba(20,160,140,0.65); box-shadow: 0 0 12px rgba(20,160,140,0.18); }
