/* ============================================================
   purwarkrishna.dev — article / reading system
   Builds on styles.css (shares :root tokens, header, footer, btn).
   Adds: content blocks, light mode, TOC, reading progress, share rail.
   ============================================================ */

:root {
  --read-width: 720px;
  --toc-width: 230px;
  --note-width: clamp(170px, 20vw, 248px);
}

/* smooth the theme swap on article-specific surfaces */
.post-cta, .post-foot, .callout, pre, .post-body code,
.post-aside, .post-toc, .progress-track, .kr-card { transition: background .4s var(--ease), color .4s var(--ease), border-color .4s var(--ease); }

/* ============================================================
   READING PROGRESS BAR
   ============================================================ */
.progress-track {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  z-index: 120;
  background: transparent;
  pointer-events: none;
}
.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-soft);
  transition: width .12s linear;
}

/* ============================================================
   LAYOUT SHELL
   ============================================================ */
.post-main {
  padding-top: clamp(96px, 12vh, 132px);
  padding-bottom: clamp(56px, 9vh, 104px);
}
.post-shell {
  width: 100%;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.post-shell {
  max-width: calc(var(--toc-width) + 80px + var(--read-width) + var(--gutter) * 2);
}

/* TOC layout: sticky sidebar + article column */
.post-main[data-layout="toc"] .post-shell {
  display: grid;
  grid-template-columns: var(--toc-width) minmax(0, 1fr);
  gap: 80px;
  align-items: start;
}

.post-main[data-layout="toc"] .post-wrap { grid-column: 2; }
.post-wrap { width: 100%; max-width: var(--read-width); margin-inline: auto; }

/* ============================================================
   TABLE OF CONTENTS — sticky sidebar, stays with the article
   ============================================================ */
.post-toc { display: none; }
.post-main[data-layout="toc"] .post-toc {
  display: block;
  position: fixed;
  top: 110px;
  z-index: 1;
  max-height: calc(100vh - 150px);
  overflow-y: auto;
  padding-right: 6px;
  transition: opacity 0.3s var(--ease), visibility 0.3s var(--ease);
}
.post-toc.toc-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.post-toc .toc-label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 16px;
}
.post-toc ul { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.post-toc a {
  display: block;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--muted);
  padding: 5px 0 5px 14px;
  border-left: 1.5px solid var(--line);
  transition: color .3s var(--ease), border-color .3s var(--ease);
}
.post-toc a.sub { padding-left: 28px; font-size: 12.5px; color: var(--faint); }
.post-toc a:hover { color: var(--text); }
.post-toc a.active { color: var(--accent); border-left-color: var(--accent); }

/* ============================================================
   POST HEADER
   ============================================================ */
.post-header { margin-bottom: clamp(34px, 5.5vh, 52px); }

.post-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.post-back {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  transition: color .3s var(--ease);
}
.post-back:hover { color: var(--accent); }
.post-cat {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 4px 10px;
  border: 1px solid var(--accent-soft);
  border-radius: 4px;
  white-space: nowrap;
}

.post-title {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2.1rem, 4.6vw, 3.35rem);
  line-height: 1.06;
  letter-spacing: -0.022em;
  text-wrap: balance;
}
.post-lede {
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  line-height: 1.45;
  color: var(--muted);
  margin-top: 20px;
  max-width: 46ch;
  text-wrap: pretty;
}

.post-byline {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.03em;
  color: var(--faint);
}
.post-byline .who { color: var(--muted); }
.post-sep { color: var(--line-strong); }

/* tags */
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.post-tags .tag {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: var(--muted);
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: border-color .3s var(--ease), color .3s var(--ease);
}
.post-tags .tag:hover { border-color: var(--accent); color: var(--accent); }
.post-tags .tag::before { content: "#"; color: var(--faint); margin-right: 1px; }

/* cover image */
.post-cover {
  margin-top: 30px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 16 / 7;
  background: var(--surface);
}
.post-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.post-main[data-header="editorial"] .post-cover { display: none; }

/* ============================================================
   POST BODY — prose
   ============================================================ */
.post-body {
  font-size: clamp(1.02rem, 1.4vw, 1.14rem);
  line-height: 1.74;
  color: var(--text);
}
.post-body > *:first-child { margin-top: 0; }

.post-body p { margin-bottom: 1.35em; text-wrap: pretty; }
.post-body p:last-child { margin-bottom: 0; }

.post-body h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.55rem, 2.9vw, 2.05rem);
  line-height: 1.12;
  letter-spacing: -0.018em;
  margin-top: clamp(42px, 6vh, 66px);
  margin-bottom: 16px;
  scroll-margin-top: 100px;
}
.post-body h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.25rem, 2.1vw, 1.55rem);
  line-height: 1.18;
  letter-spacing: -0.012em;
  margin-top: 38px;
  margin-bottom: 12px;
  scroll-margin-top: 100px;
}
.post-body h4 {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  margin-top: 30px;
  margin-bottom: 10px;
}

/* anchor link affordance on headings */
.post-body h2, .post-body h3 { position: relative; }
.post-body h2 .anchor, .post-body h3 .anchor {
  position: absolute;
  left: -0.85em;
  color: var(--accent);
  opacity: 0;
  text-decoration: none;
  transition: opacity .25s var(--ease);
  font-weight: 400;
}
.post-body h2:hover .anchor, .post-body h3:hover .anchor { opacity: 0.7; }

.post-body strong { color: var(--text); font-weight: 600; }
.post-body em { font-style: italic; color: var(--muted); }

.post-body a:not(.anchor) {
  color: var(--accent);
  text-underline-offset: 3px;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--accent-soft);
  transition: text-decoration-color .3s var(--ease);
}
.post-body a:not(.anchor):hover { text-decoration-color: var(--accent); }

/* lists */
.post-body ul, .post-body ol {
  padding-left: 0;
  margin-bottom: 1.4em;
  display: flex;
  flex-direction: column;
  gap: 9px;
  list-style: none;
  counter-reset: li;
}
.post-body li { line-height: 1.62; padding-left: 1.7em; position: relative; }
.post-body ul > li::before {
  content: "";
  position: absolute;
  left: 2px; top: 0.7em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.post-body ol > li { counter-increment: li; }
.post-body ol > li::before {
  content: counter(li, decimal-leading-zero);
  position: absolute;
  left: 0; top: 0.05em;
  font-family: var(--mono);
  font-size: 0.78em;
  color: var(--accent);
  font-weight: 500;
}
.post-body li > ul, .post-body li > ol { margin-top: 9px; margin-bottom: 0; }

/* blockquote */
.post-body blockquote {
  border-left: 2px solid var(--accent);
  padding: 2px 0 2px 22px;
  margin: 26px 0;
  color: var(--muted);
  font-style: italic;
}
.post-body blockquote p { margin-bottom: 0.6em; }
.post-body blockquote p:last-child { margin-bottom: 0; }

/* pull quote */
.post-body .pullquote {
  margin: clamp(38px, 5vh, 56px) 0;
  padding: 4px 0;
  border: none;
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.5rem, 3vw, 2.05rem);
  line-height: 1.22;
  letter-spacing: -0.015em;
  color: var(--text);
  text-wrap: balance;
  position: relative;
  padding-left: clamp(18px, 3vw, 34px);
}
.post-body .pullquote::before {
  content: "";
  position: absolute;
  left: 0; top: 6px; bottom: 6px;
  width: 3px;
  background: linear-gradient(var(--accent), var(--accent-soft));
  border-radius: 3px;
}
.post-body .pullquote cite {
  display: block;
  margin-top: 16px;
  font-family: var(--mono);
  font-style: normal;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}

/* ============================================================
   CALLOUTS — note / tip / warning / key
   ============================================================ */
.callout {
  --c: var(--accent);
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 14px;
  margin: 28px 0;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--c);
  border-radius: 10px;
  background: var(--bg-2);
  font-size: 0.97em;
  line-height: 1.62;
  color: var(--muted);
}
.callout .callout-ic {
  width: 26px; height: 26px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: color-mix(in oklch, var(--c) 16%, transparent);
  color: var(--c);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  flex: none;
}
.callout .callout-body > *:last-child { margin-bottom: 0; }
.callout .callout-title {
  display: block;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.9em;
  letter-spacing: 0.01em;
  color: var(--text);
  margin-bottom: 4px;
}
.callout p { margin-bottom: 0.6em; }
.callout.note    { --c: oklch(0.70 0.10 240); }
.callout.tip     { --c: oklch(0.70 0.12 160); }
.callout.warning { --c: oklch(0.74 0.14 70); }
.callout.key     { --c: var(--accent); }

/* ============================================================
   CODE
   ============================================================ */
.post-body code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--surface);
  padding: 2px 6px;
  border-radius: 5px;
  border: 1px solid var(--line);
  color: var(--text);
}
.post-body pre {
  position: relative;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  margin: 26px 0;
  overflow: hidden;
}
html[data-theme="light"] .post-body pre { background: oklch(0.945 0.008 85); }

.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--faint);
}
.code-head .lang { color: var(--accent); text-transform: lowercase; }
.code-head .dots { display: flex; gap: 6px; }
.code-head .dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.code-copy {
  appearance: none;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 6px;
  cursor: pointer;
  transition: border-color .25s var(--ease), color .25s var(--ease);
}
.code-copy:hover { border-color: var(--accent); color: var(--accent); }
.code-copy.copied { color: var(--accent); border-color: var(--accent); }

.post-body pre code {
  display: block;
  padding: 18px 20px;
  overflow-x: auto;
  background: none;
  border: none;
  font-size: 0.86rem;
  line-height: 1.65;
  color: var(--text);
}

/* Prism token colors (dark) */
.token.comment, .token.prolog, .token.doctype, .token.cdata { color: var(--faint); font-style: italic; }
.token.punctuation { color: var(--muted); }
.token.keyword, .token.boolean, .token.atrule, .token.important { color: oklch(0.74 0.12 320); }
.token.string, .token.char, .token.attr-value, .token.regex { color: oklch(0.78 0.11 150); }
.token.function, .token.class-name { color: oklch(0.80 0.10 240); }
.token.number, .token.constant { color: oklch(0.80 0.11 50); }
.token.operator, .token.entity, .token.url { color: var(--accent); }
.token.builtin, .token.tag, .token.selector { color: oklch(0.78 0.10 30); }
.token.property, .token.attr-name { color: oklch(0.82 0.08 90); }
.token.comment { opacity: 0.85; }

/* Prism tokens (light) */
html[data-theme="light"] .token.keyword, html[data-theme="light"] .token.boolean { color: oklch(0.50 0.16 320); }
html[data-theme="light"] .token.string, html[data-theme="light"] .token.attr-value { color: oklch(0.48 0.13 150); }
html[data-theme="light"] .token.function, html[data-theme="light"] .token.class-name { color: oklch(0.50 0.13 250); }
html[data-theme="light"] .token.number { color: oklch(0.55 0.14 45); }
html[data-theme="light"] .token.builtin, html[data-theme="light"] .token.tag { color: oklch(0.52 0.14 30); }
html[data-theme="light"] .token.comment { color: var(--faint); }

/* ============================================================
   FIGURES / IMAGES
   ============================================================ */
.post-body figure { margin: 30px 0; }
.post-body figure .fig-frame {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  min-height: 200px;
}
.post-body figure img { width: 100%; height: auto; display: block; }
.post-body figcaption {
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: var(--faint);
  line-height: 1.5;
  padding-left: 14px;
  border-left: 1px solid var(--line-strong);
}
.post-body figcaption b { color: var(--muted); font-weight: 500; }

/* horizontal rule */
.post-body hr {
  border: none;
  height: 1px;
  background: var(--line);
  margin: clamp(38px, 5vh, 56px) 0;
  position: relative;
}
.post-body hr::after {
  content: "✦";
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg);
  padding: 0 14px;
  color: var(--accent);
  font-size: 11px;
}

/* ============================================================
   TABLES
   ============================================================ */
.post-body .table-scroll { overflow-x: auto; margin: 28px 0; }
.post-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
  min-width: 420px;
}
.post-body thead th {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
  padding: 11px 16px;
  border-bottom: 1px solid var(--line-strong);
  text-align: left;
  white-space: nowrap;
}
.post-body td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  vertical-align: top;
  line-height: 1.55;
}
.post-body tbody tr { transition: background .25s var(--ease); }
.post-body tbody tr:hover { background: var(--bg-2); }
.post-body tbody tr:last-child td { border-bottom: none; }
.post-body td strong { color: var(--text); }

/* ============================================================
   FOOTNOTES
   ============================================================ */
.post-body .footnotes { margin-top: clamp(40px, 6vh, 60px); padding-top: 24px; border-top: 1px solid var(--line); }
.post-body .footnotes::before {
  content: "Footnotes";
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 16px;
}
.post-body sup.footnote-ref a { text-decoration: none; color: var(--accent); font-family: var(--mono); font-size: 0.9em; }
.post-body .footnote-backref { text-decoration: none; }
.footnotes-sep { display: none; }

/* ============================================================
   ASIDES
   ============================================================ */
.post-aside {
  margin: 24px 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg-2);
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--muted);
}
.post-aside .aside-label {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}

/* ============================================================
   SHARE RAIL (sticky, left of article)
   ============================================================ */
.share-rail {
  position: fixed;
  left: clamp(16px, 3vw, 40px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}
.share-rail .share-cap {
  writing-mode: vertical-rl;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 6px;
}
.share-btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg-2);
  color: var(--muted);
  cursor: pointer;
  transition: border-color .25s var(--ease), color .25s var(--ease), transform .25s var(--ease), background .25s var(--ease);
}
.share-btn:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.share-btn svg { width: 16px; height: 16px; }
.share-btn.copied { color: var(--accent); border-color: var(--accent); }
@media (max-width: 1240px) { .share-rail { display: none; } }

/* ============================================================
   POST FOOTER — share, author card
   ============================================================ */
.post-foot {
  margin-top: clamp(44px, 7vh, 72px);
  padding-top: 30px;
  border-top: 1px solid var(--line);
}
.foot-share {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.foot-share .lbl {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}
.foot-share .row { display: flex; gap: 9px; flex-wrap: wrap; }
.foot-share .fbtn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-2);
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  transition: border-color .25s var(--ease), color .25s var(--ease);
}
.foot-share .fbtn:hover { border-color: var(--accent); color: var(--accent); }
.foot-share .fbtn svg { width: 15px; height: 15px; }

.author-card {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 18px;
  align-items: center;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(150deg, var(--bg-2), var(--bg));
}
.author-card .avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--surface);
}
.author-card .avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-card .a-name { font-family: var(--display); font-size: 1.25rem; font-weight: 500; }
.author-card .a-bio { color: var(--muted); font-size: 0.92rem; line-height: 1.55; margin-top: 5px; }
.author-card .a-links { display: flex; gap: 16px; margin-top: 12px; }
.author-card .a-links a {
  font-family: var(--mono); font-size: 12px; color: var(--accent);
  text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--accent-soft);
}
.author-card .a-links a:hover { text-decoration-color: var(--accent); }

/* ============================================================
   MOBILE TOC ACCORDION
   ============================================================ */
.toc-mobile { display: none; }
.toc-mobile {
  margin: 0 0 30px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-2);
  overflow: hidden;
}
.toc-mobile > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.toc-mobile > summary::-webkit-details-marker { display: none; }
.toc-mobile > summary::after {
  content: "+";
  font-size: 16px;
  color: var(--accent);
  transition: transform .3s var(--ease);
}
.toc-mobile[open] > summary::after { transform: rotate(45deg); }
.toc-mobile ul { list-style: none; padding: 4px 16px 14px; display: flex; flex-direction: column; gap: 2px; }
.toc-mobile a { display: block; font-size: 14px; color: var(--muted); padding: 7px 0 7px 14px; border-left: 1.5px solid var(--line); transition: color .25s var(--ease), border-color .25s var(--ease); }
.toc-mobile a.sub { padding-left: 28px; font-size: 13px; color: var(--faint); }
.toc-mobile a.active { color: var(--accent); border-left-color: var(--accent); }

/* ============================================================
   ENDING — Keep reading section
   ============================================================ */
.post-end .keep-reading {
  border-top: 1px solid var(--line);
  padding-block: clamp(48px, 8vh, 84px);
}
.post-main[data-end="related"] ~ .post-end .end-cta { display: none; }
.post-main[data-end="cta"] ~ .post-end .keep-reading { display: none; }

.kr-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: clamp(24px, 4vh, 40px);
  flex-wrap: wrap;
}
.kr-all {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--muted);
  transition: color .3s var(--ease);
}
.kr-all:hover { color: var(--accent); }

.kr-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.kr-card {
  background: var(--bg);
  padding: clamp(22px, 2.4vw, 30px);
  display: flex;
  flex-direction: column;
  min-height: 200px;
  position: relative;
  transition: background .35s var(--ease);
}
.kr-card::after {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform .45s var(--ease);
}
.kr-card:hover { background: var(--bg-2); }
.kr-card:hover::after { transform: scaleY(1); }
.kr-cat {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.kr-title {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.32rem;
  line-height: 1.18;
  letter-spacing: -0.012em;
  margin-top: 12px;
  transition: color .3s var(--ease);
  text-wrap: balance;
}
.kr-card:hover .kr-title { color: var(--accent); }
.kr-ex {
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.55;
  margin-top: 10px;
}
.kr-meta {
  margin-top: auto;
  padding-top: 18px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--faint);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .post-main[data-layout="toc"] .post-shell { grid-template-columns: 1fr; }
  .post-main[data-layout="toc"] .post-toc { display: none; }
  .post-main[data-layout="toc"] .toc-mobile { display: block; }
}
@media (max-width: 920px) {
  .kr-grid { grid-template-columns: 1fr; }
  .kr-card { min-height: 0; }
}
@media (max-width: 720px) {
  .post-body pre code { padding: 14px 16px; }
  .post-body .table-scroll { margin-inline: calc(var(--gutter) * -0.5); padding-inline: calc(var(--gutter) * 0.5); }
  .author-card { grid-template-columns: 1fr; text-align: left; }
  .author-card .avatar { width: 56px; height: 56px; }
  .post-byline { gap: 8px; }
}
