/* ================================================================
   Blog — listing + article pages (layout after jordanapostolov.com),
   rendered in the House of Deer dark theme. Layered on styles.css.
   ================================================================ */

/* Quiet journal background, loaded on blog pages only.
   Painted on a fixed, GPU-composited layer so it never repaints on scroll. */
body { background: #08090d; }
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(70% 45% at 52% 0%, rgba(111, 151, 174, 0.16), rgba(8, 9, 13, 0) 64%),
    radial-gradient(38% 42% at 92% 18%, rgba(221, 190, 162, 0.08), rgba(8, 9, 13, 0) 68%),
    linear-gradient(180deg, #0b0d13 0%, #0e1119 46%, #08090d 100%);
}

/* ---------- LISTING HERO ---------- */
.blog-hero {
  text-align: center;
  padding-top: clamp(120px, 16vh, 180px);
  padding-bottom: clamp(20px, 3vw, 34px);
}
.blog-hero .blog-title {
  font-size: clamp(2.4rem, 6vw, 3.7rem);
  letter-spacing: 0;
}

/* category filter pills */
.blog-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: clamp(26px, 3.4vw, 42px) 0 clamp(38px, 4.5vw, 60px);
}
.blog-pill {
  background: rgba(var(--ink), 0.04);
  border: 1px solid rgba(var(--ink), 0.1);
  border-radius: 999px;
  color: var(--gray);
  padding: 10px 22px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.875rem;          /* same as the FAQ categories */
  transition: color 0.25s var(--ease), background 0.25s var(--ease), border-color 0.25s var(--ease);
}
.blog-pill:hover { color: var(--text); border-color: rgba(var(--ink), 0.28); }
.blog-pill.is-active { background: var(--btn); color: var(--btn-ink); border-color: transparent; }

/* ---------- CARD GRID ---------- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 2.2vw, 30px);
}

.post-card {
  display: flex;
  flex-direction: column;
  aspect-ratio: 5 / 6.7;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(var(--ink), 0.028);
  border: 1px solid rgba(var(--ink), 0.08);
  text-decoration: none;
  color: inherit;
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.post-card:hover {
  transform: translateY(-3px);
  border-color: rgba(184, 204, 205, 0.24);
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.34);
}
.post-card-media {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  background: #0b0e1c;
}
.post-card-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.post-card:hover .post-card-media img { transform: scale(1.05); }

.post-card-foot {
  flex: 0 0 clamp(118px, 7.4vw, 132px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
  padding: clamp(18px, 1.7vw, 24px);
  text-align: left;
}
.post-card-title {
  color: var(--text);
  font-size: clamp(1.08rem, 1.3vw, 1.24rem);
  font-weight: 500;
  margin: 0;
  line-height: 1.24;
  overflow-wrap: anywhere;
}
.post-card-meta {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  color: var(--gray);
  font-size: 0.86rem;
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  overflow: hidden;
  transform: translateY(-4px);
  transition: max-height 0.36s var(--ease), opacity 0.28s var(--ease), margin-top 0.36s var(--ease), transform 0.36s var(--ease);
}
.post-card:hover .post-card-meta,
.post-card:focus-visible .post-card-meta {
  max-height: 36px;
  opacity: 1;
  margin-top: 12px;
  transform: translateY(0);
}
.post-card-meta .dotline { width: 18px; height: 1px; background: rgba(var(--ink), 0.2); }

@media (max-width: 860px) {
  .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post-card { aspect-ratio: 5 / 5.8; }
}
@media (max-width: 560px) {
  .blog-grid { grid-template-columns: 1fr; }
  .post-card { aspect-ratio: auto; min-height: 380px; }
  .post-card-media { min-height: 250px; }
}

/* ================================================================
   ARTICLE PAGE
   ================================================================ */
.post-article {
  padding-top: clamp(104px, 13vh, 150px);
  padding-bottom: clamp(76px, 9vw, 120px);
}
.post-back {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--gray); text-decoration: none;
  font-size: 0.9rem; margin-bottom: clamp(30px, 5vw, 56px);
  transition: color 0.25s;
}
.post-back:hover { color: var(--text); }
.post-back span { transition: transform 0.25s var(--ease); }
.post-back:hover span { transform: translateX(-3px); }

/* editorial header */
.post-head { text-align: left; max-width: 760px; margin: 0 auto; }
.post-date { color: var(--gray); font-size: 0.95rem; letter-spacing: 0.02em; }
.post-cats {
  display: flex; justify-content: flex-start; flex-wrap: wrap; gap: 10px;
  margin: 18px 0 26px;
}
.post-cat {
  background: rgba(var(--ink), 0.045);
  border: 1px solid rgba(var(--ink), 0.12);
  border-radius: 999px;
  color: rgba(var(--ink), 0.85);
  padding: 7px 18px;
  font-size: 0.85rem;
}
.post-title {
  color: var(--text);
  font-size: clamp(2.1rem, 4.6vw, 3.45rem);
  line-height: 1.04;
  letter-spacing: 0;
  margin: 0;
}
.post-summary {
  margin: 22px 0 0;
  max-width: 760px;
  color: rgba(var(--ink), 0.68);
  font-size: clamp(1.05rem, 1.5vw, 1.24rem);
  line-height: 1.6;
}

/* full-width hero image */
.post-hero-img {
  /* aligned with the text column — same left and right edges as the copy */
  max-width: 760px;
  margin: clamp(34px, 5vw, 58px) auto clamp(36px, 5vw, 58px);
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #08090d;
  border: 1px solid rgba(var(--ink), 0.08);
}
.post-hero-img img,
.post-hero-img video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* body — quiet reading column */
.post-body { max-width: 760px; margin: 0 auto; }
.post-body > * + * { margin-top: 1.12em; }
.post-body p {
  color: rgba(var(--ink), 0.73);
  font-size: clamp(1.06rem, 1.22vw, 1.18rem);
  line-height: 1.76;
}
.post-body strong { color: var(--text); font-weight: 500; }
.post-body h2 {
  color: var(--text);
  font-weight: 500;
  font-size: clamp(1.42rem, 2.55vw, 2.02rem);
  line-height: 1.16;
  letter-spacing: 0;
  margin-top: 2.2em;
}
.post-body ul { list-style: none; padding: 0; margin-top: 1.1em; display: flex; flex-direction: column; gap: 12px; }
.post-body li {
  position: relative;
  padding-left: 24px;
  color: rgba(var(--ink), 0.74);
  font-size: clamp(1.03rem, 1.16vw, 1.14rem);
  line-height: 1.65;
}
.post-body li::before {
  content: "";
  position: absolute; left: 4px; top: 0.75em;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--teal);
}
.post-body blockquote {
  margin: 1.8em 0;
  padding: 4px 0 4px 22px;
  border-left: 2px solid var(--teal);
  color: var(--text);
  font-size: clamp(1.18rem, 1.75vw, 1.45rem);
  line-height: 1.48;
}
.post-note {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(var(--ink), 0.1);
  background: rgba(var(--ink), 0.026);
  border-radius: 8px;
  padding: 18px 20px;
  color: rgba(var(--ink), 0.74);
  font-size: 1rem;
  line-height: 1.5;
}
.post-note span {
  color: rgba(var(--ink), 0.52);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.post-note p {
  margin: 0;
  color: rgba(var(--ink), 0.72);
  font-size: 1rem;
  line-height: 1.58;
}
.post-note b { color: var(--text); font-weight: 500; }

/* end CTA */
.post-cta {
  max-width: 760px;   /* same column as the text and hero image */
  margin: clamp(48px, 6vw, 80px) auto 0;
  padding: clamp(30px, 4vw, 48px);
  border-radius: 8px;
  text-align: center;
  background: rgba(var(--ink), 0.03);
  border: 1px solid rgba(var(--ink), 0.1);
}
.post-cta h3 { color: var(--text); margin: 0 0 10px; }
.post-cta p { color: var(--gray); margin: 0 auto 24px; max-width: 460px; }

/* more articles */
.post-more { margin-top: clamp(56px, 7vw, 90px); }
.post-more h4 {
  color: var(--gray);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 400;
  text-align: center;
  margin: 0 0 26px;
}
.post-more-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(18px, 2vw, 28px); max-width: 820px; margin: 0 auto; }
.post-more-grid .post-card { aspect-ratio: 5 / 4.8; }
@media (max-width: 640px) { .post-more-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .post-head { text-align: left; }
  .post-hero-img { aspect-ratio: 4 / 3; }
}
@media (max-width: 560px) {
  .post-more-grid .post-card {
    aspect-ratio: auto;
    min-height: 0;
  }
  .post-more-grid .post-card-media { min-height: 220px; }
}

/* ================================================================
   BLOG LISTING — minimal, matching the FAQ page
   (scoped to .blog-index so article pages keep their own look)
   ================================================================ */
.blog-index { background: var(--bg); }
.blog-index::before { display: none; }                 /* no blue/sand glow */

.blog-index .blog-hero { padding-bottom: 0; }
.blog-index .blog-eyebrow { font-size: 0.8rem; margin: 0 0 14px; }
.blog-index .blog-title { margin: 0; }

/* categories: plain words, active one white with a hairline under it */
.blog-index .blog-filter {
  flex-wrap: nowrap;
  justify-content: safe center;
  overflow-x: auto;
  scrollbar-width: none;
  gap: clamp(16px, 2.2vw, 26px);
  max-width: 920px;
  margin: clamp(34px, 4.5vw, 56px) auto clamp(30px, 4vw, 48px);
  border-bottom: 1px solid rgba(var(--ink), 0.08);
}
.blog-index .blog-filter::-webkit-scrollbar { display: none; }
.blog-index .blog-pill {
  flex: none;
  position: relative;
  padding: 6px 0 14px;
  background: none;
  border: 0;
  border-radius: 0;
  color: rgba(var(--ink), 0.46);
  letter-spacing: 0.01em;
}
.blog-index .blog-pill:hover { color: rgba(var(--ink), 0.8); background: none; }
.blog-index .blog-pill.is-active { background: none; color: var(--text); }
.blog-index .blog-pill::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--text);
  transform: scaleX(0);
  transition: transform 0.35s var(--ease);
}
.blog-index .blog-pill.is-active::after { transform: scaleX(1); }

/* posts: rounded photo, title + reading time underneath — no card frame */
.blog-index .blog-list-section { padding-bottom: clamp(80px, 10vw, 130px); }
.blog-index .blog-grid { max-width: 920px; margin: 0 auto; gap: clamp(34px, 4vw, 52px) clamp(18px, 2vw, 26px); }
.blog-index .post-card {
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
  background: none;
  overflow: visible;
}
.blog-index .post-card:hover { transform: none; box-shadow: none; border: 0; }
.blog-index .post-card-media {
  flex: none;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  overflow: hidden;
}
.blog-index .post-card:hover .post-card-media img { transform: scale(1.04); }
.blog-index .post-card-foot { flex: none; padding: 16px 2px 0; }
.blog-index .post-card-title {
  font-size: clamp(1rem, 1.2vw, 1.1rem);
  line-height: 1.35;
  transition: color 0.3s var(--ease);
}
.blog-index .post-card:hover .post-card-title { color: rgba(var(--ink), 0.72); }
.blog-index .post-card-meta {
  max-height: none;
  opacity: 1;
  transform: none;
  margin-top: 6px;
  font-size: 0.82rem;
  color: rgba(var(--ink), 0.42);
}

@media (max-width: 640px) {
  .blog-index .blog-filter {
    justify-content: flex-start;
    margin-left: -20px; margin-right: -20px;
    padding: 0 20px;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 20px, #000 calc(100% - 28px), transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0, #000 20px, #000 calc(100% - 28px), transparent 100%);
  }
}
.post-card[hidden] { display: none; }   /* category filter hides posts with [hidden] */

/* ================================================================
   ARTICLE PAGES — minimal, matching the blog listing + FAQ
   ================================================================ */
.blog-article { background: var(--bg); }
.blog-article::before { display: none; }

.blog-article .post-back { font-size: 0.85rem; color: rgba(var(--ink), 0.5); margin-bottom: clamp(28px, 4vw, 44px); }

/* category: a small accent label instead of a pill */
.blog-article .post-cats { margin: 0 0 14px; order: -1; }
.blog-article .post-head { display: flex; flex-direction: column; }
.blog-article .post-cat {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: linear-gradient(95deg, #55809b 0%, #6f97ae 52%, #cfd9dd 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.blog-article .post-title { font-size: clamp(2rem, 4.2vw, 3rem); line-height: 1.08; }
.blog-article .post-summary { color: rgba(var(--ink), 0.6); font-size: clamp(1rem, 1.4vw, 1.15rem); }
.blog-article .post-date { order: 10; margin-top: 18px; font-size: 0.85rem; color: rgba(var(--ink), 0.42); }

/* photo: rounded, no border */
.blog-article .post-hero-img { border: 0; border-radius: 18px; }

/* reading column: slightly softer */
.blog-article .post-body p { color: rgba(var(--ink), 0.7); }
.blog-article .post-body h2 { font-size: clamp(1.35rem, 2.3vw, 1.8rem); }
.blog-article .post-body blockquote { border-left-color: rgba(var(--ink), 0.25); font-size: clamp(1.12rem, 1.6vw, 1.32rem); }

/* note + end section: soft rounded boxes, no outlines */
.blog-article .post-note,
.blog-article .post-cta {
  border: 0;
  border-radius: 18px;
  background: rgba(var(--ink), 0.04);
  box-shadow: inset 0 0 0 1px rgba(var(--ink), 0.07);
}

/* "more articles": same as the blog grid — rounded photo, title underneath */
.blog-article .post-more h4 { color: rgba(var(--ink), 0.45); font-size: 0.74rem; }
.blog-article .post-more-grid .post-card {
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
  background: none;
  overflow: visible;
}
.blog-article .post-more-grid .post-card:hover { transform: none; box-shadow: none; }
.blog-article .post-more-grid .post-card-media { flex: none; aspect-ratio: 4 / 3; border-radius: 16px; overflow: hidden; }
.blog-article .post-more-grid .post-card-foot { flex: none; padding: 14px 2px 0; }
.blog-article .post-more-grid .post-card-title { font-size: 1rem; }
.blog-article .post-more-grid .post-card-meta { max-height: none; opacity: 1; transform: none; margin-top: 6px; font-size: 0.82rem; color: rgba(var(--ink), 0.42); }

/* MOBILE POLISH (audit fixes): readable greys, comfortable tap areas */
.blog-index .post-card-meta,
.blog-article .post-more-grid .post-card-meta { color: rgba(var(--ink), 0.55); }
.blog-article .post-date { color: rgba(var(--ink), 0.55); }
.blog-article .post-back { position: relative; color: rgba(var(--ink), 0.6); }
.blog-article .post-back::after { content: ""; position: absolute; inset: -12px -10px; }
.blog-index .blog-pill { padding-top: 12px; }
.blog-article .post-cat { background: linear-gradient(95deg, #6f97ae 0%, #a3bfce 100%); -webkit-background-clip: text; background-clip: text; }

/* blog categories: never scroll or swipe */
.blog-index .blog-filter { overflow: visible; flex-wrap: wrap; justify-content: center; }
@media (max-width: 640px) {
  .blog-index .blog-filter { margin-left: auto; margin-right: auto; padding: 0; -webkit-mask-image: none; mask-image: none; }
}
