/* SparkLoom Journal · /blog pages. Loaded after styles.css, which holds the tokens, nav, cards and footer. */

/* ---------- Listing ---------- */
.blog-hero { padding: 92px 0 48px; }
.blog-hero h1 { max-width: 15ch; margin: 24px 0 18px; font-size: clamp(2.6rem, 6.2vw, 4.4rem); }
.blog-hero .lede { margin: 0; max-width: 34em; text-align: left; }
.topics { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 34px; }
.topics a {
  padding: 9px 16px; border-radius: 999px; text-decoration: none;
  color: var(--fog); font: 500 14px/1 var(--sans);
  background: rgba(11, 6, 25, 0.6); box-shadow: var(--rim), 0 0 0 1px var(--line);
  transition: color 0.2s, background 0.2s, box-shadow 0.2s;
}
.topics a:hover { color: var(--text); }
.topics a[aria-current="page"] { color: var(--text); background: var(--raised); box-shadow: var(--glow), 0 0 0 1px rgba(169, 140, 255, 0.3); }

.blog-list { display: grid; gap: 16px; }
.feature {
  position: relative; overflow: hidden; display: grid; grid-template-columns: 1.3fr 1fr; align-items: stretch;
  border-radius: 24px; text-decoration: none; background: var(--surface);
  box-shadow: var(--rim-2), 0 0 0 1px var(--line); transition: box-shadow 0.4s;
}
.feature:hover { box-shadow: var(--rim-2), 0 0 0 1px var(--line-2), 0 40px 120px -60px rgba(125, 48, 229, 0.7); }
.feature > * { position: relative; }
.feature .cover { aspect-ratio: auto; min-height: 340px; height: 100%; }
.feature-body { display: flex; flex-direction: column; justify-content: center; padding: 44px; }
.feature-body h2 { margin: 0 0 14px; font-size: clamp(1.7rem, 2.8vw, 2.3rem); line-height: 1.12; }
.feature-body > p:not(.post-meta) { color: var(--ash); font-size: 16.5px; margin: 0 0 26px; }
.empty { padding: 72px 32px; border-radius: 24px; text-align: center; background: var(--surface); box-shadow: var(--rim), 0 0 0 1px var(--line); }
.empty h2 { font-size: 28px; }
.empty p { margin: 0; color: var(--fog); }
@media (max-width: 900px) {
  .feature { grid-template-columns: 1fr; }
  .feature .cover { min-height: 0; aspect-ratio: 16 / 9; }
  .feature-body { padding: 28px 24px 32px; }
}

/* ---------- Call to action band (listing and posts) ---------- */
.cta-band { margin-top: 120px; }
.cta-inner {
  position: relative; overflow: hidden; padding: 72px 32px; border-radius: 24px; text-align: center;
  background: radial-gradient(80% 120% at 50% 0%, rgba(125, 48, 229, 0.42), transparent 62%), var(--surface);
  box-shadow: var(--rim-2), 0 0 0 1px var(--line-2);
}
.cta-inner h2 { max-width: 18ch; margin: 0 auto 14px; font-size: clamp(1.9rem, 4vw, 2.8rem); }
.cta-inner p { max-width: 32em; margin: 0 auto 28px; color: var(--ash); }

/* ---------- Post ---------- */
.draft-bar { position: sticky; top: 0; z-index: 60; margin: 0; padding: 10px 16px; text-align: center; background: #e59cff; color: #1a0633; font: 600 14px/1.3 var(--sans); }
.post-head { max-width: 860px; padding-top: 84px; text-align: center; }
.crumbs { display: flex; justify-content: center; gap: 10px; color: var(--fog); font-size: 14px; }
.crumbs a { color: var(--ash); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.post-head h1 { margin: 22px auto 18px; font-size: clamp(2.3rem, 5.4vw, 3.7rem); line-height: 1.06; letter-spacing: -0.035em; }
.standfirst { max-width: 36em; margin: 0 auto; color: var(--ash); font-size: clamp(1.05rem, 1.6vw, 1.2rem); line-height: 1.6; }
.byline { display: inline-flex; align-items: center; gap: 12px; margin-top: 30px; text-align: left; }
.by-ava { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--raised); box-shadow: var(--glow), 0 0 0 1px rgba(169, 140, 255, 0.25); }
.byline b { display: block; color: var(--text); font-weight: 500; font-size: 15px; }
.byline small { color: var(--fog); font-size: 13.5px; }

.post-cover { max-width: 1140px; margin-top: 48px; }
.post-cover .cover { aspect-ratio: 21 / 8; border-radius: 24px; box-shadow: var(--rim-2), 0 0 0 1px var(--line); }
.post-cover .cover-tag { left: 28px; bottom: 24px; }

.post-layout { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 72px; max-width: 1080px; margin-top: 64px; }
.post-aside { position: relative; }
.post-aside > * { position: sticky; top: 96px; }
.post-aside > * + * { margin-top: 24px; top: auto; position: relative; }
.toc { padding-left: 18px; border-left: 1px solid var(--line-2); }
.toc p { margin: 0 0 12px; color: var(--text); font: 500 13px/1 var(--sans); letter-spacing: 0.04em; text-transform: uppercase; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.toc a { color: var(--fog); font-size: 14px; line-height: 1.4; text-decoration: none; transition: color 0.2s; }
.toc a:hover { color: var(--text); }
.aside-cta { padding: 24px; border-radius: 16px; background: radial-gradient(120% 90% at 0% 0%, rgba(125, 48, 229, 0.3), transparent 60%), var(--surface); box-shadow: var(--rim-2), 0 0 0 1px var(--line); }
.aside-kicker { margin: 0 0 6px; color: var(--accent); font-size: 13px; font-weight: 500; }
.aside-title { margin: 0 0 8px; color: var(--text); font: 500 19px/1.25 var(--display); letter-spacing: -0.015em; }
.aside-cta p:not(.aside-kicker):not(.aside-title) { margin: 0 0 18px; color: var(--fog); font-size: 14.5px; }
@media (max-width: 1000px) {
  .post-layout { grid-template-columns: 1fr; gap: 48px; }
  .post-aside > * { position: relative; top: auto; }
  .toc { display: none; }
}

/* Reading type */
.prose { max-width: 690px; color: #cfcbe0; font-size: 18px; line-height: 1.75; }
.prose > * + * { margin-top: 1.15em; }
.prose p { margin-bottom: 0; } /* top margin comes from the sibling rule above */
.prose h2 { margin: 2.1em 0 0; font-size: clamp(1.55rem, 2.6vw, 1.9rem); line-height: 1.2; letter-spacing: -0.022em; scroll-margin-top: 96px; }
.prose h3 { margin: 1.8em 0 0; font-size: 1.3rem; scroll-margin-top: 96px; }
.prose h4 { margin: 1.6em 0 0; font-size: 1.08rem; color: var(--text); }
.prose h2 + *, .prose h3 + *, .prose h4 + * { margin-top: 0.6em; }
.prose a { color: var(--accent); text-decoration: underline; text-decoration-color: rgba(169, 140, 255, 0.4); text-underline-offset: 3px; }
.prose a:hover { color: var(--text); text-decoration-color: currentColor; }
.prose strong { color: var(--text); font-weight: 600; }
.prose ul, .prose ol { margin: 0; padding-left: 1.3em; }
.prose li + li { margin-top: 0.45em; }
.prose li::marker { color: var(--accent); }
.prose blockquote { margin: 1.6em 0; padding: 4px 0 4px 24px; border-left: 2px solid; border-image: var(--cosmic) 1; color: var(--text); font-size: 1.12em; line-height: 1.6; }
.prose blockquote p { margin: 0; }
.prose code { padding: 2px 6px; border-radius: 5px; background: rgba(244, 240, 255, 0.07); color: var(--text); font: 0.86em/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }
.prose pre { overflow-x: auto; padding: 20px 22px; border-radius: 12px; background: #0a0517; box-shadow: var(--rim), 0 0 0 1px var(--line); }
.prose pre code { padding: 0; background: none; font-size: 0.82em; line-height: 1.6; }
.prose hr { height: 1px; margin: 2.4em 0; border: 0; background: var(--aurora); opacity: 0.5; }

.related { margin-top: 120px; }
.related-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.related-head h2 { margin: 0; font-size: clamp(1.8rem, 3.4vw, 2.4rem); }
