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

:root {
  --bg: #fafafa;
  --card-bg: #ffffff;
  --text: #1a1a1a;
  --text-sub: #555;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --border: #e5e7eb;
  --tag-bg: #eff6ff;
  --tag-text: #1e40af;
  --code-bg: #f3f4f6;
}

body {
  font-family: "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Meiryo", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* Header */
.site-header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  padding: 1.2rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

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

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

.site-title:hover {
  color: var(--accent);
  text-decoration: none;
}

.site-nav a {
  margin-left: 1.5rem;
  color: var(--text-sub);
  font-size: 0.9rem;
}

/* Container */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Index page */
.hero {
  text-align: center;
  padding: 3rem 0 2rem;
}

.hero h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.hero p {
  color: var(--text-sub);
  font-size: 1.05rem;
}

.post-list {
  padding: 1rem 0 3rem;
}

.post-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.8rem;
  margin-bottom: 1.2rem;
  transition: box-shadow 0.2s, transform 0.2s;
}

.post-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  transform: translateY(-2px);
}

.post-card .date {
  font-size: 0.85rem;
  color: var(--text-sub);
}

.post-card h2 {
  font-size: 1.3rem;
  margin: 0.5rem 0;
}

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

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

.post-card .excerpt {
  color: var(--text-sub);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* Article page */
.article-header {
  padding: 3rem 0 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

.article-header .date {
  font-size: 0.9rem;
  color: var(--text-sub);
}

.article-header h1 {
  font-size: 1.8rem;
  line-height: 1.4;
  margin-top: 0.5rem;
}

.article-body {
  padding-bottom: 3rem;
}

.article-body h2 {
  font-size: 1.4rem;
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--accent);
}

.article-body h3 {
  font-size: 1.15rem;
  margin: 2rem 0 0.8rem;
}

.article-body p {
  margin-bottom: 1.2rem;
}

.article-body ul, .article-body ol {
  margin: 0.8rem 0 1.2rem 1.5rem;
}

.article-body li {
  margin-bottom: 0.4rem;
}

.article-body strong {
  color: var(--text);
}

.article-body blockquote {
  border-left: 4px solid var(--accent);
  padding: 0.8rem 1.2rem;
  margin: 1.2rem 0;
  background: var(--tag-bg);
  border-radius: 0 6px 6px 0;
}

.article-body code {
  background: var(--code-bg);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9em;
}

.back-link {
  display: inline-block;
  margin: 2rem 0 3rem;
  color: var(--accent);
  font-weight: 500;
}

/* Footer */
.site-footer {
  background: var(--card-bg);
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  text-align: center;
  color: var(--text-sub);
  font-size: 0.85rem;
}
