/* ============================================================
   LimeGraf — Blog CSS
   Dark theme, lime green accent (#7EDB2F)
   Fonts: Epilogue (headings), DM Sans (body)
   ============================================================ */

/* ── Variables ── */
:root {
  --lime: #7EDB2F;
  --lime-dim: rgba(126,219,47,.15);
  --lime-glow: rgba(126,219,47,.25);
  --dk: #0E0E0E;
  --dk2: #161616;
  --dk3: #1A1A1A;
  --dk4: #222;
  --tx: #E8E8E8;
  --tx2: rgba(255,255,255,.55);
  --tx3: rgba(255,255,255,.35);
  --bd: rgba(255,255,255,.08);
  --r: 10px;
  --ff-h: 'Epilogue', sans-serif;
  --ff-b: 'DM Sans', sans-serif;
}

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

body {
  font-family: var(--ff-b);
  background: var(--dk);
  color: var(--tx);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ── Blog Page Hero ── */
.blog-hero {
  padding: 160px 0 80px;
  position: relative;
  overflow: hidden;
}
.blog-hero::before {
  content: '';
  position: absolute;
  top: -200px; left: -100px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(126,219,47,.08) 0%, transparent 70%);
  pointer-events: none;
}
.blog-hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}
.blog-hero .breadcrumb {
  font-size: 13px;
  color: var(--tx3);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.blog-hero .breadcrumb a { transition: color .2s; }
.blog-hero .breadcrumb a:hover { color: var(--lime); }
.blog-hero .breadcrumb .sep { color: var(--tx3); }
.blog-hero .breadcrumb .current { color: var(--tx2); }

.blog-hero-title {
  font-family: var(--ff-h);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}
.blog-hero-title span { color: var(--lime); }

.blog-hero-lead {
  font-size: 17px;
  color: var(--tx2);
  max-width: 520px;
  margin-bottom: 36px;
}

/* Search */
.blog-search {
  display: flex;
  max-width: 480px;
  border: 1px solid var(--bd);
  border-radius: var(--r);
  overflow: hidden;
  transition: border-color .2s;
}
.blog-search:focus-within { border-color: var(--lime); }
.blog-search-input {
  flex: 1;
  padding: 13px 16px;
  font-size: 15px;
  font-family: var(--ff-b);
  background: var(--dk2);
  color: var(--tx);
  border: none;
  outline: none;
}
.blog-search-input::placeholder { color: var(--tx3); }
.blog-search-btn {
  padding: 13px 18px;
  background: var(--lime);
  color: #0E0E0E;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: background .2s;
}
.blog-search-btn:hover { background: #8FE83F; }
.blog-search-btn svg { width: 18px; height: 18px; }

/* ── Featured Post ── */
.blog-featured {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 0;
  background: var(--dk2);
  border: 1px solid var(--bd);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color .3s, box-shadow .3s;
  cursor: pointer;
}
.blog-featured:hover {
  border-color: var(--lime-glow);
  box-shadow: 0 0 0 1px var(--lime-glow), 0 16px 48px rgba(0,0,0,.5);
}
.blog-featured-img {
  position: relative;
  overflow: hidden;
}
.blog-featured-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.blog-featured:hover .blog-featured-img img { transform: scale(1.04); }
.blog-featured-img::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, transparent 50%, rgba(14,14,14,.6) 100%);
}
.blog-featured-badge {
  position: absolute;
  top: 16px; left: 16px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  background: var(--lime);
  color: #0E0E0E;
  padding: 5px 12px;
  border-radius: 6px;
  z-index: 1;
}
.blog-featured-body {
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.blog-featured-title {
  font-family: var(--ff-h);
  font-size: clamp(22px, 2.5vw, 30px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 12px 0 14px;
}
.blog-featured-desc {
  font-size: 15px;
  color: var(--tx2);
  line-height: 1.65;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-featured-read {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--lime);
  transition: gap .2s;
}
.blog-featured:hover .blog-featured-read { gap: 10px; }

/* ── Section Titles ── */
.blog-section {
  padding: 80px 0;
}
.blog-section-dark { background: var(--dk); }
.blog-section-alt { background: var(--dk2); }

.blog-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}
.blog-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--lime);
  margin-bottom: 10px;
}
.blog-section-title {
  font-family: var(--ff-h);
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 32px;
}

/* ── Blog Card Grid ── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.blog-card {
  background: var(--dk3);
  border: 1px solid var(--bd);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color .25s, transform .25s, box-shadow .25s;
  cursor: pointer;
}
.blog-card:hover {
  border-color: var(--lime-glow);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,.4);
}
.blog-card-img {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
}
.blog-card-img::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(14,14,14,.7) 100%);
}
.blog-card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.blog-card:hover .blog-card-img img { transform: scale(1.06); }

.blog-card-body {
  padding: 20px 22px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.blog-card-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  border: 1px solid;
  border-radius: 5px;
  padding: 3px 10px;
  margin-bottom: 12px;
  align-self: flex-start;
}
.blog-card-title {
  font-family: var(--ff-h);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card-desc {
  font-size: 14px;
  color: var(--tx2);
  line-height: 1.6;
  margin-bottom: 16px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card-meta {
  font-size: 12px;
  color: var(--tx3);
  display: flex;
  align-items: center;
  gap: 8px;
}
.blog-card-dot {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--lime);
  flex-shrink: 0;
}

.blog-empty {
  color: var(--tx3);
  padding: 60px 0;
  text-align: center;
  grid-column: 1 / -1;
}

/* ── CTA Section ── */
.blog-cta {
  padding: 100px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.blog-cta::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(126,219,47,.06) 0%, transparent 70%);
  pointer-events: none;
}
.blog-cta-title {
  font-family: var(--ff-h);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 16px;
  position: relative;
}
.blog-cta-lead {
  font-size: 16px;
  color: var(--tx2);
  max-width: 480px;
  margin: 0 auto 32px;
  position: relative;
}
.blog-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--lime);
  color: #0E0E0E;
  font-family: var(--ff-b);
  font-size: 15px;
  font-weight: 700;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: background .2s, transform .2s;
  position: relative;
}
.blog-cta-btn:hover { background: #8FE83F; transform: translateY(-2px); }
.blog-cta-btn svg { width: 16px; height: 16px; }

/* ── Article Page ── */
.article-hero {
  padding: 160px 0 0;
  position: relative;
}
.article-hero-inner {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 32px 48px;
}
.article-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.article-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 5px;
  border: 1px solid;
}
.tag-lime { background: var(--lime-dim); color: var(--lime); border-color: var(--lime-glow); }
.tag-blue { background: rgba(56,189,248,.1); color: #38BDF8; border-color: rgba(56,189,248,.2); }
.tag-orange { background: rgba(251,146,60,.1); color: #FB923C; border-color: rgba(251,146,60,.2); }

.article-title {
  font-family: var(--ff-h);
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}
.article-meta-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.author-chip {
  display: flex;
  align-items: center;
  gap: 10px;
}
.author-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--lime);
  color: #0E0E0E;
  font-family: var(--ff-h);
  font-weight: 800;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.author-name { font-size: 14px; font-weight: 600; }
.author-date { font-size: 12px; color: var(--tx3); }
.meta-sep {
  width: 1px; height: 20px;
  background: var(--bd);
}
.meta-item {
  font-size: 13px;
  color: var(--tx2);
}

/* Cover Image */
.cover-image {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
}
.cover-image img {
  width: 100%;
  border-radius: 16px;
  aspect-ratio: 16/9;
  object-fit: cover;
}
.cover-image::after {
  content: '';
  position: absolute;
  bottom: 0; left: 32px; right: 32px;
  height: 40%;
  border-radius: 0 0 16px 16px;
  background: linear-gradient(to bottom, transparent, rgba(14,14,14,.4));
  pointer-events: none;
}

/* Article Layout */
.article-layout {
  max-width: 780px;
  margin: 0 auto;
  padding: 56px 32px 80px;
}

/* Prose */
.prose h2 {
  font-family: var(--ff-h);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.15;
  margin: 48px 0 16px;
  padding-top: 24px;
  border-top: 1px solid var(--bd);
}
.prose h2:first-child { border-top: none; padding-top: 0; margin-top: 0; }

.prose h3 {
  font-family: var(--ff-h);
  font-size: 20px;
  font-weight: 600;
  margin: 32px 0 12px;
}
.prose p {
  font-size: 16px;
  color: var(--tx);
  line-height: 1.75;
  margin-bottom: 18px;
}
.prose ul, .prose ol {
  margin: 0 0 20px 24px;
  color: var(--tx);
}
.prose li {
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 6px;
}
.prose li strong { color: var(--lime); }
.prose a.inline-link {
  color: var(--lime);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity .2s;
}
.prose a.inline-link:hover { opacity: .8; }

/* Callout */
.callout {
  background: var(--dk2);
  border: 1px solid var(--bd);
  border-left: 3px solid var(--lime);
  border-radius: 0 var(--r) var(--r) 0;
  padding: 20px 24px;
  margin: 24px 0;
}
.callout-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--lime);
  margin-bottom: 8px;
}
.callout p { margin-bottom: 0; color: var(--tx2); }
.callout.tip { border-left-color: #38BDF8; }
.callout.tip .callout-label { color: #38BDF8; }
.callout.warning { border-left-color: #FB923C; }
.callout.warning .callout-label { color: #FB923C; }

/* Table */
.table-wrap {
  overflow-x: auto;
  margin: 24px 0;
  border-radius: var(--r);
  border: 1px solid var(--bd);
}
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.comparison-table th {
  background: var(--dk3);
  font-family: var(--ff-h);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--tx2);
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--bd);
}
.comparison-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--bd);
  color: var(--tx);
}
.comparison-table tr:last-child td { border-bottom: none; }
.comparison-table tr:hover td { background: rgba(126,219,47,.03); }

/* TOC (sticky dots) */
.toc {
  position: fixed;
  left: 32px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 50;
}
.toc-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--tx3);
  border: none;
  cursor: pointer;
  transition: background .2s, transform .2s;
  padding: 0;
}
.toc-dot:hover, .toc-dot.active {
  background: var(--lime);
  transform: scale(1.4);
}

/* Related Posts */
.related-section {
  padding: 80px 0;
  background: var(--dk2);
  border-top: 1px solid var(--bd);
}
.related-section .blog-container { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.related-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--lime);
  margin-bottom: 8px;
}
.related-title {
  font-family: var(--ff-h);
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 40px;
  line-height: 1.1;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* Internal link cards (inline CTA boxes) */
.internal-cta {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--dk3);
  border: 1px solid var(--bd);
  border-radius: var(--r);
  padding: 16px 20px;
  margin: 28px 0;
  transition: border-color .25s, transform .25s;
  cursor: pointer;
}
.internal-cta:hover {
  border-color: var(--lime-glow);
  transform: translateY(-2px);
}
.internal-cta-icon {
  flex-shrink: 0;
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--lime-dim);
  display: flex;
  align-items: center;
  justify-content: center;
}
.internal-cta-icon svg {
  width: 22px; height: 22px;
  stroke: var(--lime);
  fill: none;
  stroke-width: 1.8;
}
.internal-cta-body { flex: 1; min-width: 0; }
.internal-cta-title {
  font-family: var(--ff-h);
  font-size: 15px;
  font-weight: 700;
  color: var(--tx);
  margin-bottom: 2px;
}
.internal-cta-desc {
  font-size: 13px;
  color: var(--tx2);
  line-height: 1.5;
  margin: 0;
}
.internal-cta-arrow {
  flex-shrink: 0;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .25s, transform .25s;
}
.internal-cta:hover .internal-cta-arrow {
  background: var(--lime);
  transform: translateX(3px);
}
.internal-cta-arrow svg {
  width: 16px; height: 16px;
  stroke: var(--tx2);
  fill: none;
  stroke-width: 2;
}
.internal-cta:hover .internal-cta-arrow svg { stroke: #0E0E0E; }

/* Progress Bar */
#progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  background: var(--lime);
  z-index: 10000;
  width: 0;
  transition: width 100ms linear;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-featured { grid-template-columns: 1fr; }
  .blog-featured-img { aspect-ratio: 16/9; }
  .blog-featured-body { padding: 28px 24px; }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
  .toc { display: none; }
}

@media (max-width: 768px) {
  .internal-cta { flex-wrap: wrap; }
  .prose div[style*="grid-template-columns:1fr 1fr"] { grid-template-columns: 1fr !important; }
}

@media (max-width: 600px) {
  .blog-hero { padding: 130px 0 60px; }
  .blog-hero-inner, .blog-container, .article-hero-inner, .article-layout, .cover-image { padding-left: 20px; padding-right: 20px; }
  .blog-grid { grid-template-columns: 1fr; }
  .blog-section { padding: 60px 0; }
  .blog-cta { padding: 80px 0; }
  .article-hero { padding-top: 130px; }
  .article-layout { padding-top: 40px; padding-bottom: 60px; }
  .related-grid { grid-template-columns: 1fr; }
  .related-section .blog-container { padding: 0 20px; }
  .article-meta-bar { gap: 12px; }
  .meta-sep { display: none; }
}

/* ── AI-Optimize: FAQ Block, Sources, Article Note ── */
.faq-block {
  margin: 32px 0 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.faq-item {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 22px 24px;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.faq-item:hover {
  border-color: rgba(126, 219, 47, 0.2);
  background: rgba(255,255,255,0.035);
}
.faq-q {
  font-size: 18px;
  font-weight: 600;
  color: #F2F2EE;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}
.faq-a {
  font-size: 16px;
  line-height: 1.7;
  color: rgba(242,242,238,0.78);
  margin: 0;
}
.sources-list {
  margin: 24px 0 32px;
  padding-left: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
  color: rgba(242,242,238,0.7);
}
.sources-list li {
  line-height: 1.6;
}
.sources-list a {
  color: #7EDB2F;
  text-decoration: none;
  border-bottom: 1px solid rgba(126,219,47,0.3);
  transition: border-color 0.2s ease;
}
.sources-list a:hover {
  border-bottom-color: #7EDB2F;
}
.article-note {
  margin: 24px 0 32px;
  padding: 16px 20px;
  background: rgba(126, 219, 47, 0.04);
  border-left: 3px solid rgba(126, 219, 47, 0.4);
  border-radius: 6px;
  font-size: 14px;
  color: rgba(242,242,238,0.7);
  line-height: 1.6;
}
sup a {
  color: #7EDB2F;
  text-decoration: none;
  font-weight: 600;
  padding: 0 2px;
}
sup a:hover {
  text-decoration: underline;
}

@media (max-width: 600px) {
  .faq-item { padding: 18px 20px; }
  .faq-q { font-size: 17px; }
  .faq-a { font-size: 15px; }
}
