/* Blog archive — local additions on top of style.css + project-page.css */

/* ── Reset body padding that style.css adds for home ─── */

body { padding-top: 0; }

/* ── Nav with two links ───────────────────────── */

.page-nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.nav-back-secondary {
  color: var(--text-neutral-400, #aaa);
}

/* ── Blog index hero ──────────────────────────── */

.blog-hero {
  padding: 3.5rem 0 2rem;
  border-bottom: 1px solid var(--border-neutral-200);
  margin-bottom: 1rem;
}

.blog-hero-title {
  font-family: 'Roboto Mono', monospace;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
}

.blog-hero-tagline {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  color: var(--text-neutral-600);
  max-width: 620px;
  line-height: 1.6;
  margin: 0 0 1.5rem;
}

.blog-hero-tagline a {
  color: var(--text-black);
  text-decoration: underline;
  text-decoration-color: var(--border-neutral-200);
  text-underline-offset: 3px;
}

.blog-hero-stats {
  display: flex;
  gap: 1.5rem;
  font-family: 'Roboto Mono', monospace;
  font-size: 0.8125rem;
  color: var(--text-neutral-500);
  letter-spacing: 0.02em;
}

.blog-hero-stats strong {
  color: var(--text-black);
  font-weight: 700;
  margin-right: 0.25rem;
}

/* ── Year sections ────────────────────────────── */

.blog-year { margin-bottom: 1rem; }

.blog-year-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 1.5rem 0 0.5rem;
  margin-bottom: 1rem;
}

.blog-year-title {
  font-family: 'Roboto Mono', monospace;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--text-neutral-400, #aaa);
}

.blog-year-count {
  font-family: 'Roboto Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-neutral-500);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ── Blog-as-project-block tweaks ─────────────── */

.blog-block .blog-block-date {
  font-family: 'Roboto Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-neutral-500);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
}

.blog-block .project-preview {
  /* Square preview; project-preview defaults rely on parent aspect from
     image — for blog the wrapper needs an explicit ratio. */
  aspect-ratio: 1 / 1;
}

.blog-block .project-preview img {
  object-fit: cover;
}

/* ── Post page hero ───────────────────────────── */

.blog-post-hero {
  padding: 3rem 0 1.5rem;
  border-bottom: 1px solid var(--border-neutral-200);
  margin-bottom: 2rem;
  max-width: 720px;
}

.blog-post-meta {
  font-family: 'Roboto Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-neutral-500);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.blog-post-title {
  font-family: 'Roboto Mono', monospace;
  font-size: clamp(1.75rem, 4.5vw, 2.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
}

.blog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.blog-tag {
  font-family: 'Roboto Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-neutral-500);
  background: var(--bg-neutral-100);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
}

/* ── Post body (Calliope HTML) ────────────────── */

.blog-post-body {
  max-width: 720px;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-neutral-700, #333);
}

.blog-post-body p { margin: 0 0 1.25rem; }

.blog-post-body h2 {
  font-family: 'Roboto Mono', monospace;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 2.25rem 0 1rem;
  color: var(--text-black);
}

.blog-post-body h3 {
  font-family: 'Roboto Mono', monospace;
  font-size: 1.0625rem;
  font-weight: 700;
  margin: 1.75rem 0 0.75rem;
}

.blog-post-body a {
  color: var(--text-black);
  text-decoration: underline;
  text-decoration-color: var(--border-neutral-200);
  text-underline-offset: 3px;
  word-break: break-word;
}

.blog-post-body a:hover { text-decoration-color: currentColor; }

.blog-post-body blockquote {
  border-left: 3px solid var(--text-black);
  margin: 1.5rem 0;
  padding: 0.5rem 0 0.5rem 1.25rem;
  color: var(--text-neutral-500);
  font-style: italic;
}

.blog-post-body ul,
.blog-post-body ol { margin: 0 0 1.25rem; padding-left: 1.5rem; }
.blog-post-body li  { margin-bottom: 0.375rem; }

/* Calliope image wrappers — flatten aspect-ratio hacks */
.blog-post-body .e2-text-picture {
  margin: 1.75rem 0;
  max-width: 100%;
}

.blog-post-body .e2-text-picture > div {
  max-width: 100% !important;
  width: auto !important;
}

.blog-post-body .e2-text-picture-imgwrapper {
  padding-bottom: 0 !important;
  position: static !important;
  height: auto !important;
}

.blog-post-body .e2-text-picture img {
  display: block;
  position: static !important;
  width: auto !important;
  height: auto !important;
  max-width: 100%;
  margin: 0 auto;
  border: 1px solid var(--border-neutral-200);
  border-radius: 4px;
}

.blog-post-body img { max-width: 100%; height: auto; }

/* ── Prev/Next nav ────────────────────────────── */

.blog-pn {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 3.5rem 0 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-neutral-200);
  max-width: 720px;
}

.blog-pn-link {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border-neutral-200);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.blog-pn-link:hover {
  background: var(--bg-neutral-100);
  border-color: var(--text-black);
}

.blog-pn-next { text-align: right; }

.blog-pn-label {
  font-family: 'Roboto Mono', monospace;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-neutral-500);
}

.blog-pn-title {
  font-family: 'Roboto Mono', monospace;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--text-black);
}

/* ── Mobile ───────────────────────────────────── */

@media (max-width: 768px) {
  .blog-block.project-block {
    grid-template-columns: 1fr;
  }
  .blog-block .project-preview {
    aspect-ratio: 16 / 10;
  }
}

@media (max-width: 640px) {
  .blog-hero-stats { flex-wrap: wrap; gap: 0.875rem 1.25rem; }
  .blog-pn { grid-template-columns: 1fr; }
  .blog-pn-next { text-align: left; }
}
