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

body {
  min-height: 100vh;
  background: #0a0e1a;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  color: #e2e8f0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 16px;
  line-height: 1.65;
}

a { color: #60a5fa; text-decoration: none; }
a:hover { color: #93c5fd; text-decoration: underline; }

.wrap { max-width: 760px; margin: 0 auto; padding: 0 32px; }

/* ---- Site header ---- */
.site-header {
  background: linear-gradient(135deg, #0f1629 0%, #1a2744 100%);
  border-bottom: 1px solid #1e3a5f;
  padding: 22px 0;
  margin-bottom: 40px;
}
.site-header .wrap { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.site-name { font-size: 17px; font-weight: 700; color: #f8fafc; letter-spacing: -0.01em; display: inline-flex; align-items: center; gap: 9px; }
.site-logo { width: 24px; height: 24px; border-radius: 6px; display: block; }
.site-name:hover { color: #f8fafc; text-decoration: none; }
.site-name span { color: #f59e0b; }
.site-nav { margin-left: auto; display: flex; gap: 18px; font-size: 14px; }
.site-nav a { color: #8b9cb2; }
.site-nav a:hover { color: #93c5fd; text-decoration: none; }

/* ---- Index ---- */
.page-intro { margin-bottom: 36px; }
.page-intro h1 { font-size: 30px; font-weight: 700; color: #f8fafc; letter-spacing: -0.02em; line-height: 1.25; margin-bottom: 10px; }
.page-intro p { color: #94a3b8; font-size: 16px; }

.article-list { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.article-card {
  background: #0d1424;
  border: 1px solid #1e3a5f;
  border-left: 3px solid #f59e0b;
  border-radius: 6px;
  padding: 18px 22px;
  transition: border-color 0.15s, background 0.15s;
}
.article-card:hover { background: #0f1e38; border-color: #3b82f6; border-left-color: #f59e0b; }
.article-card h2 { font-size: 19px; font-weight: 600; line-height: 1.35; margin-bottom: 6px; }
.article-card h2 a { color: #f1f5f9; }
.article-card h2 a:hover { color: #93c5fd; text-decoration: none; }
.article-card .summary { color: #94a3b8; font-size: 15px; margin-bottom: 10px; }
.article-meta {
  color: #8494a7;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.tag {
  background: #1e3a5f;
  color: #93c5fd;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.05em;
}

/* ---- Post ---- */
.post-header { margin-bottom: 34px; padding-bottom: 24px; border-bottom: 1px solid #1e3a5f; }
.post-header h1 { font-size: 33px; font-weight: 700; color: #f8fafc; letter-spacing: -0.02em; line-height: 1.22; margin-bottom: 12px; }
.post-header .subtitle { color: #fbbf24; font-size: 17px; font-style: italic; line-height: 1.5; margin-bottom: 14px; }

.post-content { font-size: 17px; line-height: 1.75; color: #cbd5e1; }
.post-content > * + * { margin-top: 20px; }
.post-content h2 {
  font-size: 23px;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin-top: 44px;
}
.post-content h3 {
  font-size: 15px;
  font-weight: 600;
  color: #f59e0b;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 30px;
}
.post-content strong { color: #f8fafc; font-weight: 600; }
.post-content em { color: #cbd5e1; }
.post-content ul, .post-content ol { padding-left: 24px; }
.post-content li { margin-top: 8px; }
.post-content li::marker { color: #f59e0b; }
.post-content hr { border: 0; border-top: 1px solid #1e3a5f; margin-top: 40px; }
.post-content hr + * { margin-top: 40px; }
.post-content blockquote {
  border-left: 3px solid #f59e0b;
  background: #0d1424;
  padding: 12px 20px;
  border-radius: 0 6px 6px 0;
  color: #94a3b8;
  font-style: italic;
}
.post-content code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.88em;
  background: #0f1e38;
  border: 1px solid #1e3a5f;
  border-radius: 4px;
  padding: 2px 6px;
  color: #93c5fd;
}
.post-content pre {
  background: #080d1a;
  border: 1px solid #1e3a5f;
  border-radius: 6px;
  padding: 16px 18px;
  overflow-x: auto;
}
.post-content pre code { background: none; border: 0; padding: 0; font-size: 13px; }

/* ---- Comments ---- */
.comments { margin-top: 56px; padding-top: 28px; border-top: 1px solid #1e3a5f; }
.comments h2 {
  font-size: 15px;
  font-weight: 600;
  color: #f59e0b;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.comments-note { color: #8494a7; font-size: 14px; margin-bottom: 22px; }
/* giscus injects the frame at height 0 and sizes it later over postMessage.
   Reserve space so the block never collapses to nothing while it loads. */
.comments .giscus, .comments .giscus-frame { min-height: 260px; }

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid #1e3a5f;
  margin-top: 60px;
  padding: 24px 0 40px;
  color: #8494a7;
  font-size: 14px;
}
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

@media (max-width: 600px) {
  .wrap { padding: 0 18px; }
  .page-intro h1 { font-size: 25px; }
  .post-header h1 { font-size: 26px; }
  .post-content { font-size: 16px; }
  .post-content h2 { font-size: 20px; }
}
