/* ============================================================
   SKYLER — SIGNAL ARCHIVE
   dark FUI / 文字与线 aesthetic
   ============================================================ */

:root {
  color-scheme: dark;
  --bg: #070707;
  --bg-2: #0c0c0c;
  --ink: #ededed;
  --ink-dim: #7e7e7e;
  --ink-soft: #565656; /* 最暗可读层：用于次级文字（--ink-faint 只用于线框） */
  --ink-faint: #2e2e2e;
  /* 全站 monochrome：强调色 = 白 */
  --acid: #ededed;
  --line: rgba(237, 237, 237, 0.85);
  --line-dim: rgba(237, 237, 237, 0.22);
  --mono: "IBM Plex Mono", "Courier New", monospace;
  --disp: "Archivo", "Helvetica Neue", sans-serif;
  --jp: "Noto Sans JP", sans-serif;
  --zh: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --bar-h: 46px;
  --pad: clamp(16px, 4vw, 56px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--disp);
  font-weight: 400;
  cursor: crosshair;
  overflow-x: hidden;
  min-height: 100vh;
}

a, button, .card.is-link, #lbImg {
  cursor: crosshair;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.skip-link {
  position: fixed; top: -100%; left: 12px; z-index: 300;
  padding: 8px 14px;
  background: var(--acid); color: var(--bg);
  font-size: 11px; letter-spacing: 0.1em;
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus, .skip-link:focus-visible { top: 8px; }

::selection { background: var(--acid); color: var(--bg); }

.mono { font-family: var(--mono); }
.jp { font-family: var(--jp); font-weight: 300; }
.ok { color: var(--acid); }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- atmosphere ---------- */
.grain {
  position: fixed; inset: -140px;
  pointer-events: none; z-index: 80;
  /* 140px 原生尺寸平铺 + 去色：细颗粒胶片噪点，不会被拉伸成粗块 */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 140px 140px;
  opacity: 0.055;
  animation: grain-shift 0.8s steps(4) infinite;
}
/* 触屏设备降低噪点动画频率，省电省合成开销（保留胶片感） */
@media (hover: none) and (pointer: coarse) {
  .grain { animation-duration: 2.4s; }
}
@keyframes grain-shift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-35px, 18px); }
  50% { transform: translate(20px, -30px); }
  75% { transform: translate(-18px, 32px); }
  100% { transform: translate(34px, 15px); }
}
.vignette {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 79;
  background: radial-gradient(ellipse 90% 85% at 50% 45%, transparent 60%, rgba(0,0,0,0.55) 100%);
}

/* ---------- boot overlay ---------- */
#boot {
  position: fixed; inset: 0; z-index: 200;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.55s cubic-bezier(0.85, 0, 0.15, 1);
  /* 纯 CSS 保险：JS 挂掉时 5s 后自动隐藏（正常流程 ~2.2s 内已被 JS 移除） */
  animation: boot-failsafe 0s 5s forwards;
}
@keyframes boot-failsafe { to { visibility: hidden; pointer-events: none; } }
#boot.done { transform: translateY(-101%); }
#boot.killed { display: none; }
.boot-inner { font-size: clamp(11px, 1.6vw, 14px); color: var(--ink-dim); }
.boot-line {
  opacity: 0;
  animation: boot-in 0.05s linear forwards;
  white-space: nowrap;
  letter-spacing: 0.04em;
}
.boot-line:nth-child(1) { animation-delay: 0.10s; color: var(--ink); }
.boot-line:nth-child(2) { animation-delay: 0.38s; }
.boot-line:nth-child(3) { animation-delay: 0.66s; }
.boot-line:nth-child(4) { animation-delay: 0.94s; }
@keyframes boot-in { to { opacity: 1; } }

/* ---------- narrow top bar ---------- */
#topbar {
  position: sticky; top: 0; z-index: 100;
  height: var(--bar-h);
  display: flex; align-items: center; gap: clamp(10px, 3vw, 40px);
  padding: 0 var(--pad);
  background: rgba(7, 7, 7, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-dim);
  font-size: 11px;
  letter-spacing: 0.08em;
}
.brand {
  color: var(--ink); text-decoration: none; font-weight: 700;
  white-space: nowrap;
}
.spin-ast {
  display: inline-block; color: var(--acid);
  animation: spin 7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.tabs { display: flex; gap: 2px; height: 100%; }
.tab {
  appearance: none; background: none; border: none;
  border-left: 1px solid var(--line-dim);
  color: var(--ink-dim);
  font-size: 11px; letter-spacing: 0.1em;
  padding: 0 clamp(10px, 2.4vw, 26px);
  height: 100%;
  transition: color 0.2s, background 0.2s;
  position: relative;
  /* tab 是 <a>：填满栏高、去下划线 */
  display: inline-flex; align-items: center;
  text-decoration: none;
}
.tab:last-child { border-right: 1px solid var(--line-dim); }
.tab .t-num { color: var(--ink-soft); margin-right: 4px; transition: color 0.2s; }
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--bg); background: var(--ink); font-weight: 700; }
.tab.is-active .t-num { color: var(--bg); }
.tab:focus-visible, .brand:focus-visible {
  outline: 1px solid var(--acid); outline-offset: -1px;
}

.bar-meta {
  margin-left: auto;
  display: flex; gap: 18px; align-items: center;
  color: var(--ink-dim); white-space: nowrap;
}
.status { display: flex; align-items: center; gap: 6px; color: var(--ink); }
.dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 8px var(--acid);
  animation: blink 1.6s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0.25; } }

/* ---------- views ---------- */
.view { display: none; padding: 0 var(--pad) 40px; }
.view.is-active { display: block; animation: view-in 0.45s ease both; }
@keyframes view-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* ---------- hero ---------- */
.hero {
  padding: clamp(20px, 3.5vh, 36px) 0 16px;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 520px);
  grid-template-areas:
    "readout pill"
    "title   pill"
    "tags    pill"
    "stats   stats";
  column-gap: clamp(24px, 6vw, 90px);
}
.hero-readout { grid-area: readout; }
.hero-title { grid-area: title; align-self: end; }
.hero-tags { grid-area: tags; align-self: center; }
.hero-readout {
  display: flex; gap: 22px; flex-wrap: wrap;
  font-size: 11px; letter-spacing: 0.14em;
  color: var(--ink-dim);
  margin-bottom: 14px;
}
.hero-readout em { font-style: normal; color: var(--acid); animation: blink 2.2s steps(2) infinite; }

.hero-title {
  font-family: var(--disp);
  font-weight: 900;
  font-stretch: 125%;
  font-size: clamp(44px, 9vw, 128px);
  line-height: 0.88;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  user-select: none;
}
.hero-title .hollow { color: var(--ink); }
@supports (-webkit-text-stroke: 1px black) {
  .hero-title .hollow {
    color: transparent;
    -webkit-text-stroke: 2px var(--ink);
  }
}
.hero-title .solid { color: var(--ink); }

.hero-tags {
  display: flex; gap: clamp(14px, 4vw, 44px); flex-wrap: wrap;
  margin-top: 12px;
  font-size: 11px; letter-spacing: 0.12em;
  color: var(--ink-dim);
}
.tag-line { position: relative; padding-left: 18px; }
.tag-line::before {
  content: ""; position: absolute; left: 0; top: 50%;
  width: 12px; height: 1px; background: var(--ink-dim);
}

.pill-box {
  grid-area: pill;
  width: 100%; max-width: 520px;
  justify-self: end; align-self: end;
}
.pill-scroll { width: 100%; }
.pill-wrap {
  width: 100%;
  margin: 0;
  /* button reset */
  appearance: none; background: none; border: none; padding: 0;
  display: block; text-align: left;
}
.pill-hint {
  display: block; text-align: right;
  margin-top: 6px;
  font-size: 10px; letter-spacing: 0.16em;
  color: var(--ink-dim);
}
.pill-wrap:focus-visible { outline: 1px solid var(--acid); outline-offset: 5px; }
.pill-wrap:hover .ln { stroke: var(--ink); }
.pill.glitch { animation: pill-glitch 0.28s steps(3) both; }
@keyframes pill-glitch {
  0% { opacity: 1; }
  25% { opacity: 0.2; transform: translateX(2px); }
  55% { opacity: 0.7; transform: translateX(-2px); }
  100% { opacity: 1; transform: none; }
}
.pill { width: 100%; height: auto; display: block; }
.pill .ln { stroke: var(--line); stroke-width: 1.5; fill: none; }
.pill .fillw { fill: var(--line); }
.pill .dotted { stroke-dasharray: 2 7; }
.pill .svgmono { font-family: var(--mono); font-size: 17px; fill: var(--ink); letter-spacing: 0.08em; }
.pill .svgbig { font-family: var(--disp); font-weight: 900; font-stretch: 110%; font-size: 38px; fill: var(--ink); letter-spacing: 0.02em; }
.pill .svgjp { font-family: var(--jp); font-weight: 300; font-size: 17px; fill: var(--ink); letter-spacing: 0.2em; }
.pill .svgdim { fill: var(--ink-dim); }
.pill .rotor {
  animation: spin 9s linear infinite;
  transform-origin: 660px 80px;
}
.pill .flow { stroke-dasharray: 6 5; animation: dashflow 1.4s linear infinite; }
@keyframes dashflow { to { stroke-dashoffset: -22; } }

.hero-stats {
  grid-area: stats;
  justify-self: end; align-self: center;
  display: flex; gap: clamp(14px, 2vw, 28px); flex-wrap: wrap;
  justify-content: flex-end;
  margin-top: 12px;
  font-size: 11px; letter-spacing: 0.12em; color: var(--ink-dim);
}
.hero-stats em { font-style: normal; color: var(--ink); }

/* ---------- ticker ---------- */
.ticker {
  border-top: 1px solid var(--line-dim);
  border-bottom: 1px solid var(--line-dim);
  overflow: hidden;
  margin: 10px calc(-1 * var(--pad)) 0;
  padding: 9px 0;
}
.ticker-track {
  display: inline-flex; gap: 0;
  white-space: nowrap;
  font-size: 11px; letter-spacing: 0.22em;
  color: var(--ink-dim);
  animation: ticker-run 60s linear infinite; /* 4 份词条、速度与 2 份 30s 等价 */
  will-change: transform;
}
.ticker-track span { padding: 0 18px; }
.ticker-track .ast { color: var(--ink-dim); }
@keyframes ticker-run { to { transform: translateX(-50%); } }

/* ---------- project rows ---------- */
#projects { padding-top: clamp(18px, 3vh, 32px); }

.project { margin-bottom: clamp(44px, 9vh, 96px); }

.project-head {
  display: flex; align-items: baseline;
  column-gap: clamp(12px, 2.5vw, 28px); row-gap: 0;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.p-index {
  font-size: 11px; color: var(--line); letter-spacing: 0.14em;
  border: 1px solid var(--line-dim);
  padding: 3px 8px;
}
.p-title {
  font-weight: 900; font-stretch: 118%;
  font-size: clamp(22px, 5.4vw, 58px);
  line-height: 1; text-transform: uppercase;
  letter-spacing: 0.005em;
}
.p-title .p-zh {
  font-family: var(--jp); font-weight: 300;
  font-size: 0.38em; letter-spacing: 0.3em;
  color: var(--ink-dim); margin-left: 12px;
  vertical-align: 0.35em;
}
/* meta 固定为标题下的第二行：右对齐 + 细线，避免随意折行漂浮 */
.p-meta {
  margin-left: 0; width: 100%;
  display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
  justify-content: flex-end;
  border-top: 1px solid var(--line-dim);
  padding-top: 7px; margin-top: 10px;
  font-size: 10.5px; letter-spacing: 0.12em; color: var(--ink-dim);
}
.chip {
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--ink);
  padding: 2px 10px;
  font-size: 10px;
}
.chip.is-active { background: var(--acid); border-color: var(--acid); color: var(--bg); font-weight: 700; }
.chip.is-archived { color: var(--ink-dim); border-color: var(--line-dim); }

/* strip + marquee */
.strip {
  position: relative;
  border-top: 1px solid var(--line-dim);
  border-bottom: 1px solid var(--line-dim);
  padding: 16px 0;
  margin: 0 calc(-1 * var(--pad));
  overflow: hidden;
}
.strip::before, .strip::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: clamp(20px, 6vw, 90px);
  z-index: 2; pointer-events: none;
}
.strip::before { left: 0; background: linear-gradient(90deg, var(--bg), transparent); }
.strip::after { right: 0; background: linear-gradient(-90deg, var(--bg), transparent); }

.track {
  display: flex;
  width: max-content;
  animation: marquee var(--dur, 60s) linear infinite;
  will-change: transform;
}
.half { display: flex; gap: 14px; padding-right: 14px; flex: none; }
.track.rev { animation-name: marquee-rev; }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes marquee-rev { from { transform: translateX(-50%); } to { transform: translateX(0); } }
.strip:hover .track, .strip:focus-within .track,
.strip.is-paused .track, .strip.is-offview .track { animation-play-state: paused; }

/* 键盘焦点模式：停掉位移，改为可滚动容器，保证焦点卡片可见 */
.strip.kb { overflow-x: auto; scrollbar-width: none; }
.strip.kb::-webkit-scrollbar { display: none; }
.strip.kb .track { animation: none; }

/* 纯触屏：不跑 marquee，作品条直接手动滑动 */
@media (hover: none) and (pointer: coarse) {
  .track { animation: none; }
  .strip { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .strip::-webkit-scrollbar { display: none; }
}

.strip-toggle {
  appearance: none; background: none;
  border: 1px solid var(--line-dim); border-radius: 99px;
  color: var(--ink-dim);
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.14em;
  padding: 4px 12px; min-height: 24px;
  transition: border-color 0.2s, color 0.2s, background-color 0.2s;
}
.strip-toggle:hover { border-color: var(--line); color: var(--ink); }
/* 粗指针：视觉不变，命中区扩到 ~44px */
@media (pointer: coarse) {
  .strip-toggle { position: relative; }
  .strip-toggle::before { content: ""; position: absolute; inset: -10px; border-radius: 99px; }
}
.strip-toggle.is-on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.strip-toggle:focus-visible { outline: 1px solid var(--acid); outline-offset: 2px; }

/* ---------- cards ---------- */
.card {
  position: relative;
  width: max-content;
  flex: none;
}
.card .frame {
  position: relative;
  height: clamp(170px, 26vh, 250px);
  border: 1px solid var(--line-dim);
  background: var(--bg-2);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.25s;
}
.card img {
  height: 100%; width: auto; display: block;
  max-width: 70vw; object-fit: cover;
  filter: saturate(0.92);
  transition: filter 0.3s, transform 0.45s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.card.is-link { cursor: crosshair; }
.card.is-link:hover .frame, .card.is-link:focus-visible .frame { border-color: var(--line); }
.card.is-link:hover img { filter: saturate(1.05); transform: scale(1.03); }
.card:focus-visible { outline: 1px solid var(--acid); outline-offset: 3px; }

.card figcaption {
  display: flex; justify-content: space-between; gap: 14px;
  margin-top: 7px;
  font-size: 10px; letter-spacing: 0.12em;
  color: var(--ink-dim);
}
.card figcaption .fid { color: var(--ink-soft); }

/* corner brackets */
.corner {
  position: absolute; width: 10px; height: 10px;
  border: 0 solid var(--line);
  opacity: 0; transition: opacity 0.2s, transform 0.25s;
  pointer-events: none;
}
.c-tl { top: -1px; left: -1px; border-top-width: 1.5px; border-left-width: 1.5px; }
.c-tr { top: -1px; right: -1px; border-top-width: 1.5px; border-right-width: 1.5px; }
.c-bl { bottom: -1px; left: -1px; border-bottom-width: 1.5px; border-left-width: 1.5px; }
.c-br { bottom: -1px; right: -1px; border-bottom-width: 1.5px; border-right-width: 1.5px; }
.card.is-link:hover .corner, .card.is-link:focus-visible .corner,
.avatar-frame .corner, .lb-frame .corner { opacity: 1; }

/* placeholder art (无图时) */
.ph {
  height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px;
  color: var(--ink-dim);
  padding: 0 26px;
}
.ph svg { width: 56px; height: 56px; }
.ph .ln { stroke: var(--ink-dim); stroke-width: 1.4; fill: none; }
.ph .fl { fill: var(--ink-dim); }
.ph-label {
  font-family: var(--mono);
  font-size: 9.5px; letter-spacing: 0.18em;
  text-align: center; line-height: 1.7;
  color: var(--ink-dim);
}
.ph-label b { display: block; color: var(--ink-dim); font-weight: 400; }
.ph .hand { transform-origin: 50% 50%; animation: spin 6s linear infinite; }
.ph-a { aspect-ratio: 4 / 5; }
.ph-b { aspect-ratio: 1 / 1; }
.ph-c { aspect-ratio: 4 / 3; }

/* 作品 vs 占位：真作品放大（仅桌面，640px 以下仍走 150px 移动规则） */
@media (min-width: 641px) {
  .project.has-art .card .frame { height: clamp(220px, 36vh, 400px); }
}
/* 纯占位项目整体压缩，让位给真实作品 */
.project.is-empty .p-title { font-size: clamp(20px, 3.8vw, 40px); }
.project.is-empty .card .frame { height: clamp(110px, 15vh, 150px); }
.project.is-empty .ph { padding: 0 14px; gap: 8px; }
.project.is-empty .ph svg { width: 32px; height: 32px; }
.project.is-empty .ph-label { font-size: 8.5px; letter-spacing: 0.1em; }

/* ---------- view heads (fanart / about) ---------- */
.view-head {
  padding: clamp(40px, 7vh, 76px) var(--pad) 16px;
  margin: 0 calc(-1 * var(--pad));
  border-bottom: 1px solid var(--line-dim);
}
.vh-readout {
  display: flex; gap: 12px; align-items: center;
  font-size: 11px; letter-spacing: 0.16em; color: var(--ink-dim);
  margin-bottom: 12px;
}
.chip-idle {
  border: 1px solid var(--line-dim); border-radius: 99px;
  padding: 2px 10px; font-size: 9.5px; color: var(--ink-dim);
}
.view-title {
  font-weight: 900; font-stretch: 122%;
  font-size: clamp(46px, 10vw, 130px);
  line-height: 0.92; text-transform: uppercase;
}
.vh-sub {
  margin-top: 14px;
  font-size: 11px; letter-spacing: 0.14em; color: var(--ink-dim);
}

/* ---------- fanart grid ---------- */
.filterbar {
  display: flex; gap: 8px; flex-wrap: wrap;
  padding: 22px 0 26px;
}
.fbtn {
  appearance: none; background: none;
  border: 1px solid var(--line-dim); border-radius: 99px;
  color: var(--ink-dim);
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em;
  padding: 6px 16px;
  transition: border-color 0.2s, color 0.2s, background-color 0.2s;
}
.fbtn { min-height: 36px; }
.fbtn:hover { border-color: var(--line); color: var(--ink); }
.fbtn.is-on { background: var(--ink); border-color: var(--ink); color: var(--bg); font-weight: 700; }
.fbtn:focus-visible { outline: 1px solid var(--acid); outline-offset: 2px; }

.fan-grid {
  columns: 4 240px;
  column-gap: 14px;
}
.fan-grid .card { width: 100%; margin: 0 0 14px; break-inside: avoid; display: block; }
.fan-grid .card .frame { height: auto; }
.fan-grid .card img { width: 100%; height: auto; max-width: none; }
.fan-grid .ph { padding: 0; }
.fan-grid .ph-a, .fan-grid .ph-b, .fan-grid .ph-c { width: 100%; height: auto; }

/* ---------- about ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(240px, 330px) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 70px);
  padding-top: clamp(26px, 5vh, 50px);
  align-items: start;
}
/* min-content 不许撑破容器（窄屏上 svg/img 会虚增最小宽度） */
.about-grid > * { min-width: 0; }
.about-card {
  border: 1px solid var(--line-dim);
  padding: 18px;
  position: sticky; top: calc(var(--bar-h) + 20px);
  background: rgba(12, 12, 12, 0.5);
}
.avatar-frame {
  position: relative;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line-dim);
  background: var(--bg-2);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.avatar-frame img { width: 100%; height: 100%; object-fit: cover; }
.avatar-frame .ph-ava {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em;
  color: var(--ink-dim); text-align: center; line-height: 2;
}
/* 满高图层 + translateY：合成器动画，不触发布局 */
.scanline {
  position: absolute; inset: 0;
  pointer-events: none;
  animation: scan 3.2s ease-in-out infinite;
}
.scanline::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: var(--acid);
  box-shadow: 0 0 12px var(--acid);
  opacity: 0.6;
}
@keyframes scan {
  0%, 100% { transform: translateY(8%); }
  50% { transform: translateY(92%); }
}
.spec { margin-top: 16px; font-size: 11px; letter-spacing: 0.1em; }
.spec > div {
  display: flex; justify-content: space-between;
  padding: 7px 2px;
  border-bottom: 1px dashed var(--line-dim);
}
.spec dt { color: var(--ink-dim); }
.spec dd { color: var(--ink); }

.clocks { display: flex; gap: 8px; margin-top: 16px; }
.clockbox {
  flex: 1; aspect-ratio: 1/1;
  border: 1px solid var(--line-dim);
  display: flex; align-items: center; justify-content: center;
  padding: 6px;
}
.clockbox.dark { background: var(--ink); }
.clockbox.dark .ln { stroke: var(--bg); }
.clockbox svg { width: 100%; height: 100%; }
.clockbox .ln { stroke: var(--line); stroke-width: 1.5; fill: none; }
.clockbox .hand { transform-origin: 24px 24px; }
.hand.h1 { animation: spin 12s linear infinite; }
.hand.h2 { animation: spin 8s linear infinite reverse; }
.hand.h3 { animation: spin 20s linear infinite; }

.about-body { max-width: 720px; }
.bio-main {
  font-family: var(--disp); font-weight: 500;
  font-size: clamp(16px, 2.1vw, 21px);
  line-height: 1.75; letter-spacing: 0.01em;
}
.bio-deco {
  margin-top: 14px;
  font-family: var(--jp); font-weight: 300;
  font-size: 11px; line-height: 1.9; letter-spacing: 0.28em;
  color: var(--ink-dim);
}
.ab-h {
  margin: clamp(30px, 5vh, 48px) 0 16px;
  font-size: 13px; letter-spacing: 0.2em; color: var(--ink);
  border-bottom: 1px solid var(--line-dim);
  padding-bottom: 8px;
  display: flex; justify-content: space-between;
}
.ab-h .jp { color: var(--ink-soft); font-size: 11px; letter-spacing: 0.3em; }

/* 经历 / 学历 / 奖项 — 日志行 */
.xp {
  border-bottom: 1px dashed var(--line-dim);
  padding: 13px 2px;
}
.xp-row {
  display: flex; align-items: baseline;
  gap: 8px 16px; flex-wrap: wrap;
  font-size: 11px; letter-spacing: 0.1em;
}
.xp-period { color: var(--ink-dim); min-width: 150px; }
.xp-co { color: var(--ink); font-weight: 700; font-size: 13px; }
.xp-role { color: var(--ink-dim); }
.xp-note {
  margin-top: 7px;
  font-size: 10.5px; line-height: 1.8; letter-spacing: 0.06em;
  color: var(--ink-dim);
  max-width: 640px;
}

/* 能力芯片 */
.skill-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-chip {
  border: 1px solid var(--line-dim);
  padding: 7px 14px;
  font-size: 10.5px; letter-spacing: 0.12em;
  color: var(--ink);
}

.links { display: flex; flex-wrap: wrap; gap: 10px; }
.links .dead {
  border: 1px dashed var(--ink-faint);
  color: var(--ink-dim);
  font-size: 11px; letter-spacing: 0.12em;
  padding: 9px 18px;
  cursor: default;
}
.links a {
  border: 1px solid var(--line-dim);
  color: var(--ink); text-decoration: none;
  font-size: 11px; letter-spacing: 0.12em;
  padding: 9px 18px;
  position: relative;
  transition: border-color 0.2s, color 0.2s, background-color 0.2s;
}
.links a::after { content: " ↗"; color: var(--ink-soft); transition: color 0.2s; }
.links a:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.links a:hover::after { color: var(--bg); }
.links a:focus-visible { outline: 1px solid var(--acid); outline-offset: 2px; }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- footer ---------- */
footer {
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  flex-wrap: wrap;
  padding: 18px var(--pad) 22px;
  border-top: 1px solid var(--line-dim);
  font-size: 10px; letter-spacing: 0.16em;
  color: var(--ink-dim);
}
footer .ast { color: var(--ink-dim); }

/* ---------- lightbox ---------- */
#lightbox {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(5, 5, 5, 0.93);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; gap: 18px;
  padding: 5vh 4vw;
  touch-action: none; /* 背景不吃滚动手势 */
}
#lightbox[hidden] { display: none; }
.lb-stage { max-width: min(86vw, 1100px); text-align: center; touch-action: pan-y; }
.lb-frame { position: relative; display: inline-block; border: 1px solid var(--line-dim); }
#lbImg { max-width: 80vw; max-height: 74vh; display: block; -webkit-user-drag: none; user-select: none; }
#lbCap {
  margin-top: 12px;
  font-size: 10.5px; letter-spacing: 0.16em; color: var(--ink-dim);
}
#lbCap em { font-style: normal; color: var(--acid); }
.lb-close, .lb-prev, .lb-next {
  appearance: none; background: none;
  border: 1px solid var(--line-dim);
  color: var(--ink);
  font-size: 13px; padding: 10px 14px;
  transition: background-color 0.2s, color 0.2s;
}
.lb-close { position: absolute; top: 18px; right: 18px; font-size: 11px; letter-spacing: 0.1em; }
.lb-close:hover, .lb-prev:hover, .lb-next:hover,
.lb-close:active, .lb-prev:active, .lb-next:active { background: var(--ink); color: var(--bg); }
.lb-prev:focus-visible, .lb-next:focus-visible, .lb-close:focus-visible { outline: 1px solid var(--acid); }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .bar-meta .ver { display: none; }
  /* hero 回到单列堆叠 */
  .hero {
    grid-template-columns: 1fr;
    grid-template-areas: "readout" "title" "tags" "pill" "stats";
  }
  .pill-box { justify-self: start; margin-top: 16px; }
  .pill-hint { text-align: left; }
  .hero-stats { justify-self: start; justify-content: flex-start; }
  .about-grid { grid-template-columns: minmax(0, 1fr); }
  .about-card { position: static; max-width: min(420px, 100%); }
  .p-meta { justify-content: flex-start; }
}
@media (max-width: 640px) {
  #topbar { gap: 10px; padding: 0 12px; }
  .bar-meta #clock { display: none; }
  .brand { font-size: 10px; }
  .tabs { flex: 1; }
  .tab { font-size: 11px; padding: 0 8px; letter-spacing: 0.06em; flex: 1 0 auto; white-space: nowrap; }
  .tab .t-num { display: none; }
  .hero-readout { gap: 12px; }
  .card .frame { height: 150px; }
  .fan-grid { columns: 2 140px; }
  /* 触控目标 + 简历小字提级 */
  .filterbar { gap: 10px; }
  .fbtn { min-height: 44px; padding: 10px 18px; font-size: 11.5px; }
  .xp-row { font-size: 12px; }
  .xp-note { font-size: 12px; letter-spacing: 0.04em; }
  .xp-period { min-width: 100%; }
  .p-title .p-zh { display: block; margin: 6px 0 0; }
  .avatar-frame { max-width: 240px; margin-inline: auto; }
  .clocks { display: none; }
  /* pill 图横向滚动而不是缩成糊：保持文字可读。滚动容器在按钮外层 +
     右缘渐隐提示还有内容可滑 */
  .pill-scroll {
    overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent);
    mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent);
  }
  .pill-scroll::-webkit-scrollbar { display: none; }
  .pill { min-width: 560px; }
  /* 灯箱：prev/next 换行到图片下方，保持可点 */
  #lightbox { flex-wrap: wrap; align-content: center; row-gap: 12px; }
  .lb-stage { order: 1; flex-basis: 100%; }
  .lb-prev { order: 2; }
  .lb-next { order: 3; }
  .lb-prev, .lb-next { min-width: 64px; min-height: 44px; }
  .lb-close { min-width: 44px; min-height: 44px; }
  #lbImg { max-height: 64vh; }
}
@media (max-width: 400px) {
  .bar-meta { display: none; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .track { animation: none; }
  .strip { overflow-x: auto; }
  .ticker-track { animation: none; }
  #boot { display: none; }
  .reveal { opacity: 1; transform: none; }
}
