/* ============================================================
   Blog - index listing + long-form article.
   Chrome (nav pill, footer, socials) is reused as-is from
   components/About.css + components/Footer.css; this file only
   owns the blog hero, the post cards, and the article prose.
   ============================================================ */

.blog-page {
  --blog-ink: var(--about-ink);
  --blog-muted: var(--about-muted);
  --blog-rule: rgba(29, 29, 29, 0.1);
  --blog-measure: 720px;
  background: var(--brand-white);
  color: var(--blog-ink);
}

/* ---- Hero ---- */

.blog-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  color: var(--brand-white);
}

.blog-hero__bg,
.blog-hero__scrim {
  position: absolute;
  inset: 0;
}

.blog-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Two passes: the horizontal one keeps the text column dark while leaving the
   right side of the artwork visible; the vertical one seats the nav and byline. */
.blog-hero__scrim {
  background:
    linear-gradient(
      to right,
      rgba(0, 0, 0, 0.94) 0%,
      rgba(0, 0, 0, 0.9) 42%,
      rgba(0, 0, 0, 0.45) 72%,
      rgba(0, 0, 0, 0.12) 100%
    ),
    linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.5) 0%,
      rgba(0, 0, 0, 0.3) 60%,
      rgba(0, 0, 0, 0.45) 100%
    );
}

.blog-hero__inner {
  position: relative;
  padding-top: 188px;
  padding-bottom: 96px;
}

.blog-hero__eyebrow {
  margin: 0 0 20px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.blog-hero__eyebrow a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.blog-hero__eyebrow a:hover {
  color: var(--brand-white);
}

.blog-hero__standfirst a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.blog-hero__standfirst a:hover {
  color: var(--brand-white);
}

.blog-hero__title {
  margin: 0;
  max-width: 900px;
  font-size: 64px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--brand-white);
}

.blog-hero__standfirst {
  margin: 24px 0 0;
  max-width: var(--blog-measure);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.92);
}

/* The nav drawer is markup-present but toggled by script on this page. */
.about-nav__drawer[hidden] {
  display: none;
}

/* ---- Byline ---- */

.blog-byline {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 40px;
}

.blog-byline__mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--brand-white);
}

.blog-byline__mark svg {
  height: 20px;
  width: auto;
}

.blog-byline__name {
  font-size: 15px;
  font-weight: 500;
  color: var(--brand-white);
}

.blog-byline__meta {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

/* ---- Index listing ---- */

.blog-main {
  padding: 80px 0 40px;
}

/* Latest post runs full width; the rest fill a two-up grid beneath it. */
.blog-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  /* Same element as .about-wrap - don't override its max-width: 100% with a fixed px cap. */
  max-width: min(1120px, 100%);
  min-width: 0;
}

.blog-list__label {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 20px 0 0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blog-muted);
}

.blog-list__label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--blog-rule);
}

.blog-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--blog-rule);
  border-radius: var(--radius-lg);
  background: var(--brand-white);
  transition: border-color 160ms ease, box-shadow 160ms ease,
    transform 160ms ease;
}

.blog-card__media,
.blog-card__body {
  min-width: 0;
}

.blog-card__media {
  overflow: hidden;
  background: #0b0e14;
  aspect-ratio: 16 / 9;
}

.blog-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms ease;
}

.blog-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 24px 24px 26px;
}

.blog-card:hover {
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.blog-card:hover .blog-card__media img {
  transform: scale(1.04);
}

.blog-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--blog-muted);
}

.blog-card__meta span::after {
  content: '·';
  margin-left: 10px;
}

.blog-card__meta span:last-child::after {
  content: none;
}

.blog-card__byline {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--blog-ink);
}

.blog-card__title {
  margin: 0 0 12px;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--blog-ink);
}

/* Whole card is the click target; the title anchor carries the href. */
.blog-card__title a::after {
  content: '';
  position: absolute;
  inset: 0;
}

.blog-card__excerpt {
  margin: 0 0 20px;
  max-width: var(--blog-measure);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: -0.01em;
  color: var(--blog-muted);
}

.blog-card__cta {
  margin-top: auto;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--color-primary);
}

.blog-card:hover .blog-card__cta {
  color: var(--color-primary-hover);
}

/* ---- Featured card ---- */

.blog-card--feature {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  align-items: stretch;
}

.blog-card--feature .blog-card__media {
  aspect-ratio: auto;
  height: 100%;
  min-height: 340px;
}

.blog-card--feature .blog-card__body {
  justify-content: center;
  padding: 44px 48px;
}

.blog-card--feature .blog-card__title {
  font-size: 34px;
  line-height: 1.18;
}

.blog-card--feature .blog-card__excerpt {
  font-size: 17px;
  line-height: 1.75;
}

.blog-card--feature .blog-card__cta {
  margin-top: 0;
}

/* ---- Article prose ---- */

.blog-article {
  width: var(--about-max);
  max-width: 100%;
  margin: 0 auto;
  padding: 0 var(--about-pad);
}

/* Prose runs at a reading measure, left-aligned with the hero title. */
.blog-article > * {
  max-width: var(--blog-measure);
}

.blog-article h2 {
  margin: 56px 0 20px;
  font-size: 30px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--blog-ink);
}

.blog-article p {
  margin: 0 0 24px;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: -0.01em;
  color: var(--blog-muted);
}

.blog-article strong {
  font-weight: 700;
  color: var(--blog-ink);
}

.blog-article em {
  font-style: italic;
}

.blog-article a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.blog-article a:hover {
  color: var(--color-primary-hover);
}

.blog-article ul,
.blog-article ol {
  margin: 0 0 24px;
  padding-left: 22px;
}

.blog-article ul {
  list-style: disc;
}

.blog-article ol {
  list-style: decimal;
}

.blog-article li {
  margin-bottom: 14px;
  font-size: 18px;
  line-height: 1.8;
  letter-spacing: -0.01em;
  color: var(--blog-muted);
}

.blog-article li::marker {
  color: rgba(29, 29, 29, 0.35);
}

.blog-article code {
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--color-surface-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85em;
  color: var(--blog-ink);
}

.blog-divider {
  height: 1px;
  margin: 56px 0;
  border: 0;
  background: var(--blog-rule);
}

.blog-article img {
  height: auto;
}

.blog-figure {
  margin: 40px 0;
}

.blog-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  background: #0b0e14;
}

.blog-figure figcaption {
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: -0.01em;
  color: var(--blog-muted);
}

/* ---- Article footer CTA ---- */

.blog-endcap {
  margin: 64px 0 0;
  padding: 36px 40px;
  border: 1px solid var(--blog-rule);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.blog-endcap h3 {
  margin: 0 0 10px;
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--blog-ink);
}

.blog-endcap h3 a {
  color: inherit;
  text-underline-offset: 3px;
}

.blog-endcap h3 a:hover {
  color: var(--color-primary);
}

.blog-endcap p {
  margin: 0 0 20px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--blog-muted);
}

.blog-endcap__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Scoped past `.blog-article a`, which would otherwise underline the buttons. */
.blog-article .blog-button {
  display: inline-flex;
  text-decoration: none;
  align-items: center;
  height: 44px;
  padding: 0 22px;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  background: var(--blog-ink);
  color: var(--brand-white);
  transition: background-color 160ms ease, border-color 160ms ease,
    color 160ms ease;
}

.blog-article .blog-button:hover {
  background: #000;
  color: var(--brand-white);
}

.blog-article .blog-button--ghost {
  background: transparent;
  color: var(--blog-ink);
  border: 1px solid var(--color-border-strong);
}

.blog-article .blog-button--ghost:hover {
  background: var(--brand-white);
  border-color: var(--blog-ink);
  color: var(--blog-ink);
}

/* ---- Responsive ---- */

@media (max-width: 1024px) {
  .blog-hero__title {
    font-size: 52px;
  }

  /* Side-by-side feature needs ~900px; stack it before the text column gets squeezed. */
  .blog-card--feature {
    grid-template-columns: 1fr;
  }

  .blog-card--feature .blog-card__media {
    aspect-ratio: 16 / 9;
    height: auto;
    min-height: 0;
  }

  .blog-card--feature .blog-card__body {
    padding: 28px 28px 30px;
  }

  .blog-card--feature .blog-card__title {
    font-size: 30px;
  }
}

@media (max-width: 768px) {
  .blog-hero__inner {
    padding-top: 132px;
    padding-bottom: 64px;
  }

  .blog-hero__title {
    font-size: 36px;
  }

  .blog-hero__standfirst {
    font-size: 18px;
  }

  .blog-main {
    padding: 48px 0 24px;
  }

  .blog-list {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .blog-card__body {
    padding: 20px 20px 22px;
  }

  .blog-card__title,
  .blog-card--feature .blog-card__title {
    font-size: 22px;
  }

  .blog-article h2 {
    font-size: 24px;
    margin-top: 44px;
  }

  .blog-article p,
  .blog-article li {
    font-size: 17px;
  }

  .blog-endcap {
    padding: 28px 24px;
  }
}
