/* ============================================================
   ARTICLE TEMPLATE
   ============================================================ */

/* Reading progress bar */
.article-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 9999;
  background: rgba(0,75,66,.1);
}
.article-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--forest);
  transition: width .1s linear;
}

/* Hero */
.article-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #002920 0%, #004B42 55%, #006655 100%);
  color: var(--white);
  padding: 120px 48px 72px;
}

.article-hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 60% 50%, rgba(163,224,180,.06) 0%, transparent 60%);
  pointer-events: none;
}

.article-hero-grain {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  z-index: 0;
  pointer-events: none;
}

.article-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 0 auto;
}

.article-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: rgba(255,255,255,.55);
  margin-bottom: 20px;
}
.article-breadcrumb a { color: rgba(255,255,255,.65); text-decoration: none; transition: color .2s; }
.article-breadcrumb a:hover { color: var(--sage); }
.article-breadcrumb span { color: rgba(255,255,255,.4); }

.article-hero-cat {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--sage);
  margin-bottom: 16px;
}

.article-hero-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  line-height: 1.2;
  color: var(--white);
  margin: 0 0 20px;
  max-width: 760px;
}

.article-hero-sub {
  font-size: 1.1rem;
  line-height: 1.65;
  color: rgba(255,255,255,.78);
  max-width: 680px;
  margin: 0 0 28px;
}

.article-hero-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: rgba(255,255,255,.55);
}
.article-meta-author { color: rgba(255,255,255,.75); font-weight: 500; }
.article-meta-sep { color: rgba(255,255,255,.3); }

/* Layout */
.article-layout {
  padding: 64px 48px 80px;
  background: var(--white);
}

.article-layout-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 64px;
  align-items: start;
}

/* Article body prose */
.article-body {
  min-width: 0;
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--text);
}

/* Safety net: h1 inside post content must never inherit hero sizing */
.entry-content h1,
.post-content h1,
.article-body h1 {
  font-size: 28px;
  font-family: 'Cormorant Garamond', 'Cormorant', Georgia, serif;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.article-intro {
  font-size: 1.15rem;
  line-height: 1.75;
  color: var(--forest-dark);
  border-left: 3px solid var(--forest);
  padding-left: 20px;
  margin: 0 0 32px;
}

.article-body h2 {
  font-size: 1.5rem;
  color: var(--forest-dark);
  margin: 48px 0 16px;
  padding-top: 16px;
  scroll-margin-top: 80px;
}

.article-body h3 {
  font-size: 1.15rem;
  color: var(--forest-dark);
  margin: 32px 0 12px;
  font-family: var(--font-body);
  font-weight: 600;
  scroll-margin-top: 80px;
}

.article-body p { margin: 0 0 20px; }

.article-body ul,
.article-body ol {
  padding-left: 24px;
  margin: 0 0 20px;
}
.article-body li { margin-bottom: 8px; }

.article-body a { color: var(--forest); text-decoration: underline; text-underline-offset: 2px; }
.article-body a:hover { color: var(--forest-dark); }

/* Salary table */
.article-salary-table-wrap {
  overflow-x: auto;
  margin: 24px 0 32px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.article-salary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.article-salary-table thead {
  background: var(--forest);
  color: var(--white);
}

.article-salary-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.article-salary-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.article-salary-table tbody tr:last-child td { border-bottom: none; }
.article-salary-table tbody tr:nth-child(even) { background: rgba(0,75,66,.025); }
.article-salary-table tbody tr:hover { background: var(--sage-pale); }

.article-table-note {
  font-size: 0.8125rem;
  color: var(--muted);
  font-style: italic;
  padding: 10px 16px;
  background: var(--cream);
  border-top: 1px solid var(--border);
  margin: 0;
}

/* Callout boxes */
.article-callout {
  display: flex;
  gap: 16px;
  border-radius: 10px;
  padding: 20px 24px;
  margin: 24px 0 28px;
}

.article-callout--info {
  background: var(--sage-pale);
  border-left: 4px solid var(--forest);
}

.article-callout--warning {
  background: rgba(184,150,46,.08);
  border-left: 4px solid var(--gold);
}

.article-callout-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 2px; }

.article-callout strong { display: block; margin-bottom: 6px; color: var(--forest-dark); }
.article-callout--warning strong { color: var(--gold-light); }
.article-callout p { font-size: 0.9375rem; line-height: 1.65; color: var(--muted); margin: 0; }

/* Divider */
.article-divider {
  height: 1px;
  background: var(--border);
  margin: 40px 0;
}

/* Tags */
.article-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 32px;
}

.article-tag {
  font-size: 0.8125rem;
  background: var(--sage-pale);
  color: var(--forest);
  border-radius: 20px;
  padding: 4px 14px;
  font-weight: 500;
}

/* Sidebar */
.article-sidebar {
  position: sticky;
  top: 100px;
}

.article-toc {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

.article-toc-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--forest);
  margin-bottom: 16px;
}

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

.article-toc-item { border-bottom: 1px solid var(--border); }
.article-toc-item:last-child { border-bottom: none; }

.article-toc-link {
  display: block;
  padding: 9px 0;
  font-size: 0.875rem;
  color: var(--muted);
  text-decoration: none;
  transition: color .2s, padding-left .2s;
}
.article-toc-link:hover,
.article-toc-link.active { color: var(--forest); padding-left: 6px; }

/* Sidebar CTA */
.article-sidebar-cta {
  background: var(--forest);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  color: var(--white);
  margin-bottom: 24px;
}

.article-sidebar-cta-icon { font-size: 2rem; margin-bottom: 12px; }

.article-sidebar-cta h4 {
  color: var(--white);
  margin: 0 0 8px;
  font-family: var(--font-body);
  font-size: 1rem;
}

.article-sidebar-cta p {
  font-size: 0.875rem;
  color: rgba(255,255,255,.75);
  margin: 0 0 16px;
  line-height: 1.5;
}

.article-sidebar-cta .btn-primary {
  background: var(--white);
  color: var(--forest);
}
.article-sidebar-cta .btn-primary:hover { background: var(--cream); }

/* Sidebar tags */
.article-sidebar-tags {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}

.article-sidebar-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

/* Related articles */
.article-related {
  background: var(--cream);
  padding: 80px 48px;
}
.article-related-inner { max-width: 1280px; margin: 0 auto; }
.article-related-header { margin-bottom: 40px; }
.article-related-header h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 12px 0; }
.article-related-header h2 em { color: var(--forest); font-style: italic; }

.article-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.article-related-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  transition: box-shadow .25s, transform .25s;
}
.article-related-card:hover { box-shadow: 0 6px 24px rgba(0,75,66,.1); transform: translateY(-2px); }

.article-related-cat {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--forest);
  margin-bottom: 10px;
}

.article-related-card h3 {
  font-size: 1rem;
  line-height: 1.45;
  margin: 0 0 14px;
}
.article-related-card h3 a {
  color: var(--forest-dark);
  text-decoration: none;
  transition: color .2s;
}
.article-related-card h3 a:hover { color: var(--forest); }

.article-related-read { font-size: 0.8125rem; color: var(--muted); }

/* CTA band */
.article-cta-band {
  background: var(--forest-dark);
  color: var(--white);
  text-align: center;
  padding: 80px 48px;
}
.article-cta-band-inner { max-width: 640px; margin: 0 auto; }
.article-cta-band h2 { color: var(--white); font-size: clamp(1.5rem, 3vw, 2rem); margin: 0 0 16px; }
.article-cta-band p { color: rgba(255,255,255,.75); line-height: 1.7; margin-bottom: 32px; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 1024px) {
  .article-layout-inner {
    grid-template-columns: 1fr;
  }
  .article-sidebar {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .article-related-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .article-hero,
  .article-layout,
  .article-related,
  .article-cta-band { padding-left: 20px; padding-right: 20px; }
  .article-sidebar { grid-template-columns: 1fr; }
  .article-related-grid { grid-template-columns: 1fr; }
}
