/* ============================================================
   思特实验室 · SiteOL Lab — Design System
   Tech-blue / dark-first / glow · grid · flow · scan
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  /* 科技蓝主色阶 */
  --blue-50:  #e6f6ff;
  --blue-100: #b3e4ff;
  --blue-200: #7fd0ff;
  --blue-300: #4ab8ff;
  --blue-400: #22a0ff;
  --blue-500: #0a84ff;   /* primary */
  --blue-600: #0066e0;
  --blue-700: #0b4fb8;
  --cyan:     #22e0ff;
  --violet:   #7c5cff;

  --radius-sm: 10px;
  --radius:    16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --maxw: 1200px;
  --nav-h: 66px;

  --ease: cubic-bezier(.22,.61,.36,1);
  --spring: cubic-bezier(.2,.9,.3,1.3);

  --shadow-glow: 0 0 0 1px rgba(34,224,255,.12), 0 18px 60px -20px rgba(10,132,255,.55);
  --font: "Segoe UI", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "SFMono-Regular", ui-monospace, "Cascadia Code", Consolas, monospace;
}

/* Dark (default) */
[data-theme="dark"] {
  --bg:       #05070d;
  --bg-2:     #0a0f1c;
  --surface:  rgba(15, 22, 40, .66);
  --surface-2:rgba(20, 30, 54, .8);
  --line:     rgba(120, 170, 255, .14);
  --line-soft:rgba(120, 170, 255, .08);
  --text:     #eaf2ff;
  --text-dim: #9fb2d4;
  --text-mut: #5f7196;
  --grid-line:rgba(80, 140, 240, .10);
  --primary:  var(--blue-400);
  --glow-a:   rgba(10,132,255,.55);
  --glow-b:   rgba(34,224,255,.40);
  --glow-c:   rgba(124,92,255,.35);
  --card-shine: rgba(120,180,255,.16);
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background .5s var(--ease), color .5s var(--ease);
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
::selection { background: var(--blue-500); color: #fff; }

/* ---------- Background layer ---------- */
.bg-layer {
  position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background: linear-gradient(180deg, var(--bg), var(--bg-2));
}
/* 柔和渐变光晕：深蓝 → 青绿的极光，缓慢呼吸流动（对应 Logo 配色） */
.bg-aurora {
  position: absolute; inset: -20%;
  background:
    radial-gradient(46% 52% at 74% 14%, rgba(34,224,255,.75), transparent 60%),
    radial-gradient(50% 58% at 18% 84%, rgba(20,120,255,.72), transparent 58%),
    radial-gradient(40% 48% at 86% 88%, rgba(70,210,225,.55), transparent 58%),
    radial-gradient(58% 62% at 42% 42%, rgba(30,110,220,.45), transparent 62%);
  filter: blur(40px);
  opacity: 1;
  mix-blend-mode: screen;
  animation: auroraDrift 22s ease-in-out infinite alternate;
}
@keyframes auroraDrift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(2%, -2%, 0) scale(1.06); }
  100% { transform: translate3d(-2%, 2%, 0) scale(1.03); }
}
.bg-grid {
  position: absolute; inset: -2px;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 50% 30%, #000 0%, rgba(0,0,0,.5) 55%, transparent 90%);
  animation: gridDrift 28s linear infinite;
}
@keyframes gridDrift { to { background-position: 46px 46px, 46px 46px; } }


#particles { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ---------- Boot ---------- */
.boot {
  position: fixed; inset: 0; z-index: 999; display: grid; place-content: center; gap: 18px;
  background: var(--bg); text-align: center;
  transition: opacity .6s var(--ease), visibility .6s;
}
.boot.is-done { opacity: 0; visibility: hidden; }
/* 暗色圆 + 呼吸式渐变外发光 */
.boot__ring {
  position: relative; width: 66px; height: 66px; margin: 0 auto;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 36%, #1b2740, #070b16 78%);
  animation: bootBreath 2.4s ease-in-out infinite;
}
.boot__ring::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  box-shadow: inset 0 0 18px rgba(0,0,0,.55);
  pointer-events: none;
}
/* 外发光呼吸 + 颜色渐变（青 → 蓝 → 紫 循环） */
@keyframes bootBreath {
  0%   { box-shadow: 0 0 16px 0 rgba(34,224,255,.35);  transform: scale(.94); }
  33%  { box-shadow: 0 0 40px 6px rgba(34,224,255,.85); }
  50%  { box-shadow: 0 0 44px 8px rgba(10,132,255,.85); transform: scale(1); }
  66%  { box-shadow: 0 0 40px 6px rgba(124,92,255,.80); }
  100% { box-shadow: 0 0 16px 0 rgba(124,92,255,.35);  transform: scale(.94); }
}
.boot__mark { font-size: 30px; font-weight: 800; letter-spacing: 4px; color: var(--text); }
.boot__dot { position: relative; display: inline-block; width: 9px; height: 9px; margin-left: 5px; border-radius: 50%;
  overflow: hidden; background: #0b6e7a; box-shadow: 0 0 14px var(--cyan); }
.boot__dot::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  transform: translateX(-120%); animation: scanX 1.2s linear infinite; }
.boot__text { font-family: var(--mono); font-size: 12px; letter-spacing: 3px; color: var(--text-mut); text-transform: uppercase; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100; height: var(--nav-h);
  display: flex; align-items: center; gap: 24px;
  padding: 0 clamp(16px, 4vw, 40px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .4s, background .4s;
}
.nav.is-scrolled { border-bottom-color: var(--line); background: color-mix(in srgb, var(--bg) 72%, transparent); }
.nav__brand { display: flex; align-items: center; gap: 12px; }
.nav__logo {
  width: 38px; height: 38px; display: grid; place-content: center;
  border-radius: 11px; background-image: url(/static/img/icon.png); background-size: cover; background-position: center;
  position: relative; overflow: hidden;
}
.nav__logo::after { content:""; position:absolute; inset:0; background:linear-gradient(120deg,transparent 40%,rgba(255,255,255,.6),transparent 60%); transform:translateX(-120%); animation: shine 4s ease-in-out infinite; }
@keyframes shine { 0%,60% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
.nav__title { display: flex; flex-direction: column; font-weight: 700; font-size: 16px; line-height: 1.1; }
.nav__title em { font-style: normal; font-family: var(--mono); font-size: 10px; letter-spacing: 2px; color: var(--text-mut); }
.nav__links { display: flex; gap: 22px; margin-left: auto; font-size: 14px; }
.nav__links a { color: var(--text-dim); position: relative; padding: 4px 0; transition: color .3s; }
.nav__links a::after { content:""; position:absolute; left:0; bottom:-2px; width:0; height:2px; background:linear-gradient(90deg,var(--blue-400),var(--cyan)); transition: width .3s var(--ease); }
.nav__links a:hover, .nav__links a.is-active { color: var(--text); }
.nav__links a:hover::after, .nav__links a.is-active::after { width: 100%; }

/* 头像按钮 */
.avatar-btn {
  width: 42px; height: 42px; border-radius: 50%; padding: 0;
  border: 1px solid var(--line); background: var(--surface); overflow: hidden;
  position: relative; transition: transform .3s var(--spring), border-color .3s, box-shadow .3s;
}
.avatar-btn::after { content: ""; position: absolute; inset: -1px; border-radius: 50%;
  box-shadow: 0 0 0 2px transparent; transition: box-shadow .3s; }
.avatar-btn:hover { transform: translateY(-2px); border-color: var(--blue-400); box-shadow: 0 0 18px var(--glow-b); }
.avatar-btn.is-auth { border-color: var(--cyan); }
.avatar-btn__img {
  width: 100%; height: 100%; display: grid; place-content: center;
  font-weight: 800; font-size: 16px; color: #fff;
  background: linear-gradient(135deg, var(--blue-500), var(--cyan)); background-size: cover; background-position: center;
}

/* ---------- Layout ---------- */
.app { min-height: 100vh; padding-top: var(--nav-h); }
.section { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--primary); display: inline-flex; align-items: center; gap: 8px; }
.eyebrow::before { content:""; width: 22px; height: 1px; background: var(--primary); }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: calc(100vh - var(--nav-h)); text-align: center;
  display: flex; flex-direction: column; align-items: center;
  /* 文字整体下移：顶部留白 ~30%，底部 ~10% 给鼠标动画 */
  padding: 30vh 0 12vh; }
.hero__badge {
  display: inline-flex; align-items: center; gap: 10px; padding: 7px 16px; margin-bottom: 26px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  font-size: 13px; color: var(--text-dim);
}
.hero__badge .dot { width: 7px; height: 7px; }
.hero__title { font-size: clamp(34px, 7.5vw, 88px); font-weight: 800; line-height: 1.05; letter-spacing: -1px; }
.hero__title .grad {
  background: linear-gradient(120deg, var(--blue-300), var(--cyan) 45%, var(--violet));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  background-size: 200% auto; animation: gradShift 6s ease infinite;
}
@keyframes gradShift { 50% { background-position: 100% center; } }
.hero__sub { max-width: 620px; margin: 24px auto 0; color: var(--text-dim); font-size: clamp(15px, 2vw, 19px); }
.hero__slogan { margin-bottom: 18px; font-size: clamp(18px, 3vw, 28px); font-weight: 700; letter-spacing: 6px; color: #cfd6e4; }
.hero__cta { display: flex; gap: 14px; justify-content: center; margin-top: 40px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 9px; padding: 13px 26px; border-radius: 999px;
  font-weight: 600; font-size: 15px; transition: transform .3s var(--spring), box-shadow .3s, background .3s;
}
.btn--primary { color: #fff; background: linear-gradient(120deg, var(--blue-500), var(--cyan)); box-shadow: 0 10px 34px -8px var(--glow-a); }
.btn--primary:hover { transform: translateY(-3px); box-shadow: 0 16px 44px -8px var(--glow-a), 0 0 0 1px var(--cyan); }
.btn--ghost { border: 1px solid var(--line); color: var(--text); background: var(--surface); }
.btn--ghost:hover { border-color: var(--blue-400); transform: translateY(-3px); }

/* scroll hint —— 鼠标动画置于开屏区底部约 10% 处 */
.scroll-hint { position: absolute; left: 50%; bottom: 10%; transform: translateX(-50%);
  width: 24px; height: 40px; border: 1px solid var(--line); border-radius: 14px; }
.scroll-hint::after { content:""; position:absolute; top:8px; left:50%; transform:translateX(-50%); width:4px; height:8px; border-radius:2px; background: var(--cyan); animation: wheel 1.6s ease infinite; }
@keyframes wheel { to { transform: translate(-50%, 14px); opacity: 0; } }

/* ---------- Section head ---------- */
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: clamp(40px,7vw,80px) 0 34px; flex-wrap: wrap; }
.head__title { font-size: clamp(26px, 4vw, 40px); font-weight: 800; letter-spacing: -.5px; }
.head__desc { color: var(--text-dim); max-width: 460px; font-size: 15px; font-weight: 600; }

/* ---------- 标签检索 chips ---------- */
.chips { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0 22px; }
.chip { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  font-size: 13px; color: var(--text-dim); transition: color .3s, border-color .3s, background .3s, box-shadow .3s; }
.chip:hover { color: var(--text); border-color: var(--blue-400); }
.chip.is-active { color: #fff; background: linear-gradient(120deg, var(--blue-500), var(--cyan)); border-color: transparent; box-shadow: 0 8px 22px -8px var(--glow-a); }
.chip__count { opacity: .7; font-size: 11px; margin-left: 5px; }

/* ---------- Work grid ---------- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; padding-bottom: 40px; }
.grid--home { grid-auto-rows: 240px; }
.grid--home .card:first-child { grid-column: span 2; grid-row: span 2; }
/* 标签切换过渡：旧内容下滑淡出，新内容上滑渐入 */
.grid--works { transition: opacity .28s var(--ease), transform .28s var(--ease); }
.grid--works.is-leaving  { opacity: 0; transform: translateY(24px); }
.grid--works.is-entering { opacity: 0; transform: translateY(-24px); transition: none; }

.card {
  position: relative; border-radius: var(--radius-lg); overflow: hidden; min-height: 240px;
  /* 用 inset box-shadow 描边代替 border，避免圆角处出现 1px 白边 */
  background: #070b16; cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--line);
  transform: translateZ(0); transition: box-shadow .5s var(--ease);
}
.card:hover { box-shadow: inset 0 0 0 1px var(--card-shine), var(--shadow-glow); }
.card__media { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; }
.card__img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .8s var(--ease), filter .5s; filter: saturate(1.05);
}
.card:hover .card__img { transform: scale(1.08); }
/* fallback gradient art when no image */
.card__art { position: absolute; inset: 0; background-size: cover; }
.card__grain { position: absolute; inset: 0; opacity: .5;
  background-image: radial-gradient(circle at 20% 30%, rgba(255,255,255,.14), transparent 40%),
    linear-gradient(135deg, transparent 40%, rgba(0,0,0,.35)); }
.card__overlay { display: none; }

/* 探灯效果已移除 */
.card__glow { display: none; }

.card__body { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px; z-index: 2; }
.card__tag { position: absolute; top: 18px; right: 18px; z-index: 3; display: inline-flex; align-items: center; gap: 7px; padding: 6px 14px; border-radius: 999px;
  font-size: 11px; letter-spacing: 1px; color: var(--text); background: rgba(10,20,40,.6); border: 1px solid rgba(122, 208, 255, .25); backdrop-filter: blur(8px); }
.card__title { font-size: clamp(19px, 2.4vw, 26px); font-weight: 800; color: #fff; letter-spacing: -.3px;
  text-shadow: 0 2px 24px rgba(0,0,0,.6); margin-bottom: 6px; }
.card__title .en { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: 2px; color: var(--blue-200); font-weight: 500; margin-top: 4px; }
.card__desc { color: #e8f0ff; font-size: 13px; margin-top: 8px; max-height: 0; opacity: 0; overflow: hidden;
  transition: max-height .5s var(--ease), opacity .4s, margin .4s, color .4s, text-shadow .4s;
  text-shadow: 0 1px 3px rgba(0,0,0,.3);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.card:hover .card__desc { max-height: 60px; opacity: 1; margin-top: 10px; color: #b8c8e0;
  text-shadow: 0 2px 8px rgba(0,0,0,.6); }

/* 首页大卡片：描述文字单行 + 省略号 */
.grid--home .card:first-child .card__desc { -webkit-line-clamp: 1; }
.card__go { position: absolute; top: 18px; right: 18px; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-content: center; background: rgba(10,20,40,.5); border: 1px solid var(--line);
  backdrop-filter: blur(6px); color: #fff; opacity: 0; transform: scale(.6) rotate(-30deg); transition: all .4s var(--spring); z-index: 3; }
.card:hover .card__go { opacity: 1; transform: none; }
.status-pill { position: absolute; top: 18px; left: 18px; z-index: 3; font-size: 10px; letter-spacing: 1px;
  padding: 4px 9px; border-radius: 999px; text-transform: uppercase; backdrop-filter: blur(6px);
  display: inline-flex; align-items: center; gap: 6px; }
.status-pill--live { color: #7dffbf; background: rgba(20,80,50,.4); border: 1px solid rgba(80,255,180,.3); }
.status-pill--wip  { color: #ffd27d; background: rgba(80,60,20,.4); border: 1px solid rgba(255,200,80,.3); }
.status-pill--soon { color: #9fb2d4; background: rgba(40,50,70,.4); border: 1px solid var(--line); }

.status-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
  animation: pulse 2s ease-in-out infinite; }
.status-pill--live .status-dot { background: #7dffbf; box-shadow: 0 0 12px rgba(125,255,191,.8), inset 0 0 6px rgba(125,255,191,.4); }
.status-pill--wip .status-dot  { background: #ffd27d; box-shadow: 0 0 12px rgba(255,210,125,.8), inset 0 0 6px rgba(255,210,125,.4); }
.status-pill--soon .status-dot { background: #9fb2d4; box-shadow: 0 0 12px rgba(159,178,212,.6), inset 0 0 6px rgba(159,178,212,.3); }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .6; }
}

/* ---------- Marquee（无缝循环横幅） ---------- */
.marquee { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  margin-top: clamp(40px,7vw,80px); padding: 18px 0; background: var(--surface); }
.marquee__track { display: flex; width: max-content; animation: marquee 26s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__group { display: flex; flex: 0 0 auto; }
.marquee__item { flex: 0 0 auto; font-size: 22px; font-weight: 800; color: var(--text-mut);
  display: inline-flex; align-items: center; padding: 0 30px; white-space: nowrap; }
.marquee__item::after { content: "✦"; color: var(--cyan); margin-left: 30px; }
/* 两组完全相同，位移 -50% 正好无缝衔接 */
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Detail page ---------- */
.detail__hero-wrap { position: relative; margin-top: 24px; }
.detail__hero { position: relative; height: clamp(280px, 45vw, 460px); border-radius: var(--radius-xl); overflow: hidden; margin-top: 0; border: 1px solid var(--line); }
.detail__hero .card__art, .detail__hero .card__img, .detail__hero .detail__cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.detail__heroveil { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(4,7,14,.1), rgba(4,7,14,.85)); }
.detail__herobody { position: absolute; left: 0; right: 0; bottom: 0; padding: clamp(24px,4vw,48px); z-index: 2; }
.detail__title { font-size: clamp(30px, 6vw, 62px); font-weight: 800; letter-spacing: -1px; color: #fff; }
.detail__en { font-family: var(--mono); color: var(--blue-200); letter-spacing: 3px; font-size: 13px; }
.detail__summary { margin-top: 22px; padding: 20px 24px; border-radius: var(--radius-lg); background: rgba(122, 208, 255, .08); border: 1px solid rgba(122, 208, 255, .18); color: var(--text); font-size: 15px; line-height: 1.7; }
.detail__tag { position: absolute; top: 18px; right: 18px; z-index: 3; display: inline-flex; align-items: center; gap: 7px; padding: 6px 14px; border-radius: 999px; font-size: 11px; letter-spacing: 1px; color: var(--text); background: rgba(10,20,40,.6); border: 1px solid rgba(122, 208, 255, .25); backdrop-filter: blur(8px); }
.detail__grid { display: grid; grid-template-columns: 1.6fr .8fr; gap: 40px; margin-top: 44px; }
.detail__lead { font-size: 18px; color: var(--text); line-height: 1.75; }
.detail__body p { color: var(--text-dim); margin-bottom: 18px; }
.detail__body h3 { margin-top: 34px; font-size: 20px; }
.detail__markdown { color: var(--text-dim); line-height: 1.85; }
.detail__markdown p { margin-bottom: 18px; }
.detail__markdown h1, .detail__markdown h2, .detail__markdown h3, .detail__markdown h4, .detail__markdown h5, .detail__markdown h6 { margin-top: 30px; color: var(--text); }
.detail__markdown ul, .detail__markdown ol { margin: 0 0 18px 22px; color: var(--text-dim); }
.detail__markdown blockquote { margin: 18px 0 0; padding: 8px 16px; border-left: 3px solid var(--cyan); color: var(--text-mut); }
.detail__markdown code { padding: 2px 6px; border-radius: 5px; background: var(--surface-2); font-family: var(--mono); }
.detail__markdown pre { margin-bottom: 18px; padding: 16px; overflow-x: auto; border-radius: var(--radius); background: var(--surface-2); }
.detail__markdown pre code { padding: 0; background: transparent; }
.detail__markdown a { color: var(--cyan); text-decoration: underline; }
.feature-list { list-style: none; margin-top: 16px; display: grid; gap: 12px; }
.feature-list li { display: flex; gap: 12px; color: var(--text-dim); }
.feature-list li::before { content: "◆"; color: var(--cyan); font-size: 12px; margin-top: 4px; }

.detail__aside { position: sticky; top: 90px; align-self: start; display: grid; gap: 18px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 22px; }
.panel h4 { font-size: 13px; letter-spacing: 2px; text-transform: uppercase; color: var(--text-mut); margin-bottom: 14px; }
.meta-row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.meta-row:last-child { border-bottom: none; }
.meta-row span:first-child { color: var(--text-mut); }
.tech-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tech-tags span { font-size: 12px; padding: 5px 11px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-dim); font-family: var(--mono); }
.links { display: grid; gap: 10px; }
.link-btn { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; border-radius: 12px; background: var(--surface-2); transition: all .3s var(--ease); font-size: 14px; }
.link-btn:hover { border-color: var(--blue-400); transform: translateX(4px); box-shadow: 0 0 0 1px var(--card-shine); }
.link-btn--primary { color: #fff; background: linear-gradient(120deg, var(--blue-500), var(--cyan)); border-color: transparent; }
.link-btn--primary:hover { box-shadow: 0 10px 30px -8px var(--glow-a); }

.back-link { display: inline-flex; align-items: center; gap: 8px; color: var(--text-dim); font-size: 14px; margin: 30px 0 4px; transition: gap .3s, color .3s; font-weight: 600; }
.back-link:hover { gap: 14px; color: var(--text); }

/* gallery */
.gallery { display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; margin-top: 20px; }
.gallery > div { aspect-ratio: 4/3; border-radius: var(--radius); border: 1px solid var(--line); background-size: cover; position: relative; overflow: hidden; }
.gallery > div::after { content:""; position:absolute; inset:0; background: linear-gradient(160deg, transparent 50%, rgba(4,7,14,.5)); }

/* next project */
.nextproj { margin: 50px 0; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 26px 30px; border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--surface); transition: all .4s; }
.nextproj:hover { border-color: var(--blue-400); box-shadow: var(--shadow-glow); }
.nextproj small { color: var(--text-mut); font-family: var(--mono); letter-spacing: 2px; }
.nextproj strong { display: block; font-size: 24px; margin-top: 4px; }

/* ---------- About page ---------- */
.about__hero { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; padding: clamp(40px,7vw,80px) 0; }
.about__avatar { position: relative; aspect-ratio: 1; border-radius: var(--radius-xl); overflow: hidden; border: 1px solid var(--line);
  background: linear-gradient(135deg, var(--blue-700), var(--violet)); box-shadow: var(--shadow-glow); }
.about__avatar .ring { position: absolute; inset: -30%; border-radius: 50%; border: 1px solid var(--line-soft); animation: spin 40s linear infinite; }
.about__avatar .ring:nth-child(2){ inset: -18%; animation-duration: 30s; animation-direction: reverse; }
.about__avatar .mono { position: absolute; inset: 0; display: grid; place-content: center; font-size: 120px; font-weight: 800; color: rgba(255,255,255,.9); text-shadow: 0 8px 40px rgba(0,0,0,.4); }
.about__intro h1 { font-size: clamp(30px,5vw,54px); font-weight: 800; line-height: 1.1; letter-spacing: -1px; }
.about__intro p { color: var(--text-dim); margin-top: 20px; font-size: 16px; }
.about__quote { border-left: 2px solid var(--cyan); padding-left: 18px; margin-top: 26px; font-size: 18px; color: var(--text); font-style: italic; }

.timeline { position: relative; margin-top: 20px; padding-left: 26px; }
.timeline::before { content:""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 1px; background: linear-gradient(var(--blue-400), transparent); }
.tl-item { position: relative; padding: 14px 0; }
.tl-item::before { content:""; position: absolute; left: -25px; top: 20px; width: 11px; height: 11px; border-radius: 50%; background: var(--bg); border: 2px solid var(--cyan); box-shadow: 0 0 12px var(--glow-b); }
.tl-item time { font-family: var(--mono); font-size: 12px; color: var(--primary); letter-spacing: 1px; }
.tl-item h4 { font-size: 17px; margin-top: 3px; }
.tl-item p { color: var(--text-dim); font-size: 14px; margin-top: 2px; }

.skills { display: grid; grid-template-columns: repeat(auto-fit,minmax(150px,1fr)); gap: 14px; margin-top: 20px; }
.skill { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; background: var(--surface); transition: all .4s; }
.skill:hover { transform: translateY(-5px); border-color: var(--blue-400); box-shadow: var(--shadow-glow); }
.skill__icon { width: 40px; height: 40px; border-radius: 11px; display: grid; place-content: center; font-size: 20px;
  background: linear-gradient(135deg, var(--blue-600), var(--cyan)); margin-bottom: 12px; box-shadow: 0 0 18px var(--glow-b); }
.skill h4 { font-size: 15px; }
.skill p { font-size: 13px; color: var(--text-mut); margin-top: 4px; }

/* ---------- Shared bits ---------- */
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
/* 横向扫描：一道亮光从左到右扫过状态点 */
.dot--live { position: relative; overflow: hidden; background: #2a8f60; box-shadow: 0 0 10px rgba(77,255,160,.5); }
.dot--live::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, #7dffbf, transparent);
  transform: translateX(-120%);
  animation: scanX 2s linear infinite;
}
@keyframes scanX { to { transform: translateX(120%); } }

/* ---------- Friends 友站 ---------- */
.friends-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin: 8px 0 20px; }
.friend { display: flex; gap: 16px; align-items: center; padding: 18px; border-radius: var(--radius-lg);
  border: 1px solid var(--line); background: var(--surface); transition: all .4s var(--ease); }
.friend:hover { transform: translateY(-4px); border-color: var(--blue-400); box-shadow: var(--shadow-glow); }
.friend__mark { flex: 0 0 auto; width: 54px; height: 54px; border-radius: 14px; display: grid; place-content: center;
  font-weight: 800; font-size: 22px; color: #fff; box-shadow: 0 0 18px var(--glow-b); }
.friend__name { font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.friend__go { color: var(--primary); font-size: 13px; }
.friend__url { display: block; font-family: var(--mono); font-size: 12px; color: var(--primary); margin: 3px 0; }
.friend__desc { font-size: 13px; color: var(--text-dim); }

/* ---------- Account 账号（登录 / 注册） ---------- */
.auth { display: flex; justify-content: center; padding: clamp(30px,6vw,70px) clamp(16px,4vw,40px) 60px; }
.auth__card { width: 100%; max-width: 440px; border: 1px solid var(--line); border-radius: var(--radius-xl);
  background: var(--surface-2); padding: clamp(24px,4vw,38px); box-shadow: var(--shadow-glow); }
.auth__brand { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.auth__brand b { display: block; font-size: 18px; }
.auth__brand em { font-style: normal; font-family: var(--mono); font-size: 10px; letter-spacing: 1px; color: var(--text-mut); }
.auth__tabs { position: relative; display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line);
  border-radius: 999px; padding: 5px; margin-bottom: 22px; overflow: hidden; }
.auth__ink { position: absolute; top: 5px; bottom: 5px; left: 5px; width: calc(50% - 5px); border-radius: 999px;
  background: linear-gradient(120deg, var(--blue-500), var(--cyan)); transition: transform .35s var(--spring); z-index: 0; }
.auth__tab { position: relative; z-index: 1; padding: 9px 0; border-radius: 999px; font-weight: 600; font-size: 14px;
  color: var(--text-dim); transition: color .3s; }
.auth__tab.is-active { color: #fff; }
.auth__form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field span { font-size: 13px; color: var(--text-mut); }
.field input { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg-2); color: var(--text); font-size: 15px; font-family: inherit; transition: border-color .3s, box-shadow .3s; }
.field input:focus { outline: none; border-color: var(--blue-400); box-shadow: 0 0 0 3px var(--glow-b); }
.field input::placeholder { color: var(--text-mut); }
.auth__err { min-height: 18px; margin: -4px 0 2px; font-size: 13px; color: #ff8080; }
.auth__submit { justify-content: center; margin-top: 4px; }
.auth__hint { margin-bottom: 18px; font-size: 12px; color: var(--text-mut); text-align: center; line-height: 1.7; }

.profile__top { display: flex; align-items: center; gap: 18px; }
.profile__avatar { width: 66px; height: 66px; border-radius: 50%; display: grid; place-content: center;
  font-size: 28px; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--blue-500), var(--cyan)); box-shadow: 0 0 24px var(--glow-b); }
.profile__top h2 { font-size: 22px; }
.profile__top code { font-family: var(--mono); font-size: 13px; color: var(--primary); }

/* ---------- Footer ---------- */
.foot { position: relative; margin-top: 60px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 60%, transparent); }
.foot__inner { max-width: var(--maxw); margin: 0 auto; padding: 40px clamp(16px,4vw,40px);
  display: grid; grid-template-columns: 2fr 1fr; gap: 36px; align-items: flex-start; }
.foot__logo { font-size: 22px; font-weight: 800; line-height: 1.2; }
.foot__slogan { color: var(--text-dim); margin-top: 8px; font-size: 14px; line-height: 1.5; }
.foot__col a { display: block; color: var(--text-dim); font-size: 14px; padding: 0; transition: color .3s; line-height: 1.8; }
.foot__col a:hover { color: var(--text); }
.foot__col--links { text-align: right; display: flex; flex-direction: column; align-items: flex-end; }
.foot__nav-title { font-size: 22px; font-weight: 800; line-height: 1.2; color: var(--text); margin-bottom: 0; }
.foot__status { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-dim); }
.foot__mini { font-family: var(--mono); font-size: 12px; color: var(--text-mut); margin-top: 10px; }
.foot__flow { height: 3px; background: linear-gradient(90deg, transparent, var(--blue-500), var(--cyan), var(--violet), transparent);
  background-size: 200% 100%; animation: gradShift 5s linear infinite; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .grid--home { grid-auto-rows: auto; }
  .grid--home .card:first-child { grid-column: span 2; grid-row: auto; }
  .detail__grid { grid-template-columns: 1fr; }
  .detail__aside { position: static; }
  .about__hero { grid-template-columns: 1fr; }
  .nav__links { gap: 16px; font-size: 13px; }
  .gallery { grid-template-columns: repeat(2,1fr); }
  .friends-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .grid, .grid--home { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .grid--home .card:first-child { grid-column: auto; aspect-ratio: auto; }
  .nav__title { display: none; }
  .gallery { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ============================================================
   SSG 门户补充样式（真实图片 + View Transitions + 进场）
   ============================================================ */

/* 页面级切换动画（共享元素）*/
.hero__title {
  view-transition-name: page-hero-title;
}
.head__title {
  view-transition-name: page-list-title;
}

.hero__badge {
  view-transition-name: page-badge;
}

/* 卡片封面图（替代原型的渐变 art） */
.card__cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 详情页封面大图 */
.detail__cover {
  width: 100%;
  border-radius: 16px;
  object-fit: cover;
  display: block;
}

/* 友站 LOGO */
.friend__logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
}

/* 画廊图 */
.gallery img {
  width: 100%;
  border-radius: 10px;
  object-fit: cover;
}

/* 进场动画（reveal → is-in） */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .5s var(--ease, ease), transform .5s var(--ease, ease);
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* View Transitions：共享标题过渡（like 卡片→详情） */
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-group(page-title) {
    animation-duration: .35s;
    animation-timing-function: var(--ease, cubic-bezier(.22,.61,.36,1));
  }
}

/* 尊重减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}
