/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --color-bg: #ffffff;
  --color-text: #1a1a2e;
  --color-text-muted: #555;
  --color-accent: #2563eb;
  --color-accent-hover: #1d4ed8;
  --color-border: #e5e7eb;
  --color-bg-code: #f3f4f6;
  --color-bg-table: #f9fafb;
  --max-width: 720px;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', monospace;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 2rem;
}
.site-header nav {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-text);
  text-decoration: none;
}
.nav-links a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.95rem;
}
.nav-links a:hover { color: var(--color-accent); }

/* Main content */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem;
}

/* Blog post */
.post-header { margin-bottom: 2rem; }
.post-header h1 {
  font-size: 2.2rem;
  line-height: 1.2;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}
.post-meta {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  display: flex;
  gap: 1rem;
}
.post-tags {
  margin-top: 0.75rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.tag {
  background: var(--color-bg-code);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* Post content typography */
.post-content h2 {
  font-size: 1.5rem;
  margin: 2.5rem 0 1rem;
  letter-spacing: -0.01em;
}
.post-content h3 {
  font-size: 1.2rem;
  margin: 2rem 0 0.75rem;
}
.post-content p {
  margin-bottom: 1.25rem;
}
.post-content a {
  color: var(--color-accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.post-content a:hover {
  color: var(--color-accent-hover);
}
.post-content ul, .post-content ol {
  margin: 1rem 0 1.25rem 1.5rem;
}
.post-content li {
  margin-bottom: 0.5rem;
}
.post-content blockquote {
  border-left: 3px solid var(--color-accent);
  padding-left: 1rem;
  margin: 1.5rem 0;
  color: var(--color-text-muted);
  font-style: italic;
}
.post-content code {
  background: var(--color-bg-code);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.88em;
}
.post-content pre {
  background: #1a1a2e;
  color: #e5e7eb;
  padding: 1.25rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.5rem 0;
}
.post-content pre code {
  background: none;
  padding: 0;
  color: inherit;
}

/* Tables — important for comparison content & AI citation */
.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.92rem;
}
.post-content th {
  background: var(--color-bg-table);
  font-weight: 600;
  text-align: left;
  padding: 0.75rem;
  border: 1px solid var(--color-border);
}
.post-content td {
  padding: 0.75rem;
  border: 1px solid var(--color-border);
}
.post-content tr:hover td {
  background: var(--color-bg-table);
}

/* CTA boxes */
.cta-box {
  background: linear-gradient(135deg, #eff6ff, #f0f9ff);
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 2rem 0;
  text-align: center;
}
.cta-box p {
  margin-bottom: 0.75rem;
  font-weight: 500;
}
.cta-button {
  display: inline-block;
  background: var(--color-accent);
  color: white;
  padding: 0.6rem 1.5rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}
.cta-button:hover {
  background: var(--color-accent-hover);
}

/* FAQ section — schema-friendly */
.faq-section {
  margin-top: 2.5rem;
}
.faq-item {
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 0;
}
.faq-item h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}
.faq-item p {
  margin: 0;
  color: var(--color-text-muted);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 2rem;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  margin-top: 4rem;
}

/* Blog index */
.blog-list {
  list-style: none;
}
.blog-list li {
  border-bottom: 1px solid var(--color-border);
  padding: 1.5rem 0;
}
.blog-list a {
  text-decoration: none;
  color: var(--color-text);
}
.blog-list h2 {
  font-size: 1.3rem;
  margin-bottom: 0.4rem;
}
.blog-list h2:hover {
  color: var(--color-accent);
}
.blog-list p {
  color: var(--color-text-muted);
  font-size: 0.92rem;
  margin: 0;
}
.blog-list time {
  color: var(--color-text-muted);
  font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 640px) {
  main { padding: 1rem; }
  .post-header h1 { font-size: 1.6rem; }
  .post-content table { font-size: 0.82rem; }
}
