/* ═══════════════════════════════════════════
   EDER ANDRADES — Portfolio Profesional
   Paleta: Azul Marino Ejecutivo
   ═══════════════════════════════════════════ */

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

:root {
  /* Paleta Ejecutiva */
  --navy-900: #0a1628;
  --navy-800: #0f2040;
  --navy-700: #1e3a5f;
  --navy-600: #1a4a7a;
  --navy-500: #1d5c9e;
  --navy-400: #2d6a9f;
  --navy-300: #4a8ec2;
  --navy-200: #7ab3d9;
  --navy-100: #b8d6ed;
  --navy-50:  #e8f2f9;

  --white:    #ffffff;
  --gray-50:  #f8fafc;
  --gray-100: #f0f4f8;
  --gray-200: #e2eaf2;
  --gray-300: #c8d8e8;
  --gray-400: #9ab2c8;
  --gray-500: #6a88a0;
  --gray-600: #4a6478;
  --gray-700: #344d60;
  --gray-800: #1e3040;
  --gray-900: #0e1a24;

  --accent:   #1d5c9e;
  --accent-h: #2d6a9f;
  --gold:     #c4962a;
  --gold-l:   #f0d080;

  --text-primary:   var(--navy-900);
  --text-secondary: var(--gray-600);
  --text-muted:     #5a7a99;
  --bg-page:        var(--white);
  --bg-alt:         var(--gray-50);
  --bg-alt2:        var(--gray-100);
  --border:         rgba(10,22,40,0.10);
  --border-m:       rgba(10,22,40,0.18);

  --serif: 'Playfair Display', Georgia, serif;
  --sans:  'Inter', system-ui, -apple-system, sans-serif;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-sm: 0 1px 4px rgba(10,22,40,0.08);
  --shadow-md: 0 4px 16px rgba(10,22,40,0.10);
  --shadow-lg: 0 12px 40px rgba(10,22,40,0.12);
  --shadow-xl: 0 24px 64px rgba(10,22,40,0.14);
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--sans);
  background: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }

/* ─── TIPOGRAFÍA ─── */
h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.15; letter-spacing: -0.02em; }

/* ─── UTILIDADES ─── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.section-tag {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--sans); font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--navy-400);
  margin-bottom: 1.25rem;
}
.section-tag::before {
  content: ''; display: inline-block;
  width: 28px; height: 1.5px; background: var(--navy-400);
}
.section-h {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.25rem);
  color: var(--navy-900);
  line-height: 1.1;
}
.section-h em { font-style: italic; color: var(--navy-500); }

.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }


/* ══════════════════════════════════
   NAV
══════════════════════════════════ */
#mainNav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: 68px;
  display: flex; align-items: center;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s, background 0.3s;
}
#mainNav.scrolled {
  box-shadow: var(--shadow-md);
  background: rgba(255,255,255,0.99);
}

/* Compensar el nav fijo al hacer scroll a una sección */
#productos { padding: 5rem 0 5rem; background: var(--bg-page); }
.nav-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 1.5rem;
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
}
.nav-logo {
  display: flex; align-items: center; gap: 0.6rem;
  font-family: var(--serif); font-size: 1.1rem; color: var(--navy-900);
  font-weight: 700; letter-spacing: -0.02em;
  white-space: nowrap;
}
.nav-logo-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); flex-shrink: 0;
}
.nav-links {
  display: flex; gap: 1rem; list-style: none;
}
.nav-links a {
  font-size: 0.72rem; font-weight: 500;
  color: var(--gray-600); letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
  padding-bottom: 2px;
  border-bottom: 1.5px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--navy-700); border-color: var(--navy-500);
}
.nav-actions { display: flex; gap: 0.6rem; align-items: center; }
.btn-cv {
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.04em;
  color: var(--navy-700); background: transparent;
  border: 1.5px solid var(--navy-200);
  padding: 0.45rem 1.1rem; border-radius: 100px;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
  white-space: nowrap;
}
.btn-cv:hover { background: var(--navy-700); color: var(--white); border-color: var(--navy-700); transform: translateY(-1px); }

/* hamburger */
.nav-hamburger {
  display: none; flex-direction: column; gap: 5px; cursor: pointer;
  background: none; border: none; padding: 6px;
}
.nav-hamburger span {
  display: block; width: 22px; height: 1.5px;
  background: var(--navy-800); transition: transform 0.3s ease, opacity 0.2s ease;
}
.nav-mobile {
  display: none; position: fixed; top: 68px; left: 0; right: 0;
  background: var(--white); border-bottom: 1px solid var(--border);
  padding: 1.5rem 2rem; flex-direction: column; gap: 1.25rem;
  z-index: 999;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  font-size: 1rem; font-weight: 500; color: var(--navy-700);
  padding: 0.5rem 0; border-bottom: 0.5px solid var(--border);
}


/* ══════════════════════════════════
   HERO
══════════════════════════════════ */
#hero {
  min-height: 100vh;
  display: grid; grid-template-columns: 1fr 1fr;
  padding-top: 68px;
  overflow: hidden;
}
.hero-left {
  display: flex; flex-direction: column; justify-content: center;
  padding: 6rem 4rem 6rem 0;
  max-width: 600px; margin-left: auto;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--navy-500);
  border: 1px solid var(--navy-100);
  background: var(--navy-50);
  padding: 0.4rem 1rem; border-radius: 100px;
  margin-bottom: 2rem;
  animation: fadeUp 0.7s ease both;
}
.hero-eyebrow i {
  display: inline-block; width: 6px; height: 6px;
  border-radius: 50%; background: var(--navy-500); flex-shrink: 0;
}
.hero-name {
  font-family: var(--serif);
  font-size: clamp(3.2rem, 6vw, 5.75rem);
  font-weight: 700; letter-spacing: -0.035em; line-height: 1.0;
  color: var(--navy-900);
  animation: fadeUp 0.7s ease 0.08s both;
}
.hero-name span { display: block; color: var(--navy-600); font-weight: 400; font-style: italic; }
.hero-subtitle {
  margin-top: 1.75rem;
  font-size: 1.05rem; line-height: 1.75; color: var(--gray-600); font-weight: 400;
  max-width: 440px;
  animation: fadeUp 0.7s ease 0.16s both;
}
.hero-tags {
  display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 2rem;
  animation: fadeUp 0.7s ease 0.22s both;
}
.hero-tag {
  font-size: 0.78rem; font-weight: 500; padding: 0.4rem 1rem;
  border-radius: 100px; border: 1px solid var(--gray-200);
  color: var(--gray-700); background: var(--gray-50);
}
.hero-ctas {
  display: flex; gap: 1rem; align-items: center; margin-top: 2.75rem;
  animation: fadeUp 0.7s ease 0.28s both;
}
.btn-primary {
  font-size: 0.9rem; font-weight: 600;
  color: var(--white); background: var(--navy-700);
  padding: 0.9rem 2.25rem; border-radius: 100px; border: none; cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 14px rgba(10,22,40,0.25);
}
.btn-primary:hover { background: var(--navy-600); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(10,22,40,0.28); }
.btn-ghost {
  font-size: 0.9rem; font-weight: 500; color: var(--navy-700);
  padding: 0.9rem 2rem; border-radius: 100px;
  border: 1.5px solid var(--navy-200); background: transparent;
  transition: border-color 0.2s, color 0.2s, transform 0.15s;
}
.btn-ghost:hover { border-color: var(--navy-500); color: var(--navy-500); transform: translateY(-2px); }

.hero-right {
  background: #0a1628; /* Fijo — siempre oscuro, es intencional */
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.hero-right-bg {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(ellipse at 25% 55%, rgba(29,92,158,0.22) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 20%, rgba(45,106,159,0.12) 0%, transparent 45%);
}
.hero-right-grid {
  position: absolute; inset: 0; opacity: 0.04;
  background-image:
    linear-gradient(rgba(255,255,255,0.6) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.6) 1px, transparent 1px);
  background-size: 48px 48px;
}
.hero-card-wrap {
  position: relative; z-index: 2; padding: 3rem;
  width: 100%; max-width: 420px;
  animation: fadeUp 0.9s ease 0.35s both;
}
.hero-stats {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1px; border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-xl); overflow: hidden;
}
.hero-stat {
  padding: 2rem 1.75rem;
  background: rgba(255,255,255,0.04);
  transition: background 0.25s;
}
.hero-stat:hover { background: rgba(255,255,255,0.09); }
.hero-stat-num {
  font-family: var(--serif);
  font-size: 2.75rem; line-height: 1;
  color: #ffffff; letter-spacing: -0.04em; /* siempre blanco */
}
.hero-stat-num sup { font-size: 1.5rem; color: #7ab3d9; }
.hero-stat-lbl {
  font-size: 0.72rem; font-weight: 500; letter-spacing: 0.08em;
  text-transform: uppercase; color: rgba(226,237,248,0.45);
  margin-top: 0.4rem;
}
.hero-quote {
  margin-top: 1.75rem;
  padding: 1.5rem 1.75rem;
  border-left: 2px solid #4a8ec2;
  background: rgba(255,255,255,0.05);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.hero-quote p {
  font-family: var(--serif); font-style: italic;
  font-size: 1rem; line-height: 1.6; color: rgba(255,255,255,0.82);
}
.hero-quote cite {
  display: block; margin-top: 0.6rem;
  font-size: 0.72rem; color: rgba(226,237,248,0.42); font-style: normal;
}
.hero-badges {
  display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 1.5rem;
}
.hero-badge {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em;
  padding: 0.3rem 0.85rem; border-radius: 100px;
  color: #7ab3d9; border: 1px solid rgba(74,142,194,0.35);
  background: rgba(29,92,158,0.15);
}


/* ══════════════════════════════════
   SOBRE MÍ
══════════════════════════════════ */
#sobre { padding: 5rem 0 5rem; background: var(--bg-page); }
.sobre-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 6rem; align-items: start; }
.sobre-foto-wrap {
  position: sticky; top: 100px;
  max-width: 200px; margin: 0 auto;
}
.foto-placeholder {
  width: 100%; aspect-ratio: 1/1;
  background: #0a1628;
  border-radius: 50%;
  overflow: hidden; position: relative;
}
.foto-placeholder-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 40%, rgba(29,92,158,0.4) 0%, transparent 60%);
}
.foto-placeholder-grid {
  position: absolute; inset: 0; opacity: 0.05;
  background-image:
    linear-gradient(rgba(255,255,255,0.6) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.6) 1px, transparent 1px);
  background-size: 32px 32px;
}
.foto-placeholder-initials {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 7rem; color: rgba(255,255,255,0.08);
  font-weight: 700; letter-spacing: -0.04em; user-select: none;
}
.foto-caption {
  margin-top: 1.25rem;
  display: flex; gap: 1rem;
}
.foto-cap-item {
  flex: 1; padding: 1rem 1.25rem;
  background: var(--gray-50); border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-align: center;
}
.foto-cap-num {
  font-family: var(--serif); font-size: 1.75rem;
  color: var(--navy-700); letter-spacing: -0.04em; line-height: 1;
}
.foto-cap-lbl { font-size: 0.7rem; color: var(--gray-500); margin-top: 0.25rem; letter-spacing: 0.05em; }

.sobre-text { padding-top: 0.5rem; }
.sobre-lead {
  font-size: 0.975rem; line-height: 1.85; color: var(--gray-600); font-weight: 400;
  margin-top: 2rem;
}
.sobre-lead strong { color: var(--text-primary); font-weight: 600; }
.sobre-body { margin-top: 1.25rem; font-size: 0.975rem; color: var(--gray-600); line-height: 1.85; }

.filosof-block {
  margin-top: 2.5rem; padding: 2rem 2.25rem;
  background: #0a1628; border-radius: var(--radius-lg);
}
.filosof-block h3 {
  font-family: var(--serif); font-size: 1.25rem; font-weight: 400;
  color: #e8f2f9; margin-bottom: 0.85rem;
}
.filosof-block p { font-size: 0.9rem; line-height: 1.8; color: rgba(232,242,249,0.65); }

.valores-list { margin-top: 2.5rem; border-top: 1px solid var(--border); }
.valor-item {
  display: flex; gap: 1.5rem; padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
  transition: padding-left 0.2s;
}
.valor-item:hover { padding-left: 0.4rem; }
.valor-num { font-family: var(--serif); font-size: 0.95rem; color: var(--navy-400); min-width: 2rem; padding-top: 2px; }
.valor-content h4 { font-family: var(--sans); font-size: 0.925rem; font-weight: 600; color: var(--navy-800); margin-bottom: 0.25rem; }
.valor-content p { font-size: 0.85rem; color: var(--gray-500); }


/* ══════════════════════════════════
   SERVICIOS
══════════════════════════════════ */
#servicios { padding: 5rem 0 5rem; background: #0a1628; } /* siempre oscuro */
#servicios .section-tag { color: rgba(226,237,248,0.55); }
#servicios .section-tag::before { background: rgba(226,237,248,0.3); }
#servicios .section-h { color: #dce8f4; }
.servicios-intro { font-size: 1rem; color: var(--text-muted); max-width: 520px; margin-top: 1.25rem; line-height: 1.8; }
.servicios-grid {
  margin-top: 4rem;
  display: grid; grid-template-columns: repeat(3, 1fr);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-xl); overflow: hidden;
  gap: 1px; background: rgba(255,255,255,0.05);
}
.servicio-card {
  padding: 2.5rem 2.25rem;
  background: var(--bg-alt);
  border: 1px solid var(--border-m);
  border-radius: var(--radius-lg);
  transition: background 0.25s, box-shadow 0.25s;
}
.servicio-card:hover { background: var(--bg-alt); box-shadow: var(--shadow-md); }
.servicio-icon {
  width: 44px; height: 44px; border-radius: var(--radius-md);
  background: rgba(29,92,158,0.15); border: 1px solid rgba(74,142,194,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; margin-bottom: 1.5rem;
}
.servicio-card h3 {
  font-family: var(--sans); font-size: 0.975rem; font-weight: 600;
  color: var(--text-main); margin-bottom: 0.75rem; line-height: 1.4;
}
.servicio-card p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.75; }
.servicio-tag {
  display: inline-block; margin-top: 1.5rem;
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--navy-500); border: 1px solid var(--border-m);
  padding: 0.25rem 0.7rem; border-radius: 100px;
  background: var(--navy-50);
}

/* Grid especial para productos — cards separadas con espacio y sombra */
.productos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}
.producto-card {
  background: var(--white);
  border: 1.5px solid var(--border-m);
  border-radius: 16px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: box-shadow 0.25s, transform 0.2s;
}
.producto-card:hover {
  box-shadow: 0 8px 32px rgba(29,92,158,0.13);
  transform: translateY(-3px);
}
.producto-icon {
  width: 52px; height: 52px; border-radius: 14px;
  background: var(--navy-50); border: 1.5px solid var(--border-m);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; margin-bottom: 1.25rem; flex-shrink: 0;
}
.producto-cat {
  display: inline-block; margin-bottom: 0.75rem;
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--navy-500); border: 1px solid var(--border-m);
  padding: 0.2rem 0.65rem; border-radius: 100px;
  background: var(--navy-50);
}
.producto-title {
  font-family: var(--sans); font-size: 1rem; font-weight: 700;
  color: var(--text-main); line-height: 1.35; margin-bottom: 0.6rem;
}
.producto-desc {
  font-size: 0.84rem; color: var(--text-muted); line-height: 1.7;
  flex: 1; margin-bottom: 1.5rem;
}
.producto-footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.75rem; flex-wrap: wrap;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-m);
}
.producto-price {
  font-size: 1.15rem; font-weight: 800; color: var(--navy-600);
  line-height: 1;
}
.producto-price span {
  font-size: 0.75rem; font-weight: 500; color: var(--text-muted); margin-left: 3px;
}
.producto-btn {
  font-size: 0.8rem; font-weight: 600;
  color: var(--navy-700); border: 1.5px solid var(--navy-300);
  padding: 0.45rem 1.1rem; border-radius: 100px;
  background: transparent;
  cursor: pointer; text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.producto-btn:hover {
  background: var(--navy-700); color: var(--white); border-color: var(--navy-700);
}

/* Dark mode para producto-card */
html[data-theme="dark"] .producto-card {
  background: #131c2b;
  border-color: rgba(74,142,194,0.2);
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
html[data-theme="dark"] .producto-card:hover {
  box-shadow: 0 8px 32px rgba(29,92,158,0.25);
}
html[data-theme="dark"] .producto-icon { background: rgba(29,92,158,0.2); border-color: rgba(74,142,194,0.25); }
html[data-theme="dark"] .producto-cat { background: rgba(29,92,158,0.2); border-color: rgba(74,142,194,0.2); color: #7ab3d9; }
html[data-theme="dark"] .producto-footer { border-top-color: rgba(74,142,194,0.15); }
html[data-theme="dark"] .producto-price { color: #7ab3d9; }
html[data-theme="dark"] .producto-btn { color: #7ab3d9; border-color: rgba(74,142,194,0.4); }
html[data-theme="dark"] .producto-btn:hover { background: var(--navy-500); color: var(--white); border-color: var(--navy-500); }

@media (max-width: 900px) { .productos-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .productos-grid { grid-template-columns: 1fr; } }


/* ══════════════════════════════════
   EXPERIENCIA
══════════════════════════════════ */
#experiencia { padding: 5rem 0 5rem; background: var(--gray-50); }
.exp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; }

.timeline { position: relative; margin-top: 3rem; }
.timeline::before {
  content: ''; position: absolute; left: 19px; top: 0; bottom: 0;
  width: 1px; background: var(--border-m);
}
.timeline-item { display: flex; gap: 2rem; padding-bottom: 2.5rem; position: relative; }
.timeline-dot {
  position: relative; z-index: 1;
  width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%;
  background: var(--white); border: 1.5px solid var(--border-m);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.6rem; font-weight: 700; color: var(--gray-500);
  letter-spacing: 0.04em;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.timeline-item:hover .timeline-dot {
  background: var(--navy-700); border-color: var(--navy-700); color: var(--white);
}
.timeline-content { padding-top: 0.5rem; }
.t-date { font-size: 0.72rem; color: var(--navy-500); font-weight: 600; letter-spacing: 0.05em; margin-bottom: 0.3rem; }
.t-role { font-family: var(--sans); font-size: 0.975rem; font-weight: 600; color: var(--navy-900); margin-bottom: 0.2rem; }
.t-company { font-size: 0.85rem; color: var(--navy-400); font-weight: 500; margin-bottom: 0.5rem; }
.t-desc { font-size: 0.83rem; color: var(--gray-500); line-height: 1.75; }

.edu-list { margin-top: 3rem; display: flex; flex-direction: column; gap: 0.75rem; }
.edu-card {
  padding: 1.25rem 1.5rem;
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.edu-card:hover {
  border-color: var(--navy-300); transform: translateX(5px);
  box-shadow: var(--shadow-sm);
}
.edu-year { font-size: 0.7rem; color: var(--navy-500); font-weight: 600; letter-spacing: 0.05em; margin-bottom: 0.25rem; }
.edu-name { font-size: 0.9rem; font-weight: 600; color: var(--navy-900); line-height: 1.35; }
.edu-place { font-size: 0.78rem; color: var(--gray-500); margin-top: 0.2rem; }


/* ══════════════════════════════════
   AGENDA
══════════════════════════════════ */
#agenda { padding: 5rem 0 5rem; background: var(--white); }
.eventos-grid {
  margin-top: 4rem;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem;
}
.evento-card {
  padding: 2rem 1.875rem; border: 1px solid var(--border);
  border-radius: var(--radius-lg); background: var(--white);
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
  position: relative; overflow: hidden;
}
.evento-card::after {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: transparent; transition: background 0.25s;
}
.evento-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--navy-200); }
.evento-card:hover::after { background: var(--navy-500); }
.evento-year {
  font-family: var(--serif); font-size: 2.75rem; line-height: 1;
  color: rgba(255,255,255,0.45); letter-spacing: -0.04em; margin-bottom: 1rem;
}
.evento-badge {
  display: inline-block; font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.25rem 0.75rem; border-radius: 100px; margin-bottom: 0.875rem;
}
.badge-speaker { background: var(--navy-50); color: var(--navy-600); border: 1px solid var(--navy-100); }
.badge-org { background: #f0f9f4; color: #2d6a4f; border: 1px solid #b7dfc8; }
.badge-attendee { background: var(--gray-100); color: var(--gray-600); border: 1px solid var(--gray-200); }
.evento-nombre { font-size: 1rem; font-weight: 600; color: var(--navy-900); line-height: 1.35; margin-bottom: 0.5rem; }
.evento-lugar { font-size: 0.78rem; color: var(--gray-500); margin-bottom: 0.75rem; display: flex; align-items: center; gap: 0.3rem; }
.evento-desc { font-size: 0.83rem; color: var(--gray-500); line-height: 1.7; }


/* ══════════════════════════════════
   HABILIDADES
══════════════════════════════════ */
#habilidades { padding: 5rem 0 5rem; background: var(--gray-50); }
.skills-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; margin-top: 4rem; }
.skills-col h3 {
  font-family: var(--sans); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--gray-400);
  padding-bottom: 0.75rem; border-bottom: 1px solid var(--border); margin-bottom: 1.75rem;
}
.skill-item { margin-bottom: 1.4rem; }
.skill-header { display: flex; justify-content: space-between; margin-bottom: 0.45rem; }
.skill-name { font-size: 0.875rem; font-weight: 500; color: var(--navy-800); }
.skill-pct { font-size: 0.75rem; color: var(--gray-500); }
.skill-track { height: 3px; background: var(--gray-200); border-radius: 100px; overflow: hidden; }
.skill-fill {
  height: 100%; background: var(--navy-600);
  border-radius: 100px;
  transform: scaleX(0); transform-origin: left;
  transition: transform 1.1s cubic-bezier(0.16, 1, 0.3, 1);
}
.skill-fill.alt { background: var(--navy-400); }
.tech-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.5rem; }
.tech-tag {
  font-size: 0.78rem; font-weight: 500; padding: 0.35rem 0.9rem;
  border-radius: 100px; background: var(--white);
  border: 1px solid var(--border); color: var(--navy-700);
  cursor: default; transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.tech-tag:hover { background: var(--navy-700); color: var(--white); border-color: var(--navy-700); }


/* ══════════════════════════════════
   BLOG
══════════════════════════════════ */
#blog { padding: 5rem 0 5rem; background: var(--white); }
#blog-grid {
  margin-top: 2.5rem;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem;
}
.blog-card {
  border-radius: var(--radius-lg); overflow: hidden;
  background: var(--white); border: 1px solid var(--border);
  transition: transform 0.22s, box-shadow 0.22s, border-color 0.22s; cursor: pointer;
  display: flex; flex-direction: column;
}
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--navy-200); }
.blog-card.featured { grid-row: auto; } /* sin span — todas iguales */
.blog-img {
  background: #0f2040; position: relative; overflow: hidden;
  height: 148px; flex-shrink: 0;
}
.blog-card.featured .blog-img { height: 148px; } /* misma altura */
.blog-img-glow {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 35% 65%, rgba(29,92,158,0.5) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 20%, rgba(45,106,159,0.2) 0%, transparent 45%);
}
.blog-img-grid {
  position: absolute; inset: 0; opacity: 0.05;
  background-image:
    linear-gradient(rgba(255,255,255,0.7) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.7) 1px, transparent 1px);
  background-size: 32px 32px;
}
.blog-img-cat {
  position: absolute; bottom: 1rem; left: 1rem;
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(226,237,248,0.55);
}
.blog-body { padding: 1.5rem 1.75rem; flex: 1; display: flex; flex-direction: column; }
.blog-date { font-size: 0.72rem; color: var(--gray-400); margin-bottom: 0.6rem; font-weight: 500; }
.blog-title {
  font-family: var(--serif); font-size: 1.1rem; color: var(--navy-900);
  line-height: 1.35; margin-bottom: 0.65rem; font-weight: 700;
}
.blog-card.featured .blog-title { font-size: 1.1rem; } /* igual al resto */
.blog-excerpt { font-size: 0.83rem; color: var(--gray-500); line-height: 1.75; flex: 1; }
.blog-read {
  display: inline-flex; align-items: center; gap: 0.4rem;
  margin-top: 1.25rem; font-size: 0.8rem; font-weight: 600;
  color: var(--navy-500); transition: gap 0.2s, color 0.2s;
}
.blog-card:hover .blog-read { gap: 0.65rem; color: var(--navy-800); }
#blog-empty { display: none; text-align: center; padding: 5rem 0; color: var(--gray-400); }
#blog-empty p { font-size: 0.95rem; margin-top: 0.75rem; }


/* ══════════════════════════════════
   RECURSOS
══════════════════════════════════ */
#recursos { padding: 5rem 0 5rem; background: var(--gray-50); }
.recursos-intro { max-width: 560px; font-size: 0.95rem; color: var(--gray-600); margin-top: 1.25rem; line-height: 1.8; }
.recursos-grid {
  margin-top: 3.5rem;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem;
}
.recurso-group {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.75rem 2rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.recurso-group:hover { border-color: var(--navy-200); box-shadow: var(--shadow-sm); }
.recurso-group h3 {
  font-family: var(--sans); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--navy-600);
  display: flex; align-items: center; gap: 0.5rem;
  margin-bottom: 1rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--border);
}
.recurso-links { display: flex; flex-direction: column; gap: 0.5rem; }
.recurso-link {
  font-size: 0.85rem; color: var(--navy-700); font-weight: 500;
  padding: 0.4rem 0; display: flex; align-items: center; gap: 0.4rem;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.recurso-link:hover { color: var(--navy-500); border-color: var(--navy-100); }
.recurso-link::before { content: '→'; font-size: 0.75rem; color: var(--navy-300); }


/* ══════════════════════════════════
   CONTACTO
══════════════════════════════════ */
#contacto { padding: 5rem 0 5rem; background: #0a1628; } /* siempre oscuro */
#contacto .section-tag { color: rgba(226,237,248,0.45); }
#contacto .section-tag::before { background: rgba(226,237,248,0.28); }
#contacto .section-h { color: #dce8f4; }
.contacto-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 6rem; align-items: start; margin-top: 4rem; }
.contacto-sub { font-size: 1rem; color: rgba(226,237,248,0.55); line-height: 1.8; margin-bottom: 3rem; }
.contacto-items { display: flex; flex-direction: column; gap: 1rem; }
.contacto-item {
  display: flex; align-items: center; gap: 1.25rem;
  padding: 1.25rem 1.5rem; border-radius: var(--radius-md);
  border: 1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.04);
  color: inherit; transition: background 0.2s, border-color 0.2s;
}
.contacto-item:hover { background: rgba(255,255,255,0.08); border-color: rgba(74,142,194,0.35); }
.c-icon {
  width: 42px; height: 42px; border-radius: var(--radius-md);
  background: rgba(29,92,158,0.25); display: flex; align-items: center; justify-content: center;
  font-size: 1rem; flex-shrink: 0;
}
.c-label { font-size: 0.7rem; color: rgba(226,237,248,0.4); text-transform: uppercase; letter-spacing: 0.06em; }
.c-val { font-size: 0.9rem; color: rgba(226,237,248,0.88); margin-top: 0.15rem; }
.contacto-social { margin-top: 2rem; display: flex; gap: 0.75rem; }
.social-btn {
  padding: 0.55rem 1.25rem; border-radius: 100px;
  border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.05);
  font-size: 0.8rem; font-weight: 600; color: rgba(255,255,255,0.6);
  cursor: pointer; transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.social-btn:hover { background: rgba(255,255,255,0.12); color: #e8f2f9; }

/* form */
.form-card {
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-xl); padding: 2.5rem;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: rgba(226,237,248,0.5); margin-bottom: 0.5rem;
}
.form-group input, .form-group textarea, .form-group select {
  width: 100%; background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12); border-radius: var(--radius-md);
  padding: 0.9rem 1.125rem; font-family: var(--sans); font-size: 0.9rem;
  color: rgba(226,237,248,0.9); outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  border-color: var(--navy-300); background: rgba(255,255,255,0.1);
}
.form-group input::placeholder, .form-group textarea::placeholder { color: rgba(226,237,248,0.25); }
.form-group textarea { resize: vertical; min-height: 130px; }
.form-group select option { background: #0f2040; color: #e8f2f9; }
#form-status { font-size: 0.85rem; margin-top: 0.75rem; display: none; }
#form-status.ok { color: #6ee7b7; }
#form-status.err { color: #fca5a5; }

.btn-send {
  width: 100%; padding: 1rem; border-radius: 100px;
  background: var(--navy-600); border: none; cursor: pointer;
  font-family: var(--sans); font-size: 0.9rem; font-weight: 600; color: #e8f2f9;
  letter-spacing: 0.03em;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 14px rgba(10,22,40,0.35);
}
.btn-send:hover { background: var(--navy-500); transform: translateY(-2px); }
.btn-send:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }


/* ══════════════════════════════════
   EDITOR / ADMIN
══════════════════════════════════ */
#admin-toggle {
  position: fixed; bottom: 2rem; right: 2rem; z-index: 800;
  width: 54px; height: 54px; border-radius: 50%;
  background: #1e3a5f; border: none; cursor: pointer;
  font-size: 1.2rem; box-shadow: 0 4px 20px rgba(10,22,40,0.3);
  transition: background 0.2s, transform 0.2s;
  display: flex; align-items: center; justify-content: center;
}
#admin-toggle:hover { background: #2d6a9f; transform: scale(1.08); }

#editor-overlay {
  display: none; position: fixed; inset: 0; z-index: 900;
  background: rgba(10,22,40,0.65); backdrop-filter: blur(4px);
  align-items: center; justify-content: center;
}
#editor-overlay.open { display: flex; }
#editor-panel {
  background: var(--white); border-radius: var(--radius-xl);
  width: min(840px, 96vw); max-height: 92vh; overflow-y: auto;
  padding: 2.5rem 3rem;
  animation: panelIn 0.28s ease;
}
#editor-panel::-webkit-scrollbar { width: 5px; }
#editor-panel::-webkit-scrollbar-thumb { background: var(--gray-200); border-radius: 10px; }
@keyframes panelIn { from { opacity: 0; transform: translateY(18px) scale(0.98); } to { opacity: 1; transform: none; } }

.ep-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 2rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--border);
}
.ep-header h2 { font-family: var(--serif); font-size: 1.7rem; color: var(--navy-900); }
.ep-close {
  width: 36px; height: 36px; border-radius: 50%; background: var(--gray-100);
  border: none; cursor: pointer; font-size: 1rem; display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.ep-close:hover { background: var(--gray-200); }
.ep-tabs {
  display: flex; gap: 0; margin-bottom: 2rem; background: var(--gray-100);
  border-radius: var(--radius-md); padding: 4px;
}
.ep-tab {
  flex: 1; padding: 0.6rem 1rem; border: none; background: transparent;
  cursor: pointer; font-family: var(--sans); font-size: 0.875rem; font-weight: 400;
  color: var(--gray-500); border-radius: calc(var(--radius-md) - 2px);
  transition: background 0.2s, color 0.2s;
}
.ep-tab.active { background: var(--white); color: var(--navy-900); font-weight: 600; box-shadow: var(--shadow-sm); }

.ep-form { display: flex; flex-direction: column; gap: 1.25rem; }
.ep-form label {
  display: block; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--gray-500); margin-bottom: 0.4rem;
}
.ep-form input[type="text"], .ep-form select, .ep-form textarea {
  width: 100%; background: var(--gray-50); border: 1.5px solid var(--border);
  border-radius: var(--radius-md); padding: 0.875rem 1.125rem;
  font-family: var(--sans); font-size: 0.9rem; color: var(--navy-900);
  outline: none; transition: border-color 0.2s, background 0.2s;
}
.ep-form input:focus, .ep-form select:focus, .ep-form textarea:focus {
  border-color: var(--navy-400); background: var(--white);
}
.ep-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.ep-toolbar {
  display: flex; flex-wrap: wrap; gap: 3px; padding: 0.5rem;
  background: var(--gray-100); border: 1.5px solid var(--border);
  border-bottom: none; border-radius: var(--radius-md) var(--radius-md) 0 0;
}
.tb-btn {
  padding: 0.3rem 0.65rem; border-radius: var(--radius-sm);
  border: none; background: transparent; cursor: pointer;
  font-family: var(--sans); font-size: 0.8rem; color: var(--gray-600);
  transition: background 0.15s, color 0.15s;
}
.tb-btn:hover { background: var(--gray-200); color: var(--navy-900); }
.tb-sep { width: 1px; background: var(--border); margin: 3px 2px; }
#article-body { border-radius: 0 0 var(--radius-md) var(--radius-md) !important; min-height: 200px; resize: vertical; }
.ep-actions {
  display: flex; gap: 0.75rem; justify-content: flex-end;
  padding-top: 1.5rem; border-top: 1px solid var(--border);
}
.ep-cancel {
  padding: 0.75rem 1.5rem; border-radius: 100px; background: var(--gray-100);
  border: none; cursor: pointer; font-family: var(--sans); font-size: 0.875rem; color: var(--gray-600);
}
.ep-cancel:hover { background: var(--gray-200); }
.ep-save {
  padding: 0.75rem 2rem; border-radius: 100px; background: #1e3a5f;
  border: none; cursor: pointer; font-family: var(--sans); font-size: 0.875rem; font-weight: 600; color: #e8f2f9;
  transition: background 0.2s, transform 0.15s;
}
.ep-save:hover { background: #1d5c9e; transform: translateY(-1px); }

.art-row {
  display: flex; align-items: center; gap: 1rem; padding: 1rem 1.25rem;
  border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--gray-50);
  margin-bottom: 0.75rem; transition: border-color 0.2s;
}
.art-row:hover { border-color: var(--navy-200); }
.art-row-info { flex: 1; }
.art-row-title { font-size: 0.9rem; font-weight: 600; color: var(--navy-900); }
.art-row-meta { font-size: 0.75rem; color: var(--gray-500); margin-top: 0.15rem; }
.art-row-btns { display: flex; gap: 0.5rem; }
.btn-edit-art, .btn-del-art {
  padding: 0.35rem 0.85rem; border-radius: 100px;
  border: 1px solid var(--border); cursor: pointer; font-family: var(--sans); font-size: 0.78rem;
}
.btn-edit-art { background: transparent; color: var(--gray-700); }
.btn-edit-art:hover { background: var(--navy-700); color: var(--white); border-color: var(--navy-700); }
.btn-del-art { background: transparent; color: var(--gray-400); }
.btn-del-art:hover { background: #fee2e2; color: #b91c1c; border-color: #fca5a5; }
.ep-empty { text-align: center; padding: 3rem; font-size: 0.9rem; color: var(--gray-400); }


/* ══════════════════════════════════
   READER (Artículo completo)
══════════════════════════════════ */
#article-reader {
  display: none; position: fixed; inset: 0; z-index: 950;
  background: rgba(10,22,40,0.75); backdrop-filter: blur(6px);
  align-items: flex-start; justify-content: center;
  padding: 5rem 1.5rem 2rem; overflow-y: auto;
}
#article-reader.open { display: flex; }
.reader-inner {
  background: var(--white); border-radius: var(--radius-xl);
  width: min(740px, 96vw); padding: 3.5rem;
  position: relative; animation: panelIn 0.3s ease;
}
.reader-close {
  position: absolute; top: 1.5rem; right: 1.5rem;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--gray-100); border: none; cursor: pointer;
  font-size: 1rem; display: flex; align-items: center; justify-content: center;
}
.reader-close:hover { background: var(--gray-200); }
.reader-cat {
  display: inline-block; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; padding: 0.3rem 0.85rem; border-radius: 100px;
  background: var(--navy-50); color: var(--navy-600); border: 1px solid var(--navy-100);
  margin-bottom: 1.25rem;
}
.reader-title {
  font-family: var(--serif); font-size: 2.25rem; color: var(--navy-900);
  letter-spacing: -0.03em; line-height: 1.15; margin-bottom: 0.875rem;
}
.reader-meta { font-size: 0.78rem; color: var(--gray-400); margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
.reader-body { font-size: 1rem; line-height: 1.9; color: var(--gray-700); }
.reader-body h2 { font-family: var(--serif); font-size: 1.5rem; color: var(--navy-900); margin: 2rem 0 0.75rem; }
.reader-body h3 { font-size: 1.1rem; font-weight: 600; color: var(--navy-800); margin: 1.5rem 0 0.5rem; }
.reader-body p { margin-bottom: 1.25rem; }
.reader-body ul, .reader-body ol { margin: 0 0 1.25rem 1.75rem; }
.reader-body li { margin-bottom: 0.35rem; }
.reader-body blockquote {
  border-left: 2px solid var(--navy-300); padding: 0.75rem 1.5rem;
  margin: 1.5rem 0; background: var(--navy-50); border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic; color: var(--gray-600);
}
.reader-body code {
  background: var(--gray-100); padding: 0.15rem 0.45rem; border-radius: 4px;
  font-family: 'Courier New', monospace; font-size: 0.875em; color: var(--navy-700);
}
.reader-body strong { font-weight: 600; color: var(--navy-900); }


/* ══════════════════════════════════
   TOAST
══════════════════════════════════ */
#toast {
  position: fixed; bottom: 6.5rem; right: 2rem; z-index: 1100;
  background: #0f2040; color: #e8f2f9;
  padding: 0.75rem 1.5rem; border-radius: 100px;
  font-size: 0.85rem; font-weight: 500;
  opacity: 0; transform: translateY(10px);
  transition: opacity 0.3s, transform 0.3s; pointer-events: none;
  box-shadow: var(--shadow-md);
}
#toast.show { opacity: 1; transform: translateY(0); }




/* ── Blog filter buttons */
.blog-filter-btn {
  font-size: 0.78rem; font-weight: 500; padding: 0.4rem 1rem;
  border-radius: 100px; border: 1px solid var(--border);
  background: transparent; color: var(--gray-600); cursor: pointer;
  transition: all 0.2s; font-family: var(--sans);
}
.blog-filter-btn:hover { border-color: var(--navy-300); color: var(--navy-600); }
.blog-filter-btn.active { background: var(--navy-700); color: var(--white); border-color: var(--navy-700); }

/* ── Blog source badges */
.blog-source-badge {
  position: absolute; top: 1rem; right: 1rem;
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 0.25rem 0.65rem;
  border-radius: 100px;
}
.medium-badge {
  background: rgba(10,22,40,0.75); color: rgba(226,237,248,0.9);
  border: 1px solid rgba(226,237,248,0.2);
}
.local-badge {
  background: rgba(29,92,158,0.7); color: rgba(255,255,255,0.9);
  border: 1px solid rgba(74,142,194,0.4);
}
.blog-medium-link {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.825rem; font-weight: 500; color: var(--navy-400);
  padding: 0.5rem 1.25rem; border-radius: 100px;
  border: 1px solid var(--border);
  transition: color 0.2s, border-color 0.2s;
  margin-top: 3rem;
}
.blog-medium-link:hover { color: var(--navy-600); border-color: var(--navy-300); }
.blog-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 3rem; flex-wrap: wrap; gap: 1rem; }

/* ══════════════════════════════════
   FOOTER
══════════════════════════════════ */
#footer {
  background: #0a1628; /* siempre oscuro */
  border-top: 1px solid rgba(226,237,248,0.08);
  padding: 3.5rem 0 2.5rem;
}
.footer-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 2rem;
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 3rem; margin-bottom: 3rem;
}
.footer-brand {}
.footer-logo-text {
  font-family: var(--serif); font-size: 1.35rem; color: #e8f2f9;
  font-weight: 700; letter-spacing: -0.02em;
}
.footer-tagline { font-size: 0.82rem; color: rgba(226,237,248,0.42); margin-top: 0.5rem; line-height: 1.6; }
.footer-col h4 {
  font-family: var(--sans); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: rgba(226,237,248,0.45); margin-bottom: 1.25rem;
}
.footer-col a {
  display: block; font-size: 0.85rem; color: rgba(226,237,248,0.62);
  margin-bottom: 0.65rem; transition: color 0.2s;
}
.footer-col a:hover { color: rgba(226,237,248,0.9); }
.footer-bottom {
  max-width: 1200px; margin: 0 auto; padding: 1.5rem 2rem 0;
  border-top: 1px solid rgba(255,255,255,0.07);
  display: flex; justify-content: space-between; align-items: center;
}
.footer-copy { font-size: 0.78rem; color: rgba(226,237,248,0.35); }
.footer-made { font-size: 0.78rem; color: rgba(226,237,248,0.35); }


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


/* ══════════════════════════════════
   RESPONSIVE
══════════════════════════════════ */

/* ── Hamburger animation */
.nav-hamburger span {
  transition: transform 0.3s ease, opacity 0.2s ease;
}

/* ── Nav mobile controls (lang + dark) inside mobile menu */
.nav-mobile-controls {
  display: none; /* shown only on mobile via media query */
}
.nav-mobile-cv {
  display: none; /* shown only on mobile via media query */
}

/* ══════════════════════════════════
   RESPONSIVE — TABLET  ≤1024px
══════════════════════════════════ */
@media (max-width: 1024px) {
  .sobre-grid { grid-template-columns: 1fr; gap: 3rem; }
  .sobre-foto-wrap { position: static; max-width: 200px; margin: 0 auto; }
  .foto-placeholder { aspect-ratio: 1/1 !important; border-radius: 50% !important; width: 100%; overflow: hidden; }
  .servicios-grid { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
  .exp-grid { grid-template-columns: 1fr 1fr; gap: 3rem; }
}

/* ══════════════════════════════════
   RESPONSIVE — ≤860px
══════════════════════════════════ */
@media (max-width: 860px) {
  #hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-right { display: none; }
  .hero-left { padding: 3.5rem 0 3rem; margin-left: 0; max-width: 100%; }
  .exp-grid { grid-template-columns: 1fr; gap: 3rem; }
  .skills-grid { grid-template-columns: 1fr; gap: 2rem; }
  .eventos-grid, .recursos-grid { grid-template-columns: 1fr 1fr; }
  .contacto-grid { grid-template-columns: 1fr; gap: 3rem; }
  #blog-grid { grid-template-columns: 1fr 1fr !important; }
  .blog-card.featured { grid-row: auto; grid-column: auto; }
}

/* ══════════════════════════════════
   RESPONSIVE — MOBILE  ≤640px
══════════════════════════════════ */
@media (max-width: 640px) {

  /* ── Layout base */
  .container { padding: 0 1.25rem; }
  section { padding: 4rem 0; }

  /* ── Nav */
  .nav-inner { padding: 0 1.25rem; }
  .nav-links { display: none; }
  /* Ocultar CV pero mantener controles */
  .btn-cv { display: none; }
  /* Controles (lang + dark) siempre visibles en mobile */
  .nav-controls {
    display: flex; gap: 0.4rem; align-items: center;
  }
  .nav-hamburger { display: flex; margin-left: 0.25rem; }
  /* Nav mobile mejorado */
  .nav-mobile {
    padding: 1.25rem;
    gap: 0;
  }
  .nav-mobile a {
    font-size: 1rem; padding: 0.9rem 0.5rem;
    min-height: 48px; display: flex; align-items: center;
  }
  /* CV link en mobile menu */
  .nav-mobile-cv {
    margin-top: 1rem; padding: 0.9rem 1.25rem;
    background: var(--navy-700); color: #fff !important;
    border-radius: var(--radius-md); text-align: center;
    font-weight: 600; font-size: 0.875rem;
    justify-content: center !important;
    border-bottom: none !important;
  }
  /* Controls inside mobile menu */
  .nav-mobile-controls {
    display: flex; gap: 0.75rem; align-items: center;
    padding: 1rem 0.5rem 0.5rem; margin-top: 0.5rem;
    border-top: 1px solid var(--border);
  }

  /* ── Hero mobile */
  #hero { padding-top: 68px; }
  .hero-left {
    padding: 2.5rem 1.25rem 2rem;
  }
  .hero-eyebrow {
    font-size: 0.68rem; padding: 0.35rem 0.85rem;
    margin-bottom: 1.5rem;
  }
  .hero-name { font-size: clamp(2.75rem, 13vw, 4rem); line-height: 1.0; }
  .hero-subtitle { font-size: 0.975rem; margin-top: 1.25rem; }
  .hero-tags { gap: 0.4rem; margin-top: 1.5rem; }
  .hero-tag { font-size: 0.72rem; padding: 0.35rem 0.8rem; }
  .hero-ctas {
    flex-direction: column; gap: 0.75rem; margin-top: 2rem;
  }
  .btn-primary, .btn-ghost {
    text-align: center; padding: 1rem; font-size: 0.9rem;
    min-height: 48px; display: flex; align-items: center; justify-content: center;
  }

  /* Hero mobile mini-stats strip */
  .hero-mobile-stats {
    display: grid; grid-template-columns: repeat(3,1fr);
    gap: 0; background: #0a1628;
    border-top: 1px solid rgba(255,255,255,0.08);
  }
  .hero-mobile-stat {
    padding: 1.25rem 0.75rem; text-align: center;
    border-right: 1px solid rgba(255,255,255,0.08);
  }
  .hero-mobile-stat:last-child { border-right: none; }
  .hero-mobile-stat-num {
    font-family: var(--serif); font-size: 1.6rem;
    color: #e8f2f9; line-height: 1; letter-spacing: -0.03em;
  }
  .hero-mobile-stat-num sup { font-size: 1rem; color: var(--navy-300); }
  .hero-mobile-stat-lbl {
    font-size: 0.62rem; font-weight: 600; letter-spacing: 0.07em;
    text-transform: uppercase; color: rgba(226,237,248,0.42); margin-top: 0.3rem;
  }

  /* ── Section headings */
  .section-h { font-size: clamp(1.75rem, 8vw, 2.5rem); }
  .section-tag { font-size: 0.68rem; }

  /* ── Sobre */
  .sobre-grid { gap: 2rem; }
  .foto-placeholder { aspect-ratio: 1/1; border-radius: 50%; }
  .foto-placeholder-initials { font-size: 5rem; }
  .foto-caption { gap: 0.5rem; }
  .foto-cap-num { font-size: 1.4rem; }
  /* sobre-lead ya unificado con sobre-body */
  .filosof-block { padding: 1.5rem; }
  .valores-list { margin-top: 2rem; }
  .valor-item { padding: 1.25rem 0; gap: 1rem; }

  /* ── Servicios */
  .servicios-grid { grid-template-columns: 1fr; gap: 1px; border-radius: var(--radius-lg); }
  .servicio-card { padding: 1.75rem 1.5rem; }

  /* ── Timeline */
  .timeline::before { left: 15px; }
  .timeline-dot { width: 32px; height: 32px; font-size: 0.55rem; }
  .timeline-item { gap: 1.25rem; }
  .t-role { font-size: 0.9rem; }

  /* ── Edu */
  .edu-list { gap: 0.6rem; }
  .edu-card { padding: 1rem 1.25rem; }
  .edu-name { font-size: 0.875rem; }

  /* ── Skills */
  .skills-col h3 { margin-bottom: 1.25rem; }

  /* ── Eventos */
  .eventos-grid, .recursos-grid { grid-template-columns: 1fr; }
  .evento-card { padding: 1.5rem; }
  .evento-year { font-size: 2rem; }

  /* ── Blog */
  #blog-grid { grid-template-columns: 1fr !important; gap: 1rem; }
  .blog-card.featured { grid-column: auto; }
  .blog-card.featured .blog-img { height: 130px; }
  .blog-card .blog-img { height: 130px; }
  .blog-body { padding: 1.25rem; }
  .blog-card.featured .blog-title { font-size: 1.2rem; }
  #blog .section-h + div { /* filter row */
    flex-direction: column; gap: 0.75rem; align-items: flex-start;
  }

  /* ── Recursos */
  .recurso-group { padding: 1.5rem; }

  /* ── Contacto */
  .contacto-items { gap: 0.75rem; }
  .contacto-item { padding: 1rem 1.25rem; }
  .form-card { padding: 1.5rem; }
  .form-row { grid-template-columns: 1fr; }
  /* Touch-friendly form inputs */
  .form-group input, .form-group textarea, .form-group select {
    font-size: 16px; /* prevents iOS zoom */
    padding: 0.875rem 1rem;
    min-height: 48px;
  }
  .form-group textarea { min-height: 110px; }
  .btn-send { min-height: 52px; font-size: 0.95rem; }

  /* ── Editor */
  .ep-row { grid-template-columns: 1fr; }
  #editor-panel { padding: 1.5rem 1.25rem; border-radius: var(--radius-lg); }
  .ep-form input[type="text"],
  .ep-form select,
  .ep-form textarea {
    font-size: 16px; /* prevents iOS zoom */
    min-height: 48px;
  }
  #article-body { min-height: 160px; }
  .ep-toolbar { gap: 2px; }
  .tb-btn { padding: 0.4rem 0.5rem; font-size: 0.75rem; min-height: 36px; }
  .ep-actions { gap: 0.5rem; }
  .ep-cancel, .ep-save { min-height: 48px; font-size: 0.875rem; flex: 1; }

  /* ── Reader */
  #article-reader { padding: 4rem 0.75rem 1.5rem; }
  .reader-inner {
    padding: 2rem 1.25rem 1.5rem;
    border-radius: var(--radius-lg);
  }
  .reader-title { font-size: 1.6rem; }
  .reader-body { font-size: 0.95rem; }

  /* ── Footer */
  #footer { padding: 2.5rem 0 2rem; }
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 1.75rem; padding: 0 1.25rem;
    margin-bottom: 2rem;
  }
  .footer-bottom {
    flex-direction: column; gap: 0.35rem; text-align: center;
    padding: 1.25rem 1.25rem 0;
  }

  /* ── Mobile menu controls visibility */
  .nav-mobile-controls { display: flex; }
  .nav-mobile-cv { display: flex; }

  /* ── Admin toggle — más grande para touch */
  #admin-toggle {
    width: 50px; height: 50px; font-size: 1.1rem;
    bottom: 1.5rem; right: 1.25rem;
  }

  /* ── Toast */
  #toast { right: 1rem; bottom: 5.5rem; font-size: 0.82rem; padding: 0.65rem 1.25rem; }
}

/* ══════════════════════════════════
   RESPONSIVE — EXTRA SMALL  ≤380px
══════════════════════════════════ */
@media (max-width: 380px) {
  .hero-name { font-size: 2.6rem; }
  .nav-logo { font-size: 1rem; }
  .lang-btn { padding: 0 0.5rem; font-size: 0.62rem; }
  .theme-toggle { width: 34px; height: 19px; }
  .theme-toggle::after { width: 13px; height: 13px; }
  html[data-theme="dark"] .theme-toggle::after { transform: translateX(15px); }
  .hero-mobile-stat-num { font-size: 1.35rem; }
}


/* ══════════════════════════════════
   DARK MODE
   Activado con: html[data-theme="dark"]
══════════════════════════════════ */
html[data-theme="dark"] {
  --white:    #0f1520;
  --gray-50:  #131c2b;
  --gray-100: #1a2535;
  --gray-200: #1e2d40;
  --gray-300: #2a3d55;
  --gray-400: #4a6478;
  --gray-500: #6a88a0;
  --gray-600: #8aa8c0;
  --gray-700: #b0c8dc;
  --gray-800: #ccdde8;
  --gray-900: #e8f2f9;

  --navy-900: #e2edf8;
  --navy-800: #c8ddf0;
  --navy-700: #a8c8e8;
  --navy-600: #7ab0d8;
  --navy-500: #4a90c2;
  --navy-400: #2d6a9f;
  --navy-300: #1e4a7a;
  --navy-200: #163660;
  --navy-100: #0f2545;
  --navy-50:  #0a1a33;

  --text-primary:   #dce8f4;
  --text-secondary: #8aa8c0;
  --text-muted:     #4a6478;
  --bg-page:        #0f1520;
  --bg-alt:         #131c2b;
  --bg-alt2:        #1a2535;
  --border:         rgba(180,210,235,0.08);
  --border-m:       rgba(180,210,235,0.14);

  --shadow-sm: 0 1px 4px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.35);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.4);
  --shadow-xl: 0 24px 64px rgba(0,0,0,0.45);
}

/* Nav en dark */
html[data-theme="dark"] #mainNav {
  background: rgba(15,21,32,0.95);
  border-bottom-color: rgba(180,210,235,0.08);
}
html[data-theme="dark"] #mainNav.scrolled {
  background: rgba(15,21,32,0.99);
}
html[data-theme="dark"] .nav-mobile {
  background: #131c2b;
  border-bottom-color: rgba(180,210,235,0.08);
}

/* Blog cards dark */
html[data-theme="dark"] .blog-card { background: var(--bg-alt); }

/* Editor dark */
html[data-theme="dark"] #editor-panel {
  background: #131c2b;
  color: var(--text-primary);
}
html[data-theme="dark"] .ep-form input[type="text"],
html[data-theme="dark"] .ep-form select,
html[data-theme="dark"] .ep-form textarea {
  background: #0f1520; border-color: rgba(180,210,235,0.12);
  color: var(--text-primary);
}
html[data-theme="dark"] .ep-form input:focus,
html[data-theme="dark"] .ep-form select:focus,
html[data-theme="dark"] .ep-form textarea:focus {
  background: #1a2535; border-color: var(--navy-400);
}
html[data-theme="dark"] .ep-tabs { background: #0f1520; }
html[data-theme="dark"] .ep-tab.active { background: #1a2535; color: var(--text-primary); }
html[data-theme="dark"] .ep-toolbar { background: #0f1520; border-color: rgba(180,210,235,0.1); }
html[data-theme="dark"] .art-row { background: #0f1520; }
html[data-theme="dark"] .ep-cancel { background: #1a2535; color: var(--text-secondary); }

/* Reader dark */
html[data-theme="dark"] .reader-inner { background: #131c2b; }
html[data-theme="dark"] .reader-close { background: #1a2535; }
html[data-theme="dark"] .reader-cat { background: var(--navy-50); }

/* Edu/evento cards dark */
html[data-theme="dark"] .edu-card { background: #131c2b; }
html[data-theme="dark"] .evento-card { background: #131c2b; }
html[data-theme="dark"] .recurso-group { background: #131c2b; }

html[data-theme="dark"] #servicios { background: #0d1e30; }
html[data-theme="dark"] #contacto { background: #0d1e30; }
html[data-theme="dark"] #footer { background: #0a1628; }
html[data-theme="dark"] .hero-right { background: #0d1e30; }
html[data-theme="dark"] .filosof-block { background: #0d1e30; }
html[data-theme="dark"] .form-card { background: rgba(255,255,255,0.04); }
html[data-theme="dark"] .foto-cap-item { background: #131c2b; }
html[data-theme="dark"] .tech-tag { background: #131c2b; }
html[data-theme="dark"] .blog-filter-btn { color: var(--text-secondary); }


/* ══════════════════════════════════
   NAV: CONTROLES DE TEMA E IDIOMA
══════════════════════════════════ */
.nav-controls {
  display: flex; align-items: center; gap: 0.5rem;
}

/* Interruptor día/noche */
.theme-toggle {
  width: 44px; height: 24px; border-radius: 100px;
  background: var(--gray-200); border: 1.5px solid var(--border-m);
  cursor: pointer; position: relative;
  transition: background 0.3s, border-color 0.3s;
  flex-shrink: 0;
}
.theme-toggle::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--navy-700);
  transition: transform 0.3s, background 0.3s;
}
html[data-theme="dark"] .theme-toggle { background: var(--navy-200); border-color: var(--navy-300); }
html[data-theme="dark"] .theme-toggle::after { transform: translateX(20px); background: #c8ddf0; }

.theme-toggle-wrap {
  display: flex; align-items: center; gap: 0.4rem;
}
.theme-icon {
  font-size: 0.8rem; line-height: 1; pointer-events: none; user-select: none;
}

/* Selector de idioma */
.lang-switcher {
  display: flex; align-items: center;
  background: var(--gray-100); border: 1px solid var(--border);
  border-radius: 100px; overflow: hidden; height: 28px;
}
.lang-btn {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em;
  padding: 0 0.7rem; height: 100%; border: none; background: transparent;
  cursor: pointer; color: var(--gray-500); font-family: var(--sans);
  transition: background 0.2s, color 0.2s;
}
.lang-btn.active { background: var(--navy-700); color: #fff; }
.lang-btn:not(.active):hover { color: var(--navy-600); }

@media (max-width: 640px) {
  .lang-switcher { height: 26px; }
  .lang-btn { font-size: 0.65rem; padding: 0 0.55rem; }
  .theme-toggle { width: 38px; height: 21px; }
  .theme-toggle::after { width: 14px; height: 14px; }
  html[data-theme="dark"] .theme-toggle::after { transform: translateX(17px); }
}
