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

:root {
  --bg: #f8f9fa;
  --card: #ffffff;
  --text: #1a1a2e;
  --text-secondary: #6c757d;
  --accent: #4361ee;
  --accent-light: #eef2ff;
  --border: #e9ecef;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  --radius: 12px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

/* Nav */
nav {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
}

.nav-inner {
  max-width: 780px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.back-link {
  text-decoration: none;
  color: var(--accent);
  font-weight: 500;
  font-size: 0.92rem;
  transition: opacity 0.2s;
}

.back-link:hover {
  opacity: 0.7;
}

/* Post Detail */
.post-detail {
  max-width: 780px;
  margin: 40px auto 60px;
  padding: 0 20px;
}

.post-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.tag {
  background: var(--accent-light);
  color: var(--accent);
  padding: 2px 10px;
  border-radius: 20px;
  font-weight: 500;
  font-size: 0.8rem;
}

.post-detail h1 {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 24px;
  letter-spacing: -0.5px;
}

.post-detail .lead {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.post-detail h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 36px 0 14px;
  letter-spacing: -0.3px;
}

.post-detail p {
  font-size: 1rem;
  line-height: 1.85;
  margin-bottom: 18px;
  color: #333;
}

.post-detail ul,
.post-detail ol {
  margin: 12px 0 20px 24px;
}

.post-detail li {
  margin-bottom: 8px;
  line-height: 1.7;
  color: #333;
}

.post-detail code {
  background: var(--accent-light);
  color: var(--accent);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: "Fira Code", "Cascadia Code", "Consolas", monospace;
}

.post-detail pre {
  background: #1e1e2e;
  color: #cdd6f4;
  border-radius: 10px;
  padding: 24px;
  margin: 20px 0 24px;
  overflow-x: auto;
  line-height: 1.6;
}

.post-detail pre code {
  background: none;
  color: inherit;
  padding: 0;
  border-radius: 0;
  font-size: 0.88rem;
}

.post-detail blockquote {
  border-left: 4px solid var(--accent);
  background: var(--accent-light);
  padding: 16px 20px;
  margin: 20px 0;
  border-radius: 0 8px 8px 0;
  color: var(--text-secondary);
  font-style: italic;
}

.post-detail img {
  max-width: 100%;
  border-radius: 8px;
  margin: 20px 0;
}

/* Footer */
footer {
  text-align: center;
  padding: 32px 20px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}

/* Responsive */
@media (max-width: 600px) {
  .post-detail h1 {
    font-size: 1.6rem;
  }

  .post-detail .lead {
    font-size: 1rem;
  }

  .post-detail pre {
    padding: 16px;
    font-size: 0.82rem;
  }
}
