/* ============================================================
   GitSyn — /blog
   Uses the tokens and base styles from style.css. Only the
   writing surfaces live here: index, article, sources, FAQ,
   author box, related posts.
   ============================================================ */

.nav__mobile { display: none; margin-left: auto; }
@media (max-width: 940px) {
  .nav__mobile { display: inline-flex; }
}

/* ── Index ─────────────────────────────────────────────────── */
.blog-hero {
  padding: clamp(56px, 9vw, 112px) 0 clamp(32px, 5vw, 56px);
  border-bottom: 1px solid var(--line);
}
.blog-hero h1 {
  margin-top: 14px;
  font-family: var(--font-serif);
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.04;
  max-width: 15ch;
}
.blog-hero .lede { margin-top: 22px; font-size: clamp(1.1rem, 1.7vw, 1.3rem); }

.blog-list { padding: clamp(40px, 6vw, 72px) 0 clamp(72px, 9vw, 120px); }

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 40px) clamp(20px, 2.4vw, 32px);
}
@media (max-width: 980px) { .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .post-grid { grid-template-columns: 1fr; } }

.post-card { display: flex; flex-direction: column; min-width: 0; }
.post-card__media {
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-sunk);
  border: 1px solid var(--line);
}
.post-card__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s var(--ease);
}
.post-card:hover .post-card__media img { transform: scale(1.025); }
.post-card__body { padding-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.post-card__meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  color: var(--ink-3); font-size: 13px; font-variant-numeric: tabular-nums;
}
.post-card__meta .chip { font-size: 12px; }
.post-card h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.28rem, 1.9vw, 1.52rem);
  font-weight: 500;
  letter-spacing: -0.018em;
  line-height: 1.2;
}
.post-card h2 a { text-decoration: none; }
.post-card h2 a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.post-card__excerpt { color: var(--ink-2); font-size: 15.5px; line-height: 1.55; }
.post-card__more { margin-top: auto; padding-top: 4px; font-size: 14px; font-weight: 600; color: var(--accent-ink); }

.blog-empty {
  max-width: 44ch;
  padding: 48px 0;
  display: grid; gap: 22px;
  color: var(--ink-2);
}
.blog-empty p { font-size: 18px; }

.pagination {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  margin-top: clamp(40px, 6vw, 72px);
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  color: var(--ink-3);
}
.pagination a { color: var(--ink); font-weight: 600; text-decoration: none; }
.pagination a:hover { text-decoration: underline; text-underline-offset: 3px; }
.pagination span:last-child, .pagination a:last-child { text-align: right; }

/* ── Article header ────────────────────────────────────────── */
.post__head { padding: clamp(40px, 6vw, 72px) 0 clamp(28px, 4vw, 44px); }
.post__head-inner { max-width: 820px; }
.breadcrumb {
  display: flex; gap: 8px; align-items: center;
  font-size: 13.5px; color: var(--ink-3);
  margin-bottom: 26px;
}
.breadcrumb a { color: var(--ink-3); text-decoration: none; }
.breadcrumb a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.post__head h1 {
  margin-top: 12px;
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 500;
  letter-spacing: -0.028em;
  line-height: 1.08;
  max-width: 20ch;
}
.post__dek {
  margin-top: 20px;
  max-width: 38em;
  font-size: clamp(1.08rem, 1.5vw, 1.24rem);
  line-height: 1.55;
  color: var(--ink-2);
}
.byline {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-top: 28px;
  font-size: 14px; color: var(--ink-3);
}
.byline img { width: 36px; height: 36px; border-radius: 999px; object-fit: cover; border: 1px solid var(--line); }
.byline__name { color: var(--ink); font-weight: 600; }
.byline__meta { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.byline__sep { opacity: .55; }

.post__hero { margin: 0; padding: 0; }
.post__hero .container { max-width: 1040px; }
.post__hero img {
  width: 100%; height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius-l);
  border: 1px solid var(--line);
  background: var(--bg-sunk);
}

/* ── Article body ──────────────────────────────────────────── */
.post__body { max-width: 760px; padding-top: clamp(40px, 6vw, 64px); }

.prose { font-size: 18.5px; line-height: 1.68; color: var(--ink); }
.prose > * + * { margin-top: 1.35em; }
.prose p { color: var(--ink); }
.prose h2 {
  margin-top: 2.4em;
  font-family: var(--font-serif);
  font-size: clamp(1.65rem, 2.6vw, 2.05rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.16;
}
.prose h3 {
  margin-top: 2em;
  font-size: 1.18rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.prose ul, .prose ol { padding-left: 1.35em; }
.prose li + li { margin-top: .5em; }
.prose li { padding-left: .2em; }
.prose a {
  color: var(--accent-ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.prose a:hover { text-decoration-thickness: 2px; }
.prose blockquote {
  margin: 1.8em 0;
  padding: 4px 0 4px 22px;
  border-left: 2px solid var(--accent);
  color: var(--ink-2);
  font-family: var(--font-serif);
  font-size: 1.14em;
  line-height: 1.55;
}
.prose strong { font-weight: 650; }
.prose code {
  font-size: .88em;
  padding: .12em .38em;
  border-radius: 5px;
  background: var(--bg-sunk);
  border: 1px solid var(--line);
}
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.prose sup.cite { font-size: .68em; line-height: 0; }
.prose sup.cite a {
  text-decoration: none;
  color: var(--accent-ink);
  padding: 0 .12em;
  font-variant-numeric: tabular-nums;
}
.prose sup.cite a:hover { text-decoration: underline; }

.sources {
  margin-top: clamp(48px, 7vw, 72px);
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.sources h2 {
  font-size: 13px;
  font-weight: 650;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.sources ol { margin-top: 16px; padding-left: 1.3em; display: grid; gap: 10px; font-size: 14.5px; color: var(--ink-2); }
.sources li { line-height: 1.45; }
.sources li:target { background: var(--accent-soft); border-radius: 6px; }
.sources a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.sources a:hover { color: var(--accent-ink); }
.sources__host { display: block; color: var(--ink-3); font-size: 12.5px; margin-top: 2px; }

.faq {
  margin-top: clamp(48px, 7vw, 72px);
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.faq h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 2.4vw, 1.85rem);
  font-weight: 500;
  letter-spacing: -0.02em;
}
.faq__item { margin-top: 28px; }
.faq__item h3 { font-size: 1.06rem; font-weight: 650; letter-spacing: -0.005em; }
.faq__answer { margin-top: 8px; color: var(--ink-2); font-size: 16.5px; line-height: 1.62; }
.faq__answer a { color: var(--accent-ink); text-underline-offset: 3px; }

/* ── Author box ────────────────────────────────────────────── */
.author-box {
  display: flex;
  gap: 20px;
  margin-top: clamp(48px, 7vw, 72px);
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.author-box__photo { width: 72px; height: 72px; border-radius: 999px; object-fit: cover; flex: none; border: 1px solid var(--line); }
.author-box__text { min-width: 0; }
.author-box__name { font-weight: 650; font-size: 16px; }
.author-box__role { color: var(--ink-3); font-size: 13.5px; margin-top: 2px; }
.author-box__bio { color: var(--ink-2); font-size: 15px; line-height: 1.55; margin-top: 10px; }
.author-box__links { margin-top: 12px; font-size: 14px; color: var(--ink-3); }
.author-box__links a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.author-box__links a:hover { color: var(--accent-ink); }

/* ── Related ───────────────────────────────────────────────── */
.related {
  margin-top: clamp(64px, 9vw, 112px);
  padding-top: clamp(36px, 5vw, 56px);
  padding-bottom: clamp(72px, 9vw, 120px);
  border-top: 1px solid var(--line);
}
.related > h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
  font-weight: 500;
  letter-spacing: -0.02em;
}
.related__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  margin-top: 28px;
}
@media (max-width: 860px) { .related__grid { grid-template-columns: 1fr; gap: 22px; } }
.related__card { padding-top: 18px; border-top: 1px solid var(--line); }
.related__meta {
  font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--ink-3);
}
.related__card h3 {
  margin-top: 8px;
  font-family: var(--font-serif);
  font-size: 1.24rem; font-weight: 500; line-height: 1.22; letter-spacing: -0.015em;
}
.related__card h3 a { text-decoration: none; }
.related__card h3 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.related__card p:not(.related__meta) { margin-top: 8px; color: var(--ink-2); font-size: 14.5px; line-height: 1.5; }

/* ── Preview + 404 ─────────────────────────────────────────── */
.preview-banner {
  padding: 10px 16px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  border-bottom: 1px solid var(--line-strong);
  text-align: center;
  font-size: 13.5px;
  font-weight: 600;
}
.not-found { padding: clamp(64px, 10vw, 140px) 0 clamp(96px, 12vw, 180px); }
.not-found h1 {
  margin-top: 12px;
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 5.4vw, 3.8rem);
  font-weight: 500;
  letter-spacing: -0.03em;
}
.not-found .lede { margin-top: 18px; }
.not-found .btn { margin-top: 28px; }
.not-found__path { margin-top: 28px; color: var(--ink-3); font-size: 13px; }

@media (max-width: 620px) {
  .post__head h1 { max-width: none; }
  .author-box { flex-direction: column; gap: 14px; padding: 22px; }
  .prose { font-size: 17.5px; }
  .prose h2 { margin-top: 2em; }
  .byline { column-gap: 10px; row-gap: 4px; }
  .byline__sep { display: none; }
  .byline__meta { column-gap: 10px; }
}
