:root {
  --accent: #14b8a6;
  --accent-strong: #0d9488;
  --accent-soft: rgba(20, 184, 166, 0.12);
  --bg: #f8fafc;
  --bg-alt: #f1f5f9;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --navy: #0f172a;
  --navy-2: #1e293b;
  --shadow: 0 10px 30px -12px rgba(15, 23, 42, 0.18);
  --radius: 16px;
  --font: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- 导航 ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; }
.brand-mark {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), #6366f1);
  color: #fff; font-size: 18px;
}
.nav-links { display: flex; gap: 24px; flex: 1; }
.nav-links a {
  font-size: 14px; color: var(--muted);
  font-weight: 500; transition: color .2s;
}
.nav-links a:hover { color: var(--text); }
.nav-cta {
  padding: 8px 18px; border-radius: 10px;
  background: var(--accent); color: #fff;
  font-size: 14px; font-weight: 600;
  transition: background .2s;
}
.nav-cta:hover { background: var(--accent-strong); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: linear-gradient(160deg, #0f172a 0%, #14354f 55%, #134e4a 100%);
  color: #fff;
  padding: 96px 24px 120px;
  text-align: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(700px 340px at 20% 10%, rgba(20, 184, 166, 0.28), transparent 60%),
    radial-gradient(620px 320px at 85% 30%, rgba(99, 102, 241, 0.30), transparent 60%);
  pointer-events: none;
}
.hero-inner { position: relative; max-width: 760px; margin: 0 auto; }
.hero-avatar {
  width: 120px; height: 120px; margin: 0 auto 24px;
  border-radius: 28px; overflow: hidden;
  border: 3px solid rgba(255,255,255,0.25);
  box-shadow: 0 20px 50px -12px rgba(0,0,0,0.5);
}
.hero-avatar img { width: 100%; height: 100%; object-fit: cover; }
.hero-badge {
  display: inline-block;
  padding: 6px 16px; border-radius: 999px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  font-size: 14px; font-weight: 500; margin-bottom: 18px;
}
.hero-name { font-size: 52px; font-weight: 800; letter-spacing: 1px; }
.hero-tag { font-size: 20px; color: rgba(255,255,255,0.85); margin-top: 10px; }
.hero-meta {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 10px; margin-top: 26px;
}
.hero-meta .chip {
  padding: 7px 14px; border-radius: 10px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.16);
  font-size: 13px;
}
.hero-actions { display: flex; gap: 14px; justify-content: center; margin-top: 34px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 26px; border-radius: 12px;
  font-size: 15px; font-weight: 600; cursor: pointer;
  transition: transform .15s, box-shadow .15s, background .2s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 10px 24px -10px rgba(20,184,166,0.8); }
.btn-primary:hover { background: var(--accent-strong); }
.btn-ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.4); }
.btn-ghost:hover { background: rgba(255,255,255,0.1); }

/* ---------- Section 通用 ---------- */
.section { padding: 80px 24px; }
.section-alt { background: var(--bg-alt); }
.container { max-width: 1120px; margin: 0 auto; }
.section-head { text-align: center; margin-bottom: 46px; }
.section-tag {
  display: inline-block;
  font-size: 12px; font-weight: 700; letter-spacing: 2px;
  color: var(--accent-strong); text-transform: uppercase;
  margin-bottom: 8px;
}
.section-title { font-size: 34px; font-weight: 800; }
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}
.card-title { font-size: 19px; font-weight: 700; margin-bottom: 18px; }

/* ---------- 关于我 ---------- */
.about-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; }
.about-bio p { color: var(--muted); font-size: 16px; }
.about-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 24px; }
.fact { padding: 14px; border-radius: 12px; background: var(--bg-alt); }
.fact-label { font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.fact-value { font-size: 14px; font-weight: 600; word-break: break-all; }

.edu-item { padding: 16px 0; border-bottom: 1px solid var(--border); }
.edu-item:last-child { border-bottom: none; }
.edu-item .edu-school { font-size: 16px; font-weight: 700; }
.edu-item .edu-major { font-size: 14px; color: var(--muted); margin-top: 2px; }
.edu-item .edu-time { font-size: 12px; color: var(--accent-strong); margin-top: 6px; }
.edu-item .edu-desc { font-size: 13px; color: var(--muted); margin-top: 8px; }

/* ---------- 技能 ---------- */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.skill-card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 20px; }
.skill-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.skill-name { font-weight: 700; font-size: 15px; }
.skill-cat { font-size: 12px; color: var(--muted); background: var(--bg-alt); padding: 3px 9px; border-radius: 999px; }
.skill-bar { height: 8px; border-radius: 999px; background: var(--bg-alt); overflow: hidden; }
.skill-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), #6366f1); transition: width .6s ease; }
.skill-level { font-size: 13px; color: var(--muted); margin-top: 8px; text-align: right; }

/* ---------- 项目 ---------- */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.project-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s;
  display: flex; flex-direction: column;
}
.project-card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -16px rgba(15,23,42,0.28); }
.project-cover {
  height: 170px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--navy), #134e4a);
  color: rgba(255,255,255,0.7);
  font-size: 15px; font-weight: 700; letter-spacing: 2px;
}
.project-cover.accent0 { background: linear-gradient(135deg, #134e4a, #14b8a6); }
.project-cover.accent1 { background: linear-gradient(135deg, #312e81, #6366f1); }
.project-cover.accent2 { background: linear-gradient(135deg, #7c2d12, #f59e0b); }
.project-cover.accent3 { background: linear-gradient(135deg, #0f172a, #475569); }
.project-body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.project-title { font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.project-desc { font-size: 14px; color: var(--muted); flex: 1; }
.project-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.project-tags span { font-size: 12px; color: var(--accent-strong); background: var(--accent-soft); padding: 4px 10px; border-radius: 999px; }
.project-link { display: inline-block; margin-top: 16px; font-size: 14px; font-weight: 600; color: var(--accent-strong); }

/* ---------- 博客 ---------- */
.blogs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.blog-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow); cursor: default; transition: transform .2s;
  display: flex; flex-direction: column;
}
.blog-card:hover { transform: translateY(-4px); }
.blog-date { font-size: 13px; color: var(--accent-strong); font-weight: 600; }
.blog-title { font-size: 18px; font-weight: 700; margin: 10px 0; }
.blog-summary { font-size: 14px; color: var(--muted); flex: 1; }
.blog-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.blog-tags span { font-size: 12px; color: var(--muted); background: var(--bg-alt); padding: 3px 10px; border-radius: 999px; }
.blog-read { margin-top: 16px; font-size: 14px; font-weight: 600; color: var(--accent-strong); cursor: pointer; }

/* ---------- 经历时间线 ---------- */
.timeline { max-width: 800px; margin: 0 auto; position: relative; padding-left: 28px; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.tl-item { position: relative; padding: 0 0 30px 20px; }
.tl-item::before {
  content: ""; position: absolute; left: -26px; top: 6px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent); border: 3px solid #fff; box-shadow: 0 0 0 2px var(--accent);
}
.tl-time { font-size: 13px; color: var(--accent-strong); font-weight: 600; }
.tl-role { font-size: 17px; font-weight: 700; margin-top: 4px; }
.tl-org { font-size: 14px; color: var(--muted); margin-top: 2px; }
.tl-desc { font-size: 14px; color: var(--muted); margin-top: 8px; }

/* ---------- 联系 ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.contact-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 24px; display: flex; align-items: center; gap: 16px; box-shadow: var(--shadow);
}
.contact-icon {
  width: 46px; height: 46px; flex: none;
  display: grid; place-items: center; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent-strong);
}
.contact-icon svg { width: 22px; height: 22px; }
.contact-label { font-size: 12px; color: var(--muted); }
.contact-value { font-size: 15px; font-weight: 600; word-break: break-all; }

/* ---------- 页脚 ---------- */
.footer { border-top: 1px solid var(--border); background: #fff; padding: 28px 24px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-inner p { font-size: 13px; color: var(--muted); }
.footer-admin { font-size: 13px; color: var(--muted); transition: color .2s; }
.footer-admin:hover { color: var(--accent-strong); }

/* ---------- 弹窗 ---------- */
.modal {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(15, 23, 42, 0.55);
  display: flex; align-items: center; justify-content: center;
  padding: 24px; animation: fadeIn .2s ease;
}
.modal-card {
  background: var(--card); border-radius: var(--radius);
  max-width: 720px; width: 100%; max-height: 84vh; overflow: auto;
  padding: 34px; position: relative;
}
.modal-close {
  position: absolute; top: 16px; right: 18px;
  border: none; background: var(--bg-alt); color: var(--muted);
  width: 34px; height: 34px; border-radius: 10px; font-size: 20px; cursor: pointer;
}
.modal-card h2 { font-size: 24px; margin: 8px 0 18px; }
.blog-content p { color: var(--muted); font-size: 15px; margin-bottom: 14px; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .hero-name { font-size: 40px; }
  .about-grid { grid-template-columns: 1fr; }
  .section-title { font-size: 28px; }
  .nav-links { display: none; }
}
@media (max-width: 560px) {
  .hero { padding: 64px 20px 84px; }
  .hero-name { font-size: 32px; }
  .hero-tag { font-size: 17px; }
  .about-facts { grid-template-columns: 1fr; }
}