/* ===================================================
   LEARN PAGES — AI SEO OPTIMIZED
   Matches main site aesthetic (Linear/Vercel/Stripe)
   Static HTML for maximum crawlability
   =================================================== */
:root {
  --bg-base: #050505;
  --bg-elevated: #0A0A0A;
  --bg-card: #0F0F0F;
  --bg-card-hover: #141414;
  --bg-surface: #1A1A1A;
  --accent: #6366F1;
  --accent-light: #818CF8;
  --accent-bright: #A5B4FC;
  --blue: #3B82F6;
  --teal: #06B6D4;
  --green: #10B981;
  --purple: #8B5CF6;
  --amber: #F59E0B;
  --text-primary: #EDEDED;
  --text-secondary: #A1A1A1;
  --text-muted: #737373;
  --border: rgba(255,255,255,0.06);
  --border-hover: rgba(255,255,255,0.12);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font);
  color: var(--text-primary);
  line-height: 1.7;
  background: var(--bg-base);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before {
  content: ''; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none; z-index: 9998; opacity: 0.4;
}
a { color: var(--accent-light); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-bright); }

/* Header */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(5,5,5,0.85); backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 24px;
  display: flex; justify-content: space-between; align-items: center; height: 56px;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-mark {
  width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--blue));
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.8rem; color: #fff;
}
.logo-text { font-weight: 700; font-size: 0.95rem; color: var(--text-primary); letter-spacing: -0.02em; }
.logo-text span { color: var(--text-muted); font-weight: 400; }
.header-nav { display: flex; gap: 24px; align-items: center; }
.header-nav a { font-size: 0.85rem; color: var(--text-secondary); font-weight: 500; }
.header-nav a:hover { color: var(--text-primary); }
.btn-cta {
  padding: 8px 20px; border-radius: var(--radius-full);
  background: var(--text-primary); color: var(--bg-base);
  font-weight: 600; font-size: 0.8rem; border: none; cursor: pointer;
  transition: all 0.2s;
}
.btn-cta:hover { opacity: 0.9; transform: translateY(-1px); }

/* Breadcrumb */
.breadcrumb {
  max-width: 760px; margin: 0 auto; padding: 80px 24px 0;
  font-size: 0.8rem; font-family: var(--mono); color: var(--text-muted);
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent-light); }
.breadcrumb .sep { margin: 0 8px; opacity: 0.4; }

/* Article Layout */
.article-container { max-width: 760px; margin: 0 auto; padding: 32px 24px 80px; }
.article-overline {
  font-family: var(--mono); font-weight: 600; font-size: 0.65rem;
  text-transform: uppercase; letter-spacing: 2px; color: var(--accent);
  margin-bottom: 16px;
}
.article-title {
  font-size: clamp(2rem, 5vw, 2.8rem); font-weight: 800;
  letter-spacing: -0.04em; line-height: 1.08; color: var(--text-primary);
  margin-bottom: 16px;
}
.article-subtitle {
  font-size: 1.15rem; color: var(--text-secondary); line-height: 1.6;
  margin-bottom: 24px;
}
.article-meta {
  display: flex; gap: 20px; align-items: center; padding: 16px 0;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  margin-bottom: 40px; font-size: 0.82rem; color: var(--text-muted);
  font-family: var(--mono);
}
.article-meta .author { color: var(--text-secondary); font-weight: 500; }
.article-meta .date { color: var(--text-muted); }
.article-meta .read-time { color: var(--text-muted); }

/* Article Body */
.article-body h2 {
  font-size: 1.5rem; font-weight: 700; letter-spacing: -0.03em;
  margin: 48px 0 16px; color: var(--text-primary);
}
.article-body h3 {
  font-size: 1.15rem; font-weight: 600; letter-spacing: -0.02em;
  margin: 32px 0 12px; color: var(--text-primary);
}
.article-body p {
  margin-bottom: 20px; color: var(--text-secondary); line-height: 1.75;
}
.article-body strong { color: var(--text-primary); font-weight: 600; }
.article-body ul, .article-body ol {
  margin: 0 0 24px 24px; color: var(--text-secondary);
}
.article-body li { margin-bottom: 8px; line-height: 1.65; }

/* Callout / Key Point Boxes */
.callout {
  background: var(--bg-card); border: 1px solid var(--border);
  border-left: 3px solid var(--accent); border-radius: var(--radius);
  padding: 20px 24px; margin: 28px 0;
}
.callout-title {
  font-family: var(--mono); font-weight: 600; font-size: 0.7rem;
  text-transform: uppercase; letter-spacing: 1.5px; color: var(--accent);
  margin-bottom: 8px;
}
.callout p { margin-bottom: 0; color: var(--text-secondary); font-size: 0.95rem; }

/* Data Table */
.data-table { width: 100%; border-collapse: collapse; margin: 24px 0; }
.data-table th {
  font-family: var(--mono); font-weight: 600; font-size: 0.7rem;
  text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-muted);
  text-align: left; padding: 12px 16px;
  border-bottom: 1px solid var(--border-hover);
}
.data-table td {
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  font-size: 0.9rem; color: var(--text-secondary);
}
.data-table .mono { font-family: var(--mono); color: var(--text-primary); font-weight: 500; }

/* FAQ Section */
.faq-section { margin: 48px 0; }
.faq-item {
  border: 1px solid var(--border); border-radius: var(--radius);
  margin-bottom: 12px; overflow: hidden;
}
.faq-question {
  padding: 16px 20px; font-weight: 600; font-size: 0.95rem;
  color: var(--text-primary); cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  background: var(--bg-card); transition: background 0.2s;
}
.faq-question:hover { background: var(--bg-card-hover); }
.faq-answer {
  padding: 0 20px 16px; color: var(--text-secondary); font-size: 0.9rem;
  line-height: 1.7; display: none;
}
.faq-item.open .faq-answer { display: block; }
.faq-item.open .faq-question { border-bottom: 1px solid var(--border); }
.faq-toggle { font-size: 1.2rem; color: var(--text-muted); transition: transform 0.2s; }
.faq-item.open .faq-toggle { transform: rotate(45deg); }

/* CTA Banner */
.cta-banner {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 40px;
  text-align: center; margin: 48px 0;
}
.cta-banner h3 {
  font-size: 1.4rem; font-weight: 700; margin-bottom: 8px;
  color: var(--text-primary);
}
.cta-banner p { color: var(--text-secondary); margin-bottom: 20px; font-size: 0.95rem; }
.cta-banner .btn-accent {
  display: inline-block; padding: 12px 32px; border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--accent), var(--blue));
  color: #fff; font-weight: 600; font-size: 0.9rem;
  box-shadow: 0 0 20px rgba(99,102,241,0.3); transition: all 0.2s;
}
.cta-banner .btn-accent:hover { transform: translateY(-2px); box-shadow: 0 0 30px rgba(99,102,241,0.4); }
.cta-banner .btn-secondary {
  display: inline-block; padding: 12px 32px; border-radius: var(--radius-full);
  border: 1px solid var(--border-hover); color: var(--text-secondary);
  font-weight: 500; font-size: 0.9rem; margin-left: 12px; transition: all 0.2s;
}
.cta-banner .btn-secondary:hover { border-color: var(--accent); color: var(--text-primary); }

/* Related Articles Grid */
.related { margin: 48px 0; }
.related h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 20px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.related-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; transition: all 0.2s;
  text-decoration: none;
}
.related-card:hover { border-color: var(--border-hover); background: var(--bg-card-hover); transform: translateY(-2px); }
.related-card .label {
  font-family: var(--mono); font-size: 0.6rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 1.5px; color: var(--accent);
  margin-bottom: 8px;
}
.related-card h4 { font-size: 0.95rem; font-weight: 600; color: var(--text-primary); margin-bottom: 6px; }
.related-card p { font-size: 0.82rem; color: var(--text-muted); line-height: 1.5; }

/* Footer */
.footer {
  border-top: 1px solid var(--border); padding: 32px 0;
  text-align: center; font-size: 0.8rem; color: var(--text-muted);
}
.footer-inner { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.footer a { color: var(--text-secondary); }
.footer .nmls { font-family: var(--mono); font-size: 0.7rem; margin-top: 8px; color: var(--text-muted); }

/* Hub Page Styles */
.hub-hero { text-align: center; padding: 100px 24px 40px; max-width: 760px; margin: 0 auto; }
.hub-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.2rem); font-weight: 800;
  letter-spacing: -0.05em; line-height: 1.05;
  background: linear-gradient(135deg, #A5B4FC, #3B82F6, #06B6D4, #10B981);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; margin-bottom: 16px;
}
.hub-hero p { font-size: 1.1rem; color: var(--text-secondary); max-width: 560px; margin: 0 auto; }

.hub-grid { max-width: 1100px; margin: 0 auto; padding: 0 24px 80px; }
.hub-section { margin-bottom: 48px; }
.hub-section-title {
  font-family: var(--mono); font-weight: 600; font-size: 0.65rem;
  text-transform: uppercase; letter-spacing: 2px; color: var(--accent);
  margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--border);
}
.hub-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.hub-card {
  display: block; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; transition: all 0.25s;
  text-decoration: none;
}
.hub-card:hover { border-color: var(--accent); background: var(--bg-card-hover); transform: translateY(-3px); }
.hub-card h3 { font-size: 1rem; font-weight: 600; color: var(--text-primary); margin-bottom: 8px; }
.hub-card p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.55; margin-bottom: 12px; }
.hub-card .meta { font-family: var(--mono); font-size: 0.65rem; color: var(--text-muted); }

/* Responsive */
@media (max-width: 768px) {
  .header-nav { display: none; }
  .article-title { font-size: 1.8rem; }
  .article-meta { flex-wrap: wrap; gap: 12px; }
  .cta-banner { padding: 28px 20px; }
  .cta-banner .btn-secondary { display: block; margin: 12px auto 0; }
  .hub-cards { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
}
