:root {
  --bg: #0b2f4a;
  --bg-2: #0e3b5f;
  --text: #0f172a;
  --muted: #475569;
  --surface: #f5f7fa;
  --primary: #2e7d32;
  --primary-700: #1b5e20;
  --accent: #ffb300;
  --white: #ffffff;
  --header-h: 64px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--surface);
  line-height: 1.6;
  padding-top: var(--header-h);
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.site-header { background: var(--white); color: var(--text); position: fixed; top: 0; left: 0; right: 0; z-index: 1000; box-shadow: 0 1px 0 rgba(15,23,42,0.06); transition: background 160ms ease, box-shadow 160ms ease, backdrop-filter 160ms ease; }
.site-header.scrolled { background: rgba(255,255,255,0.75); box-shadow: 0 4px 12px rgba(15,23,42,0.08); backdrop-filter: saturate(180%) blur(10px); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 0; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--text); text-decoration: none; font-weight: 700; letter-spacing: 0.2px; }
.logo-badge { width: 32px; height: 32px; border-radius: 10px; background: linear-gradient(135deg, #07c180, #0ea77a); color: var(--white); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.brand-name { font-weight: 700; }
.site-nav { display: flex; gap: 1rem; align-items: center; }
.site-nav a { color: #334155; text-decoration: none; font-weight: 600; }
.site-nav a:hover { color: #0f172a; }
.site-nav .cta { background: var(--primary); color: var(--white); padding: 0.45rem 0.8rem; border-radius: 10px; }
.site-nav .cta:hover { background: var(--primary-700); }

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  color: var(--white);
  padding: 0.25rem 0.5rem;
}

.hero { background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%); color: var(--text); padding: 4rem 0 2.5rem; position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; width: 360px; height: 360px; left: 35%; top: 45%; background: radial-gradient(closest-side, rgba(99,102,241,0.28), rgba(99,102,241,0.0) 65%); filter: blur(20px); z-index: 0; }
.hero::after { content: ""; position: absolute; width: 300px; height: 300px; right: 5%; top: 20%; background: radial-gradient(closest-side, rgba(251,191,36,0.25), rgba(251,191,36,0.0) 60%); filter: blur(18px); z-index: 0; }
.hero-inner h1 { font-family: Merriweather, Georgia, serif; font-size: clamp(2.2rem, 5vw, 3.75rem); margin: 0 0 1rem; color: #0f172a; }
.highlight { color: var(--primary); }
.pill { display: inline-block; background: #e2f3e5; color: var(--primary-700); border: 1px solid #c6e8cb; border-radius: 999px; padding: 0.25rem 0.6rem; font-weight: 700; font-size: 0.85rem; margin-bottom: 0.75rem; }
.hero-grid { display: grid; grid-template-columns: 1fr 420px; gap: 2rem; align-items: center; }
.hero-grid { position: relative; z-index: 1; }
.hero-copy p { max-width: 800px; color: #334155; }
.hero-meta { display: flex; gap: 1rem; list-style: none; padding: 0; margin: 1rem 0 0; color: #64748b; }
.hero-media { display: flex; justify-content: center; }
.avatar-card { background: var(--white); border: 1px solid #e5e7eb; border-radius: 16px; padding: 1rem; box-shadow: 0 20px 60px rgba(2,6,23,0.08); width: 100%; max-width: 420px; display: flex; align-items: center; justify-content: center; }
.avatar { width: 320px; height: 320px; border-radius: 999px; overflow: hidden; border: 4px solid #ffffff; box-shadow: 0 0 0 6px rgba(14,167,122,0.20), 0 12px 36px rgba(2,6,23,0.14); transition: box-shadow 180ms ease, transform 180ms ease; will-change: box-shadow, transform; }
.avatar-img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.avatar:hover { box-shadow: 0 0 0 8px rgba(14,167,122,0.26), 0 18px 48px rgba(2,6,23,0.18); transform: translateY(-2px); }
.hero-inner p { max-width: 800px; }
.hero-actions { margin: 1.25rem 0; display: flex; gap: 0.75rem; }
.btn {
  display: inline-block;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
}
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-700); }
.btn-secondary { background: #e2e8f0; color: #0f172a; }
.btn-secondary:hover { background: #cbd5e1; }
.credenciales {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}
.credenciales li {
  padding: 0.35rem 0.6rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px;
}

section { padding: 2.5rem 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
.lista-check { list-style: none; padding: 0; margin: 0.5rem 0 1rem; }
.lista-check li { margin: 0.4rem 0; }
.badge-line { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.badge { background: #e2f3e5; color: var(--primary-700); padding: 0.35rem 0.6rem; border-radius: 999px; font-size: 0.85rem; }

.charlas .cards,
.proyectos .cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.card { background: var(--white); border: 1px solid #e5e7eb; border-radius: 12px; padding: 1rem; box-shadow: 0 1px 2px rgba(0,0,0,0.04); }
.section-actions { margin-top: 1rem; }

.blog .list-posts { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }
.post { background: var(--white); border: 1px solid #e5e7eb; border-radius: 12px; padding: 1rem; }

.quotes { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
blockquote { background: var(--white); border-left: 4px solid var(--accent); padding: 1rem; border-radius: 8px; margin: 0; }
cite { display: block; margin-top: 0.5rem; color: var(--muted); }

.contact-form { background: var(--white); border: 1px solid #e5e7eb; border-radius: 12px; padding: 1rem; }
.form-field { display: grid; gap: 0.35rem; margin-bottom: 0.75rem; }
label { font-weight: 600; }
input, textarea { border: 1px solid #d1d5db; border-radius: 8px; padding: 0.6rem; font: inherit; }
.contact-info { background: #edf2ff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 1rem; }
.social { list-style: none; padding: 0; display: flex; gap: 0.75rem; }
.social a { color: var(--bg); font-weight: 600; text-decoration: none; }

.site-footer { background: var(--bg); color: var(--white); }
.site-footer .container { padding: 1.5rem 1.25rem; text-align: initial; }
.site-footer a { color: #dbeafe; text-decoration: none; }
.site-footer a:hover { color: #ffffff; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 1.25rem; align-items: start; }
.footer-brand { display: flex; align-items: flex-start; gap: 0.75rem; }
.footer-brand strong { font-size: 1rem; }
.footer-brand .logo-badge { width: 40px; height: 40px; border-radius: 8px; font-size: 1.1rem; border: 2px solid #ffffff; box-shadow: 0 2px 6px rgba(2,6,23,0.12); }
.footer-links h4,
.footer-tags h4 { margin: 0 0 0.5rem; font-size: 1rem; }
.footer-links ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.4rem; }
.footer-sep { border: 0; border-top: 1px solid rgba(255,255,255,0.12); margin: 1rem 0; }
.footer-copy, .footer-made { text-align: center; margin: 0.35rem 0; color: #e2e8f0; }

@media (max-width: 960px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer-social { display: flex; gap: 0.5rem; justify-content: center; align-items: center; margin-top: 0.5rem; }
.social-link { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 999px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); box-shadow: 0 1px 2px rgba(0,0,0,0.2); transition: transform 120ms ease, filter 120ms ease, background 120ms ease; }
.social-link .social-icon { width: 24px; height: 24px; }
.social-link:hover { transform: translateY(-2px); filter: brightness(1.05); background: rgba(255,255,255,0.12); }
.social-link:active { transform: translateY(0); filter: brightness(0.98); }

@media (max-width: 640px) {
  .footer-social { flex-wrap: wrap; }
}

.cv .section-group { margin: 1.25rem 0; }
.datos-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
.datos-grid div { background: var(--white); border: 1px solid #e5e7eb; border-radius: 10px; padding: 0.75rem; }
.datos-grid span { display: block; color: var(--muted); font-size: 0.85rem; }
.datos-grid strong a { color: var(--bg); text-decoration: none; }
.timeline { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.t-item { background: var(--white); border: 1px solid #e5e7eb; border-radius: 12px; padding: 0.75rem; }
.t-item h4 { margin: 0 0 0.35rem; font-size: 1rem; }

@media (max-width: 960px) {
  .datos-grid { grid-template-columns: 1fr 1fr; }
  .timeline { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .datos-grid { grid-template-columns: 1fr; }
}

@media (max-width: 960px) {
  .grid-2 { grid-template-columns: 1fr; }
  .hero-grid { grid-template-columns: 1fr; }
  .charlas .cards,
  .proyectos .cards,
  .blog .list-posts { grid-template-columns: 1fr 1fr; }
  .quotes { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .site-nav { display: none; position: absolute; top: var(--header-h); right: 0; background: var(--bg); padding: 0.75rem; border-left: 1px solid rgba(255,255,255,0.1); border-bottom: 1px solid rgba(255,255,255,0.1); border-bottom-left-radius: 12px; }
  .site-nav a { display: block; padding: 0.35rem 0.5rem; }
  .nav-toggle { display: inline-block; }
  .charlas .cards,
  .proyectos .cards,
  .blog .list-posts { grid-template-columns: 1fr; }
}
.pill-center { display: inline-block; margin: 0 auto 0.75rem; }
.experiencia { background: #eafff5; position: relative; overflow: hidden; }
.experiencia::before { content: ""; position: absolute; width: 320px; height: 320px; left: -60px; top: 120px; background: radial-gradient(closest-side, rgba(14,167,122,0.20), rgba(14,167,122,0.0) 65%); filter: blur(18px); }
.experiencia::after { content: ""; position: absolute; width: 260px; height: 260px; right: -40px; bottom: 80px; background: radial-gradient(closest-side, rgba(99,102,241,0.18), rgba(99,102,241,0.0) 60%); filter: blur(18px); }
.experiencia h2 { text-align: center; font-family: Merriweather, Georgia, serif; font-size: clamp(1.8rem, 4vw, 2.4rem); color: #0f172a; margin: 0.25rem 0 0.5rem; }
.xp-subtitle { text-align: center; color: #64748b; max-width: 800px; margin: 0 auto 1.25rem; }
.xp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.xp-card { background: var(--white); border: 1px solid #e5e7eb; border-radius: 14px; padding: 1rem; box-shadow: 0 10px 30px rgba(2,6,23,0.05); }
.xp-head { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.5rem; }
.xp-icon { width: 40px; height: 40px; border-radius: 999px; background: linear-gradient(135deg, #07c180, #0ea77a); color: var(--white); display: inline-flex; align-items: center; justify-content: center; }
.xp-icon svg { width: 24px; height: 24px; }
.xp-card h3 { margin: 0; color: var(--primary-700); font-size: 1.05rem; }
.xp-meta { margin: 0; color: #64748b; }
.xp-list { margin: 0.5rem 0 0; padding-left: 1rem; color: #334155; }
.xp-list li { margin: 0.35rem 0; }

@media (max-width: 960px) {
  .xp-grid { grid-template-columns: 1fr; }
}
.stats { background: transparent; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.stat-card { background: var(--white); border: 1px solid #e5e7eb; border-radius: 16px; padding: 1rem 1.25rem; box-shadow: 0 8px 24px rgba(2,6,23,0.06); display: grid; grid-template-columns: 48px 1fr; gap: 0.75rem; align-items: center; min-height: 120px; }
.stat-icon { width: 40px; height: 40px; border-radius: 999px; background: linear-gradient(135deg, #07c180, #0ea77a); color: var(--white); display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(14,167,122,0.25); }
.stat-icon .si { width: 22px; height: 22px; }
.stat-content { display: grid; gap: 0.25rem; align-items: center; }
.stat-value { color: var(--primary); font-weight: 800; font-size: clamp(1.4rem, 3.5vw, 2rem); letter-spacing: 0.5px; line-height: 1; }
.stat-label { color: #64748b; font-weight: 600; }
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(2,6,23,0.10); transition: transform 160ms ease, box-shadow 160ms ease; }

@media (max-width: 960px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .stats-grid { grid-template-columns: 1fr; }
}
.transicion { background: #f1f5f9; position: relative; overflow: hidden; }
.transicion h2 { text-align: center; font-family: Merriweather, Georgia, serif; font-size: clamp(1.8rem, 4vw, 2.4rem); color: #0f172a; margin: 0.25rem 0 0.5rem; }
.t-subtitle { text-align: center; color: #64748b; max-width: 900px; margin: 0 auto 1.25rem; }
.t-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.t-card { background: var(--white); border: 1px solid #e5e7eb; border-radius: 14px; padding: 1rem; box-shadow: 0 10px 30px rgba(2,6,23,0.05); }
.t-head { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.5rem; }
.t-icon { width: 40px; height: 40px; border-radius: 999px; background: linear-gradient(135deg, #07c180, #0ea77a); color: var(--white); display: inline-flex; align-items: center; justify-content: center; }
.t-icon svg { width: 24px; height: 24px; }
.t-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip { display: inline-block; background: #e2e8f0; color: #0f172a; border: 1px solid #e5e7eb; border-radius: 999px; padding: 0.25rem 0.6rem; font-weight: 600; font-size: 0.85rem; }

.cm h2 { text-align: center; font-family: Merriweather, Georgia, serif; font-size: clamp(1.8rem, 4vw, 2.4rem); color: #0f172a; margin: 0.25rem 0 0.5rem; }
.cm-subtitle { text-align: center; color: #64748b; max-width: 900px; margin: 0 auto 1.25rem; }
.cm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.cm-card { background: var(--white); border: 1px solid #e5e7eb; border-radius: 14px; padding: 1rem; box-shadow: 0 10px 30px rgba(2,6,23,0.05); }
.cm-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.cm-thumb { width: 28px; height: 28px; display: inline-block; }
.cm-icon { width: 40px; height: 40px; border-radius: 999px; background: linear-gradient(135deg, #07c180, #0ea77a); color: var(--white); display: inline-flex; align-items: center; justify-content: center; }
.cm-icon svg { width: 24px; height: 24px; }
.cm-chevron { color: #94a3b8; font-size: 1.2rem; }
.cm-desc { color: #64748b; margin: 0.35rem 0 0.35rem; }

@media (max-width: 960px) {
  .t-grid { grid-template-columns: 1fr; }
  .t-cols { grid-template-columns: 1fr; }
  .cm-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .cm-grid { grid-template-columns: 1fr; }
}
.ts { background: #eafff5; }
.cm { background: #eafff5; }
.ts h2 { text-align: center; font-family: Merriweather, Georgia, serif; font-size: clamp(1.8rem, 4vw, 2.4rem); color: #0f172a; margin: 0.25rem 0 0.5rem; }
.ts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.ts-card { background: var(--white); border: 1px solid #e5e7eb; border-radius: 14px; padding: 1rem; box-shadow: 0 10px 30px rgba(2,6,23,0.05); }
.stars { color: #fbbf24; letter-spacing: 2px; font-size: 1.1rem; }
.ts-quote { color: #334155; margin: 0.5rem 0 0.75rem; }
.ts-user { display: flex; align-items: center; gap: 0.6rem; }
.ts-avatar { width: 36px; height: 36px; border-radius: 999px; background: linear-gradient(135deg, #07c180, #0ea77a); color: var(--white); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.ts-role { color: #64748b; }

.contacto h2 { text-align: center; font-family: Merriweather, Georgia, serif; font-size: clamp(1.8rem, 4vw, 2.4rem); color: #0f172a; margin: 0.25rem 0 0.5rem; }
.ct-subtitle { text-align: center; color: #64748b; max-width: 900px; margin: 0 auto 1.25rem; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.contact-card { background: var(--white); border: 1px solid #e5e7eb; border-radius: 14px; padding: 1rem; box-shadow: 0 10px 30px rgba(2,6,23,0.05); }
.contact-list { list-style: none; padding: 0; display: grid; gap: 0.6rem; }
.contact-list .icon { width: 40px; height: 40px; border-radius: 999px; background: linear-gradient(135deg, #07c180, #0ea77a); color: var(--white); display: inline-flex; align-items: center; justify-content: center; margin-right: 0.5rem; }
.contact-list li { display: flex; align-items: center; gap: 0.5rem; }
.ct-help { color: #64748b; margin: 0 0 0.5rem; }

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