/* ═══════════════════════════════════════════════════════════════
   LIQUID GLASS DESIGN — Apple-style translucent UI
   Misma esencia: hub personal oscuro con acentos índigo/cian/rosa
   ═══════════════════════════════════════════════════════════════ */

:root {
  --bg-primary: #04050a;

  /* Liquid glass surfaces */
  --glass-bg: linear-gradient(135deg, rgba(255,255,255,0.085), rgba(255,255,255,0.025));
  --glass-bg-hover: linear-gradient(135deg, rgba(255,255,255,0.13), rgba(255,255,255,0.05));
  --glass-blur: blur(22px) saturate(180%);

  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-medium: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.2);

  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.82);
  --text-muted: rgba(255, 255, 255, 0.52);

  --accent-primary: #6366f1;
  --accent-secondary: #818cf8;
  --accent-cyan: #22d3ee;
  --accent-pink: #ec4899;

  --success: #10b981;

  --font-display: 'Orbitron', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --radius-full: 999px;

  --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.45);
  --shadow-glass-lg: 0 16px 48px rgba(0, 0, 0, 0.55);
  --shadow-neon: 0 0 24px rgba(99, 102, 241, 0.35);

  --transition-fast: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);

  --content-max: 520px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb {
  background: var(--accent-primary);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--accent-secondary); }

::selection { background: rgba(99,102,241,0.4); }

/* ── Aurora liquid background ── */
.bg-scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  will-change: transform;
}

.blob-1 {
  width: 520px; height: 520px;
  top: -180px; left: 50%;
  margin-left: -260px;
  background: radial-gradient(circle at 35% 35%, rgba(99,102,241,0.55), rgba(99,102,241,0) 70%);
  animation: blobDrift1 26s ease-in-out infinite;
}

.blob-2 {
  width: 420px; height: 420px;
  top: 35%; right: -190px;
  background: radial-gradient(circle at 40% 40%, rgba(34,211,238,0.4), rgba(34,211,238,0) 70%);
  animation: blobDrift2 32s ease-in-out infinite;
}

.blob-3 {
  width: 400px; height: 400px;
  bottom: -140px; left: -160px;
  background: radial-gradient(circle at 50% 40%, rgba(236,72,153,0.35), rgba(236,72,153,0) 70%);
  animation: blobDrift3 38s ease-in-out infinite;
}

@keyframes blobDrift1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(60px, 50px) scale(1.12); }
  66%      { transform: translate(-50px, 25px) scale(0.94); }
}

@keyframes blobDrift2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  40%      { transform: translate(-80px, -60px) scale(1.08); }
  70%      { transform: translate(-30px, 50px) scale(0.92); }
}

@keyframes blobDrift3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(70px, -50px) scale(1.15); }
}

/* Subtle grid + vignette over the blobs */
.bg-scene::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.022) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 100%);
}

.bg-scene::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 120% 90% at 50% 110%, rgba(4,5,10,0.9), transparent 60%);
}

/* ═══════════════════════════════════════════════════════════════
   LIQUID GLASS CORE
   - translucent gradient + heavy backdrop blur/saturation
   - specular border ring (gradient border via mask)
   - top sheen highlight
   - cursor-tracking inner glow (CSS vars --mx / --my set by JS)
   ═══════════════════════════════════════════════════════════════ */
.lg {
  position: relative;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: var(--radius-lg);
  box-shadow:
    var(--shadow-glass),
    inset 0 1px 0 rgba(255,255,255,0.16),
    inset 0 -1px 0 rgba(255,255,255,0.03);
  isolation: isolate;
}

/* Specular gradient border ring */
.lg::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg,
    rgba(255,255,255,0.45) 0%,
    rgba(255,255,255,0.08) 30%,
    rgba(255,255,255,0.02) 55%,
    rgba(255,255,255,0.22) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
  z-index: 2;
}

/* Cursor-tracking liquid highlight */
.lg::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(220px circle at var(--mx, 50%) var(--my, -30%),
    rgba(255,255,255,0.1), transparent 65%);
  opacity: 0;
  transition: opacity var(--transition-base);
  pointer-events: none;
  z-index: 1;
}

.lg:hover::after { opacity: 1; }

/* ── Layout ── */
.main {
  position: relative;
  z-index: 1;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 48px 20px 48px;
}

/* ── Entrance reveal animation ── */
@keyframes revealUp {
  from { opacity: 0; transform: translateY(22px) scale(0.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.reveal {
  opacity: 0;
  animation: revealUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.reveal-1 { animation-delay: 0.05s; }
.reveal-2 { animation-delay: 0.16s; }
.reveal-3 { animation-delay: 0.27s; }
.reveal-4 { animation-delay: 0.38s; }
.reveal-5 { animation-delay: 0.49s; }
.reveal-6 { animation-delay: 0.6s; }

/* ── Sections ── */
.section { margin-bottom: 22px; }

.section-header { margin-bottom: 12px; padding-left: 6px; }

.section-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 3px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border-medium), transparent);
}

/* ── Top accent bar ── */
.top-bar {
  height: 3px;
  background: linear-gradient(90deg, #818cf8, #22d3ee, #ec4899, #818cf8);
  background-size: 300% 100%;
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 200;
  animation: topbarFlow 8s linear infinite;
}

@keyframes topbarFlow {
  0%   { background-position: 0% 0; }
  100% { background-position: 300% 0; }
}

/* ── Hero (liquid glass panel) ── */
.hero-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 26px 24px;
  border-radius: var(--radius-xl);
  margin-bottom: 0;
  overflow: hidden;
}

/* Soft internal glow tinting the hero glass */
.hero-card .hero-tint {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(ellipse 70% 90% at 12% 0%, rgba(99,102,241,0.18), transparent 60%),
    radial-gradient(ellipse 50% 70% at 100% 100%, rgba(34,211,238,0.1), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.hero-avatar-wrap {
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

/* Rotating conic ring behind the avatar */
.hero-avatar-wrap::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 22px;
  background: conic-gradient(from var(--ring, 0deg),
    rgba(99,102,241,0.9), rgba(34,211,238,0.8), rgba(236,72,153,0.7), rgba(99,102,241,0.9));
  animation: ringSpin 6s linear infinite;
  filter: blur(6px);
  opacity: 0.7;
}

@property --ring {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

@keyframes ringSpin {
  to { --ring: 360deg; }
}

.hero-avatar {
  position: relative;
  width: 104px;
  height: 104px;
  border-radius: 18px;
  background: rgba(10, 12, 20, 0.85);
  border: 1px solid var(--border-strong);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
  transition: transform var(--transition-spring);
}

.hero-card:hover .hero-avatar { transform: scale(1.04) rotate(-1.5deg); }

.hero-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 17px;
}

/* Sheen sweeping across the avatar */
.hero-avatar::after {
  content: '';
  position: absolute;
  top: -60%;
  left: -80%;
  width: 60%;
  height: 220%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,0.22), transparent);
  transform: rotate(8deg);
  animation: avatarSheen 5.5s ease-in-out infinite;
}

@keyframes avatarSheen {
  0%, 60%, 100% { left: -80%; }
  30%           { left: 130%; }
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: relative;
  z-index: 1;
  min-width: 0;
}

.hero-name {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(100deg, #fff 30%, #b9c0ff 50%, #fff 70%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: nameShimmer 6s ease-in-out infinite;
}

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

.hero-name svg {
  flex-shrink: 0;
  filter: drop-shadow(0 0 8px rgba(29,155,240,0.5));
}

.hero-bio {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-top: 5px;
  margin-bottom: 10px;
}

.hero-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.hero-tag {
  font-size: 11px;
  font-weight: 500;
  padding: 4px 11px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255,255,255,0.14);
  color: rgba(199,206,255,0.95);
  background: linear-gradient(135deg, rgba(99,102,241,0.18), rgba(99,102,241,0.05));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
  transition: all var(--transition-fast);
}

.hero-tag:hover {
  transform: translateY(-2px);
  border-color: rgba(129,140,248,0.6);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.15), 0 4px 14px rgba(99,102,241,0.35);
  color: #fff;
}

/* ── Stats (glass tiles + count-up) ── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.stat-link {
  text-decoration: none;
  display: block;
  text-align: center;
  padding: 14px 10px 12px;
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform var(--transition-spring), box-shadow var(--transition-base);
}

.stat-link:hover {
  transform: translateY(-4px);
  box-shadow:
    var(--shadow-glass),
    0 8px 28px rgba(99, 102, 241, 0.3),
    inset 0 1px 0 rgba(255,255,255,0.2);
}

.stat-link:hover .stat-value {
  text-shadow: 0 0 22px rgba(129, 140, 248, 0.9);
}

.stat-value {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  color: var(--accent-secondary);
  line-height: 1.15;
  transition: text-shadow var(--transition-fast);
  font-variant-numeric: tabular-nums;
  position: relative;
  z-index: 1;
}

.stat-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-top: 2px;
  position: relative;
  z-index: 1;
}

/* ── Mi Historia (storytelling glass panel) ── */
.story-card {
  padding: 26px 24px;
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.story-card .story-tint {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(ellipse 80% 70% at 0% 0%, rgba(99,102,241,0.14), transparent 55%),
    radial-gradient(ellipse 60% 60% at 100% 100%, rgba(236,72,153,0.08), transparent 55%);
  pointer-events: none;
  z-index: 0;
}

.story-lead {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.3px;
  line-height: 1.45;
  text-align: justify;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}

.story-text {
  font-size: 14px;
  line-height: 1.78;
  color: var(--text-secondary);
  text-align: justify;
  position: relative;
  z-index: 1;
}

.story-text p + p { margin-top: 14px; }

.story-subtitle {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-cyan);
  letter-spacing: 0.4px;
  line-height: 1.45;
  margin: 20px 0 10px;
}

.story-highlight {
  color: var(--accent-secondary);
  font-weight: 500;
}

/* ── Trayectoria (timeline CV) ── */
.timeline-card {
  padding: 22px 20px 18px;
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.timeline-card .timeline-tint {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(ellipse 70% 80% at 100% 0%, rgba(34,211,238,0.12), transparent 60%),
    radial-gradient(ellipse 50% 60% at 0% 100%, rgba(99,102,241,0.1), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  z-index: 1;
}

.timeline-item {
  position: relative;
  padding: 0 0 20px 26px;
}

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

.timeline-item::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 10px;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--accent-primary), rgba(99,102,241,0.15));
  border-radius: 2px;
}

.timeline-item:last-child::before {
  bottom: auto;
  height: 12px;
}

.timeline-dot {
  position: absolute;
  left: 0;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-cyan));
  box-shadow: 0 0 12px rgba(99,102,241,0.55);
  border: 2px solid rgba(255,255,255,0.25);
}

.timeline-item.is-current .timeline-dot {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-pink));
  box-shadow: 0 0 16px rgba(34,211,238,0.6);
  animation: timelinePulse 2.5s ease-in-out infinite;
}

@keyframes timelinePulse {
  0%, 100% { box-shadow: 0 0 12px rgba(34,211,238,0.5); transform: scale(1); }
  50%      { box-shadow: 0 0 22px rgba(34,211,238,0.85); transform: scale(1.12); }
}

.timeline-entry {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-subtle);
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.timeline-item:hover .timeline-entry {
  border-color: var(--border-medium);
  background: rgba(255,255,255,0.05);
}

.timeline-year {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-cyan);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.timeline-desc {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-secondary);
}

.timeline-desc strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* ── Social Icons Row ── */
.social-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 18px 0 4px;
  flex-wrap: wrap;
}

.social-icon-btn {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: var(--text-primary);
  text-decoration: none;
  transition: transform var(--transition-spring), box-shadow var(--transition-base);
}

.social-icon-btn svg,
.nav-icon svg,
.nav-icon img { display: block; position: relative; z-index: 1; }

.social-icon-btn:hover {
  transform: translateY(-5px) scale(1.06);
}

.social-youtube:hover   { box-shadow: var(--shadow-glass), 0 6px 24px rgba(255, 0, 0, 0.45); }
.social-twitter:hover   { box-shadow: var(--shadow-glass), 0 6px 24px rgba(29, 161, 242, 0.45); }
.social-instagram:hover { box-shadow: var(--shadow-glass), 0 6px 24px rgba(225, 48, 108, 0.45); }
.social-facebook:hover  { box-shadow: var(--shadow-glass), 0 6px 24px rgba(24, 119, 242, 0.45); }
.social-tiktok:hover    { box-shadow: var(--shadow-glass), 0 6px 24px rgba(0, 242, 234, 0.4); }
.social-kick:hover      { box-shadow: var(--shadow-glass), 0 6px 24px rgba(34, 197, 94, 0.45); }

/* ── Nav Links (liquid glass rows) ── */
.nav-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  overflow: hidden;
  transition: transform var(--transition-spring), box-shadow var(--transition-base), background var(--transition-base);
}

.nav-link.full { grid-column: span 2; }

/* Sheen sweep on hover */
.nav-link .sheen {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,0.14), transparent);
  transform: skewX(-18deg);
  transition: left 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
  z-index: 1;
}

.nav-link:hover .sheen { left: 160%; }

.nav-link:hover {
  background: var(--glass-bg-hover);
  transform: translateY(-3px);
  box-shadow:
    var(--shadow-glass),
    0 10px 30px rgba(99, 102, 241, 0.28),
    inset 0 1px 0 rgba(255,255,255,0.2);
}

.nav-link.featured {
  background:
    linear-gradient(135deg, rgba(99, 102, 241, 0.22), rgba(34, 211, 238, 0.08)),
    var(--glass-bg);
}

.nav-link.featured:hover {
  box-shadow:
    var(--shadow-glass),
    0 12px 36px rgba(99, 102, 241, 0.45),
    inset 0 1px 0 rgba(255,255,255,0.22);
}

.nav-icon {
  width: 22px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-spring);
}

.nav-link:hover .nav-icon { transform: scale(1.18) rotate(-4deg); }

.nav-text {
  position: relative;
  z-index: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-arrow {
  margin-left: auto;
  font-size: 13px;
  color: var(--text-muted);
  transition: transform var(--transition-fast), color var(--transition-fast);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.nav-link:hover .nav-arrow {
  transform: translateX(4px);
  color: var(--accent-secondary);
}

/* ── Tab Switch (Inicio / Sobre Mi) ── */
.tab-switch-wrap {
  display: flex;
  justify-content: center;
  padding: 18px 0 6px;
}

.tab-switch {
  position: relative;
  display: flex;
  gap: 3px;
  padding: 4px;
  border-radius: var(--radius-full);
  width: min(100%, 176px);
  margin: 0 auto;
}

.tab-indicator {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc((100% - 11px) / 2);
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, rgba(99,102,241,0.9), rgba(129,140,248,0.7));
  box-shadow:
    0 3px 14px rgba(99,102,241,0.4),
    inset 0 1px 0 rgba(255,255,255,0.35);
  transition: transform var(--transition-spring);
  z-index: 1;
}

.tab-switch[data-active="about"] .tab-indicator {
  transform: translateX(calc(100% + 3px));
}

.tab-btn {
  position: relative;
  z-index: 2;
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2px;
  padding: 8px 10px;
  min-width: 0;
  border-radius: var(--radius-full);
  white-space: nowrap;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.tab-btn.active { color: #fff; }
.tab-btn:hover:not(.active) { color: var(--text-secondary); }

/* ── Tab Panels ── */
.tab-panel[hidden] { display: none; }

.tab-panel > .section:first-child { margin-top: 10px; }

@keyframes panelIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.tab-panel.anim {
  animation: panelIn 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Footer ── */
.footer {
  position: relative;
  z-index: 1;
  margin-top: 36px;
  padding: 20px;
  text-align: center;
}

.footer-content {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 16px 20px;
  border-radius: var(--radius-lg);
}

.footer-copyright {
  font-size: 12px;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 8px;
  position: relative;
  z-index: 1;
}

.footer-link {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-fast), text-shadow var(--transition-fast);
}

.footer-link:hover {
  color: var(--accent-secondary);
  text-shadow: 0 0 14px rgba(129, 140, 248, 0.7);
}

/* ── Contact FAB (Telegram) ── */
.contact-fab {
  position: fixed;
  bottom: 18px;
  right: 18px;
  z-index: 150;
  display: flex;
  align-items: center;
  padding: 14px;
  border-radius: var(--radius-full);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  box-shadow:
    var(--shadow-glass),
    0 0 24px rgba(34, 158, 217, 0.25),
    inset 0 1px 0 rgba(255,255,255,0.16);
  transition: transform var(--transition-spring), box-shadow var(--transition-base);
  animation: fabIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.9s backwards;
}

@keyframes fabIn {
  from { opacity: 0; transform: translateY(18px) scale(0.85); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.contact-fab svg {
  display: block;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 0 8px rgba(34, 158, 217, 0.5));
}

.contact-fab-label {
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  opacity: 0;
  margin-left: 0;
  position: relative;
  z-index: 1;
  transition: max-width var(--transition-base), opacity var(--transition-base), margin-left var(--transition-base);
}

.contact-fab:hover .contact-fab-label,
.contact-fab:focus-visible .contact-fab-label {
  max-width: 90px;
  opacity: 1;
  margin-left: 10px;
}

.contact-fab:hover,
.contact-fab:focus-visible {
  transform: translateY(-4px);
  box-shadow:
    var(--shadow-glass),
    0 8px 30px rgba(34, 158, 217, 0.5),
    inset 0 1px 0 rgba(255,255,255,0.22);
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .main { padding: 36px 14px 40px; }

  .hero-card {
    gap: 14px;
    padding: 22px 16px;
  }

  .hero-name { font-size: 17px; flex-wrap: wrap; }
  .hero-bio { font-size: 12px; margin-bottom: 8px; }
  .hero-tags { gap: 4px; flex-wrap: wrap; }
  .hero-tag { font-size: 9px; padding: 3px 7px; }
  .hero-avatar { width: 80px; height: 80px; }

  .nav-link { padding: 12px 14px; }
  .stats-row { gap: 8px; }
  .stat-value { font-size: 17px; }

  .story-card { padding: 20px 16px; }
  .story-lead { font-size: 14px; }
  .story-subtitle { font-size: 12px; margin: 16px 0 8px; }
  .story-text { font-size: 13px; line-height: 1.72; }

  .timeline-card { padding: 18px 14px 14px; }
  .timeline-item { padding-left: 22px; }
  .timeline-entry { padding: 10px 12px; }
  .timeline-year { font-size: 11px; }
  .timeline-desc { font-size: 12px; }

  .tab-btn { font-size: 11.5px; padding: 8px 8px; min-width: 0; flex: 1; }
  .tab-switch { width: min(100%, 168px); }

  .contact-fab {
    bottom: 14px;
    right: 14px;
    padding: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0s !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; }
  .timeline-item.is-current .timeline-dot { transform: none; }
}

/* ── LIVE Widget (glass) ── */
.stream-live-widget {
  position: fixed;
  top: 70px;
  right: 16px;
  z-index: 120;
  max-width: min(280px, calc(100vw - 32px));
  font-size: 13px;
  pointer-events: none;
}

.stream-live-widget * { pointer-events: auto; }

.stream-live-panel {
  position: relative;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02)),
    linear-gradient(145deg, rgba(16, 20, 32, 0.62), rgba(6, 8, 14, 0.55));
  border-radius: 18px;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  isolation: isolate;
  animation: stream-widget-in 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Anillo especular liquid glass (igual que .lg) */
.stream-live-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg,
    rgba(255,255,255,0.45) 0%,
    rgba(255,255,255,0.1) 30%,
    rgba(255,255,255,0.03) 55%,
    rgba(255,255,255,0.22) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
  z-index: 2;
}

/* Destello que barre el panel al aparecer */
.stream-live-panel::after {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,0.12), transparent);
  transform: skewX(-18deg);
  animation: streamSheen 3.2s cubic-bezier(0.22, 1, 0.36, 1) 0.5s infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes streamSheen {
  0%       { left: -120%; }
  45%, 100% { left: 160%; }
}

@keyframes stream-widget-in {
  from { opacity: 0; transform: translateY(-10px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes livepulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(0.92); }
}

.stream-live-panel-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.stream-cam {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(224, 34, 34, 0.4), rgba(224, 34, 34, 0.15));
  border: 2px solid rgba(224, 34, 34, 0.6);
  color: #ff6b6b;
  box-shadow: 0 0 15px rgba(224, 34, 34, 0.3);
}

.stream-cam svg {
  width: 22px;
  height: 22px;
  display: block;
}

.stream-live-panel-head .stream-live-titles {
  flex: 1;
  min-width: 0;
}

.stream-live-panel-head strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
}

.stream-live-panel-head small {
  display: block;
  font-size: 11px;
  color: #9aa8bc;
  margin-top: 2px;
}

.stream-rec-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #e02222;
  flex-shrink: 0;
  box-shadow: 0 0 20px #e02222, 0 0 40px #e02222;
  animation: livepulse 1.4s ease infinite;
}

.stream-live-single {
  display: block;
  text-decoration: none;
  color: #fff;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s;
}

.stream-live-single .stream-live-panel-head { border-bottom: none; }

.stream-live-single:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.stream-live-single.stream-live--twitch  { border-left: 4px solid #B794F6; }
.stream-live-single.stream-live--kick    { border-left: 4px solid #53FC18; }
.stream-live-single.stream-live--youtube { border-left: 4px solid #FF0000; }

.stream-live-single .stream-live-titles small { color: #b4bccc; }

@media (max-width: 640px) {
  .stream-live-widget {
    top: 66px;
    right: 10px;
    max-width: calc(100vw - 20px);
  }

  .stream-live-panel-head { padding: 10px 12px; }

  .stream-cam {
    width: 36px;
    height: 36px;
  }
}

/* ── LIVE Embed (reproductor del directo incrustado) ── */
#live-embed-section { display: none; }

#live-embed-section.is-live {
  display: block;
  animation: revealUp 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.live-embed-card {
  border-radius: var(--radius-xl);
  overflow: hidden;
  padding: 14px;
}

.live-embed-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 4px 12px;
}

.live-embed-head .stream-rec-dot {
  background: #53FC18;
  box-shadow: 0 0 20px #53FC18, 0 0 40px #53FC18;
}

.live-embed-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-primary);
}

.live-embed-platform {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  color: #53FC18;
  text-decoration: none;
  border: 1px solid rgba(83, 252, 24, 0.35);
  background: rgba(83, 252, 24, 0.08);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

.live-embed-platform:hover {
  background: rgba(83, 252, 24, 0.18);
  box-shadow: 0 0 18px rgba(83, 252, 24, 0.3);
}

.live-embed-player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(83, 252, 24, 0.25);
  box-shadow: 0 0 30px rgba(83, 252, 24, 0.12);
}

.live-embed-player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}