/* 万象新语 - 主样式 */

:root {
  --bg: #fafaf8;
  --card: #ffffff;
  --text: #2c2c2c;
  --muted: #6b6b6b;
  --border: #e5e4e0;
  --accent: #4a6741;
  --accent-light: #e8f0e4;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
}

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

html { font-size: 17px; scroll-behavior: smooth; }

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

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

/* 顶部导航 */
header {
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

nav {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
}

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

.nav-links { display: flex; gap: 28px; list-style: none; }

.nav-links a {
  color: var(--muted);
  font-size: 0.92rem;
  transition: color 0.15s;
}

.nav-links a:hover { color: var(--text); text-decoration: none; }

/* 主体 */
main { max-width: 960px; margin: 0 auto; padding: 0 24px; }

/* 英雄区域 */
.hero {
  text-align: center;
  padding: 72px 0 56px;
}

.hero h1 {
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-bottom: 16px;
  color: var(--text);
}

.hero h1 span { color: var(--accent); }

.hero .subtitle {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto 32px;
}

.hero .tagline {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent);
  padding: 6px 20px;
  border-radius: 20px;
  font-size: 0.88rem;
}

/* 功能区卡片 */
.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 48px 0 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 48px;
}

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

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

.feature-card .icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 16px;
}

.feature-card .icon.notes { background: #eff6ff; }
.feature-card .icon.gallery { background: #fef3c7; }
.feature-card .icon.projects { background: #f0fdf4; }
.feature-card .icon.about { background: #faf5ff; }

.feature-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.feature-card p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

/* 笔记列表 */
.note-list { display: grid; gap: 16px; margin-bottom: 48px; }

.note-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  box-shadow: var(--shadow);
}

.note-item time {
  font-size: 0.8rem;
  color: var(--muted);
}

.note-item h3 { margin: 6px 0 8px; font-size: 1.1rem; }

.note-item .tags { display: flex; gap: 8px; flex-wrap: wrap; }

.note-item .tag {
  font-size: 0.75rem;
  background: var(--accent-light);
  color: var(--accent);
  padding: 2px 10px;
  border-radius: 12px;
}

/* 图库 */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 48px;
}

.gallery-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.gallery-item .img-placeholder {
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--muted);
}

.gallery-item .img-placeholder.c1 { background: #eff6ff; }
.gallery-item .img-placeholder.c2 { background: #fef3c7; }
.gallery-item .img-placeholder.c3 { background: #f0fdf4; }
.gallery-item .img-placeholder.c4 { background: #faf5ff; }
.gallery-item .img-placeholder.c5 { background: #fff1f2; }
.gallery-item .img-placeholder.c6 { background: #f5f3ff; }

.gallery-item .caption {
  padding: 12px;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}

/* 项目 */
.project-list { display: grid; gap: 16px; margin-bottom: 48px; }

.project-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  box-shadow: var(--shadow);
}

.project-item h3 { margin-bottom: 8px; }
.project-item .meta { font-size: 0.85rem; color: var(--muted); margin-bottom: 8px; }
.project-item .tech-stack { display: flex; gap: 8px; flex-wrap: wrap; }
.project-item .tech { font-size: 0.75rem; background: #e8e8e4; color: #555; padding: 3px 10px; border-radius: 12px; }

/* 关于页 */
.about-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  margin-bottom: 48px;
}

.about-section h2 { margin-bottom: 16px; }

.about-section p { color: var(--muted); margin-bottom: 12px; font-size: 0.95rem; }

/* 页脚 */
footer {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 24px 40px;
  text-align: center;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
}

footer .icp { margin-top: 8px; }
footer .icp a { color: var(--muted); }

/* 页面标题 */
.page-header {
  text-align: center;
  padding: 48px 0 32px;
}

.page-header h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.page-header p {
  color: var(--muted);
  max-width: 480px;
  margin: 0 auto;
}

/* 响应式 */
@media (max-width: 640px) {
  html { font-size: 15px; }

  nav { height: 48px; }

  .nav-links { gap: 16px; }

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

  .hero h1 { font-size: 2rem; }

  .features {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-section { padding: 20px; }
}
