/* ==========================================================================
   MILO© — 个人主页
   风格复刻 NUDOT 核點設計 (nudot.com.tw)：
   纯黑背景 / 超高字重白大字 / ( 括号 ) 签名 / 等宽下划线数据 / SVC 编号 /
   双语对照 / 2 列作品网格 / 全站星空背景 + 一颗可以点的亮星（彩蛋）
   动效基座复刻 Cuberto / Dennis Snellenberg / Rauno（详见 README）
   ========================================================================== */

:root {
  --bg:      #0a0a0a;
  --bg-2:    #131313;
  --bg-3:    #1f1f1f;
  --line:    rgba(255, 255, 255, 0.14);
  --text:    #f2f2f2;
  --text-2:  #9a9a9a;
  --text-3:  #5c5c5c;
  --font-main: "DM Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  --font-mono: "DM Mono", "Cascadia Code", "JetBrains Mono", Consolas, ui-monospace, monospace;
  --ease-out:  cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.76, 0, 0.24, 1);
  --nav-h: 72px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* 背景色放在 html 上，让 z-index:-1 的星空 canvas 垫在全部内容之下 */
html { background: var(--bg); }

body {
  background: transparent;
  color: var(--text);
  font-family: var(--font-main);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.is-loading { overflow: hidden; }
body.is-modal { overflow: hidden; }

html.has-cursor, html.has-cursor * { cursor: none !important; }

::selection { background: #f2f2f2; color: #0a0a0a; }

::-webkit-scrollbar { width: 9px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--bg-3); }
::-webkit-scrollbar-thumb:hover { background: #4a4a4a; }

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
em, i { font-style: normal; }
sup { font-size: 0.55em; }

.inline-code {
  font-family: var(--font-mono); font-size: 0.9em;
  background: var(--bg-3); color: var(--text);
  padding: 2px 7px; border-radius: 4px;
}

/* ==========================================================================
   预加载器
   ========================================================================== */
.preloader {
  position: fixed; inset: 0; z-index: 1000;
  background: #060606;
  display: flex; align-items: center; justify-content: center;
  transition: transform 1s var(--ease-expo) 0.25s;
}
.preloader.is-done { transform: translateY(-100%); }

.preloader__inner { text-align: center; }

.preloader__name {
  font-size: clamp(30px, 6vw, 64px);
  font-weight: 900; letter-spacing: 0.12em; color: var(--text);
  overflow: hidden;
}
.preloader__name span {
  display: inline-block;
  transform: translateY(120%);
  animation: charUp 0.7s var(--ease-out) forwards;
}
.preloader__name span:nth-child(odd)  { animation-delay: 0.05s; }
.preloader__name span:nth-child(even) { animation-delay: 0.15s; }
@keyframes charUp { to { transform: translateY(0); } }

/* 加载页与首页署名同步：✕ 交叉符号 + 圈Q 印记（参数与 hero title 一致） */
.preloader__name .x-sym {
  display: inline-block;
  position: relative;
  width: 0.24em; height: 0.24em;
  margin: 0 0.18em;
  vertical-align: 0.231em;
  transform: translateY(120%);
  animation: charUp 0.7s var(--ease-out) 0.2s forwards;
}
.preloader__name .x-sym::before,
.preloader__name .x-sym::after {
  content: "";
  position: absolute; left: 50%; top: 50%;
  width: 112%; height: 0.075em;
  background: currentColor;
  border-radius: 0.02em;
}
.preloader__name .x-sym::before { transform: translate(-50%, -50%) rotate(45deg); }
.preloader__name .x-sym::after  { transform: translate(-50%, -50%) rotate(-45deg); }

.preloader__name .q-sym {
  display: inline-grid; place-items: center;
  font-size: 0.3em;
  width: 1em; height: 1em;
  margin-left: 0.15em;
  vertical-align: 1.5em;
  border: 0.055em solid currentColor;
  border-radius: 50%;
  transform: translateY(120%);
  animation: charUp 0.7s var(--ease-out) 0.32s forwards;
}
.preloader__name .q-sym i {
  font-size: 0.56em; font-weight: 800; line-height: 1;
}

.preloader__counter {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 13px; color: var(--text-2); letter-spacing: 0.25em;
}
.preloader__counter i { opacity: 0.5; }

.preloader__tag {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 10px; color: var(--text-3); letter-spacing: 0.4em;
}

.preloader__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(255,255,255,0.07); }
.preloader__bar span {
  display: block; height: 100%; width: 0%;
  background: #f2f2f2;
  transition: width 0.15s linear;
}

/* ==========================================================================
   自绘光标（白色 difference，压白底自动反黑）
   ========================================================================== */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0; z-index: 2000;
  pointer-events: none; border-radius: 50%;
  display: none;
  mix-blend-mode: difference;
}
html.has-cursor .cursor-dot, html.has-cursor .cursor-ring { display: block; }

.cursor-dot {
  width: 7px; height: 7px;
  background: #fff;
  transform: translate(-50%, -50%);
}

.cursor-ring {
  width: 38px; height: 38px;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  transform: translate(-50%, -50%);
  display: none;
  align-items: center; justify-content: center;
  transition: width 0.35s var(--ease-out), height 0.35s var(--ease-out),
              background 0.35s, border-color 0.35s;
}
html.has-cursor .cursor-ring { display: flex; }

.cursor-ring__label {
  font-size: 13px; font-weight: 600; color: #000;
  mix-blend-mode: normal;
  opacity: 0; transform: scale(0.4);
  transition: opacity 0.25s, transform 0.25s var(--ease-out);
  white-space: nowrap;
}

.cursor-ring.is-hover { width: 62px; height: 62px; background: rgba(255,255,255,0.18); }

.cursor-ring.is-label {
  width: 88px; height: 88px;
  background: #fff; border-color: #fff;
}
.cursor-ring.is-label .cursor-ring__label { opacity: 1; transform: scale(1); }
.cursor-ring.is-pressed { width: 28px; height: 28px; }

/* ==========================================================================
   进度条 / 噪点 / 星空画布
   ========================================================================== */
.progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0%;
  background: #f2f2f2; z-index: 1500;
}

.grain {
  position: fixed; inset: -100%; z-index: 1400;
  pointer-events: none; opacity: 0.05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='300' height='300'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grainShift 0.9s steps(6) infinite;
}
@keyframes grainShift {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-3%, 2%); }
  40%  { transform: translate(2%, -3%); }
  60%  { transform: translate(-2%, -2%); }
  80%  { transform: translate(3%, 3%); }
  100% { transform: translate(0, 0); }
}

/* 全站星空画布（JS 绘制闪烁星星 + 滚动视差 + 偶发流星） */
.starfield {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: -1;
}

/* 鼠标流星轨迹层：浮于内容之上、不拦截点击 */
.sparkfield {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: 1399;
  pointer-events: none;
}

/* ==========================================================================
   导航（NUDOT 式极简文字 + hover 小图浮出）
   ========================================================================== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 44px;
  transition: background 0.4s, backdrop-filter 0.4s;
}
.nav.is-scrolled {
  background: rgba(10, 10, 10, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.nav__logo {
  font-family: var(--font-mono);
  font-size: 14px; letter-spacing: 0.18em; color: var(--text);
  font-weight: 500;
}

.nav__links { display: flex; align-items: center; gap: 34px; }

.nav__links a {
  position: relative;
  font-family: var(--font-mono);
  font-size: 13.5px; color: var(--text-2);
  letter-spacing: 0.06em;
  transition: color 0.3s;
}
.nav__links a:hover { color: var(--text); }
.nav__links a.is-active { color: var(--text); }

/* NUDOT 招牌：hover 时链接下方浮出小图 */
.nav__thumb {
  position: absolute;
  top: calc(100% + 10px); left: 50%;
  width: 118px; height: 84px; object-fit: cover;
  transform: translateX(-50%) scale(0.6) rotate(-6deg);
  opacity: 0; pointer-events: none;
  transition: opacity 0.35s var(--ease-out), transform 0.45s var(--ease-out);
  z-index: 10;
}
.nav__links a:hover .nav__thumb {
  opacity: 1;
  transform: translateX(-50%) scale(1) rotate(-2deg);
}

.nav__resume {
  border: 1px solid var(--line);
  padding: 8px 16px !important;
  border-radius: 999px;
  transition: background 0.3s, color 0.3s, border-color 0.3s, transform 0.35s var(--ease-out);
}
.nav__resume:hover { background: #f2f2f2; color: #0a0a0a !important; border-color: #f2f2f2; }

.nav__burger {
  display: none; flex-direction: column; gap: 6px;
  background: none; border: none; padding: 8px;
}
.nav__burger span {
  display: block; width: 26px; height: 2px;
  background: var(--text);
  transition: transform 0.4s var(--ease-out);
}
.nav__burger.is-open span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.nav__burger.is-open span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 850;
  background: rgba(6, 6, 6, 0.97);
  backdrop-filter: blur(16px);
  display: flex; align-items: center; justify-content: center;
  clip-path: circle(0% at calc(100% - 44px) 40px);
  visibility: hidden;
  transition: clip-path 0.7s var(--ease-expo), visibility 0.7s;
}
.menu.is-open { clip-path: circle(150% at calc(100% - 44px) 40px); visibility: visible; }
.menu__links { display: flex; flex-direction: column; gap: 34px; text-align: center; }
.menu__links a {
  font-size: 30px; font-weight: 800; color: var(--text);
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.5s, transform 0.5s var(--ease-out);
}
.menu.is-open .menu__links a { opacity: 1; transform: translateY(0); }
.menu.is-open .menu__links a:nth-child(1) { transition-delay: 0.15s; }
.menu.is-open .menu__links a:nth-child(2) { transition-delay: 0.22s; }
.menu.is-open .menu__links a:nth-child(3) { transition-delay: 0.29s; }
.menu.is-open .menu__links a:nth-child(4) { transition-delay: 0.36s; }
.menu__links a em { font-family: var(--font-mono); font-size: 13px; color: var(--text-3); display: block; }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: calc(var(--nav-h) + 30px) 30px 120px;
  overflow: hidden;
}

/* hero 内的首屏元素不走滚动观察器（它们本来就不可滚动到位），改由加载进场 */
.hero__actions, .hero__status, .hero__stats {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
body.is-loaded .hero__actions { opacity: 1; transform: translateY(0); transition-delay: 1.05s; }
body.is-loaded .hero__status  { opacity: 1; transform: translateY(0); transition-delay: 1.2s; }
body.is-loaded .hero__stats   { opacity: 1; transform: translateY(0); transition-delay: 1.35s; }

.hero__kicker {
  font-family: var(--font-mono);
  font-size: clamp(12px, 1.3vw, 15px);
  color: var(--text-2); letter-spacing: 0.14em;
  margin-bottom: 3vh;
}

.line { display: block; overflow: hidden; }
.line__inner {
  display: block;
  transform: translateY(115%);
  transition: transform 0.9s var(--ease-out);
}
body.is-loaded .line__inner { transform: translateY(0); }
body.is-loaded .hero__sub .line__inner { transition-delay: 0.6s; }

/* 超大 Heavy 标题（NUDOT 招牌比例）：桌面端一行排开不换行 */
.hero__title {
  font-size: clamp(48px, 9vw, 136px);
  line-height: 0.94; font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 3.5vh;
  white-space: nowrap;
}

.hero__title .word {
  display: inline-block;
  white-space: nowrap;
}
.hero__title .char {
  display: inline-block;
  transform: translateY(110%) rotate(5deg);
  opacity: 0;
  transition: transform 0.85s var(--ease-out), opacity 0.85s;
}
body.is-loaded .hero__title .char { transform: translateY(0) rotate(0); opacity: 1; }
/* 字符 hover 闪变时禁用位移过渡，只保留透明度 */
.hero__title .char.is-flickering { transition: opacity 0.85s; }

/* 名字之间的 ✕：不是字母 X，是 CSS 画的小号交叉符号（呼应最初的 ALEX 版式） */
.hero__title .title-x {
  display: inline-block;
  position: relative;
  width: 0.24em; height: 0.24em;
  margin: 0 0.18em;
  vertical-align: 0.231em; /* ✕ 中心 = 大写字母墨迹中心（实测 cap 高 0.702em，中心 0.351em） */
  transform: translateY(110%);
  opacity: 0;
  transition: transform 0.85s var(--ease-out), opacity 0.85s;
}
.hero__title .title-x::before,
.hero__title .title-x::after {
  content: "";
  position: absolute; left: 50%; top: 50%;
  width: 112%; height: 0.075em;
  background: currentColor;
  border-radius: 0.02em;
}
.hero__title .title-x::before { transform: translate(-50%, -50%) rotate(45deg); }
.hero__title .title-x::after  { transform: translate(-50%, -50%) rotate(-45deg); }
body.is-loaded .hero__title .title-x { transform: translateY(0); opacity: 1; }

/* 结尾的圈Q 个人印记（替代 ©）：小号上标圆圈 */
.hero__title .title-mark {
  display: inline-grid; place-items: center;
  font-size: 0.3em;
  width: 1em; height: 1em;
  margin-left: 0.15em;
  vertical-align: 1.5em;
  border: 0.055em solid currentColor;
  border-radius: 50%;
  transform: translateY(110%);
  opacity: 0;
  transition: transform 0.85s var(--ease-out), opacity 0.85s;
}
.hero__title .title-mark i {
  font-size: 0.56em; font-weight: 800; line-height: 1;
  /* 实测 Q 墨迹中心与字框中心几乎重合，不做额外位移即居中 */
}
body.is-loaded .hero__title .title-mark { transform: translateY(0); opacity: 1; }

/* 导航/页脚通用小圈Q */
.q-mark {
  display: inline-grid; place-items: center;
  width: 1.3em; height: 1.3em;
  margin-left: 0.4em;
  vertical-align: 0.18em;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-weight: 700;
}
.q-mark i { font-size: 0.66em; font-style: normal; line-height: 1; transform: translateY(0.05em); }

.hero__sub {
  font-size: clamp(17px, 2.2vw, 24px);
  color: var(--text-2); font-weight: 300;
  letter-spacing: 0.22em;
  margin-bottom: 22px;
}

.hero__scramble {
  font-family: var(--font-mono);
  font-size: clamp(12px, 1.3vw, 14px);
  color: var(--text-2);
  min-height: 1.9em;
  margin-bottom: 34px;
}
.caret {
  display: inline-block; width: 8px; height: 1.1em;
  background: var(--text); margin-left: 3px;
  vertical-align: text-bottom;
  animation: blink 0.85s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero__actions { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }

.hero__status {
  position: absolute; left: 44px; bottom: 40px;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.22em;
  color: var(--text-2);
  display: flex; align-items: center; gap: 9px;
}
.hero__status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--text);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.5); }
  70%  { box-shadow: 0 0 0 10px rgba(255, 255, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

.hero__stats {
  position: absolute; right: 44px; bottom: 34px;
  display: flex; gap: 34px;
}
.stat b {
  display: block;
  font-size: 26px; font-weight: 700; color: var(--text);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}
.stat i { font-size: 10px; color: var(--text-3); letter-spacing: 0.14em; font-family: var(--font-mono); }

.hero__scroll {
  position: absolute; left: 50%; bottom: 30px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.hero__scroll-arrow {
  font-size: 17px; color: var(--text-2);
  animation: arrowDown 1.7s var(--ease-out) infinite;
}
@keyframes arrowDown {
  0%   { transform: translateY(-5px); opacity: 0; }
  35%  { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(7px); opacity: 0; }
}
.hero__scroll-text {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.34em; color: var(--text-3);
}

/* 四角十字准星（NUDOT 排印签名） */
.crosshair {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 15px; color: var(--text-3);
  opacity: 0.8;
  user-select: none;
}
.crosshair--tl { top: calc(var(--nav-h) + 18px); left: 26px; }
.crosshair--tr { top: calc(var(--nav-h) + 18px); right: 26px; }
.crosshair--bl { bottom: 22px; left: 26px; }
.crosshair--br { bottom: 22px; right: 26px; }
@media (max-width: 900px) { .crosshair { display: none; } }

/* ==========================================================================
   彩蛋：天上最亮的那颗星（点它 → 小镇游戏机小窗）
   ========================================================================== */
.wishing-star {
  position: absolute;
  top: 21%; right: 17%;
  width: 130px; height: 130px;
  background: none; border: none; padding: 0;
  z-index: 3;
  animation: starFloat 7s ease-in-out infinite;
}
@keyframes starFloat {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(4px, -7px); }
}

.wishing-star__core {
  position: absolute; left: 50%; top: 50%;
  width: 7px; height: 7px; border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%);
  box-shadow:
    0 0 6px 2px rgba(255, 255, 255, 0.95),
    0 0 18px 6px rgba(255, 255, 255, 0.45),
    0 0 46px 16px rgba(255, 255, 255, 0.16);
  animation: starTwinkle 2.6s ease-in-out infinite;
  transition: transform 0.3s var(--ease-out);
}
@keyframes starTwinkle {
  0%, 100% { transform: translate(-50%, -50%) scale(1);    opacity: 1; }
  50%      { transform: translate(-50%, -50%) scale(0.72); opacity: 0.75; }
}

/* 十字光芒（衍射星芒） */
.wishing-star__ray {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.85), transparent);
  animation: rayPulse 2.6s ease-in-out infinite;
  transition: width 0.4s var(--ease-out), height 0.4s var(--ease-out);
}
.wishing-star__ray--h { width: 96px;  height: 1.5px; }
.wishing-star__ray--v { width: 1.5px; height: 96px;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,0.85), transparent); }
@keyframes rayPulse {
  0%, 100% { opacity: 0.35; }
  50%      { opacity: 0.9; }
}

/* 呼吸光晕 */
.wishing-star__halo {
  position: absolute; left: 50%; top: 50%;
  width: 54px; height: 54px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  transform: translate(-50%, -50%);
  animation: haloRing 3.2s ease-out infinite;
}
@keyframes haloRing {
  0%   { transform: translate(-50%,-50%) scale(0.35); opacity: 0.9; }
  100% { transform: translate(-50%,-50%) scale(1.9);  opacity: 0; }
}

/* 悬浮时才露出的神秘小提示 */
.wishing-star__tip {
  position: absolute; left: 50%; top: calc(100% - 8px);
  transform: translateX(-50%) translateY(6px);
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.2em;
  color: var(--text-2); white-space: nowrap;
  opacity: 0;
  transition: opacity 0.35s, transform 0.35s var(--ease-out);
}
.wishing-star:hover .wishing-star__tip { opacity: 1; transform: translateX(-50%) translateY(0); }
.wishing-star:hover .wishing-star__core { animation: none; transform: translate(-50%,-50%) scale(1.5); }
.wishing-star:hover .wishing-star__ray--h { width: 130px; }
.wishing-star:hover .wishing-star__ray--v { height: 130px; }

@media (max-width: 900px) {
  .hero__title { white-space: normal; }
  .hero__title .title-x { width: 0.2em; height: 0.2em; margin: 0 0.12em; vertical-align: 0.42em; }
  .wishing-star { top: 10%; right: 3%; width: 104px; height: 104px; }
}

/* 彩蛋 2：红色的 ID 星（瓦罗兰特暗号色）——更小、在左下天区 */
.wishing-star--riot {
  top: 60%; left: 10%; right: auto;
  width: 88px; height: 88px;
  animation-duration: 9s;
}
.wishing-star--riot .wishing-star__core {
  box-shadow:
    0 0 6px 2px rgba(255, 255, 255, 0.9),
    0 0 18px 6px rgba(255, 77, 94, 0.5),
    0 0 44px 15px rgba(255, 77, 94, 0.18);
}
.wishing-star--riot .wishing-star__ray { background: linear-gradient(90deg, transparent, rgba(255, 118, 130, 0.8), transparent); }
.wishing-star--riot .wishing-star__ray--v { background: linear-gradient(180deg, transparent, rgba(255, 118, 130, 0.8), transparent); }
.wishing-star--riot .wishing-star__halo { border-color: rgba(255, 77, 94, 0.45); }
.wishing-star--riot .wishing-star__ray--h { width: 62px; }
.wishing-star--riot .wishing-star__ray--v { height: 62px; }
.wishing-star--riot:hover .wishing-star__ray--h { width: 88px; }
.wishing-star--riot:hover .wishing-star__ray--v { height: 88px; }

@media (max-width: 900px) {
  .wishing-star--riot { top: 60%; left: 4%; width: 72px; height: 72px; }
  .wishing-star--riot .wishing-star__ray--h { width: 48px; }
  .wishing-star--riot .wishing-star__ray--v { height: 48px; }
}

/* ==========================================================================
   彩蛋 2 弹窗：瓦罗兰特 ID 卡
   ========================================================================== */
.id-modal {
  position: fixed; inset: 0; z-index: 1300;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  visibility: hidden; opacity: 0;
  transition: opacity 0.4s, visibility 0.4s;
}
.id-modal.is-open { visibility: visible; opacity: 1; }

.id-modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(4, 4, 4, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.id-modal__card {
  position: relative;
  width: min(420px, 90vw);
  background: #0d0d0d;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7), 0 0 50px rgba(255, 77, 94, 0.06);
  padding: 36px 30px 30px;
  text-align: center;
  transform: translateY(22px) scale(0.94);
  transition: transform 0.5s var(--ease-expo);
}
.id-modal.is-open .id-modal__card { transform: none; }

.id-modal__kicker {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.2em;
  color: var(--text-3);
  margin-bottom: 18px;
}
.id-modal__id {
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 900; letter-spacing: 0.02em;
  color: var(--text);
  margin-bottom: 10px;
  word-break: break-all;
}
.id-modal__id::selection { background: #ff4d5e; color: #fff; }
.id-modal__desc {
  font-size: 13px; color: var(--text-2);
  margin-bottom: 26px;
}
.id-modal__actions {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
}
.id-modal__btn {
  font-family: var(--font-mono); font-size: 12px;
  color: var(--text-2); letter-spacing: 0.12em;
  background: none; border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 10px 18px; border-radius: 999px;
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.id-modal__btn:hover { background: #f2f2f2; color: #0a0a0a; border-color: #f2f2f2; }
#copyIdBtn { color: #ff8a95; border-color: rgba(255, 77, 94, 0.45); }
#copyIdBtn:hover { background: #ff4d5e; border-color: #ff4d5e; color: #fff; }

/* ==========================================================================
   按钮（磁吸由 JS 驱动）
   ========================================================================== */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.1em;
  padding: 13px 28px; border-radius: 999px;
  transition: transform 0.35s var(--ease-out), background 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.3s;
  will-change: transform;
}
.btn--solid { background: #f2f2f2; color: #0a0a0a; font-weight: 500; }
.btn--solid:hover { box-shadow: 0 8px 34px rgba(255, 255, 255, 0.22); }

.btn--ghost { border: 1px solid var(--line); color: var(--text-2); }
.btn--ghost:hover { border-color: #f2f2f2; color: var(--text); }

.btn--lg { padding: 17px 42px; font-size: 14px; }

/* ==========================================================================
   跑马灯
   ========================================================================== */
.marquee {
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
  overflow: hidden;
}
.marquee__track { display: flex; width: max-content; will-change: transform; }
.marquee__track span {
  font-size: clamp(22px, 3.4vw, 40px);
  font-weight: 900; letter-spacing: 0.05em;
  white-space: nowrap; text-transform: uppercase;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.6);
}
.marquee__track span i {
  color: var(--text-2); -webkit-text-stroke: 0;
  font-size: 0.52em; font-weight: 400; margin: 0 14px;
  letter-spacing: 0.1em; vertical-align: 0.28em;
}

/* ==========================================================================
   通用 Section
   ========================================================================== */
.section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 120px 44px 100px;
}

.section__head {
  display: flex; align-items: baseline; gap: 20px;
  margin-bottom: 60px;
  flex-wrap: wrap;
}
.section__head em {
  font-family: var(--font-mono);
  color: var(--text-3); font-size: 15px; letter-spacing: 0.1em;
}
.section__head h2 {
  font-size: clamp(30px, 4.6vw, 54px); font-weight: 900;
  letter-spacing: -0.01em; white-space: nowrap;
}
.section__zh {
  font-size: 0.34em; font-weight: 300; color: var(--text-3);
  letter-spacing: 0.18em; margin-left: 10px; vertical-align: 0.5em;
}

[data-reveal] {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.85s var(--ease-out), transform 0.85s var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
[data-reveal].in { opacity: 1; transform: translateY(0); }

/* ==========================================================================
   服务大字列表（hover 白底反转 + 箭头滑动）
   ========================================================================== */
.svc-list { border-top: 1px solid var(--line); }

.svc {
  position: relative;
  display: grid;
  grid-template-columns: 110px 1fr auto 60px;
  align-items: center; gap: 22px;
  padding: 34px 18px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

/* 反转层：白色从左滑入 */
.svc::before {
  content: "";
  position: absolute; inset: 0; z-index: 0;
  background: #f2f2f2;
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.5s var(--ease-expo);
}
.svc:hover::before { transform: scaleX(1); }

.svc > * { position: relative; z-index: 1; transition: color 0.35s, transform 0.5s var(--ease-out); }

.svc__no {
  font-family: var(--font-mono); font-size: 13px;
  color: var(--text-3); letter-spacing: 0.1em;
}
.svc__en {
  font-size: clamp(30px, 5.2vw, 62px);
  font-weight: 900; letter-spacing: -0.01em; line-height: 1.05;
}
.svc__zh {
  font-size: 15px; color: var(--text-3); font-weight: 300;
  letter-spacing: 0.3em;
}
.svc__arrow { font-size: 26px; color: var(--text-3); text-align: right; }

.svc:hover .svc__no,
.svc:hover .svc__en { color: #0a0a0a; }
.svc:hover .svc__zh  { color: #4a4a4a; }
.svc:hover .svc__arrow { color: #0a0a0a; transform: translate(6px, 6px); }
.svc:hover .svc__en { transform: translateX(16px); }

/* ==========================================================================
   关于
   ========================================================================== */
.about__grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 72px;
  align-items: start;
}
.about__text p { color: var(--text-2); margin-bottom: 20px; font-size: 16.5px; }
.about__text b { color: var(--text); font-weight: 700; }

/* NUDOT 式双语词云 */
.about__cloud {
  display: flex; flex-wrap: wrap; gap: 12px 10px;
  margin-top: 36px;
}
.about__cloud li {
  font-family: var(--font-mono);
  font-size: 13px; color: var(--text-2);
  padding: 7px 14px;
  border: 1px solid var(--line); border-radius: 999px;
  display: inline-flex; align-items: baseline; gap: 7px;
  transition: color 0.3s, border-color 0.3s, background 0.3s, transform 0.35s var(--ease-out);
}
.about__cloud li i { font-size: 10.5px; color: var(--text-3); letter-spacing: 0.08em; }
.about__cloud li:hover {
  color: #0a0a0a; background: #f2f2f2; border-color: #f2f2f2;
  transform: translateY(-4px);
}
.about__cloud li:hover i { color: #4a4a4a; }

.about__photo { position: relative; }
.about__photo-cap {
  font-family: var(--font-mono); font-size: 11.5px;
  color: var(--text-3); margin-top: 14px; text-align: center;
  letter-spacing: 0.1em;
}

/* tilt 卡 */
.tilt-card {
  position: relative;
  --rx: 0deg; --ry: 0deg;
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition: transform 0.45s var(--ease-out);
  border-radius: 4px;
  will-change: transform;
}
.tilt-card.is-active { transition: transform 0.08s linear; }
.tilt-card__glare {
  position: absolute; inset: 0; z-index: 3;
  pointer-events: none;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255,255,255,0.18), transparent 55%);
  opacity: 0; transition: opacity 0.3s;
}
.tilt-card.is-active .tilt-card__glare { opacity: 1; }

.photo-wrap {
  overflow: hidden; border-radius: 4px;
  border: 1px solid var(--line);
}
.photo-wrap img {
  display: block; width: 100%; aspect-ratio: 4 / 3.4;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 0.8s var(--ease-out);
}
.about__photo:hover .photo-wrap img { transform: scale(1.07); }

.about__photo-frame {
  position: absolute; inset: 16px -16px -16px 16px;
  border: 1px solid var(--line);
  z-index: -1;
  transition: transform 0.5s var(--ease-out), border-color 0.4s;
}
.about__photo:hover .about__photo-frame { transform: translate(6px, 6px); border-color: rgba(255,255,255,0.35); }

/* ==========================================================================
   作品网格（NUDOT 式 2 列 + 交错 + 视差 + 灰转彩）
   ========================================================================== */
.works-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px 56px;
}
.work-card:nth-child(even) { transform: translateY(64px); }
.work-card:nth-child(even)[data-reveal] { transform: translateY(64px) translateY(30px); opacity: 0; }
.work-card:nth-child(even)[data-reveal].in { transform: translateY(64px); opacity: 1; }

.work-card__meta { display: flex; align-items: baseline; gap: 16px; margin-bottom: 14px; }
.work-card__no {
  font-family: var(--font-mono); font-size: 12px;
  color: var(--text-3); letter-spacing: 0.12em;
}
.work-card__meta h3 {
  font-size: clamp(20px, 2.4vw, 28px); font-weight: 800;
}
.work-card__meta h3 i {
  font-size: 0.5em; font-weight: 300; color: var(--text-3);
  letter-spacing: 0.2em; margin-left: 10px;
}

/* 揭示改为 JS 按滚动位置双向驱动（下滚展开 / 上滚收起），CSS 只定初始收起态 */
.work-card__media {
  overflow: hidden;
  border-radius: 4px;
  clip-path: inset(0 0 100% 0);
  will-change: clip-path;
}

/* --skew 由 JS 按滚动速度写入，hover 缩放走 --zs，两者合成不互相覆盖 */
.work-card__zoom {
  transform: skewY(var(--skew, 0deg)) scale(var(--zs, 1));
  transition: transform 0.55s var(--ease-out);
}
.work-card:hover .work-card__zoom { --zs: 1.055; }

.work-card__media img {
  display: block; width: 100%; aspect-ratio: 4 / 3;
  object-fit: cover;
  transform: translateY(var(--py, 0px)) scale(1.18); /* 留出视差余量 */
  filter: grayscale(92%) contrast(1.02);
  transition: filter 0.6s;
  will-change: transform;
}
.work-card:hover .work-card__media img { filter: grayscale(0) contrast(1); }
.work-card__media img[src*="project-coffee"] { object-position: 85% 50%; }

/* 悬停凸显：整卡抬起 + 柔和光晕（无硬边框），其他卡让位变暗（translate 属性与 reveal 的 transform 互不干扰） */
.work-card {
  position: relative;
  translate: 0 0;
  border-radius: 10px;
  transition: opacity 0.85s var(--ease-out), transform 0.85s var(--ease-out),
              translate 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out);
}
.work-card:hover {
  translate: 0 -10px;
  z-index: 5;
  /* 圆角软影：只留深度，不加描边线 */
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
/* 光晕落在图片框上：贴着图片的柔光取代硬边框 */
.work-card__media {
  transition: box-shadow 0.5s var(--ease-out);
}
.work-card:hover .work-card__media {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.1),
    0 0 22px rgba(255, 255, 255, 0.07),
    0 0 54px rgba(255, 255, 255, 0.05);
}
@media (hover: hover) {
  .works-grid:hover .work-card:not(:hover) { opacity: 0.4; }
}

.work-card__tags {
  margin-top: 14px;
  font-family: var(--font-mono); font-size: 11.5px;
  color: var(--text-3); letter-spacing: 0.16em;
}
.work-card:hover .work-card__tags { color: var(--text-2); }

/* ==========================================================================
   彩蛋弹窗：小镇游戏机小窗（点亮星唤起）
   ========================================================================== */
.star-modal {
  position: fixed; inset: 0; z-index: 1300;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  visibility: hidden; opacity: 0;
  transition: opacity 0.4s, visibility 0.4s;
}
.star-modal.is-open { visibility: visible; opacity: 1; }

.star-modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(4, 4, 4, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.star-modal__window {
  position: relative;
  width: min(1080px, 94vw);
  background: #0d0d0d;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7), 0 0 60px rgba(255, 255, 255, 0.05);
  transform: translateY(26px) scale(0.94);
  transition: transform 0.5s var(--ease-expo);
  overflow: hidden;
}
.star-modal.is-open .star-modal__window { transform: none; /* 过渡到 none，不残留 scale 图层栅格化，保证 iframe 锐利 */ }

/* 标题栏 */
.star-modal__bar {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.star-modal__led {
  width: 8px; height: 8px; border-radius: 50%;
  background: #3a3a3a; flex: none;
  transition: background 0.4s, box-shadow 0.4s;
}
.star-modal.is-running .star-modal__led {
  background: #f2f2f2;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.9);
  animation: pulse 2.2s infinite;
}
.star-modal__title {
  font-family: var(--font-mono);
  font-size: 12.5px; letter-spacing: 0.14em; color: var(--text);
  white-space: nowrap;
}
.star-modal__state {
  font-family: var(--font-mono);
  font-size: 10.5px; letter-spacing: 0.16em; color: var(--text-3);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 3px 9px; border-radius: 999px;
  white-space: nowrap;
}
.star-modal.is-running .star-modal__state { color: var(--text-2); border-color: rgba(255,255,255,0.3); }
.star-modal__spacer { flex: 1; }
.star-modal__btn {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--text-2); letter-spacing: 0.1em;
  background: none; border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 6px 12px; border-radius: 999px;
  white-space: nowrap;
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.star-modal__btn:hover { background: #f2f2f2; color: #0a0a0a; border-color: #f2f2f2; }

/* 屏幕区 */
.star-modal__screen {
  position: relative;
  background: #050505;
  aspect-ratio: 16 / 9.4;
  max-height: calc(100vh - 170px);
  overflow: hidden;
}
.star-modal__screen:fullscreen,
.star-modal__screen.is-expanded {
  aspect-ratio: auto; max-height: none;
  border-radius: 0;
}
.star-modal__screen.is-expanded {
  position: fixed; inset: 0; z-index: 1350;
}
.star-modal__iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
  opacity: 0; pointer-events: none;
  transition: opacity 0.6s;
}
.star-modal.is-running .star-modal__iframe { opacity: 1; pointer-events: auto; }

/* 开机画面（首次点亮星星时的装载屏） */
.star-modal__boot {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px;
  transition: opacity 0.5s;
}
.star-modal.is-running .star-modal__boot { opacity: 0; pointer-events: none; }
.star-modal__boot-title {
  font-size: clamp(26px, 4vw, 44px);
  font-weight: 900; letter-spacing: 0.08em; color: var(--text);
  animation: bootFlicker 3.2s steps(1) infinite;
}
@keyframes bootFlicker {
  0%, 91%, 94%, 100% { opacity: 1; }
  92%, 93%            { opacity: 0.35; }
}
.star-modal__boot-sub {
  font-family: var(--font-mono);
  font-size: 12px; color: var(--text-2); letter-spacing: 0.16em;
}
.star-modal__boot-bar {
  width: min(320px, 60%);
  height: 2px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
  border-radius: 2px;
}
.star-modal__boot-bar i {
  display: block; height: 100%; width: 0%;
  background: #f2f2f2;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
  transition: width 0.3s ease;
}

/* CRT 扫描线：开机瞬间有味道，进入游戏后退到几乎透明（保持画面锐利） */
.star-modal__scanlines {
  position: absolute; inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.4) 0 1px, transparent 1px 4px);
  opacity: 0.3;
  transition: opacity 0.8s;
}
.star-modal.is-running .star-modal__scanlines { opacity: 0.12; }

/* 底部操作说明 */
.star-modal__foot {
  padding: 10px 16px;
  font-family: var(--font-mono);
  font-size: 10.5px; letter-spacing: 0.12em;
  color: var(--text-3);
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 720px) {
  .star-modal { padding: 10px; }
  .star-modal__screen { aspect-ratio: 4 / 5; max-height: calc(100vh - 150px); }
  .star-modal__bar { gap: 8px; padding: 10px 12px; }
  .star-modal__title { display: none; }
}

/* ==========================================================================
   星尘魔方：滚动驱动旋转，尽头六面爆开散落
   ========================================================================== */
.cube-wrap {
  position: relative;
  height: 380vh; /* 长滚动轨道：旋转 → 大爆炸 → 星座 → 黑洞吞噬 */
}
.cube-sticky {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 40px;
  perspective: 1300px;
  overflow: hidden;
}
.cube__kicker {
  font-family: var(--font-mono);
  font-size: clamp(12px, 1.3vw, 15px);
  color: var(--text-2); letter-spacing: 0.14em;
}
.cube-stage { position: relative; }
.cube {
  position: relative;
  width: 260px; height: 260px;
  transform-style: preserve-3d;
  will-change: transform;
}
.cube__face {
  position: absolute; inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-2);
  will-change: transform;
}
.cube__face img {
  display: block; width: 100%; height: 100%;
  object-fit: cover;
}
.cube__hud {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-family: var(--font-mono);
}
.cube__count {
  font-size: 13px; letter-spacing: 0.22em; color: var(--text);
  border: 1px solid var(--line);
  padding: 6px 16px; border-radius: 999px;
}
.cube__hint {
  font-size: 10.5px; letter-spacing: 0.3em; color: var(--text-3);
}

/* 大爆炸冲击波环（中心扩散） */
.cube__bang {
  position: absolute; left: 50%; top: 50%;
  width: 64px; height: 64px;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0.2);
  opacity: 0;
  box-shadow: 0 0 44px rgba(255, 255, 255, 0.4);
  pointer-events: none;
  z-index: 4;
}

/* 爆炸后的作品星座：碎片陈列层 */
.cube__lines {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 1;
}
.cube__lines path {
  fill: none;
  stroke: rgba(255, 255, 255, 0.2);
  stroke-width: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

.cube__frags {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 2;
}
.cube__frag {
  position: absolute; left: 0; top: 0;
  width: 148px;
  margin: 0;
  opacity: 0;
  will-change: transform, opacity;
}
.cube__frag img {
  display: block; width: 148px; height: 104px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  filter: saturate(0.92);
}
.cube__frag figcaption {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 10.5px; letter-spacing: 0.14em;
  color: var(--text-2);
  text-align: center;
  white-space: nowrap;
}

/* 终幕题词（星座中心） */
.cube__finale {
  position: absolute; left: 50%; top: 47%;
  transform: translate(-50%, -50%);
  font-family: var(--font-mono);
  font-size: clamp(12px, 1.4vw, 16px);
  letter-spacing: 0.22em;
  color: var(--text-2);
  opacity: 0;
  pointer-events: none;
  z-index: 3;
  white-space: nowrap;
}

/* 黑洞：事件视界黑核 + 旋转吸积盘，吞掉星座 */
.cube-hole {
  position: absolute; left: 50%; top: 46%;
  width: 150px; height: 150px;
  transform: translate(-50%, -50%) scale(0.25);
  opacity: 0;
  pointer-events: none;
  z-index: 5;
}
.cube-hole::before {
  /* 事件视界：纯黑核心，边缘一圈热光 */
  content: "";
  position: absolute; inset: 24%;
  border-radius: 50%;
  background: #000;
  box-shadow:
    0 0 18px 2px rgba(255, 255, 255, 0.16),
    0 0 46px 10px rgba(255, 255, 255, 0.07);
}
.cube-hole::after {
  /* 吸积盘：环形遮罩下旋转的高亮弧 */
  content: "";
  position: absolute; inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    transparent 0 10%,
    rgba(255, 255, 255, 0.55) 17%,
    transparent 30%,
    transparent 52%,
    rgba(255, 255, 255, 0.3) 60%,
    transparent 74%
  );
  -webkit-mask: radial-gradient(circle, transparent 0 34%, #000 36% 64%, transparent 66%);
  mask: radial-gradient(circle, transparent 0 34%, #000 36% 64%, transparent 66%);
  animation: holeSpin 4.2s linear infinite;
  filter: blur(0.8px);
}
@keyframes holeSpin { to { transform: rotate(360deg); } }
.cube-hole__label {
  position: absolute; left: 50%; top: calc(100% + 18px);
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 10.5px; letter-spacing: 0.24em;
  color: var(--text-3);
  white-space: nowrap;
}

@media (max-width: 580px) {
  .cube { width: 176px; height: 176px; }
  .cube-sticky { gap: 28px; }
  .cube__frag { width: 100px; }
  .cube__frag img { width: 100px; height: 70px; }
  .cube__frag figcaption { font-size: 8.5px; letter-spacing: 0.08em; }
  .cube__finale { white-space: normal; text-align: center; width: 80%; }
}

/* ==========================================================================
   时间线
   ========================================================================== */
.timeline { position: relative; padding-left: 34px; }
.timeline::before {
  content: "";
  position: absolute; left: 0; top: 6px; bottom: 6px; width: 1.5px;
  background: linear-gradient(#f2f2f2, rgba(255,255,255,0.12));
  transform: scaleY(0); transform-origin: top;
  transition: transform 1.6s var(--ease-out) 0.25s;
}
.timeline.is-in::before { transform: scaleY(1); }

.timeline__item { position: relative; padding-bottom: 46px; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item::before {
  content: "";
  position: absolute; left: -41px; top: 8px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--text-2);
  transition: background 0.35s, border-color 0.35s, box-shadow 0.35s;
}
.timeline__item:hover::before {
  background: #f2f2f2; border-color: #f2f2f2;
  box-shadow: 0 0 0 7px rgba(255, 255, 255, 0.1);
}
.timeline__range {
  font-family: var(--font-mono);
  font-size: 12.5px; color: var(--text-2); letter-spacing: 0.14em;
}
.timeline__item h3 { font-size: 20px; margin: 6px 0 10px; font-weight: 700; }
.timeline__at { color: var(--text-2); font-size: 16px; font-weight: 400; }
.timeline__item p { color: var(--text-2); max-width: 620px; font-size: 15.5px; }

/* ==========================================================================
   联系
   ========================================================================== */
.section--contact { text-align: center; padding-top: 160px; padding-bottom: 140px; }
.contact__kicker {
  font-family: var(--font-mono); color: var(--text-3);
  font-size: 14px; margin-bottom: 24px; letter-spacing: 0.14em;
}
.contact__title { margin-bottom: 30px; }

.fill-text {
  font-size: clamp(52px, 10vw, 124px);
  font-weight: 900; letter-spacing: 0;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.7);
  position: relative;
  display: inline-block;
}
.fill-text::before {
  content: attr(data-text);
  position: absolute; inset: 0;
  color: #f2f2f2;
  -webkit-text-stroke: 0;
  clip-path: inset(100% 0 0 0);
  transition: clip-path 0.65s var(--ease-expo);
}
.fill-text:hover::before { clip-path: inset(0 0 0 0); }

.contact__desc { color: var(--text-2); max-width: 520px; margin: 0 auto 44px; }

/* ==========================================================================
   页脚
   ========================================================================== */
.footer { border-top: 1px solid var(--line); padding: 30px 44px 26px; }
.footer__inner {
  max-width: 1240px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  flex-wrap: wrap;
}
.footer__brand {
  font-family: var(--font-mono); font-size: 13px;
  color: var(--text-2); letter-spacing: 0.14em;
}
.footer__time {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 13px; color: var(--text-2);
}
.footer__time-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #f2f2f2;
  animation: pulse 2.2s infinite;
}
.footer__tz { color: var(--text-3); font-size: 11px; letter-spacing: 0.14em; }

.footer__top {
  font-family: var(--font-mono); font-size: 12.5px;
  color: var(--text-2); letter-spacing: 0.12em;
  background: none; border: 1px solid var(--line);
  padding: 9px 18px; border-radius: 999px;
  transition: transform 0.35s var(--ease-out), background 0.3s, color 0.3s, border-color 0.3s;
  will-change: transform;
}
.footer__top:hover { background: #f2f2f2; color: #0a0a0a; border-color: #f2f2f2; }

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 1080px) {
  .hero__status { display: none; }
  .svc { grid-template-columns: 84px 1fr auto 44px; }
}

@media (max-width: 900px) {
  .nav { padding: 0 24px; }
  .nav__links { display: none; }
  .nav__burger { display: flex; }

  .hero { padding-bottom: 150px; }
  .hero__stats {
    position: static; margin-top: 46px;
    flex-wrap: wrap; justify-content: center; gap: 24px;
  }

  .section { padding: 90px 24px 76px; }
  .about__grid { grid-template-columns: 1fr; gap: 54px; }

  .svc { grid-template-columns: 1fr auto; grid-template-rows: auto auto; gap: 4px 16px; padding: 26px 10px; }
  .svc__no { display: none; }
  .svc__zh { grid-column: 1; }
  .svc__arrow { grid-row: 1; }

  .works-grid { grid-template-columns: 1fr; gap: 56px; }
  .work-card:nth-child(even) { transform: none; }
  .work-card:nth-child(even)[data-reveal] { transform: translateY(30px); }
  .work-card:nth-child(even)[data-reveal].in { transform: translateY(0); }

  .footer { padding: 26px 24px 22px; }
  .footer__inner { justify-content: center; text-align: center; }
}

@media (max-width: 580px) {
  .hero__actions .btn { width: 100%; justify-content: center; }
  .stat b { font-size: 21px; }
}

/* ==========================================================================
   管理编辑层（仅 admin-mode / 登录框可见，访客零影响）
   ========================================================================== */
.admin-login {
  position: fixed; inset: 0; z-index: 1700;
  display: none; align-items: center; justify-content: center;
  padding: 24px;
}
.admin-login.is-open { display: flex; }
.admin-login__backdrop { position: absolute; inset: 0; background: rgba(4, 4, 4, 0.82); backdrop-filter: blur(8px); }
.admin-login__card {
  position: relative; width: min(380px, 90vw);
  background: #0d0d0d; border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px; padding: 30px 26px; text-align: center;
}
.admin-login__title {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.2em;
  color: var(--text-2); margin-bottom: 18px;
}
.admin-login__input {
  width: 100%; background: #141414; border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text); border-radius: 8px; padding: 12px 14px;
  font-size: 14px; font-family: var(--font-mono); outline: none; margin-bottom: 16px;
}
.admin-login__input:focus { border-color: #fff; }
.admin-login__actions { display: flex; gap: 10px; justify-content: center; }
.admin-login__err { color: #ff8a95; font-size: 12px; margin-top: 12px; min-height: 1em; font-family: var(--font-mono); }

.adm-btn {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em;
  color: var(--text-2); background: none; border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 7px 14px; border-radius: 999px; cursor: pointer;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.adm-btn:hover { background: #f2f2f2; color: #0a0a0a; border-color: #f2f2f2; }
.adm-btn--accent { background: #f2f2f2; color: #0a0a0a; border-color: #f2f2f2; font-weight: 600; }
.adm-btn--accent:hover { background: #fff; }
.adm-btn:disabled { opacity: 0.5; cursor: wait; }

.admin-bar {
  display: none; position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%);
  z-index: 1700; align-items: center; gap: 10px;
  background: rgba(10, 10, 10, 0.92); border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px; padding: 10px 14px;
  backdrop-filter: blur(8px); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}
body.admin-mode .admin-bar { display: flex; }
.admin-bar__state {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.1em;
  color: var(--text-2); padding: 0 6px; white-space: nowrap;
}
.admin-bar__state.is-dirty { color: #ffd24d; }

.admin-toast {
  position: fixed; top: 24px; left: 50%; transform: translate(-50%, -16px); z-index: 1750;
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.08em;
  color: #0a0a0a; background: #f2f2f2; border-radius: 999px; padding: 10px 20px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s, transform 0.3s var(--ease-out);
}
.admin-toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* 编辑态视觉：虚线框 = 可点改文字，黄虚线 = 可换图，红点线 = 可改链接 */
body.admin-mode [data-c],
body.admin-mode [data-ch],
body.admin-mode [data-arr][data-f] {
  outline: 1px dashed rgba(255, 255, 255, 0.28); outline-offset: 3px; border-radius: 2px;
}
body.admin-mode [data-c]:hover,
body.admin-mode [data-ch]:hover,
body.admin-mode [data-arr][data-f]:hover { outline-color: rgba(255, 255, 255, 0.7); background: rgba(255, 255, 255, 0.05); }
body.admin-mode [data-c]:focus,
body.admin-mode [data-ch]:focus,
body.admin-mode [data-arr][data-f]:focus { outline: 1.5px solid #fff; background: rgba(255, 255, 255, 0.07); }
body.admin-mode img[data-img] { outline: 1.5px dashed rgba(255, 210, 77, 0.75); outline-offset: 2px; cursor: pointer; }
body.admin-mode img[data-img]:hover { filter: brightness(1.15); }
body.admin-mode [data-link] { outline: 1px dotted rgba(255, 138, 149, 0.6); outline-offset: 3px; }

/* 编辑时冻结动画：全部内容展开可见、可点、不跑动 */
body.admin-mode [data-reveal] { opacity: 1 !important; transform: none !important; }
body.admin-mode .work-card__media { clip-path: none !important; }
body.admin-mode .work-card:nth-child(even) { transform: none !important; }
body.admin-mode .cube-wrap { height: auto !important; }
body.admin-mode .cube-sticky { position: static !important; height: auto !important; padding: 70px 20px; gap: 24px; }
body.admin-mode .cube { width: auto !important; height: auto !important; transform: none !important; }
body.admin-mode .cube__face { position: relative !important; display: inline-block; width: 120px; height: 120px; margin: 4px; transform: none !important; }
body.admin-mode .cube__frags { position: static; }
body.admin-mode .cube__frag { position: relative; display: inline-block; transform: none !important; opacity: 1 !important; margin: 8px; }
body.admin-mode .cube__frags img { width: 100px; height: 70px; }
body.admin-mode .marquee__track { transform: none !important; }

/* 列表项管理控件（悬停浮现） */
.adm-ctl { display: none; }
.adm-add { display: none; }
body.admin-mode .svc-list li,
body.admin-mode .about__cloud li { position: relative; }
body.admin-mode .adm-ctl {
  display: inline-flex; gap: 4px;
  position: absolute; top: 8px; right: 8px; z-index: 60;
  opacity: 0; transition: opacity 0.2s;
}
body.admin-mode *:hover > .adm-ctl,
body.admin-mode .adm-ctl:hover { opacity: 1; }
body.admin-mode .adm-ctl button {
  width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(10, 10, 10, 0.85); color: #fff;
  font-size: 12px; line-height: 1; cursor: pointer;
}
body.admin-mode .adm-ctl button:hover { background: #fff; color: #000; }
body.admin-mode .adm-add {
  display: block; width: 100%; margin-top: 14px; padding: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.35); border-radius: 10px;
  background: none; color: var(--text-2);
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.12em; cursor: pointer;
}
body.admin-mode .adm-add:hover { border-color: #fff; color: #fff; }

/* ==========================================================================
   无障碍
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
  .grain { display: none; }
}
