/* OpenNash Blog - Dark Theme (Unified with Main Site) */

:root {
  --bg: #0a0a0f;
  --bg-secondary: #0d0d14;
  --card: rgba(255, 255, 255, 0.04);
  --card-hover: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.08);
  --accent: #3b82f6;
  --accent-hover: #60a5fa;
  --text: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.6);
  --max-width: 720px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'SF Mono', Consolas, monospace;
}

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

body {
  font-family: var(--font-sans);
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 1rem 2rem;
  background: var(--bg);
}

.site-header nav {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  gap: 2rem;
  align-items: center;
}

.site-header .logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
}

.site-header a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.site-header a:hover {
  color: var(--accent);
}

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

/* Blog Listing */
.blog-listing h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.blog-intro {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* Services CTA on Blog Listing */
.services-cta {
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}

.services-cta p {
  margin: 0;
}

.services-cta a {
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}

.services-cta a:hover {
  color: var(--accent-hover);
}

.posts {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.post-card {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  transition: background 0.2s, border-color 0.2s;
}

.post-card:hover {
  background: var(--card-hover);
  border-color: rgba(255, 255, 255, 0.12);
}

.post-card h2 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.post-card h2 a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s;
}

.post-card h2 a:hover {
  color: var(--accent);
}

.post-card time {
  color: var(--text-muted);
  font-size: 0.875rem;
  display: block;
  margin-bottom: 0.75rem;
}

.post-tldr {
  font-size: 0.9rem;
  color: var(--text-muted);
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}

.read-more {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.read-more:hover {
  color: var(--accent-hover);
}

/* Blog Post */
.blog-post {
  max-width: 100%;
}

.post-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.post-header h1 {
  font-size: 2.25rem;
  line-height: 1.3;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.post-header time,
.post-header .author {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* TL;DR Box */
.tldr {
  background: rgba(59, 130, 246, 0.1);
  border-left: 4px solid var(--accent);
  padding: 1.5rem;
  margin-bottom: 2rem;
  border-radius: 0 8px 8px 0;
}

.tldr h2 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.tldr ul {
  padding-left: 1.25rem;
  color: var(--text);
}

.tldr li {
  margin-bottom: 0.5rem;
}

/* Post Content */
.post-content h2 {
  font-size: 1.5rem;
  margin: 2rem 0 1rem;
  color: var(--text);
}

.post-content h3 {
  font-size: 1.25rem;
  margin: 1.5rem 0 0.75rem;
  color: var(--text);
}

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

.post-content ul,
.post-content ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
  color: var(--text);
}

.post-content li {
  margin-bottom: 0.5rem;
}

.post-content a {
  color: var(--accent);
  transition: color 0.2s;
}

.post-content a:hover {
  color: var(--accent-hover);
}

.post-content code {
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.1);
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  font-size: 0.875em;
  color: #e5e7eb;
}

.post-content pre {
  background: #1f2937;
  color: #f9fafb;
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  margin-bottom: 1.25rem;
  border: 1px solid var(--border);
}

.post-content pre code {
  background: none;
  padding: 0;
  color: inherit;
}

.post-content blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  color: var(--text-muted);
  font-style: italic;
  margin: 1.25rem 0;
}

/* Tables */
.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.25rem;
}

.post-content th,
.post-content td {
  padding: 0.75rem;
  text-align: left;
  border: 1px solid var(--border);
}

.post-content th {
  background: var(--card);
  font-weight: 600;
}

.post-content td {
  background: var(--bg);
}

/* FAQ Section */
.faq {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.faq h2 {
  margin-bottom: 1.5rem;
  color: var(--text);
}

.faq details {
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--card);
}

.faq summary {
  padding: 1rem;
  cursor: pointer;
  font-weight: 500;
  background: var(--card);
  color: var(--text);
  transition: background 0.2s;
}

.faq summary:hover {
  background: var(--card-hover);
}

.faq details[open] summary {
  border-bottom: 1px solid var(--border);
}

.faq details p {
  padding: 1rem;
  margin: 0;
  color: var(--text-muted);
}

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

.site-footer a {
  color: var(--accent);
  transition: color 0.2s;
}

.site-footer a:hover {
  color: var(--accent-hover);
}

/* Responsive */
@media (max-width: 640px) {
  main {
    padding: 2rem 1rem;
  }

  .post-header h1 {
    font-size: 1.75rem;
  }
}
