/* ============================================
   ViajeEspacial.com — Stylesheet base
   Estética: cosmos profundo + cyberpunk editorial
   ============================================ */

:root {
  /* Paleta */
  --bg-deep: #030712;
  --bg-void: #050816;
  --bg-panel: #0a0e1f;
  --bg-panel-2: #111827;
  --border-soft: rgba(148, 163, 184, 0.12);
  --border-med: rgba(148, 163, 184, 0.22);

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --accent-cyan: #22d3ee;
  --accent-cyan-soft: rgba(34, 211, 238, 0.15);
  --accent-violet: #a78bfa;
  --accent-violet-soft: rgba(167, 139, 250, 0.18);
  --accent-flare: #fb923c;
  --accent-flare-soft: rgba(251, 146, 60, 0.18);
  --accent-rose: #fb7185;

  --grad-cosmic: linear-gradient(135deg, #22d3ee 0%, #a78bfa 50%, #fb7185 100%);
  --grad-deep: linear-gradient(180deg, #030712 0%, #0a0e1f 100%);
  --grad-aurora: linear-gradient(90deg, #06b6d4 0%, #8b5cf6 100%);

  /* Tipografía */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Layout */
  --container: 1200px;
  --container-narrow: 760px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  /* Spacing */
  --section-pad: 120px 24px;
  --section-pad-sm: 80px 24px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--text-primary);
}

/* ============================================
   STARFIELD background fijo (toda la web)
   ============================================ */
.starfield {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(167, 139, 250, 0.18) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(34, 211, 238, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(251, 146, 60, 0.05) 0%, transparent 70%),
    var(--bg-deep);
}

.starfield::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 20% 30%, white, transparent),
    radial-gradient(1px 1px at 60% 70%, white, transparent),
    radial-gradient(1px 1px at 50% 50%, white, transparent),
    radial-gradient(2px 2px at 90% 10%, rgba(167, 139, 250, 0.6), transparent),
    radial-gradient(1px 1px at 33% 80%, white, transparent),
    radial-gradient(1px 1px at 80% 25%, rgba(34, 211, 238, 0.7), transparent),
    radial-gradient(1px 1px at 15% 65%, white, transparent),
    radial-gradient(1px 1px at 70% 90%, white, transparent);
  background-size: 200px 200px, 300px 300px, 250px 250px, 400px 400px, 350px 350px, 500px 500px, 450px 450px, 380px 380px;
  background-repeat: repeat;
  opacity: 0.6;
  animation: starDrift 200s linear infinite;
}

@keyframes starDrift {
  from { transform: translateY(0); }
  to { transform: translateY(-200px); }
}

/* ============================================
   NAVBAR
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 18px 24px;
  background: rgba(3, 7, 18, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-soft);
  transition: all 0.3s ease;
}

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}

.nav-inner > nav {
  justify-self: center;
}

.nav-inner > .nav-toggle {
  justify-self: end;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.12rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  text-decoration: none;
}

.nav-logo:hover {
  color: var(--text-primary);
}

.nav-logo:hover .nav-logo-icon {
  filter: drop-shadow(0 0 14px rgba(167, 139, 250, 0.6));
  transform: rotate(8deg) scale(1.05);
}

.nav-logo-icon {
  width: 38px;
  height: 38px;
  background: url('/assets/img/logo-mark.svg') center/contain no-repeat;
  display: inline-block;
  flex-shrink: 0;
  /* oculta el emoji que sigue en el HTML por compatibilidad */
  font-size: 0;
  color: transparent;
  filter: drop-shadow(0 0 8px rgba(167, 139, 250, 0.35));
  transition: filter 0.3s ease, transform 0.3s ease;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 500;
  position: relative;
  padding: 6px 0;
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--accent-cyan);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after {
  width: 100%;
}

.nav-links a[aria-current="page"] {
  color: var(--text-primary);
}

.nav-cta {
  padding: 10px 20px;
  background: var(--grad-cosmic);
  color: #030712;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(34, 211, 238, 0.35);
  color: #030712;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-med);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.2rem;
}

/* ============================================
   HERO con shader background
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 80px;
  overflow: hidden;
}

.hero-shader {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.55;
  mix-blend-mode: screen;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 100%, rgba(3, 7, 18, 0.95) 0%, transparent 70%),
    radial-gradient(ellipse at 50% 0%, rgba(3, 7, 18, 0.6) 0%, transparent 70%);
  z-index: 1;
  pointer-events: none;
}

.hero-shapes {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.shape {
  position: absolute;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(2px);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04), transparent);
  box-shadow: 0 8px 32px rgba(255, 255, 255, 0.05);
  animation: float 14s ease-in-out infinite;
}

.shape-1 {
  width: 420px;
  height: 110px;
  top: 18%;
  left: -6%;
  transform: rotate(12deg);
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.18), transparent);
  animation-delay: 0s;
}

.shape-2 {
  width: 360px;
  height: 95px;
  top: 70%;
  right: -4%;
  transform: rotate(-15deg);
  background: linear-gradient(90deg, rgba(167, 139, 250, 0.18), transparent);
  animation-delay: 1s;
}

.shape-3 {
  width: 220px;
  height: 65px;
  bottom: 12%;
  left: 8%;
  transform: rotate(-8deg);
  background: linear-gradient(90deg, rgba(251, 146, 60, 0.16), transparent);
  animation-delay: 2s;
}

.shape-4 {
  width: 150px;
  height: 50px;
  top: 12%;
  right: 18%;
  transform: rotate(20deg);
  background: linear-gradient(90deg, rgba(251, 113, 133, 0.16), transparent);
  animation-delay: 1.5s;
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); }
  50% { transform: translateY(15px) rotate(var(--r, 0deg)); }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 920px;
  text-align: center;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid var(--border-med);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.82rem;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  margin-bottom: 32px;
  font-family: var(--font-mono);
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-cyan);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.3); }
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6.5vw, 5.6rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin-bottom: 28px;
}

.hero h1 .gradient {
  background: var(--grad-cosmic);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  font-size: clamp(1rem, 1.3vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  background: var(--grad-cosmic);
  color: #030712;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: var(--font-body);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(34, 211, 238, 0.4);
  color: #030712;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  background: transparent;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 1rem;
  border-radius: 999px;
  border: 1px solid var(--border-med);
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
}

.btn-secondary:hover {
  border-color: var(--accent-cyan);
  background: var(--accent-cyan-soft);
  color: var(--text-primary);
  transform: translateY(-2px);
}

/* ============================================
   SECCIONES generales
   ============================================ */
section {
  padding: var(--section-pad);
  position: relative;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
}

.container-narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
}

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 64px;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent-cyan);
  margin-bottom: 16px;
}

h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

h3 {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 1.8vw, 1.55rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 12px;
  line-height: 1.25;
}

h4 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.section-sub {
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.65;
}

/* ============================================
   GRID DE VALOR (3 cols)
   ============================================ */
.value-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.value-card {
  padding: 32px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.value-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.value-card:hover {
  border-color: var(--border-med);
  transform: translateY(-4px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
}

.value-card:hover::before {
  opacity: 1;
}

.value-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--accent-cyan-soft);
  border: 1px solid rgba(34, 211, 238, 0.32);
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  color: var(--accent-cyan);
  transition: all 0.3s ease;
}

.value-icon svg {
  width: 26px;
  height: 26px;
  display: block;
}

.value-card:hover .value-icon {
  background: rgba(34, 211, 238, 0.22);
  transform: scale(1.05) rotate(-3deg);
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.25);
}

.value-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

/* ============================================
   MASONRY (artículos)
   ============================================ */
.masonry {
  column-count: 3;
  column-gap: 24px;
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: 24px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  position: relative;
  transition: transform 0.3s ease, border-color 0.3s ease;
  display: block;
  color: inherit;
}

.masonry-item:hover {
  transform: translateY(-6px);
  border-color: var(--accent-cyan);
  color: inherit;
}

.masonry-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s ease;
}

.masonry-item:hover img {
  transform: scale(1.04);
}

.masonry-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-cyan);
  margin-bottom: 10px;
}

.masonry-body {
  padding: 22px;
}

.masonry-body h3 {
  font-size: 1.18rem;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.masonry-body p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* ============================================
   ARTÍCULO / PILAR (lectura)
   ============================================ */
.article-hero {
  padding: 140px 24px 60px;
  position: relative;
  text-align: center;
}

.article-hero .container-narrow {
  position: relative;
  z-index: 1;
}

.article-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 20px;
}

.article-hero h1 .gradient {
  background: var(--grad-cosmic);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.article-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.article-meta .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-dim);
}

.article-lead {
  font-size: 1.2rem;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto;
}

.article-cover {
  max-width: var(--container-narrow);
  margin: 0 auto 60px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-soft);
}

.article-cover img {
  width: 100%;
  height: auto;
  display: block;
}

.article-body {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 24px 80px;
  font-size: 1.07rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.article-body p {
  margin-bottom: 24px;
}

.article-body h2 {
  font-size: clamp(1.5rem, 2.8vw, 2.1rem);
  margin-top: 56px;
  margin-bottom: 18px;
  color: var(--text-primary);
}

.article-body h3 {
  font-size: 1.35rem;
  margin-top: 36px;
  margin-bottom: 14px;
  color: var(--text-primary);
}

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

.article-body a {
  color: var(--accent-cyan);
  border-bottom: 1px solid var(--accent-cyan-soft);
  transition: all 0.2s ease;
}

.article-body a:hover {
  color: var(--text-primary);
  border-bottom-color: var(--accent-cyan);
}

.article-body ul, .article-body ol {
  margin: 0 0 24px 0;
  padding-left: 24px;
}

.article-body li {
  margin-bottom: 10px;
}

.article-body blockquote {
  border-left: 3px solid var(--accent-violet);
  padding: 8px 0 8px 24px;
  margin: 32px 0;
  font-style: italic;
  color: var(--text-secondary);
  background: linear-gradient(90deg, var(--accent-violet-soft), transparent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding-right: 16px;
  padding-top: 16px;
  padding-bottom: 16px;
}

.article-body blockquote p:last-child {
  margin-bottom: 0;
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 32px 0;
  font-size: 0.95rem;
  background: var(--bg-panel);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-soft);
}

.article-body th {
  background: var(--bg-panel-2);
  padding: 14px 16px;
  text-align: left;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-med);
  font-size: 0.95rem;
}

.article-body td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-secondary);
}

.article-body tr:last-child td {
  border-bottom: none;
}

.article-body tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* TOC (tabla de contenidos) */
.toc {
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 40px;
}

.toc-title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent-cyan);
  margin-bottom: 14px;
}

.toc ol {
  list-style: none;
  counter-reset: toc;
  padding-left: 0;
  margin: 0;
}

.toc li {
  counter-increment: toc;
  margin-bottom: 8px;
  padding-left: 30px;
  position: relative;
  font-size: 0.96rem;
}

.toc li::before {
  content: counter(toc, decimal-leading-zero);
  position: absolute;
  left: 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-violet);
  top: 4px;
}

.toc a {
  color: var(--text-secondary);
  border: none;
}

.toc a:hover {
  color: var(--accent-cyan);
}

/* Callout box */
.callout {
  border: 1px solid var(--accent-cyan-soft);
  background: linear-gradient(135deg, var(--accent-cyan-soft), transparent);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin: 32px 0;
}

.callout strong {
  color: var(--accent-cyan);
}

.callout-flare {
  border-color: var(--accent-flare-soft);
  background: linear-gradient(135deg, var(--accent-flare-soft), transparent);
}

.callout-flare strong {
  color: var(--accent-flare);
}

/* Related (cross-link) */
.related {
  background: var(--bg-panel);
  border-top: 1px solid var(--border-soft);
  padding: 80px 24px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  max-width: var(--container);
  margin: 40px auto 0;
}

.related-card {
  padding: 24px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: var(--bg-panel-2);
  transition: all 0.25s ease;
  text-decoration: none;
  color: inherit;
  display: block;
}

.related-card:hover {
  border-color: var(--accent-cyan);
  transform: translateY(-4px);
  color: inherit;
}

.related-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-violet);
  margin-bottom: 8px;
}

.related-card h4 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.related-card p {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.55;
  margin: 0;
}

/* ============================================
   FAQ (acordeón)
   ============================================ */
.faq {
  max-width: var(--container-narrow);
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  background: var(--bg-panel);
  overflow: hidden;
}

.faq-question {
  padding: 18px 22px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--text-primary);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.faq-question::-webkit-details-marker { display: none; }

.faq-question::after {
  content: '+';
  font-family: var(--font-mono);
  font-size: 1.4rem;
  color: var(--accent-cyan);
  transition: transform 0.25s ease;
}

.faq-item[open] .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  padding: 0 22px 20px;
  color: var(--text-secondary);
  font-size: 0.97rem;
  line-height: 1.7;
}

.faq-answer p {
  margin: 0 0 12px;
}

/* ============================================
   LÍNEA DE TIEMPO
   ============================================ */
.timeline-section {
  padding: var(--section-pad);
  position: relative;
  overflow: hidden;
}

.timeline-track {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 60px 24px 40px;
  margin: 0 -24px;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-cyan) transparent;
  position: relative;
}

/* Línea horizontal central que conecta los markers */
.timeline-track::before {
  content: '';
  position: absolute;
  top: calc(60px + 56px); /* alinea con el centro vertical del marker */
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(34, 211, 238, 0.35) 8%,
    rgba(167, 139, 250, 0.4) 50%,
    rgba(251, 113, 133, 0.35) 92%,
    transparent 100%
  );
  z-index: 0;
}

.timeline-track::-webkit-scrollbar {
  height: 8px;
}
.timeline-track::-webkit-scrollbar-track {
  background: var(--bg-panel);
  border-radius: 4px;
}
.timeline-track::-webkit-scrollbar-thumb {
  background: rgba(34, 211, 238, 0.5);
  border-radius: 4px;
}

.timeline-item {
  flex: 0 0 280px;
  scroll-snap-align: center;
  padding: 24px 22px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0.01));
  position: relative;
  margin-right: 28px;
  margin-top: 32px;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.timeline-item:last-child {
  margin-right: 24px;
}

.timeline-item:hover {
  border-color: var(--border-med);
  transform: translateY(-4px);
  background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.02));
}

.timeline-marker {
  position: absolute;
  top: -32px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg-deep);
  border: 2px solid var(--accent-cyan);
  z-index: 2;
}

.timeline-item.past .timeline-marker {
  border-color: rgba(167, 139, 250, 0.7);
  background: rgba(167, 139, 250, 0.18);
}

.timeline-item.present .timeline-marker {
  border-color: var(--accent-cyan);
  background: var(--accent-cyan);
  box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.7);
  animation: timelinePulse 2s ease-in-out infinite;
}

.timeline-item.future .timeline-marker {
  border-color: rgba(251, 146, 60, 0.7);
  background: var(--bg-deep);
  border-style: dashed;
}

@keyframes timelinePulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.6);
  }
  50% {
    box-shadow: 0 0 0 12px rgba(34, 211, 238, 0);
  }
}

.timeline-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.timeline-item.present .timeline-tag {
  color: var(--accent-cyan);
}

.timeline-item.future .timeline-tag {
  color: var(--accent-flare);
}

.timeline-year {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1;
  background: var(--grad-cosmic);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 14px;
  letter-spacing: -0.02em;
}

.timeline-item.future .timeline-year {
  background: linear-gradient(135deg, var(--accent-flare), var(--accent-violet));
  -webkit-background-clip: text;
  background-clip: text;
  opacity: 0.92;
}

.timeline-item h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
  color: var(--text-primary);
  line-height: 1.25;
}

.timeline-item p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
}

.timeline-item p a {
  color: var(--accent-cyan);
  border-bottom: 1px dotted rgba(34, 211, 238, 0.4);
}

.timeline-item p a:hover {
  color: var(--text-primary);
  border-bottom-color: var(--accent-cyan);
}

.timeline-foot {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
  max-width: 580px;
  margin: 28px auto 0;
  padding: 0 16px;
}

@media (max-width: 600px) {
  .timeline-item {
    flex-basis: 240px;
    padding: 20px 18px;
  }
  .timeline-year {
    font-size: 2rem;
  }
}

/* ============================================
   NEWSLETTER
   ============================================ */
.newsletter-section {
  padding: var(--section-pad-sm);
  position: relative;
  overflow: hidden;
}

.newsletter-section .container-narrow {
  position: relative;
  z-index: 1;
}

.newsletter-content {
  text-align: center;
  padding: 24px 0;
}

.newsletter-glow {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 50% at 50% 50%, rgba(167, 139, 250, 0.30), transparent 70%),
    radial-gradient(ellipse 40% 30% at 20% 30%, rgba(34, 211, 238, 0.18), transparent 70%),
    radial-gradient(ellipse 40% 30% at 80% 70%, rgba(251, 113, 133, 0.18), transparent 70%);
  filter: blur(50px);
}

.newsletter-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid var(--border-med);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.78rem;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  margin-bottom: 28px;
  font-family: var(--font-mono);
}

.newsletter-card h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.6rem);
  margin-bottom: 18px;
}

.newsletter-card h2 .gradient {
  background: var(--grad-cosmic);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.newsletter-lead {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 540px;
  margin: 0 auto 36px;
}

.newsletter-lead strong {
  color: var(--text-primary);
}

.newsletter-form {
  display: flex;
  gap: 12px;
  max-width: 520px;
  margin: 0 auto 18px;
  align-items: stretch;
}

.newsletter-form input[type="email"],
.newsletter-form input[type="text"],
.newsletter-form textarea {
  flex: 1;
  padding: 16px 22px;
  border-radius: 999px;
  border: 1px solid var(--border-med);
  background: rgba(3, 7, 18, 0.6);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  min-width: 0;
}

.newsletter-form textarea {
  border-radius: 18px;
  resize: vertical;
  min-height: 140px;
  line-height: 1.55;
}

.newsletter-form input::placeholder,
.newsletter-form textarea::placeholder {
  color: var(--text-dim);
}

.newsletter-form input:focus,
.newsletter-form textarea:focus {
  border-color: var(--accent-cyan);
  background: rgba(3, 7, 18, 0.85);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

/* Form de contacto: campos apilados verticalmente */
.contact-form {
  flex-direction: column;
  align-items: stretch;
}

.contact-form .newsletter-submit {
  align-self: center;
}

.newsletter-submit {
  padding: 16px 28px;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
}

.newsletter-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.newsletter-foot {
  color: var(--text-muted);
  font-size: 0.86rem;
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.55;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 600px) {
  .newsletter-form {
    flex-direction: column;
    gap: 10px;
  }
  .newsletter-submit {
    justify-content: center;
  }
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--bg-void);
  border-top: 1px solid var(--border-soft);
  padding: 48px 24px 28px;
  margin-top: 40px;
}

.footer-grid {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
}

.footer-brand h4 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin-bottom: 12px;
  background: var(--grad-cosmic);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.92rem;
  max-width: 320px;
  line-height: 1.6;
}

.footer-col h5 {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent-cyan);
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
}

.footer-col li {
  margin-bottom: 10px;
}

.footer-col a {
  color: var(--text-muted);
  font-size: 0.92rem;
  text-decoration: none;
}

.footer-col a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  max-width: var(--container);
  margin: 36px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-dim);
  flex-wrap: wrap;
  gap: 12px;
}

.footer-legal {
  list-style: none;
  display: flex;
  gap: 22px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.footer-legal li {
  margin: 0;
}

.footer-legal a {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-legal a:hover {
  color: var(--accent-cyan);
}

/* ============================================
   FADE IN animations (intersection observer)
   ============================================ */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .masonry {
    column-count: 2;
  }
}

@media (max-width: 768px) {
  :root {
    --section-pad: 80px 20px;
    --section-pad-sm: 60px 20px;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-deep);
    border-bottom: 1px solid var(--border-soft);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
  }

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

  .nav-toggle {
    display: grid;
    place-items: center;
  }

  .nav-cta {
    display: none;
  }

  .hero {
    padding: 100px 20px 60px;
  }

  .hero h1 {
    font-size: clamp(2rem, 9vw, 3.4rem);
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .article-body {
    font-size: 1rem;
  }
}

@media (max-width: 560px) {
  .masonry {
    column-count: 1;
  }

  .shape-1, .shape-2, .shape-3, .shape-4 {
    transform: scale(0.6) rotate(var(--r, 0deg));
  }
}
