:root {
  --bg: #fafaf8;
  --surface: #ffffff;
  --text: #1a1a1a;
  --muted: #6b6b6b;
  --border: #e5e2da;
  --accent: #1d6fe0;
  --accent-hover: #155bb5;
  --badge-bg: #eef4ff;
  --badge-text: #1d6fe0;
  --code-bg: #f1efe9;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212;
    --surface: #1c1c1c;
    --text: #ececec;
    --muted: #a3a3a3;
    --border: #2e2e2e;
    --accent: #6aa8ff;
    --accent-hover: #8ab8ff;
    --badge-bg: #1e2a44;
    --badge-text: #9cc0ff;
    --code-bg: #262626;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 740px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

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

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.brand {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

nav a {
  margin-left: 1.25rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}

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

/* Hero */
.hero {
  padding: 3.5rem 0 2rem;
  text-align: center;
}

.hero h1 {
  font-size: 2.4rem;
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.slogan {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 580px;
  margin: 0 auto;
}

/* Newsletter */
.newsletter {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
  margin: 1.5rem 0 2.5rem;
  text-align: center;
}

.newsletter h2 {
  margin: 0 0 0.4rem;
  font-size: 1.25rem;
}

.newsletter p {
  color: var(--muted);
  margin: 0 0 1rem;
  font-size: 0.95rem;
}

.newsletter form {
  display: flex;
  gap: 0.6rem;
  max-width: 440px;
  margin: 0 auto;
}

.newsletter input[type="email"] {
  flex: 1;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  background: var(--bg);
  color: var(--text);
  min-width: 0;
}

.newsletter button {
  padding: 0.65rem 1.3rem;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.newsletter button:hover {
  background: var(--accent-hover);
}

.fine-print {
  font-size: 0.8rem !important;
  margin-top: 0.7rem !important;
}

/* Post list */
.posts h2 {
  font-size: 1.4rem;
  margin: 0 0 1.2rem;
}

.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.1rem;
}

.post-card h3 {
  margin: 0.6rem 0 0.5rem;
  font-size: 1.2rem;
  line-height: 1.45;
}

.post-card h3 a {
  color: var(--text);
  text-decoration: none;
}

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

.excerpt {
  color: var(--muted);
  margin: 0;
  font-size: 0.97rem;
}

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--badge-bg);
  color: var(--badge-text);
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
}

.post-meta {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0.8rem;
}

/* Article / prose pages */
.prose {
  padding: 2.5rem 0 3rem;
}

.prose h1 {
  font-size: 2rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 0 0 1.2rem;
}

.prose h2 {
  font-size: 1.35rem;
  margin: 2rem 0 0.8rem;
}

.prose p,
.prose li {
  color: var(--text);
}

.prose ul {
  padding-left: 1.4rem;
}

.notice-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 1.1rem 1.3rem;
  margin: 1.5rem 0;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  padding: 1.6rem 0 2.2rem;
  color: var(--muted);
  font-size: 0.88rem;
  text-align: center;
}

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

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

/* Small screens */
@media (max-width: 520px) {
  .hero h1 { font-size: 1.9rem; }
  .slogan { font-size: 1.02rem; }
  .newsletter form { flex-direction: column; }
  .header-inner { flex-direction: column; gap: 0.6rem; }
  nav a { margin: 0 0.7rem; }
  nav a:first-child { margin-left: 0; }
}

.prose blockquote{border-left:3px solid #888;padding:.6rem 1rem;margin:1.2rem 0;background:rgba(127,127,127,.08);border-radius:0 .5rem .5rem 0;}
.prose table{width:100%;border-collapse:collapse;margin:1.2rem 0;font-size:.92rem;}
.prose th,.prose td{border:1px solid rgba(127,127,127,.35);padding:.5rem .7rem;text-align:left;}
.prose th{background:rgba(127,127,127,.12);}
.post-date{color:#888;font-size:.85rem;margin:.4rem 0 0;}
