:root {
  --text: #1a1a1a;
  --muted: #666;
  --border: #e5e5e5;
  --bg: #fdfdfc;
  --accent: #b5482a;
  --max-width: 680px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0 24px;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.65;
}

.site-header, main, .site-footer {
  max-width: var(--max-width);
  margin: 0 auto;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 40px 0 24px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 12px;
}

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

.site-header nav a {
  margin-left: 18px;
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
}

.site-header nav a:first-child { margin-left: 0; }
.site-header nav a:hover { color: var(--text); }

main { padding: 48px 0; min-height: 60vh; }

h1 { font-size: 30px; line-height: 1.3; margin: 0 0 8px; }
h2 { font-size: 22px; margin-top: 2em; }
h3 { font-size: 18px; margin-top: 1.6em; }

.post-list { list-style: none; padding: 0; margin: 0; }

.post-list-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.post-list-item a {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  text-decoration: none;
  color: var(--text);
}

.post-thumb {
  flex: 0 0 120px;
  width: 120px;
  height: 90px;
  border-radius: 6px;
  overflow: hidden;
  background: #f2f1ee;
  border: 1px solid var(--border);
}

.post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-list-body { flex: 1; min-width: 0; }

.post-list-item .post-list-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

.post-list-item .post-title { font-size: 19px; font-weight: 500; }
.post-list-item .post-date { font-size: 14px; color: var(--muted); white-space: nowrap; }
.post-list-item .post-desc { margin: 6px 0 0; color: var(--muted); font-size: 15px; }
.post-list-item a:hover .post-title { color: var(--accent); text-decoration: underline; }
.post-list-item a:hover .post-desc { text-decoration: underline; }

.post-meta {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 32px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.post-meta a { color: var(--muted); }

.post-content img,
.post-content iframe {
  max-width: 100%;
  border-radius: 4px;
}

.post-content iframe { aspect-ratio: 16 / 9; height: auto; width: 100%; }

.post-content p { margin: 1.2em 0; }
.post-content blockquote {
  margin: 1.5em 0;
  padding-left: 18px;
  border-left: 3px solid var(--accent);
  color: var(--muted);
}
.post-content code {
  background: #f2f1ee;
  padding: 2px 5px;
  border-radius: 3px;
  font-size: 0.9em;
}
.post-content pre {
  background: #f2f1ee;
  padding: 16px;
  overflow-x: auto;
  border-radius: 6px;
}
.post-content pre code { background: none; padding: 0; }

.post-tags { margin-top: 40px; }
.tag {
  display: inline-block;
  margin: 0 8px 8px 0;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
}
.tag:hover { border-color: var(--accent); color: var(--accent); }

.term-list { list-style: none; padding: 0; }
.term-list li { padding: 10px 0; border-bottom: 1px solid var(--border); }
.term-list a { text-decoration: none; color: var(--text); }
.term-count { color: var(--muted); font-size: 14px; }

.site-footer {
  padding: 24px 0 48px;
  color: var(--muted);
  font-size: 14px;
  border-top: 1px solid var(--border);
}

@media (max-width: 480px) {
  body { font-size: 17px; padding: 0 16px; }
  h1 { font-size: 26px; }

  .post-list-item a { flex-direction: column; gap: 12px; }
  .post-thumb { width: 100%; height: 160px; }
}
