:root {
  --bg: #fafaf9;
  --text: #1c1917;
  --muted: #78716c;
  --accent: #059669;
  --border: #e7e5e4;
  --code-bg: #f5f5f4;
  --max-width: 680px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans JP', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 17px;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 1.2rem 0;
  margin-bottom: 2.5rem;
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

nav { display: flex; gap: 1.2rem; }

nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}

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

.lang-switch {
  border: 1px solid var(--border);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.8rem !important;
}

/* Post list */
.tagline {
  color: var(--muted);
  margin-bottom: 2.5rem;
  font-size: 1rem;
}

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

.post-summary:last-child { border-bottom: none; }

.post-summary h2 {
  font-size: 1.3rem;
  margin-bottom: 0.3rem;
}

.post-summary h2 a {
  color: var(--text);
  text-decoration: none;
}

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

.post-summary p {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 0.5rem;
}

/* Post meta */
.post-meta {
  color: var(--muted);
  font-size: 0.85rem;
}

/* Tags */
.tags { margin-top: 0.5rem; display: flex; gap: 0.4rem; flex-wrap: wrap; }

.tag {
  background: var(--code-bg);
  color: var(--muted);
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  font-size: 0.8rem;
}

/* Single post */
.post-header { margin-bottom: 2rem; }

.post-header h1 {
  font-size: 1.8rem;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.translations {
  margin-top: 0.8rem;
}

.translations a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
}

.translations a:hover { text-decoration: underline; }

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

.post-content h3 {
  font-size: 1.1rem;
  margin: 1.5rem 0 0.6rem;
}

.post-content p { margin-bottom: 1.2rem; }

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

.post-content ul, .post-content ol {
  margin: 0 0 1.2rem 1.5rem;
}

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

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

.post-content code {
  background: var(--code-bg);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-size: 0.9em;
}

.post-content pre {
  background: var(--code-bg);
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
  margin-bottom: 1.2rem;
}

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

.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin: 1rem 0;
}

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

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

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

/* Responsive */
@media (max-width: 600px) {
  body { font-size: 16px; }
  .post-header h1 { font-size: 1.5rem; }
  .site-header .container { flex-direction: column; gap: 0.5rem; }
}
