/* ═══════════════════════════════════════════════════════════════════════════════
   ProseShift Blog — Shared Styles
   ═══════════════════════════════════════════════════════════════════════════════ */

:root {
  --bg: #08090d;
  --surface: #12141a;
  --border: #1e2028;
  --text: #e8e8ed;
  --text-muted: #8b8d98;
  --accent: #4ade80;
  --accent-hover: #22c55e;
  --heading: #f0f0f5;
  --link: #60a5fa;
  --link-hover: #93c5fd;
  --code-bg: #1a1c24;
  --max-width: 760px;
}

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

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

/* ── Header ── */
.blog-header {
  border-bottom: 1px solid var(--border);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1100px;
  margin: 0 auto;
}

.blog-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--heading);
  font-weight: 700;
  font-size: 1.2rem;
}

.blog-logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--accent), #059669);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.75rem;
  color: #000;
}

.blog-nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.blog-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.blog-nav a:hover {
  color: var(--accent);
}

.blog-nav .cta-btn {
  background: var(--accent);
  color: #000;
  padding: 0.5rem 1.2rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  transition: background 0.2s;
}

.blog-nav .cta-btn:hover {
  background: var(--accent-hover);
}

/* ── Article ── */
.blog-article {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

.blog-article h1 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 2.6rem;
  line-height: 1.2;
  color: var(--heading);
  margin-bottom: 1rem;
}

.blog-meta {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 2.5rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.blog-meta time { font-weight: 500; }

.blog-article h2 {
  font-size: 1.5rem;
  color: var(--heading);
  margin: 2.5rem 0 1rem;
  font-weight: 700;
}

.blog-article h3 {
  font-size: 1.2rem;
  color: var(--heading);
  margin: 2rem 0 0.75rem;
  font-weight: 600;
}

.blog-article p {
  margin-bottom: 1.25rem;
  color: var(--text);
}

.blog-article ul, .blog-article ol {
  margin: 0 0 1.25rem 1.5rem;
}

.blog-article li {
  margin-bottom: 0.5rem;
}

.blog-article a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.blog-article a:hover {
  color: var(--link-hover);
}

.blog-article strong {
  color: var(--heading);
  font-weight: 600;
}

.blog-article code {
  background: var(--code-bg);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9em;
}

.blog-article blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.75rem 1.25rem;
  margin: 1.5rem 0;
  background: var(--surface);
  border-radius: 0 8px 8px 0;
  color: var(--text-muted);
  font-style: italic;
}

/* ── CTA Box ── */
.blog-cta {
  background: linear-gradient(135deg, rgba(74,222,128,0.08), rgba(74,222,128,0.02));
  border: 1px solid rgba(74,222,128,0.2);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  margin: 3rem 0;
}

.blog-cta h3 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
  color: var(--heading);
}

.blog-cta p {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.blog-cta .cta-btn {
  display: inline-block;
  background: var(--accent);
  color: #000;
  padding: 0.75rem 2rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}

.blog-cta .cta-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

/* ── Table of contents ── */
.blog-toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2.5rem;
}

.blog-toc-title {
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.blog-toc ol {
  margin: 0;
  padding-left: 1.25rem;
}

.blog-toc li {
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
}

.blog-toc a {
  color: var(--link);
  text-decoration: none;
}

.blog-toc a:hover {
  text-decoration: underline;
}

/* ── Footer ── */
.blog-footer {
  border-top: 1px solid var(--border);
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  max-width: 1100px;
  margin: 0 auto;
}

.blog-footer a {
  color: var(--accent);
  text-decoration: none;
}

/* ── Blog Index ── */
.blog-index {
  max-width: 860px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

.blog-index h1 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 2.4rem;
  color: var(--heading);
  margin-bottom: 0.5rem;
}

.blog-index > p {
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}

.blog-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
  margin-bottom: 1.25rem;
  transition: border-color 0.2s, transform 0.2s;
  text-decoration: none;
  display: block;
}

.blog-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.blog-card-lang {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.blog-card h2 {
  font-size: 1.3rem;
  color: var(--heading);
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.blog-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .blog-article h1 { font-size: 1.8rem; }
  .blog-header { padding: 1rem; }
  .blog-article { padding: 2rem 1rem 4rem; }
  .blog-index { padding: 2rem 1rem 4rem; }
}
