:root {
  --bg: #faf8f5;
  --bg-card: #fffcf8;
  --text: #3d3529;
  --text-light: #6b5e4f;
  --accent: #c44f34;
  --accent-hover: #a33d26;
  --gold: #8b6f47;
  --beige: #e8d5c4;
  --border: #e0d6cc;
  --shadow: 0 2px 12px rgba(61, 53, 41, 0.08);
  --max-width: 860px;
  --nav-height: 56px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--nav-height); }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .serif {
  font-family: Georgia, "Noto Serif SC", "Source Han Serif SC", "STSong", serif;
  font-weight: 400;
}

h1 { font-size: 3rem; line-height: 1.3; letter-spacing: -0.02em; }
h2 { font-size: 2rem; margin-bottom: 1.5rem; color: var(--text); }
h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }

p + p { margin-top: 0.75rem; }

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-hover); }

::selection { background: var(--beige); color: var(--text); }

nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-height);
  background: rgba(250, 248, 245, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
}

.nav-inner {
  width: 100%; max-width: var(--max-width);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.5rem;
}

.nav-logo {
  font-family: Georgia, serif;
  font-size: 1.1rem;
  color: var(--text);
  font-style: italic;
}

.nav-links { display: flex; gap: 1.5rem; list-style: none; align-items: center; }
.nav-links a { color: var(--text-light); font-size: 0.9rem; transition: color 0.2s; }
.nav-links a:hover { color: var(--accent); }


section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 5rem 1.5rem;
}

section + section { border-top: 1px solid var(--border); }

.hero {
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center;
  padding-top: var(--nav-height);
}

.hero h1 { margin-bottom: 0.5rem; }
.hero .subtitle { font-size: 1.3rem; color: var(--accent); margin-bottom: 0.75rem; font-family: Georgia, serif; font-style: italic; }
.hero .tagline { font-size: 1rem; color: var(--text-light); max-width: 480px; }
.hero .scroll-hint { margin-top: 3rem; color: var(--gold); font-size: 0.85rem; opacity: 0.7; animation: bounce 2s infinite; }

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

.about-content { max-width: 640px; }
.about-content .highlight { color: var(--accent); }

.skills-grid {
  display: flex; flex-wrap: wrap; gap: 0.6rem;
}

.skill-tag {
  padding: 0.4rem 1rem;
  border: 1px solid var(--border);
  border-radius: 24px;
  font-size: 0.9rem;
  color: var(--text-light);
  background: var(--bg-card);
  transition: all 0.2s;
}
.skill-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 2px 8px rgba(196, 79, 52, 0.1);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  transition: all 0.25s;
}
.project-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  border-color: var(--beige);
}
.project-card h3 { font-size: 1.1rem; }
.project-card p { font-size: 0.9rem; color: var(--text-light); margin-top: 0.4rem; }
.project-card .tag-row { margin-top: 0.75rem; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.project-card .mini-tag {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 12px;
  background: var(--beige);
  color: var(--gold);
}

.blog-preview-list { display: flex; flex-direction: column; gap: 1.2rem; }

.blog-preview {
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--border);
}
.blog-preview:last-child { border-bottom: none; }
.blog-preview time { font-size: 0.8rem; color: var(--gold); }
.blog-preview h3 { margin: 0.25rem 0; }
.blog-preview h3 a { color: var(--text); }
.blog-preview h3 a:hover { color: var(--accent); }
.blog-preview p { font-size: 0.9rem; color: var(--text-light); margin-top: 0.25rem; }

.blog-more {
  display: inline-block; margin-top: 1.5rem;
  padding: 0.5rem 1.5rem;
  border: 1px solid var(--accent); border-radius: 24px;
  color: var(--accent); font-size: 0.9rem;
  transition: all 0.2s;
}
.blog-more:hover { background: var(--accent); color: #fff; }

footer {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-light);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}
footer .heart { color: var(--accent); }

.blog-list { list-style: none; display: flex; flex-direction: column; gap: 2rem; }

.blog-item {
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}
.blog-item:last-child { border-bottom: none; }
.blog-item time { font-size: 0.85rem; color: var(--gold); }
.blog-item h2 { margin: 0.3rem 0 0.5rem; font-size: 1.4rem; }
.blog-item h2 a { color: var(--text); }
.blog-item h2 a:hover { color: var(--accent); }
.blog-item .excerpt { color: var(--text-light); font-size: 0.95rem; }

.article { max-width: 700px; margin: 0 auto; }
.article-header { text-align: center; padding: 3rem 0 2rem; }
.article-header time { color: var(--gold); font-size: 0.85rem; }
.article-body { line-height: 2; }
.article-body p { margin: 1.2rem 0; }
.article-body h2 { font-size: 1.5rem; margin: 2.5rem 0 1rem; }
.article-back { display: inline-block; margin-top: 3rem; font-size: 0.9rem; }

.fade-in {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 640px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  .nav-links { gap: 0.75rem; }
  .nav-links a { font-size: 0.8rem; }
  .hero .subtitle { font-size: 1.05rem; }
  section { padding: 3rem 1.2rem; }
  .projects-grid { grid-template-columns: 1fr; }
}
