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

:root {
  --bg: #0f1117;
  --bg-card: #141824;
  --bg-card-hover: #1a2030;
  --border: #1e2533;
  --border-hover: #2d3748;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent: #2563eb;
  --accent-light: #60a5fa;
  --accent-hover: #1d4fd8;
  --green: #4ade80;
  --amber: #fbbf24;
  --red: #f87171;
  --font-sans: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius: 8px;
  --radius-lg: 12px;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

/* NAV */
.site-nav {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-mark {
  width: 34px;
  height: 34px;
  background: var(--accent);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: #fff;
}

.logo-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.logo-accent { color: var(--accent-light); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  color: var(--text-secondary);
  font-size: 14px;
  padding: 6px 12px;
  border-radius: var(--radius);
  transition: color 0.15s, background 0.15s;
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}

.nav-yt {
  color: var(--red);
  font-size: 14px;
  padding: 6px 12px;
  border-radius: var(--radius);
  border: 1px solid #3b1f1f;
  margin-left: 8px;
  transition: background 0.15s;
}

.nav-yt:hover { background: #1f1010; }

/* LAYOUT */
.page-inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* HERO */
.hero {
  padding: 4rem 2rem 3rem;
  max-width: 800px;
  margin: 0 auto;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-light);
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 1.2rem;
}

.eyebrow::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 1px;
  background: var(--accent);
}

.hero h1 {
  font-size: 2.4rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 1.2rem;
}

.hero h1 span { color: var(--accent-light); }

.hero-sub {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  padding: 10px 22px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary:hover { background: var(--accent-hover); color: #fff; }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 10px 22px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  border: 1px solid var(--border);
  transition: color 0.15s, border-color 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-ghost:hover { color: var(--text-primary); border-color: var(--border-hover); }

.hero-stats {
  display: flex;
  gap: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.stat-num {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  display: block;
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
}

/* SECTIONS */
.section {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 2rem 3rem;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.section-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 16px;
  background: var(--accent);
  border-radius: 2px;
}

.see-all {
  font-size: 13px;
  color: var(--accent-light);
  display: flex;
  align-items: center;
  gap: 4px;
}

.see-all:hover { color: var(--text-primary); }

/* ARTICLE LIST */
.article-list {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.article-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
}

.article-item:last-child { border-bottom: none; }
.article-item:hover { background: var(--bg-card); }

.article-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  background: #1e2d4a;
  color: var(--accent-light);
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
  margin-top: 2px;
  flex-shrink: 0;
}

.article-badge.green { background: #0f2a1a; color: var(--green); }
.article-badge.amber { background: #2a1f0a; color: var(--amber); }

.article-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
  line-height: 1.4;
}

.article-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: 12px;
}

/* TOPIC GRID */
.topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.topic-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  transition: border-color 0.15s, background 0.15s;
  display: block;
}

.topic-card:hover {
  border-color: var(--accent);
  background: var(--bg-card);
}

.topic-icon {
  font-size: 1.4rem;
  margin-bottom: 8px;
  display: block;
}

.topic-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  display: block;
  margin-bottom: 3px;
}

.topic-count {
  font-size: 12px;
  color: var(--text-muted);
}

/* NEWSLETTER */
.newsletter {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 760px;
  margin: 0 auto 3rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.newsletter h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.newsletter p {
  font-size: 13px;
  color: var(--text-secondary);
}

.newsletter-form {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.newsletter-input {
  background: var(--bg);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius);
  padding: 9px 14px;
  font-size: 14px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  width: 200px;
  outline: none;
}

.newsletter-input:focus { border-color: var(--accent); }

/* FOOTER */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 2rem;
}

.footer-inner {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-copy { font-size: 13px; color: var(--text-muted); }

.footer-links {
  display: flex;
  gap: 16px;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-muted);
  transition: color 0.15s;
}

.footer-links a:hover { color: var(--text-secondary); }

/* ARTICLE PAGE */
.article-page {
  max-width: 680px;
  margin: 3rem auto;
  padding: 0 2rem;
}

.article-page h1 {
  font-size: 2rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.article-page h2 {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 2.5rem 0 1rem;
}

.article-page h3 {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-primary);
  margin: 2rem 0 0.75rem;
}

.article-page p { margin-bottom: 1.25rem; }

.article-page code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--bg-card);
  color: var(--accent-light);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.article-page pre {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

.article-page pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 14px;
  color: var(--text-primary);
}

.article-page ul, .article-page ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

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

.article-page blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1.25rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 1.25rem;
}

.post-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  align-items: center;
}

/* UTILITY */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0 2rem 3rem;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}
