/* ============ 基础变量与重置 ============ */
:root {
  --primary: #c15353;        /* 柔和红（主色） */
  --primary-dark: #a63f3f;   /* 悬停加深 */
  --primary-soft: #f9eeee;   /* 主色浅底 */
  --bg: #fafafa;             /* 页面浅灰背景 */
  --surface: #ffffff;        /* 卡片/栏白色 */
  --text: #33363f;           /* 深灰文字 */
  --muted: #7a7f8c;          /* 次要文字 */
  --border: #ececec;         /* 分隔线 */
  --shadow: 0 6px 24px rgba(0, 0, 0, .06);
  --radius: 16px;
}

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

html { scroll-behavior: smooth; }

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

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { display: block; max-width: 100%; }

.container { width: min(960px, 92%); margin: 0 auto; }

section { padding: 88px 0; }

.section-title {
  font-size: 1.9rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
  letter-spacing: .5px;
}
.section-sub {
  text-align: center;
  color: var(--muted);
  margin-bottom: 48px;
}
.section-title::after {
  content: "";
  display: block;
  width: 48px; height: 3px;
  background: var(--primary);
  border-radius: 2px;
  margin: 14px auto 0;
}

/* ============ 顶部导航栏 ============ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.navbar.scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .05);
}

.nav-inner {
  width: min(960px, 92%);
  margin: 0 auto;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: .5px;
}
.logo span { color: var(--text); }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-menu a {
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--text);
  font-size: .95rem;
  font-weight: 500;
  transition: color .25s, background .25s;
}
.nav-menu a:hover { color: var(--primary); background: var(--primary-soft); }
.nav-menu a.active { color: var(--primary); background: var(--primary-soft); font-weight: 600; }

/* 汉堡按钮（手机端） */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--text);
  cursor: pointer;
  padding: 6px;
}

/* ============ 首页 / Hero ============ */
#home {
  padding-top: 160px;
  padding-bottom: 96px;
  text-align: center;
}

.avatar {
  width: 140px; height: 140px;
  margin: 0 auto 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d97a7a, var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 3.4rem;
  font-weight: 800;
  box-shadow: 0 0 0 6px #fff, 0 12px 28px rgba(193, 83, 83, .28);
  user-select: none;
}

.name {
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: 1px;
}
.tagline {
  color: var(--muted);
  font-size: 1.15rem;
  margin-top: 10px;
}
.tagline .accent { color: var(--primary); font-weight: 600; }

.socials {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 32px;
}
.socials a {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--muted);
  transition: all .25s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.socials a:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  transform: translateY(-3px);
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 40px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .25s ease;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(193,83,83,.3); }
.btn-outline { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-outline:hover { background: var(--primary-soft); transform: translateY(-2px); }

/* ============ 关于我 ============ */
.about-text {
  max-width: 720px;
  margin: 0 auto 48px;
  text-align: center;
  color: var(--muted);
  font-size: 1.02rem;
}
.about-text strong { color: var(--text); }

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform .25s ease, box-shadow .25s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 12px 32px rgba(0,0,0,.1); }
.card i {
  font-size: 1.9rem;
  color: var(--primary);
  margin-bottom: 14px;
}
.card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: .93rem; }

/* ============ 联系我 ============ */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}
.contact-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  box-shadow: var(--shadow);
}
.contact-item i {
  font-size: 1.7rem;
  color: var(--primary);
  margin-bottom: 12px;
}
.contact-item .label { font-size: .85rem; color: var(--muted); margin-bottom: 4px; }
.contact-item .value { font-weight: 600; word-break: break-all; }
.contact-item a.value:hover { color: var(--primary); }

.contact-cta { text-align: center; }

/* ============ 页脚 ============ */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 28px 0;
  text-align: center;
  color: var(--muted);
  font-size: .92rem;
}
footer .heart { color: var(--primary); }

/* ============ 滚动渐显动画 ============ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ============ 响应式 ============ */
@media (max-width: 768px) {
  section { padding: 64px 0; }
  #home { padding-top: 130px; }
  .name { font-size: 2.2rem; }

  .nav-toggle { display: block; }
  .nav-menu {
    position: absolute;
    top: 64px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 12px 24px rgba(0,0,0,.08);
    padding: 12px 16px;
    display: none;
  }
  .nav-menu.open { display: flex; }
  .nav-menu a { padding: 12px 16px; border-radius: 10px; }

  .cards, .contact-grid { grid-template-columns: 1fr; }
  .avatar { width: 118px; height: 118px; font-size: 2.8rem; }
}
