/* Article page (the future blog). Loads after /assets/site.css. Reading column 680 px,
   body text 18 px; desktop adds a sticky "On this page" beside it. */
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-new(root) { animation: push-in .32s var(--ease) both; }
  ::view-transition-old(root) { animation: fade-out .2s ease both; }
}
@keyframes push-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade-out { to { opacity: 0; } }

.post { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "body" "end"; column-gap: 56px; max-width: 744px; }
.post-head { grid-area: head; padding-block: 28px; display: flex; flex-direction: column; gap: 14px; }
.post-kicker { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.post-head h1 { font-size: 34px; line-height: 1.08; letter-spacing: -.02em; }
.post-dek { font-size: 19px; line-height: 1.5; color: var(--text); }
.post-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; min-height: 44px; padding-top: 6px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.post-meta strong { color: var(--ink); }
.toc { grid-area: toc; display: none; }
.post-body { grid-area: body; display: flex; flex-direction: column; gap: 20px; max-width: 680px; min-width: 0; font-size: 18px; line-height: 1.65; color: var(--text); }
.post-body h2 { padding-top: 16px; font-size: 26px; line-height: 1.2; color: var(--ink); scroll-margin-top: calc(var(--bar-h) + 16px); }
.post-body strong { color: var(--ink); }
.post-body pre { margin: 0; padding: 16px; border-radius: 12px; background: var(--ink); color: var(--dark-text); font-family: var(--font-mono); font-size: 13px; line-height: 1.6; overflow-x: auto; }
.post-body figure { display: flex; flex-direction: column; gap: 10px; }
.post-body figcaption { font-size: 14px; line-height: 1.5; color: var(--muted); }
.post-link { display: flex; align-items: center; gap: 14px; padding: 16px; border: 2px solid var(--ink); border-radius: 16px; background: var(--tint); color: var(--ink); text-decoration: none; box-shadow: 4px 4px 0 var(--ink); }
.post-link:hover { color: var(--ink); background: var(--blue-tint); }
.post-link-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.post-link-name { font-family: var(--font-heading); font-weight: 700; font-size: 18px; line-height: 1.25; }
.post-link-sub { font-size: 14px; line-height: 1.4; color: var(--muted); }
.post-end { grid-area: end; padding-top: 40px; }
.author { display: flex; flex-direction: column; gap: 12px; padding: 20px; border: 2px solid var(--ink); border-radius: 18px; background: var(--white); }
.author-name { font-family: var(--font-heading); font-weight: 800; font-size: 20px; }
.author p { font-size: 15px; line-height: 1.55; color: var(--text); }
.post-next { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding-block: 20px 56px; }
.post-next a { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-height: 72px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--white); color: var(--ink); text-decoration: none; }
.post-next a:hover { border-color: var(--ink); color: var(--ink); }
.post-next a:last-child { text-align: right; }
.post-next b { font-family: var(--font-heading); font-size: 17px; }
@media (min-width: 640px) {
  .post-head { padding-block: 48px 32px; gap: 16px; }
  .post-head h1 { font-size: 48px; }
  .post-dek { font-size: 21px; }
  .post-body h2 { font-size: 30px; }
  .author { flex-direction: row; align-items: center; gap: 24px; padding: 24px; }
  .author-text { flex: 1; display: flex; flex-direction: column; gap: 6px; }
}
@media (min-width: 1024px) {
  .post { max-width: 1000px; grid-template-columns: 200px minmax(0, 680px); grid-template-areas: ". head" "toc body" ". end"; justify-content: center; }
  .post-head { padding-block: 64px 40px; }
  .post-head h1 { font-size: 60px; }
  .toc { display: flex; flex-direction: column; gap: 2px; position: sticky; top: calc(var(--bar-h) + 32px); align-self: start; padding-top: 20px; }
  .toc .label { padding: 0 0 8px 14px; }
  .toc a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-left: 2px solid var(--line); color: var(--muted); font-size: 14px; text-decoration: none; }
  .toc a:hover { color: var(--ink); border-left-color: var(--ink); }
}
