/* ========================================================================
   PANAKIA — Blog styles
   ======================================================================== */

/* Blog index */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gutter);
}
.blog-grid-featured {
  grid-template-columns: 1.6fr 1fr 1fr;
  margin-bottom: 56px;
}
.blog-grid-featured .article-card.featured {
  grid-column: span 1;
  grid-row: span 2;
}
.blog-grid-featured .article-card.featured .ph {
  aspect-ratio: 4/3;
}
.blog-grid-featured .article-card.featured h3 {
  font-size: 32px;
  letter-spacing: -0.025em;
}
.blog-grid-featured .article-card.featured .article-excerpt {
  font-size: 16px;
}

.article-card {
  border: 1px solid var(--rule);
  background: var(--paper);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.2s;
}
.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px -20px color-mix(in oklch, var(--celeste-deep) 25%, transparent);
  border-color: var(--rule-2);
}
.article-card .ph {
  aspect-ratio: 16/10;
  border-radius: 0;
  border-bottom: 1px solid var(--rule);
}
.article-card-body {
  padding: 26px 26px 28px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 14px;
}
.article-card .category {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--aqua-deep);
  font-weight: 600;
  align-self: flex-start;
  padding: 5px 12px;
  background: var(--aqua-soft);
  border-radius: 100px;
}
.article-card .category .dot {
  width: 6px; height: 6px;
  background: var(--aqua-deep);
  border-radius: 50%;
}
.article-card h3 {
  font-family: var(--sans);
  font-size: 22px;
  letter-spacing: -0.02em;
  font-weight: 600;
  line-height: 1.15;
  margin: 0;
  text-wrap: balance;
}
.article-excerpt {
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0;
  text-wrap: pretty;
}
.article-meta {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-3);
}
.article-meta .read-arrow {
  color: var(--ink);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.15s;
}
.article-card:hover .read-arrow { gap: 10px; color: var(--aqua-deep); }

/* Article view */
.article {
  padding: 56px 0 0;
  position: relative;
  background:
    radial-gradient(ellipse 70% 40% at 80% 10%, var(--aqua-mist) 0%, transparent 50%),
    radial-gradient(ellipse 50% 30% at 10% 30%, var(--celeste-mist) 0%, transparent 50%),
    var(--paper);
}
.article-back {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--rule-2);
  border-radius: 100px;
  background: var(--paper);
  transition: border-color 0.15s, color 0.15s, transform 0.15s;
  cursor: pointer;
}
.article-back:hover { color: var(--ink); border-color: var(--ink-3); transform: translateX(-2px); }

.article-header {
  margin-top: 36px;
  max-width: 760px;
}
.article-header .article-eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  margin-bottom: 24px;
}
.article-header .article-eyebrow .category-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  background: var(--aqua-soft);
  color: var(--aqua-deep);
  border-radius: 100px;
  font-weight: 600;
}
.article-header .article-eyebrow .category-pill .dot {
  width: 6px; height: 6px;
  background: var(--aqua-deep);
  border-radius: 50%;
}
.article-header h1 {
  font-family: var(--sans);
  font-size: clamp(36px, 5vw, 64px);
  letter-spacing: -0.03em;
  font-weight: 700;
  line-height: 1.02;
  margin: 0 0 24px;
  text-wrap: balance;
}
.article-header .article-lede {
  font-family: var(--sans);
  font-size: 20px;
  line-height: 1.5;
  color: var(--ink-2);
  margin: 0;
  text-wrap: pretty;
  font-weight: 400;
}

.article-cover {
  margin: 56px 0 0;
  aspect-ratio: 16/9;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 48px -20px color-mix(in oklch, var(--celeste-deep) 30%, transparent);
}
.article-cover .ph {
  border-radius: 0;
  aspect-ratio: auto;
  width: 100%;
  height: 100%;
}

/* Article body */
.article-body {
  max-width: 760px;
  margin: 64px auto 0;
  padding: 0 24px 96px;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
}
.article-body p {
  margin: 0 0 24px;
  text-wrap: pretty;
}
.article-body h2 {
  font-family: var(--sans);
  font-size: clamp(24px, 2.8vw, 32px);
  letter-spacing: -0.02em;
  font-weight: 600;
  line-height: 1.15;
  margin: 56px 0 20px;
  text-wrap: balance;
}
.article-body h3 {
  font-family: var(--sans);
  font-size: 20px;
  letter-spacing: -0.015em;
  font-weight: 600;
  margin: 36px 0 12px;
}
.article-body ul, .article-body ol {
  margin: 0 0 24px;
  padding-left: 24px;
}
.article-body li {
  margin-bottom: 10px;
  text-wrap: pretty;
}
.article-body li::marker { color: var(--aqua-deep); }
.article-body strong { font-weight: 600; color: var(--ink); }
.article-body a {
  color: var(--aqua-deep);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.article-body code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--paper-3);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--ink);
}

.article-callout {
  margin: 32px 0;
  padding: 24px 28px;
  border-left: 3px solid var(--aqua-deep);
  background: linear-gradient(90deg, var(--aqua-mist), transparent);
  border-radius: 0 12px 12px 0;
}
.article-callout .callout-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--aqua-deep);
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.article-callout .callout-label::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--aqua-deep);
  border-radius: 50%;
}
.article-callout p {
  margin: 0;
  font-size: 16px;
  color: var(--ink);
  line-height: 1.6;
}
.article-callout p + p { margin-top: 12px; }

.article-keypoints {
  margin: 40px 0;
  padding: 32px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  background: var(--paper-2);
}
.article-keypoints h4 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--aqua-deep);
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}
.article-keypoints h4::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--aqua-deep);
  border-radius: 50%;
}
.article-keypoints ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.article-keypoints li {
  position: relative;
  margin: 0;
  padding: 14px 0 14px 40px;
  border-top: 1px solid var(--rule);
  font-size: 15.5px;
  line-height: 1.55;
}
.article-keypoints li:first-child { border-top: 0; padding-top: 0; }
.article-keypoints li::before {
  content: counter(item, decimal-leading-zero);
  counter-increment: item;
  position: absolute;
  left: 0;
  top: 16px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--aqua-deep);
  font-weight: 600;
  letter-spacing: 0.04em;
}
.article-keypoints li:first-child::before { top: 2px; }
.article-keypoints ul { counter-reset: item; }

.article-footer {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 24px 96px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.article-footer .byline {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}
.article-footer .byline strong { color: var(--ink-2); font-weight: 600; }
.article-share {
  display: flex;
  gap: 8px;
}
.article-share button {
  padding: 8px 14px;
  border: 1px solid var(--rule-2);
  border-radius: 100px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  background: var(--paper);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.article-share button:hover { color: var(--ink); border-color: var(--ink-3); }

/* Related articles */
.related-section {
  background: var(--paper-2);
  border-top: 1px solid var(--rule);
  padding: 80px 0;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gutter);
}

/* Filters */
.blog-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}
.blog-filter {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  padding: 9px 16px;
  border: 1px solid var(--rule-2);
  border-radius: 100px;
  background: var(--paper);
  color: var(--ink-2);
  cursor: pointer;
  transition: all 0.15s;
}
.blog-filter:hover { color: var(--ink); border-color: var(--ink-3); }
.blog-filter.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

@media (max-width: 880px) {
  .blog-grid, .blog-grid-featured, .related-grid { grid-template-columns: 1fr; }
  .blog-grid-featured .article-card.featured { grid-column: span 1; grid-row: span 1; }
  .blog-grid-featured .article-card.featured h3 { font-size: 22px; }
  .article-header { margin-top: 24px; }
  .article-cover { margin-top: 32px; border-radius: 14px; }
  .article-body { padding: 0 16px 64px; font-size: 16px; }
  .article-body h2 { margin-top: 40px; }
  .article-callout { padding: 18px 20px; }
  .article-keypoints { padding: 24px; }
}
