:root {
  --bg: #0b0d12;
  --bg-soft: #12151d;
  --card: rgba(255, 255, 255, .04);
  --line: rgba(255, 255, 255, .10);
  --fg: #e8ecf4;
  --muted: #98a2b8;
  --accent: #5b8cff;
  --accent-2: #22d3a6;
  --shadow: 0 12px 40px rgba(0, 0, 0, .45);
  --radius: 16px;
}

html[data-theme="light"] {
  --bg: #f7f8fb;
  --bg-soft: #ffffff;
  --card: rgba(10, 15, 30, .03);
  --line: rgba(10, 15, 30, .10);
  --fg: #131722;
  --muted: #5b6478;
  --accent: #2f6bf0;
  --accent-2: #0f9b78;
  --shadow: 0 12px 32px rgba(20, 30, 60, .10);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

.wrap { width: min(1080px, 92vw); margin: 0 auto; }

.glow {
  position: fixed;
  inset: -30% -10% auto -10%;
  height: 70vh;
  background:
    radial-gradient(45% 55% at 20% 30%, color-mix(in srgb, var(--accent) 42%, transparent), transparent 70%),
    radial-gradient(40% 50% at 80% 10%, color-mix(in srgb, var(--accent-2) 34%, transparent), transparent 70%);
  filter: blur(70px);
  opacity: .45;
  pointer-events: none;
  z-index: 0;
}

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease;
}
.nav.scrolled { border-bottom-color: var(--line); }

.nav-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 62px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 650;
  letter-spacing: .2px;
}

.dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 14px color-mix(in srgb, var(--accent) 70%, transparent);
}

.links { margin-left: auto; display: flex; gap: 4px; }
.links a {
  padding: 7px 13px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 14.5px;
  transition: color .2s, background .2s;
}
.links a:hover, .links a.active { color: var(--fg); background: var(--card); }

.theme {
  width: 38px; height: 38px;
  flex: 0 0 auto;                 /* 窄屏下不被其他元素挤扁 */
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--card);
  color: var(--fg);
  font-size: 16px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: transform .2s, border-color .2s;
}
/* 旋转只给真正有 hover 能力的设备（鼠标）。
   手机上 :hover 会在点按后一直粘住，表现就是「按钮倾斜后不回正」。 */
@media (hover: hover) and (pointer: fine) {
  .theme:hover { transform: rotate(-18deg); border-color: var(--accent); }
}
/* 触屏的即时反馈改用 :active，手指松开会自动还原 */
.theme:active { transform: scale(.92); }

/* ---------- hero ---------- */
.hero { position: relative; z-index: 1; padding: clamp(56px, 12vh, 130px) 0 40px; }

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: .12em;
  font-size: 13.5px;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(38px, 8.4vw, 76px);
  line-height: 1.06;
  letter-spacing: -.02em;
  font-weight: 750;
}
.hero h1 .accent { color: var(--accent); }

.lead {
  max-width: 640px;
  margin: 18px 0 0;
  font-size: clamp(15.5px, 2.3vw, 18.5px);
  color: var(--muted);
}

.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.btn {
  display: inline-flex;
  align-items: center;
  padding: 11px 20px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 15px;
  font-weight: 550;
  transition: transform .18s, border-color .18s, background .18s;
}
.btn:hover { transform: translateY(-2px); border-color: var(--accent); }

.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
  color: #fff;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 30px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--muted);
  font-size: 13.5px;
}

.pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent-2) 70%, transparent);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent-2) 65%, transparent); }
  70%  { box-shadow: 0 0 0 11px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* ---------- sections ---------- */
.section { padding: 46px 0; position: relative; z-index: 1; }

.section h2 {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 20px;
  font-size: clamp(20px, 3.4vw, 26px);
  letter-spacing: -.01em;
}
.section h2 .num {
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .1em;
}

.card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  backdrop-filter: blur(6px);
  box-shadow: var(--shadow);
}
.card p { margin: 0 0 12px; color: var(--muted); }
.card p:last-child { margin-bottom: 0; }
.card strong { color: var(--fg); font-weight: 600; }

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}
.facts li {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 13.5px;
}
.facts span { color: var(--muted); }
.facts b { font-weight: 600; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.project { transition: transform .22s ease, border-color .22s ease; }
.project:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.project h3 { margin: 0 0 8px; font-size: 17.5px; }
.project p { font-size: 14.6px; }

.tags, .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tags { margin-top: 14px; }
.tags span {
  font-size: 12.5px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
}

.chips span {
  padding: 8px 15px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 14px;
  transition: transform .18s, border-color .18s;
}
.chips span:hover { transform: translateY(-2px); border-color: var(--accent-2); }

.contact .links-row { display: flex; flex-wrap: wrap; gap: 12px; }

.footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;          /* 免责声明要单独占一行 */
  gap: 10px;
  padding: 34px 0 46px;
  color: var(--muted);
  font-size: 14px;
  position: relative;
  z-index: 1;
}
.footer a:hover { color: var(--fg); }
.foot-note { flex: 1 1 100%; font-size: 12.5px; opacity: .85; line-height: 1.6; }
.sep { opacity: .5; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

@media (max-width: 640px) {
  .links { display: none; }
  .card { padding: 20px; }
}
