/* ══════════════════════════════════════════
   Izan Sola Mirallas
   Francisco Sola Hidalgo 2026
   styles.css
   ══════════════════════════════════════════ */

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

:root {
  --cream: #F5F0E8;
  --ink: #0E0C09;
  --gold: #C9A84C;
  --gold-light: #E8D4A0;
  --dark: #1A1710;
  --mid: #2E2B24;
  --muted: #6B6558;
  --accent: #8B1A1A;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--ink);
  color: var(--cream);
  overflow-x: hidden;
}

.ratings-pending .hero-stats [data-rating-value] {
  opacity: 0;
}

.hero-stats [data-rating-value] {
  transition: opacity 0.18s ease;
}

/* ══ NAV ══ */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 4rem;
  background: linear-gradient(to bottom, rgba(14,12,9,0.95), transparent);
  transition: background 0.3s;
}

nav.scrolled {
  background: rgba(14,12,9,0.97);
  border-bottom: 1px solid rgba(201,168,76,0.15);
}

.nav-logo {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 0.55rem;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.55rem;
  letter-spacing: 0.15em;
  color: var(--gold);
  --nav-logo-cycle: 10.4s;
}

.nav-logo-name {
  line-height: 1;
}

.nav-logo-impact-letter {
  position: relative;
  display: inline-block;
  animation: logoAImpact var(--nav-logo-cycle) linear infinite;
}

.nav-logo-impact-letter::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0.62rem;
  width: 1.16rem;
  height: 1rem;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle, rgba(245,240,232,0.95) 0 15%, transparent 22%) 14% 68% / 0.2rem 0.2rem no-repeat,
    radial-gradient(circle, rgba(232,212,160,0.98) 0 18%, transparent 24%) 28% 42% / 0.3rem 0.3rem no-repeat,
    radial-gradient(circle, rgba(232,212,160,0.82) 0 15%, transparent 22%) 42% 18% / 0.19rem 0.19rem no-repeat,
    radial-gradient(circle, rgba(245,240,232,0.88) 0 16%, transparent 22%) 58% 34% / 0.22rem 0.22rem no-repeat,
    radial-gradient(circle, rgba(181,31,43,0.78) 0 16%, transparent 23%) 72% 56% / 0.24rem 0.24rem no-repeat,
    radial-gradient(circle, rgba(232,212,160,0.72) 0 15%, transparent 23%) 86% 28% / 0.18rem 0.18rem no-repeat;
  filter: drop-shadow(0 0 9px rgba(201,168,76,0.52));
  transform: translate(-50%, 0) scale(0.64);
  animation: logoAImpactSparks var(--nav-logo-cycle) linear infinite;
}

.nav-logo-pieces {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 0.16rem;
  margin-left: 0.22rem;
  color: currentColor;
  font-family: Georgia, 'Times New Roman', serif;
  line-height: 1;
  letter-spacing: 0;
}

.nav-piece {
  position: relative;
  z-index: 1;
  display: inline-block;
  color: currentColor;
  font-size: 1.62rem;
  line-height: 0.85;
  text-shadow: 0 2px 10px rgba(201,168,76,0.18), 0 8px 16px rgba(0,0,0,0.18);
}

.nav-piece-pawn {
  font-size: 1.9rem;
  transform: translate(0.08rem, 0.16rem);
  transform-origin: 50% 58%;
  will-change: color, transform;
  animation: pawnPromote var(--nav-logo-cycle) ease-in-out infinite;
}

.nav-piece-queen-shadow {
  position: absolute;
  left: 2.82rem;
  bottom: -0.34rem;
  z-index: 0;
  width: 1.88rem;
  height: 3.38rem;
  color: var(--gold);
  opacity: 0.68;
  transform: scale(1.06);
  transform-origin: 52% 100%;
  filter: drop-shadow(0 0 18px rgba(201,168,76,0.46)) drop-shadow(0 8px 18px rgba(0,0,0,0.28));
  will-change: transform, opacity;
  animation: queenRise var(--nav-logo-cycle) ease-in-out infinite;
}

.nav-piece-queen-shadow svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.nav-piece-queen-shadow .queen-heart {
  fill: #B51F2B;
  opacity: 0.95;
  transform-box: fill-box;
  transform-origin: center;
  animation: queenHeartBeat var(--nav-logo-cycle) ease-in-out infinite;
}

.nav-piece-queen-shadow .queen-heart-wave {
  fill: none;
  stroke: #B51F2B;
  stroke-width: 1.7;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: queenHeartWave var(--nav-logo-cycle) ease-out infinite;
}

.nav-piece-king {
  width: 2.85rem;
  height: 1.9rem;
  margin-left: 0;
  transform: translate(0.04rem, 0.04rem);
  transform-origin: center;
}

.nav-piece-king::after {
  content: '';
  position: absolute;
  left: -1.22rem;
  bottom: -0.24rem;
  z-index: 18;
  width: 1.42rem;
  height: 1.2rem;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle, rgba(232,212,160,0.98) 0 18%, transparent 23%) 28% 74% / 0.34rem 0.34rem no-repeat,
    radial-gradient(circle, rgba(232,212,160,0.86) 0 15%, transparent 22%) 36% 48% / 0.22rem 0.22rem no-repeat,
    radial-gradient(circle, rgba(181,31,43,0.9) 0 16%, transparent 22%) 48% 66% / 0.27rem 0.27rem no-repeat,
    radial-gradient(circle, rgba(245,240,232,0.88) 0 15%, transparent 21%) 58% 54% / 0.23rem 0.23rem no-repeat,
    radial-gradient(circle, rgba(232,212,160,0.78) 0 16%, transparent 23%) 70% 70% / 0.25rem 0.25rem no-repeat,
    radial-gradient(circle, rgba(245,240,232,0.78) 0 15%, transparent 22%) 78% 36% / 0.2rem 0.2rem no-repeat,
    radial-gradient(circle, rgba(232,212,160,0.82) 0 14%, transparent 22%) 18% 50% / 0.18rem 0.18rem no-repeat,
    radial-gradient(circle, rgba(245,240,232,0.72) 0 15%, transparent 22%) 10% 28% / 0.16rem 0.16rem no-repeat,
    radial-gradient(circle, rgba(232,212,160,0.7) 0 15%, transparent 22%) 88% 62% / 0.18rem 0.18rem no-repeat,
    radial-gradient(circle, rgba(181,31,43,0.62) 0 14%, transparent 22%) 62% 18% / 0.16rem 0.16rem no-repeat;
  filter: drop-shadow(0 0 9px rgba(201,168,76,0.58));
  transform: translate(0, 0) rotate(-20deg) scale(0.54);
  transform-origin: 10% 88%;
  animation: kingImpactSparks var(--nav-logo-cycle) linear infinite;
}

.king-cross-fallen {
  position: absolute;
  left: -1.5rem;
  bottom: -0.52rem;
  z-index: 24;
  width: 0.98rem;
  height: 0.64rem;
  color: #B9B5AA;
  pointer-events: none;
  opacity: 0;
  filter: drop-shadow(0 0 8px rgba(201,168,76,0.44));
  transform: translate(0, 0) rotate(-8deg) scale(0.72);
  animation: kingCrossShards var(--nav-logo-cycle) linear infinite;
}

.king-cross-fallen::before,
.king-cross-fallen::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  display: block;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0.22rem rgba(201,168,76,0.28);
}

.king-cross-fallen::before {
  width: 0.84rem;
  height: 0.13rem;
  transform: translate(-50%, -50%) rotate(8deg);
}

.king-cross-fallen::after {
  width: 0.13rem;
  height: 0.58rem;
  transform: translate(-50%, -50%) rotate(-14deg);
}

.nav-piece-king svg {
  position: absolute;
  z-index: 3;
  left: 0.47rem;
  top: -0.47rem;
  display: block;
  width: 1.9rem;
  height: 2.84rem;
  fill: #B9B5AA;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.26));
  transform: rotate(-108deg);
  transform-origin: 22% 92%;
  will-change: transform;
  animation: kingFallBounce var(--nav-logo-cycle) linear infinite;
}

.nav-piece-king .king-cross {
  transform-box: fill-box;
  transform-origin: center;
}

.nav-piece-king .king-cross-v {
  animation: kingCrossBreak var(--nav-logo-cycle) linear infinite;
}

.nav-piece-king .king-cross-h {
  animation: kingCrossBarBreak var(--nav-logo-cycle) linear infinite;
}

@keyframes kingFallBounce {
  0%, 38% {
    transform: translate(-0.56rem, -0.2rem) rotate(0deg);
  }
  45% {
    transform: translate(-0.53rem, -0.19rem) rotate(-6deg);
  }
  53% {
    transform: translate(-0.36rem, -0.12rem) rotate(-34deg);
  }
  60% {
    transform: translate(-0.12rem, -0.03rem) rotate(-78deg);
  }
  66% {
    transform: translate(0.03rem, 0.05rem) rotate(-119deg);
  }
  70% {
    transform: translate(0.02rem, -0.06rem) rotate(-101deg);
  }
  74% {
    transform: translate(0.01rem, 0.02rem) rotate(-112deg);
  }
  80%, 96% {
    transform: translate(0, 0) rotate(-108deg);
  }
  99.2%, 100% {
    transform: translate(-0.56rem, -0.2rem) rotate(0deg);
  }
}

@keyframes logoAImpact {
  0%, 60.5%, 75%, 100% {
    color: currentColor;
    transform: translateY(0) rotate(0deg);
    text-shadow: none;
  }
  62% {
    color: var(--gold-light);
    transform: translate(-0.015rem, -0.03rem) rotate(1deg);
    text-shadow:
      0 -0.14rem 9px rgba(245,240,232,0.4),
      0 0 7px rgba(201,168,76,0.26);
  }
  63% {
    color: var(--gold-light);
    transform: translate(-0.035rem, -0.08rem) rotate(2.5deg);
    text-shadow:
      0 -0.2rem 12px rgba(245,240,232,0.58),
      0 0 10px rgba(201,168,76,0.36);
  }
  64% {
    color: var(--gold-light);
    transform: translate(-0.055rem, -0.12rem) rotate(4deg);
    text-shadow:
      0 -0.26rem 16px rgba(245,240,232,0.72),
      0 0 15px rgba(201,168,76,0.52);
  }
  66% {
    color: var(--gold-light);
    transform: translate(0.05rem, 0.13rem) rotate(-7deg);
    text-shadow:
      0 0 17px rgba(201,168,76,0.62),
      0 0 3px rgba(245,240,232,0.8);
  }
  68% {
    transform: translate(-0.025rem, -0.045rem) rotate(3deg);
    text-shadow:
      0 0 10px rgba(201,168,76,0.38),
      0 0 2px rgba(245,240,232,0.56);
  }
  69% {
    transform: translate(0.012rem, 0.02rem) rotate(-1.5deg);
    text-shadow: 0 0 7px rgba(201,168,76,0.28);
  }
}

@keyframes logoAImpactSparks {
  0%, 60.5%, 78%, 100% {
    opacity: 0;
    transform: translate(-50%, 0.02rem) scale(0.58);
  }
  62% {
    opacity: 0.32;
    transform: translate(-44%, -0.05rem) scale(0.76);
  }
  63% {
    opacity: 0.58;
    transform: translate(-45%, -0.12rem) scale(0.96);
  }
  64% {
    opacity: 0.9;
    transform: translate(-47%, -0.2rem) scale(1.18);
  }
  66% {
    opacity: 1;
    transform: translate(-55%, -0.02rem) scale(1.36);
  }
  70% {
    opacity: 0.28;
    transform: translate(-72%, -0.42rem) scale(1.84);
  }
}

@keyframes kingImpactSparks {
  0%, 63%, 77%, 100% {
    opacity: 0;
    transform: translate(0, 0) rotate(-20deg) scale(0.54);
  }
  66% {
    opacity: 1;
    transform: translate(-0.06rem, -0.1rem) rotate(-24deg) scale(1.18);
  }
  70% {
    opacity: 0.42;
    transform: translate(-0.22rem, -0.36rem) rotate(-38deg) scale(1.68);
  }
  73% {
    opacity: 0.12;
    transform: translate(-0.36rem, -0.54rem) rotate(-45deg) scale(1.92);
  }
}

@keyframes kingCrossShards {
  0%, 64% {
    opacity: 0;
    transform: translate(0.42rem, -0.2rem) rotate(-18deg) scale(0.72);
  }
  66% {
    opacity: 1;
    transform: translate(0.02rem, -0.08rem) rotate(-18deg) scale(1.08);
  }
  70% {
    opacity: 1;
    transform: translate(-0.46rem, 0.18rem) rotate(-12deg) scale(1.04);
  }
  76%, 96% {
    opacity: 0.9;
    transform: translate(-0.72rem, 0.36rem) rotate(-8deg) scale(1);
  }
  99.2%, 100% {
    opacity: 0;
    transform: translate(-0.72rem, 0.36rem) rotate(-8deg) scale(0.92);
  }
}

@keyframes kingCrossBreak {
  0%, 63% {
    opacity: 1;
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
  66% {
    opacity: 0.18;
    transform: translate(-4px, 3px) rotate(-22deg) scale(0.62);
  }
  70%, 99.4% {
    opacity: 0;
    transform: translate(-6px, 5px) rotate(-34deg) scale(0.3);
  }
  99.8%, 100% {
    opacity: 1;
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
}

@keyframes kingCrossBarBreak {
  0%, 63% {
    opacity: 1;
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
  66% {
    opacity: 0.16;
    transform: translate(-5px, -2px) rotate(26deg) scaleX(0.46);
  }
  70%, 99.4% {
    opacity: 0;
    transform: translate(-8px, 2px) rotate(42deg) scaleX(0.22);
  }
  99.8%, 100% {
    opacity: 1;
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
}

@keyframes queenRise {
  0%, 8% {
    opacity: 0.08;
    transform: scale(0.78);
  }
  22% {
    opacity: 0.92;
    transform: translateX(0.02rem) scale(1.2);
  }
  34%, 90% {
    opacity: 0.72;
    transform: scale(1.06);
  }
  100% {
    opacity: 0.08;
    transform: scale(0.78);
  }
}

@keyframes queenHeartBeat {
  0%, 18% {
    opacity: 0;
    transform: scale(0.72);
  }
  26%, 44%, 62%, 80% {
    opacity: 0.98;
    transform: scale(1);
  }
  35%, 53%, 71% {
    opacity: 1;
    transform: scale(1.22);
  }
  92%, 100% {
    opacity: 0;
    transform: scale(0.72);
  }
}

@keyframes queenHeartWave {
  0%, 24%, 46%, 68%, 90%, 100% {
    opacity: 0;
    transform: scale(1);
    stroke-width: 1.7;
  }
  34%, 56%, 78% {
    opacity: 0.48;
    transform: scale(1.05);
  }
  42%, 64%, 86% {
    opacity: 0;
    transform: scale(2.05);
    stroke-width: 0.45;
  }
}

@keyframes pawnPromote {
  0%, 12% {
    opacity: 1;
    color: currentColor;
    transform: translate(0.08rem, 0.16rem) scale(1);
  }
  22% {
    opacity: 1;
    color: #B51F2B;
    text-shadow: 0 0 10px rgba(181,31,43,0.36);
    transform: translate(0.02rem, -0.18rem) scale(0.72);
  }
  34%, 84% {
    opacity: 0;
    color: #B51F2B;
    text-shadow: 0 0 12px rgba(181,31,43,0.5);
    transform: translate(0.06rem, -1.08rem) scale(0.16);
  }
  88% {
    opacity: 0;
    color: currentColor;
    transform: translate(0.08rem, 0.16rem) scale(0.7);
  }
  100% {
    opacity: 1;
    color: currentColor;
    transform: translate(0.08rem, 0.16rem) scale(1);
  }
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cream);
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 0.2s, color 0.2s;
}

.nav-links a:hover { opacity: 1; color: var(--gold); }

/* Burger menu (solo móvil) */
.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.nav-burger span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--gold);
  transition: transform 0.3s, opacity 0.3s;
}

.nav-burger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ══ HERO WRAPPER (limita el ancho en pantallas >3000px) ══ */
.hero-outer {
  background: var(--ink);
  display: flex;
  justify-content: center;
  position: relative;
}

/* Patrón de fondo cubre todo el ancho, incluso fuera del hero */
.hero-outer::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.08;
  background-image: repeating-conic-gradient(var(--cream) 0% 25%, transparent 0% 50%);
  background-size: 100px 100px;
  pointer-events: none;
}

/* ══ HERO ══ */
.hero {
  height: auto;
  min-height: 560px;
  width: 100%;
  max-width: 1400px;   /* la foto no crece más allá de esto */
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  position: relative;
  overflow: hidden;
}



.hero-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 5rem 4rem 4rem;
  position: relative;
  z-index: 2;
}

.hero-eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.hero-eyebrow::before {
  content: '';
  display: block;
  width: 40px;
  height: 1px;
  background: var(--gold);
}

.hero-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(3.5rem, 7vw, 7rem);
  font-weight: 300;
  line-height: 0.9;
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
}

.hero-name em {
  font-style: italic;
  color: var(--gold-light);
}

.hero-desc {
  font-size: 0.9rem;
  line-height: 1.8;
  color: rgba(245,240,232,0.65);
  max-width: 380px;
  margin-bottom: 3rem;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
  border: 1px solid rgba(201,168,76,0.4);
  padding: 1rem 2rem;
  transition: background 0.3s, border-color 0.3s;
  width: fit-content;
}

.hero-cta:hover { background: rgba(201,168,76,0.08); border-color: var(--gold); }
.hero-cta::after { content: '↓'; font-size: 1rem; }

.hero-right {
  position: relative;
  overflow: hidden;
  /* El ratio exacto de la foto (1080×1342) fuerza la altura correcta */
  aspect-ratio: 1080 / 1342;
  border-radius: 10px;
}

/* Foto completa sin recorte */
.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: grayscale(20%) contrast(1.05);
  display: block;
  background: transparent;
  border-radius: 10px;
  box-shadow: 0 14px 34px rgba(0,0,0,0.16);
}

.photo-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(160deg, #1A1710 0%, #2E2B24 50%, #1A1710 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 3rem;
  position: relative;
}

.photo-placeholder svg {
  width: 65%;
  max-width: 320px;
  opacity: 0.85;
}

.chess-silhouette { fill: var(--cream); }

.hero-right::after {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 120px;
  background: linear-gradient(to right, var(--ink), transparent);
  z-index: 3;
  border-radius: 10px 0 0 10px;
}

.hero-right::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 200px;
  background: linear-gradient(to top, var(--ink), transparent);
  z-index: 3;
  border-radius: 0 0 10px 10px;
}

.hero-stats {
  position: absolute;
  bottom: 5rem;
  right: 3rem;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.stat-item { text-align: right; }

.stat-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 3rem;
  color: var(--gold);
  line-height: 1;
}

.stat-label {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.2rem;
}

.stat-fada .stat-label {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
}

.andalusia-flag {
  display: inline-block;
  width: 2.15em;
  height: 1.6em;
  border: 0.5px solid rgba(245,240,232,0.35);
  border-radius: 5px;
  background: linear-gradient(
    to bottom,
    #007a3d 0 33.33%,
    #fff 33.33% 66.66%,
    #007a3d 66.66% 100%
  );
  box-shadow: 0 0 0 1px rgba(0,0,0,0.16);
  flex: 0 0 auto;
}

/* ══ SECTION COMÚN ══ */
section { padding: 7rem 4rem; }

.section-label {
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(201,168,76,0.25);
}

.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 300;
  line-height: 1;
  margin-bottom: 1rem;
}

/* ══ PALMARÉS ══ */
#palmares { background: var(--dark); }

.palmares-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5px;
  margin-top: 4rem;
  background: rgba(201,168,76,0.12);
}

.palmares-card {
  background: var(--dark);
  padding: 2.5rem 2rem;
  position: relative;
  overflow: hidden;
  transition: background 0.3s;
  cursor: default;
}

.palmares-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width 0.4s ease;
}

.palmares-card:hover { background: rgba(201,168,76,0.04); }
.palmares-card:hover::before { width: 100%; }

.palmares-medal {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.medal-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
}

.gold .medal-dot  { background: #FFD700; }
.silver .medal-dot { background: #C0C0C0; }
.bronze .medal-dot { background: #CD7F32; }
.gold   { color: #FFD700; }
.silver { color: #C0C0C0; }
.bronze { color: #CD7F32; }

.palmares-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 1.3;
  color: var(--cream);
  margin-bottom: 0.5rem;
}

.palmares-event {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.palmares-year {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.5rem;
  color: rgba(201,168,76,0.2);
  position: absolute;
  bottom: 1.2rem;
  right: 1.5rem;
  line-height: 1;
}

/* ══ TIMELINE ══ */
#timeline { background: var(--ink); }

.timeline-intro {
  font-size: 0.95rem;
  color: rgba(245,240,232,0.55);
  max-width: 480px;
  line-height: 1.8;
  margin-bottom: 5rem;
}

.timeline {
  position: relative;
  max-width: 900px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 150px;
  top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(201,168,76,0.4) 5%,
    rgba(201,168,76,0.4) 95%,
    transparent
  );
}

.tl-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0 5rem;
  margin-bottom: 3.5rem;
  position: relative;
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.tl-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.tl-year {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.2rem;
  color: var(--gold);
  line-height: 1;
  text-align: right;
  padding-top: 0.2rem;
  position: relative;
}

.tl-year::before {
  content: '';
  position: absolute;
  top: 0.82rem;
  right: -2.45rem;
  width: 2.25rem;
  height: 2px;
  background: linear-gradient(to right, rgba(201,168,76,0.16), rgba(201,168,76,0.95));
  box-shadow: 0 0 16px rgba(201,168,76,0.22);
  transform-origin: left center;
}

.tl-year::after {
  content: '';
  position: absolute;
  right: -3rem;
  top: 0.55rem;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid var(--ink);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.25);
}

.tl-content {
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(201,168,76,0.08);
}

.tl-item:last-child .tl-content { border-bottom: none; }

/* ── Badge con efecto ping tipo mapa ── */
.tl-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.3rem 0.8rem 0.3rem 0.55rem;
  border: 1px solid;
  margin-bottom: 0.8rem;
}

/* Contenedor del punto ping */
.tl-badge-dot {
  position: relative;
  width: 8px;
  height: 8px;
  flex-shrink: 0;
}

/* Punto central sólido */
.tl-badge-dot::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  z-index: 1;
}

/* Onda que se expande (ping) */
.tl-badge-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  opacity: 0;
  animation: ping 2s ease-out infinite;
}

@keyframes ping {
  0%   { transform: scale(0.6); opacity: 0.8; }
  80%  { transform: scale(2.2); opacity: 0; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* Colores por categoría */
.tl-badge.nacional {
  border-color: rgba(139,26,26,0.6);
  color: #D98080;
}
.tl-badge.nacional .tl-badge-dot::before { background: #D98080; }
.tl-badge.nacional .tl-badge-dot::after  { border: 1.5px solid #D98080; }

.tl-badge.internacional {
  border-color: rgba(201,168,76,0.5);
  color: var(--gold);
}
.tl-badge.internacional .tl-badge-dot::before { background: var(--gold); }
.tl-badge.internacional .tl-badge-dot::after  { border: 1.5px solid var(--gold); }

.tl-badge.olimpiada {
  border-color: rgba(100,149,237,0.5);
  color: #8ABAFF;
}
.tl-badge.olimpiada .tl-badge-dot::before { background: #8ABAFF; }
.tl-badge.olimpiada .tl-badge-dot::after  { border: 1.5px solid #8ABAFF; }

/* Retrasar el ping en cada item para que no pulsen todos a la vez */
.tl-item:nth-child(2)  .tl-badge-dot::after { animation-delay: 0.3s; }
.tl-item:nth-child(3)  .tl-badge-dot::after { animation-delay: 0.6s; }
.tl-item:nth-child(4)  .tl-badge-dot::after { animation-delay: 0.9s; }
.tl-item:nth-child(5)  .tl-badge-dot::after { animation-delay: 1.2s; }
.tl-item:nth-child(6)  .tl-badge-dot::after { animation-delay: 1.5s; }
.tl-item:nth-child(7)  .tl-badge-dot::after { animation-delay: 0.2s; }
.tl-item:nth-child(8)  .tl-badge-dot::after { animation-delay: 0.7s; }
.tl-item:nth-child(9)  .tl-badge-dot::after { animation-delay: 1.1s; }
.tl-item:nth-child(10) .tl-badge-dot::after { animation-delay: 0.4s; }
.tl-item:nth-child(11) .tl-badge-dot::after { animation-delay: 0.8s; }

.tl-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--cream);
  margin-bottom: 0.4rem;
  line-height: 1.2;
}

.tl-details {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.7;
}

.tl-details a {
  color: var(--gold-light);
  text-decoration: none;
  border-bottom: 1px solid rgba(232,212,160,0.35);
}

.tl-details a:hover {
  color: var(--gold);
  border-bottom-color: rgba(201,168,76,0.7);
}

.tl-result {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.8rem;
  font-size: 0.75rem;
  color: var(--gold-light);
}

.tl-result::before {
  content: '♟';
  font-size: 0.9rem;
}

/* ══ PERFORMANCE ══ */
#performance {
  background:
    linear-gradient(135deg, rgba(20,18,14,0.96), rgba(14,12,9,1)),
    var(--dark);
}

.performance-intro {
  max-width: 640px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin: 1.2rem 0 2.5rem;
}

.performance-panel,
.rating-chart {
  position: relative;
  width: 100%;
  overflow: hidden;
  border: 1px solid rgba(201,168,76,0.18);
  background:
    linear-gradient(90deg, rgba(201,168,76,0.05), transparent 52%),
    rgba(245,240,232,0.03);
  padding: clamp(1.4rem, 2.5vw, 2.6rem) clamp(1rem, 2vw, 1.8rem) 1.15rem;
}

.performance-panel::after,
.rating-chart::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(45deg, rgba(245,240,232,0.035) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(245,240,232,0.035) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(245,240,232,0.035) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(245,240,232,0.035) 75%);
  background-position: 0 0, 0 1.2rem, 1.2rem -1.2rem, -1.2rem 0;
  background-size: 2.4rem 2.4rem;
  mask-image: linear-gradient(to right, transparent, #000 18%, transparent 92%);
  opacity: 0.8;
}

.performance-panel > *,
.rating-chart > * {
  position: relative;
  z-index: 1;
}

.performance-chart {
  position: relative;
  height: clamp(330px, 42vw, 520px);
}

.performance-chart svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.perf-grid {
  stroke: rgba(245,240,232,0.12);
  stroke-width: 1;
}

.perf-axis {
  fill: rgba(245,240,232,0.5);
  font-family: 'Inter', sans-serif;
  font-size: 0.64rem;
  letter-spacing: 0;
}

.perf-area {
  fill: rgba(201,168,76,0.1);
  stroke: none;
}

.perf-line {
  fill: none;
  stroke: url(#performance-line);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: url(#performance-glow);
}

.perf-trend {
  fill: none;
  stroke: rgba(245,240,232,0.78);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 8 9;
}

.perf-point circle {
  fill: var(--dark);
  stroke: var(--gold-light);
  stroke-width: 3;
  cursor: pointer;
  transition: r 0.18s ease, stroke 0.18s ease, filter 0.18s ease;
}

.perf-point:hover circle,
.perf-point:focus circle,
.perf-point.is-active circle {
  r: 7;
  stroke: var(--cream);
  filter: drop-shadow(0 0 10px rgba(232,212,160,0.75));
}

.perf-point text {
  fill: var(--cream);
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.12rem;
  letter-spacing: 0.04em;
  text-anchor: middle;
}

.perf-peak circle {
  stroke: var(--gold);
  filter: drop-shadow(0 0 8px rgba(201,168,76,0.7));
}

.performance-tooltip {
  position: absolute;
  z-index: 5;
  min-width: 190px;
  max-width: min(270px, calc(100vw - 3rem));
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(232,212,160,0.35);
  background: rgba(14,12,9,0.94);
  box-shadow: 0 18px 44px rgba(0,0,0,0.34), 0 0 24px rgba(201,168,76,0.14);
  color: var(--cream);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, calc(-100% - 1rem)) scale(0.96);
  transform-origin: 50% 100%;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.performance-tooltip.is-visible {
  opacity: 1;
  transform: translate(-50%, calc(-100% - 1.25rem)) scale(1);
}

.performance-tooltip.is-below {
  transform: translate(-50%, 1rem) scale(0.96);
  transform-origin: 50% 0;
}

.performance-tooltip.is-visible.is-below {
  transform: translate(-50%, 1.25rem) scale(1);
}

.performance-tooltip span {
  display: block;
  color: var(--gold-light);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.performance-tooltip strong {
  display: block;
  margin-top: 0.32rem;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2rem;
  line-height: 1;
  color: var(--cream);
}

.performance-tooltip p {
  margin-top: 0.42rem;
  color: rgba(245,240,232,0.72);
  font-size: 0.78rem;
  line-height: 1.4;
}

.performance-labels {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.75rem 0 0;
  color: rgba(245,240,232,0.62);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.performance-legend {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: flex-end;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  color: rgba(245,240,232,0.66);
  font-size: 0.66rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.performance-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.legend-line {
  width: 2.4rem;
  height: 2px;
  background: var(--gold-light);
  box-shadow: 0 0 10px rgba(201,168,76,0.45);
}

.legend-line.trend {
  background: repeating-linear-gradient(
    to right,
    rgba(245,240,232,0.82) 0 8px,
    transparent 8px 15px
  );
  box-shadow: none;
}

.performance-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
  gap: 2px;
  margin-top: 2.2rem;
  background: rgba(201,168,76,0.1);
}

.performance-card {
  background: rgba(14,12,9,0.96);
  padding: 1.25rem 1rem;
  min-width: 0;
}

.performance-card span {
  display: block;
  color: var(--muted);
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.7rem;
}

.performance-card strong {
  display: block;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.25rem;
  line-height: 1;
  color: var(--gold);
}

.performance-card p {
  margin-top: 0.45rem;
  color: rgba(245,240,232,0.68);
  font-size: 0.72rem;
  line-height: 1.45;
}

.performance-card a {
  display: inline-flex;
  align-items: center;
  margin-top: 0.85rem;
  color: var(--gold-light);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.performance-card a:hover {
  color: var(--cream);
}

.performance-card.is-peak strong {
  color: var(--gold-light);
  text-shadow: 0 0 16px rgba(201,168,76,0.36);
}

.performance-note {
  max-width: 760px;
  color: rgba(245,240,232,0.55);
  font-size: 0.78rem;
  line-height: 1.7;
  margin-top: 1.5rem;
}

/* ══ RATING ══ */
#rating { background: var(--dark); }

.rating-display {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  margin: 3rem 0 5rem;
  flex-wrap: wrap;
}

.rating-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(5rem, 12vw, 10rem);
  color: var(--gold);
  line-height: 1;
}

.rating-suffix {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-style: italic;
  color: var(--muted);
}

.rating-bar-wrap {
  max-width: 700px;
  margin-bottom: 1rem;
}

.rating-bar-label {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.rating-bar-label span {
  flex: 1;
  min-width: 0;
}

.rating-bar-label span:not(:first-child):not(:last-child) {
  text-align: center;
}

.rating-bar-label span:last-child {
  text-align: right;
}

.rating-bar {
  height: 3px;
  background: rgba(201,168,76,0.15);
  position: relative;
}

.rating-bar-fill {
  height: 100%;
  background: linear-gradient(to right, var(--gold), var(--gold-light));
  width: 0;
  transition: width 1.2s cubic-bezier(0.25, 1, 0.5, 1);
}

.rating-chart {
  margin-top: 3rem;
}

.rating-history {
  max-width: none;
}

.rating-chart-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.rating-chart-head h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--cream);
}

.rating-chart-head span {
  color: var(--muted);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.rating-history-plot {
  min-height: clamp(330px, 42vw, 520px);
}

.rating-history-plot svg {
  display: block;
  width: 100%;
  height: clamp(330px, 42vw, 520px);
  overflow: visible;
}

.rating-grid {
  stroke: rgba(245,240,232,0.12);
  stroke-width: 1;
}

.rating-axis {
  fill: rgba(245,240,232,0.52);
  font-family: 'Inter', sans-serif;
  font-size: 0.64rem;
  letter-spacing: 0;
}

.rating-history-line {
  fill: none;
  stroke-width: 3.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
  transition: stroke-dashoffset 1.25s cubic-bezier(0.25, 1, 0.5, 1);
}

.rating-chart.is-visible .rating-history-line {
  stroke-dashoffset: 0;
}

.rating-history-line.standard,
.rating-endpoint.standard circle,
.rating-history-legend .standard {
  stroke: #7FD7C4;
  background: #7FD7C4;
}

.rating-history-line.rapid,
.rating-endpoint.rapid circle,
.rating-history-legend .rapid {
  stroke: var(--gold);
  background: var(--gold);
}

.rating-history-line.blitz,
.rating-endpoint.blitz circle,
.rating-history-legend .blitz {
  stroke: #E85D65;
  background: #E85D65;
}

.rating-endpoint circle {
  fill: var(--dark);
  stroke-width: 3;
}

.rating-endpoint text {
  fill: var(--cream);
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  text-anchor: middle;
}

.rating-history-labels,
.rating-history-legend {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: rgba(245,240,232,0.62);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.rating-history-legend {
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.rating-history-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.rating-history-legend i {
  width: 1.5rem;
  height: 3px;
  display: inline-block;
}

.rating-categories {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  margin-top: 4rem;
  background: rgba(201,168,76,0.1);
}

.rating-cat {
  background: var(--dark);
  padding: 2rem 1.5rem;
}

.cat-label {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.cat-value {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.8rem;
  color: var(--gold);
  line-height: 1;
}

.cat-sub {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.3rem;
}

/* ══ FOOTER ══ */
footer {
  padding: 3rem 4rem;
  border-top: 1px solid rgba(201,168,76,0.12);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.2rem;
  letter-spacing: 0.15em;
  color: var(--gold);
}

.footer-copy {
  font-size: 0.72rem;
  color: var(--muted);
}

/* ══ ANIMACIONES ══ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-in {
  animation: fadeUp 0.8s ease forwards;
}

/* ════════════════════════════════════════
   RESPONSIVE — TABLET  (max 1024px)
   ════════════════════════════════════════ */
@media (max-width: 1024px) {
  nav { padding: 1.2rem 2rem; }

  section { padding: 5rem 2rem; }

  .hero-left { padding: 0 2.5rem 5rem; }

  .palmares-grid { grid-template-columns: repeat(2, 1fr); }

  .timeline::before { left: 100px; }
  .tl-item { grid-template-columns: 100px 1fr; gap: 0 2rem; }
  .tl-year::after { right: -2rem; }
  .tl-year { font-size: 1.8rem; }

  .performance-list { grid-template-columns: repeat(auto-fit, minmax(138px, 1fr)); }

  .rating-categories { grid-template-columns: repeat(2, 1fr); }

  .hero-stats { right: 1.5rem; bottom: 3rem; gap: 1.5rem; }
  .stat-num { font-size: 2.2rem; }
}

/* ════════════════════════════════════════
   RESPONSIVE — MÓVIL  (max 768px)
   ════════════════════════════════════════ */
@media (max-width: 768px) {

  /* Nav */
  nav {
    padding: 1.2rem 1.5rem;
    background: rgba(14,12,9,0.97);
  }

  .nav-burger { display: flex; }

  .nav-links {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 100vh;
    background: rgba(14,12,9,0.99);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    transform: translateX(100%);
    transition: transform 0.35s ease;
    z-index: 99;
  }

  .nav-links.open { transform: translateX(0); }

  .nav-links a {
    font-size: 1.1rem;
    letter-spacing: 0.2em;
    opacity: 1;
  }

  /* Hero: apilado en columna, altura automática */
  .hero {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    min-height: auto;
    height: auto;
    background: transparent; /* deja ver el patrón del hero-outer */
  }

  /* El lado derecho (foto) va primero, sin fondo opaco */
  .hero-right {
    order: -1;
    height: auto;
    min-height: unset;
    max-height: unset;
    aspect-ratio: unset;     /* anula el ratio de escritorio */
    display: flex;
    flex-direction: column;
    align-items: center;
    background: transparent; /* patrón del outer visible detrás */
    padding: 3.8rem 1.5rem 1.5rem;
    overflow: hidden;
  }

  /* Imagen completa sin recorte en móvil */
  .hero-photo {
    position: relative;  /* sale del absolute para que empuje el contenedor */
    inset: auto;
    width: 100%;
    max-width: 320px;    /* limita el ancho en pantallas más anchas */
    height: auto;        /* altura automática = sin recorte */
    object-fit: contain;
    object-position: center center;
    border-radius: 4px;
    filter: grayscale(20%) contrast(1.05);
    -webkit-mask-image: none;
    mask-image: none;
  }

  /* Stats debajo de la foto, en fila centrada */
  .hero-stats {
    position: relative;
    inset: auto;
    flex-direction: row;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.2rem;
    width: 100%;
  }

  .stat-item { text-align: center; }
  .stat-num  { font-size: 1.5rem; }
  .stat-label { font-size: 0.55rem; }
  .stat-fada .stat-label { justify-content: center; }

  /* Quitar degradados que no tienen sentido sin recorte */
  .hero-right::after,
  .hero-right::before {
    display: none;
  }

  /* Placeholder SVG también se adapta */
  .photo-placeholder {
    width: 100%;
    height: auto;
    min-height: 220px;
    padding: 2rem 1.5rem;
  }

  .hero-left {
    padding: 2.5rem 1.5rem 4rem;
    justify-content: flex-start;
  }

  .hero-eyebrow { margin-bottom: 1rem; font-size: 0.65rem; }

  .hero-name { font-size: clamp(3rem, 13vw, 4.5rem); margin-bottom: 1.5rem; }

  .hero-desc { font-size: 0.85rem; margin-bottom: 2rem; max-width: 100%; }

  /* Sections */
  section { padding: 4rem 1.5rem; }

  /* Palmarés: 1 columna */
  .palmares-grid { grid-template-columns: 1fr; }

  .palmares-card { padding: 1.8rem 1.5rem; }

  .palmares-year { font-size: 1.8rem; bottom: 1rem; right: 1rem; }

  /* ── Timeline móvil: rediseño robusto ── */

  /* Línea vertical fija a 14px del borde izquierdo del contenedor */
  .timeline {
    padding-left: 28px;   /* espacio para la línea + punto */
  }

  .timeline::before {
    display: block;
    left: 0;
    width: 1px;
  }

  /* Cada item: bloque simple sin grid */
  .tl-item {
    display: block;
    grid-template-columns: unset;
    padding-left: 1.5rem;
    margin-bottom: 2.5rem;
    position: relative;
  }

  /* Año encima del contenido */
  .tl-year {
    display: block;
    text-align: left;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    padding-top: 0;
  }

  /* Punto sobre la línea: fijado al borde izquierdo del timeline */
  .tl-year::after {
    right: auto;
    left: calc(-1.5rem - 14px);   /* empuja hasta la línea */
    top: 0.35rem;
    width: 9px;
    height: 9px;
  }

  .tl-name { font-size: 1.25rem; }

  .tl-details { font-size: 0.78rem; }

  .tl-result  { font-size: 0.72rem; }

  /* Performance */
  .performance-intro {
    font-size: 0.86rem;
  }

  .performance-panel,
  .rating-chart {
    padding: 1rem 0.8rem 0.9rem;
  }

  .performance-chart,
  .rating-history-plot,
  .rating-history-plot svg {
    height: 260px;
    min-height: 260px;
  }

  .performance-labels,
  .rating-history-labels {
    font-size: 0.58rem;
    letter-spacing: 0.05em;
  }

  .performance-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .performance-card {
    padding: 1.1rem 0.9rem;
  }

  /* Rating: labels abreviados en móvil */
  .rating-bar-wrap {
    max-width: 100%;
  }

  .rating-bar-label {
    font-size: 0.62rem;
    letter-spacing: 0.06em;
  }

  .rating-categories { grid-template-columns: 1fr; gap: 2px; }

  .cat-value { font-size: 2.2rem; }

  /* Footer apilado */
  footer {
    padding: 2rem 1.5rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

/* ════════════════════════════════════════
   RESPONSIVE — MÓVIL PEQUEÑO  (max 400px)
   ════════════════════════════════════════ */
@media (max-width: 400px) {
  .hero-right { height: auto; }

  .hero-stats { flex-direction: row; align-items: stretch; gap: 0.5rem; }

  .stat-num { font-size: 1.4rem; }

  .hero-name { font-size: clamp(2.6rem, 14vw, 3.5rem); }

  .palmares-title { font-size: 1.2rem; }

  .performance-list { grid-template-columns: 1fr; }

  .performance-labels span:nth-child(even) { display: none; }
}

/* Refinamientos finales */
.hero-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-link {
  color: rgba(245,240,232,0.7);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid rgba(201,168,76,0.35);
  padding-bottom: 0.25rem;
  transition: color 0.2s, border-color 0.2s;
}

.hero-link:hover {
  color: var(--gold);
  border-color: var(--gold);
}

.hero-cta::after { content: '↓'; }

.hero-stats {
  background: rgba(14,12,9,0.64);
  border: 1px solid rgba(201,168,76,0.18);
  backdrop-filter: blur(10px);
  padding: 1rem;
  gap: 1rem;
}

@media (min-width: 1441px) {
  .hero-stats {
    bottom: 0.75rem;
  }
}

.stat-item {
  min-width: 92px;
}

.top .medal-dot { background: #7FD7C4; }
.top { color: #7FD7C4; }

#timeline {
  background:
    radial-gradient(circle at top right, rgba(201,168,76,0.08), transparent 34rem),
    var(--ink);
}

.timeline {
  max-width: 980px;
  margin: 0 auto;
}

.timeline::before {
  left: 172px;
  width: 2px;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(201,168,76,0.75) 8%,
    rgba(201,168,76,0.25) 92%,
    transparent
  );
}

.tl-item {
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 0 4rem;
  margin-bottom: 2rem;
}

.tl-content {
  position: relative;
  --tl-square: 2.15rem;
  --tl-board-width: calc(var(--tl-square) * 8);
  overflow: hidden;
  isolation: isolate;
  padding: 1.5rem;
  border: 1px solid rgba(201,168,76,0.12);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(245,240,232,0.045), rgba(201,168,76,0.025));
  box-shadow: 0 18px 42px rgba(0,0,0,0.18);
}

.tl-content > :not(.tl-board) {
  position: relative;
  z-index: 1;
}

.tl-content::before {
  content: '';
  position: absolute;
  left: -0.55rem;
  top: 0.35rem;
  width: 1rem;
  height: 1rem;
  background: var(--ink);
  border-left: 1px solid rgba(201,168,76,0.75);
  border-bottom: 1px solid rgba(201,168,76,0.75);
  transform: rotate(45deg);
}

.tl-content::after {
  content: '';
  position: absolute;
  inset: 0 0 0 auto;
  z-index: 0;
  width: var(--tl-board-width);
  pointer-events: none;
  opacity: 0.34;
  background:
    linear-gradient(to left, rgba(8,17,15,0.05), rgba(8,17,15,0.84) 82%),
    conic-gradient(
      from 90deg,
      rgba(232,212,160,0.46) 0 25%,
      rgba(245,240,232,0.08) 0 50%,
      rgba(232,212,160,0.46) 0 75%,
      rgba(245,240,232,0.08) 0
    );
  background-size: 100% 100%, calc(var(--tl-square) * 2) calc(var(--tl-square) * 2);
  background-position: 0 0, 0 0;
  -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,0.95), transparent);
  mask-image: linear-gradient(to left, rgba(0,0,0,0.95), transparent);
}

.tl-board {
  position: absolute;
  inset: 0 0 0 auto;
  z-index: 0;
  width: var(--tl-board-width);
  height: 100%;
  pointer-events: none;
  opacity: 0.66;
  -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,0.98), transparent);
  mask-image: linear-gradient(to left, rgba(0,0,0,0.98), transparent);
}

.tl-piece {
  position: absolute;
  display: grid;
  place-items: center;
  left: calc(var(--file) * var(--tl-square));
  top: calc(var(--rank) * var(--tl-square));
  width: var(--tl-square);
  height: var(--tl-square);
  color: rgba(232,212,160,0.82);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: calc(var(--tl-square) * 0.8);
  line-height: 1;
  text-align: center;
  text-shadow: 0 2px 14px rgba(0,0,0,0.64);
}

.tl-piece.dark {
  color: rgba(245,240,232,0.62);
}

.tl-item:last-child .tl-content {
  border-bottom: 1px solid rgba(201,168,76,0.12);
}

.tl-year::after {
  right: -2.45rem;
  width: 13px;
  height: 13px;
  background: var(--ink);
  border: 3px solid var(--gold);
  box-shadow: 0 0 0 6px rgba(201,168,76,0.14), 0 0 24px rgba(201,168,76,0.18);
}

.tl-item.visible .tl-year::before {
  animation: branchGrow 0.55s ease both;
}

.tl-item.visible .tl-year::after {
  animation: timelineRadar 1.15s ease-out 0.2s both;
}

@keyframes branchGrow {
  from { transform: scaleX(0); opacity: 0; }
  to { transform: scaleX(1); opacity: 1; }
}

@keyframes timelineRadar {
  0% {
    box-shadow: 0 0 0 0 rgba(201,168,76,0.45), 0 0 0 0 rgba(201,168,76,0.22);
  }
  62% {
    box-shadow: 0 0 0 12px rgba(201,168,76,0), 0 0 24px rgba(201,168,76,0.25);
  }
  100% {
    box-shadow: 0 0 0 6px rgba(201,168,76,0.14), 0 0 24px rgba(201,168,76,0.18);
  }
}

.tl-badge {
  border-radius: 999px;
  background: rgba(14,12,9,0.45);
}

.tl-badge.regional {
  border-color: rgba(127,215,196,0.55);
  color: #7FD7C4;
}
.tl-badge.regional .tl-badge-dot::before { background: #7FD7C4; }
.tl-badge.regional .tl-badge-dot::after { border: 1.5px solid #7FD7C4; }

.tl-badge.fide {
  border-color: rgba(232,212,160,0.55);
  color: var(--gold-light);
}
.tl-badge.fide .tl-badge-dot::before { background: var(--gold-light); }
.tl-badge.fide .tl-badge-dot::after { border: 1.5px solid var(--gold-light); }

.tl-badge.provincial {
  border-color: rgba(138,186,255,0.55);
  color: #8ABAFF;
}
.tl-badge.provincial .tl-badge-dot::before { background: #8ABAFF; }
.tl-badge.provincial .tl-badge-dot::after { border: 1.5px solid #8ABAFF; }

.tl-badge.inicio {
  border-color: rgba(245,240,232,0.34);
  color: rgba(245,240,232,0.76);
}
.tl-badge.inicio .tl-badge-dot::before { background: rgba(245,240,232,0.76); }
.tl-badge.inicio .tl-badge-dot::after { border: 1.5px solid rgba(245,240,232,0.76); }

.tl-result::before {
  content: '♟';
}

.tl-photo {
  margin-top: 1.2rem;
  border: 1px solid rgba(201,168,76,0.14);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(14,12,9,0.35);
}

.tl-photo-cutout {
  border: none;
  background: transparent;
  overflow: visible;
}

.tl-photo img {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  object-position: center 42%;
  filter: saturate(0.92) contrast(1.03);
}

.tl-photo-cutout img {
  max-height: none;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 18px 26px rgba(0,0,0,0.34));
}

.tl-photo figcaption {
  padding: 0.8rem 1rem;
  font-size: 0.72rem;
  line-height: 1.6;
  color: rgba(245,240,232,0.58);
  border-top: 1px solid rgba(201,168,76,0.1);
}

.tl-photo-cutout figcaption {
  margin-top: 0.5rem;
  padding: 0;
  border-top: none;
}

.tl-gap {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0 4rem;
  align-items: center;
  min-height: 4.5rem;
  margin: -0.2rem 0 1.8rem;
  position: relative;
}

.tl-gap::before {
  content: '';
  justify-self: end;
  width: 1px;
  height: 100%;
  transform: translateX(2.45rem);
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(201,168,76,0.22),
    transparent
  );
}

.tl-gap span {
  grid-column: 2;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(201,168,76,0.72);
  box-shadow: 0 0 0 5px rgba(201,168,76,0.08);
}

.tl-gap span:nth-child(2) { opacity: 0.55; }
.tl-gap span:nth-child(3) { opacity: 0.32; }

.tl-gap {
  row-gap: 0.55rem;
}

.rating-cat {
  min-width: 0;
  border: 1px solid transparent;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}

.rating-cat.primary,
.rating-cat:hover {
  border-color: rgba(201,168,76,0.35);
  background: rgba(201,168,76,0.055);
}

.rating-source {
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.7;
}

.rating-source a {
  color: var(--gold-light);
  text-decoration: none;
  border-bottom: 1px solid rgba(232,212,160,0.35);
}

@media (max-width: 1180px) {
  .hero {
    max-width: none;
  }

  .hero-left {
    padding-right: 2rem;
  }
}

@media (max-width: 1024px) {
  .timeline::before { left: 122px; }
  .tl-item { gap: 0 3rem; }
  .tl-year::after { right: -2.05rem; }
  .tl-year::before {
    right: -2.05rem;
    width: 1.85rem;
  }

  .tl-gap {
    gap: 0 3rem;
  }

  .tl-gap::before {
    transform: translateX(2.05rem);
  }
}

@media (min-width: 769px) and (max-width: 1000px) {
  .timeline::before {
    left: 112px;
  }

  .tl-item {
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 0 3.25rem;
  }

  .tl-year {
    font-size: 1.65rem;
    text-align: right;
  }

  .tl-year::after {
    right: -2.18rem;
  }

  .tl-year::before {
    right: -2.18rem;
    width: 1.98rem;
  }

  .tl-gap {
    grid-template-columns: 86px 1fr;
    gap: 0 3.25rem;
  }

  .tl-gap::before {
    transform: translateX(2.18rem);
  }
}

@media (max-width: 768px) {
  body.menu-open {
    overflow: hidden;
  }

  .nav-links {
    padding: 6rem 1.5rem 3rem;
  }

  .hero-left {
    text-align: left;
  }

  .hero-actions {
    align-items: stretch;
  }

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

  .hero-link {
    width: 100%;
    text-align: center;
    padding: 0.75rem 0;
  }

  .hero-stats {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 0.75rem;
  }

  .stat-item {
    min-width: 0;
  }

  .timeline {
    padding-left: 22px;
  }

  .timeline::before {
    left: 6px;
    width: 2px;
  }

  .tl-item {
    padding-left: 1.25rem;
  }

  .tl-year::after {
    left: -1.62rem;
    top: 0.2rem;
  }

  .tl-year::before {
    left: -1.48rem;
    right: auto;
    top: 0.55rem;
    width: 1.28rem;
    background: linear-gradient(to right, rgba(201,168,76,0.88), rgba(201,168,76,0.18));
  }

  .tl-content {
    --tl-square: 1.2rem;
    --tl-board-width: calc(var(--tl-square) * 8);
    padding: 1.2rem;
  }

  .tl-content::before {
    display: none;
  }

  .tl-content::after {
    opacity: 0.2;
    background-size: 100% 100%, calc(var(--tl-square) * 2) calc(var(--tl-square) * 2);
  }

  .tl-board {
    opacity: 0.44;
  }

  .tl-gap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    min-height: 3.8rem;
    margin: -0.1rem 0 1.7rem;
    padding-left: 1.25rem;
  }

  .tl-gap::before {
    position: absolute;
    left: 6px;
    top: 0;
    width: 2px;
    height: 100%;
    transform: none;
  }

  .tl-gap span {
    grid-column: auto;
    width: 7px;
    height: 7px;
  }

  .tl-photo img {
    max-height: 260px;
  }

  .tl-photo-cutout img {
    max-height: none;
  }

  .rating-bar-label {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.4rem;
    line-height: 1.4;
    margin-bottom: 0.85rem;
    text-align: left;
    font-size: 0.68rem;
  }

  .rating-bar-label span {
    border-left: 1px solid rgba(201,168,76,0.28);
    padding-left: 0.55rem;
  }

  .rating-bar-label span:not(:first-child):not(:last-child),
  .rating-bar-label span:last-child {
    text-align: left;
  }

  .rating-bar {
    height: 5px;
    border-radius: 999px;
    overflow: hidden;
  }

  .rating-chart-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.35rem;
  }
}

@media (max-width: 480px) {
  nav {
    padding: 1rem;
  }

  .nav-logo {
    gap: 0.42rem;
    font-size: 1.32rem;
  }

  .nav-logo-pieces {
    gap: 0.12rem;
  }

  .nav-piece {
    font-size: 1.38rem;
  }

  .nav-piece-pawn {
    font-size: 1.58rem;
  }

  .nav-piece-queen-shadow {
    left: 2.36rem;
    bottom: -0.28rem;
    width: 1.52rem;
    height: 2.78rem;
    opacity: 0.58;
    transform: scale(1.04);
  }

  .nav-piece-king {
    width: 2.4rem;
    height: 1.6rem;
    margin-left: 0;
    transform: translate(0.04rem, 0.04rem);
  }

  .nav-piece-king::after {
    left: -0.92rem;
    bottom: -0.18rem;
    width: 1rem;
    height: 0.86rem;
  }

  .king-cross-fallen {
    left: -1.1rem;
    bottom: -0.3rem;
    width: 0.84rem;
    height: 0.54rem;
  }

  .king-cross-fallen::before {
    width: 0.72rem;
    height: 0.11rem;
  }

  .king-cross-fallen::after {
    width: 0.11rem;
    height: 0.5rem;
  }

  .nav-piece-king svg {
    left: 0.4rem;
    top: -0.39rem;
    width: 1.6rem;
    height: 2.38rem;
  }

  .nav-logo:hover .nav-piece-king {
    animation: none;
  }

  section {
    padding: 3.5rem 1rem;
  }

  .hero-right {
    padding: 1rem 1rem 1rem;
  }

  .hero-photo {
    max-width: 260px;
  }

  .hero-left {
    padding: 2rem 1rem 3.5rem;
  }

  .hero-name {
    line-height: 0.95;
  }

  .hero-stats {
    gap: 0.35rem;
  }

  .stat-num {
    font-size: 1.25rem;
  }

  .stat-label {
    letter-spacing: 0.08em;
  }

  .palmares-card,
  .rating-cat,
  .tl-content {
    padding: 1.15rem;
  }

  .tl-photo img {
    max-height: 220px;
  }

  .tl-photo-cutout img {
    max-height: none;
  }

  .tl-photo figcaption {
    padding: 0.7rem 0.85rem;
  }

  .rating-display {
    display: block;
    margin: 2rem 0 2.5rem;
    gap: 0.75rem;
  }

  .rating-suffix {
    display: block;
    font-size: 1.1rem;
    margin-top: 0.25rem;
  }

  .rating-bar-label {
    grid-template-columns: 1fr;
    font-size: 0.68rem;
    gap: 0.4rem;
  }
}

@media (min-width: 769px) and (max-width: 1440px) {
  .hero {
    align-items: center;
  }

  .hero-left {
    padding: 6rem 2rem 3rem;
  }

  .hero-right {
    align-self: center;
    width: min(100%, 520px);
    max-height: 720px;
  }

  .hero-photo {
    object-fit: contain;
  }

  .hero-actions {
    width: min(100%, 380px);
  }

  .hero-stats {
    position: static;
    inset: auto;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: min(100%, 460px);
    margin-top: 1.4rem;
    padding: 0.8rem;
  }

  .stat-item {
    min-width: 0;
    text-align: center;
  }

  .stat-num {
    font-size: 1.8rem;
  }

  .stat-label {
    font-size: 0.55rem;
    letter-spacing: 0.08em;
  }
}
