/* =========================================================
   Blog post shared styles — inherits tokens from styles.css
   ========================================================= */

body { overflow-x: hidden; }

/* Post header */
.post {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(32px, 6vw, 64px) var(--pad) clamp(64px, 10vw, 120px);
}

.post__back {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--f-mono); font-size: 12px;
  color: var(--fg-3); margin-bottom: 40px;
  transition: color .2s var(--ease), gap .25s var(--ease);
}
.post__back:hover { color: var(--accent); gap: 12px; }

.post__meta {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center;
  font-family: var(--f-mono); font-size: 11.5px;
  color: var(--fg-3);
  margin-bottom: 16px;
  letter-spacing: 0.04em;
}
.post__meta .accent { color: var(--accent); }
.post__meta .dot { width: 3px; height: 3px; background: var(--fg-3); border-radius: 999px; }

.post__title {
  font-family: var(--f-display);
  font-size: clamp(32px, 4.4vw, 56px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0 0 20px;
  color: var(--fg);
  text-wrap: balance;
}
html[data-font="serif"] .post__title { font-style: italic; font-weight: 400; }

.post__dek {
  font-family: var(--f-display);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.4;
  color: var(--fg-2);
  margin: 0 0 48px;
  max-width: 58ch;
  letter-spacing: -0.005em;
}
html[data-font="serif"] .post__dek { font-style: italic; }

/* Content */
.post__body { color: var(--fg-2); font-size: 16px; line-height: 1.72; }
.post__body > * + * { margin-top: 1.3em; }
.post__body p { margin: 0; max-width: 66ch; }
.post__body h2 {
  font-family: var(--f-display);
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 600; letter-spacing: -0.015em;
  color: var(--fg);
  margin: 2.4em 0 0.4em;
  line-height: 1.2;
}
html[data-font="serif"] .post__body h2 { font-style: italic; font-weight: 400; }
.post__body h2::before {
  content: "// ";
  color: var(--accent);
  font-family: var(--f-mono);
  font-size: 0.75em;
  letter-spacing: 0.05em;
  vertical-align: 0.15em;
  font-style: normal;
}

.post__body h3 {
  font-family: var(--f-display);
  font-size: 18px; font-weight: 600;
  color: var(--fg);
  margin: 1.8em 0 0.3em;
}
html[data-font="serif"] .post__body h3 { font-style: italic; font-weight: 400; }

.post__body strong, .post__body b { color: var(--fg); font-weight: 600; }
.post__body em { color: var(--fg); font-style: italic; }
.post__body a {
  color: var(--accent);
  border-bottom: 1px solid var(--accent-soft);
  padding-bottom: 1px;
  transition: border-color .2s;
}
.post__body a:hover { border-bottom-color: var(--accent); }

.post__body ul, .post__body ol {
  padding-left: 0; margin: 0;
  list-style: none;
  display: grid; gap: 8px;
  max-width: 66ch;
}
.post__body ul li, .post__body ol li {
  position: relative;
  padding-left: 24px;
  color: var(--fg-2);
}
.post__body ul li::before {
  content: "→";
  position: absolute; left: 0; top: 0;
  color: var(--accent);
  font-family: var(--f-mono);
}
.post__body ol {
  counter-reset: post-ol;
}
.post__body ol li {
  counter-increment: post-ol;
}
.post__body ol li::before {
  content: counter(post-ol, decimal-leading-zero);
  position: absolute; left: 0; top: 0;
  color: var(--accent);
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: -0.02em;
}

.post__body blockquote {
  margin: 0;
  padding: 18px 22px;
  border-left: 2px solid var(--accent);
  background: var(--bg-2);
  font-family: var(--f-display);
  font-size: 18px;
  line-height: 1.45;
  color: var(--fg);
  letter-spacing: -0.005em;
  max-width: 66ch;
}
html[data-font="serif"] .post__body blockquote { font-style: italic; }

.post__body code {
  font-family: var(--f-mono);
  font-size: 0.88em;
  padding: 2px 6px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--fg);
}

.post__body pre {
  margin: 0; padding: 20px 22px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  font-family: var(--f-mono);
  font-size: 13px;
  line-height: 1.6;
  color: var(--fg-2);
  overflow-x: auto;
  max-width: 100%;
}
.post__body pre code {
  padding: 0; border: 0; background: transparent;
  font-size: inherit;
}

/* Pull quote */
.post__pull {
  margin: 2em 0;
  font-family: var(--f-display);
  font-size: clamp(20px, 2.4vw, 26px);
  line-height: 1.3;
  color: var(--fg);
  letter-spacing: -0.015em;
  padding: 4px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
  max-width: 66ch;
  text-wrap: balance;
}
html[data-font="serif"] .post__pull { font-style: italic; font-weight: 400; }
.post__pull::before {
  content: "›";
  color: var(--accent);
  margin-right: 10px;
  font-family: var(--f-mono);
}

/* Footer of post */
.post__foot {
  margin-top: 72px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  display: grid; gap: 20px;
  font-family: var(--f-mono); font-size: 13px;
}
.post__foot-row {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  color: var(--fg-3);
}
.post__foot-row b { color: var(--fg); font-weight: 500; }

.post__next {
  display: grid;
  grid-template-columns: 1fr 1fr; gap: 1px;
  background: var(--line); border: 1px solid var(--line);
}
@media (max-width: 600px) { .post__next { grid-template-columns: 1fr; } }
.post__next a {
  background: var(--bg-2); padding: 18px 20px;
  display: grid; gap: 4px;
  transition: background .25s var(--ease);
}
.post__next a:hover { background: var(--bg-3); }
.post__next a .post__next-h {
  font-family: var(--f-mono); font-size: 10.5px; color: var(--fg-3);
  letter-spacing: 0.14em; text-transform: uppercase;
}
.post__next a .post__next-t {
  font-family: var(--f-display); font-size: 15px; color: var(--fg);
  font-weight: 500;
}
.post__next a:hover .post__next-t { color: var(--accent); }
.post__next a.prev { text-align: left; }
.post__next a.next { text-align: right; }
