/* ===== 设计变量 ===== */
:root {
  --bg: #0b0f1a;
  --bg-alt: #121829;
  --card: #161d30;
  --border: rgba(255, 255, 255, .08);
  --text: #e7ecf5;
  --text-dim: #9aa6c2;
  --primary: #6366f1;
  --primary-soft: rgba(99, 102, 241, .15);
  --grad-1: #6366f1;
  --grad-2: #8b5cf6;
  --radius: 16px;
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, .6);
  --container: 1120px;
}

[data-theme="light"] {
  --bg: #f7f8fc;
  --bg-alt: #ffffff;
  --card: #ffffff;
  --border: rgba(15, 23, 42, .08);
  --text: #1a2235;
  --text-dim: #5b6577;
  --primary: #5b54e0;
  --primary-soft: rgba(91, 84, 224, .1);
  --shadow: 0 10px 30px -14px rgba(15, 23, 42, .18);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background .3s, color .3s;
}

a { color: inherit; text-decoration: none; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* ===== 滚动进度条 ===== */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--grad-1), var(--grad-2));
  z-index: 100; transition: width .1s;
}

/* ===== 导航 ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--bg) 75%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.nav.scrolled { border-bottom-color: var(--border); }
.nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.nav__logo { font-weight: 800; font-size: 1.2rem; letter-spacing: -.02em; }
.nav__links { display: flex; gap: 28px; }
.nav__links a {
  font-size: .92rem; color: var(--text-dim); font-weight: 500;
  transition: color .2s;
}
.nav__links a:hover { color: var(--text); }
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 12px; cursor: pointer;
  background: var(--card); border: 1px solid var(--border); color: var(--text);
  transition: transform .2s, background .2s;
}
.theme-toggle:hover { transform: translateY(-2px); }
.theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }

/* ===== Hero ===== */
.hero {
  position: relative; overflow: hidden;
  padding: 160px 0 120px;
  text-align: center;
}
.hero__badge {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary);
  font-size: .85rem; font-weight: 600; margin-bottom: 24px;
  border: 1px solid color-mix(in srgb, var(--primary) 25%, transparent);
}
.hero__title {
  font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 800;
  letter-spacing: -.03em; line-height: 1.1; margin-bottom: 16px;
}
.grad {
  background: linear-gradient(120deg, var(--grad-1), var(--grad-2));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero__subtitle { font-size: clamp(1.1rem, 2.5vw, 1.5rem); color: var(--text); font-weight: 600; margin-bottom: 14px; }
.hero__desc { color: var(--text-dim); font-size: 1.05rem; max-width: 560px; margin: 0 auto 36px; }
.hero__cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 30px; }
.btn {
  padding: 12px 26px; border-radius: 12px; font-weight: 600; font-size: .95rem;
  transition: transform .2s, box-shadow .2s, background .2s; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn--primary {
  background: linear-gradient(120deg, var(--grad-1), var(--grad-2));
  color: #fff; box-shadow: 0 8px 24px -8px var(--grad-1);
}
.btn--primary:hover { transform: translateY(-3px); box-shadow: 0 12px 30px -8px var(--grad-2); }
.btn--ghost { background: var(--card); color: var(--text); border: 1px solid var(--border); }
.btn--ghost:hover { transform: translateY(-3px); border-color: var(--primary); }
.hero__meta { color: var(--text-dim); font-size: .9rem; display: flex; gap: 10px; justify-content: center; align-items: center; }
.hero__meta .dot { opacity: .5; }
.hero__blob {
  position: absolute; top: -100px; right: -120px; width: 480px; height: 480px;
  background: radial-gradient(circle, var(--primary-soft), transparent 70%);
  filter: blur(40px); z-index: -1;
}

/* ===== 通用区块 ===== */
.section { padding: 96px 0; position: relative; }
.section--alt { background: var(--bg-alt); }
.section__eyebrow {
  text-transform: uppercase; letter-spacing: .15em; font-size: .78rem;
  font-weight: 700; color: var(--primary); margin-bottom: 12px;
}
.section__title { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -.02em; margin-bottom: 14px; }
.section__lead { color: var(--text-dim); max-width: 640px; margin-bottom: 40px; }

/* ===== 关于 ===== */
.about__grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; margin-top: 40px; align-items: start; }
.about__text p { color: var(--text-dim); margin-bottom: 18px; }
.about__text strong { color: var(--text); font-weight: 700; }
.about__text em { color: var(--primary); font-style: normal; font-weight: 700; }
.about__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stat {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px 20px; text-align: center; transition: transform .2s, border-color .2s;
}
.stat:hover { transform: translateY(-4px); border-color: var(--primary); }
.stat__num { display: block; font-size: 2rem; font-weight: 800; letter-spacing: -.02em; color: var(--text); }
.stat__label { font-size: .85rem; color: var(--text-dim); }

/* ===== 技能 ===== */
.skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-top: 40px; }
.skill-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 24px; transition: transform .2s, border-color .2s;
}
.skill-card:hover { transform: translateY(-4px); border-color: var(--primary); }
.skill-card h3 { font-size: 1.15rem; margin-bottom: 18px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags span {
  padding: 6px 12px; border-radius: 999px; font-size: .82rem; font-weight: 500;
  background: var(--primary-soft); color: var(--primary);
  border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent);
}
.tags.small span { font-size: .75rem; padding: 4px 10px; }

/* ===== 作品 ===== */
.projects { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; margin-top: 40px; }
.project-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: transform .25s, box-shadow .25s, border-color .25s;
}
.project-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--primary) 40%, transparent); }
.project-card__cover {
  height: 140px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--c1, var(--grad-1)), var(--c2, var(--grad-2)));
}
.project-card__emoji { font-size: 2.8rem; filter: drop-shadow(0 4px 8px rgba(0,0,0,.25)); }
.project-card__body { padding: 22px 22px 24px; }
.project-card__body h3 { font-size: 1.2rem; margin-bottom: 8px; }
.project-card__body p { color: var(--text-dim); font-size: .92rem; margin-bottom: 14px; }
.project-card__link { display: inline-block; margin-top: 6px; font-weight: 600; color: var(--primary); font-size: .9rem; }
.project-card__link:hover { text-decoration: underline; }

/* ===== 联系 ===== */
.contact { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-top: 40px; }
.contact__card {
  display: flex; align-items: center; gap: 16px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px 22px; transition: transform .2s, border-color .2s;
}
.contact__card:hover { transform: translateY(-4px); border-color: var(--primary); }
.contact__icon { font-size: 2rem; }
.contact__card strong { font-size: .95rem; }
.contact__card div { color: var(--text-dim); font-size: .88rem; }

/* ===== 页脚 ===== */
.footer { border-top: 1px solid var(--border); padding: 32px 0; }
.footer__inner { display: flex; justify-content: space-between; align-items: center; font-size: .88rem; color: var(--text-dim); flex-wrap: wrap; gap: 12px; }
.back-to-top { font-weight: 600; color: var(--primary); }

/* ===== 滚动揭示动画 ===== */
[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .6s, transform .6s; }
[data-reveal].in { opacity: 1; transform: none; }

/* ===== AI理念 ===== */
.philosophy-box {
  max-width: 640px; margin: 0 auto; text-align: center;
  background: linear-gradient(135deg, var(--primary-soft), rgba(139, 92, 246, .08));
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 44px 32px; position: relative;
}
.philosophy-box::before {
  content: '"'; position: absolute; top: 8px; left: 20px;
  font-size: 5rem; line-height: 1; color: var(--primary); opacity: .25;
  font-family: Georgia, serif;
}
.philosophy-line {
  font-size: 1.35rem; font-weight: 700; line-height: 1.6;
  color: var(--text); letter-spacing: .5px;
}
.philosophy-line + .philosophy-line { margin-top: 12px; }
.philosophy-line--sub {
  font-size: 1.1rem; font-weight: 500; color: var(--text-dim); margin-top: 20px !important;
}

/* ===== 发展历程 Timeline ===== */
.timeline {
  position: relative; max-width: 720px; margin: 40px auto 0; padding-left: 40px;
}
.timeline::before {
  content: ''; position: absolute; left: 12px; top: 0; bottom: 0;
  width: 2px; background: linear-gradient(180deg, var(--primary), var(--grad-2), transparent);
}
.timeline-item { position: relative; margin-bottom: 36px; }
.timeline-item:last-child { margin-bottom: 0; }
.timeline-year {
  font-weight: 700; font-size: 1rem; color: var(--primary);
  background: var(--primary-soft); display: inline-block;
  padding: 4px 14px; border-radius: 20px; margin-bottom: 10px;
}
.timeline-dot {
  position: absolute; left: -34px; top: 6px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--primary); border: 3px solid var(--bg);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.timeline-content h3 { font-size: 1.05rem; margin-bottom: 4px; }
.timeline-content p { color: var(--text-dim); font-size: .9rem; }

/* ===== 四大优势 ===== */
.advantages {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px; margin-top: 40px;
}
.advantage-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px 24px; position: relative;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.advantage-card:hover {
  transform: translateY(-4px); border-color: var(--primary);
  box-shadow: 0 12px 32px -12px rgba(99, 102, 241, .3);
}
.advantage-num {
  position: absolute; top: 16px; right: 20px;
  font-size: 2rem; font-weight: 800; color: var(--primary); opacity: .25;
  font-family: Georgia, serif;
}
.advantage-card h3 { font-size: 1.1rem; margin-bottom: 12px; padding-right: 50px; }
.advantage-card p { color: var(--text-dim); font-size: .92rem; line-height: 1.7; }

/* ===== 警示 ===== */
.warning-box {
  max-width: 780px; margin: 0 auto;
  background: linear-gradient(135deg, rgba(239, 68, 68, .12), rgba(245, 158, 11, .08));
  border: 1px solid rgba(239, 68, 68, .3); border-radius: var(--radius);
  padding: 36px 32px; text-align: center;
}
.warning-title {
  font-size: 1.3rem; font-weight: 700; color: #f87171; margin-bottom: 24px;
}
.warning-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px;
}
.warning-item {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 20px 16px;
}
.warning-emoji { font-size: 2rem; display: block; margin-bottom: 10px; }
.warning-item p { font-size: .88rem; color: var(--text-dim); line-height: 1.5; }

/* ===== 底部标语 ===== */
.slogan-box { text-align: center; padding: 20px 0; }
.slogan-main {
  font-size: 1rem; color: var(--text-dim); margin-bottom: 16px;
}
.slogan-big {
  font-size: 2.4rem; font-weight: 800; letter-spacing: 2px;
  background: linear-gradient(90deg, #ef4444, #f59e0b);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.3;
}
.slogan-sep { margin: 0 8px; opacity: .5; }
.slogan-sub {
  font-size: 1.1rem; font-weight: 700; color: var(--primary);
  margin-top: 16px;
}

/* ===== 响应式 ===== */
@media (max-width: 860px) {
  .about__grid { grid-template-columns: 1fr; gap: 32px; }
  .nav__links { display: none; }
  .hero { padding: 130px 0 90px; }
  .philosophy-box { padding: 32px 20px; }
  .philosophy-line { font-size: 1.1rem; }
  .philosophy-line--sub { font-size: .95rem; }
  .slogan-big { font-size: 1.6rem; letter-spacing: 1px; }
  .warning-box { padding: 24px 18px; }
  .warning-title { font-size: 1.05rem; }
  .advantages { grid-template-columns: 1fr; }
}
