/* ── Design Tokens ── */
:root {
  --midnight: #1E3A5F;
  --graphite: #2B3445;
  --navy: #2A559B;
  --teal: #23AFC7;
  --teal-dark: #43C2D4;
  --amber: #F4B740;
  --gray-light: #D7E3EE;
  --white: #FFFFFF;
  --text-muted: #8fa8c4;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--midnight);
  color: var(--white);
  min-height: 100vh;
  overflow-x: hidden;
}

.bg-glow {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 50% at 20% 0%, rgba(35, 175, 199, 0.07) 0%, transparent 70%),
    radial-gradient(ellipse 50% 60% at 80% 100%, rgba(35, 175, 199, 0.05) 0%, transparent 70%);
}

/* ── Blog Listing ── */
.blog-hero {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 140px 24px 40px;
}

.blog-hero .eyebrow {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--teal);
  margin-bottom: 18px;
}

.blog-hero h1 {
  font-family: 'DM Serif Display', serif;
  font-weight: 400;
  font-size: clamp(36px, 5vw, 52px);
  line-height: 1.15;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}

.blog-hero em {
  color: var(--teal);
  font-style: italic;
}

.blog-hero .lead {
  color: var(--gray-light);
  max-width: 620px;
  margin: auto;
  font-size: 18px;
  line-height: 1.65;
  font-weight: 300;
}

/* ── Post Cards (listing page) ── */
.posts-grid {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 40px auto;
  padding: 0 20px;
  display: grid;
  gap: 24px;
}

.post-card {
  background: var(--graphite);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 18px;
  padding: 32px 30px;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.post-card:hover {
  transform: translateY(-4px);
  border-color: rgba(35, 175, 199, 0.3);
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
  font-size: 13px;
}

.post-card-category {
  background: rgba(35, 175, 199, 0.12);
  color: var(--teal);
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 500;
  font-size: 12px;
}

.post-card-date {
  color: var(--text-muted);
}

.post-card-reading-time {
  color: var(--text-muted);
}

.post-card-download {
  color: var(--amber);
  font-weight: 500;
}

.post-card h2 {
  font-family: 'DM Serif Display', serif;
  font-weight: 400;
  font-size: 22px;
  margin-bottom: 10px;
  line-height: 1.3;
  color: var(--white);
}

.post-card p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-muted);
}

/* ── Blog Post Layout ── */
.post-header {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 140px 24px 40px;
  max-width: 780px;
  margin: 0 auto;
}

.post-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 20px;
  font-size: 13px;
  flex-wrap: wrap;
}

.post-category {
  background: rgba(35, 175, 199, 0.12);
  color: var(--teal);
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 500;
  font-size: 12px;
}

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

.post-reading-time {
  color: var(--text-muted);
}

.post-author {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 20px;
}

.post-header h1 {
  font-family: 'DM Serif Display', serif;
  font-weight: 400;
  font-size: clamp(30px, 4.5vw, 44px);
  line-height: 1.2;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}

.post-excerpt {
  color: var(--gray-light);
  font-size: 18px;
  line-height: 1.65;
  font-weight: 300;
}

/* ── Post Content (Markdown-rendered) ── */
.post-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px 48px;
  font-size: 17px;
  line-height: 1.8;
  color: var(--gray-light);
}

.post-content h2 {
  font-family: 'DM Serif Display', serif;
  font-weight: 400;
  font-size: 28px;
  color: var(--white);
  margin: 48px 0 18px;
}

.post-content h3 {
  font-family: 'DM Serif Display', serif;
  font-weight: 400;
  font-size: 22px;
  color: var(--teal);
  margin: 36px 0 14px;
}

.post-content h4 {
  font-weight: 600;
  font-size: 18px;
  color: var(--white);
  margin: 28px 0 12px;
}

.post-content p {
  margin-bottom: 20px;
}

.post-content a {
  color: var(--teal);
  text-decoration: none;
  border-bottom: 1px solid rgba(35, 175, 199, 0.3);
  transition: border-color 0.2s;
}

.post-content a:hover {
  border-bottom-color: var(--teal);
}

.post-content strong {
  color: var(--white);
  font-weight: 600;
}

.post-content em {
  font-style: italic;
}

.post-content ul,
.post-content ol {
  margin: 0 0 24px 24px;
}

.post-content li {
  margin-bottom: 8px;
}

.post-content li::marker {
  color: var(--teal);
}

.post-content blockquote {
  border-left: 3px solid var(--teal);
  background: var(--graphite);
  padding: 20px 24px;
  margin: 28px 0;
  border-radius: 0 12px 12px 0;
  font-size: 16px;
  line-height: 1.7;
}

.post-content blockquote p:last-child {
  margin-bottom: 0;
}

.post-content pre {
  background: var(--graphite);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 20px 24px;
  overflow-x: auto;
  margin: 28px 0;
  font-size: 14px;
  line-height: 1.6;
}

.post-content code {
  font-family: 'Fira Code', 'Consolas', monospace;
  font-size: 0.9em;
}

.post-content p code,
.post-content li code {
  background: rgba(35, 175, 199, 0.1);
  padding: 2px 7px;
  border-radius: 4px;
  color: var(--teal);
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0;
}

.post-content th,
.post-content td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.post-content th {
  font-weight: 600;
  color: var(--white);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.post-content img {
  max-width: 100%;
  border-radius: 12px;
  margin: 28px 0;
}

.post-content hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  margin: 40px 0;
}

/* ── Download CTA Block ── */
.download-cta {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto 40px;
  padding: 28px 30px;
  background: rgba(244, 183, 64, 0.06);
  border: 1px dashed rgba(244, 183, 64, 0.3);
  border-radius: 14px;
  text-align: center;
}

.download-cta h3 {
  font-family: 'DM Serif Display', serif;
  font-weight: 400;
  font-size: 22px;
  color: var(--white);
  margin-bottom: 8px;
}

.download-cta p {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 18px;
  line-height: 1.6;
}

.btn-download {
  display: inline-block;
  background: var(--amber);
  color: var(--midnight);
  padding: 12px 28px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: transform 0.2s, opacity 0.2s;
}

.btn-download:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

/* ── Post Bottom CTA ── */
.post-cta {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 24px 70px;
}

.post-cta h3 {
  font-family: 'DM Serif Display', serif;
  font-weight: 400;
  font-size: 28px;
  margin-bottom: 14px;
}

.post-cta h3 em {
  color: var(--teal);
  font-style: italic;
}

.post-cta p {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.6;
  font-weight: 300;
}

.btn-primary {
  display: inline-block;
  background: var(--teal);
  color: var(--white);
  padding: 13px 32px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}

.btn-primary:hover { background: var(--teal-dark); transform: translateY(-2px); }

/* ── Footer ── */
footer {
  padding: 2.5rem 5%;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

footer img { height: 28px; opacity: 0.7; }
footer p { font-size: 0.8rem; color: var(--text-muted); }

/* ── FAQ Section ── */
.post-faq {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px 48px;
}

.post-faq h2 {
  font-family: 'DM Serif Display', serif;
  font-weight: 400;
  font-size: 28px;
  color: var(--white);
  margin-bottom: 24px;
}

.faq-item {
  background: var(--graphite);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 16px;
}

.faq-item h3 {
  font-family: 'DM Serif Display', serif;
  font-weight: 400;
  font-size: 18px;
  color: var(--teal);
  margin-bottom: 10px;
}

.faq-item p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--gray-light);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .post-header { padding: 120px 20px 30px; }
  .post-content { padding: 0 20px 40px; }
  .post-faq { padding: 0 20px 40px; }
  .download-cta { margin-left: 20px; margin-right: 20px; }
  .post-cta { padding: 30px 20px 50px; }
  footer { justify-content: center; text-align: center; }
}

@media (max-width: 600px) {
  .post-card { padding: 24px 20px; }
  .post-meta { gap: 10px; }
}
