/* ============================================================================
   Blog pages. Shares tokens, nav, footer, glow-orbs and theme-toggle with
   storefront.css; this file only adds the blog-specific layout. All selectors
   are blog-prefixed so nothing here can clash with the storefront.
   ============================================================================ */

.blog-page, .blog-article { --read: 740px; }
.blog-container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ---- overview header ---- */
.blog-head { position: relative; z-index: 1; text-align: center; padding: 56px 24px 36px; max-width: 780px; margin: 0 auto; }
.blog-eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: .14em;
    text-transform: uppercase; color: var(--accent-light);
    background: var(--accent-glow-soft); border: 1px solid var(--border);
    padding: 7px 14px; border-radius: 999px; margin-bottom: 22px;
}
.blog-eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.blog-head h1 { font-size: clamp(34px, 5.5vw, 56px); font-weight: 800; line-height: 1.05; letter-spacing: -.02em; }
.blog-head h1 .grad { background: var(--gradient-text); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.blog-head p { margin-top: 16px; font-size: clamp(16px, 2vw, 19px); color: var(--text-muted); line-height: 1.55; }

/* ---- category pills ---- */
.blog-cats { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; padding: 4px 24px 40px; max-width: 820px; margin: 0 auto; }
.blog-cat { font-size: 13.5px; font-weight: 500; color: var(--text-muted); padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-card); transition: .2s; text-decoration: none; }
.blog-cat:hover { color: var(--text); border-color: var(--border-hover); }
.blog-cat.is-active { color: #fff; background: var(--accent); border-color: transparent; }

/* ---- featured + grid ---- */
.blog-wrap { position: relative; z-index: 1; padding-bottom: 8px; }
.blog-featured { display: grid; grid-template-columns: 1.15fr .85fr; border: 1px solid var(--border); border-radius: 20px; overflow: hidden; background: var(--bg-card); box-shadow: var(--shadow-card); margin-bottom: 44px; }
.blog-featured .blog-cover { min-height: 320px; }
.blog-featured .blog-body { padding: 34px 36px; display: flex; flex-direction: column; justify-content: center; }
.blog-featured h2 { margin: 16px 0 12px; font-size: clamp(23px, 2.6vw, 31px); font-weight: 800; line-height: 1.13; letter-spacing: -.015em; }
.blog-featured h2 a { color: inherit; text-decoration: none; }
.blog-featured h2 a:hover { color: var(--accent-light); }
.blog-featured .blog-excerpt { color: var(--text-muted); font-size: 16px; line-height: 1.6; }

.blog-cover { position: relative; display: block; text-decoration: none;
    background: radial-gradient(120% 120% at 18% 12%, rgba(108,92,231,.46), transparent 56%),
                radial-gradient(120% 120% at 88% 90%, rgba(116,185,255,.4), transparent 56%),
                linear-gradient(135deg, #15151f, #0c0c13); }
.blog-cover.c2 { background: radial-gradient(120% 120% at 80% 20%, rgba(0,214,143,.34), transparent 58%), linear-gradient(135deg, #14141d, #0c0c13); }
.blog-cover.c3 { background: radial-gradient(120% 120% at 20% 80%, rgba(254,202,87,.32), transparent 58%), linear-gradient(135deg, #14141d, #0c0c13); }
.blog-cover.c4 { background: radial-gradient(120% 120% at 85% 80%, rgba(116,185,255,.4), transparent 58%), linear-gradient(135deg, #14141d, #0c0c13); }
.blog-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blog-cover .blog-tag { position: absolute; top: 16px; left: 16px; }

.blog-tag { display: inline-block; font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-light); background: var(--accent-glow-soft); border: 1px solid var(--border); padding: 5px 11px; border-radius: 7px; font-weight: 500; text-decoration: none; }
.blog-meta { display: flex; align-items: center; gap: 12px; margin-top: 20px; font-size: 13px; color: var(--text-dim); font-family: 'JetBrains Mono', monospace; }
.blog-meta .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--text-dim); }

.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.blog-card { border: 1px solid var(--border); border-radius: 16px; overflow: hidden; background: var(--bg-card); transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; display: flex; flex-direction: column; }
.blog-card:hover { transform: translateY(-4px); border-color: var(--border-hover); box-shadow: var(--shadow-card-soft); }
.blog-card .blog-cover { height: 168px; }
.blog-card .blog-body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.blog-card h3 { font-size: 18.5px; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; margin-bottom: 9px; }
.blog-card h3 a { color: inherit; text-decoration: none; }
.blog-card h3 a:hover { color: var(--accent-light); }
.blog-card .blog-excerpt { color: var(--text-muted); font-size: 14.5px; line-height: 1.55; flex: 1; }
.blog-card .blog-meta { margin-top: 18px; }

/* ---- cta band ---- */
.blog-ctaband { position: relative; z-index: 1; margin-top: 56px; border-radius: 22px; overflow: hidden; border: 1px solid var(--border); background: radial-gradient(110% 160% at 0% 0%, var(--accent-glow), transparent 55%), var(--bg-card); padding: 44px 40px; display: flex; align-items: center; justify-content: space-between; gap: 26px; flex-wrap: wrap; }
.blog-ctaband.center { flex-direction: column; text-align: center; }
.blog-ctaband h3 { font-size: clamp(22px, 2.4vw, 28px); font-weight: 800; letter-spacing: -.015em; line-height: 1.18; }
.blog-ctaband p { color: var(--text-muted); margin-top: 8px; font-size: 15.5px; max-width: 520px; }
.blog-ctaband.center p { margin: 8px auto 0; }

/* ---- article ---- */
.blog-article-head { position: relative; z-index: 1; max-width: var(--read); margin: 0 auto; padding: 44px 24px 0; }
.blog-crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--text-dim); font-family: 'JetBrains Mono', monospace; margin-bottom: 22px; }
.blog-crumbs a { color: inherit; text-decoration: none; }
.blog-crumbs a:hover { color: var(--accent-light); }
.blog-crumbs .arrow { opacity: .5; }
.blog-article-head h1 { margin: 16px 0 0; font-size: clamp(30px, 4.4vw, 46px); font-weight: 800; line-height: 1.08; letter-spacing: -.02em; }
.blog-byline { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 20px; font-size: 13.5px; color: var(--text-dim); font-family: 'JetBrains Mono', monospace; }
.blog-byline .who { display: flex; align-items: center; gap: 9px; }
.blog-byline .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--text-dim); }
.blog-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--gradient); display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 12px; }

.blog-heroimg { position: relative; z-index: 1; max-width: 920px; margin: 32px auto 0; height: clamp(200px, 36vw, 410px); border-radius: 18px; border: 1px solid var(--border); overflow: hidden;
    background: radial-gradient(120% 120% at 18% 12%, rgba(108,92,231,.48), transparent 55%), radial-gradient(120% 120% at 88% 92%, rgba(116,185,255,.4), transparent 55%), linear-gradient(135deg, #15151f, #0c0c13); }
.blog-heroimg img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---- prose (rendered body_html) ---- */
.blog-prose { position: relative; z-index: 1; max-width: var(--read); margin: 0 auto; padding: 40px 24px 0; font-size: 18px; line-height: 1.75; color: var(--text); }
.blog-prose > * { margin-bottom: 1.35em; }
.blog-prose .lead { font-size: 21px; line-height: 1.6; color: var(--text-muted); }
.blog-prose h2 { font-size: 28px; font-weight: 800; letter-spacing: -.015em; line-height: 1.2; margin-top: 1.9em; scroll-margin-top: 80px; }
.blog-prose h3 { font-size: 21px; font-weight: 700; line-height: 1.3; margin-top: 1.6em; }
.blog-prose h4 { font-size: 18px; font-weight: 700; margin-top: 1.4em; }
.blog-prose a { color: var(--accent-light); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--border-strong); }
.blog-prose a:hover { text-decoration-color: var(--accent-light); }
.blog-prose strong { color: var(--text); font-weight: 700; }
.blog-prose ul, .blog-prose ol { padding-left: 1.3em; }
.blog-prose li { margin-bottom: .5em; }
.blog-prose li::marker { color: var(--accent); }
.blog-prose blockquote { border-left: 3px solid var(--accent); padding: 6px 0 6px 22px; color: var(--text-muted); font-size: 19px; font-style: italic; }
.blog-prose hr { border: 0; border-top: 1px solid var(--divider); margin: 2em 0; }

.blog-callout { display: flex; gap: 14px; background: var(--accent-glow-soft); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 12px; padding: 18px 20px; font-size: 16px; line-height: 1.6; color: var(--text); }
.blog-callout-ic { flex-shrink: 0; width: 26px; height: 26px; border-radius: 7px; background: var(--accent); display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 14px; margin-top: 1px; }
.blog-callout-label { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-light); display: block; margin-bottom: 4px; }

.blog-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; }
.blog-table-wrap table { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.blog-table-wrap th, .blog-table-wrap td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--divider); }
.blog-table-wrap thead th { background: var(--bg-card); font-family: 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.blog-table-wrap tbody tr:last-child td { border-bottom: 0; }

.blog-fig { margin: 0; }
.blog-fig img { width: 100%; max-height: 340px; object-fit: cover; border-radius: 14px; border: 1px solid var(--border); display: block; }
.blog-fig figcaption { margin-top: 10px; font-size: 13.5px; color: var(--text-dim); text-align: center; }

/* ---- faq ---- */
.blog-faq { position: relative; z-index: 1; max-width: var(--read); margin: 52px auto 0; padding: 0 24px; }
.blog-faq h2 { font-size: 28px; font-weight: 800; letter-spacing: -.015em; margin-bottom: 20px; }
.blog-faq details { border: 1px solid var(--border); border-radius: 12px; background: var(--bg-card); margin-bottom: 12px; overflow: hidden; }
.blog-faq summary { list-style: none; cursor: pointer; padding: 18px 20px; font-weight: 600; font-size: 17px; display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.blog-faq summary::-webkit-details-marker { display: none; }
.blog-faq summary .chev { flex-shrink: 0; width: 20px; height: 20px; color: var(--text-muted); transition: transform .25s ease; }
.blog-faq details[open] summary .chev { transform: rotate(45deg); color: var(--accent); }
.blog-faq .ans { padding: 0 20px 20px; color: var(--text-muted); font-size: 16px; line-height: 1.65; }
.blog-faq .ans a { color: var(--accent-light); }

/* ---- end of article ---- */
.blog-endrow { max-width: var(--read); margin: 44px auto 0; padding: 24px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 16px; position: relative; z-index: 1; }
.blog-endrow .blog-avatar { width: 46px; height: 46px; font-size: 16px; }
.blog-endrow .who-name { font-weight: 700; }
.blog-endrow .who-role { font-size: 13.5px; color: var(--text-muted); }
.blog-article .blog-ctaband { max-width: var(--read); margin-left: auto; margin-right: auto; text-align: center; }

.blog-related { position: relative; z-index: 1; max-width: 1100px; margin: 64px auto 0; padding: 0 24px; }
.blog-related h2 { font-size: 24px; font-weight: 800; letter-spacing: -.015em; margin-bottom: 22px; text-align: center; }
.blog-rgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.blog-rc { border: 1px solid var(--border); border-radius: 14px; padding: 22px; background: var(--bg-card); transition: .25s; }
.blog-rc:hover { transform: translateY(-3px); border-color: var(--border-hover); box-shadow: var(--shadow-card-soft); }
.blog-rc .blog-tag { margin-bottom: 12px; }
.blog-rc h3 { font-size: 17px; font-weight: 700; line-height: 1.3; margin-bottom: 8px; }
.blog-rc h3 a { color: inherit; text-decoration: none; }
.blog-rc h3 a:hover { color: var(--accent-light); }
.blog-rc .m { font-size: 12.5px; color: var(--text-dim); font-family: 'JetBrains Mono', monospace; margin-top: 12px; }

/* ---- reading progress ---- */
.blog-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--gradient); z-index: 60; transition: width .1s linear; }

@media (max-width: 880px) {
    .blog-featured { grid-template-columns: 1fr; }
    .blog-featured .blog-cover { min-height: 190px; }
}
@media (max-width: 760px) {
    .blog-rgrid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .blog-head { padding-top: 40px; }
    .blog-ctaband { padding: 34px 26px; }
    .blog-featured .blog-body { padding: 28px 24px; }
}
