/* ═══════════════════════════════════════════════════════════
   ZSky AI — Obsidian Editorial Blog Template
   Premium dark editorial with luminous accents
   Typography-driven luxury meets futuristic dark theme
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400;1,600&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── Reading Progress Bar ────────────────────────────────── */
.blog-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  z-index: 9999;
  background: transparent;
  pointer-events: none;
}

.blog-progress::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 100%;
  background: linear-gradient(90deg, #38bdf8, #818cf8, #c084fc);
  transform-origin: left;
  transform: scaleX(0);
  animation: progress linear;
  animation-timeline: scroll(root);
}

@keyframes progress {
  to { transform: scaleX(1); }
}

/* ── Article Container ───────────────────────────────────── */
.blog-article {
  max-width: 740px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
  color: #b8b8cc;
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 1.05rem;
  line-height: 1.85;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Title Block ─────────────────────────────────────────── */
.blog-article h1 {
  font-family: 'Cormorant Garamond', 'Georgia', serif;
  font-size: clamp(2.4rem, 5.5vw, 3.6rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: #f0f0f8;
  margin: 0 0 1.2rem;
  text-wrap: balance;
}

/* Luminous first-letter on title — editorial touch */
.blog-article h1::first-letter {
  color: #38bdf8;
}

/* ── Article Meta ────────────────────────────────────────── */
.blog-article .article-meta,
.blog-article .legal-meta,
.blog-article .blog-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding-bottom: 2rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: #5a5a70;
}

.blog-article .article-meta span,
.blog-article .blog-meta span {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.blog-article .article-meta span::before {
  content: '';
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.4);
}

.blog-article .article-meta span:first-child::before {
  display: none;
}

/* ── Section Headers ─────────────────────────────────────── */
.blog-article h2 {
  font-family: 'Cormorant Garamond', 'Georgia', serif;
  font-size: clamp(1.7rem, 3.5vw, 2.2rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #e8e8f4;
  margin: 3.5rem 0 1.2rem;
  padding-top: 1rem;
  position: relative;
}

/* Subtle left accent on h2 */
.blog-article h2::before {
  content: '';
  position: absolute;
  left: -1.5rem;
  top: 1rem;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, #38bdf8, transparent);
  border-radius: 1px;
  opacity: 0.5;
}

.blog-article h3 {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: #d0d0e0;
  margin: 2.5rem 0 0.8rem;
}

.blog-article h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #c0c0d0;
  margin: 2rem 0 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.85rem;
}

/* ── Body Text ───────────────────────────────────────────── */
.blog-article p {
  margin: 0 0 1.4rem;
  color: #9898b0;
}

.blog-article p strong {
  color: #d0d0e0;
  font-weight: 600;
}

.blog-article p em {
  font-family: 'Cormorant Garamond', 'Georgia', serif;
  font-size: 1.12em;
  color: #a8a8c0;
  font-style: italic;
}

.blog-article a {
  color: #38bdf8;
  text-decoration: none;
  border-bottom: 1px solid rgba(56, 189, 248, 0.2);
  transition: border-color 0.3s, color 0.3s;
}

.blog-article a:hover {
  color: #7dd3fc;
  border-bottom-color: #7dd3fc;
}

/* ── Prompt / Code Blocks — the star of the show ─────────── */
.blog-article pre,
.blog-article .prompt-block,
.blog-article code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

.blog-article pre {
  position: relative;
  margin: 2rem 0;
  padding: 1.5rem 1.5rem 1.5rem 1.5rem;
  background:
    linear-gradient(135deg, rgba(56, 189, 248, 0.03) 0%, transparent 50%),
    linear-gradient(225deg, rgba(192, 132, 252, 0.03) 0%, transparent 50%),
    #08080f;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-left: 3px solid rgba(56, 189, 248, 0.4);
  border-radius: 12px;
  overflow-x: auto;
  font-size: 0.88rem;
  line-height: 1.7;
  color: #c4c4dc;
  -webkit-overflow-scrolling: touch;
}

/* Prompt label */
.blog-article pre::before {
  content: 'PROMPT';
  position: absolute;
  top: 0;
  right: 0;
  padding: 0.3rem 0.8rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(56, 189, 248, 0.5);
  background: rgba(56, 189, 248, 0.06);
  border-radius: 0 12px 0 8px;
  border-bottom: 1px solid rgba(56, 189, 248, 0.1);
  border-left: 1px solid rgba(56, 189, 248, 0.1);
}

.blog-article pre code {
  background: none;
  padding: 0;
  border: none;
  font-size: inherit;
  color: inherit;
  border-radius: 0;
}

.blog-article :not(pre) > code {
  background: rgba(56, 189, 248, 0.08);
  color: #7dd3fc;
  padding: 0.15em 0.45em;
  border-radius: 5px;
  font-size: 0.88em;
  border: 1px solid rgba(56, 189, 248, 0.1);
}

/* ── Lists ───────────────────────────────────────────────── */
.blog-article ul,
.blog-article ol {
  margin: 0 0 1.6rem;
  padding-left: 0;
  list-style: none;
}

.blog-article ul li,
.blog-article ol li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: 0.7rem;
  color: #9898b0;
}

.blog-article ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, #38bdf8, #818cf8);
  opacity: 0.6;
}

.blog-article ol {
  counter-reset: editorial;
}

.blog-article ol li {
  counter-increment: editorial;
}

.blog-article ol li::before {
  content: counter(editorial);
  position: absolute;
  left: 0;
  top: 0;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: rgba(56, 189, 248, 0.5);
  line-height: 1.85;
}

.blog-article li strong {
  color: #d0d0e0;
}

/* ── Tables — polished comparison tables ─────────────────── */
.blog-article table {
  width: 100%;
  margin: 2rem 0;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.9rem;
}

.blog-article thead {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.06), rgba(129, 140, 248, 0.04));
}

.blog-article th {
  padding: 0.9rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #a0a0b8;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.blog-article td {
  padding: 0.8rem 1rem;
  color: #8888a0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  transition: background 0.2s;
}

.blog-article tr:last-child td {
  border-bottom: none;
}

.blog-article tbody tr:hover td {
  background: rgba(56, 189, 248, 0.03);
}

/* Highlight ZSky row */
.blog-article tr.highlight td,
.blog-article tbody tr:first-child td {
  color: #b8b8d0;
}

/* ── CTA Boxes ───────────────────────────────────────────── */
.blog-article .cta-box,
.blog-article [style*="Try this yourself"] {
  margin: 2.5rem 0;
  padding: 2rem 2rem;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(56, 189, 248, 0.06) 0%, rgba(129, 140, 248, 0.04) 50%, rgba(192, 132, 252, 0.03) 100%);
  border: 1px solid rgba(56, 189, 248, 0.12);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.blog-article .cta-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.4), rgba(129, 140, 248, 0.3), transparent);
}

.blog-article .cta-box p {
  color: #d0d0e0;
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.blog-article .cta-box a,
.blog-article .cta-box .btn-primary {
  display: inline-block;
  padding: 0.8rem 2.2rem;
  border-radius: 10px;
  background: linear-gradient(135deg, #38bdf8, #818cf8);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: none;
  border-bottom: none;
  transition: opacity 0.3s, transform 0.3s;
  cursor: pointer;
}

.blog-article .cta-box a:hover,
.blog-article .cta-box .btn-primary:hover {
  opacity: 0.88;
  transform: translateY(-1px);
  color: #fff;
  border-bottom: none;
}

/* ── FAQ Accordion ───────────────────────────────────────── */
.blog-article .faq-item,
.blog-article details {
  margin: 0.5rem 0;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.3s;
}

.blog-article .faq-item:hover,
.blog-article details:hover {
  border-color: rgba(56, 189, 248, 0.12);
}

.blog-article .faq-q,
.blog-article summary {
  padding: 1.1rem 1.4rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: #c8c8dc;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.02);
  transition: background 0.3s, color 0.3s;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.blog-article .faq-q:hover,
.blog-article summary:hover {
  background: rgba(56, 189, 248, 0.04);
  color: #e0e0f0;
}

.blog-article summary::after {
  content: '+';
  font-size: 1.3rem;
  font-weight: 300;
  color: rgba(56, 189, 248, 0.5);
  transition: transform 0.3s;
}

.blog-article details[open] summary::after {
  content: '−';
  transform: rotate(180deg);
}

.blog-article summary::-webkit-details-marker {
  display: none;
}

.blog-article .faq-a,
.blog-article details > div,
.blog-article details > p {
  padding: 0.8rem 1.4rem 1.2rem;
  color: #8888a0;
  font-size: 0.92rem;
  line-height: 1.8;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
}

/* ── Related Posts Grid ──────────────────────────────────── */
.blog-article .related-grid,
.blog-article .related-posts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.blog-article .related-card,
.blog-article .related-grid a {
  display: block;
  padding: 1.2rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  text-decoration: none;
  transition: border-color 0.3s, background 0.3s, transform 0.3s;
}

.blog-article .related-card:hover,
.blog-article .related-grid a:hover {
  border-color: rgba(56, 189, 248, 0.15);
  background: rgba(56, 189, 248, 0.03);
  transform: translateY(-2px);
}

.blog-article .related-card h4,
.blog-article .related-grid a h4 {
  font-size: 0.88rem;
  font-weight: 600;
  color: #c0c0d4;
  margin: 0 0 0.3rem;
  text-transform: none;
  letter-spacing: normal;
}

.blog-article .related-card p {
  font-size: 0.78rem;
  color: #6a6a80;
  margin: 0;
  line-height: 1.5;
}

/* ── Blockquotes ─────────────────────────────────────────── */
.blog-article blockquote {
  margin: 2rem 0;
  padding: 1.5rem 1.5rem 1.5rem 2rem;
  border-left: 3px solid rgba(129, 140, 248, 0.4);
  background: rgba(129, 140, 248, 0.03);
  border-radius: 0 12px 12px 0;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  font-style: italic;
  color: #a0a0b8;
  line-height: 1.7;
}

.blog-article blockquote p {
  color: inherit;
  margin-bottom: 0;
}

/* ── Horizontal Rules ────────────────────────────────────── */
.blog-article hr {
  border: none;
  height: 1px;
  margin: 3rem 0;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.2), rgba(129, 140, 248, 0.15), transparent);
}

/* ── Images in content (not hero) ────────────────────────── */
.blog-article img:not([class]) {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 1.5rem 0;
}

/* ── Video embeds ────────────────────────────────────────── */
.blog-article video {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

/* ── Selection ───────────────────────────────────────────── */
.blog-article ::selection {
  background: rgba(56, 189, 248, 0.25);
  color: #f0f0f8;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .blog-article {
    padding: 0 1.25rem 3rem;
    font-size: 1rem;
    line-height: 1.8;
  }

  .blog-article h1 {
    font-size: clamp(1.8rem, 7vw, 2.6rem);
    margin-bottom: 1rem;
  }

  .blog-article h2 {
    font-size: 1.5rem;
    margin-top: 2.5rem;
  }

  .blog-article h2::before {
    left: -1rem;
  }

  .blog-article h3 {
    font-size: 1.1rem;
  }

  .blog-article pre {
    margin-left: -1.25rem;
    margin-right: -1.25rem;
    border-radius: 0;
    border-left: 3px solid rgba(56, 189, 248, 0.4);
    border-right: none;
    padding: 1.2rem;
    font-size: 0.82rem;
  }

  .blog-article pre::before {
    border-radius: 0;
  }

  .blog-article table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 0.82rem;
  }

  .blog-article th,
  .blog-article td {
    padding: 0.6rem 0.8rem;
    white-space: nowrap;
  }

  .blog-article .cta-box {
    margin-left: -0.5rem;
    margin-right: -0.5rem;
    padding: 1.5rem 1.2rem;
    border-radius: 12px;
  }

  .blog-article .related-grid {
    grid-template-columns: 1fr;
  }

  .blog-article blockquote {
    margin-left: -0.5rem;
    padding: 1rem 1rem 1rem 1.5rem;
    font-size: 1.05rem;
  }
}

@media (max-width: 480px) {
  .blog-article {
    padding: 0 1rem 2.5rem;
    font-size: 0.95rem;
  }

  .blog-article h1 {
    font-size: 1.7rem;
  }

  .blog-article h2 {
    font-size: 1.3rem;
  }

  .blog-article h2::before {
    display: none;
  }

  .blog-article .article-meta {
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
  }

  .blog-article pre {
    font-size: 0.78rem;
    padding: 1rem;
  }
}

/* ═══════════════════════════════════════════════════════════
   PRINT
   ═══════════════════════════════════════════════════════════ */

@media print {
  .blog-progress,
  .blog-article .cta-box,
  .blog-article .related-grid,
  nav, footer, .grain {
    display: none !important;
  }

  .blog-article {
    color: #222;
    max-width: 100%;
  }

  .blog-article h1, .blog-article h2, .blog-article h3 {
    color: #111;
  }

  .blog-article p, .blog-article li {
    color: #333;
  }

  .blog-article a {
    color: #111;
    border-bottom: 1px solid #999;
  }

  .blog-article pre {
    border: 1px solid #ccc;
    background: #f8f8f8;
    color: #333;
  }
}
