/* 自托管字体(按站点用字子集化;改文案后运行 tools/make-fonts.py 重新生成) */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/inter-400.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/inter-500.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/inter-600.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/inter-700.woff2') format('woff2'); }
@font-face { font-family: 'Noto Sans SC'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/noto-400.woff2') format('woff2'); }
@font-face { font-family: 'Noto Sans SC'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/noto-500.woff2') format('woff2'); }
@font-face { font-family: 'Noto Sans SC'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/noto-700.woff2') format('woff2'); }
/* ==========================================================================
   Qiongkura · personal space
   白色编辑杂志风 / 五个全屏章节 / Build · Drive · Listen
   ========================================================================== */

:root {
  --bg: #fafaf8;
  --bg-warm: #f7f6f3;
  --white: #ffffff;
  --ink: #111111;
  --ink-2: #666666;
  --ink-3: #8e8e8e;
  --line: #dcdcdc;
  --line-2: #ebebe8;
  --red: #d71920;

  --gutter: clamp(16px, 3.2vw, 90px);
  --bar-h: clamp(44px, calc(2.4 * var(--u)), 150px);
  --maxw: clamp(280px, 74vw, 3000px);

  --sans: 'Inter', 'Noto Sans SC', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;

  --ease: cubic-bezier(.22, .61, .36, 1); --u: min(1vw, 1.6vh); }

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

html {
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, p, dl, dd, figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

.wrap {
  width: min(var(--maxw), 100% - (var(--gutter) * 2));
  margin: 0 auto;
}

.skip-link {
  position: fixed;
  top: 7px;
  left: 7px;
  z-index: 90;
  calc(0.68 * var(--u)) 0: 9px 12px;
  background: var(--ink);
  color: var(--white);
  font-size: 11px;
  border-radius: 2px;
  transform: translateY(-160%);
  transition: transform .2s var(--ease);
}
.skip-link:focus { transform: none; }

/* ------------------------------------------------------------ language */

html[data-lang='zh'] .en { display: none !important; }
html[data-lang='en'] .zh { display: none !important; }

/* ---------------------------------------------------------------- topbar */

.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  background: rgba(250, 250, 248, .84);
  backdrop-filter: blur(14px) saturate(150%);
  border-bottom: 1px solid var(--line-2);
}

.topbar-inner {
  width: min(var(--maxw), 100% - (var(--gutter) * 2));
  margin: 0 auto;
  min-height: var(--bar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 21px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .2em;
}
.logo-mark {
  width: 8px;
  height: 14px;
  background: var(--red);
  transform: skewX(-18deg);
}

.nav { display: flex; align-items: center; gap: clamp(14px, 2vw, 26px); }

.nav-link {
  position: relative;
  calc(1.2 * var(--u)) 0: 6px 0;
  font-size: clamp(11px, calc(0.64 * var(--u)), 44px);
  letter-spacing: .08em;
  color: var(--ink-2);
  transition: color .25s var(--ease);
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--red);
  transition: width .3s var(--ease);
}
.nav-link:hover { color: var(--ink); }
.nav-link:hover::after,
.nav-link.is-active::after { width: 100%; }
.nav-link.is-active { color: var(--ink); }

.nav-link--out {
  margin-left: 6px;
  padding-left: 15px;
  border-left: 1px solid var(--line);
  color: var(--ink);
}

.topbar-end { display: flex; align-items: center; gap: clamp(11px, 1.6vw, 20px); }

.lang-switch { display: flex; align-items: center; gap: 3px; }

.lang-btn {
  min-width: 37px;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: none;
  cursor: pointer;
  text-align: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .02em;
  color: var(--ink-3);
  transition: color .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease);
}
.lang-btn:hover { color: var(--ink); border-color: var(--ink-3); }
.lang-btn.is-active { color: var(--ink); border-color: var(--red); background: var(--white); }

.menu-toggle {
  display: none;
  align-items: center;
  gap: 7px;
  padding: 9px 0;
  border: 0;
  background: none;
  cursor: pointer;
  font-size: 11px;
  letter-spacing: .08em;
}
.menu-toggle::after {
  content: '';
  width: 15px;
  height: 1px;
  background: var(--ink);
  box-shadow: 0 5px 0 var(--ink);
}

/* --------------------------------------------------------- section index */

.section-index {
  position: fixed;
  right: 23px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.index-item {
  display: flex;
  align-items: center;
  gap: calc(0.44 * var(--u));
  font-family: var(--mono);
  font-size: clamp(11px, calc(0.54 * var(--u)), 36px);
  letter-spacing: .06em;
  color: var(--ink-3);
  transition: color .25s var(--ease);
}
.index-item:hover { color: var(--ink); }
.index-line {
  width: calc(0.68 * var(--u));
  height: 1px;
  background: var(--line);
  transition: width .35s var(--ease), background .35s var(--ease);
}
.index-name { opacity: 0; transition: opacity .3s var(--ease); }
.index-item.is-active { color: var(--ink); }
.index-item.is-active .index-line { width: 38px; height: 1px; background: var(--red); }
.index-item.is-active .index-name { opacity: 1; }

/* ---------------------------------------------------------------- panels */

.panel {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding-top: calc(var(--bar-h) + 15px);
  border-bottom: 1px solid var(--line-2);
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.panel--home { background: var(--bg); }
.panel--racing { background: var(--white); }
.panel--projects { background: var(--bg); }
.panel--hifi { background: var(--bg-warm); }
.panel--about { background: var(--white); }

.panel-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(12px, calc(0.96 * var(--u)), 200px) 0;
}

.panel-foot { border-top: 1px solid var(--line-2); }
.panel-foot-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: calc(2.08 * var(--u));
  font-size: clamp(11px, calc(0.56 * var(--u)), 36px);
  letter-spacing: .08em;
  color: var(--ink-3);
}
.meta-note { white-space: nowrap; }
a.meta-link { color: inherit; text-decoration: none; border-bottom: 1px solid var(--line-2); }
a.meta-link:hover { color: var(--acc); border-color: var(--acc); }

/* ------------------------------------------------------- shared type bits */

.kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: clamp(10px, calc(0.5 * var(--u)), 40px);
  letter-spacing: .12em;
  color: var(--ink-3);
}
.kicker::before { content: ''; width: 23px; height: 2px; background: var(--red); }

.wordmark {
  margin: 14px 0 0;
  font-size: clamp(30px, min(calc(6.08 * var(--u)), 6.2vw), 460px);
  font-weight: 600;
  letter-spacing: .06em;
  line-height: .96;
}

.display {
  margin: 11px 0 0;
  font-size: clamp(24px, min(calc(3.84 * var(--u)), 5.6vw), 300px);
  font-weight: 600;
  letter-spacing: .05em;
  line-height: 1.02;
}

.subtitle {
  margin-top: 9px;
  font-size: clamp(10px, calc(0.68 * var(--u)), 46px);
  letter-spacing: .1em;
  color: var(--ink-2);
  text-transform: uppercase;
}

.tagline {
  margin-top: 14px;
  font-size: clamp(10px, calc(0.72 * var(--u)), 48px);
  letter-spacing: .08em;
}

.lede {
  margin-top: 14px;
  font-size: clamp(14px, calc(1.2 * var(--u)), 90px);
  line-height: 1.6;
  letter-spacing: .01em;
}

.theme-words {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 20px;
  font-family: var(--mono);
  font-size: clamp(10px, calc(0.54 * var(--u)), 36px);
  letter-spacing: .14em;
  color: var(--ink-3);
}
.theme-words span { position: relative; padding-left: 15px; }
.theme-words span::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 8px;
  height: 1px;
  background: var(--red);
}

.block-title {
  margin-bottom: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--ink-3);
}

.panel-head--row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 21px;
}
.head-note {
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.85;
  letter-spacing: .08em;
  color: var(--ink-3);
  text-align: right;
  text-transform: uppercase;
}

/* ---------------------------------------------------------------- frames */

.frame {
  background: var(--white);
  border: 1px solid var(--line);
  overflow: hidden;
  --frame-h: clamp(110px, min(21vh, 24vw), 900px);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.frame img {
  display: block;
  width: 100%;
  object-fit: cover;
}
.frame:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(17, 17, 17, .07);
}
.frame img { transition: transform .75s var(--ease); }
.frame:hover img { transform: scale(1.012); }
.frame figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 11px;
  padding: 8px 11px;
  border-top: 1px solid var(--line-2);
  font-family: var(--mono);
  font-size: clamp(11px, calc(0.58 * var(--u)), 38px);
  letter-spacing: .06em;
  color: var(--ink-3);
}
.frame--hero { --frame-h: clamp(140px, min(46vh, 37vw), 1500px); }
.frame--listen { --frame-h: clamp(100px, min(15vh, 19vw), 600px); }
.frame--slides { --frame-h: clamp(130px, min(35vh, 40vw), 1200px); }

.frame img { height: var(--frame-h); }
.frame--soft img { filter: saturate(.94); }

/* 图注整体是等宽英文排版，但等宽字体栈没有中文字形，
   中文会回落到系统字体、11px 下显得比英文粗一圈。
   这里让图注里的中文改用站点加载的 Noto Sans SC，保持同样的细度。 */
.frame figcaption .zh { font-family: var(--sans); }

/* 赛车章节的图片轮播 */
.slides {
  position: relative;
  height: var(--frame-h);
  overflow: hidden;
  background: var(--line-2);
}
.slides .slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .55s var(--ease), transform .75s var(--ease);
}
.slides .slide.is-active { opacity: 1; }

.slide-bar { align-items: center; flex-wrap: wrap; gap: 7px 11px; }
/* 没有图注的轮播（首页）：只留右下角的计数与翻页按钮 */
.frame figcaption.slide-bar--end { justify-content: flex-end; }

/* HI-FI 媒体区：左侧竖图通栏，右侧横图 + 项目信息 */
.hifi-media {
  display: grid;
  grid-template-columns: minmax(0, .42fr) minmax(0, .58fr);
  align-items: stretch;
  gap: clamp(9px, 1.4vw, 15px);
  margin-top: 3px;
}
.hifi-media-right { display: flex; flex-direction: column; }

/* 竖图铺满左栏：高度跟右栏（图片 + 小字）等高，宽度占左栏整宽，
   照片用 cover 裁切填满，周围不留白边；图注叠在照片底部 */
.frame--portrait {
  display: flex;
  flex-direction: column;
  position: relative;
  height: 100%;
  border: 0;
  background: none;
}
.frame--portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.frame--portrait figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  border-top: 0;
  /* 不透明白：之前的半透明白 + blur 会被照片底部暖色染成橙/奶油色 */
  background: var(--white);
}
.frame--landscape img { height: clamp(100px, min(23vh, 30vw), 800px); }

@media (max-width: 900px), (max-width: 1180px) and (orientation: portrait) {
  :root { --maxw: 92vw; }
  .hifi-media { grid-template-columns: minmax(0, 1fr); gap: 11px; }
  .frame--portrait img { height: clamp(229px, 62vw, 370px); width: 100%; }
}

.slide-caption { display: inline-flex; align-items: baseline; gap: 6px; }
.slide-nav { display: inline-flex; align-items: center; gap: 7px; }
.slide-btn {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: none;
  cursor: pointer;
  font-size: 11px;
  line-height: 1;
  color: var(--ink-2);
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.slide-btn:hover { color: var(--ink); border-color: var(--ink-3); }
.slide-count {
  min-width: 47px;
  text-align: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--ink-3);
}

/* ------------------------------------------------------------------ home */

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  align-items: center;
  gap: clamp(24px, 5vw, 70px);
}

.home-visual { position: relative; }

.speedlines {
  position: absolute;
  right: -12px;
  bottom: -14px;
  display: flex;
  align-items: flex-end;
  gap: 4px;
}
.speedlines span {
  width: 2px;
  height: 41px;
  background: var(--red);
  transform: skewX(-16deg) scaleY(.7);
  transform-origin: bottom;
  opacity: .45;
  transition: opacity .35s var(--ease), transform .5s var(--ease);
}
.speedlines span:nth-child(2) { height: 29px; }
.speedlines span:nth-child(3) { height: 18px; }
.home-visual:hover .speedlines span,
.home-visual:focus-within .speedlines span {
  transform: skewX(-16deg) scaleY(1);
  opacity: .9;
}
.home-visual:hover .speedlines span:nth-child(1),
.home-visual:focus-within .speedlines span:nth-child(1) { transition-delay: 0s; }
.home-visual:hover .speedlines span:nth-child(2),
.home-visual:focus-within .speedlines span:nth-child(2) { transition-delay: .08s; }
.home-visual:hover .speedlines span:nth-child(3),
.home-visual:focus-within .speedlines span:nth-child(3) { transition-delay: .16s; }

.scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  letter-spacing: .12em;
}
.scroll-line {
  display: inline-block;
  width: 38px;
  height: 1px;
  background: var(--red);
  animation: cue-slide 2.6s var(--ease) infinite;
  transform-origin: left;
}
@keyframes cue-slide {
  0%, 100% { transform: scaleX(.4); opacity: .5; }
  50% { transform: scaleX(1); opacity: 1; }
}

/* ---------------------------------------------------------------- racing */

.racing-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(229px, .75fr);
  align-items: start;
  gap: clamp(21px, 4vw, 53px);
  margin-top: clamp(14px, 3vh, 32px);
}

.project-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-top: 11px;
}
.project-head h3 {
  font-size: clamp(18px, calc(1.6 * var(--u)), 100px);
  font-weight: 600;
  letter-spacing: .04em;
}
.ghost-link {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--ink-2);
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  white-space: nowrap;
  transition: color .25s var(--ease), border-color .25s var(--ease);
}
.ghost-link:hover { color: var(--red); border-color: var(--red); }

.project-desc { margin-top: 11px; font-size: clamp(12px, calc(0.76 * var(--u)), 50px); }
.project-quote {
  margin-top: 7px;
  padding-left: 11px;
  border-left: 2px solid var(--red);
  font-size: clamp(12px, calc(0.72 * var(--u)), 46px);
  color: var(--ink-2);
}

.tech-line {
  margin-top: 7px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--ink-3);
}

.hud {
  padding: 14px;
  background: var(--white);
  border: 1px solid var(--line);
}
.hud-title {
  margin-bottom: 11px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--ink-3);
}
.hud-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 11px;
  padding: calc(0.48 * var(--u)) 0;
  border-top: 1px solid var(--line-2);
}
.hud-row dt {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--ink-3);
  white-space: nowrap;
}
.hud-row dd {
  font-size: 11px;
  letter-spacing: .05em;
  text-align: right;
}
.hud-row--accent dd { color: var(--red); }
.hud-foot {
  margin-top: 11px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--ink-3);
}

/* -------------------------------------------------------------- projects */

.works {
  /* 左栏宽度与简介宽度由 JS 按实际文字宽度写入，两个状态都只改宽度，因此能平滑过渡 */
  --list-w-idle: 52.5%;
  --list-w-hug: 34%;
  --brief-w: 0px;
  --works-gap: clamp(21px, 4vw, 53px);
  --works-gap-open: clamp(6px, .6vw, 10px);
  display: flex;
  align-items: stretch;
  gap: var(--works-gap);
  transition: gap .5s var(--ease);
  margin-top: clamp(12px, 2.6vh, 29px);
}

.work-list {
  flex: 0 0 auto;
  width: var(--list-w-idle);
  min-width: 0;
  transition: width .62s var(--ease);
  border-top: 1px solid var(--line);
}

.works.is-open {
  gap: var(--works-gap-open);
}
.works.is-open .work-list { width: var(--list-w-hug); }
.work-list li { border-bottom: 1px solid var(--line); }

/* 测量专用：临时去掉悬停位移、强制单行满宽，
   否则量到的宽度会随当时栏宽（换行与否）变化，来回悬停会一路漂移 */
.work-list.is-measuring .work-row { padding-left: 0; }
.work-list.is-measuring .work-name em {
  white-space: nowrap;
  width: max-content;
}

.work-row {
  display: grid;
  grid-template-columns: 35px minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
  padding: calc(1.08 * var(--u)) 0;
  transition: padding-left .35s var(--ease);
}
.work-num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--ink-3);
  transition: color .3s var(--ease);
}
.work-name {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 4px;
  font-size: clamp(13px, min(calc(1.08 * var(--u)), 1.7vw), 70px);
  font-weight: 600;
  letter-spacing: .03em;
}
.work-name em {
  font-style: normal;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .04em;
  line-height: 1.45;
  color: var(--ink-3);
}
.work-arrow {
  font-size: 12px;
  color: var(--ink-3);
  transition: transform .3s var(--ease), color .3s var(--ease);
}
.work-row:hover,
.work-row.is-active { padding-left: 11px; }
.work-row:hover .work-num,
.work-row.is-active .work-num { color: var(--red); }
.work-row:hover .work-arrow,
.work-row.is-active .work-arrow { color: var(--red); transform: translate(3px, -3px); }

.work-stage {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  contain: layout paint;
  min-height: clamp(170px, min(38vh, 37vw), 1200px);
  background: var(--white);
  border: 1px solid var(--line);
}

/* ---------------------------------------------------- 项目简介（悬停展开） */

.work-brief {
  flex: 0 0 auto;
  width: 0;      /* 收起时宽度与高度都归零：既不挤占预览模块，也不会把章节撑高 */
  height: 0;
  overflow: hidden;
  opacity: 0;
  transition: width .5s var(--ease), opacity .38s var(--ease);
}
.works.is-open .work-brief {
  width: var(--brief-w);
  height: auto;
  opacity: 1;
  transition-delay: 0s, .1s;
}

/* 内容按最终宽度排版好，外层只做裁剪揭示，动画期间文字不重新折行 */
.work-brief-item { display: none; width: var(--brief-w); padding-top: calc(.4 * var(--u)); }
.work-brief-item.is-active { display: block; }

.brief-kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--red);
}
.brief-title {
  margin-top: calc(.42 * var(--u));
  font-size: clamp(13px, calc(1.22 * var(--u)), 74px);
  font-weight: 600;
  letter-spacing: .03em;
}
.brief-desc {
  margin-top: calc(.62 * var(--u));
  font-size: clamp(11px, calc(.92 * var(--u)), 48px);
  line-height: 1.75;
  color: var(--ink-2);
}
.brief-points {
  margin-top: calc(.72 * var(--u));
  display: grid;
  gap: calc(.42 * var(--u));
}
.brief-points li {
  position: relative;
  padding-left: calc(.9 * var(--u));
  font-size: clamp(11px, calc(.84 * var(--u)), 44px);
  line-height: 1.65;
  color: var(--ink-2);
}
.brief-points li::before {
  content: '';
  position: absolute;
  left: 0;
  top: calc(.62em);
  width: calc(.42 * var(--u));
  height: 1px;
  background: var(--red);
}
.brief-tech {
  margin-top: calc(.66 * var(--u));
  padding-top: calc(.42 * var(--u));
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .05em;
  color: var(--ink-3);
}

/* 试听片段版权声明：一行小字，别抢戏 */
.pick-note {
  margin-top: calc(.5 * var(--u));
  font-family: var(--mono);
  font-size: clamp(10px, calc(.56 * var(--u)), 30px);
  line-height: 1.5;
  letter-spacing: .02em;
  color: var(--ink-3);
}
.pick-note .ghost-link { margin-left: .35em; }

/* 无 JS 时简介直接铺开显示，不依赖交互 */
html:not(.js) .works { flex-wrap: wrap; }
html:not(.js) .work-list { width: 100%; }
html:not(.js) .work-brief { width: 100%; opacity: 1; }
html:not(.js) .work-brief-item { display: block; width: auto; margin-top: calc(1.2 * var(--u)); }

.work-panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transition: opacity .45s var(--ease);
}
.work-panel.is-active { opacity: 1; }
.work-panel img {
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
  height: auto;
  object-fit: contain;
  background: var(--bg-warm);
}
.work-panel figcaption {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  padding: 8px 11px;
  border-top: 1px solid var(--line-2);
  background: var(--white);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--ink-3);
}

.panel-pair {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  /* 屏幕使用时间那两张图上下堆叠，不并排 */
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 1fr 1fr;
  gap: 1px;
  background: var(--line);
}
.panel-pair img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  background: var(--bg-warm);
}

.diagram {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 11px;
  padding: clamp(12px, 2.6vh, 21px);
  background: linear-gradient(180deg, #ffffff, #fbfbf9);
}
.diagram-title {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--ink-3);
}
.diagram-flow { display: flex; flex-direction: column; gap: 10px; }
.diagram-flow li {
  position: relative;
  padding: 7px 10px;
  background: var(--white);
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .04em;
}
.diagram-flow li + li::before {
  content: '↓';
  position: absolute;
  top: -10px;
  left: 11px;
  font-size: 11px;
  color: var(--red);
  line-height: 1;
}
.diagram-big {
  font-size: clamp(18px, calc(1.76 * var(--u)), 110px);
  font-weight: 600;
  letter-spacing: .04em;
}
.diagram-rows div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 9px;
  padding: 4px 0;
  border-top: 1px solid var(--line-2);
}
.diagram-rows dt {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--ink-3);
}
.diagram-rows dd { font-size: 11px; letter-spacing: .05em; text-align: right; }

.bars { display: flex; align-items: flex-end; gap: 6px; height: 46px; }
.bars span {
  flex: 1 1 0;
  height: var(--h);
  background: var(--ink);
  opacity: .85;
  transform-origin: bottom;
}
.diagram:hover .bars span,
.diagram:focus-within .bars span { animation: bar-breathe 1.2s var(--ease) 1; }
.diagram:hover .bars span:nth-child(2n),
.diagram:focus-within .bars span:nth-child(2n) { animation-delay: .08s; }
.diagram:hover .bars span:nth-child(3n),
.diagram:focus-within .bars span:nth-child(3n) { animation-delay: .16s; }
@keyframes bar-breathe { from { transform: scaleY(.6); } to { transform: scaleY(1); } }

/* ----------------------------------------------------------------- hifi */

.hifi-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(229px, .8fr);
  align-items: start;
  gap: clamp(21px, 4vw, 53px);
  margin-top: clamp(12px, 2.6vh, 29px);
}

.hifi-line {
  font-size: clamp(20px, calc(1.92 * var(--u)), 130px);
  font-weight: 600;
  letter-spacing: .02em;
}
.hifi-note { margin: 11px 0 11px; font-size: 11px; color: var(--ink-2); }

/* 网易云解析是独立页面，主页只留一个入口，不内嵌解析器 */
.hifi-jump {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 7px;
  margin: calc(0.9 * var(--u)) 0 0;
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--ink-3);
}

.waveform {
  padding: 7px;
  background: var(--white);
  border: 1px solid var(--line);
}
.waveform canvas { display: block; width: 100%; height: clamp(50px, calc(4.8 * var(--u)), 320px); }

.scale {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 7px 0 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--ink-3);
}
.scale-line { flex: 1 1 auto; height: 1px; background: var(--line); position: relative; }
/* 播放时沿刻度线滑动的主频标记，以及右侧的实时读数（频率 · 电平） */
.scale-dot {
  position: absolute;
  top: -1px;
  left: 0;
  width: 3px;
  height: 3px;
  margin-left: -1.5px;
  border-radius: 50%;
  background: var(--ink);
  opacity: 0;
  transition: opacity .3s var(--ease), left .12s linear;
}
.scale.is-live .scale-dot { opacity: 1; }
.scale-live {
  margin-left: .6em;
  opacity: 0;
  transition: opacity .35s var(--ease);
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
  white-space: nowrap;
}
.scale.is-live .scale-live { opacity: 1; }
.scale.is-live [data-scale-max] { display: none; }

.listen-block { margin-bottom: calc(1.04 * var(--u)); }
.listen-list > li {
  padding: 6px 0;
  border-bottom: 1px solid var(--line-2);
  font-size: clamp(12px, calc(0.76 * var(--u)), 50px);
}

/* 常听类型：类型名 + 该类代表曲目（纯文字，不播放） */
.listen-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 11px;
}
.listen-pick {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-family: var(--mono);
  font-size: clamp(10px, calc(0.6 * var(--u)), 36px);
  letter-spacing: .02em;
  color: var(--ink-3);
}
.pick {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 2px 9px;
}
/* 播放键：圆形描边 + 矢量图标，播放/暂停两个图标由 .is-playing 切换 */
.pick-btn {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: none;
  color: var(--ink-2);
  cursor: pointer;
  transition: color .22s var(--ease), border-color .22s var(--ease),
    background-color .22s var(--ease), transform .18s var(--ease);
}
.pick-btn:hover { color: var(--ink); border-color: var(--ink-3); }
.pick-btn:active { transform: scale(.93); }
.pick-btn:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.pick-icon { display: block; width: 11px; height: 11px; fill: currentColor; }
.pick-icon--pause { display: none; }
.pick.is-playing .pick-icon--play { display: none; }
.pick.is-playing .pick-icon--pause { display: block; }
.pick-title {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: clamp(11px, calc(0.68 * var(--u)), 44px);
  color: var(--ink-2);
}
.pick-artist { margin-left: .5em; font-size: .9em; color: var(--ink-3); }
.pick-time {
  font-family: var(--mono);
  font-size: clamp(10px, calc(0.56 * var(--u)), 32px);
  letter-spacing: .04em;
  color: var(--ink-3);
  white-space: nowrap;
}
.pick.is-playing .pick-title { color: var(--ink); }
.pick.is-playing .pick-btn {
  color: var(--red);
  border-color: var(--red);
  background: rgba(215, 25, 32, .06);
}
.pick.is-error .pick-time { color: var(--red); }

/* 音量：小喇叭按钮 + 细条，静音时图标打叉；默认 80%，改动记在本地 */
.pick-vol { display: inline-flex; align-items: center; gap: 6px; }
.pick-vol-btn {
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-3);
  cursor: pointer;
  transition: color .2s var(--ease);
}
.pick-vol-btn:hover { color: var(--ink); }
.pick-vol-btn:focus-visible { outline: 1px solid var(--ink-3); outline-offset: 2px; }
.pick-vol-btn .pick-icon { width: 13px; height: 13px; }
.pick-icon--muted { display: none; }
.pick.is-muted .pick-icon--vol { display: none; }
.pick.is-muted .pick-icon--muted { display: block; }
.pick.is-muted .pick-vol-btn { color: var(--ink-3); }
.pick-vol-bar {
  position: relative;
  display: block;
  width: clamp(44px, calc(4 * var(--u)), 110px);
  height: 12px;
  cursor: pointer;
  touch-action: none;
}
.pick-vol-bar::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  margin-top: -.5px;
  background: var(--line);
}
.pick-vol-fill {
  position: absolute;
  left: 0;
  top: 50%;
  width: 80%;
  height: 1px;
  margin-top: -.5px;
  background: var(--ink-3);
  transition: background-color .2s var(--ease);
}
.pick-vol-knob {
  position: absolute;
  top: 50%;
  left: 80%;
  width: 5px;
  height: 5px;
  margin: -2.5px 0 0 -2.5px;
  border-radius: 50%;
  background: var(--ink-2);
  transition: background-color .2s var(--ease);
}
.pick-vol-bar:hover .pick-vol-fill,
.pick-vol-bar.is-dragging .pick-vol-fill { background: var(--red); }
.pick-vol-bar:hover .pick-vol-knob,
.pick-vol-bar.is-dragging .pick-vol-knob { background: var(--red); }
.pick-vol-bar:focus-visible { outline: 1px solid var(--ink-3); outline-offset: 2px; }

/* 进度条：只有正在播放的那一行才展开 */
.pick-seek { grid-column: 1 / -1; padding: 4px 0 1px; }
.pick-seek[hidden] { display: none; }
.pick-bar {
  position: relative;
  display: block;
  height: 10px;
  cursor: pointer;
  touch-action: none;
}
.pick-bar::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  margin-top: -1px;
  background: var(--line);
}
.pick-fill {
  position: absolute;
  left: 0;
  top: 50%;
  width: 0;
  height: 2px;
  margin-top: -1px;
  background: var(--red);
}
.pick-knob {
  position: absolute;
  left: 0;
  top: 50%;
  width: 7px;
  height: 7px;
  margin: -3.5px 0 0 -3.5px;
  border-radius: 50%;
  background: var(--red);
}
.pick-bar:focus-visible { outline: 1px solid var(--ink-3); outline-offset: 2px; }

/* 最近在听：单曲一行，字号放大 */
.listen-list--now > li { padding: 0; border-bottom: 0; }
.pick--now .pick-title {
  font-size: clamp(13px, min(calc(1.2 * var(--u)), 2vw), 80px);
  letter-spacing: .02em;
  color: var(--ink);
}

/* 歌词：三行小窗 + 上下渐隐，当前句高亮；没有 LRC 文件时整块 hidden 不占位 */
/* 没有 LRC 时整块 hidden；有 LRC 但没在播放时平滑收起（不占高度） */
.lyrics {
  display: grid;
  grid-template-rows: 0fr;
  margin-top: 0;
  opacity: 0;
  transition: grid-template-rows .45s var(--ease), opacity .35s var(--ease), margin-top .45s var(--ease);
}
.lyrics.is-playing {
  grid-template-rows: 1fr;
  margin-top: calc(.9 * var(--u));
  opacity: 1;
}
.lyrics[hidden] { display: none; }
.lyrics-body { min-height: 0; overflow: hidden; }
.lyrics .block-title { display: flex; align-items: center; gap: 8px; margin-bottom: calc(.4 * var(--u)); }
.lyrics-hint {
  font-family: var(--sans);
  font-size: clamp(10px, calc(.58 * var(--u)), 30px);
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-3);
}
.lyrics-lines {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
  height: calc(4.4 * var(--u));
  min-height: 62px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 26%, #000 74%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 26%, #000 74%, transparent);
}
.lyrics-lines::-webkit-scrollbar { width: 0; height: 0; }
.lyrics-lines li {
  position: relative;
  padding-left: calc(.9 * var(--u));
  font-size: clamp(12px, calc(.86 * var(--u)), 46px);
  line-height: 1.75;
  letter-spacing: .01em;
  color: var(--ink-3);
  cursor: pointer;
  transition: color .3s var(--ease);
}
.lyrics-lines li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .85em;
  width: calc(.42 * var(--u));
  height: 1px;
  background: var(--line);
  transition: background-color .3s var(--ease);
}
.lyrics-lines li:hover { color: var(--ink-2); }
.lyrics-lines li.is-active { color: var(--ink); }
.lyrics-lines li.is-active::before { background: var(--red); }
.lyrics-lines:focus-visible { outline: 1px solid var(--ink-3); outline-offset: 3px; }

.spectrum {
  display: flex;
  align-items: flex-end;
  gap: 2px;                /* 柱子多了，间隙收窄 */
  min-height: 0;
  height: clamp(38px, calc(2.88 * var(--u)), 200px);
  margin-top: 7px;
}
.spectrum span {
  position: relative;
  flex: 1 1 0;
  height: var(--live, var(--h));
  background: linear-gradient(180deg, #111111, #6f6f6f);
  opacity: .82;
  transform-origin: bottom;
  animation: spec-breathe 3s var(--ease) infinite alternate;
  transition: height .45s var(--ease);
}
/* 峰值保持的顶标：贴着柱顶，峰值更高时由 --peak-gap 上移 */
.spectrum span i {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 2px;
  background: #111111;
  opacity: 0;
  transform: translateY(calc(var(--peak-gap, 0px) * -1));
  transition: transform .09s linear, opacity .3s var(--ease);
}
/* 播放时柱高改由真实频段驱动，暂停时这套呼吸动画照旧 */
.spectrum.is-live span { animation: none; transform: none; transition: height .06s linear; }
.spectrum.is-live span i { opacity: .5; }
.spectrum span:nth-child(2n) { animation-duration: 3.8s; animation-delay: .35s; }
.spectrum span:nth-child(3n) { animation-duration: 2.4s; animation-delay: .7s; }
@keyframes spec-breathe { from { transform: scaleY(1); } to { transform: scaleY(.72); } }

/* ---------------------------------------------------------------- about */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: clamp(18px, 3.4vw, 50px);
  margin-top: clamp(12px, 2.8vh, 30px);
}

.about-intro { display: flex; flex-direction: column; gap: 12px; }
.avatar {
  width: clamp(64px, calc(4.96 * var(--u)), 180px);
  height: clamp(64px, calc(4.96 * var(--u)), 180px);
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
}
.about-lead { font-size: clamp(13px, calc(1.52 * var(--u)), 96px); line-height: 1.6; }
.about-body { font-size: clamp(11px, calc(0.76 * var(--u)), 50px); color: var(--ink-2); max-width: 52ch; }

.about-keywords { border-top: 1px solid var(--line); }
.keyword { padding: calc(1.28 * var(--u)) 0; border-bottom: 1px solid var(--line); }
.keyword-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: clamp(12px, calc(1.2 * var(--u)), 78px);
  font-weight: 600;
  letter-spacing: .12em;
}
.keyword-title::before { content: ''; width: 14px; height: 2px; background: var(--red); }
.keyword-note {
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--ink-3);
}

.about-stack { border-top: 1px solid var(--line); padding-top: 14px; }
.stack-list { display: flex; flex-wrap: wrap; gap: 7px; }
.stack-list li {
  padding: 4px 9px;
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: clamp(11px, calc(0.58 * var(--u)), 38px);
  letter-spacing: .04em;
}

.about-contact { border-top: 1px solid var(--line); padding-top: 14px; }

.contact-row {
  display: grid;
  grid-template-columns: var(--contact-key, 81px) minmax(0, 1fr);
  align-items: baseline;
  gap: 11px;
  padding: calc(0.88 * var(--u)) 0;
  border-bottom: 1px solid var(--line-2);
}
.contact-key {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--ink-3); --contact-key: clamp(60px, calc(4.0 * var(--u)), 160px); }
.contact-link {
  display: block;
  font-size: clamp(11px, calc(0.68 * var(--u)), 46px);
  letter-spacing: .04em;
  overflow-wrap: anywhere;
  transition: color .25s var(--ease);
}
.contact-link:hover { color: var(--red); }

/* 动效都服务于操作反馈：入场、hover、播放，不做无意义的全屏循环 */
.reveal { transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--reveal-delay, 0ms); }
.js .reveal { opacity: 0; transform: translateY(14px); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ----------------------------------------------------------- responsive */

/* 矮屏：优先保证五个章节各自装进一屏 */
@media (max-height: 820px) {
  /* 矮窗口：字号有可读性下限不会再缩，这里把图片高度让出一部分，保证一节仍是一屏 */
  html { scroll-snap-type: y proximity; }
  .lyrics { margin-top: calc(.6 * var(--u)); }
  .lyrics-lines { height: calc(3.2 * var(--u)); min-height: 46px; }
  .frame { --frame-h: clamp(90px, min(17vh, 21vw), 600px); }
  .frame--hero { --frame-h: clamp(100px, min(38vh, 35vw), 800px); }
  .frame--slides { --frame-h: clamp(110px, min(26vh, 37vw), 700px); }
  .frame--landscape img { height: clamp(80px, min(17vh, 24vw), 560px); }
  .work-stage { min-height: clamp(140px, min(26vh, 32vw), 700px); }
  .keyword { padding: calc(0.88 * var(--u)) 0; }
  .contact-row { padding: calc(0.6 * var(--u)) 0; }
}

/* 中等窗口：保留双栏，只收紧尺寸，保证仍然一节一屏 */
@media (max-width: 1180px) {
  .home-grid,
  .racing-grid,
  .works,
  .hifi-grid,
  .about-grid { gap: clamp(12px, 2.2vw, 26px); }
  .home-grid { grid-template-columns: minmax(0, 1.1fr) minmax(264px, .9fr); }
  .racing-grid { grid-template-columns: minmax(0, 1.3fr) minmax(202px, .7fr); }
  .hifi-grid { grid-template-columns: minmax(0, 1.2fr) minmax(202px, .8fr); }
  html { scroll-snap-type: y proximity; }
}

@media (max-width: 900px), (max-width: 1180px) and (orientation: portrait) {
  :root { --bar-h: 50px; }

  /* ≤792px：改为单栏自然滚动 */
  .home-grid,
  .racing-grid,
  .works,
  .hifi-grid,
  .about-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .works { flex-direction: column; align-items: stretch; gap: 20px; }
  .work-list { width: 100%; }
  .work-brief { display: none; }
  .work-stage { min-height: clamp(194px, 30vh, 299px); }

  html { scroll-snap-type: none; }

  .panel {
    min-height: auto;
    padding-top: calc(var(--bar-h) + 23px);
    padding-bottom: 64px;
    scroll-snap-stop: normal;
  }
  .panel-body { padding: 7px 0 18px; }
  .panel-foot { margin-top: 18px; }

  .menu-toggle { display: inline-flex; }
  .topbar-end { gap: 11px; }
  .lang-btn { padding: 4px 7px; }

  .nav {
    position: fixed;
    top: var(--bar-h);
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 6px var(--gutter) 14px;
    background: rgba(250, 250, 248, .98);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-7px);
    transition: opacity .25s var(--ease), transform .25s var(--ease);
  }
  .nav.is-open { opacity: 1; pointer-events: auto; transform: none; }
  .nav-link {
    padding: 12px 0;
    border-bottom: 1px solid var(--line-2);
    font-size: 11px;
  }
  .nav-link::after { display: none; }
  .nav-link--out {
    margin: 9px 0 0;
    padding-left: 0;
    border-left: 0;
    border-bottom: 0;
  }

  .section-index {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    transform: none;
    flex-direction: row;
    justify-content: center;
    gap: 18px;
    padding: 9px 0;
    background: rgba(250, 250, 248, .92);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--line-2);
  }
  .index-line,
  .index-name { display: none; }
  .index-item.is-active .index-num { color: var(--red); }

  .wordmark { font-size: clamp(32px, 12vw, 59px); }
  .display { font-size: clamp(29px, 10vw, 50px); }
  .frame--hero,
  .frame--wide,
  .frame--listen { --frame-h: clamp(150px, 34vw, 246px); }
  .panel-head--row { flex-direction: column; align-items: flex-start; gap: 9px; }
  .head-note { text-align: left; }
  .speedlines { display: none; }
}

@media (max-width: 620px) {
  body { font-size: 12px; }
  .logo-text { letter-spacing: .14em; }
  .work-row { grid-template-columns: 26px minmax(0, 1fr) auto; gap: 9px; }
  .work-name { font-size: 13px; }
  .about-lead { font-size: 13px; }
  .stack-list li { font-size: 11px; }
  .panel-foot-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    min-height: 0;
    padding: 11px 0;
  }
  .meta-note { white-space: normal; }
}

/* 超大屏幕（4K 等）：放开宽度与尺寸上限，避免内容缩在中间一小块 */


/* 真正的大画布（4K 100% 缩放等）：字号再降一档，图片再放开一档 */


@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; }
  .reveal { transition: none; }
  .speedlines span,
  .scroll-line,
  .bars span,
  .spectrum span { animation: none; }
  .lyrics,
  .frame,
  .frame img,
  .spectrum span,
  .scale-live,
  .work-panel,
  .work-list,
  .work-brief,
  .slides .slide,
  .work-row,
  .contact-link,
  .ghost-link { transition: none; }
}
