/* =============================================================
   BLOG - editorial SEO content
============================================================= */

body.blog-page {
  background: var(--bg-main);
}

body.blog-page main {
  padding-top: 88px;
}

.blog-shell {
  width: min(100%, var(--site-max-width));
  margin: 0 auto;
  padding: var(--section-padding-y-tight) var(--section-padding-x) var(--section-padding-y);
}

.blog-hero,
.blog-article-header,
.blog-article-body,
.blog-article-aside,
.blog-editorial-note {
  border: 1px solid var(--surface-border);
  background: var(--surface-section);
  box-shadow: var(--shadow-soft);
}

.blog-hero {
  padding: clamp(30px, 4vw, 58px);
  border-radius: var(--radius-lg);
}

.blog-kicker,
.blog-card-kicker,
.blog-meta-label {
  color: var(--section-accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.blog-hero h1,
.blog-article-header h1 {
  max-width: 18ch;
  margin-top: 12px;
  font-size: clamp(36px, 5vw, 68px);
  line-height: 1.04;
}

.blog-hero p,
.blog-article-header > p {
  max-width: 760px;
  margin-top: 18px;
  color: var(--text-muted);
  font-size: clamp(17px, 1.8vw, 21px);
  line-height: 1.65;
}

.blog-hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.blog-hero-links a,
.blog-inline-link {
  color: var(--text-main);
  text-decoration-color: var(--section-accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.blog-hero-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--surface-border);
  border-radius: 999px;
  background: var(--surface-card-soft);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}

.blog-hero-links a:hover,
.blog-hero-links a:focus-visible {
  border-color: var(--surface-border-strong);
  background: var(--surface-card-hover);
}

.blog-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin: var(--section-gap) 0 var(--section-gap-tight);
}

.blog-section-heading h2 {
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.1;
}

.blog-section-heading p {
  max-width: 520px;
  color: var(--text-muted);
}

.blog-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--grid-gap);
}

.blog-card {
  display: flex;
  min-height: 250px;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(22px, 2.5vw, 34px);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  background: var(--surface-card);
  color: var(--text-main);
  text-decoration: none;
  box-shadow: var(--shadow-soft);
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.blog-card:hover,
.blog-card:focus-visible {
  transform: translateY(-3px);
  border-color: var(--surface-border-strong);
  background: var(--surface-card-hover);
  box-shadow: var(--shadow-hover);
}

.blog-card h3 {
  max-width: 22ch;
  margin-top: 10px;
  font-size: clamp(21px, 2vw, 30px);
  line-height: 1.16;
}

.blog-card p {
  margin-top: 14px;
  color: var(--text-muted);
}

.blog-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--section-accent);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.blog-editorial-note {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 0.7fr);
  gap: var(--grid-gap);
  margin-top: var(--section-gap);
  padding: clamp(22px, 3vw, 36px);
  border-radius: var(--radius-lg);
}

.blog-editorial-note h2 {
  font-size: clamp(22px, 2.4vw, 32px);
}

.blog-editorial-note p,
.blog-editorial-note li {
  color: var(--text-muted);
}

.blog-editorial-note p {
  margin-top: 12px;
}

.blog-editorial-note ul {
  display: grid;
  gap: 8px;
  align-content: start;
}

.blog-editorial-note li {
  padding-left: 18px;
  position: relative;
}

.blog-editorial-note li::before {
  content: '';
  position: absolute;
  top: 0.72em;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--section-accent);
}

.blog-article-shell {
  width: 100%;
  margin: 0 auto;
}

.blog-article-header {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: clamp(560px, 52vw, 720px);
  flex-direction: column;
  justify-content: flex-start;
  overflow: hidden;
  padding: clamp(28px, 4vw, 56px);
  padding-top: clamp(84px, 10vw, 132px);
  border-radius: var(--radius-lg);
  border-bottom: 0;
  background-image:
    linear-gradient(90deg, rgba(12, 13, 14, 0.97) 0%, rgba(12, 13, 14, 0.88) 42%, rgba(12, 13, 14, 0.3) 100%),
    var(--blog-article-hero-image);
  background-position: center;
  background-size: cover;
  box-shadow: var(--shadow-soft);
}

html[data-theme='light'] .blog-article-header {
  background-image:
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.98) 0%,
      rgba(255, 255, 255, 0.94) 46%,
      rgba(255, 255, 255, 0.64) 78%,
      rgba(255, 255, 255, 0.3) 100%
    ),
    var(--blog-article-hero-image-light);
}

.blog-article-header > * {
  position: relative;
  z-index: 1;
}

.blog-article-header h1 {
  max-width: 20ch;
}

.blog-article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-top: 22px;
  color: var(--text-muted);
  font-size: 13px;
}

.blog-article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: var(--grid-gap);
  margin-top: var(--section-gap);
  align-items: start;
}

.blog-article-body {
  min-width: 0;
  padding: clamp(24px, 4vw, 52px);
  border-radius: var(--radius-lg);
}

.blog-article-body h2 {
  margin-top: 42px;
  font-size: clamp(24px, 2.8vw, 36px);
  line-height: 1.15;
}

.blog-article-body h2:first-child {
  margin-top: 0;
}

.blog-article-body h3 {
  margin-top: 28px;
  font-size: 20px;
}

.blog-article-body p,
.blog-article-body li {
  color: var(--text-muted);
  font-size: 17px;
  line-height: 1.75;
}

.blog-article-body p {
  margin-top: 14px;
}

.blog-article-body ul,
.blog-article-body ol {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
  padding-left: 22px;
}

.blog-article-body li::marker {
  color: var(--section-accent);
  font-weight: 800;
}

.blog-callout {
  margin-top: 24px;
  padding: 18px 20px;
  border-left: 3px solid var(--section-accent);
  background: var(--surface-card-soft);
  color: var(--text-muted);
}

.blog-article-aside {
  padding: 22px;
  border-radius: var(--radius-lg);
}

.blog-article-aside h2 {
  font-size: 18px;
}

.blog-article-aside ul {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.blog-article-aside a {
  color: var(--text-muted);
  font-size: 14px;
  text-decoration: none;
}

.blog-article-aside a:hover,
.blog-article-aside a:focus-visible {
  color: var(--text-main);
}

.blog-article-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--surface-border);
  color: var(--text-muted);
  font-size: 14px;
}

@media (max-width: 820px) {
  body.blog-page main {
    padding-top: 70px;
  }

  .blog-card-grid,
  .blog-editorial-note,
  .blog-article-layout {
    grid-template-columns: 1fr;
  }

  .blog-section-heading {
    display: block;
  }

  .blog-section-heading p {
    margin-top: 10px;
  }

  .blog-article-aside {
    order: -1;
  }
}

@media (max-width: 520px) {
  .blog-shell {
    padding-top: var(--section-padding-y-compact);
  }

  .blog-hero,
  .blog-article-header,
  .blog-article-body,
  .blog-article-aside,
  .blog-editorial-note {
    border-radius: var(--radius-md);
  }

  .blog-hero h1,
  .blog-article-header h1 {
    font-size: 36px;
  }

  .blog-article-header {
    border-bottom: 1px solid var(--surface-border);
  }

  .blog-article-body {
    padding: 22px;
  }

  .blog-article-header {
    min-height: 620px;
    padding-top: 76px;
    background-position: 68% center;
  }

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