/* Blog-specific styles — shared chrome comes from /styles.css */

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.blog-hero h1,
.blog-row h2,
.layout-hero .post-hero h1,
.layout-split .post-split-copy h1,
.layout-minimal .post-minimal h1,
.post-body h2,
.post-body h3 {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.blog-row p,
.blog-row-meta,
.layout-split .post-excerpt,
.layout-minimal .post-excerpt,
.post-body {
  font-family: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

.site-nav a[aria-current="page"] {
  color: var(--pp-amber);
}

/* Blog list hero — same navy gradient language as the main site hero */
.blog-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: 4rem 0 3.25rem;
  background: linear-gradient(135deg, var(--pp-navy) 0%, var(--pp-navy-light) 50%, var(--pp-navy-lighter) 100%);
  color: var(--pp-white);
}

.blog-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 85% 75% at 50% 40%, black 20%, transparent 100%);
}

.blog-hero .container {
  position: relative;
  z-index: 1;
}

.blog-hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--pp-white);
}

.blog-hero p {
  margin: 0;
  max-width: 38rem;
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.0625rem;
  line-height: 1.55;
}

.blog-list {
  padding: 2.5rem 0 4.5rem;
}

.blog-feed {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--pp-white);
  border: 1px solid rgba(30, 58, 95, 0.08);
  border-radius: var(--pp-radius);
  padding: 0 1.5rem;
}

.blog-row {
  display: grid;
  grid-template-columns: minmax(140px, 220px) minmax(0, 1fr);
  gap: 1.5rem 1.75rem;
  align-items: center;
  padding: 1.75rem 0;
  border-bottom: 1px solid rgba(30, 58, 95, 0.1);
  background: var(--pp-white);
}

.blog-row:last-child {
  border-bottom: 0;
  padding-bottom: 1.75rem;
}

.blog-row:first-child {
  padding-top: 1.75rem;
}

.blog-row-media {
  display: block;
  border-radius: var(--pp-radius);
  overflow: hidden;
  background: var(--pp-navy-dark);
  aspect-ratio: 16 / 10;
  text-decoration: none;
}

.blog-row-media img,
.blog-row-media-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.blog-row-media-placeholder {
  background: linear-gradient(135deg, var(--pp-navy) 0%, var(--pp-navy-light) 100%);
}

.blog-row-body {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 0;
}

.blog-row-meta {
  font-size: 0.8125rem;
  color: var(--pp-muted);
  font-weight: 600;
}

.blog-row h2 {
  margin: 0;
  font-size: clamp(1.2rem, 2.2vw, 1.5rem);
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.blog-row h2 a {
  color: var(--pp-navy);
  text-decoration: none;
}

.blog-row h2 a:hover {
  color: var(--pp-navy-light);
}

.blog-row p {
  margin: 0;
  color: var(--pp-muted);
  font-size: 0.9875rem;
  line-height: 1.55;
  max-width: 46rem;
}

.blog-row-more {
  margin-top: 0.25rem;
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--pp-navy);
  text-decoration: none;
  width: fit-content;
}

.blog-row-more:hover {
  color: var(--pp-amber-dark);
}

.blog-empty,
.blog-error,
.blog-loading {
  padding: 3rem 0;
  text-align: center;
  color: var(--pp-muted);
}

@media (max-width: 720px) {
  .blog-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .blog-row-media {
    max-width: 100%;
  }
}

/* Post layouts */
.blog-post-page {
  padding-bottom: 4.5rem;
}

.blog-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.8125rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.blog-meta-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.55;
}

.layout-split .blog-meta,
.layout-minimal .blog-meta {
  color: var(--pp-muted);
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.875rem;
}

.blog-back {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  width: fit-content;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.875rem;
  line-height: 1;
  border-radius: 999px;
  padding: 0.55rem 0.9rem 0.55rem 0.7rem;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

.blog-back-icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.blog-back--hero {
  margin: 0 0 0.85rem;
  color: var(--pp-navy-dark);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 8px 24px rgba(12, 24, 40, 0.18);
}

.blog-back--hero:hover {
  color: var(--pp-navy-dark);
  background: var(--pp-white);
  transform: translateY(-1px);
}

.blog-back--panel {
  margin: 0 0 1.25rem;
  color: var(--pp-navy);
  background: var(--pp-amber-light);
  border: 1px solid rgba(37, 99, 235, 0.28);
}

.blog-back--panel:hover {
  color: var(--pp-navy-dark);
  background: #dbeafe;
  border-color: rgba(37, 99, 235, 0.45);
}

.post-toolbar {
  padding-top: 1.5rem;
}

.post-body-wrap {
  background: var(--pp-white);
  border: 1px solid rgba(30, 58, 95, 0.08);
  border-radius: var(--pp-radius);
  padding: 2rem 1.85rem 2.75rem;
  margin-top: 1.5rem;
  box-shadow: 0 10px 28px rgba(30, 58, 95, 0.06);
}

.layout-hero .post-body-wrap {
  margin-top: -1.25rem;
  position: relative;
  z-index: 2;
  padding: 1.85rem 1.75rem 2.75rem;
}

.layout-split .post-body-wrap {
  margin-top: 0;
  border-radius: 0 0 var(--pp-radius) var(--pp-radius);
  border-top: 0;
  box-shadow: none;
}

.layout-minimal .post-body-wrap {
  max-width: 44rem;
  margin-inline: auto;
  margin-top: 0;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  border-top: 0;
  box-shadow: none;
}

/* Layout: hero */
.layout-hero .post-hero {
  position: relative;
  min-height: min(32vh, 260px);
  display: grid;
  align-items: end;
  color: var(--pp-white);
  background: linear-gradient(135deg, var(--pp-navy) 0%, var(--pp-navy-light) 100%);
}

.layout-hero .post-hero-media {
  position: absolute;
  inset: 0;
}

.layout-hero .post-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  display: block;
}

.layout-hero .post-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(21, 41, 67, 0.7) 0%, rgba(21, 41, 67, 0.32) 60%, rgba(21, 41, 67, 0.4) 100%),
    linear-gradient(180deg, rgba(21, 41, 67, 0.12) 0%, rgba(21, 41, 67, 0.88) 100%);
}

.layout-hero .post-hero-inner {
  position: relative;
  z-index: 1;
  padding: 1.5rem 0 2.5rem;
  max-width: 42rem;
}

.layout-hero .post-hero h1 {
  margin: 0.55rem 0 0;
  font-size: clamp(1.55rem, 3.2vw, 2.15rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.18;
  max-width: 22ch;
  text-wrap: balance;
}

/* Layout: split */
.layout-split .post-split {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 2rem;
  align-items: stretch;
  padding: 1.5rem;
  background: var(--pp-white);
  border: 1px solid rgba(30, 58, 95, 0.08);
  border-radius: var(--pp-radius) var(--pp-radius) 0 0;
  border-bottom: 0;
}

.layout-split .post-toolbar + .post-split {
  margin-top: 0.75rem;
}

.layout-split .post-split-media {
  border-radius: var(--pp-radius);
  overflow: hidden;
  min-height: 280px;
  background: var(--pp-navy-dark);
  border: 1px solid rgba(30, 58, 95, 0.08);
}

.layout-split .post-split-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.layout-split .post-split-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.85rem;
}

.layout-split .post-split-copy h1 {
  margin: 0;
  font-size: clamp(1.85rem, 3.5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--pp-navy);
}

.layout-split .post-split-copy .post-excerpt,
.layout-minimal .post-excerpt {
  margin: 0;
  color: var(--pp-muted);
  font-size: 1.0625rem;
  line-height: 1.55;
}

@media (max-width: 800px) {
  .layout-split .post-split {
    grid-template-columns: 1fr;
  }
}

/* Layout: minimal */
.layout-minimal .post-minimal {
  padding: 1.5rem 1.5rem 1.25rem;
  max-width: 44rem;
  margin: 1.25rem auto 0;
  background: var(--pp-white);
  border: 1px solid rgba(30, 58, 95, 0.08);
  border-radius: var(--pp-radius) var(--pp-radius) 0 0;
  border-bottom: 0;
}

.layout-minimal .post-minimal h1 {
  margin: 0.75rem 0 1rem;
  font-size: clamp(1.85rem, 3.5vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--pp-navy);
}

.layout-minimal .post-minimal-cover {
  margin: 1.5rem 0 0;
  border-radius: var(--pp-radius);
  overflow: hidden;
  max-height: 280px;
  border: 1px solid rgba(30, 58, 95, 0.08);
}

.layout-minimal .post-minimal-cover img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
}

/* Article body */
.post-body {
  max-width: 42rem;
  background: var(--pp-white);
  font-size: 1.125rem;
  line-height: 1.8;
  font-optical-sizing: auto;
}

.layout-hero .post-body,
.layout-split .post-body {
  margin-inline: auto;
}

.post-body > *:first-child {
  margin-top: 0;
}

.post-body > p:first-of-type {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--pp-navy-dark);
}

.post-body h2,
.post-body h3 {
  color: var(--pp-navy);
  line-height: 1.25;
  margin: 2.35rem 0 0.85rem;
  font-weight: 800;
  letter-spacing: -0.015em;
}

.post-body h2 {
  font-size: 1.45rem;
  padding-top: 0.35rem;
}

.post-body h2::before {
  content: "";
  display: block;
  width: 2.5rem;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--pp-amber-dark), var(--pp-amber));
  margin-bottom: 0.75rem;
}

.post-body h3 {
  font-size: 1.15rem;
}

.post-body p,
.post-body ul,
.post-body ol {
  margin: 0 0 1.15rem;
  color: var(--pp-text);
}

.post-body ul,
.post-body ol {
  padding-left: 0;
  list-style: none;
}

.post-body li {
  position: relative;
  padding-left: 1.35rem;
  margin-bottom: 0.55rem;
}

.post-body ul > li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.7em;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--pp-amber-dark);
  transform: translateY(-50%);
}

.post-body ol {
  counter-reset: pp-ol;
}

.post-body ol > li {
  counter-increment: pp-ol;
  padding-left: 2.1rem;
}

.post-body ol > li::before {
  content: counter(pp-ol);
  position: absolute;
  left: 0;
  top: 0.02em;
  min-width: 1.55rem;
  height: 1.55rem;
  border-radius: 999px;
  background: var(--pp-amber-light);
  color: var(--pp-navy);
  font-size: 0.9rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.post-body a {
  font-weight: 700;
  color: var(--pp-navy);
  text-decoration: underline;
  text-decoration-color: rgba(37, 99, 235, 0.45);
  text-underline-offset: 0.15em;
}

.post-body a:hover {
  color: var(--pp-navy-light);
  text-decoration-color: var(--pp-amber-dark);
}

.post-body img {
  border-radius: 10px;
  margin: 1.5rem 0;
  display: block;
  border: 1px solid rgba(30, 58, 95, 0.08);
}

.post-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: rgba(30, 58, 95, 0.06);
  padding: 0.12em 0.4em;
  border-radius: 5px;
}

.post-body strong {
  color: var(--pp-navy-dark);
  font-weight: 750;
}

.post-body hr {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(30, 58, 95, 0.16), transparent);
  margin: 2.25rem 0;
}

.post-figure {
  margin: 1.75rem 0 2rem;
  padding: 0;
}

.post-figure img,
.post-body img.post-inline-graphic {
  width: 100%;
  height: auto;
  margin: 1.5rem 0 0.5rem;
  border: 1px solid rgba(30, 58, 95, 0.1);
  border-radius: 12px;
  background: var(--pp-bg);
  display: block;
}

.post-body p:has(> img.post-inline-graphic:only-child) {
  margin: 1.5rem 0 0.35rem;
}

.post-body p:has(> em:only-child) {
  margin: 0 0 1.75rem;
  font-size: 0.8125rem;
  color: var(--pp-muted);
  line-height: 1.45;
}

.post-figure figcaption {
  margin-top: 0.65rem;
  font-size: 0.8125rem;
  color: var(--pp-muted);
  line-height: 1.45;
}

.post-callout {
  margin: 1.5rem 0 1.75rem;
  padding: 1rem 1.15rem 1.05rem;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--pp-amber-light) 0%, #f3f8fc 100%);
  border: 1px solid rgba(37, 99, 235, 0.28);
  border-left: 4px solid var(--pp-amber-dark);
}

.post-callout strong {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--pp-navy);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.post-callout p {
  margin: 0;
  color: var(--pp-navy-dark);
  font-size: 1rem;
  line-height: 1.55;
}

.post-callout-warn {
  background: #f7f9fc;
  border-color: rgba(30, 58, 95, 0.14);
  border-left-color: var(--pp-navy);
}

.post-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1.25rem 0 1.75rem;
}

.post-stat {
  background: var(--pp-bg);
  border: 1px solid rgba(30, 58, 95, 0.08);
  border-radius: 12px;
  padding: 0.9rem 0.95rem;
}

.post-stat-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--pp-muted);
  margin-bottom: 0.35rem;
}

.post-stat strong {
  display: block;
  color: var(--pp-navy);
  font-size: 1rem;
  line-height: 1.3;
}

@media (max-width: 640px) {
  .post-stat-grid {
    grid-template-columns: 1fr;
  }
}
