/* Blog design. Inherits the palette and font stack from styles.css; this
   file owns long-form reading and the index listing.

   No decorative characters are used anywhere: separators are drawn with
   CSS, not typed as middots or arrows. */

.blog-page {
  --measure: 44rem;
  --rule: rgba(255, 255, 255, 0.10);
  --muted: rgba(255, 255, 255, 0.62);
  --muted-strong: rgba(255, 255, 255, 0.78);
  --accent: #4ade9a;
}

.article-inner {
  width: min(100%, 72rem);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 3rem);
}

/* ---------- breadcrumb ---------- */

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding-top: clamp(1.5rem, 4vw, 2.5rem);
  font-size: 0.85rem;
  color: var(--muted);
}

.breadcrumb a {
  color: inherit;
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--muted-strong);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.breadcrumb span {
  opacity: 0.45;
}

/* ---------- article header ---------- */

.article-header {
  max-width: var(--measure);
  padding: clamp(2rem, 6vw, 3.5rem) 0 0;
}

.article-kicker,
.post-kicker,
.cta-kicker,
.toc-title {
  margin: 0 0 1rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.article-header h1,
.index-header h1 {
  margin: 0;
  font-size: clamp(2.1rem, 5.4vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.article-standfirst {
  margin: 1.5rem 0 0;
  font-size: clamp(1.08rem, 2vw, 1.28rem);
  line-height: 1.6;
  color: var(--muted-strong);
  text-wrap: pretty;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-size: 0.88rem;
  color: var(--muted);
}

/* Separator drawn, never typed. */
.meta-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.5;
}

/* ---------- table of contents ---------- */

.article-toc {
  max-width: var(--measure);
  margin: clamp(2.5rem, 6vw, 3.5rem) 0 0;
  padding: 1.5rem 1.75rem;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.article-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
}

.article-toc li {
  counter-increment: toc;
  position: relative;
  padding-left: 2rem;
  margin-bottom: 0.7rem;
  font-size: 0.95rem;
  line-height: 1.45;
}

.article-toc li:last-child {
  margin-bottom: 0;
}

.article-toc li::before {
  content: counter(toc, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0.05em;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  opacity: 0.8;
}

.article-toc a {
  color: var(--muted-strong);
  text-decoration: none;
}

.article-toc a:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- article body ---------- */

.article-body {
  max-width: var(--measure);
  padding: clamp(2rem, 5vw, 3rem) 0 0;
}

.article-body p {
  margin: 0 0 1.5rem;
  font-size: clamp(1.02rem, 1.6vw, 1.11rem);
  line-height: 1.78;
  color: rgba(255, 255, 255, 0.86);
  text-wrap: pretty;
}

/* Opening paragraph carries a little more weight. */
.article-body > p:first-child {
  font-size: clamp(1.1rem, 1.9vw, 1.22rem);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.94);
}

.article-body h2 {
  margin: clamp(2.75rem, 6vw, 3.5rem) 0 1.15rem;
  font-size: clamp(1.4rem, 2.6vw, 1.75rem);
  line-height: 1.25;
  letter-spacing: -0.015em;
  scroll-margin-top: 6rem;
  text-wrap: balance;
}

.article-body h2::after {
  content: "";
  display: block;
  width: 2.25rem;
  height: 2px;
  margin-top: 0.9rem;
  background: var(--accent);
  opacity: 0.55;
  border-radius: 2px;
}

.article-list {
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}

.article-list li {
  position: relative;
  margin-bottom: 0.85rem;
  padding-left: 1.6rem;
  font-size: clamp(1.02rem, 1.6vw, 1.11rem);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.86);
}

/* Marker drawn, never typed. */
.article-list li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.72em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.75;
}

.article-body a {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: rgba(74, 222, 154, 0.55);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.article-body a:hover {
  text-decoration-color: var(--accent);
}

/* ---------- article + index CTA ---------- */

.article-cta {
  max-width: var(--measure);
  margin: clamp(3rem, 7vw, 4.5rem) 0 clamp(3rem, 8vw, 5rem);
  padding: clamp(1.75rem, 4vw, 2.5rem);
  border: 1px solid var(--rule);
  border-radius: 18px;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(74, 222, 154, 0.10), transparent 60%),
    rgba(255, 255, 255, 0.02);
}

.article-cta h2 {
  margin: 0 0 0.85rem;
  font-size: clamp(1.35rem, 2.6vw, 1.7rem);
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.article-cta p {
  margin: 0 0 1.6rem;
  color: var(--muted-strong);
  line-height: 1.65;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
}

/* ---------- blog index ---------- */

.index-header {
  max-width: var(--measure);
  padding: clamp(2rem, 6vw, 3.5rem) 0 clamp(2rem, 5vw, 3rem);
}

.post-feature {
  display: block;
  padding: clamp(1.75rem, 4vw, 2.75rem);
  border: 1px solid var(--rule);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.02);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.post-feature:hover {
  border-color: rgba(74, 222, 154, 0.45);
  background: rgba(255, 255, 255, 0.035);
  transform: translateY(-2px);
}

.post-feature h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.6rem, 3.4vw, 2.15rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.post-card {
  display: flex;
  flex-direction: column;
  padding: 1.75rem;
  border: 1px solid var(--rule);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.post-card:hover {
  border-color: rgba(74, 222, 154, 0.45);
  background: rgba(255, 255, 255, 0.035);
  transform: translateY(-2px);
}

.post-card h3 {
  margin: 0 0 0.85rem;
  font-size: 1.18rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.post-excerpt {
  margin: 0 0 1.35rem;
  font-size: 0.96rem;
  line-height: 1.62;
  color: var(--muted);
}

.post-card .post-excerpt {
  flex: 1;
}

.post-meta {
  margin: 0;
  font-size: 0.84rem;
  color: var(--muted);
}

.post-empty {
  color: var(--muted);
}

/* ---------- footer ---------- */

/* styles.css styles the bare `footer` element as a 3 column grid, which
   applies here too. Reset it explicitly before laying this one out. */
.blog-page .site-footer {
  display: block;
  width: auto;
  max-width: none;
  margin: clamp(3rem, 8vw, 5rem) 0 0;
  padding: clamp(2.5rem, 6vw, 3.5rem) clamp(1.25rem, 5vw, 3rem) clamp(2rem, 4vw, 2.5rem);
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 1rem;
  text-align: left;
  gap: 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(16rem, 1.4fr) repeat(2, minmax(9rem, auto));
  align-items: start;
  gap: clamp(2rem, 5vw, 4rem);
  width: min(100%, 72rem);
  margin: 0 auto;
}

.footer-brand-block .brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1rem;
  text-decoration: none;
  color: inherit;
}

.footer-brand-block .brand-mark {
  width: 28px;
  height: 28px;
}

.footer-brand-block .footer-tagline {
  margin: 1rem 0 0;
  max-width: 30ch;
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--muted);
  text-align: left;
}

.footer-col-title {
  margin: 0 0 0.9rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

.footer-col ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-col li {
  margin-bottom: 0.65rem;
}

.footer-col li:last-child {
  margin-bottom: 0;
}

.footer-col a {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--muted-strong);
  text-decoration: none;
  white-space: nowrap;
}

.footer-col a:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-bottom {
  width: min(100%, 72rem);
  margin: clamp(2rem, 4vw, 2.75rem) auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}

.blog-page .site-footer .footer-copyright {
  margin: 0;
  font-size: 0.84rem;
  color: var(--muted);
  text-align: left;
}

@media (max-width: 860px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .footer-brand-block {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-brand-block .footer-tagline {
    max-width: none;
  }
}

.nav-links .is-active {
  color: #fff;
}

/* ---------- responsive ---------- */

@media (max-width: 640px) {
  .article-toc {
    padding: 1.25rem 1.35rem;
  }

  .article-cta {
    padding: 1.5rem 1.35rem;
  }

  .cta-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.9rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .post-feature,
  .post-card {
    transition: none;
  }

  .post-feature:hover,
  .post-card:hover {
    transform: none;
  }
}
