/* ==========================================================================
   Blog — listing and post pages
   Inherits tokens from styles.css. Add this AFTER styles.css.
   ========================================================================== */

/* ---------- shared: blog page wrapper ---------- */
.blog-page { padding-top: 0; }

/* ---------- LISTING PAGE ---------- */
.blog-hero {
  position: relative;
  padding: 180px var(--pad-x) 80px;
  background: var(--bone);
  overflow: hidden;
}
.blog-hero::after {
  content: "";
  position: absolute;
  top: -20%; right: -10%;
  width: 60vw; aspect-ratio: 1/1;
  background: radial-gradient(circle, rgba(232, 199, 164, 0.6), transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.blog-hero-inner {
  position: relative; z-index: 1;
  max-width: 1320px; margin: 0 auto;
  display: grid;
  gap: 28px;
}
.blog-hero h1 {
  font-family: var(--f-display);
  font-weight: 300;
  font-size: clamp(56px, 9vw, 156px);
  line-height: 0.92;
  letter-spacing: -0.035em;
  margin: 0;
  max-width: 14ch;
  font-variation-settings: "opsz" 144, "SOFT" 80;
}
.blog-hero h1 em { color: var(--terra); font-style: italic; }
.blog-hero p {
  max-width: 540px;
  font-size: var(--t-lead);
  line-height: 1.5;
  color: var(--ink-soft);
  font-weight: 300;
  margin: 0;
}

.blog-toolbar {
  max-width: 1320px;
  margin: 60px auto 0;
  padding: 28px 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.blog-toolbar-count em { color: var(--terra); font-style: normal; font-weight: 500; }
.blog-toolbar-cats {
  display: inline-flex;
  gap: 20px;
  flex-wrap: wrap;
}
.blog-toolbar-cats a { color: var(--muted); transition: color 0.3s; }
.blog-toolbar-cats a:hover { color: var(--ink); }
.blog-toolbar-cats a.is-active { color: var(--terra); }

/* ---------- listing grid ---------- */
.blog-listing {
  padding: 80px var(--pad-x) 120px;
  background: var(--bone);
}
.blog-listing-inner {
  max-width: 1320px; margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 400px));
  justify-content: center;
  gap: 64px 40px;
}

.blog-card {
  position: relative;
  display: grid;
  grid-template-rows: auto auto;
  gap: 22px;
  text-decoration: none;
  color: inherit;
  isolation: isolate;
}
.blog-card-image {
  width: 100%;
  aspect-ratio: 4/5;
  overflow: hidden;
  border-radius: 6px;
  background: var(--bone-warm);
  position: relative;
}
.blog-card-image::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(26,26,24,0.15));
  pointer-events: none;
}
.blog-card-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.4s var(--ease-out);
}
.blog-card:hover .blog-card-image img { transform: scale(1.04); }

.blog-card-meta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.blog-card-cat {
  color: var(--terra);
  font-weight: 500;
}
.blog-card-content {
  display: grid;
  gap: 12px;
}
.blog-card-content h3 {
  font-family: var(--f-display);
  font-weight: 300;
  font-size: clamp(24px, 1.8vw, 30px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0;
  transition: color 0.4s;
}
.blog-card:hover .blog-card-content h3 { color: var(--terra-deep); }
.blog-card-excerpt {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0;
  font-weight: 300;
}
.blog-card-read-more {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
}
.blog-card-read-more::after {
  content: "";
  width: 32px; height: 1px;
  background: currentColor;
  transition: width 0.5s var(--ease-out);
}
.blog-card:hover .blog-card-read-more::after { width: 56px; }

/* featured (first card spans wider on >1080) */
@media (min-width: 1080px) {
  .blog-card.is-featured {
    grid-column: span 2;
    grid-template-columns: 1.1fr 1fr;
    grid-template-rows: auto;
    gap: 40px;
    align-items: center;
  }
  .blog-card.is-featured .blog-card-image {
    aspect-ratio: 5/4;
  }
  .blog-card.is-featured .blog-card-content h3 {
    font-size: clamp(36px, 3vw, 56px);
    line-height: 1;
  }
  .blog-card.is-featured .blog-card-excerpt {
    font-size: var(--t-body);
    max-width: 50ch;
  }
}

/* ---------- POST PAGE ---------- */
.post {
  background: var(--bone);
  padding-top: 120px;
}
.post-hero {
  position: relative;
  padding: 60px var(--pad-x) 60px;
  background: var(--bone);
}
.post-hero-inner {
  max-width: 920px; margin: 0 auto;
  display: grid;
  gap: 36px;
}
.post-meta-top {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  flex-wrap: wrap;
}
.post-meta-top .post-cat { color: var(--terra); font-weight: 500; }
.post-meta-top .dot-sep { opacity: 0.5; }

.post-hero h1 {
  font-family: var(--f-display);
  font-weight: 300;
  font-size: clamp(40px, 6.5vw, 96px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  margin: 0;
  font-variation-settings: "opsz" 144, "SOFT" 80;
}
.post-hero h1 em { color: var(--terra); font-style: italic; }

.post-byline {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
  color: var(--muted);
}
.post-byline-line {
  display: inline-block;
  width: 32px; height: 1px;
  background: currentColor;
  opacity: 0.4;
}

.post-image {
  margin: 40px auto 0;
  max-width: 1320px;
  padding: 0 var(--pad-x);
}
.post-image-frame {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: 6px;
  background: var(--bone-warm);
}
.post-image-frame img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.post-image-caption {
  margin-top: 14px;
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}

/* ---------- article body ---------- */
.post-body {
  max-width: 720px;
  margin: 80px auto;
  padding: 0 var(--pad-x);
  font-family: var(--f-body);
  font-size: clamp(17px, 1.18vw, 19px);
  line-height: 1.75;
  color: var(--ink);
  font-weight: 400;
}
.post-body > * + * { margin-top: 1.6em; }
.post-body p { margin: 0; }
.post-body p:first-of-type::first-letter {
  font-family: var(--f-display);
  font-weight: 300;
  font-size: 3.8em;
  line-height: 0.85;
  float: left;
  padding: 0.08em 0.12em 0 0;
  color: var(--terra);
  font-variation-settings: "opsz" 144, "SOFT" 100;
}
.post-body h2 {
  font-family: var(--f-display);
  font-weight: 300;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 2em 0 0.6em;
  font-variation-settings: "opsz" 100, "SOFT" 50;
}
.post-body h3 {
  font-family: var(--f-display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(22px, 2vw, 26px);
  line-height: 1.2;
  margin: 1.8em 0 0.4em;
}
.post-body strong { font-weight: 500; }
.post-body em { color: var(--ink-soft); }
.post-body a {
  color: var(--terra-deep);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.3s;
}
.post-body a:hover { color: var(--terra); }

.post-body blockquote {
  margin: 2.2em 0;
  padding: 0;
  border: 0;
  font-family: var(--f-display);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(24px, 2.2vw, 32px);
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--terra-deep);
  text-align: center;
  position: relative;
  padding: 1em 0;
}
.post-body blockquote::before,
.post-body blockquote::after {
  content: "";
  display: block;
  width: 40px; height: 1px;
  background: currentColor;
  margin: 0 auto;
  opacity: 0.4;
}
.post-body blockquote::before { margin-bottom: 1em; }
.post-body blockquote::after  { margin-top: 1em; }

.post-body ul, .post-body ol {
  padding-left: 1.4em;
}
.post-body ul { list-style: none; padding-left: 0; }
.post-body ul li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 0.6em;
}
.post-body ul li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.65em;
  width: 16px; height: 1px;
  background: var(--terra);
  opacity: 0.7;
}

.post-body hr {
  border: 0;
  margin: 2.5em auto;
  width: 60px; height: 1px;
  background: var(--hairline);
  position: relative;
}

/* ---------- post CTA ---------- */
.post-cta {
  background: var(--ink);
  color: var(--bone-warm);
  padding: var(--pad-section) var(--pad-x);
  position: relative;
  overflow: hidden;
}
.post-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 40%, rgba(198, 106, 63, 0.25), transparent 60%);
  pointer-events: none;
}
.post-cta-inner {
  position: relative;
  max-width: 920px; margin: 0 auto;
  text-align: center;
  display: grid;
  gap: 32px;
  justify-items: center;
}
.post-cta-eyebrow {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted-soft);
  margin: 0;
}
.post-cta h2 {
  font-family: var(--f-display);
  font-weight: 300;
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
  max-width: 20ch;
  font-variation-settings: "opsz" 144, "SOFT" 80;
}
.post-cta h2 em { color: var(--terra-warm); font-style: italic; }

/* ---------- author card ---------- */
.post-author {
  max-width: 720px;
  margin: 40px auto 0;
  padding: 36px var(--pad-x);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
@media (min-width: 600px) {
  .post-author { grid-template-columns: auto 1fr; align-items: center; gap: 28px; }
}
.post-author-mark {
  width: 56px; height: 56px;
  color: var(--ink);
}
.post-author-text { display: grid; gap: 4px; }
.post-author-name {
  font-family: var(--f-display);
  font-weight: 300; font-style: italic;
  font-size: 22px;
  letter-spacing: -0.01em;
}
.post-author-bio {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--muted);
  margin: 0;
}

/* ---------- back to journal link ---------- */
.post-back {
  max-width: 720px;
  margin: 60px auto 0;
  padding: 0 var(--pad-x);
}
.post-back a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.3s;
}
.post-back a:hover { color: var(--ink); }
.post-back a::before {
  content: "";
  display: inline-block;
  width: 28px; height: 1px;
  background: currentColor;
  transition: width 0.5s var(--ease-out);
}
.post-back a:hover::before { width: 44px; }

/* ---------- HOMEPAGE JOURNAL SECTION (cards rendered on /index.html) ---------- */
.journal {
  padding: var(--pad-section) var(--pad-x);
  background: var(--bone);
}
.journal-header {
  max-width: 1320px; margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: end;
  margin-bottom: clamp(50px, 6vw, 90px);
}
@media (min-width: 760px) {
  .journal-header {
    grid-template-columns: auto 1fr auto;
    gap: 60px;
  }
}
.journal-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
  padding: 6px 0;
}
.journal-link::after {
  content: "";
  display: inline-block;
  width: 32px; height: 1px;
  background: currentColor;
  transition: width 0.5s var(--ease-out);
}
.journal-link:hover::after { width: 56px; }
.journal-grid {
  max-width: 1320px; margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
}
@media (min-width: 720px) {
  .journal-grid { grid-template-columns: repeat(3, 1fr); gap: 32px; }
}
.journal-empty {
  grid-column: 1 / -1;
  padding: 48px 0;
  text-align: center;
  color: var(--muted);
  font-style: italic;
  font-family: var(--f-display);
  font-weight: 300;
  font-size: 22px;
}
