:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --accent: #2563eb;
  --accent-soft: #dbeafe;
  --photo: #7c3aed;
  --photo-soft: #ede9fe;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: linear-gradient(180deg, #f8fafc 0%, #f6f7fb 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.75;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(229,231,235,0.8);
}

.header-inner,
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
}

.site-title {
  display: inline-block;
  font-size: 1.4rem;
  font-weight: 800;
  color: #111827;
}

.site-tagline {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.nav {
  display: flex;
  gap: 18px;
}

.nav a {
  color: #374151;
  font-weight: 600;
}

.hero {
  padding: 80px 0 32px;
}

.hero-kicker {
  margin: 0 0 10px;
  color: var(--accent);
  font-weight: 700;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.hero-desc {
  max-width: 760px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 1.05rem;
}

.section {
  padding: 28px 0 20px;
}

.section-head h2 {
  margin: 0;
  font-size: 1.6rem;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--muted);
}

.post-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.post-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.post-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

.post-card h3 {
  margin: 12px 0 8px;
  font-size: 1.14rem;
  line-height: 1.45;
}

.post-card p {
  margin: 0 0 12px;
  color: #4b5563;
}

.post-card time {
  color: #9ca3af;
  font-size: 0.92rem;
}

.post-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.post-tag.php {
  background: var(--accent-soft);
  color: var(--accent);
}

.post-tag.photo {
  background: var(--photo-soft);
  color: var(--photo);
}

.about {
  margin-bottom: 32px;
}

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 30px;
  color: var(--muted);
  font-size: 0.95rem;
}

.article-wrap {
  padding: 48px 0 72px;
}

.article {
  max-width: 820px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 32px 28px;
  box-shadow: var(--shadow);
}

.article h1 {
  margin-top: 12px;
  margin-bottom: 12px;
  line-height: 1.28;
}

.article .meta {
  color: var(--muted);
  margin-bottom: 24px;
}

.article h2,
.article h3 {
  margin-top: 28px;
  line-height: 1.4;
}

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

.article code,
.article pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.article pre {
  background: #0f172a;
  color: #e5e7eb;
  padding: 16px;
  border-radius: 14px;
  overflow: auto;
  line-height: 1.6;
}

.article code {
  background: #eef2ff;
  color: #3730a3;
  padding: 2px 6px;
  border-radius: 6px;
}

.back-link {
  display: inline-block;
  margin-bottom: 10px;
}

@media (max-width: 760px) {
  .header-inner,
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .post-list {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 56px;
  }

  .article {
    padding: 24px 18px;
  }
}
