/* ===== Reset & Base ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-bg: #faf8f5;
  --color-surface: #ffffff;
  --color-text: #2c2c2c;
  --color-text-muted: #6b6b6b;
  --color-accent: #c8860a;
  --color-accent-light: #f5e6c8;
  --color-accent-dark: #9a6808;
  --color-border: #e8e4df;
  --font-serif: "Georgia", "Noto Serif SC", "Source Han Serif SC", serif;
  --font-sans: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --radius: 12px;
  --max-width: 960px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--color-accent-dark);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--color-accent);
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Header ===== */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-text);
  font-weight: 600;
  font-size: 1.05rem;
}

.logo:hover {
  color: var(--color-accent-dark);
}

.logo-icon {
  font-size: 1.3rem;
}

.nav {
  display: flex;
  gap: 28px;
}

.nav-link {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-accent-dark);
}

.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-accent);
  border-radius: 1px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}

/* ===== Hero ===== */
.hero {
  padding: 72px 0 56px;
  text-align: center;
  background: linear-gradient(180deg, var(--color-accent-light) 0%, var(--color-bg) 100%);
}

.hero-greeting {
  color: var(--color-accent-dark);
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}

.hero-desc {
  max-width: 560px;
  margin: 0 auto 20px;
  color: var(--color-text-muted);
  font-size: 1.05rem;
  line-height: 1.8;
}

.hero-meta {
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.hero-meta .dot {
  margin: 0 8px;
}

/* ===== Posts Section ===== */
.posts-section {
  padding: 56px 0;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  margin-bottom: 32px;
  color: var(--color-text);
}

.posts-grid {
  display: grid;
  gap: 24px;
}

.post-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px 32px;
  transition: box-shadow 0.2s, transform 0.2s;
}

.post-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.post-date {
  display: block;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 10px;
}

.post-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  margin-bottom: 12px;
}

.post-title a {
  color: var(--color-text);
}

.post-title a:hover {
  color: var(--color-accent-dark);
}

.post-excerpt {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin-bottom: 16px;
  line-height: 1.75;
}

.read-more {
  font-size: 0.875rem;
  font-weight: 500;
}

/* ===== About Preview ===== */
.about-preview {
  padding: 56px 0 72px;
}

.about-preview-inner {
  display: flex;
  align-items: center;
  gap: 40px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 40px;
}

.about-preview-text h2 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  margin-bottom: 12px;
}

.about-preview-text p {
  color: var(--color-text-muted);
  margin-bottom: 20px;
  line-height: 1.8;
}

.about-preview-avatar {
  flex-shrink: 0;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-accent-light), var(--color-accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-accent-dark);
}

.btn {
  display: inline-block;
  padding: 10px 24px;
  background: var(--color-accent);
  color: #fff;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.2s;
}

.btn:hover {
  background: var(--color-accent-dark);
  color: #fff;
}

/* ===== Page Header (inner pages) ===== */
.page-header {
  padding: 56px 0 40px;
  text-align: center;
  background: linear-gradient(180deg, var(--color-accent-light) 0%, var(--color-bg) 100%);
}

.page-header h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  margin-bottom: 8px;
}

.page-header p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

/* ===== Article ===== */
.article-section {
  padding: 40px 0 72px;
}

.article {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 40px 48px;
  max-width: 720px;
  margin: 0 auto;
}

.article-meta {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--color-border);
}

.article h2 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  margin: 32px 0 12px;
  color: var(--color-text);
}

.article h2:first-of-type {
  margin-top: 0;
}

.article p {
  margin-bottom: 16px;
  line-height: 1.85;
  color: var(--color-text);
}

.article blockquote {
  margin: 24px 0;
  padding: 16px 24px;
  background: var(--color-accent-light);
  border-left: 4px solid var(--color-accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--color-text-muted);
  font-style: italic;
}

.article ul {
  margin: 0 0 16px 24px;
  color: var(--color-text);
}

.article li {
  margin-bottom: 8px;
}

.back-link {
  display: inline-block;
  margin-top: 32px;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.back-link:hover {
  color: var(--color-accent-dark);
}

/* ===== About Page ===== */
.about-content {
  padding: 40px 0 72px;
}

.about-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 40px 48px;
}

.about-card h2 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  margin: 32px 0 12px;
}

.about-card h2:first-child {
  margin-top: 0;
}

.about-card p {
  color: var(--color-text-muted);
  margin-bottom: 16px;
  line-height: 1.85;
}

.about-card ul {
  margin: 0 0 16px 24px;
  color: var(--color-text-muted);
}

.about-card li {
  margin-bottom: 8px;
}

.info-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}

.info-table th,
.info-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.95rem;
}

.info-table th {
  width: 120px;
  color: var(--color-text-muted);
  font-weight: 500;
}

/* ===== Contact Page ===== */
.contact-content {
  padding: 40px 0 72px;
}

.contact-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 40px 48px;
  max-width: 600px;
  margin: 0 auto;
}

.contact-card h2 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  margin-bottom: 16px;
}

.contact-card p {
  color: var(--color-text-muted);
  margin-bottom: 24px;
  line-height: 1.85;
}

.contact-list {
  list-style: none;
}

.contact-list li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-muted);
}

.contact-list li:last-child {
  border-bottom: none;
}

.contact-label {
  font-weight: 500;
  color: var(--color-text);
  min-width: 72px;
}

.contact-note {
  margin-top: 32px;
  padding: 16px 20px;
  background: var(--color-accent-light);
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* ===== Footer ===== */
.site-footer {
  margin-top: auto;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 32px 0;
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--color-text);
}

.footer-nav {
  display: flex;
  gap: 20px;
}

.footer-nav a {
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.footer-nav a:hover {
  color: var(--color-accent-dark);
}

.footer-bottom {
  text-align: center;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  line-height: 1.8;
}

.footer-bottom .icp a {
  color: var(--color-text-muted);
}

.footer-bottom .icp a:hover {
  color: var(--color-accent-dark);
}

/* ===== Mobile Nav ===== */
@media (max-width: 640px) {
  .nav-toggle {
    display: flex;
  }

  .nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 8px 0;
    box-shadow: var(--shadow-md);
  }

  .nav.open {
    display: flex;
  }

  .nav-link {
    padding: 12px 24px;
  }

  .nav-link.active::after {
    display: none;
  }

  .hero {
    padding: 48px 0 40px;
  }

  .about-preview-inner {
    flex-direction: column;
    text-align: center;
    padding: 32px 24px;
  }

  .article {
    padding: 28px 24px;
  }

  .about-card,
  .contact-card {
    padding: 28px 24px;
  }

  .footer-top {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}
