/* ─── Reset & Base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-primary:    #0a0b14;
  --bg-secondary:  #0f1122;
  --bg-card:       #131528;
  --bg-card-hover: #1a1e35;
  --border:        rgba(99,102,241,0.15);
  --border-hover:  rgba(99,102,241,0.4);
  --purple:        #6366f1;
  --purple-light:  #818cf8;
  --blue:          #3b82f6;
  --cyan:          #06b6d4;
  --green:         #10b981;
  --orange:        #f59e0b;
  --red:           #ef4444;
  --text-primary:  #f8fafc;
  --text-secondary:#94a3b8;
  --text-muted:    #64748b;
  --gradient-hero: linear-gradient(135deg, #6366f1 0%, #3b82f6 50%, #06b6d4 100%);
  --gradient-card: linear-gradient(135deg, rgba(99,102,241,0.1), rgba(59,130,246,0.05));
  --shadow-card:   0 4px 24px rgba(0,0,0,0.4);
  --shadow-glow:   0 0 40px rgba(99,102,241,0.2);
}

html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--purple); border-radius: 3px; }

a { color: var(--purple-light); }
img { max-width: 100%; display: block; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

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

/* ─── Buttons ─── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: 10px;
  font-weight: 600; font-size: 0.95rem;
  cursor: pointer; text-decoration: none;
  transition: all 0.2s ease; border: none;
}
.btn-primary {
  background: var(--gradient-hero); color: #fff;
  box-shadow: 0 4px 20px rgba(99,102,241,0.4);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(99,102,241,0.5); }
.btn-outline {
  background: transparent; color: var(--text-primary);
  border: 1px solid var(--border-hover);
}
.btn-outline:hover { background: rgba(99,102,241,0.1); border-color: var(--purple); }

/* ─── Badge ─── */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 100px;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.02em;
}
.badge-new { background: rgba(99,102,241,0.15); color: var(--purple-light); border: 1px solid rgba(99,102,241,0.3); }
.badge-hot { background: rgba(239,68,68,0.15); color: #f87171; border: 1px solid rgba(239,68,68,0.3); }
.badge-cool{ background: rgba(6,182,212,0.15); color: #67e8f9; border: 1px solid rgba(6,182,212,0.3); }

/* ─── Nav ─── */
nav.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(10,11,20,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  height: 64px; display: flex; align-items: center;
}
nav.site-nav > .container { max-width: none; padding: 0 32px; }
@media (max-width: 768px) { nav.site-nav > .container { padding: 0 20px; } }
.nav-inner { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.nav-logo {
  font-size: 1.25rem; font-weight: 800;
  text-decoration: none; color: var(--text-primary);
  display: flex; align-items: center; gap: 8px;
}
.nav-logo-icon {
  width: 32px; height: 32px;
  background: var(--gradient-hero);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
}
.nav-links { display: flex; align-items: center; gap: 32px; list-style: none; }
.nav-links a { text-decoration: none; color: var(--text-secondary); font-size: 0.9rem; transition: color 0.2s; }
.nav-links a:hover, .nav-links a.active { color: var(--text-primary); }
.nav-cta { display: flex; align-items: center; gap: 12px; }
@media (max-width: 768px) { .nav-links { display: none; } }

/* ─── Breadcrumbs ─── */
.breadcrumbs {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 32px 0 16px;
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
}
.breadcrumbs a { color: var(--text-secondary); text-decoration: none; }
.breadcrumbs a:hover { color: var(--text-primary); }
.breadcrumbs span.sep { opacity: 0.5; }
.breadcrumbs span.current { color: var(--text-primary); }

/* ─── Blog Hub (index) ─── */
.blog-hero {
  padding: 120px 0 56px;
  background:
    radial-gradient(ellipse 800px 500px at 50% 10%, rgba(99,102,241,0.18) 0%, transparent 70%),
    radial-gradient(ellipse 600px 300px at 80% 60%, rgba(6,182,212,0.10) 0%, transparent 70%);
}
.blog-hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 800; line-height: 1.15; margin-bottom: 18px; }
.blog-hero p { font-size: 1.1rem; color: var(--text-secondary); max-width: 720px; }

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
  padding: 32px 0 80px;
}
.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: all 0.25s ease;
}
.blog-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}
.blog-card-cover {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, #1a1e35 0%, #0f1122 100%);
  position: relative;
  display: block;
}
.blog-card-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; display: block; }
.blog-card:hover .blog-card-cover img { transform: scale(1.04); }
.blog-card.coming .blog-card-cover::after {
  content: 'COMING SOON';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  background: rgba(10, 11, 20, 0.72);
}
.blog-card-body { padding: 24px; flex: 1; display: flex; flex-direction: column; gap: 12px; }
.blog-card-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.blog-card-tag {
  font-size: 0.72rem; font-weight: 600;
  padding: 3px 10px; border-radius: 100px;
  background: rgba(99,102,241,0.12); color: var(--purple-light);
  letter-spacing: 0.04em; text-transform: uppercase;
}
.blog-card h3 {
  font-size: 1.2rem; font-weight: 700;
  color: var(--text-primary); line-height: 1.3;
}
.blog-card h3 a { color: inherit; text-decoration: none; }
.blog-card h3 a:hover { color: var(--purple-light); }
.blog-card p { font-size: 0.92rem; color: var(--text-secondary); }
.blog-card-meta {
  margin-top: auto; padding-top: 12px;
  display: flex; justify-content: space-between;
  font-size: 0.8rem; color: var(--text-muted);
}

/* ─── Article ─── */
.article-wrap {
  padding: 96px 0 64px;
  background:
    radial-gradient(ellipse 800px 400px at 50% 0%, rgba(99,102,241,0.15) 0%, transparent 70%);
}
.article-header { max-width: 820px; margin: 0 auto; padding: 24px 0 32px; }
.article-eyebrow { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.article-title {
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  font-weight: 800; line-height: 1.18;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
}
.article-lede {
  font-size: 1.18rem; color: var(--text-secondary);
  line-height: 1.6; margin-bottom: 24px;
}
.article-meta {
  display: flex; flex-wrap: wrap; gap: 20px;
  font-size: 0.88rem; color: var(--text-muted);
  padding: 16px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.article-meta strong { color: var(--text-secondary); font-weight: 500; }

.article-cover { max-width: 1080px; margin: 32px auto; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-card); }
.article-cover img { width: 100%; height: auto; }

.article-body {
  max-width: 820px;
  margin: 0 auto;
  padding: 24px 0 64px;
  font-size: 1.05rem;
  color: var(--text-secondary);
}
.article-body h2 {
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  color: var(--text-primary);
  font-weight: 700; line-height: 1.25;
  margin: 48px 0 18px;
  scroll-margin-top: 80px;
}
.article-body h3 {
  font-size: 1.25rem; color: var(--text-primary);
  font-weight: 700; margin: 32px 0 12px;
}
.article-body p { margin-bottom: 18px; }
.article-body ul, .article-body ol { margin: 0 0 20px 1.4em; }
.article-body li { margin-bottom: 8px; }
.article-body strong { color: var(--text-primary); }
.article-body a { color: var(--purple-light); text-decoration: underline; text-decoration-color: rgba(129,140,248,0.4); text-underline-offset: 3px; }
.article-body a:hover { text-decoration-color: var(--purple-light); }
.article-body code {
  font-family: 'SF Mono', 'Monaco', 'Cascadia Code', monospace;
  background: rgba(99,102,241,0.12);
  color: var(--purple-light);
  padding: 2px 7px; border-radius: 5px;
  font-size: 0.92em;
}
.article-body blockquote {
  border-left: 3px solid var(--purple);
  background: rgba(99,102,241,0.06);
  margin: 24px 0;
  padding: 16px 20px;
  border-radius: 0 8px 8px 0;
  color: var(--text-secondary);
  font-style: italic;
}

/* TOC */
.toc {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  margin: 0 0 36px;
}
.toc-title {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 12px;
}
.toc ol { margin: 0 0 0 1.2em; padding: 0; }
.toc li { margin-bottom: 6px; font-size: 0.95rem; }
.toc a { color: var(--text-secondary); text-decoration: none; }
.toc a:hover { color: var(--purple-light); }

/* Figures */
figure {
  margin: 32px 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
figure img { width: 100%; height: auto; }
figcaption {
  padding: 12px 18px;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
}
.figure-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin: 32px 0;
}
.figure-grid figure { margin: 0; }

/* Comparison table */
.cmp-table {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0;
  font-size: 0.93rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.cmp-table th, .cmp-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.cmp-table thead th {
  background: rgba(99,102,241,0.08);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
}
.cmp-table tbody tr:last-child td { border-bottom: none; }
.cmp-table tbody tr:hover td { background: rgba(99,102,241,0.04); }
.cmp-table .row-label { color: var(--text-primary); font-weight: 600; }
.cmp-table .win { color: #34d399; font-weight: 600; }
.cmp-table .lose { color: #f87171; }
.cmp-table .tie { color: var(--text-muted); }
.cmp-wrap { overflow-x: auto; }

/* Callouts */
.callout {
  border-radius: 12px;
  padding: 18px 22px;
  margin: 28px 0;
  border: 1px solid var(--border);
  background: var(--gradient-card);
}
.callout-title { font-weight: 700; color: var(--text-primary); margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.callout p:last-child { margin-bottom: 0; }
.callout.info { border-color: rgba(59,130,246,0.3); background: rgba(59,130,246,0.06); }
.callout.tip  { border-color: rgba(16,185,129,0.3); background: rgba(16,185,129,0.06); }
.callout.warn { border-color: rgba(245,158,11,0.3); background: rgba(245,158,11,0.06); }

/* Responsive YouTube */
.video-embed {
  position: relative; width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  margin: 32px 0;
  border: 1px solid var(--border);
  background: #000;
}
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Inline CTA */
.inline-cta {
  margin: 40px 0;
  padding: 28px 28px;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(99,102,241,0.18) 0%, rgba(6,182,212,0.10) 100%);
  border: 1px solid var(--border-hover);
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.inline-cta-text h4 { color: var(--text-primary); font-size: 1.15rem; margin-bottom: 4px; }
.inline-cta-text p { color: var(--text-secondary); font-size: 0.92rem; margin: 0; }

/* FAQ */
.faq-list { margin: 24px 0 16px; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-card);
  margin-bottom: 12px;
  overflow: hidden;
}
.faq-item summary {
  padding: 18px 22px;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-primary);
  list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  color: var(--purple-light);
  font-size: 1.4rem; line-height: 1; transition: transform 0.2s;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item[open] summary { border-bottom: 1px solid var(--border); }
.faq-answer { padding: 16px 22px 20px; color: var(--text-secondary); font-size: 0.96rem; }

/* Related */
.related-section { padding: 48px 0; border-top: 1px solid var(--border); }
.related-section h2 { font-size: 1.5rem; margin-bottom: 20px; color: var(--text-primary); }
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}
.related-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
}
.related-card:hover { border-color: var(--border-hover); transform: translateY(-2px); }
.related-card .tag {
  font-size: 0.7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--purple-light); margin-bottom: 6px; display: block;
}
.related-card h4 { font-size: 1rem; color: var(--text-primary); font-weight: 600; line-height: 1.3; }
.related-card.coming { opacity: 0.55; cursor: default; }
.related-card.coming:hover { transform: none; border-color: var(--border); }

/* ─── Footer ─── */
footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 60px 0 30px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand-desc { color: var(--text-muted); font-size: 0.88rem; margin: 12px 0 20px; line-height: 1.7; }
.footer-social { display: flex; gap: 12px; }
.social-icon {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg-card); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); text-decoration: none;
  transition: all 0.2s;
}
.social-icon:hover { background: var(--bg-card-hover); border-color: var(--border-hover); color: var(--text-primary); }
.footer-col h5 { font-size: 0.85rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 16px; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: var(--text-muted); text-decoration: none; font-size: 0.88rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--text-primary); }
.footer-bottom {
  margin-top: 40px; padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px;
}
.footer-copy { font-size: 0.82rem; color: var(--text-muted); }
.footer-legal { display: flex; gap: 20px; }
.footer-legal a { color: var(--text-muted); text-decoration: none; font-size: 0.82rem; }
.footer-legal a:hover { color: var(--text-primary); }
