:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --text: #1f2933;
  --muted: #6b7280;
  --brand: #009639;
  --brand-dark: #007a2f;
  --border: #e5e7eb;
  --code-bg: #1e293b;
  --code-text: #e2e8f0;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --radius: 10px;
  --maxw: 860px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 16px;
}

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

a:hover {
  text-decoration: underline;
}

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

.nav {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
}

.brand:hover {
  text-decoration: none;
}

.brand .logo {
  width: 30px;
  height: 30px;
  background: var(--brand);
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
}

.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--muted);
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 0.95rem;
  transition: all 0.15s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--brand-dark);
  background: rgba(0, 150, 57, 0.08);
  text-decoration: none;
}

/* Layout */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px 20px;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, #009639 0%, #00b34a 100%);
  color: #fff;
  padding: 64px 20px;
  text-align: center;
}

.hero h1 {
  margin: 0 0 12px;
  font-size: 2.2rem;
}

.hero p {
  margin: 0 auto;
  max-width: 560px;
  font-size: 1.1rem;
  opacity: 0.95;
}

/* Cards / post list */
.section-title {
  font-size: 1.4rem;
  margin: 0 0 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--brand);
  display: inline-block;
}

.post-list {
  display: grid;
  gap: 20px;
}

.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

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

.post-card h3 {
  margin: 0 0 8px;
  font-size: 1.25rem;
}

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

.post-meta {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.post-meta .tag {
  display: inline-block;
  background: rgba(0, 150, 57, 0.1);
  color: var(--brand-dark);
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  margin-right: 6px;
}

.post-excerpt {
  color: var(--muted);
  margin: 0;
}

/* Article */
.article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow);
}

.article h1 {
  margin-top: 0;
  font-size: 1.9rem;
}

.article h2 {
  margin-top: 2em;
  font-size: 1.4rem;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.article h3 {
  font-size: 1.15rem;
  margin-top: 1.6em;
}

.article p,
.article li {
  color: #374151;
}

.article code {
  background: #eef2f7;
  color: #b91c1c;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.article pre {
  background: var(--code-bg);
  color: var(--code-text);
  padding: 18px 20px;
  border-radius: 8px;
  overflow-x: auto;
  line-height: 1.5;
}

.article pre code {
  background: none;
  color: inherit;
  padding: 0;
  font-size: 0.88rem;
}

.article blockquote {
  border-left: 4px solid var(--brand);
  margin: 1.5em 0;
  padding: 8px 20px;
  background: rgba(0, 150, 57, 0.05);
  color: var(--muted);
}

.back-link {
  display: inline-block;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Info page */
.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow);
}

.info-card h1 {
  margin-top: 0;
}

.contact-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.contact-table th,
.contact-table td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.contact-table th {
  color: var(--muted);
  font-weight: 600;
  width: 140px;
}

/* Footer */
.site-footer {
  background: #1f2933;
  color: #9ca3af;
  padding: 32px 20px;
  text-align: center;
  font-size: 0.88rem;
  margin-top: 60px;
}

.site-footer a {
  color: #d1d5db;
}

.site-footer .footer-links {
  margin-bottom: 10px;
}

.site-footer .footer-links a {
  margin: 0 10px;
}

.beian {
  margin-top: 8px;
  font-size: 0.82rem;
  opacity: 0.8;
}

@media (max-width: 600px) {
  .nav {
    height: auto;
    flex-direction: column;
    padding: 12px 20px;
    gap: 8px;
  }
  .hero h1 {
    font-size: 1.7rem;
  }
  .article,
  .info-card {
    padding: 24px;
  }
}
