/* ==========================================================
   Lemus Digital — Blog stylesheet
   Shared by /blog/index.html and every /blog/{slug}/index.html
   Same design tokens as the landing, plus blog-specific styles.
   ========================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

:root {
  --navy-950: #060F1A;
  --navy-900: #0B1A2A;
  --navy-800: #11253A;
  --navy-700: #1A3450;
  --navy-600: #2A4A6A;

  --cyan-500: #3DA9DC;
  --cyan-400: #5BBDE8;
  --cyan-300: #8DD3F0;
  --cyan-glow: rgba(61, 169, 220, 0.25);

  --slate-50: #F4F7FA;
  --slate-100: #E8EEF3;
  --slate-200: #C8D3DE;
  --slate-300: #9AAABB;
  --slate-400: #6B7E92;
  --slate-500: #4A5D72;

  --bg: var(--navy-950);
  --surface: var(--navy-800);
  --surface-2: rgba(255,255,255,0.03);
  --border: rgba(255,255,255,0.08);
  --border-soft: rgba(255,255,255,0.05);
  --text: #F4F7FA;
  --text-muted: #9AAABB;
  --accent: var(--cyan-500);

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --container: 1240px;
  --container-narrow: 760px;
  --gap: clamp(16px, 2vw, 28px);

  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

::selection { background: var(--cyan-500); color: var(--navy-950); }

/* ===== i18n toggle ===== */
html[lang="es"] [data-lang="en"],
html[lang="en"] [data-lang="es"] {
  display: none !important;
}

/* ===== Layout ===== */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px);
}
.container-narrow {
  width: 100%;
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 32px);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan-400);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--cyan-400);
}

.serif-accent {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--cyan-400);
  letter-spacing: -0.01em;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 15px;
  transition: all 0.25s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--cyan-500);
  color: var(--navy-950);
  box-shadow: 0 0 0 1px var(--cyan-500), 0 8px 30px -8px var(--cyan-glow);
}
.btn-primary:hover {
  background: var(--cyan-400);
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px var(--cyan-400), 0 12px 40px -8px var(--cyan-glow);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  border-color: var(--cyan-400);
  color: var(--cyan-400);
}
.btn .arrow { transition: transform 0.25s ease; }
.btn:hover .arrow { transform: translateX(4px); }

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 18px 0;
  transition: all 0.3s ease;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(6, 15, 26, 0.5);
  border-bottom: 1px solid transparent;
}
.header.scrolled {
  background: rgba(6, 15, 26, 0.85);
  border-bottom-color: var(--border-soft);
  padding: 12px 0;
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: white;
  padding: 6px;
  display: grid;
  place-items: center;
  transition: all 0.25s ease;
  box-shadow: 0 0 0 1px var(--border-soft);
}
.brand:hover .brand-mark {
  box-shadow: 0 0 0 1px rgba(61, 169, 220, 0.4), 0 0 20px -6px var(--cyan-glow);
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 14px;
}
.nav-links a {
  color: var(--text-muted);
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--cyan-400); }

.nav-cta { display: flex; align-items: center; gap: 16px; }
.nav-cta .btn { padding: 10px 18px; font-size: 14px; }

.lang-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  padding-right: 16px;
  border-right: 1px solid var(--border);
}
.lang-switch button {
  color: var(--text-muted);
  transition: color 0.2s ease;
  padding: 4px 2px;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
}
.lang-switch button:hover { color: var(--text); }
.lang-switch button[aria-current="page"] { color: var(--cyan-400); }
.lang-switch .sep { color: var(--border); }

@media (max-width: 880px) {
  .nav-links { display: none; }
  .nav-cta .btn { display: none; }
  .lang-switch { padding-right: 12px; border-right: none; }
}

/* ===== Blog hero (used by /blog/index) ===== */
.blog-hero {
  position: relative;
  padding: 160px 0 60px;
  overflow: hidden;
}
.blog-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 40% at 30% 0%, rgba(61, 169, 220, 0.14), transparent 60%),
    radial-gradient(ellipse 50% 30% at 80% 30%, rgba(61, 169, 220, 0.08), transparent 60%);
  pointer-events: none;
}
.blog-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 800px;
}
.blog-hero h1 {
  font-size: clamp(40px, 5.5vw, 64px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 22px 0 20px;
}
.blog-hero p {
  font-size: clamp(17px, 1.4vw, 19px);
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 60ch;
}

/* ===== Category filter ===== */
.cat-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 32px 0 48px;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 48px;
}
.cat-pill {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  color: var(--text-muted);
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}
.cat-pill:hover {
  color: var(--text);
  border-color: var(--cyan-400);
}
.cat-pill[aria-pressed="true"] {
  background: rgba(61, 169, 220, 0.12);
  color: var(--cyan-300);
  border-color: rgba(61, 169, 220, 0.4);
}
.cat-pill .count {
  margin-left: 6px;
  opacity: 0.6;
  font-size: 11px;
}

/* ===== Post list ===== */
.post-list {
  display: grid;
  gap: 24px;
  padding-bottom: 100px;
}
.post-card {
  display: block;
  padding: 32px;
  background: linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0.005));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.post-card:hover {
  border-color: rgba(61, 169, 220, 0.3);
  transform: translateY(-2px);
}
.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.post-meta .cat {
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(61, 169, 220, 0.08);
  color: var(--cyan-400);
  border: 1px solid rgba(61, 169, 220, 0.15);
}
.post-meta .sep { opacity: 0.4; }
.post-card h2 {
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 12px;
}
.post-card .excerpt {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.65;
  margin-bottom: 18px;
}
.post-card .read-more {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--cyan-400);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.post-card:hover .read-more { color: var(--cyan-300); }

.empty-state {
  padding: 60px 32px;
  text-align: center;
  color: var(--text-muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
}

/* ===== Article (single post) ===== */
.article-hero {
  padding: 140px 0 40px;
  position: relative;
  overflow: hidden;
}
.article-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(61, 169, 220, 0.12), transparent 70%);
  pointer-events: none;
}
.article-hero-inner {
  position: relative;
  z-index: 1;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 32px;
  transition: color 0.2s ease;
}
.back-link:hover { color: var(--cyan-400); }
.article-hero h1 {
  font-size: clamp(32px, 4.5vw, 56px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.08;
  margin: 18px 0 24px;
}
.article-hero .lede {
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.5;
  color: var(--slate-200);
  max-width: 60ch;
  margin-bottom: 32px;
}
.article-byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding-top: 28px;
  border-top: 1px solid var(--border-soft);
  font-size: 14px;
  color: var(--text-muted);
}
.article-byline .author {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}
.article-byline .author-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan-500), var(--navy-600));
  display: grid;
  place-items: center;
  font-family: var(--font-serif);
  font-style: italic;
  color: white;
  font-size: 16px;
}
.article-byline .meta-sep {
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--border);
}

/* ===== Article body ===== */
.article-body {
  padding: 60px 0 100px;
}
.article-body h2 {
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 56px 0 20px;
  color: var(--text);
}
.article-body h2:first-child { margin-top: 0; }
.article-body h3 {
  font-size: clamp(20px, 2vw, 24px);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
  margin: 36px 0 14px;
  color: var(--text);
}
.article-body p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--slate-100);
  margin-bottom: 22px;
}
.article-body p strong { color: var(--text); font-weight: 600; }
.article-body a {
  color: var(--cyan-400);
  border-bottom: 1px solid rgba(61, 169, 220, 0.3);
  transition: border-color 0.2s ease;
}
.article-body a:hover { border-bottom-color: var(--cyan-400); }
.article-body ul,
.article-body ol {
  margin: 0 0 24px 0;
  padding-left: 0;
  list-style: none;
}
.article-body ul li,
.article-body ol li {
  font-size: 17px;
  line-height: 1.7;
  color: var(--slate-100);
  margin-bottom: 10px;
  padding-left: 24px;
  position: relative;
}
.article-body ul li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 13px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan-500);
}
.article-body ol { counter-reset: ol-counter; }
.article-body ol li {
  counter-increment: ol-counter;
}
.article-body ol li::before {
  content: counter(ol-counter) '.';
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--cyan-400);
  font-weight: 500;
}
.article-body code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(61, 169, 220, 0.1);
  color: var(--cyan-300);
  border: 1px solid rgba(61, 169, 220, 0.15);
}
.article-body pre {
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  overflow-x: auto;
  margin: 24px 0 28px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
}
.article-body pre code {
  background: none;
  padding: 0;
  border: none;
  color: var(--slate-100);
  font-size: inherit;
}
.article-body blockquote {
  margin: 32px 0;
  padding: 20px 28px;
  border-left: 3px solid var(--cyan-400);
  background: rgba(61, 169, 220, 0.04);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 19px;
  line-height: 1.55;
  color: var(--slate-100);
}
.article-body .callout {
  margin: 32px 0;
  padding: 22px 26px;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.article-body .callout strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan-400);
  margin-bottom: 8px;
}
.article-body .callout p:last-child { margin-bottom: 0; }
.article-body hr {
  border: none;
  border-top: 1px solid var(--border-soft);
  margin: 48px 0;
}

/* ===== Article footer / CTA ===== */
.article-footer {
  background: var(--navy-900);
  border-top: 1px solid var(--border);
  padding: 80px 0;
}
.article-cta {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}
.article-cta h3 {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  line-height: 1.15;
}
.article-cta p {
  color: var(--text-muted);
  font-size: 17px;
  line-height: 1.6;
  margin-bottom: 28px;
}
.article-cta .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}

/* ===== Footer ===== */
footer.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
  background: var(--navy-950);
}
.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 13px;
  color: var(--text-muted);
}
.footer-row .legal { font-family: var(--font-mono); letter-spacing: 0.05em; }
.footer-row a { color: var(--text-muted); transition: color 0.2s ease; }
.footer-row a:hover { color: var(--text); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
