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

:root {
  --color-bg: #fafafa;
  --color-surface: #ffffff;
  --color-text: #2c2c2c;
  --color-text-secondary: #666666;
  --color-text-muted: #999999;
  --color-accent: #1a73e8;
  --color-accent-hover: #1557b0;
  --color-border: #e8e8e8;
  --color-tag-bg: #f0f4ff;
  --color-tag-text: #1a73e8;
  --max-width: 720px;
  --font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.8;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

/* Header */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.92);
}

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

.site-logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: -0.5px;
}

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

.site-nav {
  display: flex;
  gap: 24px;
}

.site-nav a {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.15s;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--color-accent);
}

/* Hero */
.hero {
  padding: 60px 0 40px;
}

.hero-content h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.8px;
  line-height: 1.3;
  margin-bottom: 12px;
}

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

/* Post List */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.post-card {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 24px 0;
  border-bottom: 1px solid var(--color-border);
  transition: background 0.2s;
}

.post-card:hover {
  background: linear-gradient(to right, rgba(26, 115, 232, 0.03), transparent);
}

.post-card:first-child {
  padding-top: 0;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.post-date {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
}

.post-tag {
  font-size: 0.75rem;
  background: var(--color-tag-bg);
  color: var(--color-tag-text);
  padding: 2px 10px;
  border-radius: 4px;
  font-weight: 500;
}

.post-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.3px;
  transition: color 0.15s;
}

.post-card:hover .post-title {
  color: var(--color-accent);
}

.post-excerpt {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Post Page */
.post-page {
  padding: 60px 0;
}

.post-header {
  margin-bottom: 40px;
}

.post-header .post-title {
  font-size: 2rem;
  line-height: 1.3;
}

.post-header .post-meta {
  margin-bottom: 12px;
}

.post-body {
  font-size: 1.05rem;
  line-height: 1.9;
}

.post-body p {
  margin-bottom: 1.2em;
}

.post-body h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 2em 0 0.8em;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--color-border);
}

.post-body h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 1.6em 0 0.6em;
}

.post-body code {
  background: var(--color-border);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.9em;
}

.post-body pre {
  background: #1e1e1e;
  color: #d4d4d4;
  padding: 20px 24px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.2em 0;
  font-size: 0.9rem;
  line-height: 1.6;
}

.post-body pre code {
  background: none;
  padding: 0;
  color: inherit;
}

.post-body ul, .post-body ol {
  margin: 0.8em 0;
  padding-left: 1.5em;
}

.post-body li {
  margin-bottom: 0.4em;
}

.post-body img {
  max-width: 100%;
  border-radius: 6px;
  margin: 1.2em 0;
}

.post-body blockquote {
  border-left: 3px solid var(--color-accent);
  padding-left: 16px;
  margin: 1.2em 0;
  color: var(--color-text-secondary);
  font-style: italic;
}

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

.post-body a:hover {
  text-decoration: underline;
}

/* Back Link */
.post-back {
  margin-top: 60px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
}

.post-back a {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.15s;
}

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

/* About Page */
.about-page {
  padding: 60px 0;
}

.about-page h1 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 24px;
}

.about-page p {
  font-size: 1.05rem;
  line-height: 1.9;
  margin-bottom: 1.2em;
  color: var(--color-text-secondary);
}

/* Footer */
.site-footer {
  margin-top: auto;
  padding: 32px 0;
  text-align: center;
  border-top: 1px solid var(--color-border);
}

.site-footer p {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

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

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

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 0;
  color: var(--color-text-muted);
}

.empty-state p {
  font-size: 1rem;
}

/* Responsive */
@media (max-width: 600px) {
  .hero {
    padding: 40px 0 32px;
  }

  .hero-content h1 {
    font-size: 1.5rem;
  }

  .hero-desc {
    font-size: 0.95rem;
  }

  .post-title {
    font-size: 1.15rem;
  }

  .post-header .post-title {
    font-size: 1.5rem;
  }

  .post-body {
    font-size: 1rem;
  }
}
