/* Ghost Pixel Cleaner — Blog stylesheet
   Dark theme matching the main app, optimized for readability + SEO. */

:root {
  --bg: #0a0a0b;
  --fg: #fafafa;
  --muted: #a1a1aa;
  --dim: #71717a;
  --border: rgba(255, 255, 255, 0.08);
  --card: rgba(255, 255, 255, 0.025);
  --accent: #d97706;
  --accent-light: #fbbf24;
  --rose: #fb7185;
  --emerald: #34d399;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent-light); text-decoration: none; transition: color 0.15s; }
a:hover { color: #fff; text-decoration: underline; }

/* ── Header ───────────────────────────────────────── */
header.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(10, 10, 11, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

header.top a.brand {
  font-weight: 600;
  color: var(--fg);
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

header.top a.brand:hover { text-decoration: none; color: var(--accent-light); }

header.top .brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
}

header.top a.cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--accent);
  color: #000;
  font-weight: 600;
  border-radius: 999px;
  font-size: 13px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: all 0.15s;
}
header.top a.cta:hover {
  background: var(--accent-light);
  text-decoration: none;
  box-shadow: 0 0 30px -6px rgba(217, 119, 6, 0.5),
              inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* ── Article ──────────────────────────────────────── */
main {
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

article > header {
  margin-bottom: 48px;
}

article .kicker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 16px;
}

article h1 {
  font-size: 44px;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0 0 20px;
  color: #fff;
  text-wrap: balance;
}

article .lede {
  font-size: 19px;
  color: var(--muted);
  line-height: 1.55;
  margin: 0 0 24px;
  text-wrap: pretty;
}

article .meta {
  font-size: 13px;
  color: var(--dim);
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

article .meta .sep {
  color: var(--border);
}

article h2 {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.018em;
  line-height: 1.2;
  margin: 56px 0 16px;
  color: #fff;
}

article h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 32px 0 12px;
  color: #fff;
}

article p {
  font-size: 17px;
  color: var(--muted);
  margin: 0 0 16px;
}

article ul, article ol {
  font-size: 17px;
  color: var(--muted);
  padding-left: 24px;
  margin: 0 0 16px;
}

article ul li, article ol li {
  margin: 8px 0;
}

article strong { color: #fff; font-weight: 600; }
article em { color: #d4d4d8; font-style: normal; font-weight: 500; }
article code {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 0.92em;
  color: var(--fg);
}

article blockquote {
  border-left: 2px solid var(--accent);
  padding: 4px 0 4px 20px;
  margin: 28px 0;
  color: #fff;
  font-weight: 500;
}

/* Callout box for tips/warnings */
article .callout {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  margin: 32px 0;
}
article .callout p { margin: 0; }
article .callout strong { color: var(--accent-light); }

/* CTA block (mid-article and end) */
article .cta-block {
  margin: 56px 0;
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.10), rgba(217, 119, 6, 0.02));
  border: 1px solid rgba(217, 119, 6, 0.3);
  border-radius: 20px;
  padding: 36px 28px;
  text-align: center;
}
article .cta-block h3 {
  font-size: 22px;
  margin: 0 0 12px;
}
article .cta-block p {
  color: var(--muted);
  margin: 0 0 24px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}
article .cta-block a {
  display: inline-block;
  background: var(--accent);
  color: #000;
  padding: 12px 24px;
  font-weight: 600;
  border-radius: 999px;
  font-size: 15px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: all 0.15s;
}
article .cta-block a:hover {
  background: var(--accent-light);
  text-decoration: none;
  box-shadow: 0 0 40px -8px rgba(217, 119, 6, 0.6),
              inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* FAQ accordion */
article details {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 12px;
  margin: 12px 0;
  padding: 0;
  transition: background 0.2s;
}
article details:hover { background: rgba(255, 255, 255, 0.04); }
article details[open] { background: rgba(255, 255, 255, 0.035); }
article details summary {
  padding: 18px 22px;
  font-weight: 500;
  color: #fff;
  cursor: pointer;
  list-style: none;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
article details summary::-webkit-details-marker { display: none; }
article details summary::after {
  content: "+";
  font-size: 20px;
  color: var(--dim);
  font-weight: 400;
  transition: transform 0.2s;
}
article details[open] summary::after { transform: rotate(45deg); }
article details > p {
  padding: 0 22px 18px;
  margin: 0;
  font-size: 15.5px;
}

/* Related posts */
.related {
  margin: 72px 0 24px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.related h2 {
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--dim);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.related ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.related li {
  margin: 0;
  border-bottom: 1px solid var(--border);
}
.related li:last-child { border-bottom: none; }
.related a {
  color: var(--fg);
  font-size: 17px;
  display: block;
  padding: 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: color 0.15s;
}
.related a:hover { color: var(--accent-light); text-decoration: none; }
.related a .arrow {
  color: var(--dim);
  transition: transform 0.15s;
}
.related a:hover .arrow { transform: translateX(3px); color: var(--accent-light); }

/* ── Footer ───────────────────────────────────────── */
footer.bottom {
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  text-align: center;
  color: var(--dim);
  font-size: 13px;
}
footer.bottom a {
  color: var(--muted);
  margin: 0 8px;
}

/* ── Blog index card layout ───────────────────────── */
.post-grid {
  display: grid;
  gap: 20px;
  margin: 32px 0;
}
.post-card {
  display: block;
  padding: 28px;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 16px;
  color: var(--fg);
  transition: all 0.2s;
}
.post-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.15);
  text-decoration: none;
  transform: translateY(-2px);
}
.post-card .kicker {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 10px;
  font-weight: 600;
}
.post-card h2 {
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 8px;
  color: #fff;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.post-card p {
  font-size: 15px;
  color: var(--muted);
  margin: 0;
  line-height: 1.55;
}

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 600px) {
  article h1 { font-size: 32px; }
  article h2 { font-size: 22px; }
  article .lede { font-size: 17px; }
  main { padding: 36px 20px 60px; }
  header.top { padding: 14px 18px; }
  header.top a.cta { padding: 7px 12px; font-size: 12px; }
  article .cta-block { padding: 28px 20px; border-radius: 16px; }
  article .cta-block h3 { font-size: 19px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
