/* Hand-authored blog stylesheet. Imports the same design intent as the Angular
   marketing shell (CSS variables, system/Inter font stack) WITHOUT hash-coupling
   to the Angular build. Drift risk is acknowledged in the design spec; chrome is
   the only shared surface. */

:root {
  --bs-primary: #7367f0;
  --bs-body-bg: #ffffff;
  --bs-body-color: #2f2b3d;
  --bs-secondary-color: #6f6b7d;
  --bs-border-color: #e6e6e8;
  --blog-max-width: 760px;
  --blog-font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

[data-bs-theme='dark'] {
  --bs-body-bg: #25293c;
  --bs-body-color: #cfcde4;
  --bs-secondary-color: #a8a6c3;
  --bs-border-color: #3a3e57;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--blog-font);
  background: var(--bs-body-bg);
  color: var(--bs-body-color);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 1rem; }

/* Navbar */
.landing-navbar {
  position: sticky; top: 0; z-index: 1030;
  background: var(--bs-body-bg);
  border-bottom: 1px solid var(--bs-border-color);
  padding: 0.75rem 0;
}
.landing-navbar .container { display: flex; align-items: center; gap: 1.5rem; }
.navbar-brand { display: flex; align-items: center; gap: 0.5rem; text-decoration: none; color: inherit; font-weight: 700; }
.brand-text { font-size: 1.1rem; }
.navbar-nav { display: flex; gap: 1rem; list-style: none; margin: 0 auto; padding: 0; flex-wrap: wrap; }
.nav-link { text-decoration: none; color: var(--bs-secondary-color); font-weight: 500; }
.nav-link:hover, .nav-link.active { color: var(--bs-primary); }
.navbar-actions { display: flex; align-items: center; gap: 0.5rem; }
.lang-switch { text-decoration: none; color: var(--bs-secondary-color); font-weight: 600; padding: 0.25rem 0.4rem; border-radius: 0.4rem; }
.lang-switch.active { color: var(--bs-primary); }
.btn { display: inline-block; text-decoration: none; padding: 0.45rem 0.9rem; border-radius: 0.4rem; font-weight: 600; }
.btn-primary { background: var(--bs-primary); color: #fff; }

/* Article */
.landing-main { min-height: 60vh; padding: 2rem 0 3rem; }
.blog-article { max-width: var(--blog-max-width); margin: 0 auto; }
.blog-article h1 { font-size: 2.25rem; line-height: 1.2; margin: 0 0 0.75rem; }
.blog-article h2 { font-size: 1.6rem; margin: 2rem 0 0.75rem; }
.blog-article h3 { font-size: 1.3rem; margin: 1.5rem 0 0.5rem; }
.blog-article p { margin: 0 0 1.1rem; }
.blog-article img { max-width: 100%; height: auto; border-radius: 0.5rem; }
.blog-article pre { background: rgba(0,0,0,0.06); padding: 1rem; border-radius: 0.5rem; overflow-x: auto; }
[data-bs-theme='dark'] .blog-article pre { background: rgba(255,255,255,0.06); }
.blog-article code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9em; }
.blog-meta { color: var(--bs-secondary-color); font-size: 0.95rem; margin-bottom: 1.5rem; }
.blog-cover { width: 100%; height: auto; border-radius: 0.75rem; margin-bottom: 1.5rem; }

/* TL;DR + FAQ */
.blog-tldr { border: 1px solid var(--bs-border-color); border-left: 4px solid var(--bs-primary); border-radius: 0.5rem; padding: 1rem 1.25rem; margin: 0 0 1.75rem; }
.blog-tldr h2 { font-size: 1.1rem; margin: 0 0 0.5rem; }
.blog-tldr ul { margin: 0; padding-left: 1.25rem; }
.blog-faq { margin-top: 2.5rem; }
.blog-faq details { border-bottom: 1px solid var(--bs-border-color); padding: 0.75rem 0; }
.blog-faq summary { font-weight: 600; cursor: pointer; }

/* List/hub */
.blog-hub-head { max-width: 1140px; margin: 0 auto 2rem; }
.blog-hub-head h1 { font-size: 2.4rem; line-height: 1.15; margin: 0 0 0.5rem; }
.blog-hub-lead { color: var(--bs-secondary-color); font-size: 1.1rem; margin: 0; max-width: 640px; }

.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.75rem; max-width: 1140px; margin: 0 auto; }

.blog-card {
  display: flex; flex-direction: column;
  background: #fff;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.9rem; overflow: hidden;
  text-decoration: none; color: inherit;
  box-shadow: 0 1px 2px rgba(16, 17, 40, 0.04);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.blog-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(16, 17, 40, 0.13); border-color: transparent; }
.blog-card-cover { display: block; aspect-ratio: 1200 / 630; background: linear-gradient(135deg, #ece9ff, #f4f1ff); overflow: hidden; }
.blog-card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blog-card-body { display: flex; flex-direction: column; gap: 0.55rem; padding: 1.1rem 1.2rem 1.3rem; flex: 1 1 auto; }
.blog-card-cat { align-self: flex-start; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--bs-primary); background: rgba(115, 103, 240, 0.1); padding: 0.2rem 0.55rem; border-radius: 999px; }
.blog-card-title { font-size: 1.18rem; font-weight: 700; line-height: 1.35; margin: 0; color: var(--bs-body-color);
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.blog-card-excerpt { color: var(--bs-secondary-color); font-size: 0.95rem; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.blog-card-meta { margin-top: auto; padding-top: 0.45rem; color: var(--bs-secondary-color); font-size: 0.82rem; font-weight: 500; }

.blog-pagination { display: flex; gap: 0.75rem; align-items: center; justify-content: center; margin-top: 2.5rem; }
.blog-pagination a { text-decoration: none; color: var(--bs-primary); font-weight: 600; padding: 0.4rem 0.85rem; border: 1px solid var(--bs-border-color); border-radius: 0.5rem; }
.blog-pagination a:hover { background: rgba(115, 103, 240, 0.08); }
.blog-pagination span { color: var(--bs-secondary-color); font-size: 0.9rem; }

/* Related posts (compact post-page footer list) */
.blog-related { max-width: var(--blog-max-width); margin: 3rem auto 0; padding-top: 1.5rem; border-top: 1px solid var(--bs-border-color); }
.blog-related > h2 { font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--bs-secondary-color); margin: 0 0 0.85rem; }
.blog-related-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.25rem; }
.blog-related-list a { display: flex; align-items: center; gap: 0.9rem; text-decoration: none; color: inherit; padding: 0.5rem; border-radius: 0.6rem; transition: background .15s ease; }
.blog-related-list a:hover { background: rgba(115, 103, 240, 0.07); }
.blog-related-thumb { flex: 0 0 auto; width: 92px; height: 54px; border-radius: 0.45rem; overflow: hidden; background: linear-gradient(135deg, #ece9ff, #f4f1ff); }
.blog-related-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blog-related-text { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.blog-related-title { font-weight: 600; font-size: 0.97rem; line-height: 1.35; color: var(--bs-body-color);
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.blog-related-meta { font-size: 0.8rem; color: var(--bs-secondary-color); }

/* Footer */
.landing-footer { border-top: 1px solid var(--bs-border-color); padding: 2.5rem 0 1.5rem; color: var(--bs-secondary-color); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; }
.footer-brand-row { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; color: var(--bs-body-color); margin-bottom: 0.5rem; }
.footer-tagline { max-width: 360px; }
.footer-col h6 { text-transform: uppercase; font-size: 0.8rem; letter-spacing: 0.04em; margin: 0 0 0.75rem; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 0.4rem; }
.footer-col a { text-decoration: none; color: var(--bs-secondary-color); }
.footer-col a:hover { color: var(--bs-primary); }
.footer-bottom { display: flex; justify-content: space-between; margin-top: 1rem; }

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .navbar-nav { display: none; }
}
