/* The blog: list pages, article pages, the home-page strip. Uses the design tokens from base.css. */

/* ── Nepali (Devanagari) text: Poppins and Chillax have no Devanagari, so name real fonts ── */
[lang="ne"] { font-family: "Noto Sans Devanagari", "Mukta", "Kohinoor Devanagari", "Devanagari Sangam MN", "Nirmala UI", var(--font-body); }
.disp[lang="ne"], [lang="ne"] .disp { font-weight: 700; letter-spacing: 0; }

/* ── Blog page header: a dark panel with the topic icons ── */
.blog-hero { padding: 24px 0 8px; }
.blog-hero-panel { position: relative; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); gap: 48px; align-items: center; padding: 64px 56px; border-radius: 32px; background: var(--forest-800); color: var(--forest-100); overflow: hidden; }
.blog-hero-panel::before { content: ""; position: absolute; inset: 0; background: url("../patterns/m-weave.svg") center / 260px repeat; opacity: .07; pointer-events: none; }
.blog-hero-copy { position: relative; }
.blog-hero-eyebrow { margin: 0; color: var(--neon-500); }
.blog-h1 { margin: 14px 0 0; font-size: clamp(36px, 4.6vw, 62px); line-height: 1.02; max-width: 15ch; color: #fff; }
.blog-lede { margin: 18px 0 0; max-width: 56ch; font-size: 18px; line-height: 28px; color: var(--forest-100); }
.blog-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.blog-cats a { display: inline-flex; align-items: center; height: 38px; padding: 0 16px; border: 1px solid rgba(255, 255, 255, .28); border-radius: var(--r-pill); font-size: 14px; font-weight: 500; color: #fff; text-decoration: none; transition: background var(--dur-base), border-color var(--dur-base), color var(--dur-base); }
.blog-cats a:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .6); }
.blog-cats a.is-on { background: var(--neon-500); border-color: var(--neon-500); color: var(--forest-800); }
.blog-hero-art { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; transform: rotate(-5deg); }
.bha-tile { display: grid; place-items: center; aspect-ratio: 1; border-radius: 24px; background: var(--c1); color: var(--c2); box-shadow: 0 22px 44px -20px rgba(0, 0, 0, .55); }
.bha-tile:nth-child(2) { transform: translateY(22px); }
.bha-tile:nth-child(3) { transform: translateY(-12px); }
.bha-tile:nth-child(5) { transform: translateY(14px); }
.blog-list { padding: 40px 0 96px; }

/* ── Cards ── */
.blog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 24px; }
.bc { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; transition: transform var(--dur-slow) var(--ease), box-shadow var(--dur-slow) var(--ease); }
.bc:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.bc-cover { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--c1, var(--forest-800)); color: var(--c2, var(--neon-500)); }
.bc-cover::before { content: ""; position: absolute; inset: 0; background: url("../patterns/m-weave.svg") center / 220px repeat; opacity: .14; mix-blend-mode: overlay; }
.bc-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bc-ghost { position: absolute; right: -26px; bottom: -34px; opacity: .17; transform: rotate(-9deg); pointer-events: none; transition: transform var(--dur-slow) var(--ease); }
.bc-ghost svg { display: block; }
.bc:hover .bc-ghost { transform: rotate(-4deg) scale(1.05); }
.bc-mark { position: absolute; left: 20px; top: 20px; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .3); }
@supports (color: color-mix(in srgb, red 10%, blue)) {
	.bc-mark { background: color-mix(in srgb, var(--c2) 14%, transparent); border-color: color-mix(in srgb, var(--c2) 32%, transparent); }
}
.bc-cover-t { position: absolute; left: 20px; right: 20px; bottom: 16px; font-size: 22px; line-height: 1.05; }
.bc-body { display: flex; flex-direction: column; gap: 10px; padding: 20px; flex: 1; }
.bc-cat { color: var(--eyebrow); text-decoration: none; }
.bc-cat:hover { text-decoration: underline; text-underline-offset: 3px; }
.bc-title { margin: 0; font-size: 21px; line-height: 1.2; color: var(--ink); }
.bc-title a { color: inherit; text-decoration: none; }
.bc-title a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.bc-ex { margin: 0; font-size: 15px; line-height: 24px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bc-meta { margin: auto 0 0; padding-top: 6px; font-size: 13px; line-height: 18px; color: var(--muted); }
.bc-feat { grid-column: 1 / -1; flex-direction: row; }
.bc-feat .bc-cover { flex: 1.15; aspect-ratio: auto; min-height: 360px; }
.bc-feat .bc-ghost { right: -40px; bottom: -60px; }
.bc-feat .bc-ghost svg { width: 320px; height: 320px; }
.bc-feat .bc-mark { left: 32px; top: 32px; width: 72px; height: 72px; border-radius: 20px; }
.bc-feat .bc-cover-t { font-size: clamp(28px, 3.2vw, 42px); left: 32px; bottom: 28px; }
.bc-feat .bc-body { flex: 1; justify-content: center; padding: 44px; gap: 14px; }
.bc-feat .bc-title { font-size: clamp(26px, 2.8vw, 38px); }
.bc-feat .bc-ex { font-size: 17px; line-height: 27px; -webkit-line-clamp: 4; }

/* ── Pagination ── */
.pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 48px; }
.pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 42px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: var(--r-pill); font-size: 14px; font-weight: 500; color: var(--ink); text-decoration: none; }
.pagination a.page-numbers:hover { background: var(--surface); border-color: var(--ink); }
.pagination .page-numbers.current { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.pagination .dots { border-color: transparent; }

/* ── Reading progress bar ── */
.blog-progress { position: fixed; left: 0; top: 0; width: 100%; height: 3px; z-index: 70; pointer-events: none; }
.blog-progress i { display: block; width: 100%; height: 100%; background: var(--forest-600); transform: scaleX(0); transform-origin: left; }

/* ── Article banner ── */
.blog-post-head { padding: 24px 0 0; }
.bp-banner { position: relative; display: flex; align-items: flex-end; min-height: 380px; padding: 56px 64px; border-radius: 32px; overflow: hidden; background: var(--c1); color: var(--c2); }
.bp-banner::before { content: ""; position: absolute; inset: 0; background: url("../patterns/m-weave.svg") center / 260px repeat; opacity: .12; mix-blend-mode: overlay; pointer-events: none; }
.bp-ghost { position: absolute; right: -40px; top: 50%; opacity: .15; transform: translateY(-50%) rotate(-8deg); pointer-events: none; }
.bp-ghost svg { display: block; }
.bp-copy { position: relative; max-width: 800px; }
.blog-crumbs { display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: 13px; line-height: 18px; opacity: .82; }
.blog-crumbs a { color: inherit; text-decoration: none; }
.blog-crumbs a:hover { text-decoration: underline; text-underline-offset: 3px; }
.bp-badge { display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; padding: 8px 14px 8px 12px; border-radius: var(--r-pill); color: inherit; text-decoration: none; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .3); }
@supports (color: color-mix(in srgb, red 10%, blue)) {
	.bp-badge { background: color-mix(in srgb, var(--c2) 14%, transparent); border-color: color-mix(in srgb, var(--c2) 34%, transparent); }
}
.blog-post-h1 { margin: 18px 0 0; font-size: clamp(32px, 4.2vw, 56px); line-height: 1.04; color: inherit; }
.blog-post-deck { margin: 20px 0 0; max-width: 62ch; font-size: 19px; line-height: 30px; opacity: .92; }
.blog-post-meta { margin: 22px 0 0; font-size: 14px; line-height: 20px; opacity: .78; }

/* ── Article layout: text column + sticky contents on desktop ── */
.blog-layout { display: grid; grid-template-columns: minmax(0, 1fr); padding: 48px 0 24px; }
.blog-main { min-width: 0; max-width: 720px; margin-inline: auto; width: 100%; }
.blog-side { display: none; }
@media (min-width: 1080px) {
	.blog-layout { grid-template-columns: minmax(0, 720px) 300px; gap: 80px; justify-content: center; padding-top: 64px; }
	.blog-main { margin-inline: 0; }
	.blog-side { display: block; }
	.blog-side-in { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 28px; }
	.blog-toc-inline, .blog-share-end { display: none; }
}

.blog-entry { font-size: 19px; line-height: 33px; color: var(--ink-2); }
.blog-entry[lang="ne"] { line-height: 2; }
.blog-entry > * + * { margin-top: 1.15em; }
.blog-entry > p:first-of-type { font-size: 21px; line-height: 35px; color: var(--ink); }
.blog-entry[lang="ne"] > p:first-of-type { line-height: 2; }
.blog-entry h2 { margin-top: 2.3em; font-size: clamp(26px, 2.6vw, 34px); line-height: 1.14; color: var(--ink); scroll-margin-top: 96px; }
.blog-entry h2::before { content: ""; display: block; width: 44px; height: 5px; margin-bottom: 16px; border-radius: 5px; background: linear-gradient(90deg, var(--forest-800) 0 50%, var(--neon-500) 50% 100%); }
.blog-entry h3 { margin-top: 1.7em; font-size: 22px; line-height: 1.25; color: var(--ink); }
.blog-entry a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.blog-entry a:hover { text-decoration-thickness: 2px; }
.blog-entry strong { color: var(--ink); }
.blog-entry ul, .blog-entry ol { padding-left: 1.3em; }
.blog-entry li + li { margin-top: .45em; }
.blog-entry li::marker { color: var(--forest-500); font-weight: 600; }
.blog-entry blockquote { margin-inline: 0; padding: 4px 0 4px 22px; border-left: 4px solid var(--neon-500); color: var(--ink); font-style: normal; }
.blog-entry img { max-width: 100%; height: auto; border-radius: var(--r-md); }
.blog-entry table { display: block; width: 100%; overflow-x: auto; border-collapse: separate; border-spacing: 0; font-size: 16px; line-height: 24px; border: 1px solid var(--line); border-radius: var(--r-md); }
.blog-entry th, .blog-entry td { padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.blog-entry tr:last-child td { border-bottom: 0; }
.blog-entry th { background: var(--forest-50); color: var(--forest-800); font-weight: 600; }
.blog-entry .callout { padding: 20px 24px; background: var(--forest-50); border: 1px solid var(--forest-100); border-left: 5px solid var(--forest-800); border-radius: var(--r-md); color: var(--forest-800); font-size: 17px; line-height: 28px; }
.blog-entry .callout p { margin: 0; }

/* contents list */
.blog-toc { padding: 20px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); font-size: 16px; line-height: 24px; }
.blog-toc-t { margin: 0; color: var(--eyebrow); }
.blog-toc ol { margin: 10px 0 0; padding-left: 1.3em; }
.blog-toc li + li { margin-top: 6px; }
.blog-toc a { color: var(--ink); text-decoration: none; }
.blog-toc a:hover { text-decoration: underline; text-underline-offset: 3px; }
.blog-toc-side { padding: 0 0 0 22px; background: none; border: 0; border-left: 2px solid var(--line); border-radius: 0; font-size: 15px; line-height: 22px; }
.blog-toc-side ol { list-style: none; padding-left: 0; margin-top: 14px; }
.blog-toc-side li + li { margin-top: 10px; }
.blog-toc-side a { display: block; color: var(--muted); transition: color var(--dur-base); }
.blog-toc-side a:hover, .blog-toc-side a.is-active { color: var(--accent); text-decoration: none; }
.blog-toc-side a.is-active { font-weight: 600; }

.blog-share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.blog-share .ov { margin-right: 6px; color: var(--muted); }
.blog-share-end { margin: 48px 0 0; padding-top: 24px; border-top: 1px solid var(--line); }
.blog-share-side .ov { flex: 0 0 100%; margin: 0 0 4px; }

.blog-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; margin: 48px 0 0; padding: 40px; border-radius: var(--r-xl); background: var(--forest-800); color: var(--forest-100); }
.blog-cta .blog-cta-h { margin: 0 0 8px; font-size: clamp(24px, 3vw, 32px); line-height: 1.1; color: var(--neon-500); }
.blog-cta p { margin: 0; max-width: 46ch; font-size: 16px; line-height: 26px; }
.blog-cta .btn { background: var(--neon-500); color: var(--forest-800); flex: 0 0 auto; }
.blog-cta.is-brand { background: var(--cobalt-600); color: #fff; }
.blog-cta.is-brand .blog-cta-h { color: #fff; }
.blog-cta.is-brand .btn { background: #fff; color: var(--cobalt-600); }

.blog-related { padding: 72px 0 96px; }
.blog-related .h-sub { margin: 0 0 28px; }
.blog-strip { background: var(--moss-50); }

/* ── Responsive ── */
@media (max-width: 960px) {
	.blog-hero-panel { grid-template-columns: 1fr; padding: 48px 36px; }
	.blog-hero-art { display: none; }
	.blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.bc-feat { flex-direction: column; }
	.bc-feat .bc-cover { min-height: 0; aspect-ratio: 16 / 9; flex: none; }
	.bc-feat .bc-ghost svg { width: 240px; height: 240px; }
	.bc-feat .bc-body { padding: 24px; }
	.bp-banner { min-height: 300px; padding: 40px 36px; }
	.bp-ghost svg { width: 260px; height: 260px; }
}
@media (max-width: 640px) {
	.blog-hero { padding-top: 12px; }
	.blog-hero-panel { padding: 36px 24px 32px; border-radius: 24px; }
	.blog-grid { grid-template-columns: 1fr; gap: 20px; }
	.blog-cats { flex-wrap: nowrap; overflow-x: auto; margin-inline: -24px; padding-inline: 24px; scrollbar-width: none; }
	.blog-cats::-webkit-scrollbar { display: none; }
	.blog-cats a { flex: 0 0 auto; }
	.blog-post-head { padding-top: 12px; }
	.bp-banner { min-height: 0; padding: 32px 24px; border-radius: 24px; }
	.bp-ghost { right: -60px; }
	.bp-ghost svg { width: 220px; height: 220px; }
	.blog-post-deck { font-size: 17px; line-height: 27px; }
	.blog-layout { padding-top: 32px; }
	.blog-entry { font-size: 17px; line-height: 29px; }
	.blog-entry > p:first-of-type { font-size: 18px; line-height: 30px; }
	.blog-cta { padding: 26px; }
	.blog-cta .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
	.bc, .blog-cats a, .bc-ghost { transition: none; }
	.bc:hover { transform: none; }
	.bc:hover .bc-ghost { transform: rotate(-9deg); }
}
