/* =========================================================
   ALVANET v2 — BLOG
   Editorial: generous white, big serifs, red accent, animations.
   ========================================================= */

body.blog {
  background: var(--bg-0);
}

/* ---------- READING PROGRESS (top bar) ---------- */
.read-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: transparent;
  z-index: 950;
  pointer-events: none;
}
.read-progress > span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--red);
  transition: width 80ms linear;
}

/* ---------- HERO (per post) ---------- */
.b-hero {
  padding: calc(var(--nav-h) + 64px) var(--gutter) 48px;
  max-width: 1280px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(16px);
  animation: heroIn 1000ms var(--ease-apple) 100ms forwards;
}
@keyframes heroIn { to { opacity: 1; transform: translateY(0); } }

.b-hero__crumbs {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 40px;
}
.b-hero__crumbs a { color: inherit; border-bottom: 1px solid transparent; transition: color 200ms, border-color 200ms; }
.b-hero__crumbs a:hover { color: var(--red); border-bottom-color: var(--red); }
.b-hero__crumbs .sep { color: var(--ink-4); }

.b-hero__meta {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 24px;
}
.b-hero__cat {
  color: var(--red);
  font-weight: 600;
  padding: 4px 10px;
  border: 1px solid var(--red);
  border-radius: 999px;
}
.b-hero__date { color: var(--ink-2); }
.b-hero__read { color: var(--ink-2); }
.b-hero__type {
  padding: 4px 10px;
  background: var(--ink-0);
  color: #FFF;
  border-radius: 3px;
  letter-spacing: 0.14em;
}

.b-hero__title {
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(40px, 6.4vw, 96px);
  line-height: 0.98;
  letter-spacing: -0.05em;
  color: var(--ink-0);
  margin-bottom: 24px;
  max-width: 22ch;
}
.b-hero__title .accent {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--red);
}
.b-hero__dek {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(18px, 1.8vw, 26px);
  line-height: 1.4;
  color: var(--ink-2);
  max-width: 60ch;
  margin-bottom: 36px;
}
.b-hero__author {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--ink-2);
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.b-hero__author strong { color: var(--ink-0); font-weight: 600; }
.b-hero__author-dot {
  width: 10px; height: 10px;
  border-radius: 999px;
  background: var(--red);
}

.b-hero__image {
  margin: 48px 0 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 2 / 1;
  background: var(--bg-1);
  opacity: 0;
  transform: translateY(24px);
  animation: heroImgIn 1000ms var(--ease-apple) 300ms forwards;
}
@keyframes heroImgIn { to { opacity: 1; transform: translateY(0); } }
.b-hero__image img, .b-hero__image svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- POST LAYOUT (with sticky TOC) ---------- */
.b-layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 64px var(--gutter) 96px;
  display: grid;
  grid-template-columns: 60px 1fr 240px;
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
}
@media (max-width: 1100px) {
  .b-layout { grid-template-columns: 1fr; gap: 40px; }
}

/* Share rail (left) */
.b-share {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}
@media (max-width: 1100px) {
  .b-share {
    position: static;
    flex-direction: row;
    justify-content: center;
    padding: 16px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }
}

.b-share__label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-3);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  margin-bottom: 8px;
  padding: 6px 0;
}
@media (max-width: 1100px) {
  .b-share__label { writing-mode: horizontal-tb; transform: none; margin: 0 12px 0 0; padding: 0; }
}
.b-share__btn {
  width: 42px; height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--ink-1);
  background: var(--bg-0);
  transition: color 200ms, border-color 200ms, background 200ms, transform 200ms;
  cursor: pointer;
}
.b-share__btn:hover {
  color: var(--red);
  border-color: var(--red);
  transform: translateY(-2px);
}
.b-share__btn[data-copied="1"] {
  color: var(--red);
  border-color: var(--red);
  background: var(--red-soft);
}

/* TOC (right) */
.b-toc {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  padding: 24px 0;
  border-left: 1px solid var(--line);
  padding-left: 20px;
}
@media (max-width: 1100px) { .b-toc { display: none; } }

.b-toc__label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 16px;
  display: block;
}
.b-toc__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.b-toc__list a {
  display: inline-block;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--ink-2);
  padding: 4px 0;
  transition: color 200ms;
}
.b-toc__list a:hover { color: var(--red); }
.b-toc__list .is-active a {
  color: var(--red);
  font-weight: 600;
}
.b-toc__list .is-h3 {
  padding-left: 14px;
  font-size: 11.5px;
  color: var(--ink-3);
}

/* ---------- PROSE ---------- */
.prose {
  max-width: 64ch;
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-1);
}
.prose h2 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(28px, 3vw, 40px);
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--ink-0);
  margin: 56px 0 20px;
  scroll-margin-top: calc(var(--nav-h) + 20px);
}
.prose h2::before {
  content: "§";
  color: var(--red);
  margin-right: 10px;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
}
.prose h3 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(20px, 1.8vw, 24px);
  letter-spacing: -0.02em;
  color: var(--ink-0);
  margin: 36px 0 12px;
  scroll-margin-top: calc(var(--nav-h) + 20px);
}
.prose p { margin-bottom: 20px; max-width: 64ch; }
.prose a {
  color: var(--red);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.prose a:hover { color: var(--red-deep); }
.prose ul, .prose ol { margin: 0 0 24px 22px; }
.prose li { margin-bottom: 8px; max-width: 62ch; }
.prose strong { color: var(--ink-0); font-weight: 600; }
.prose em { font-family: var(--serif); font-style: italic; }

.prose blockquote {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.35;
  color: var(--ink-0);
  margin: 40px 0;
  padding: 0 0 0 28px;
  border-left: 3px solid var(--red);
  max-width: 60ch;
}
.prose blockquote footer {
  font-family: var(--mono);
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  text-transform: uppercase;
  margin-top: 12px;
}

.prose figure {
  margin: 40px 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-1);
}
.prose figure img, .prose figure svg { display: block; width: 100%; height: auto; }
.prose figcaption {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: var(--bg-0);
}

/* ---------- CALLOUTS ---------- */
.callout {
  padding: 20px 24px;
  border-left: 3px solid var(--red);
  background: var(--red-soft);
  border-radius: 0 4px 4px 0;
  margin: 32px 0;
}
.callout__label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red-deep);
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}
.callout p { margin-bottom: 0; color: var(--ink-1); font-size: 15px; }
.callout--note { border-color: var(--ink-0); background: var(--bg-1); }
.callout--note .callout__label { color: var(--ink-0); }
.callout--tip { border-color: #2A7A3B; background: #E8F7EC; }
.callout--tip .callout__label { color: #1E5F2C; }

/* ---------- STEPS (for tutorials) ---------- */
.step {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px 32px;
  margin: 28px 0;
  background: var(--bg-0);
  position: relative;
  transition: border-color 300ms, background 300ms, transform 300ms;
}
.step:hover { border-color: var(--line-2); }
.step.is-done {
  background: var(--bg-1);
  border-color: var(--line);
}
.step.is-done .step__title { color: var(--ink-3); text-decoration: line-through; text-decoration-thickness: 2px; }
.step.is-done .step__idx { background: var(--ink-0); color: #FFF; }
.step.is-done .step__idx::after { content: "✓"; margin-left: 4px; }

.step__head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}
.step__idx {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--red);
  color: #FFF;
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  font-weight: 400;
  border-radius: 999px;
  flex-shrink: 0;
  transition: background 200ms, color 200ms;
}
.step__title {
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(20px, 1.8vw, 24px);
  letter-spacing: -0.02em;
  color: var(--ink-0);
  line-height: 1.2;
  margin: 0;
}
.step__check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 8px 14px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  cursor: pointer;
  transition: color 200ms, border-color 200ms, background 200ms;
  background: var(--bg-0);
}
.step__check:hover { color: var(--red); border-color: var(--red); }
.step__check input { position: absolute; opacity: 0; pointer-events: none; }
.step__check-box {
  width: 14px; height: 14px;
  border: 1.5px solid var(--ink-3);
  border-radius: 3px;
  display: inline-block;
  position: relative;
  transition: background 200ms, border-color 200ms;
}
.step__check-box::after {
  content: "";
  position: absolute;
  top: 1px; left: 4px;
  width: 3px; height: 7px;
  border: solid #FFF;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 200ms;
}
.step.is-done .step__check {
  background: var(--red);
  color: #FFF;
  border-color: var(--red);
}
.step.is-done .step__check-box {
  background: #FFF;
  border-color: #FFF;
}
.step.is-done .step__check-box::after {
  border-color: var(--red);
  transform: rotate(45deg) scale(1);
}

.step__body { color: var(--ink-1); font-size: 15.5px; line-height: 1.65; }
.step__body p { margin-bottom: 14px; }
.step__body p:last-child { margin-bottom: 0; }

/* Progress summary */
.b-progress {
  position: sticky;
  top: calc(var(--nav-h) + 80px);
  margin-bottom: 32px;
  padding: 16px 18px;
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 5;
  box-shadow: 0 4px 20px -8px rgba(10, 10, 10, 0.08);
}
.b-progress__bar {
  flex: 1;
  height: 4px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
}
.b-progress__fill {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--red);
  border-radius: 2px;
  transition: width 400ms var(--ease-apple);
}
.b-progress__text {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
  white-space: nowrap;
}
.b-progress__text strong { color: var(--red); font-weight: 700; }

/* ---------- CODE BLOCKS (Prism theme) ---------- */
pre[class*="language-"] {
  background: #0A0A0A;
  color: #F2F2F0;
  padding: 20px 24px;
  border-radius: 6px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.55;
  margin: 24px 0;
  border: 1px solid #1A1A1A;
}
code[class*="language-"], pre[class*="language-"] { text-shadow: none; }
:not(pre) > code {
  font-family: var(--mono);
  font-size: 0.88em;
  padding: 1px 6px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--red-deep);
}
.token.comment, .token.prolog, .token.doctype, .token.cdata { color: #7A7A7A; font-style: italic; }
.token.punctuation { color: #AAA; }
.token.tag, .token.property, .token.constant, .token.symbol, .token.deleted { color: #FF6A6A; }
.token.boolean, .token.number { color: #F5E6C8; }
.token.selector, .token.attr-name, .token.string, .token.char, .token.builtin, .token.inserted { color: #9FE5B6; }
.token.operator, .token.entity, .token.url, .language-css .token.string, .style .token.string { color: #E8F4FF; }
.token.atrule, .token.attr-value, .token.keyword { color: #FFB547; font-weight: 500; }
.token.function, .token.class-name { color: #FF8A8A; }
.token.regex, .token.important, .token.variable { color: #F5E6C8; }

/* Code block wrapper with language label */
.code-block {
  position: relative;
  margin: 24px 0;
}
.code-block__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: #1A1A1A;
  color: #9A9A9A;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 6px 6px 0 0;
}
.code-block__lang { color: #FF8A8A; }
.code-block__copy {
  background: transparent;
  color: #AAA;
  border: 1px solid #2A2A2A;
  border-radius: 3px;
  padding: 2px 8px;
  font-family: inherit;
  font-size: 10px;
  cursor: pointer;
  transition: color 200ms, border-color 200ms;
}
.code-block__copy:hover { color: #FFF; border-color: #555; }
.code-block__copy[data-copied="1"] { color: #9FE5B6; border-color: #9FE5B6; }
.code-block pre[class*="language-"] {
  margin: 0;
  border-radius: 0 0 6px 6px;
  border-top: 0;
}

/* ---------- KEY TAKEAWAY ---------- */
.takeaway {
  margin: 56px 0;
  padding: 36px 40px;
  border: 2px solid var(--ink-0);
  background: var(--bg-0);
  position: relative;
}
.takeaway::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 0;
  width: 100px;
  height: 6px;
  background: var(--red);
}
.takeaway__label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 700;
  display: block;
  margin-bottom: 12px;
}
.takeaway__body {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.35;
  color: var(--ink-0);
}

/* ---------- TUTORIAL REQUIREMENTS ---------- */
.req-list {
  list-style: none;
  margin: 24px 0 40px !important;
  padding: 0 !important;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.req-list li {
  background: var(--bg-0);
  padding: 16px 18px;
  margin: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 14px;
}
.req-list li strong {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 600;
}

/* ---------- NEXT-UP FOOTER ---------- */
.b-next {
  max-width: 1280px;
  margin: 0 auto;
  padding: 80px var(--gutter);
  border-top: 1px solid var(--line);
}
.b-next__h {
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(28px, 3vw, 40px);
  letter-spacing: -0.03em;
  color: var(--ink-0);
  margin-bottom: 40px;
}
.b-next__h .accent {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--red);
}
.b-next__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.b-next__card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg-0);
  transition: border-color 300ms, transform 300ms, box-shadow 300ms;
  position: relative;
  overflow: hidden;
}
.b-next__card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 0;
  height: 3px;
  background: var(--red);
  transition: width 400ms var(--ease-out);
}
.b-next__card:hover {
  border-color: var(--line-2);
  transform: translateY(-3px);
  box-shadow: 0 20px 40px -20px rgba(10, 10, 10, 0.1);
}
.b-next__card:hover::before { width: 100%; }
.b-next__cat {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 600;
}
.b-next__title {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.02em;
  color: var(--ink-0);
  line-height: 1.2;
}
.b-next__meta {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  text-transform: uppercase;
  margin-top: auto;
}

/* ---------- LISTING PAGE ---------- */
.blog-listing {
  max-width: 1280px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 80px) var(--gutter) 120px;
}
.blog-listing__head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 4vw, 64px);
  margin-bottom: 72px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--line);
  align-items: end;
}
@media (max-width: 780px) { .blog-listing__head { grid-template-columns: 1fr; align-items: start; } }

.blog-listing__title {
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(48px, 8vw, 128px);
  line-height: 0.95;
  letter-spacing: -0.055em;
  color: var(--ink-0);
  max-width: 14ch;
}
.blog-listing__title .accent {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--red);
}
.blog-listing__sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(18px, 1.6vw, 24px);
  color: var(--ink-2);
  line-height: 1.4;
  max-width: 52ch;
}

.blog-listing__controls {
  display: flex;
  gap: 12px;
  margin-bottom: 40px;
  flex-wrap: wrap;
  align-items: center;
}
.blog-listing__chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.chip {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 8px 14px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--bg-0);
  color: var(--ink-2);
  cursor: pointer;
  transition: color 200ms, background 200ms, border-color 200ms;
}
.chip:hover { color: var(--red); border-color: var(--red); }
.chip.is-active {
  background: var(--red);
  color: #FFF;
  border-color: var(--red);
  font-weight: 600;
}
.blog-listing__search {
  margin-left: auto;
  padding: 9px 16px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-0);
  background: var(--bg-0);
  min-width: 220px;
  transition: border-color 200ms;
}
.blog-listing__search::placeholder { color: var(--ink-3); }
.blog-listing__search:focus { outline: none; border-color: var(--red); }

@media (max-width: 640px) {
  .blog-listing__controls {
    align-items: stretch;
  }
  .blog-listing__chips {
    width: 100%;
  }
  .blog-listing__search {
    width: 100%;
    min-width: 0;
    margin-left: 0;
  }
}

/* Featured post */
.blog-featured {
  margin-bottom: 80px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 4vw, 64px);
  padding: 40px 0;
  border-top: 1px solid var(--ink-0);
  position: relative;
}
.blog-featured::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 120px;
  height: 3px;
  background: var(--red);
}
@media (max-width: 900px) { .blog-featured { grid-template-columns: 1fr; } }

.blog-featured__media {
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 2 / 1;
  background: var(--bg-1);
  order: 2;
}
@media (max-width: 900px) { .blog-featured__media { order: 0; } }
.blog-featured__media img, .blog-featured__media svg {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 800ms var(--ease-apple);
}
.blog-featured:hover .blog-featured__media img,
.blog-featured:hover .blog-featured__media svg { transform: scale(1.03); }

.blog-featured__body { display: flex; flex-direction: column; gap: 16px; justify-content: center; }
.blog-featured__tag {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 600;
}
.blog-featured__title {
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(28px, 3.4vw, 52px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: var(--ink-0);
}
.blog-featured__title a { color: inherit; }
.blog-featured__title a:hover { color: var(--red); }
.blog-featured__dek {
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 58ch;
}
.blog-featured__meta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* Post grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-top: 1px solid var(--ink-0);
  position: relative;
}
.blog-grid::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 120px;
  height: 3px;
  background: var(--red);
}
.post-card {
  background: var(--bg-0);
  padding: 32px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: background 300ms;
  position: relative;
  min-height: 320px;
}
.post-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--red);
  transition: width 400ms var(--ease-out);
}
.post-card:hover { background: var(--bg-1); }
.post-card:hover::before { width: 100%; }
.post-card__meta {
  display: flex;
  gap: 10px;
  align-items: center;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.post-card__cat { color: var(--red); font-weight: 600; }
.post-card__type {
  padding: 2px 8px;
  background: var(--ink-0);
  color: #FFF;
  border-radius: 2px;
  font-size: 9.5px;
}
.post-card__title {
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(20px, 1.8vw, 26px);
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ink-0);
}
.post-card__title a { color: inherit; }
.post-card__title a:hover { color: var(--red); }
.post-card__dek {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-2);
}
.post-card__foot {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: auto;
  display: flex;
  gap: 12px;
}
.post-card__arrow { color: var(--red); margin-left: auto; transition: transform 300ms; }
.post-card:hover .post-card__arrow { transform: translateX(4px); }

.blog-empty {
  padding: 80px 40px;
  text-align: center;
  color: var(--ink-3);
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  grid-column: 1 / -1;
  background: var(--bg-0);
}

/* ---------- SCROLL REVEALS ---------- */
.b-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 800ms var(--ease-apple), transform 800ms var(--ease-apple);
}
.b-reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}
.b-stagger > * { transition-delay: calc(var(--j, 0) * 80ms); }

/* ---------- REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  .b-hero, .b-hero__image, .b-reveal { opacity: 1 !important; transform: none !important; animation: none !important; }
}
