:root {
  --primary: #a78bfa;
  --primary-dark: #7c3aed;
  --primary-light: #1e1533;
  --accent: #f59e0b;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --bg: #0f0f13;
  --surface: #18181f;
  --surface2: #1e1e28;
  --border: #2a2a38;
  --shadow: 0 1px 3px rgba(0,0,0,.4);
  --shadow-md: 0 4px 20px rgba(0,0,0,.5);
  --radius: 14px;
  --radius-sm: 8px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1160px; margin: 0 auto; padding: 0 20px; }

/* ── HEADER ── */
header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(15,15,19,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; gap: 24px;
  height: 64px;
}
.logo {
  display: flex; align-items: center; gap: 8px;
  font-size: 1.25rem; font-weight: 800; color: var(--text);
  text-decoration: none; flex-shrink: 0;
}
.logo:hover { text-decoration: none; }
.logo-icon { font-size: 1.5rem; }
.logo-text { background: linear-gradient(135deg, #a78bfa, #60a5fa); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
nav a {
  color: var(--text-muted); font-size: .9rem; font-weight: 500;
  padding: 6px 12px; border-radius: var(--radius-sm); transition: .15s;
}
nav a:hover { color: var(--primary); background: var(--primary-light); text-decoration: none; }

.nav-toggle { display: none; background: none; border: none; font-size: 1.3rem; cursor: pointer; margin-left: auto; color: var(--text); }

/* ── TAGS ── */
.tag {
  display: inline-block; font-size: .72rem; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 20px;
}
.tag-neurociencia { background: #1e3a5f; color: #60a5fa; }
.tag-psicología, .tag-psicologia { background: #3b1f3b; color: #e879f9; }
.tag-bienestar { background: #14291f; color: #34d399; }

/* ── HERO ── */
.hero {
  padding: 60px 0 48px;
  background: radial-gradient(ellipse 80% 60% at 50% -10%, #1e1040 0%, var(--bg) 70%);
}
.hero-inner {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
}
.hero-content { display: flex; flex-direction: column; gap: 16px; }
.hero-content h1 { font-size: 2rem; font-weight: 800; line-height: 1.25; }
.hero-content h1 a { color: var(--text); }
.hero-content h1 a:hover { color: var(--primary); text-decoration: none; }
.hero-excerpt { color: var(--text-muted); font-size: 1.05rem; }
.meta-row { display: flex; gap: 16px; color: var(--text-muted); font-size: .85rem; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--primary-dark); color: #fff; font-weight: 700;
  padding: 12px 24px; border-radius: var(--radius-sm); transition: .15s;
  width: fit-content;
}
.btn-primary:hover { background: var(--primary); text-decoration: none; }
.hero-img img { border-radius: var(--radius); box-shadow: 0 0 40px rgba(124,58,237,.2); object-fit: cover; width: 100%; aspect-ratio: 16/9; }

/* ── ARTICLES GRID ── */
.articles-section { padding: 56px 0; }
.section-title { font-size: 1.4rem; font-weight: 800; margin-bottom: 28px; color: var(--text); }
.articles-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

/* ── CARD ── */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; transition: .2s;
  display: flex; flex-direction: column;
}
.card:hover { box-shadow: 0 0 30px rgba(124,58,237,.15); border-color: #3d2f6e; transform: translateY(-2px); }
.card-img-link img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.card-body { padding: 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-body h3 { font-size: 1rem; font-weight: 700; line-height: 1.35; }
.card-body h3 a { color: var(--text); }
.card-body h3 a:hover { color: var(--primary); text-decoration: none; }
.card-excerpt { color: var(--text-muted); font-size: .88rem; line-height: 1.55; flex: 1; }
.card-meta { display: flex; gap: 12px; color: #64748b; font-size: .8rem; margin-top: auto; padding-top: 8px; border-top: 1px solid var(--border); }

/* ── ARTICLE PAGE ── */
.article-wrap { max-width: 760px; margin: 0 auto; padding: 48px 20px 80px; }
.breadcrumb { font-size: .85rem; color: #64748b; margin-bottom: 20px; }
.breadcrumb a { color: #64748b; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { margin: 0 6px; }

.article-header { margin-bottom: 28px; }
.article-header h1 { font-size: 2rem; font-weight: 800; line-height: 1.25; margin: 12px 0; color: var(--text); }
.article-meta { display: flex; flex-wrap: wrap; gap: 16px; color: var(--text-muted); font-size: .85rem; align-items: center; }

.article-hero-img { margin-bottom: 36px; border-radius: var(--radius); overflow: hidden; }
.article-hero-img img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }

.article-content { font-size: 1.05rem; line-height: 1.85; color: #cbd5e1; }
.article-content h2 {
  font-size: 1.35rem; font-weight: 700; color: var(--text);
  margin: 40px 0 14px; padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}
.article-content h3 { font-size: 1.1rem; font-weight: 700; margin: 24px 0 10px; color: var(--text); }
.article-content p { margin-bottom: 18px; }
.article-content ul, .article-content ol { margin: 0 0 18px 24px; }
.article-content li { margin-bottom: 8px; }
.article-content strong { color: var(--text); }
.article-content blockquote {
  border-left: 3px solid var(--primary);
  background: var(--primary-light);
  padding: 16px 20px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 28px 0; font-style: italic; color: #c4b5fd;
}

.share-box {
  margin-top: 44px; padding: 24px;
  background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border);
}
.share-box h4 { font-size: .95rem; font-weight: 700; margin-bottom: 12px; color: var(--text); }
.share-links { display: flex; gap: 10px; flex-wrap: wrap; }
.share-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--radius-sm); font-size: .85rem; font-weight: 600;
  text-decoration: none; transition: .15s;
}
.share-link:hover { text-decoration: none; opacity: .85; }
.share-tw { background: #1da1f2; color: #fff; }
.share-wa { background: #25d366; color: #fff; }
.share-fb { background: #1877f2; color: #fff; }

/* ── RELATED ── */
.related-section { margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--border); }
.related-section h3 { font-size: 1.2rem; font-weight: 800; margin-bottom: 20px; color: var(--text); }
.related-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }

/* ── STATIC PAGES ── */
.page-wrap { max-width: 760px; margin: 0 auto; padding: 60px 20px 80px; }
.page-wrap h1 { font-size: 2rem; font-weight: 800; margin-bottom: 8px; color: var(--text); }
.page-subtitle { color: var(--text-muted); font-size: 1.05rem; margin-bottom: 36px; }
.page-content { font-size: 1rem; line-height: 1.8; color: #cbd5e1; }
.page-content h2 { font-size: 1.2rem; font-weight: 700; margin: 28px 0 12px; color: var(--text); }
.page-content p { margin-bottom: 16px; }
.page-content ul { margin: 0 0 16px 22px; }
.page-content li { margin-bottom: 6px; }
.page-content a { color: var(--primary); }

.contact-card {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; margin-bottom: 16px;
}
.contact-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.contact-card p { color: var(--text-muted); font-size: .95rem; margin: 0; }
.contact-card a { color: var(--primary); font-weight: 600; }

/* ── FOOTER ── */
footer { background: #090910; border-top: 1px solid var(--border); padding: 48px 0 0; margin-top: 60px; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding-bottom: 40px; }
.footer-brand p { font-size: .9rem; line-height: 1.6; color: #475569; margin-top: 10px; }
.footer-links h4 { color: #94a3b8; font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 14px; }
.footer-links a { display: block; color: #475569; font-size: .9rem; margin-bottom: 8px; transition: .15s; }
.footer-links a:hover { color: var(--primary); text-decoration: none; }
.footer-bottom { border-top: 1px solid #1a1a24; padding: 16px 20px; text-align: center; font-size: .8rem; color: #334155; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .articles-grid { grid-template-columns: repeat(2, 1fr); }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 680px) {
  nav { display: none; }
  nav.open {
    display: flex; flex-direction: column; align-items: flex-start;
    position: absolute; top: 64px; left: 0; right: 0;
    background: var(--surface); border-bottom: 1px solid var(--border);
    padding: 12px 20px; gap: 2px; z-index: 99;
  }
  .nav-toggle { display: block; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-img { display: none; }
  .hero-content h1 { font-size: 1.6rem; }
  .articles-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .article-header h1 { font-size: 1.5rem; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
}
