:root {
  --text: #2d2d2d;
  --text-secondary: #8a8a8a;
  --bg: #fff;
  --link: #2d2d2d;
  --link-hover: #000;
  --border: #eaeaea;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial,
    "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.8;
  font-size: 16px;
}

.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 60px 20px;
}

/* Nav */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 60px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.site-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  margin-left: 24px;
  font-size: 14px;
}

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

/* Post list */
.post-list h2.year {
  font-size: 20px;
  font-weight: 600;
  margin: 40px 0 12px;
  color: var(--text);
}

.post-list h2.year:first-child { margin-top: 0; }

.post-list ul { list-style: none; }

.post-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 8px 0;
}

.post-list li a {
  color: var(--text);
  text-decoration: none;
  flex: 1;
}

.post-list li a:hover { color: var(--link-hover); }

.post-list li time {
  color: var(--text-secondary);
  font-size: 14px;
  margin-left: 16px;
  white-space: nowrap;
}

/* Article */
article h1 {
  font-size: 28px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 8px;
}

.post-date {
  display: block;
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 40px;
}

.post-content { font-size: 16px; line-height: 1.9; }
.post-content p { margin-bottom: 1.5em; }
.post-content h2 { font-size: 22px; margin: 2em 0 0.8em; font-weight: 600; }
.post-content h3 { font-size: 18px; margin: 1.5em 0 0.6em; font-weight: 600; }
.post-content a { color: var(--text); text-decoration: underline; }
.post-content blockquote {
  border-left: 3px solid var(--border);
  padding-left: 16px;
  color: var(--text-secondary);
  margin: 1.5em 0;
}
.post-content code {
  background: #f5f5f5;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 14px;
}
.post-content pre {
  background: #f5f5f5;
  padding: 16px;
  border-radius: 6px;
  overflow-x: auto;
  margin: 1.5em 0;
}
.post-content pre code { background: none; padding: 0; }
.post-content img { max-width: 100%; height: auto; margin: 1.5em 0; }

/* Footer */
footer {
  margin-top: 80px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 13px;
}

@media (max-width: 480px) {
  .container { padding: 30px 16px; }
  nav { margin-bottom: 40px; }
  article h1 { font-size: 24px; }
}
