/* ============================================================
  Aalizzwell 数字工作台 · 样式表
  设计目标：Apple 官网级 · 极简 · 高级 · 科技感 · 大量留白
  ------------------------------------------------------------
  目录：
    1. 设计变量（明 / 暗双主题，黑白灰体系）
    2. 基础重置 & 排版（系统字体栈，原生 Apple 质感）
    3. 通用组件（按钮 /  eyebrow / 大标题）
    4. 导航栏
    5. Hero（空间舞台 + 玻璃核心 + 轨道）
    6. 关于（专注方向卡片）
    7. 项目（Bento 网格大卡）
    8. 工作台 Dock
    9. 品牌 & 关键词
   10. 联系 & 页脚
   11. 滚动淡入动画
   12. 响应式（移动端优先）
============================================================ */

/* ---------- 1. 设计变量 ---------- */
:root {
  /* 浅色（Apple 风格） */
  --bg: #fbfbfd;
  --bg-alt: #f5f5f7;
  --surface: #ffffff;
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #86868b;
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.14);
  --accent: #0071e3;                /* Apple 蓝，仅用于链接与关键操作 */
  --accent-hover: #0077ed;
  --nav-bg: rgba(251, 251, 253, 0.72);
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.04), 0 12px 40px rgba(0, 0, 0, 0.06);
  --shadow-card-hover: 0 4px 16px rgba(0, 0, 0, 0.06), 0 24px 64px rgba(0, 0, 0, 0.1);
  --glass: rgba(255, 255, 255, 0.6);
  --name-gradient: linear-gradient(180deg, #1d1d1f 20%, #6e6e73 100%);
  --hero-glow: radial-gradient(ellipse 60% 45% at 50% 0%, rgba(0, 113, 227, 0.05), transparent 70%);
}

[data-theme="dark"] {
  --bg: #000000;
  --bg-alt: #101012;
  --surface: #161617;
  --text: #f5f5f7;
  --text-2: #a1a1a6;
  --text-3: #6e6e73;
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.18);
  --accent: #2997ff;
  --accent-hover: #47a3ff;
  --nav-bg: rgba(0, 0, 0, 0.68);
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.4), 0 12px 40px rgba(0, 0, 0, 0.5);
  --shadow-card-hover: 0 4px 16px rgba(0, 0, 0, 0.5), 0 24px 64px rgba(0, 0, 0, 0.6);
  --glass: rgba(22, 22, 23, 0.55);
  --name-gradient: linear-gradient(180deg, #ffffff 20%, #86868b 100%);
  --hero-glow: radial-gradient(ellipse 60% 45% at 50% 0%, rgba(41, 151, 255, 0.08), transparent 70%);
}

/* ---------- 2. 基础重置 & 排版 ---------- */
*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
  -webkit-text-size-adjust: 100%;
}

body {
  /* 原生系统字体栈：在 iPhone / Mac 上即为 SF Pro，加载零成本 */
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Helvetica Neue", "PingFang SC", "Source Han Sans SC", "Microsoft YaHei", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;   /* iOS 点击无灰闪 */
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
}

img, svg { display: block; }
a { color: inherit; text-decoration: none; }
ul, ol, dl { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

.container {
  width: 100%;
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: max(22px, env(safe-area-inset-left)); /* 适配刘海屏 */
}

::selection { background: var(--accent); color: #fff; }

/* ---------- 3. 通用组件 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 980px;                       /* Apple 胶囊按钮 */
  font-size: 1rem;
  font-weight: 500;
  padding: 13px 30px;
  transition: transform 0.3s cubic-bezier(0.28, 0.84, 0.42, 1), background-color 0.25s ease, opacity 0.25s;
}
.btn:active { transform: scale(0.96); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  min-width: 132px;
}
.btn-primary:hover { background: var(--accent-hover); transform: scale(1.03); }

.btn-link {
  color: var(--accent);
  padding-inline: 14px;
}
.btn-link:hover .chevron { transform: translateX(3px); }
.chevron {
  display: inline-block;
  font-weight: 600;
  transition: transform 0.25s ease;
}

.eyebrow {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 18px;
}

.headline {
  font-size: clamp(1.9rem, 5.2vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 20px;
}

.lede {
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  color: var(--text-2);
  max-width: 620px;
  line-height: 1.7;
}

.grad {
  background: linear-gradient(100deg, var(--text) 30%, var(--text-3) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section { padding: clamp(84px, 12vw, 140px) 0; }
.section-alt { background: var(--bg-alt); }

/* ---------- 4. 导航栏 ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background-color 0.4s ease;
}
.nav.scrolled { border-bottom-color: var(--border); }

.nav-inner {
  max-width: 1080px;
  margin-inline: auto;
  height: 56px;
  padding-inline: max(22px, env(safe-area-inset-left));
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -0.02em;
  transition: opacity 0.2s;
}
.nav-logo:hover { opacity: 0.7; }

.nav-links {
  display: none;
  position: absolute;
  top: 56px;
  left: 0;
  right: 0;
  flex-direction: column;
  gap: 2px;
  padding: 10px 22px calc(18px + env(safe-area-inset-bottom));
  background: var(--nav-bg);
  backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  border-bottom: 1px solid var(--border);
}
.nav-links.open { display: flex; }

.nav-link {
  display: block;
  padding: 11px 12px;
  border-radius: 10px;
  font-size: 0.92rem;
  color: var(--text-2);
  transition: color 0.2s, background-color 0.2s;
}
.nav-link:hover,
.nav-link.active { color: var(--text); background: rgba(128, 128, 128, 0.1); }

.theme-toggle {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--text-2);
  transition: background-color 0.2s, color 0.2s, transform 0.3s ease;
}
.theme-toggle:hover { background: rgba(128, 128, 128, 0.12); color: var(--text); transform: rotate(18deg); }
.theme-toggle svg { width: 17px; height: 17px; }
[data-theme="light"] .icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }

.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  width: 36px;
  height: 36px;
}
.hamburger span {
  display: block;
  width: 18px;
  height: 1.6px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.hamburger.open span:nth-child(1) { transform: translateY(3.8px) rotate(45deg); }
.hamburger.open span:nth-child(2) { transform: translateY(-3.8px) rotate(-45deg); }

/* ---------- 5. Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;                          /* iPhone Safari 动态工具栏适配 */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(96px + env(safe-area-inset-top)) 22px 64px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: var(--hero-glow);
}

.hero-inner { position: relative; z-index: 2; }

.hero-eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--text-3);
  margin-bottom: 22px;
}

/* 品牌名：整页视觉核心 */
.hero-name {
  font-size: clamp(3.2rem, 13vw, 7.5rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.02;
  background: var(--name-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 26px;
}

.hero-tagline {
  font-size: clamp(1.25rem, 3.4vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.4;
  margin-bottom: 16px;
}
.hero-tagline strong { font-weight: 700; }
.hero-axes { color: var(--text-2); font-weight: 500; font-size: 0.82em; }
.hero-axes em { font-style: normal; color: var(--text-3); margin-inline: 2px; }

.hero-intro {
  font-size: clamp(0.98rem, 2.4vw, 1.12rem);
  color: var(--text-2);
  margin-bottom: 34px;
}
.br-mobile { display: none; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 72px;
}

/* 空间舞台：玻璃核心 + 轨道 */
.hero-stage {
  position: relative;
  z-index: 1;
  width: min(420px, 78vw);
  aspect-ratio: 1;
  margin-top: -8px;
}
.stage-space {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  perspective: 1000px;
}

/* 玻璃核心 */
.core {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 34%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.05)),
    var(--glass);
  border: 1px solid var(--border-strong);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.35),
    0 24px 60px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: core-float 7s ease-in-out infinite;
}
[data-theme="dark"] .core {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02)),
    var(--glass);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.14),
    0 24px 60px rgba(0, 0, 0, 0.55);
}
.core-letter {
  font-size: clamp(2rem, 8vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  background: var(--name-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
@keyframes core-float {
  0%, 100% { transform: translate(-50%, -50%) translateY(0); }
  50% { transform: translate(-50%, -50%) translateY(-12px); }
}

/* 轨道环 */
.orbit {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--border);
}
.orbit-outer { animation: orbit-spin 36s linear infinite; }
.orbit-inner {
  inset: 19%;
  animation: orbit-spin 22s linear infinite reverse;
}
@keyframes orbit-spin { to { transform: rotate(360deg); } }

.orbit-node {
  position: absolute;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-card);
}
.node-a { width: 14px; height: 14px; top: -7px; left: calc(50% - 7px); }
.node-b { width: 9px; height: 9px; bottom: 6%; right: 8%; }
.node-c { width: 11px; height: 11px; top: 8%; left: 4%; }

/* 地面投影，营造空间感 */
.stage-shadow {
  position: absolute;
  left: 50%;
  bottom: -6%;
  width: 46%;
  height: 22px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.16), transparent 70%);
  filter: blur(6px);
  animation: shadow-breathe 7s ease-in-out infinite;
}
[data-theme="dark"] .stage-shadow { background: radial-gradient(ellipse, rgba(0, 0, 0, 0.6), transparent 70%); }
@keyframes shadow-breathe {
  0%, 100% { transform: translateX(-50%) scaleX(1); opacity: 1; }
  50% { transform: translateX(-50%) scaleX(0.86); opacity: 0.7; }
}

/* ---------- 6. 关于 ---------- */
.focus-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
  margin-top: 56px;
}
.focus-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 30px 28px;
  box-shadow: var(--shadow-card);
  transition: transform 0.35s cubic-bezier(0.28, 0.84, 0.42, 1), box-shadow 0.35s ease;
}
.focus-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-card-hover); }
.focus-icon {
  width: 26px;
  height: 26px;
  color: var(--text);
  margin-bottom: 18px;
}
.focus-card h3 {
  font-size: 1.06rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.focus-card p { font-size: 0.92rem; color: var(--text-2); }

/* ---------- 7. 项目（Bento 网格） ---------- */
.project-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
  margin-top: 56px;
}
.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 26px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.4s cubic-bezier(0.28, 0.84, 0.42, 1), box-shadow 0.4s ease;
}
.project-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-card-hover); }

.project-info { padding: 34px 32px 30px; position: relative; z-index: 2; }
.project-featured .project-info { padding: 40px 36px 32px; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 980px;
  margin-bottom: 20px;
}
.status-soon {
  color: var(--text-2);
  background: rgba(128, 128, 128, 0.12);
  border: 1px solid var(--border);
}
.status-active {
  color: #0a7d33;
  background: rgba(48, 209, 88, 0.12);
  border: 1px solid rgba(48, 209, 88, 0.25);
}
[data-theme="dark"] .status-active { color: #30d158; }
.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: live-pulse 2s ease-out infinite;
}
@keyframes live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(48, 209, 88, 0.5); }
  100% { box-shadow: 0 0 0 7px rgba(48, 209, 88, 0); }
}

.project-title {
  font-size: clamp(1.5rem, 3.4vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-bottom: 6px;
}
.project-featured .project-title { font-size: clamp(1.8rem, 4.4vw, 2.6rem); }
.project-sub {
  font-size: 0.95rem;
  color: var(--text-3);
  font-weight: 500;
  margin-bottom: 16px;
}
.project-desc {
  font-size: 1rem;
  color: var(--text-2);
  max-width: 460px;
  margin-bottom: 22px;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--accent);
  font-weight: 500;
  font-size: 0.98rem;
  transition: opacity 0.2s;
}
.project-link:hover { opacity: 0.75; }
.project-link:hover .chevron { transform: translateX(3px); }

/* 项目视觉区（纯 CSS 抽象图形，克制不炫光） */
.project-visual {
  position: relative;
  min-height: 220px;
  margin: 0 20px 20px;
  border-radius: 18px;
  overflow: hidden;
  background: var(--bg-alt);
  display: grid;
  place-items: center;
}
.project-featured .project-visual { min-height: 260px; }

/* 佐敦：层叠报价单卡片 */
.visual-jotun .visual-card {
  position: absolute;
  width: 46%;
  max-width: 220px;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  transition: transform 0.5s cubic-bezier(0.28, 0.84, 0.42, 1);
}
.visual-jotun .vc-1 { transform: rotate(-7deg) translate(-26%, 6%); }
.visual-jotun .vc-2 { transform: rotate(2deg) translateY(-2%); }
.visual-jotun .vc-3 { transform: rotate(9deg) translate(28%, 4%); }
.project-card:hover .visual-jotun .vc-1 { transform: rotate(-10deg) translate(-34%, 4%); }
.project-card:hover .visual-jotun .vc-2 { transform: rotate(0deg) translateY(-6%); }
.project-card:hover .visual-jotun .vc-3 { transform: rotate(12deg) translate(36%, 6%); }

/* AI Lab：呼吸光环 */
.visual-ai .ai-orb {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, var(--text), var(--text-3) 75%);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
  animation: orb-breathe 4.5s ease-in-out infinite;
}
@keyframes orb-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

/* Tools：应用网格 */
.tools-grid-mini {
  display: grid;
  grid-template-columns: repeat(2, 56px);
  gap: 12px;
}
.tools-grid-mini span {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.project-card:hover .tools-grid-mini span:nth-child(1) { transform: translateY(-6px) rotate(-4deg); }
.project-card:hover .tools-grid-mini span:nth-child(2) { transform: translateY(4px) rotate(3deg); }
.project-card:hover .tools-grid-mini span:nth-child(3) { transform: translateY(4px) rotate(-3deg); }
.project-card:hover .tools-grid-mini span:nth-child(4) { transform: translateY(-6px) rotate(4deg); }

/* ---------- 8. 工作台 Dock ---------- */
#ecosystem { text-align: center; }
#ecosystem .lede { margin-inline: auto; }

.dock-wrap {
  margin-top: 64px;
  display: flex;
  justify-content: center;
  padding-inline: 12px;
}
.dock {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 26px;
  background: var(--glass);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
}
.dock-item {
  position: relative;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 15px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transform-origin: bottom center;
  transition: transform 0.18s ease-out, box-shadow 0.25s ease;
  will-change: transform;
}
.dock-item svg { width: 24px; height: 24px; }
.dock-more { color: var(--text-3); border-style: dashed; }

/* hover 提示气泡（桌面端） */
.dock-item::after {
  content: attr(data-label);
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 500;
  white-space: nowrap;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
@media (hover: hover) {
  .dock-item:hover::after { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.dock-sep {
  width: 1px;
  align-self: stretch;
  margin-block: 8px;
  background: var(--border-strong);
}
.dock-caption {
  margin-top: 26px;
  font-size: 0.88rem;
  color: var(--text-3);
}

/* ---------- 9. 品牌 & 关键词 ---------- */
.brand-inner { text-align: center; }
.brand-meta {
  display: inline-grid;
  gap: 4px;
  margin: 12px 0 64px;
  text-align: left;
}
.meta-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.meta-row dt {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  padding-top: 3px;
}
.meta-row dd { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; }

.keywords {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.keyword {
  position: relative;
  padding: 30px 20px;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: clamp(1.4rem, 3.6vw, 1.9rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  box-shadow: var(--shadow-card);
  transition: transform 0.35s cubic-bezier(0.28, 0.84, 0.42, 1), box-shadow 0.35s ease;
}
.keyword:hover { transform: translateY(-5px); box-shadow: var(--shadow-card-hover); }
.keyword-num {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--text-3);
  margin-bottom: 8px;
}

/* ---------- 10. 联系 & 页脚 ---------- */
.section-contact { text-align: center; }
.contact-inner { display: grid; justify-items: center; }
.contact-email {
  font-size: clamp(1.3rem, 4vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--accent);
  margin: 8px 0 40px;
  border-bottom: 1px solid transparent;
  transition: opacity 0.2s, border-color 0.2s;
  word-break: break-all;
}
.contact-email:hover { opacity: 0.75; border-bottom-color: currentColor; }

.contact-socials { display: flex; align-items: center; gap: 12px; }
.contact-socials a,
.contact-socials button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 46px;
  height: 46px;
  padding-inline: 14px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  box-shadow: var(--shadow-card);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.2s, border-color 0.2s;
}
.contact-socials button { border-radius: 980px; font-size: 0.86rem; font-weight: 500; }
.contact-socials a:hover,
.contact-socials button:hover {
  transform: translateY(-4px);
  color: var(--text);
  border-color: var(--border-strong);
}
.contact-socials svg { width: 19px; height: 19px; }

.footer {
  border-top: 1px solid var(--border);
  padding: 36px 0 calc(36px + env(safe-area-inset-bottom));
  font-size: 0.8rem;
  color: var(--text-3);
}
.footer-inner {
  display: grid;
  gap: 6px;
  justify-items: center;
  text-align: center;
}
.footer-icp a:hover { color: var(--text-2); }

/* ---------- 11. 滚动淡入动画 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0s);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .orbit-outer, .orbit-inner, .core, .stage-shadow, .ai-orb, .live-dot { animation: none !important; }
  * { transition-duration: 0.01ms !important; }
}

/* ---------- 12. 响应式（移动端优先） ---------- */
/* 小屏手机：压缩 Dock 尺寸防止横向溢出（iPhone SE 375px） */
@media (max-width: 480px) {
  .dock { gap: 7px; padding: 10px 12px; border-radius: 22px; }
  .dock-item { width: 44px; height: 44px; border-radius: 12px; }
  .dock-item svg { width: 20px; height: 20px; }
}

@media (min-width: 560px) {
  .br-mobile { display: inline; }
  .keywords { grid-template-columns: repeat(4, 1fr); }
  .focus-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .nav-links {
    display: flex;
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    padding: 0;
    background: none;
    border: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .nav-link { padding: 7px 14px; }
  .hamburger { display: none; }

  .focus-grid { grid-template-columns: repeat(4, 1fr); }

  /* Bento：首卡通栏，其余两卡并排 */
  .project-featured { grid-column: 1 / -1; }
  .project-grid { grid-template-columns: 1fr 1fr; }
  .project-featured {
    flex-direction: row;
    align-items: center;
  }
  .project-featured .project-info { flex: 1.1; padding: 48px 44px; }
  .project-featured .project-visual {
    flex: 1;
    align-self: stretch;
    min-height: 300px;
    margin: 20px 20px 20px 0;
  }

  .footer-inner { grid-template-columns: 1fr auto 1fr; align-items: center; }
  .footer-inner > p:first-child { justify-self: start; }
  .footer-note { justify-self: end; }
}

/* ============================================================
  13. 氛围层：极光 / 粒子画布 / 光标光晕 / 追光卡片
============================================================ */

/* 全局光标光晕（JS 跟随鼠标，触屏设备自动隐藏） */
.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 520px;
  height: 520px;
  margin: -260px 0 0 -260px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.09), transparent 62%);
  opacity: 0;
  transition: opacity 0.6s ease;
  will-change: transform;
}
[data-theme="dark"] .cursor-glow {
  background: radial-gradient(circle, rgba(139, 92, 246, 0.13), transparent 62%);
}
.cursor-glow.on { opacity: 1; }
@media (hover: none) { .cursor-glow { display: none; } }

/* Hero 极光：三团缓慢流动的柔和色雾 */
.hero-bg { overflow: hidden; }
.aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  will-change: transform;
}
.aurora-1 {
  width: 55vmax; height: 55vmax;
  top: -22%; left: -14%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.20), transparent 62%);
  animation: drift-1 26s ease-in-out infinite alternate;
}
.aurora-2 {
  width: 48vmax; height: 48vmax;
  bottom: -26%; right: -12%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.16), transparent 62%);
  animation: drift-2 32s ease-in-out infinite alternate;
}
.aurora-3 {
  width: 34vmax; height: 34vmax;
  top: 28%; right: 22%;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.12), transparent 62%);
  animation: drift-3 22s ease-in-out infinite alternate;
}
[data-theme="dark"] .aurora-1 { background: radial-gradient(circle, rgba(99, 102, 241, 0.28), transparent 62%); }
[data-theme="dark"] .aurora-2 { background: radial-gradient(circle, rgba(139, 92, 246, 0.24), transparent 62%); }
[data-theme="dark"] .aurora-3 { background: radial-gradient(circle, rgba(45, 212, 191, 0.16), transparent 62%); }

@keyframes drift-1 {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(9vw, 6vh) scale(1.15); }
}
@keyframes drift-2 {
  from { transform: translate(0, 0) scale(1.08); }
  to   { transform: translate(-8vw, -7vh) scale(0.95); }
}
@keyframes drift-3 {
  from { transform: translate(0, 0); }
  to   { transform: translate(-10vw, 8vh); }
}

/* 交互粒子画布 */
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* 卡片追光：JS 写入 --mx / --my，光斑跟随鼠标 */
.spotlight { position: relative; }
.spotlight::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 50%), rgba(99, 102, 241, 0.09), transparent 65%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
  z-index: 1;
}
[data-theme="dark"] .spotlight::before {
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 50%), rgba(139, 92, 246, 0.14), transparent 65%);
}
.spotlight:hover::before { opacity: 1; }
.focus-card.spotlight,
.keyword.spotlight { overflow: hidden; }

/* 磁吸按钮：JS 写入位移 */
.magnetic { will-change: transform; }

/* 滚动提示 */
.scroll-hint {
  position: absolute;
  bottom: calc(26px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--text-3);
  z-index: 2;
  transition: color 0.2s;
}
.scroll-hint:hover { color: var(--text); }
.scroll-hint svg {
  width: 15px;
  height: 15px;
  animation: hint-bounce 2.2s ease-in-out infinite;
}
@keyframes hint-bounce {
  0%, 100% { transform: translateY(0); opacity: 0.9; }
  50% { transform: translateY(5px); opacity: 0.5; }
}

/* 减弱动画偏好：关闭氛围动效 */
@media (prefers-reduced-motion: reduce) {
  .aurora, .scroll-hint svg { animation: none !important; }
  .hero-canvas, .cursor-glow { display: none !important; }
}
