/* Moalim — Blog CSS (SEO-first, mobile-first) */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Cairo', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: #070718;
  color: #e5e7eb;
  line-height: 1.7;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
a { color: #818cf8; text-decoration: none; transition: color .15s; }
a:hover { color: #a5b4fc; text-decoration: underline; }
.container { max-width: 820px; margin: 0 auto; padding: 0 20px; }
.container-wide { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* Header / Nav */
header.site-header {
  padding: 18px 0; border-bottom: 1px solid #1e1e2f;
  position: sticky; top: 0; background: rgba(7,7,24,.88);
  backdrop-filter: blur(12px); z-index: 10;
}
header.site-header nav {
  display: flex; justify-content: space-between; align-items: center;
  max-width: 1100px; margin: 0 auto; padding: 0 20px;
}
header.site-header .logo {
  font-weight: 900; font-size: 22px; color: #fff;
  display: flex; align-items: center; gap: 8px;
}
header.site-header .logo::before { content: "📚"; font-size: 24px; }
header.site-header ul { list-style: none; display: flex; gap: 22px; }
header.site-header ul a { color: #cbd5e1; font-weight: 600; font-size: 15px; }
@media (max-width: 640px) {
  header.site-header ul { gap: 14px; }
  header.site-header ul li.hide-mobile { display: none; }
}

/* Hero */
.hero {
  padding: 50px 20px 30px; text-align: center;
  background: radial-gradient(ellipse at top, rgba(99,102,241,.15), transparent 60%);
}
.hero .breadcrumb {
  font-size: 14px; color: #94a3b8; margin-bottom: 16px;
}
.hero .breadcrumb a { color: #94a3b8; }
.hero h1 {
  font-size: clamp(28px, 5vw, 44px); font-weight: 900; color: #fff;
  line-height: 1.2; margin-bottom: 16px; letter-spacing: -.02em;
}
.hero .lede { font-size: 18px; color: #cbd5e1; max-width: 720px; margin: 0 auto; }
.hero .meta {
  margin-top: 18px; font-size: 14px; color: #94a3b8;
  display: flex; justify-content: center; gap: 16px; flex-wrap: wrap;
}
.hero .meta span { display: inline-flex; align-items: center; gap: 6px; }

/* Article body */
article.post { padding: 30px 0 60px; }
article.post h2 {
  font-size: clamp(22px, 3.5vw, 30px); font-weight: 800; color: #fff;
  margin: 40px 0 16px; letter-spacing: -.01em; border-left: 4px solid #6366f1;
  padding-left: 14px;
}
article.post h3 {
  font-size: 20px; font-weight: 700; color: #e5e7eb;
  margin: 26px 0 10px;
}
article.post p { margin: 12px 0; color: #d1d5db; }
article.post ul, article.post ol { margin: 12px 0 12px 22px; }
article.post li { margin: 6px 0; color: #d1d5db; }
article.post strong { color: #fff; font-weight: 700; }
article.post blockquote {
  border-left: 3px solid #6366f1; padding: 6px 16px;
  margin: 20px 0; color: #cbd5e1; font-style: italic;
  background: rgba(99,102,241,.06);
}
article.post table {
  width: 100%; border-collapse: collapse; margin: 18px 0;
  font-size: 15px; background: #0f0f23;
}
article.post th, article.post td {
  padding: 10px 14px; border-bottom: 1px solid #1e1e2f; text-align: left;
}
article.post th { background: #131332; font-weight: 700; color: #fff; }
article.post td code, article.post p code {
  background: #1e1e2f; padding: 2px 8px; border-radius: 4px;
  font-family: 'SF Mono', monospace; font-size: .9em; color: #a5b4fc;
}

/* Key box (highlight callouts — good for GEO) */
.key-box {
  background: linear-gradient(135deg, rgba(99,102,241,.12), rgba(147,51,234,.08));
  border: 1px solid rgba(99,102,241,.35); border-radius: 12px;
  padding: 18px 22px; margin: 22px 0;
}
.key-box .label {
  font-size: 12px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .1em; color: #a5b4fc; margin-bottom: 6px;
}

/* CTA block */
.cta {
  background: linear-gradient(135deg, #4f46e5, #7c3aed); border-radius: 14px;
  padding: 28px; margin: 40px 0; text-align: center; color: #fff;
}
.cta h3 { color: #fff; margin-bottom: 8px; font-size: 22px; }
.cta p { color: rgba(255,255,255,.9); margin-bottom: 16px; }
.cta a.btn {
  display: inline-block; padding: 12px 26px; background: #fff; color: #4f46e5;
  border-radius: 8px; font-weight: 800; font-size: 16px;
}
.cta a.btn:hover { background: #f3f4f6; text-decoration: none; }

/* FAQ */
details.faq {
  background: #0f0f23; border: 1px solid #1e1e2f; border-radius: 10px;
  padding: 14px 18px; margin: 10px 0;
}
details.faq summary {
  font-weight: 700; color: #fff; cursor: pointer; font-size: 17px;
}
details.faq p { margin-top: 10px; }

/* Blog listing */
.blog-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px; padding: 30px 0;
}
.blog-card {
  background: #0f0f23; border: 1px solid #1e1e2f; border-radius: 14px;
  padding: 22px; transition: transform .2s, border-color .2s;
}
.blog-card:hover { transform: translateY(-3px); border-color: #4f46e5; }
.blog-card .tag {
  font-size: 12px; font-weight: 700; color: #a5b4fc; text-transform: uppercase;
  letter-spacing: .08em; margin-bottom: 8px;
}
.blog-card h3 { font-size: 19px; color: #fff; margin-bottom: 10px; line-height: 1.35; }
.blog-card h3 a { color: inherit; text-decoration: none; }
.blog-card h3 a:hover { color: #a5b4fc; }
.blog-card p { font-size: 14px; color: #94a3b8; line-height: 1.5; }
.blog-card .read { display: inline-block; margin-top: 12px; font-weight: 700; font-size: 14px; }

/* Footer */
footer.site-footer {
  border-top: 1px solid #1e1e2f; padding: 30px 20px; text-align: center;
  color: #64748b; font-size: 14px; margin-top: 40px;
}
footer.site-footer a { color: #94a3b8; margin: 0 8px; }
