/* ==========================================================================
   深空极夜 · iOS 液态玻璃个人网站
   1. 设计令牌   2. 背景    3. 玻璃材质   4. 导航
   5. 首屏       6. 区块    7. 卡片      8. 按钮 / 图标
   9. 动效       10. 响应式 / 无障碍
   ========================================================================== */

/* ─── 1. 设计令牌 ───────────────────────────────────────────────────────── */

:root {
  /* Apple 深色模式系统色 */
  --blue:   10 132 255;
  --indigo: 94 92 230;
  --violet: 150 110 255;
  --mint:   99 230 226;
  --cyan:   100 210 255;
  --pink:   255 55 95;
  --green:  48 209 88;

  --font-ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
             "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --r-card: 26px;
  --r-pill: 999px;
  --shell: 1080px;

  /* Expo-out：iOS 那种「起步快、收尾稳」的手感 */
  --ease: cubic-bezier(.16, 1, .3, 1);
}

/* 深色（默认） */
html[data-theme="dark"] {
  --bg: #05060B;
  --label:   #F7F7FA;
  --label-2: rgb(238 238 248 / .78);
  --label-3: rgb(238 238 248 / .70);

  /* 玻璃表面：比直觉更亮一点，玻璃才「有材质」而不是「一块黑」 */
  --glass-a: rgb(255 255 255 / .135);
  --glass-b: rgb(255 255 255 / .055);
  --glass-solid: #17171C;
  --glass-blur: 20px;
  /* 玻璃内的深色底：亮波光掠过时压住背景，文字才不会糊 */
  --glass-tint: rgb(12 13 20 / .55);
  --on-water-shadow: 0 1px 2px rgb(4 5 12 / .55), 0 2px 14px rgb(4 5 12 / .60), 0 0 44px rgb(4 5 12 / .55);
  --hero-scrim:
    radial-gradient(90% 70% at 22% 46%, rgb(3 4 10 / .62) 0%, rgb(3 4 10 / .30) 46%, transparent 76%),
    linear-gradient(100deg, rgb(3 4 10 / .50) 0%, rgb(3 4 10 / .22) 40%, transparent 70%);

  /* 边缘折光 */
  --edge-a: rgb(255 255 255 / .90);
  --edge-b: rgb(255 255 255 / .12);
  --edge-c: rgb(255 255 255 / .50);
  --sheen:  rgb(255 255 255 / .17);
  --inner-top: rgb(255 255 255 / .26);
  --glow-top: rgb(255 255 255 / .22);

  --fill-1: rgb(255 255 255 / .13);
  --fill-bd: rgb(255 255 255 / .20);
  --fill-2: rgb(255 255 255 / .16);

  --shadow: 0 30px 66px -30px rgb(0 0 0 / .92), 0 2px 10px -4px rgb(0 0 0 / .6);
  --shadow-hi: 0 42px 90px -34px rgb(0 0 0 / .96), 0 3px 14px -4px rgb(0 0 0 / .6);

  --name-a: rgb(255 255 255 / 1);
  --name-b: rgb(255 255 255 / .70);

  --blob-opacity: .78;
  --blob-blend: screen;
  --grid-dot: rgb(255 255 255 / .26);
  --grid-opacity: .60;
  --grain-blend: overlay;
  --grain-opacity: .055;
  --vignette:
    radial-gradient(125% 85% at 50% 32%, transparent 18%, rgb(3 4 10 / .44) 100%),
    linear-gradient(180deg, rgb(3 4 10 / .24) 0%, rgb(3 4 10 / .32) 100%);
  --rule: rgb(255 255 255 / .12);
}

/* 浅色 */
html[data-theme="light"] {
  --bg: #E9ECF3;
  --label:   #14141A;
  --label-2: rgb(38 38 46 / .90);
  --label-3: rgb(38 38 46 / .78);

  --glass-a: rgb(255 255 255 / .78);
  --glass-b: rgb(255 255 255 / .50);
  --glass-solid: #F7F8FA;
  --glass-blur: 20px;
  --glass-tint: rgb(255 255 255 / .12);
  --on-water-shadow: 0 2px 22px rgb(255 255 255 / .9), 0 0 5px rgb(255 255 255 / .7);
  --hero-scrim:
    radial-gradient(90% 70% at 22% 46%, rgb(255 255 255 / .84) 0%, rgb(255 255 255 / .50) 46%, transparent 78%),
    linear-gradient(100deg, rgb(255 255 255 / .72) 0%, rgb(255 255 255 / .34) 40%, transparent 72%);

  --edge-a: rgb(255 255 255 / 1);
  --edge-b: rgb(255 255 255 / .45);
  --edge-c: rgb(255 255 255 / .9);
  --sheen:  rgb(255 255 255 / .95);
  --inner-top: rgb(255 255 255 / 1);
  --glow-top: rgb(255 255 255 / .85);

  --fill-1: rgb(90 92 105 / .13);
  --fill-bd: rgb(90 92 105 / .20);
  --fill-2: rgb(90 92 105 / .17);

  --shadow: 0 28px 56px -30px rgb(24 26 44 / .34), 0 2px 8px -4px rgb(24 26 44 / .12);
  --shadow-hi: 0 36px 70px -32px rgb(24 26 44 / .40), 0 3px 10px -4px rgb(24 26 44 / .14);

  --name-a: rgb(18 18 24 / 1);
  --name-b: rgb(18 18 24 / .62);

  --blob-opacity: .62;
  --blob-blend: normal;
  --grid-dot: rgb(40 44 60 / .34);
  --grid-opacity: .6;
  --grain-blend: multiply;
  --grain-opacity: .035;
  --vignette:
    radial-gradient(130% 78% at 50% 6%, transparent 34%, rgb(120 130 160 / .22) 100%);
  --rule: rgb(0 0 0 / .10);
}

/* ─── 2. 基础 + 背景 ───────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 104px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.6;
  color: var(--label);
  background: transparent;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg { display: block; }
a { -webkit-tap-highlight-color: transparent; }

/* 极光：用径向渐变代替 filter: blur()，软边、几乎不耗 GPU。
   关键 —— 中间必须有颜色，否则玻璃没有东西可以折射，就变成一块黑板。 */
.aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  contain: strict;
}
.blob {
  position: absolute;
  border-radius: 50%;
  opacity: var(--blob-opacity);
  mix-blend-mode: var(--blob-blend);
  will-change: transform;
}
.b1 {
  width: 100vmax; height: 100vmax; top: -44vmax; left: -34vmax;
  background: radial-gradient(circle, rgb(var(--indigo) / 1) 0%, rgb(var(--indigo) / .80) 20%, rgb(var(--indigo) / .26) 44%, transparent 68%);
  animation: drift-a 44s ease-in-out infinite alternate;
}
.b2 {
  width: 88vmax; height: 88vmax; top: -26vmax; right: -34vmax;
  background: radial-gradient(circle, rgb(var(--blue) / .95) 0%, rgb(var(--blue) / .74) 20%, rgb(var(--blue) / .24) 46%, transparent 70%);
  animation: drift-b 54s ease-in-out infinite alternate;
}
.b3 {
  width: 86vmax; height: 86vmax; top: 26vmax; left: -40vmax;
  background: radial-gradient(circle, rgb(var(--cyan) / .78) 0%, rgb(var(--cyan) / .50) 22%, rgb(var(--cyan) / .15) 48%, transparent 72%);
  animation: drift-c 62s ease-in-out infinite alternate;
}
.b4 {
  width: 84vmax; height: 84vmax; bottom: -38vmax; right: -26vmax;
  background: radial-gradient(circle, rgb(var(--pink) / .30) 0%, rgb(var(--pink) / .18) 24%, rgb(var(--pink) / .06) 50%, transparent 74%);
  animation: drift-d 50s ease-in-out infinite alternate;
}
.b5 {
  width: 92vmax; height: 92vmax; top: 50%; left: 50%; margin: -46vmax 0 0 -46vmax;
  background: radial-gradient(circle, rgb(var(--violet) / .58) 0%, rgb(var(--violet) / .34) 24%, rgb(var(--violet) / .10) 50%, transparent 74%);
  animation: drift-e 70s ease-in-out infinite alternate;
}

@keyframes drift-a { from { transform: translate3d(0,0,0) scale(1); }     to { transform: translate3d(8vmax, 7vmax, 0) scale(1.14); } }
@keyframes drift-b { from { transform: translate3d(0,0,0) scale(1.08); }  to { transform: translate3d(-10vmax, 9vmax, 0) scale(.92); } }
@keyframes drift-c { from { transform: translate3d(0,0,0) scale(.94); }   to { transform: translate3d(11vmax, -8vmax, 0) scale(1.18); } }
@keyframes drift-d { from { transform: translate3d(0,0,0) scale(1.10); }  to { transform: translate3d(-8vmax, -6vmax, 0) scale(.90); } }
@keyframes drift-e { from { transform: translate3d(0,0,0) scale(1); }     to { transform: translate3d(-9vmax, 6vmax, 0) scale(1.12); } }

/* 细点阵：给玻璃提供可以「糊掉」的微观结构，磨砂感全靠它 */
.grid-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: var(--grid-opacity);
  background-image: radial-gradient(circle, var(--grid-dot) 1.3px, transparent 1.4px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(145% 105% at 50% 38%, #000 46%, transparent 100%);
          mask-image: radial-gradient(145% 105% at 50% 38%, #000 46%, transparent 100%);
}

/* WebGL 水面：由 water.js 在成功初始化后插入并加上 .has-water */
.water {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
/* 水面接管背景后，CSS 极光退场；点阵调淡，避免和焦散纹理打架 */
html.has-water .aurora { display: none; }
html.has-water .grid-bg { display: none; }

.vignette {
  position: fixed; inset: 0; z-index: 0;
  background: var(--vignette);
  pointer-events: none;
}

.grain {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none;
  opacity: var(--grain-opacity);
  mix-blend-mode: var(--grain-blend);
  background-repeat: repeat;
  background-size: 160px 160px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ─── 3. 玻璃材质 ──────────────────────────────────────────────────────── */

/* 三层叠加才是 iOS 的「材料感」：
   ① 半透明亮面 ② backdrop 模糊 + 高饱和（让背后的颜色渗出来）③ 边缘折光 + 顶内高光 */
.glass {
  position: relative;
  border-radius: var(--r, var(--r-card));
  background:
    radial-gradient(135% 64% at 50% -20%, var(--glow-top), transparent 68%),
    linear-gradient(180deg, var(--glass-a) 0%, var(--glass-b) 100%),
    var(--glass-tint);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(200%) brightness(1.08);
          backdrop-filter: blur(var(--glass-blur)) saturate(200%) brightness(1.08);
  box-shadow:
    inset 0 1px 0 var(--inner-top),
    inset 0 -1px 0 rgb(255 255 255 / .05),
    var(--shadow);
}

/* 高光描边：mask 掏空内部 → 1px 的「边缘折光」，左上最亮、右下回一点光 */
.glass::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: linear-gradient(158deg,
    var(--edge-a) 0%, var(--edge-b) 24%, var(--edge-b) 58%, var(--edge-c) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask-composite: exclude;
  pointer-events: none;
}

/* 指向性反光：跟随指针的一小片镜面高光 */
.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 0%), var(--sheen), transparent 62%);
  opacity: 0;
  transition: opacity .5s ease;
  pointer-events: none;
}
@media (hover: hover) and (pointer: fine) {
  .glass:hover::before { opacity: 1; }
}

/* ─── 4. 顶部导航 ──────────────────────────────────────────────────────── */

.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  max-width: 1180px;
  margin: 0 auto;
  padding: max(14px, env(safe-area-inset-top)) 20px 0;
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }

.brand {
  --r: var(--r-pill);
  grid-column: 1;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 46px;
  padding: 0 17px;
  font-size: .875rem;
  font-weight: 550;
  letter-spacing: -.01em;
  color: var(--label);
  text-decoration: none;
  opacity: 0;
  transform: translateY(-10px) scale(.96);
  transition: opacity .55s var(--ease), transform .55s var(--ease);
}
html.is-scrolled .brand { opacity: 1; transform: none; }

.brand-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgb(var(--cyan)), rgb(var(--indigo)));
  box-shadow: 0 0 10px rgb(var(--cyan) / .9);
}

.nav {
  --r: var(--r-pill);
  grid-column: 2;
  justify-self: center;
  position: relative;
  display: flex;
  align-items: center;
  gap: 2px;
  height: 50px;
  padding: 5px 6px;
}
.nav a {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  height: 40px;
  padding: 0 15px;
  border-radius: var(--r-pill);
  font-size: .9rem;
  font-weight: 500;
  letter-spacing: -.005em;
  color: var(--label-2);
  text-decoration: none;
  white-space: nowrap;
  transition: color .35s var(--ease);
}
.nav a:hover, .nav a.active { color: var(--label); }

.nav-indicator {
  position: absolute;
  top: 5px; left: 0;
  z-index: 1;
  width: 0; height: 40px;
  border-radius: var(--r-pill);
  background: var(--fill-2);
  box-shadow: inset 0 .5px 0 rgb(255 255 255 / .28), inset 0 0 0 .5px var(--fill-bd);
  opacity: 0;
  pointer-events: none;
  transition: transform .55s var(--ease), width .55s var(--ease), opacity .35s ease;
}

.nav-sep {
  flex: none;
  width: 1px;
  height: 20px;
  margin: 0 5px;
  background: var(--rule);
}

.theme {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  padding: 0;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--label-2);
  cursor: pointer;
  transition: color .35s var(--ease), background-color .35s var(--ease), transform .4s var(--ease);
}
.theme:hover { color: var(--label); background: var(--fill-1); }
.theme:active { transform: scale(.92); }
.theme svg { position: absolute; width: 19px; height: 19px; transition: opacity .45s var(--ease), transform .55s var(--ease); }
html[data-theme="dark"]  .i-sun  { opacity: 1; transform: rotate(0)      scale(1);  }
html[data-theme="dark"]  .i-moon { opacity: 0; transform: rotate(-70deg) scale(.5); }
html[data-theme="light"] .i-sun  { opacity: 0; transform: rotate(70deg)  scale(.5); }
html[data-theme="light"] .i-moon { opacity: 1; transform: rotate(0)      scale(1);  }

/* ─── 5. 首屏 ──────────────────────────────────────────────────────────── */

main, .footer { position: relative; z-index: 2; }

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

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 150px 0 110px;
}
/* 首屏文字直接压在动态水面上，局部压暗保证可读（不影响其它区块的水波） */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: var(--hero-scrim);
}
.hero .shell { display: flex; flex-direction: column; align-items: flex-start; }

.chip {
  --r: var(--r-pill);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 30px;
  padding: 9px 17px;
  font-size: .8125rem;
  font-weight: 500;
  letter-spacing: .01em;
  color: var(--label);
}

.pulse {
  position: relative;
  flex: none;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgb(var(--green));
  box-shadow: 0 0 8px rgb(var(--green) / .95);
}
.pulse::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px solid rgb(var(--green) / .6);
  animation: ping 2.4s var(--ease) infinite;
}
@keyframes ping {
  0%   { transform: scale(.6); opacity: 1; }
  70%  { transform: scale(1.5); opacity: 0; }
  100% { transform: scale(1.5); opacity: 0; }
}

.hero-name {
  margin: 0;
  font-size: clamp(2.9rem, 11.5vw, 6.6rem);
  font-weight: 700;
  line-height: .98;
  letter-spacing: -.038em;
  background: linear-gradient(176deg, var(--name-a) 14%, var(--name-b) 100%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  text-wrap: balance;
  /* 渐变裁切文字要用 filter 才吃得到投影 */
  filter: drop-shadow(var(--on-water-shadow));
}

.hero-sub {
  max-width: 30em;
  margin: 26px 0 0;
  font-size: clamp(1.02rem, 1.7vw, 1.18rem);
  line-height: 1.78;
  letter-spacing: .002em;
  color: var(--label-2);
  text-wrap: pretty;
  text-shadow: var(--on-water-shadow);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
}

.socials {
  display: flex;
  gap: 10px;
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: max(34px, env(safe-area-inset-bottom));
  width: 23px; height: 36px;
  border: 1.5px solid var(--label-3);
  border-radius: 12px;
  transform: translateX(-50%);
  opacity: .85;
}
.scroll-cue span {
  position: absolute;
  left: 50%; top: 7px;
  width: 2.5px; height: 7px;
  border-radius: 2px;
  background: var(--label-2);
  transform: translateX(-50%);
  animation: cue 2.4s var(--ease) infinite;
}
@keyframes cue {
  0%   { opacity: 0; transform: translate(-50%, 0); }
  25%  { opacity: 1; }
  75%  { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, 13px); }
}

/* ─── 6. 区块 ──────────────────────────────────────────────────────────── */

.section { padding: 108px 0; }

.section-head { margin-bottom: 40px; }
.eyebrow {
  margin: 0 0 14px;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .18em;
  color: var(--label-3);
  text-shadow: var(--on-water-shadow);
}

h2 {
  margin: 0;
  font-size: clamp(1.7rem, 4.4vw, 2.65rem);
  font-weight: 650;
  line-height: 1.16;
  letter-spacing: -.03em;
  text-wrap: balance;
  text-shadow: var(--on-water-shadow);
}

.about-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 16px;
  align-items: stretch;
}

.card { padding: 28px; }

.facts { display: flex; align-items: center; }
.facts dl { display: grid; gap: 21px; margin: 0; width: 100%; }
.facts dl > div { display: grid; gap: 4px; }
.facts dt {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .14em;
  color: var(--label-3);
}
.facts dd { margin: 0; font-size: .95rem; color: var(--label); }
.facts a { color: rgb(var(--cyan)); text-decoration: none; }
html[data-theme="light"] .facts a { color: rgb(var(--blue)); }
.facts a:hover { text-decoration: underline; text-underline-offset: 3px; }
.facts .ok { display: inline-flex; align-items: center; gap: 8px; }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}
.tags li {
  padding: 8px 16px;
  font-size: .8125rem;
  color: var(--label-2);
  background: var(--fill-1);
  border: .5px solid var(--fill-bd);
  border-radius: var(--r-pill);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
}

/* ─── 7. 卡片 ──────────────────────────────────────────────────────────── */

.about-grid .card p { margin: 0 0 16px; color: var(--label-2); font-size: .9875rem; line-height: 1.78; }
.about-grid .card p:last-child { margin-bottom: 0; }
.about-grid .card p:first-child { color: var(--label); }

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

.project {
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
  transition: transform .55s var(--ease), box-shadow .55s var(--ease);
}
/* 每张卡一个强调色，避免三张卡长得一模一样 */
.cards .project:nth-child(3n+1) { --accent: var(--blue); }
.cards .project:nth-child(3n+2) { --accent: var(--cyan); }
.cards .project:nth-child(3n+3) { --accent: var(--violet); }

.project:hover {
  transform: translateY(-5px);
  box-shadow:
    inset 0 1px 0 var(--inner-top),
    inset 0 -1px 0 rgb(255 255 255 / .05),
    var(--shadow-hi),
    0 0 0 .5px rgb(var(--accent) / .30),
    0 26px 60px -32px rgb(var(--accent) / .70);
}
.project:active { transform: translateY(-2px) scale(.995); }

.num {
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .1em;
  color: rgb(var(--accent, var(--cyan)));
}
.project h3 {
  margin: 12px 0 0;
  font-size: 1.16rem;
  font-weight: 600;
  letter-spacing: -.015em;
}
.project p {
  margin: 9px 0 0;
  font-size: .9375rem;
  line-height: 1.68;
  color: var(--label-2);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}
.chips li {
  padding: 4px 11px;
  font-size: .73rem;
  color: var(--label-2);
  background: var(--fill-1);
  border: .5px solid var(--fill-bd);
  border-radius: var(--r-pill);
}
.more {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: auto;
  padding-top: 20px;
  font-size: .875rem;
  font-weight: 500;
  color: rgb(var(--cyan));
}
html[data-theme="light"] .more { color: rgb(var(--blue)); }
.more .icon { width: 15px; height: 15px; transition: transform .45s var(--ease); }
.project:hover .more .icon { transform: translateX(4px); }

.notes { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.note {
  --r: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 19px 24px;
  color: var(--label);
  text-decoration: none;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.note:hover { transform: translateX(5px); box-shadow: inset 0 1px 0 var(--inner-top), var(--shadow-hi); }
.note-title { flex: 1; font-size: .975rem; letter-spacing: -.005em; }
.note time {
  font-family: var(--font-mono);
  font-size: .76rem;
  color: var(--label-3);
  white-space: nowrap;
}
.note .icon { width: 16px; height: 16px; color: var(--label-3); transition: transform .5s var(--ease), color .3s; }
.note:hover .icon { transform: translateX(4px); color: var(--label); }

.contact {
  display: grid;
  justify-items: center;
  padding: 58px 40px 54px;
  text-align: center;
  overflow: hidden;
}
.contact .eyebrow { margin-bottom: 12px; }
.contact-sub {
  max-width: 40em;
  margin: 16px 0 32px;
  font-size: 1.0125rem;
  line-height: 1.75;
  color: var(--label-2);
}
.contact .socials { margin-top: 26px; }

.footer { padding: 8px 0 56px; }
.footer p {
  margin: 0;
  font-size: .8125rem;
  color: var(--label-3);
  text-align: center;
}

/* ─── 8. 按钮 / 图标 ───────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 48px;
  padding: 0 23px;
  border: 0;
  border-radius: var(--r-pill);
  font-family: inherit;
  font-size: .95rem;
  font-weight: 550;
  letter-spacing: -.005em;
  color: var(--label);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .38s var(--ease), box-shadow .38s var(--ease), background-color .3s;
}
.btn:active { transform: scale(.965); }
.btn.glass, .icon-btn.glass, .chip.glass, .nav.glass { --r: var(--r-pill); }

.btn-primary {
  color: #fff;
  background:
    linear-gradient(180deg, rgb(255 255 255 / .28), rgb(255 255 255 / 0) 58%),
    rgb(var(--blue));
  box-shadow:
    inset 0 .5px 0 rgb(255 255 255 / .6),
    0 12px 30px -10px rgb(var(--blue) / .85);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 .5px 0 rgb(255 255 255 / .6),
    0 16px 40px -10px rgb(var(--blue) / 1);
}
.btn-primary:active { transform: scale(.965); }
.btn-lg { height: 54px; padding: 0 29px; font-size: 1rem; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  color: var(--label-2);
  text-decoration: none;
  transition: color .35s var(--ease), transform .45s var(--ease), box-shadow .45s var(--ease);
}
.icon-btn:hover {
  color: var(--label);
  transform: translateY(-3px);
  box-shadow: inset 0 1px 0 var(--inner-top), var(--shadow-hi);
}
.icon-btn:active { transform: translateY(-1px) scale(.95); }
.icon-btn svg { width: 19px; height: 19px; }

.icon, .theme svg, .icon-btn svg:not(.fill), .btn svg:not(.fill) {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
svg.fill { fill: currentColor; stroke: none; }

/* ─── 9. 入场动效 ──────────────────────────────────────────────────────── */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
  transition-delay: var(--d, 0ms);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

.skip-link {
  position: fixed;
  top: -80px; left: 50%;
  z-index: 100;
  padding: 12px 20px;
  font-size: .875rem;
  color: var(--label);
  background: var(--glass-solid);
  border-radius: var(--r-pill);
  transform: translateX(-50%);
  transition: top .3s var(--ease);
}
.skip-link:focus { top: 16px; }

:focus-visible { outline: 2px solid rgb(var(--blue)); outline-offset: 3px; }

::selection { background: rgb(var(--blue) / .38); }

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--fill-2);
  border: 3.5px solid transparent;
  border-radius: var(--r-pill);
  background-clip: content-box;
}

/* ─── 10. 响应式 / 无障碍 ──────────────────────────────────────────────── */

@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; }
  .facts { align-items: flex-start; }
}

@media (max-width: 640px) {
  :root { --glass-blur: 16px; --r-card: 22px; }

  .section { padding: 76px 0; }
  .hero { padding: 130px 0 96px; }
  .card { padding: 23px; }
  .contact { padding: 44px 24px 40px; }
  .b4, .b5 { display: none; }
  .blob { animation-duration: 80s; }
  .grid-bg { background-size: 28px 28px; }
  .scroll-cue { display: none; }
  .note { padding: 16px 18px; gap: 12px; }
  .note .icon { display: none; }
  .nav a { padding: 0 11px; font-size: .84rem; }
  .nav { height: 46px; padding: 4px 5px; }
  .nav a { height: 38px; }
  .brand-text { display: none; }
  .brand { padding: 0 14px; height: 44px; }
  .nav-indicator { height: 38px; top: 4px; }
  .icon-btn { width: 44px; height: 44px; }
  .btn { height: 46px; padding: 0 20px; font-size: .92rem; }
}

@media (max-width: 400px) {
  .nav a { padding: 0 8px; font-size: .79rem; }
  .nav-sep { margin: 0 2px; }
  .hero-name { font-size: clamp(2.4rem, 13vw, 3.4rem); }
}

/* 系统开启「降低透明度」→ 玻璃退化为实色，保证可读 */
@media (prefers-reduced-transparency: reduce) {
  .glass {
    background: var(--glass-solid);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .glass::before { display: none; }
  .grid-bg { display: none; }
}

/* 系统开启「增强对比度」 */
@media (prefers-contrast: more) {
  html[data-theme="dark"]  { --label-2: rgb(238 238 248 / .92); --label-3: rgb(238 238 248 / .76); }
  html[data-theme="light"] { --label-2: rgb(46 46 54 / .96);    --label-3: rgb(46 46 54 / .86); }
  .glass { background: var(--glass-solid); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .glass::after { background: var(--label-3); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
  .blob { animation: none; }
}
