/* ========================================================================
   Blogs — list page (blogs.html) & detail page (blog-detail.html).
   Uses shared design tokens from styles.css.
   ======================================================================== */

/* ---------- Hero strip (list page) ---------- */
.blog-hero {
  background: var(--ink-2);
  border-bottom: 1px solid var(--hair);
  padding: 72px 0 56px;
  position: relative;
  overflow: hidden;
}
.blog-hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(58,6,16,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(58,6,16,0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(80% 60% at 50% 50%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(80% 60% at 50% 50%, #000 30%, transparent 100%);
}
.blog-hero .wrap { position: relative; z-index: 1; }
.blog-hero-eyebrow {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--lime-soft);
}
.blog-hero h1 {
  font-family: "Fraunces", serif;
  font-weight: 400;
  font-size: clamp(36px, 5.4vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.024em;
  color: var(--cream);
  margin: 18px 0 0;
  max-width: 22ch;
}
.blog-hero h1 em { font-style: italic; color: var(--lime); }
.blog-hero p {
  margin: 18px 0 0;
  font-size: 16px;
  line-height: 1.55;
  color: var(--sage-2);
  max-width: 56ch;
}

/* ---------- Filter chips ---------- */
.blog-filters {
  display: flex; flex-wrap: wrap; gap: 10px;
  padding: 28px 0;
  border-bottom: 1px solid var(--hair);
  align-items: center;
}
.blog-filter {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px;
  border: 1px solid var(--hair-strong);
  background: transparent;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--cream-2);
  cursor: pointer;
  font-family: inherit;
  transition: border-color var(--t-fast), color var(--t-fast), background var(--t-fast);
}
.blog-filter:hover { border-color: var(--lime-soft); color: var(--lime-soft); }
.blog-filter.is-active {
  background: var(--cream);
  color: #FFFFFF;
  border-color: var(--cream);
}
.blog-search {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px;
  border: 1px solid var(--hair-strong);
  border-radius: 999px;
  background: #FFFFFF;
  font-size: 13px;
  color: var(--sage);
}
.blog-search input {
  border: 0; background: transparent;
  font: inherit; color: var(--cream);
  outline: 0;
  min-width: 180px;
}
.blog-search svg { width: 14px; height: 14px; }

/* ---------- Section header ---------- */
.blog-section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 0 0 28px;
  gap: 18px;
  flex-wrap: wrap;
}
.blog-section-head h2 {
  font-family: "Fraunces", serif;
  font-weight: 400;
  font-size: clamp(24px, 2.4vw, 32px);
  letter-spacing: -0.018em;
  color: var(--cream);
  margin: 0;
}
.blog-section-head .blog-section-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--lime-soft);
}

/* ---------- Image placeholders (multiple flavors) ---------- */
.blog-ph {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: var(--r-md);
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #FCE2E7 0%, #F8DCE4 100%);
}
.blog-ph::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(58,6,16,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(58,6,16,0.035) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.7;
}
.blog-ph::after {
  content: attr(data-label);
  position: absolute;
  bottom: 12px; left: 14px;
  font-family: "JetBrains Mono", monospace;
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(58,6,16,0.40);
}
.blog-ph svg {
  width: 44px; height: 44px;
  color: rgba(171,2,38,0.55);
  position: relative;
  z-index: 1;
}
.blog-ph.bp-coral   { background: linear-gradient(135deg, #FFE1E7 0%, #FFB45E 130%); }
.blog-ph.bp-rose    { background: linear-gradient(160deg, #FCE2E7 0%, #C0021F 200%); }
.blog-ph.bp-cream   { background: linear-gradient(160deg, #FBF4F5 0%, #F8DCE4 100%); }
.blog-ph.bp-ink     { background: linear-gradient(160deg, #471423 0%, #30060F 100%); color: #FBEEF1; }
.blog-ph.bp-ink svg { color: rgba(255,255,255,0.55); }
.blog-ph.bp-ink::after { color: rgba(255,255,255,0.50); }
.blog-ph.bp-blush   { background: linear-gradient(180deg, #FFF1F4 0%, #FCE2E7 100%); }
.blog-ph.bp-paper   { background: linear-gradient(140deg, #FBF4F5 0%, #F0D9DE 100%); }

/* ---------- Featured article card ---------- */
.blog-featured {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 48px 0;
  border-bottom: 1px solid var(--hair);
}
.blog-featured .blog-ph { aspect-ratio: 5 / 4; }
.blog-featured-info {
  display: flex; flex-direction: column;
}
.blog-featured-eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--lime-soft);
  font-weight: 600;
}
.blog-featured-eyebrow-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 3px rgba(240,2,55,0.16);
}
.blog-featured-info h2 {
  font-family: "Fraunces", serif;
  font-weight: 400;
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--cream);
  margin: 18px 0 18px;
}
.blog-featured-info h2 a { color: inherit; }
.blog-featured-info h2 a:hover { color: var(--lime-soft); }
.blog-featured-info h2 a::after { display: none; }
.blog-featured-info > p {
  margin: 0 0 24px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--sage-2);
  max-width: 56ch;
}

/* ---------- Author byline (compact) ---------- */
.blog-by {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 13px;
  color: var(--sage-2);
}
.blog-by-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(171,2,38,0.10);
  display: inline-grid; place-items: center;
  color: var(--lime-soft);
  font-family: "Clash Grotesk", "Inter", sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: -0.005em;
  flex-shrink: 0;
}
.blog-by-meta { display: flex; flex-direction: column; line-height: 1.3; }
.blog-by-meta strong { font-weight: 600; color: var(--cream); font-size: 13.5px; }
.blog-by-meta span { font-size: 11.5px; color: var(--sage); letter-spacing: 0.01em; }
.blog-by-sep {
  display: inline-block;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: rgba(58,6,16,0.30);
  margin: 0 4px;
}

/* ---------- Grid of cards ---------- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px 28px;
  padding: 48px 0;
}
.blog-card {
  display: flex; flex-direction: column;
  text-decoration: none;
}
.blog-card::after { display: none; }
.blog-card .blog-ph { aspect-ratio: 16 / 10; transition: transform var(--t-med); }
.blog-card:hover .blog-ph { transform: translateY(-4px); }
.blog-card-tag {
  display: inline-block;
  margin: 16px 0 10px;
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--lime-soft);
}
.blog-card h3 {
  font-family: "Fraunces", serif;
  font-weight: 400;
  font-size: 22px;
  letter-spacing: -0.012em;
  line-height: 1.18;
  color: var(--cream);
  margin: 0 0 12px;
  transition: color var(--t-fast);
}
.blog-card:hover h3 { color: var(--lime-soft); }
.blog-card p {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--sage-2);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card .blog-by { margin-top: auto; }

@media (max-width: 1100px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-featured { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 600px) {
  .blog-grid { grid-template-columns: 1fr; }
}

/* ---------- Two-column "latest" layout (large card + side list) ---------- */
.blog-two-col {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 56px;
  padding: 48px 0;
  border-top: 1px solid var(--hair);
}
.blog-two-col-main .blog-ph { aspect-ratio: 16 / 9; }
.blog-two-col-main h3 {
  font-family: "Fraunces", serif;
  font-weight: 400;
  font-size: clamp(22px, 2.4vw, 32px);
  letter-spacing: -0.018em;
  line-height: 1.12;
  color: var(--cream);
  margin: 22px 0 14px;
}
.blog-two-col-main h3 a { color: inherit; }
.blog-two-col-main h3 a:hover { color: var(--lime-soft); }
.blog-two-col-main h3 a::after { display: none; }
.blog-two-col-main p {
  margin: 0 0 18px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--sage-2);
  max-width: 58ch;
}
.blog-side-list {
  list-style: none;
  margin: 0; padding: 0;
  display: flex; flex-direction: column;
  gap: 22px;
}
.blog-side-list li {
  border-bottom: 1px solid var(--hair);
  padding-bottom: 22px;
}
.blog-side-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.blog-side-list a {
  display: block;
  color: inherit;
  text-decoration: none;
}
.blog-side-list a::after { display: none; }
.blog-side-list .blog-card-tag { margin: 0 0 6px; }
.blog-side-list h4 {
  font-family: "Fraunces", serif;
  font-weight: 400;
  font-size: 18px;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--cream);
  margin: 0 0 10px;
  transition: color var(--t-fast);
}
.blog-side-list a:hover h4 { color: var(--lime-soft); }

@media (max-width: 1000px) {
  .blog-two-col { grid-template-columns: 1fr; gap: 36px; }
}

/* ---------- Catch-up text list ---------- */
.blog-catchup {
  padding: 56px 0;
  border-top: 1px solid var(--hair);
}
.blog-catchup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 56px;
}
.blog-catchup-grid ol {
  list-style: none;
  margin: 0; padding: 0;
  counter-reset: catchup;
}
.blog-catchup-grid li {
  counter-increment: catchup;
  padding: 18px 0;
  border-bottom: 1px solid var(--hair);
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 16px;
  align-items: baseline;
}
.blog-catchup-grid li:last-child { border-bottom: 0; }
.blog-catchup-grid li::before {
  content: counter(catchup, decimal-leading-zero);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: var(--sage);
  letter-spacing: 0.02em;
}
.blog-catchup-grid li a {
  font-family: "Fraunces", serif;
  font-weight: 400;
  font-size: 17px;
  letter-spacing: -0.008em;
  line-height: 1.3;
  color: var(--cream);
  transition: color var(--t-fast);
}
.blog-catchup-grid li a::after { display: none; }
.blog-catchup-grid li a:hover { color: var(--lime-soft); }
.blog-catchup-grid li .catchup-meta {
  font-size: 12px;
  color: var(--sage);
  white-space: nowrap;
}
@media (max-width: 900px) {
  .blog-catchup-grid { grid-template-columns: 1fr; gap: 0; }
}

/* ---------- Authors spotlight ---------- */
.blog-authors {
  padding: 56px 0;
  border-top: 1px solid var(--hair);
}
.blog-authors-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 28px;
}
.blog-author-card {
  display: flex; align-items: center; gap: 14px;
  padding: 18px;
  background: #FFFFFF;
  border: 1px solid var(--hair);
  border-radius: var(--r-md);
  text-decoration: none;
  transition: border-color var(--t-fast), transform var(--t-fast);
}
.blog-author-card::after { display: none; }
.blog-author-card:hover { border-color: var(--lime-soft); transform: translateY(-2px); }
.blog-author-card .blog-by-avatar { width: 48px; height: 48px; font-size: 16px; }
.blog-author-card-info { display: flex; flex-direction: column; line-height: 1.3; }
.blog-author-card-info strong { font-weight: 600; color: var(--cream); font-size: 14px; }
.blog-author-card-info span { font-size: 11.5px; color: var(--sage); letter-spacing: 0.01em; }
@media (max-width: 900px) {
  .blog-authors-grid { grid-template-columns: 1fr 1fr; }
}

/* ========================================================================
   BLOG DETAIL PAGE
   ======================================================================== */
.article-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}
.article-head {
  padding: 64px 0 32px;
  border-bottom: 1px solid var(--hair);
}
.article-tag {
  display: inline-block;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--lime-soft);
  font-weight: 600;
  margin-bottom: 22px;
}
.article-title {
  font-family: "Fraunces", serif;
  font-weight: 400;
  font-size: clamp(34px, 5.2vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.024em;
  color: var(--cream);
  margin: 0 0 18px;
}
.article-subtitle {
  font-family: "Fraunces", serif;
  font-weight: 300;
  font-size: clamp(18px, 1.8vw, 22px);
  line-height: 1.4;
  letter-spacing: -0.008em;
  color: var(--sage-2);
  margin: 0 0 28px;
  font-style: italic;
}
.article-meta {
  display: flex; align-items: center; gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.article-meta .blog-by-avatar { width: 44px; height: 44px; font-size: 14px; }
.article-meta-text { display: flex; flex-direction: column; line-height: 1.35; }
.article-meta-text strong { font-weight: 600; color: var(--cream); font-size: 14px; }
.article-meta-text span { font-size: 12.5px; color: var(--sage); }
.article-share {
  display: inline-flex; align-items: center; gap: 8px;
  margin-left: auto;
}
.article-share a {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 1px solid var(--hair);
  display: inline-grid; place-items: center;
  color: var(--cream);
  transition: border-color var(--t-fast), color var(--t-fast);
}
.article-share a::after { display: none; }
.article-share a:hover { border-color: var(--lime-soft); color: var(--lime-soft); }
.article-share svg { width: 14px; height: 14px; }

.article-hero {
  margin: 48px 0 36px;
}
.article-hero .blog-ph { aspect-ratio: 16 / 9; }
.article-hero-cap {
  margin: 12px 0 0;
  text-align: center;
  font-size: 12.5px;
  color: var(--sage);
  font-style: italic;
}

.article-body {
  padding: 8px 0 48px;
  font-family: "Fraunces", serif;
  font-weight: 300;
  font-size: 19px;
  line-height: 1.7;
  letter-spacing: -0.003em;
  color: var(--cream-2);
}
.article-body > p {
  margin: 0 0 26px;
}
.article-body h2 {
  font-family: "Fraunces", serif;
  font-weight: 400;
  font-size: clamp(24px, 2.6vw, 30px);
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--cream);
  margin: 42px 0 18px;
}
.article-body h3 {
  font-family: "Fraunces", serif;
  font-weight: 500;
  font-size: clamp(20px, 2vw, 22px);
  letter-spacing: -0.01em;
  color: var(--cream);
  margin: 30px 0 14px;
}
.article-body a {
  color: var(--lime-soft);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.article-body a:hover { color: var(--lime); }
.article-body a::after { display: none; }
.article-body strong { font-weight: 600; color: var(--cream); }
.article-body em { font-style: italic; }

.article-body ul,
.article-body ol {
  margin: 0 0 26px;
  padding-left: 1.4em;
}
.article-body li { margin-bottom: 8px; }

.article-body blockquote {
  margin: 36px 0;
  padding: 0 0 0 22px;
  border-left: 3px solid var(--lime);
  font-family: "Fraunces", serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(22px, 2.2vw, 26px);
  line-height: 1.35;
  letter-spacing: -0.012em;
  color: var(--cream);
}
.article-body blockquote cite {
  display: block;
  margin-top: 14px;
  font-style: normal;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sage);
}

.article-body figure {
  margin: 36px 0;
}
.article-body figure .blog-ph { aspect-ratio: 16 / 9; }
.article-body figcaption {
  margin-top: 12px;
  text-align: center;
  font-family: "Inter", sans-serif;
  font-size: 12.5px;
  color: var(--sage);
  font-style: italic;
}

.article-body pre {
  margin: 30px 0;
  padding: 22px 24px;
  background: var(--cream);
  color: #FBEEF1;
  border-radius: var(--r-md);
  font-family: "JetBrains Mono", monospace;
  font-size: 13.5px;
  line-height: 1.6;
  overflow-x: auto;
  font-weight: 400;
  letter-spacing: 0;
}
.article-body code {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.88em;
  background: rgba(240,2,55,0.08);
  color: var(--lime-soft);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 500;
}
.article-body pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

.article-body hr {
  border: 0;
  border-top: 1px solid var(--hair);
  margin: 40px auto;
  width: 50%;
}

/* ---------- Article footer / author bio ---------- */
.article-foot {
  background: none;
  padding: 36px 0 56px;
  border-top: 1px solid var(--hair);
}
.article-tags {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-bottom: 36px;
}
.article-tags span {
  padding: 6px 12px;
  background: rgba(58,6,16,0.06);
  border-radius: 999px;
  font-size: 12px;
  color: var(--cream-2);
}
.author-bio {
  display: flex; align-items: flex-start; gap: 18px;
  padding: 26px;
  background: #FFFFFF;
  border: 1px solid var(--hair-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lift);
}
.author-bio .blog-by-avatar {
  width: 64px; height: 64px;
  font-size: 22px;
  flex-shrink: 0;
}
.author-bio-info {
  display: flex; flex-direction: column;
}
.author-bio-info strong {
  font-family: "Clash Grotesk", "Inter", sans-serif;
  font-weight: 600;
  font-size: 16px;
  color: var(--cream);
  letter-spacing: -0.005em;
}
.author-bio-info span {
  font-size: 12.5px;
  color: var(--sage);
  margin-top: 2px;
}
.author-bio-info p {
  margin: 12px 0 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--sage-2);
}

/* ---------- Related articles (detail page) ---------- */
.article-related {
  background: transparent;
  border-top: 1px solid var(--hair);
  padding: 64px 0;
}
.article-related h2 {
  font-family: "Fraunces", serif;
  font-weight: 400;
  font-size: clamp(24px, 2.6vw, 32px);
  letter-spacing: -0.018em;
  color: var(--cream);
  margin: 0 0 28px;
  text-align: center;
}
