/* =====================================================================
   site.css — 前台：雨夜赛博朋克
   霓虹 HUD；WebGL 动态背景；音箱控制面板
   ===================================================================== */

html {
  background: var(--bg);
}
body {
  overflow-x: clip;
}
.site-main {
  position: relative;
  isolation: isolate;
}
.page-sky {
  position: absolute;
  z-index: -1;
  inset: 0 0 auto;
  height: min(480px, 58svh);
  /* 海报整体放大后会超出容器；mask 只裁绘制、不裁布局溢出，这里一并裁掉，避免页面变宽 */
  overflow: clip;
  opacity: 0.42;
  mask-image: linear-gradient(#000 22%, transparent 100%);
  pointer-events: none;
}
.page-sky canvas {
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.8s var(--ease-soft);
}
.page-sky canvas.is-ready {
  opacity: 1;
}
.scene-poster {
  position: absolute;
  inset: 0;
  z-index: -3;
  overflow: clip;
  container-type: size;
  pointer-events: none;
  transition: visibility 0s 0s;
}
.scene-poster::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: '';
  background-image: var(--poster-lqip);
  background-position: center;
  background-repeat: no-repeat;
  /* 缩略图尺寸取整后，仍按清晰海报的原始比例裁切。 */
  background-size:
    max(100cqw, calc(100cqh * var(--poster-aspect)))
    max(100cqh, calc(100cqw / var(--poster-aspect)));
}
.scene-poster img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.scene-poster-hero {
  z-index: -4;
  --poster-lqip: url('/static/img/scene/hero-desktop-lqip.webp');
  --poster-aspect: calc(16 / 9);
}
.scene-poster-footer {
  --poster-lqip: url('/static/img/scene/footer-lqip.webp');
  --poster-aspect: calc(32 / 15);
}
.scene-poster-page {
  --poster-lqip: url('/static/img/scene/page-lqip.webp');
  --poster-aspect: calc(128 / 45);
}
.scene-poster:has(+ canvas.is-ready) {
  visibility: hidden;
  transition-delay: 0.8s;
}
@media (width < 768px), (pointer: coarse) {
  .scene-poster-hero {
    --poster-lqip: url('/static/img/scene/hero-mobile-lqip.webp');
    --poster-aspect: calc(9 / 16);
  }
}
@media (prefers-reduced-motion: no-preference) {
  /* 与 WebGL 首帧的 cover 采样边距对齐。 */
  .scene-poster {
    transform: scale(1.069519);
  }
  .scene-poster-hero {
    transform: scale(1.104972);
  }
}
html.show-loader {
  overflow: hidden;
}

/* ------------------------------------------------------------------ 跨页面过渡（View Transitions） */

::view-transition-group(*) {
  animation-duration: 0.55s;
  animation-timing-function: var(--ease-out);
}
::view-transition-old(root) {
  animation: vt-page-out 0.25s ease-in both;
}
::view-transition-new(root) {
  animation: vt-page-in 0.27s var(--ease-out) 0.02s both;
}
@keyframes vt-page-out {
  to {
    opacity: 0;
    transform: translate3d(0, -6px, 0) scaleY(0.985);
  }
}
@keyframes vt-page-in {
  0% { clip-path: inset(0 0 100% 0); transform: translateX(-3px); }
  48% { clip-path: inset(0 0 52% 0); transform: translateX(2px); }
  100% { clip-path: inset(0); transform: none; }
}
.site-header {
  view-transition-name: site-header;
}
.nav-pill {
  view-transition-name: nav-pill;
}
.filter-pill {
  view-transition-name: filter-pill;
}
::view-transition-group(nav-pill),
::view-transition-group(filter-pill) {
  animation-duration: 0.5s;
  animation-timing-function: cubic-bezier(0.3, 1.3, 0.5, 1);
}
.cover {
  view-transition-class: cover;
}
.vt-title {
  display: inline-block;
  view-transition-class: title;
}
::view-transition-group(*.cover) {
  animation-duration: 0.7s;
  animation-timing-function: cubic-bezier(0.2, 0.9, 0.1, 1);
  overflow: clip;
  border-radius: var(--radius);
}
::view-transition-old(*.cover),
::view-transition-new(*.cover) {
  height: 100%;
  object-fit: cover;
}
::view-transition-group(*.title) {
  animation-duration: 0.6s;
  animation-timing-function: cubic-bezier(0.2, 0.9, 0.1, 1);
}
::view-transition-old(*.title),
::view-transition-new(*.title) {
  height: 100%;
  width: auto;
  object-fit: none;
  object-position: left top;
}

/* ------------------------------------------------------------------ 加载屏：000 → 100 */

.loader {
  display: none;
}
html.show-loader .loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(24px, 4vw, 48px);
  background: var(--bg);
  transition:
    opacity 0.7s var(--ease-soft),
    visibility 0.7s;
}
.loader.is-done {
  opacity: 0;
  visibility: hidden;
}
.loader-label {
  margin: 0;
  color: var(--text-3);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  animation: fade-in 0.6s both;
}
.loader-words {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.loader-words span {
  color: rgb(245 245 245 / 0.82);
  font-size: clamp(44px, 7vw, 88px);
  line-height: 1;
  animation: word-in 0.5s var(--ease-out) both;
}
@keyframes word-in {
  from {
    opacity: 0;
    transform: translateY(18px);
    filter: blur(8px);
  }
}
.loader-count {
  align-self: flex-end;
  color: var(--text);
  font-size: clamp(104px, 17vw, 240px);
  line-height: 0.8;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.loader-bar {
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  background: var(--border);
}
.loader-bar span {
  display: block;
  height: 100%;
  background: var(--accent-gradient);
  box-shadow: 0 0 18px rgb(0 240 255 / 0.65);
  transform: scaleX(0);
  transform-origin: 0 50%;
}
.loader.is-done .loader-count,
.loader.is-done .loader-words {
  transform: translateY(-24px);
  transition: transform 0.7s var(--ease-out);
}

/* ------------------------------------------------------------------ 顶部悬浮胶囊导航 */

.site-header {
  position: fixed;
  inset: 16px 0 auto;
  z-index: 50;
  display: flex;
  justify-content: center;
  padding-inline: 12px;
  pointer-events: none;
}
.nav {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 6px;
  border: 1px solid rgb(255 255 255 / 0.08);
  border-radius: var(--radius);
  background: rgb(20 20 20 / 0.62);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
  pointer-events: auto;
  transition:
    box-shadow 0.4s,
    background-color 0.4s,
    border-color 0.4s;
}
html.scrolled .nav {
  border-color: rgb(255 255 255 / 0.1);
  background: rgb(16 16 16 / 0.82);
  box-shadow:
    0 12px 40px -12px rgb(0 0 0 / 0.75),
    0 1px 0 rgb(255 255 255 / 0.04) inset;
}
.logo {
  position: relative;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  transition: transform 0.4s var(--ease-spring);
}
.logo:hover {
  transform: scale(1.1);
}
.nav-sep {
  flex: none;
  width: 1px;
  height: 20px;
  margin-inline: 6px;
  background: var(--border-strong);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--radius);
  color: var(--text-3);
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  transition:
    color 0.25s,
    background-color 0.25s;
}
.nav-link:hover {
  background: rgb(255 255 255 / 0.05);
  color: var(--text);
}
.nav-link.is-active {
  color: var(--text);
}
.nav-pill {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgb(255 255 255 / 0.09);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.06) inset;
}
.nav-label {
  position: relative;
}
.nav-cta {
  position: relative;
  flex: none;
  padding: 1px;
  border: 0;
  border-radius: var(--radius);
  background: var(--border-strong);
  background-size: 200% 100%;
  cursor: pointer;
  transition: transform 0.35s var(--ease-out);
}
.nav-cta:hover {
  background-image: var(--ring-gradient);
  transform: scale(1.04);
}
.nav-cta:active {
  transform: scale(0.96);
}
.nav-cta-inner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 8px 0 14px;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  transition: color 0.25s;
}
.nav-cta:hover .nav-cta-inner {
  color: var(--text);
}
.nav-cta .kbd {
  height: 20px;
  background: transparent;
}

@media (max-width: 720px) {
  .nav-cta-text,
  .nav-cta .kbd {
    display: none;
  }
  .nav-cta-inner {
    justify-content: center;
    width: 34px;
    padding: 0;
  }
}
@media (max-width: 480px) {
  .site-header {
    top: 12px;
    padding-inline: 8px;
  }
  .nav {
    padding: 5px;
  }
  .nav-sep {
    margin-inline: 3px;
  }
  .nav-link {
    padding: 0 9px;
    font-size: 13px;
  }
}
@media (max-width: 370px) {
  .nav-home {
    display: none;
  }
}

/* ------------------------------------------------------------------ 英雄区：WebGL 星系 */

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 120px 24px 150px;
  overflow: hidden;
  text-align: center;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -4;
  background:
    radial-gradient(ellipse 70% 55% at 50% 48%, rgb(0 240 255 / 0.13), transparent 70%),
    radial-gradient(ellipse 40% 30% at 70% 30%, rgb(0 240 255 / 0.06), transparent 70%),
    var(--bg);
}
.hero-cosmos {
  position: absolute;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.8s var(--ease-soft);
}
.hero-cosmos.is-ready {
  opacity: 1;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 46% 36% at 50% 50%, rgb(7 8 12 / 0.58), transparent 78%),
    rgb(0 0 0 / 0.12);
  pointer-events: none;
}
.hero-fade {
  position: absolute;
  inset: auto 0 0;
  z-index: -1;
  height: 38%;
  background: linear-gradient(to bottom, transparent, var(--bg) 92%);
  pointer-events: none;
}
.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 920px;
  opacity: calc(1 - var(--hp, 0) * 1.5);
  transform: translateY(calc(var(--hp, 0) * -90px)) scale(calc(1 - var(--hp, 0) * 0.05));
}
.hero-eyebrow {
  --d: 0.25s;
  margin: 0;
  color: var(--text-3);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}
.hero-name {
  margin: 26px 0 0;
  padding: 0 0.1em 0.08em;
  color: var(--text);
  font-size: clamp(60px, 12.5vw, 156px);
  line-height: 0.9;
  letter-spacing: -0.025em;
  text-shadow: 0 10px 60px rgb(0 0 0 / 0.5);
}
.hero-role {
  --d: 0.4s;
  margin: 26px 0 0;
  color: var(--text-2);
  font-size: clamp(17px, 2.1vw, 22px);
}
.role-word {
  display: inline-grid;
  min-width: 2ch;
  color: var(--text);
  font-size: 1.3em;
  line-height: 1;
}
.hero-desc {
  --d: 0.5s;
  max-width: 460px;
  margin: 16px 0 0;
  color: var(--text-3);
  font-size: 15px;
}
.hero-actions {
  --d: 0.6s;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 40px;
}
.scroll-hint {
  --d: 0.95s;
  position: absolute;
  left: 50%;
  bottom: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--text-3);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  translate: -50% 0;
  transition: color 0.25s;
}
.scroll-hint:hover {
  color: var(--text);
}
.scroll-hint i {
  position: relative;
  display: block;
  width: 1px;
  height: 44px;
  overflow: hidden;
  background: var(--border-strong);
}
.scroll-hint b {
  position: absolute;
  inset: 0 0 auto;
  height: 45%;
  background: linear-gradient(to bottom, transparent, var(--text));
  animation: scroll-cue 1.9s var(--ease-in-out) infinite;
}
@keyframes scroll-cue {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(240%);
  }
}

/* 首屏入场：加载屏结束（或无加载屏时立即）后由 html.hero-go 触发 */
html.js:not(.hero-go) .name-reveal,
html.js:not(.hero-go) .blur-in {
  opacity: 0;
}
html.hero-go .name-reveal {
  animation: name-reveal 1.25s cubic-bezier(0.215, 0.61, 0.355, 1) 0.1s both;
}
html.hero-go .blur-in {
  animation: blur-in 1s var(--ease-out) both;
  animation-delay: var(--d, 0.3s);
}
@keyframes name-reveal {
  0% { opacity: 0; transform: translate3d(-10px, 18px, 0) skewX(-4deg) scaleY(0.86); }
  13% { opacity: 0.72; transform: translate3d(7px, -3px, 0) skewX(3deg) scaleY(1.02); }
  23% { opacity: 1; transform: translate3d(-2px, 2px, 0) skewX(-1.5deg); }
  44%, 100% { opacity: 1; transform: translate3d(0, 0, 0); }
}
.hero-404 .hero-name {
  font-size: clamp(52px, 10vw, 128px);
}

/* ------------------------------------------------------------------ 区块、页面标题 */

.section {
  position: relative;
  padding-block: clamp(64px, 9vw, 120px);
}
.section-tight {
  padding-bottom: clamp(64px, 8vw, 104px);
}
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(32px, 4vw, 48px);
}
.section-title {
  margin: 18px 0 0;
  color: var(--text);
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.03em;
}
.section-title em,
.page-title em,
.footer-title em {
  margin-left: 0.1em;
  padding-right: 0.12em;
  color: var(--accent-2);
  letter-spacing: -0.01em;
}
.section-sub {
  margin: 12px 0 0;
  color: var(--text-3);
  font-size: 15px;
}
.section-link {
  flex: none;
}
@media (max-width: 640px) {
  .section-link {
    display: none;
  }
}
.page-head {
  padding: clamp(132px, 16vw, 176px) 0 clamp(36px, 5vw, 56px);
}
.page-head .eyebrow {
  animation: fade-in 0.6s both;
}
.page-title {
  margin: 20px 0 0;
  color: var(--text);
  font-size: clamp(44px, 7.5vw, 92px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.035em;
  animation: blur-in 0.9s var(--ease-out) 0.05s both;
}
.page-sub {
  margin: 16px 0 0;
  color: var(--text-3);
  font-size: 15px;
  animation: blur-in 0.9s var(--ease-out) 0.15s both;
}
.page-head > :nth-child(n + 4) {
  animation: blur-in 0.9s var(--ease-out) 0.25s both;
}

/* ------------------------------------------------------------------ 滚动显现 */

.reveal {
  animation: enter 0.8s var(--ease-out) both;
  animation-delay: calc(min(var(--i, 0), 8) * 70ms + 80ms);
}
html.js .reveal.reveal-pending {
  opacity: 0;
  animation: none;
}
html.js .reveal.reveal-pending.is-in {
  opacity: 1;
  animation: enter 0.95s var(--ease-out) both;
  animation-delay: var(--rd, 0ms);
}
@keyframes enter {
  from {
    opacity: 0;
    translate: 0 36px;
  }
}

/* ------------------------------------------------------------------ 封面与生成封面 */

.cover {
  position: relative;
  overflow: hidden;
  background: var(--surface-2);
  container-type: size;
}
.cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cover-art {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at var(--gx) var(--gy), rgb(0 240 255 / 0.2), transparent 55%),
    radial-gradient(ellipse at 80% 110%, rgb(0 240 255 / 0.16), transparent 60%),
    linear-gradient(160deg, hsl(0 0% 9%), hsl(220 12% 6%));
}
.cover-art svg {
  width: 100%;
  height: 100%;
}
.cover-glyph {
  position: absolute;
  right: 5cqw;
  bottom: -12cqh;
  color: rgb(255 255 255 / 0.05);
  font-size: 68cqh;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}

/* ------------------------------------------------------------------ Bento 作品卡片 */

.bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 24px);
}
.span-5 {
  grid-column: span 5;
}
.span-6 {
  grid-column: span 6;
}
.span-7 {
  grid-column: span 7;
}
.span-12 {
  grid-column: span 12;
}
.work {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition:
    border-color 0.4s,
    box-shadow 0.5s var(--ease-out);
}
.work:hover {
  border-color: var(--border-strong);
  box-shadow: 0 30px 60px -30px rgb(0 0 0 / 0.9);
}
.work-media {
  position: relative;
  height: clamp(260px, 30vw, 400px);
  overflow: hidden;
}
.span-12 .work-media {
  height: clamp(300px, 38vw, 520px);
}
.work-media .cover {
  position: absolute;
  inset: 0;
}
.work-media .cover img,
.work-media .cover-art {
  transition: transform 0.9s var(--ease-out);
}
.work:hover .work-media .cover img,
.work:hover .work-media .cover-art {
  transform: scale(1.05);
}
.halftone {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgb(0 0 0 / 0.7) 0.9px, transparent 1.3px);
  background-size: 4px 4px;
  mix-blend-mode: multiply;
  opacity: 0.45;
  pointer-events: none;
}
.work-hud {
  --cut: 8px;
  position: absolute;
  inset: auto auto 12px 12px;
  padding: 7px 18px 7px 10px;
  border: 1px solid var(--accent-2);
  background: rgb(7 8 12 / 0.94);
  clip-path: var(--cut-top);
  color: var(--accent-2);
  font: 13px/1 var(--font-hud);
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
}
.work:is(:hover, :focus-visible) .work-hud {
  opacity: 1;
  transform: none;
}
.work-caption {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 24px 22px;
}
.work-title {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.01em;
}
.work-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--text-3);
  font-size: 12.5px;
}
@media (max-width: 860px) {
  .bento > * {
    grid-column: span 12;
  }
  .work-media,
  .span-12 .work-media {
    height: auto;
    aspect-ratio: 16 / 10;
  }
}
@media (hover: none) {
  .work-hud {
    display: none;
  }
}

/* ------------------------------------------------------------------ Journal 胶囊列表 */

.journal {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.journal-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 14px 12px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgb(20 20 20 / 0.35);
  transition:
    background-color 0.35s,
    border-color 0.35s,
    transform 0.5s var(--ease-out);
}
.journal-item:hover {
  border-color: var(--border-strong);
  background: var(--surface);
  transform: translateX(4px);
}
.journal-thumb {
  position: relative;
  display: grid;
  flex: none;
  place-items: center;
  width: 56px;
  height: 56px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface-2);
}
.journal-thumb .cover {
  position: absolute;
  inset: 0;
}
.journal-thumb .cover-glyph {
  inset: 0;
  display: grid;
  place-items: center;
  color: rgb(245 245 245 / 0.75);
  font-size: 40cqh;
  font-weight: 600;
}
.journal-thumb .cover-art svg {
  opacity: 0.55;
}
.journal-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.journal-title {
  overflow: hidden;
  color: var(--text);
  font-size: 16.5px;
  font-weight: 500;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.journal-title .vt-title {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: top;
}
.journal-excerpt {
  overflow: hidden;
  color: var(--text-3);
  font-size: 13px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.journal-meta {
  display: flex;
  flex: none;
  gap: 18px;
  color: var(--text-3);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.journal-arrow {
  display: grid;
  flex: none;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--text-2);
  transition:
    background-color 0.35s,
    color 0.35s,
    border-color 0.35s,
    transform 0.5s var(--ease-spring);
}
.journal-item:hover .journal-arrow {
  border-color: var(--text);
  background: var(--accent);
  color: var(--bg);
  transform: rotate(45deg);
}
@media (max-width: 640px) {
  .journal-item {
    gap: 14px;
    border-radius: var(--radius);
  }
  .journal-thumb {
    width: 48px;
    height: 48px;
  }
  .journal-title {
    font-size: 15px;
  }
  .journal-meta > :first-child,
  .journal-arrow {
    display: none;
  }
  .journal-meta {
    font-size: 12px;
  }
}

/* ------------------------------------------------------------------ Explorations：固定标题 + 视差卡片 */

.explore {
  position: relative;
  height: 210vh;
  border-top: 1px solid var(--border);
}
.explore-pin {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  height: 100vh;
  padding: 0 24px;
  pointer-events: none;
}
.explore-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 380px;
  text-align: center;
  pointer-events: auto;
}
.explore-center .section-sub {
  margin-bottom: 28px;
}
.explore-cols {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 clamp(20px, 5vw, 88px);
  overflow: hidden;
  pointer-events: none;
}
.explore-col {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  width: clamp(190px, 21vw, 290px);
  padding-block: 12vh;
  transform: translate3d(0, var(--py, 0px), 0);
  will-change: transform;
}
.explore-col + .explore-col {
  padding-top: 32vh;
}
.explore-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  rotate: var(--r, 0deg);
  pointer-events: auto;
  transition:
    rotate 0.6s var(--ease-spring),
    scale 0.6s var(--ease-spring),
    border-color 0.3s;
}
.explore-card:hover {
  border-color: var(--border-strong);
  rotate: 0deg;
  scale: 1.04;
}
.explore-card.is-tag {
  gap: 6px;
  padding: 24px;
  background:
    radial-gradient(circle at 85% 15%, rgb(0 240 255 / 0.18), transparent 50%),
    radial-gradient(circle at 10% 100%, rgb(0 240 255 / 0.12), transparent 55%),
    var(--surface);
}
.explore-tag {
  color: var(--text);
  font-size: clamp(24px, 2.6vw, 34px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}
.explore-tag em {
  margin-right: 2px;
  color: var(--accent);
  font-weight: 400;
}
.explore-count {
  color: var(--text-3);
  font-size: 13px;
}
.explore-card.is-post .cover {
  position: absolute;
  inset: 0;
}
.explore-card.is-post::after {
  content: '';
  position: absolute;
  inset: 40% 0 0;
  background: linear-gradient(to bottom, transparent, rgb(0 0 0 / 0.75));
  pointer-events: none;
}
.explore-caption {
  position: relative;
  z-index: 1;
  display: -webkit-box;
  margin: 18px;
  overflow: hidden;
  color: var(--text);
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
@media (max-width: 900px) {
  .explore {
    height: auto;
    padding-block: 80px;
  }
  .explore-pin {
    position: static;
    height: auto;
    padding-bottom: 40px;
  }
  .explore-cols {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    padding: 0 20px;
    overflow: visible;
  }
  .explore-col,
  .explore-col + .explore-col {
    display: grid;
    align-content: start;
    gap: 14px;
    width: auto;
    padding: 0;
    transform: none;
  }
  .explore-col + .explore-col {
    padding-top: 40px;
  }
  .explore-card.is-tag {
    padding: 18px;
  }
}

/* ------------------------------------------------------------------ 统计 */

.stats {
  padding-top: clamp(48px, 6vw, 80px);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  padding-top: clamp(40px, 5vw, 64px);
  border-top: 1px solid var(--border);
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.stat-num {
  color: var(--text);
  font-size: clamp(56px, 8.5vw, 116px);
  line-height: 0.9;
  font-variant-numeric: tabular-nums;
}
.stat-label {
  color: var(--text-3);
  font-size: 14px;
  letter-spacing: 0.08em;
}
@media (max-width: 640px) {
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}

/* ------------------------------------------------------------------ 标签筛选 */

.tag-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 32px;
}
.tag-filter a {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-2);
  font-size: 13px;
  transition:
    color 0.25s,
    border-color 0.25s,
    background-color 0.25s;
}
.tag-filter a:hover {
  border-color: var(--border-strong);
  background: var(--surface);
  color: var(--text);
}
.tag-filter a.is-active {
  border-color: transparent;
  background: none;
  color: var(--bg);
}
.filter-pill {
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: var(--accent);
}
.tag-filter a > span:last-child {
  position: relative;
}
.tag-filter sup {
  margin-left: 4px;
  font-size: 10px;
  opacity: 0.6;
}

/* ------------------------------------------------------------------ 归档 */

.archive {
  padding-bottom: clamp(64px, 8vw, 104px);
}
.archive-year {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 32px;
  padding-block: 40px;
  border-top: 1px solid var(--border);
}
.year-label {
  position: sticky;
  top: 100px;
  align-self: start;
  margin: 0;
  font-weight: 400;
}
.year-num {
  display: block;
  color: var(--text);
  font-size: clamp(56px, 7vw, 96px);
  line-height: 0.9;
}
.year-count {
  display: block;
  margin-top: 10px;
  color: var(--text-3);
  font-size: 13px;
  letter-spacing: 0.08em;
}
.archive-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.archive-row {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr) auto 24px;
  align-items: center;
  gap: 20px;
  padding: 18px;
  border-radius: var(--radius);
  transition: background-color 0.3s;
}
.archive-list li + li {
  border-top: 1px solid var(--border);
}
.archive-row:hover {
  background: var(--surface);
}
.archive-date {
  color: var(--text-3);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.archive-title {
  color: var(--text);
  font-size: 16.5px;
  font-weight: 500;
}
.archive-tags {
  display: flex;
  gap: 10px;
}
.archive-arrow {
  color: var(--text-3);
  transition:
    transform 0.4s var(--ease-spring),
    color 0.3s;
}
.archive-row:hover .archive-arrow {
  color: var(--text);
  transform: rotate(45deg);
}
@media (max-width: 760px) {
  .archive-year {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .year-label {
    position: static;
    display: flex;
    align-items: baseline;
    gap: 14px;
  }
  .year-count {
    margin: 0;
  }
  .archive-row {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 14px;
    padding: 16px 10px;
  }
  .archive-tags,
  .archive-arrow {
    display: none;
  }
}

/* ------------------------------------------------------------------ 搜索页 */

.search-form {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 640px;
  margin-top: 32px;
  padding: 6px 6px 6px 20px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-3);
  transition:
    border-color 0.3s,
    box-shadow 0.3s;
}
.search-form:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgb(0 240 255 / 0.12);
}
.search-form input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 16px;
}
.search-form input::-webkit-search-cancel-button {
  display: none;
}
.search-hits {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.search-hit {
  display: block;
  padding: 22px 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgb(20 20 20 / 0.35);
  transition:
    background-color 0.3s,
    border-color 0.3s;
}
.search-hit:hover {
  border-color: var(--border-strong);
  background: var(--surface);
}
.hit-title {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
}
.hit-snippet {
  margin: 0 0 10px;
  color: var(--text-2);
  font-size: 14px;
}

/* ------------------------------------------------------------------ 文章页 */

.read-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 60;
  height: 2px;
  pointer-events: none;
}
.read-progress span {
  display: block;
  height: 100%;
  background: var(--accent-gradient);
  box-shadow: 0 0 14px rgb(0 240 255 / 0.7);
  transform: scaleX(var(--p, 0));
  transform-origin: 0 50%;
}
@supports (animation-timeline: scroll()) {
  .read-progress span {
    animation: progress linear both;
    animation-timeline: scroll(root);
  }
}
@keyframes progress {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}
.post-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: clamp(128px, 15vw, 168px);
  text-align: center;
}
.post-header > * {
  animation: blur-in 0.9s var(--ease-out) both;
}
.post-header > :nth-child(2) {
  animation-delay: 0.06s;
}
.post-header > :nth-child(4) {
  animation-delay: 0.16s;
}
.post-header > :nth-child(5) {
  animation-delay: 0.22s;
}
.post-header > .post-title {
  animation: none;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 28px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-3);
  font-size: 12.5px;
  transition:
    color 0.25s,
    border-color 0.25s;
}
.back-link:hover {
  border-color: var(--border-strong);
  color: var(--text);
}
.post-eyebrow {
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 16px;
  letter-spacing: 0.2em;
}
.post-eyebrow a {
  transition: color 0.2s;
}
.post-eyebrow a:hover {
  color: var(--text);
}
.post-title {
  max-width: 940px;
  margin: 22px 0 0;
  color: var(--text);
  font-size: clamp(34px, 5.4vw, 64px);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -0.035em;
}
.post-lede {
  max-width: 640px;
  margin: 20px 0 0;
  color: var(--text-2);
  font-size: 17px;
}
.post-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 28px;
  margin-top: 28px;
  color: var(--text-3);
  font-size: 13px;
}
.post-meta b {
  margin-right: 2px;
  color: var(--text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.post-cover {
  margin-top: clamp(40px, 5vw, 64px);
}
.post-cover .cover {
  aspect-ratio: 21 / 9;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
@media (max-width: 760px) {
  .post-cover .cover {
    aspect-ratio: 16 / 10;
    border-radius: var(--radius);
  }
}
.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 720px) minmax(0, 1fr);
  gap: 56px;
  width: min(100% - 48px, 1320px);
  margin: clamp(48px, 6vw, 80px) auto 0;
}
.post-rail {
  position: sticky;
  top: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  justify-self: end;
  align-self: start;
}
.rail-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
  transition:
    color 0.25s,
    border-color 0.25s,
    transform 0.4s var(--ease-spring);
}
.rail-btn:hover {
  border-color: var(--border-strong);
  color: var(--text);
  transform: scale(1.08);
}
.post-main {
  min-width: 0;
}
.post-toc {
  position: sticky;
  top: 120px;
  align-self: start;
  justify-self: start;
  width: 100%;
  max-width: 240px;
  max-height: calc(100vh - 160px);
  overflow: auto;
  scrollbar-width: none;
}
.toc-title {
  margin: 0 0 14px;
  color: var(--text-3);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}
.toc-list {
  position: relative;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--border);
  list-style: none;
}
.toc-list a {
  display: block;
  padding: 5px 0 5px 16px;
  color: var(--text-3);
  font-size: 13px;
  line-height: 1.5;
  transition:
    color 0.25s,
    translate 0.3s var(--ease-out);
}
.toc-list a:hover {
  color: var(--text-2);
}
.toc-list a.is-active {
  color: var(--text);
  translate: 2px 0;
}
.toc-d1 a {
  padding-left: 28px;
}
.toc-d2 a {
  padding-left: 40px;
}
.toc-indicator {
  position: absolute;
  inset: 0 auto auto -1.5px;
  width: 2px;
  height: 1px;
  background: var(--accent-2);
  opacity: var(--o, 0);
  transform: translateY(var(--top, 0px)) scaleY(var(--h, 0));
  transform-origin: top;
  transition: transform 0.4s var(--ease-out), opacity 0.3s;
}
.toc-mobile {
  display: none;
  margin-bottom: 32px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.toc-mobile summary {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-2);
  font-size: 14px;
  cursor: pointer;
  list-style: none;
}
.toc-mobile summary::-webkit-details-marker {
  display: none;
}
.toc-mobile[open] summary {
  margin-bottom: 12px;
}
@media (max-width: 1100px) {
  .post-layout {
    grid-template-columns: minmax(0, 720px);
    justify-content: center;
  }
  .post-toc {
    display: none;
  }
  .toc-mobile {
    display: block;
  }
  .post-rail {
    position: fixed;
    top: auto;
    left: 50%;
    bottom: calc(18px + env(safe-area-inset-bottom));
    z-index: 40;
    flex-direction: row;
    gap: 6px;
    padding: 5px;
    border: 1px solid rgb(255 255 255 / 0.08);
    border-radius: var(--radius);
    background: rgb(20 20 20 / 0.72);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    box-shadow: 0 16px 40px -12px rgb(0 0 0 / 0.8);
    translate: -50% 0;
    transition:
      translate 0.5s var(--ease-out),
      opacity 0.4s;
  }
  html.at-top .post-rail,
  html.near-end .post-rail {
    opacity: 0;
    translate: -50% 24px;
    pointer-events: none;
  }
  .post-rail .like-btn {
    flex-direction: row;
    gap: 6px;
    padding-right: 12px;
  }
  .post-rail .like-icon,
  .post-rail .rail-btn {
    width: 40px;
    height: 40px;
  }
}

/* 点赞 */
.like-btn {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-2);
  cursor: pointer;
}
.like-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition:
    transform 0.4s var(--ease-spring),
    background-color 0.3s,
    border-color 0.3s,
    color 0.3s,
    box-shadow 0.3s;
}
.like-btn:hover .like-icon {
  border-color: color-mix(in oklab, var(--heart) 45%, transparent);
  color: var(--heart);
  transform: scale(1.08);
}
.like-btn:active .like-icon {
  transform: scale(0.88);
}
.like-btn[aria-pressed='true'] .like-icon {
  border-color: var(--heart);
  background: var(--heart);
  color: #fff;
  box-shadow: 0 10px 28px -8px var(--heart);
}
.like-btn[aria-pressed='true'] .like-icon svg {
  fill: currentColor;
}
.like-btn.is-popping .like-icon svg {
  animation: heart-pop 0.6s var(--ease-spring);
}
.like-btn.is-popping .like-icon::after {
  content: '';
  position: absolute;
  inset: -2px;
  border: 2px solid var(--heart);
  border-radius: 50%;
  animation: ring 0.7s var(--ease-out) forwards;
}
.like-count {
  color: var(--text-3);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.like-big {
  flex-direction: row;
  gap: 14px;
  padding: 8px 26px 8px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition:
    border-color 0.3s,
    box-shadow 0.3s;
}
.like-big:hover {
  border-color: var(--border-strong);
  box-shadow: 0 20px 50px -20px rgb(255 107 129 / 0.35);
}
.like-big .like-icon {
  width: 56px;
  height: 56px;
  border: 0;
  background: color-mix(in oklab, var(--heart) 12%, transparent);
  color: var(--heart);
}
.like-big .like-count {
  color: var(--text);
  font-size: 22px;
  font-weight: 700;
}
.like-label {
  color: var(--text-3);
  font-size: 13px;
}
.particle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7px;
  height: 7px;
  margin: -3.5px 0 0 -3.5px;
  border-radius: 50%;
  background: var(--c);
  pointer-events: none;
  animation: particle 0.75s var(--ease-out) forwards;
}
@keyframes particle {
  to {
    transform: translate(var(--dx), var(--dy)) scale(0);
    opacity: 0;
  }
}
@keyframes ring {
  from {
    transform: scale(0.7);
    opacity: 1;
  }
  to {
    transform: scale(1.7);
    opacity: 0;
  }
}
@keyframes heart-pop {
  0% {
    transform: scale(0.3);
  }
  55% {
    transform: scale(1.3);
  }
}
.post-footer {
  width: min(100% - 48px, 720px);
  margin-top: clamp(64px, 8vw, 96px);
}
.post-end {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 0 0 56px;
  text-align: center;
}
.post-end-mark {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 64px;
  line-height: 1;
}
.post-end-text {
  margin: 0;
  color: var(--text-3);
  font-size: 13.5px;
}
.post-license {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.post-license > div {
  min-width: 0;
}
.license-title {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
}
.license-meta,
.license-url {
  margin: 4px 0 0;
  color: var(--text-3);
  font-size: 12.5px;
}
.license-url {
  word-break: break-all;
}
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}
.post-nav-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition:
    background-color 0.3s,
    border-color 0.3s;
}
.post-nav-item:hover {
  border-color: var(--border-strong);
  background: var(--surface);
}
.post-nav-item.is-older {
  align-items: flex-end;
  text-align: right;
}
.post-nav-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-3);
  font-size: 13px;
}
.post-nav-label .display {
  font-size: 18px;
}
.post-nav-title {
  display: -webkit-box;
  overflow: hidden;
  color: var(--text);
  font-size: 15.5px;
  font-weight: 500;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
@media (max-width: 640px) {
  .post-license {
    flex-direction: column;
    align-items: flex-start;
  }
  .post-nav {
    grid-template-columns: 1fr;
  }
}

/* 看大图 */
html:has(dialog.lightbox[open]) {
  overflow: hidden;
}
.lightbox[open] {
  position: fixed;
  inset: 0;
  margin: 0;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  padding: 7vmin;
  border: 0;
  background: rgb(5 5 5 / 0.88);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  cursor: zoom-out;
  animation: fade-in 0.2s both;
}
.lightbox::backdrop {
  background: transparent;
}
.lightbox img {
  max-width: 100%;
  max-height: 86dvh;
  border-radius: var(--radius);
  box-shadow: 0 30px 80px rgb(0 0 0 / 0.6);
}
.lightbox-close {
  position: absolute;
  inset: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) auto auto;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--accent-2);
  background: var(--bg);
  color: var(--text);
  font-size: 28px;
  cursor: pointer;
}
.prose img[role="button"] {
  cursor: zoom-in;
}
.prose img[role="button"]:focus-visible,
.lightbox-close:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
}

/* ------------------------------------------------------------------ 关于 */

.about {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
  padding: clamp(128px, 15vw, 168px) 0 clamp(64px, 8vw, 104px);
}
.about-card {
  position: sticky;
  top: 108px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 28px 32px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgb(0 240 255 / 0.16), transparent 70%),
    var(--surface);
  text-align: center;
}
.about-avatar-wrap {
  padding: 3px;
  border-radius: var(--radius);
  clip-path: var(--cut-top);
  background: var(--accent-gradient);
}
.about-avatar {
  width: 120px;
  height: 120px;
  border: 3px solid var(--surface);
  border-radius: var(--radius);
  clip-path: var(--cut-top);
  background: var(--surface-2);
  object-fit: cover;
}
.about-en {
  margin: 20px 0 0;
  color: var(--text);
  font-size: 36px;
  line-height: 1.1;
}
.about-name {
  margin: 6px 0 0;
  color: var(--text-2);
  font-size: 16px;
  font-weight: 500;
}
.about-tagline {
  margin: 14px 0 0;
  color: var(--text);
  font-size: 14px;
}
.about-desc {
  margin: 8px 0 0;
  color: var(--text-3);
  font-size: 13.5px;
}
.about-social {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}
.about-body {
  min-width: 0;
}
.about-body > .eyebrow {
  animation: fade-in 0.6s both;
}
.about-title {
  margin-bottom: 36px;
  animation: blur-in 0.9s var(--ease-out) 0.1s both;
}
.about-body .prose {
  animation: blur-in 0.9s var(--ease-out) 0.2s both;
}
@media (max-width: 900px) {
  .about {
    grid-template-columns: minmax(0, 1fr);
  }
  .about-card {
    position: static;
  }
}

/* ------------------------------------------------------------------ 友链 */

.friend-avatar {
  background: hsl(var(--h) 28% 16%);
  color: hsl(var(--h) 60% 82%);
  font-size: 20px;
  font-weight: 600;
}
.friend-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.friends-note {
  margin: 36px 0 0;
  color: var(--text-3);
  font-size: 13.5px;
  text-align: center;
}
.friends-note a {
  color: var(--text-2);
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  text-underline-offset: 4px;
}
.friends-note a:hover {
  color: var(--text);
}

/* ------------------------------------------------------------------ 搜索面板（Ctrl K） */

.palette {
  display: none;
  flex-direction: column;
  width: min(640px, calc(100% - 24px));
  max-width: none;
  max-height: min(580px, calc(100dvh - 120px));
  margin: 12vh auto auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 0.1);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  color: var(--text);
  box-shadow: 0 40px 100px -20px rgb(0 0 0 / 0.9);
  opacity: 0;
  transform: translateY(-14px) scale(0.97);
  transition:
    opacity 0.22s,
    transform 0.45s var(--ease-out),
    overlay 0.45s allow-discrete,
    display 0.45s allow-discrete;
}
.palette[open] {
  display: flex;
  opacity: 1;
  transform: none;
}
@starting-style {
  .palette[open] {
    opacity: 0;
    transform: translateY(-14px) scale(0.97);
  }
}
.palette::backdrop {
  background: rgb(0 0 0 / 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition:
    opacity 0.3s,
    overlay 0.3s allow-discrete,
    display 0.3s allow-discrete;
}
.palette[open]::backdrop {
  opacity: 1;
}
@starting-style {
  .palette[open]::backdrop {
    opacity: 0;
  }
}
.palette-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 16px 18px 22px;
  border-bottom: 1px solid var(--border);
  color: var(--text-3);
}
.palette-bar input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 17px;
}
.palette-bar input::-webkit-search-cancel-button {
  display: none;
}
.palette-esc {
  cursor: pointer;
}
.palette-body {
  flex: 1;
  overflow: auto;
  padding: 8px;
  overscroll-behavior: contain;
}
.palette-results {
  margin: 0;
  padding: 0;
  list-style: none;
}
.palette-hint {
  margin: 0;
  padding: 32px 12px;
  color: var(--text-3);
  font-size: 14px;
  text-align: center;
}
.palette-results:not(:empty) + .palette-hint {
  display: none;
}
.p-item {
  animation: p-in 0.35s var(--ease-out) both;
  animation-delay: calc(var(--i) * 35ms);
}
@keyframes p-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}
.p-item a {
  position: relative;
  display: block;
  padding: 12px 44px 12px 16px;
  border-radius: var(--radius);
  transition: background-color 0.15s;
}
.p-item a::after {
  content: '↵';
  position: absolute;
  right: 18px;
  top: 50%;
  color: var(--accent);
  font-family: var(--font-mono);
  opacity: 0;
  translate: 0 -50%;
  transition: opacity 0.15s;
}
.p-item.is-active a {
  background: var(--surface-2);
}
.p-item.is-active a::after {
  opacity: 1;
}
.p-title {
  display: block;
  font-weight: 600;
}
.p-snippet {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--text-3);
  font-size: 13px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.p-meta {
  display: block;
  margin-top: 4px;
  color: var(--text-3);
  font-size: 12px;
}
.palette-foot {
  display: flex;
  gap: 18px;
  padding: 10px 18px;
  border-top: 1px solid var(--border);
  color: var(--text-3);
  font-size: 12px;
}
.palette-foot span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
@media (max-width: 640px) {
  .palette {
    margin-top: 8vh;
  }
  .palette-foot {
    display: none;
  }
}

/* ------------------------------------------------------------------ 分页、空状态 */

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 56px;
}
.page-btn {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-2);
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
  transition:
    color 0.25s,
    border-color 0.25s,
    background-color 0.25s;
}
a.page-btn:hover {
  border-color: var(--border-strong);
  background: var(--surface);
  color: var(--text);
}
.page-btn.is-current {
  border-color: var(--text);
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
}
.page-btn.is-disabled {
  opacity: 0.35;
}
.page-gap {
  align-self: center;
  padding: 0 4px;
  color: var(--text-3);
}
.empty {
  padding: 64px 0;
  text-align: center;
}
.empty svg {
  width: 120px;
  margin: 0 auto 18px;
  fill: none;
  stroke: var(--border-strong);
  stroke-width: 1;
  animation: empty-spin 40s linear infinite;
}
.empty .empty-core {
  fill: var(--accent);
  stroke: none;
}
@keyframes empty-spin {
  to {
    rotate: 360deg;
  }
}
.empty-title {
  margin: 0;
  color: var(--text);
  font-size: 17px;
  font-weight: 600;
}
.empty-text {
  margin: 6px 0 0;
  color: var(--text-3);
  font-size: 14px;
}

/* ------------------------------------------------------------------ 页脚：跑马灯 + 联系 + 状态栏 */

.site-footer {
  position: relative;
  isolation: isolate;
  margin-top: clamp(48px, 6vw, 80px);
  overflow: hidden;
  border-top: 1px solid var(--border);
}
.page-home .site-footer,
.page-404 .site-footer {
  margin-top: 0;
}
.footer-cosmos {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.8s var(--ease-soft);
}
.footer-cosmos.is-ready {
  opacity: 1;
}
.footer-glow {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(to bottom, var(--bg), transparent 26%, transparent 70%, rgb(7 8 12 / 0.75)),
    radial-gradient(ellipse 50% 40% at 50% 55%, rgb(7 8 12 / 0.45), transparent 80%);
}
.marquee {
  padding: clamp(48px, 6vw, 72px) 0 clamp(16px, 3vw, 32px);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 48s linear infinite;
}
.marquee:hover .marquee-track {
  animation-play-state: paused;
}
.marquee-group {
  display: flex;
  flex: none;
  align-items: center;
  gap: clamp(20px, 3vw, 40px);
  padding-right: clamp(20px, 3vw, 40px);
  color: rgb(245 245 245 / 0.16);
  font-size: clamp(44px, 7.5vw, 108px);
  line-height: 1.15;
  white-space: nowrap;
}
.marquee-group .display {
  color: rgb(245 245 245 / 0.92);
}
.marquee-group > span:not(.display) {
  font-weight: 600;
  letter-spacing: -0.02em;
}
.marquee-group i {
  color: var(--accent);
  font-size: 0.4em;
  font-style: normal;
}
@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}
.footer-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(24px, 4vw, 48px) 0 clamp(56px, 7vw, 88px);
  text-align: center;
}
.footer-title {
  margin: 18px 0 0;
  color: var(--text);
  font-size: clamp(40px, 6vw, 76px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.footer-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 36px;
}
.footer-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  padding: 24px 0 calc(24px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  color: var(--text-3);
  font-size: 13px;
}
.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
}
.footer-social a {
  transition: color 0.2s;
}
.footer-social a:hover {
  color: var(--text);
}
.footer-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  color: var(--text-2);
}
.live-dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
}
.live-dot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--ok);
  animation: live 2s var(--ease-out) infinite;
}
@keyframes live {
  to {
    opacity: 0;
    transform: scale(3);
  }
}
.footer-copy {
  font-size: 12.5px;
}
.to-top {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text-2);
  cursor: pointer;
  transition:
    color 0.25s,
    border-color 0.25s,
    transform 0.4s var(--ease-spring);
}
.to-top:hover {
  border-color: var(--text);
  color: var(--text);
  transform: translateY(-3px);
}
@media (max-width: 640px) {
  .footer-status {
    margin-left: 0;
  }
  .footer-bar {
    justify-content: space-between;
  }
}

/* ------------------------------------------------------------------ 减少动态效果 */

@media (prefers-reduced-motion: reduce) {
  @view-transition {
    navigation: none;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .marquee-track,
  .scroll-hint b,
  .about-avatar-wrap {
    animation: none !important;
  }
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}

/* 霓虹 HUD 与音箱面板 */
body::after {
  position: fixed;
  z-index: 70;
  inset: 0;
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgb(0 0 0 / 0.08) 3px 4px);
  pointer-events: none;
  content: '';
}
html {
  --cut-top: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
}
:where(.site-main, .site-header, .site-footer) a:focus-visible,
:where(.site-main, .site-header, .site-footer, .palette) button:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
}
.nav {
  border-top-color: var(--accent-2);
  border-radius: 3px;
  background: var(--glass);
  clip-path: var(--cut-top);
  padding-right: 12px;
}
html.scrolled .nav {
  border-top-color: var(--accent-2);
  background: rgb(12 14 20 / 0.94);
  box-shadow: inset 0 -8px 22px -20px var(--accent-2);
}
.site-header { filter: drop-shadow(0 5px 10px rgb(0 0 0 / 0.48)); }
.logo, .nav-link, .nav-cta, .nav-cta-inner, .nav-cta .kbd {
  border-radius: 2px;
}
.nav-link { color: var(--text-2); font-family: var(--font-display); }
.nav-link.is-active { color: var(--accent); }
.nav-pill {
  inset: auto 4px 2px;
  height: 2px;
  background: var(--accent);
  box-shadow: var(--glow-accent);
}
.nav-cta-inner { font-family: var(--font-hud); color: var(--accent-2); }
:is(.site-main, .site-footer) .btn {
  border-radius: 2px;
  clip-path: var(--cut-top);
  font-family: var(--font-display);
  font-weight: 600;
}
:is(.site-main, .site-footer) .btn:focus-visible,
:is(.work, .journal-item, .explore-card, .page-btn):focus-visible {
  outline-offset: -3px;
}
:is(.site-main, .site-footer) .btn-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}
:is(.site-main, .site-footer) .btn-ghost { border-color: var(--accent-2); color: var(--accent-2); }
:is(.site-main, .site-footer) .btn-ghost:hover {
  border-color: transparent;
  background: linear-gradient(var(--bg), var(--bg)) padding-box, var(--ring-gradient) border-box;
  background-size: 100% 100%, 200% 100%;
  color: var(--accent-2);
  animation: none;
}
:is(.site-main, .site-footer) .btn-primary:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  animation: none;
}
.hero-bg {
  background: radial-gradient(ellipse at 65% 28%, #16202e, transparent 66%), var(--bg);
}
.hero-overlay {
  background: radial-gradient(ellipse 62% 49% at center, rgb(7 8 12 / 0.82), rgb(7 8 12 / 0.13) 95%);
}
.hero-name {
  margin-top: 19px;
  font-size: clamp(48px, 10.65vw, 145px);
  font-weight: 700;
  line-height: 0.93;
  letter-spacing: -0.065em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
  text-shadow: -2px 0 var(--accent-2), 2px 0 var(--accent-3), 0 8px 36px #07080c;
}
.hero-desc { color: var(--text-2); }
.hero-eyebrow, .role-word, .scroll-hint, .eyebrow, .work-meta, .journal-meta,
.stat-num, .stat-label, .amp-label, .footer-status, .toc-title, .palette-foot {
  font-family: var(--font-hud);
}
.hero-eyebrow, .role-word, .scroll-hint { color: var(--accent-2); }
.eyebrow, .page-sub, .section-sub { color: var(--text-2); }
.section-title, .page-title, .post-title, .footer-title, .about-name {
  font-family: var(--font-display);
  font-weight: 600;
}
:is(.section-title, .page-title, .footer-title) em {
  color: var(--accent-2);
  font-weight: 600;
  font-style: normal;
}
:is(.work, .journal-item, .explore-card, .about-card, .page-btn, .toc-mobile, .palette) {
  border-radius: 2px;
  clip-path: var(--cut-top);
}
.work:hover, .journal-item:hover, .explore-card:hover { border-color: var(--accent-2); }
.work-media, .journal-thumb,
.tag-filter a, .filter-pill, .tag, .toc-list a {
  border-radius: 2px;
}
.role-word > span {
  grid-area: 1 / 1;
}
.role-sizer {
  visibility: hidden;
}
.role-text {
  position: relative;
}
:is(.back-link, .like-big, .like-icon, .rail-btn, .post-rail, .to-top, .journal-arrow,
  .search-form, .archive-row, .post-cover .cover, .p-item a, .lightbox img,
  .tag-filter a, .tag, .code-copy, .skip-link, .toast) {
  border-radius: var(--radius);
  clip-path: var(--cut-top);
}
:is(.back-link, .like-big, .rail-btn, .to-top, .tag-filter a, .p-item a, .code-copy, .skip-link):focus-visible {
  outline-offset: -3px;
}
.site-main code:not(pre code) {
  border-radius: var(--radius);
}
.work-meta, .journal-meta, .explore-count { color: var(--text-2); }
.work-id, .journal-meta time { color: var(--accent-2); }
.journal-title::before {
  content: '>';
  margin-right: 0.6em;
  color: var(--accent);
  font-family: var(--font-hud);
}
.halftone {
  background-image: repeating-linear-gradient(0deg, transparent 0 3px, #000 3px 4px);
}
.cover-art { background: #0b111b; }
.cover-glyph { font-family: var(--font-display); font-style: normal; }
.page-btn { --cut: 8px; }
.page-btn.is-current { background: var(--accent); color: var(--accent-ink); }
.explore-card.is-tag {
  background: linear-gradient(145deg, rgb(0 240 255 / 0.11), transparent 52%), var(--surface);
}
.explore-tag em { color: var(--accent-2); }
.guitar-strings {
  display: grid;
  gap: 4px;
  padding-block: 12px;
}
.guitar-strings i {
  display: block;
  height: calc(2.25px - var(--string) * 0.27px);
  background: linear-gradient(90deg, transparent, var(--border-strong) 10%, var(--accent-2) 50%, var(--border-strong) 90%, transparent);
  opacity: 0.55;
}
.guitar-strings:hover i,
.guitar-strings.is-plucked i {
  animation: strum 280ms ease-out both;
}
.guitar-strings.is-plucked i {
  animation-delay: calc(var(--string) * 22ms);
}
@keyframes strum {
  25% { transform: translateY(calc(3px - var(--string) * 0.3px)); }
  55% { transform: translateY(-2px); }
  80% { transform: translateY(1px); }
}
.stats-grid {
  border: 1px solid var(--border-strong);
  border-top-color: var(--accent-2);
  background: radial-gradient(circle, #242b37 1px, transparent 1px) center / 5px 5px, var(--surface);
  gap: 1px;
  padding-top: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  clip-path: var(--cut-top);
}
.stat { align-items: center; text-align: center; background: rgb(7 8 12 / 0.94); padding: 26px 10px 22px; }
.stat-num { color: var(--accent); font-size: clamp(35px, 7vw, 74px); }
.stat-label { color: var(--text-2); }
.amp-label { color: var(--accent-2); font-size: 12px; letter-spacing: .19em; text-transform: uppercase; }
.amp-knob {
  position: relative;
  width: clamp(35px, 7vw, 62px);
  aspect-ratio: 1;
  margin-block: 10px 14px;
  border-radius: 50%;
  border: 2px dashed var(--border-strong);
}
.amp-knob::before {
  content: '';
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: radial-gradient(circle at 34% 33%, #333c4b, #10131b 72%);
}
.amp-knob::after {
  content: '';
  position: absolute;
  inset: 8px 0;
  width: 2px;
  margin: auto;
  background: linear-gradient(var(--accent) 25%, transparent 25%);
  transform: rotate(var(--amp-angle, 128deg));
}
.loader {
  --wave-accent: var(--accent-2);
  font-family: var(--font-hud);
}
html.show-loader .loader {
  background: radial-gradient(ellipse at 50% 42%, #10252d, var(--bg) 68%);
}
.loader .display { font-family: var(--font-hud); color: var(--accent); }
.loader-label { color: var(--accent-2); }
.loader-wave {
  position: absolute;
  inset: 50% auto auto 50%;
  translate: -50% 20px;
  width: min(60vw, 390px);
  fill: none;
  stroke: var(--wave-accent);
  stroke-width: 1.5;
  filter: drop-shadow(var(--glow-cyan));
}
.loader.is-done .loader-wave { animation: power-chord 260ms both; }
@keyframes power-chord {
  38% { scale: 1.09 1.65; stroke: var(--accent-3); }
  70% { scale: 1.01 0.92; }
}
.loader-bar { background: repeating-linear-gradient(90deg, var(--border-strong) 0 14px, transparent 14px 17px); }
.loader-bar span { mask-image: repeating-linear-gradient(90deg, #000 0 14px, transparent 14px 17px); }
.footer-glow {
  background: linear-gradient(var(--bg), transparent 28%, rgb(7 8 12 / 0.8));
}
.marquee { position: relative; }
.marquee::before {
  content: '';
  position: absolute;
  inset: 18px 0 auto;
  height: 3px;
  background: repeating-linear-gradient(130deg, var(--accent) 0 10px, #232010 10px 20px);
}
.marquee-group, .marquee-group .display {
  color: var(--accent);
  font-family: var(--font-hud);
  font-weight: 400;
  text-transform: uppercase;
}
.read-progress span { box-shadow: var(--glow-cyan); }
.prose :is(h2, h3, h4) { scroll-margin-top: 16px; }
.prose :is(h2, h3)::before { content: '/ '; color: var(--accent-2); font-family: var(--font-hud); }
.prose a:not(.anchor) { color: var(--accent-2); text-decoration-color: var(--accent-2); }
.post-toc .is-active, .toc-mobile .is-active { color: var(--accent-2); }
.prose .code-block { border-radius: 2px; border-top-color: var(--accent-2); }
:is(.hero-name, .work-title):hover { animation: hud-glitch 230ms 1; }
@keyframes hud-glitch {
  35% { opacity: 0.86; transform: translate3d(2px, 0, 0) skewX(1deg); }
  72% { opacity: 1; transform: translate3d(-1px, 0, 0); }
}
@media (max-width: 480px) {
  .nav { --cut: 8px; padding-right: 6px; }
  .hero-name { font-size: clamp(43px, 12vw, 60px); letter-spacing: -0.07em; }
  .explore-card.is-tag { padding: 14px; }
  .explore-tag { font-size: clamp(16px, 5.4vw, 24px); }
  .stat { padding: 18px 3px 15px; }
  .stat-label { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .guitar-strings:hover i, .guitar-strings.is-plucked i, .loader.is-done .loader-wave,
  :is(.hero-name, .work-title):hover { animation: none; }
  .read-progress span { animation: none !important; }
}


.logo > svg, .footer-logo > svg { display: block; height: 36px; width: auto; }
.loader-label { display: flex; align-items: center; gap: 10px; }
.loader-label > svg { width: 28px; height: 28px; }
.loader-words {
  inset: 40% 0 auto;
  width: min(90vw, 720px);
  margin-inline: auto;
  text-align: center;
}
.loader-words .display { font-size: clamp(20px, 5vw, 64px); }
.error-logo { width: 52px; height: 52px; margin-bottom: 20px; }
.footer-logo { flex: none; }
.footer-logo > svg { height: 23px; }
@media (prefers-reduced-motion: no-preference) {
  .logo:hover svg, .footer-logo:hover svg { animation: hud-glitch 230ms 1; }
}

/* ------------------------------------------------------------------ HUD：读数、扫描与精细指针反馈 */

.scroll-hud,
.nav-eq {
  display: none;
}
.hero-telemetry {
  position: absolute;
  left: clamp(20px, 4vw, 72px);
  bottom: max(42px, env(safe-area-inset-bottom));
  z-index: 1;
  display: grid;
  justify-items: start;
  text-align: left;
  gap: 3px;
  border-left: 1px solid rgb(0 240 255 / 0.35);
  padding-left: 10px;
  color: var(--text-2);
  font: 11px/1.3 var(--font-hud);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.13em;
  pointer-events: none;
}
.hero-telemetry > :first-child {
  color: var(--accent-2);
}
@media (prefers-reduced-motion: no-preference) {
  .hero-telemetry {
    transform: translate3d(0, var(--telemetry-shift, 0px), 0);
  }
  .motion-decode {
    position: relative;
  }
  .motion-glyphs {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    overflow: clip;
    color: var(--accent-2);
    font: inherit;
    letter-spacing: inherit;
    white-space: nowrap;
    text-shadow: 0 0 10px rgb(0 240 255 / 0.6);
    pointer-events: none;
    animation: glyph-sweep 230ms ease-out both;
  }
  :is(.section-title, .page-title) .motion-glyphs {
    justify-content: start;
  }
  :is(.explore-center, .footer-cta) .motion-glyphs {
    justify-content: center;
  }
  @keyframes glyph-sweep {
    0% { opacity: 0; transform: translate3d(-7px, 5px, 0) scaleY(0.82); }
    22% { opacity: 0.88; transform: translate3d(2px, 0, 0); }
    65% { opacity: 0.54; }
    100% { opacity: 0; transform: translate3d(3px, -4px, 0); }
  }
  .work::before,
  .journal-item::before,
  :is(.site-main, .site-footer) .btn::after {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(102deg, transparent 18%, rgb(0 240 255 / 0.18) 48%, rgb(0 240 255 / 0.72) 50%, transparent 53%);
    content: '';
    opacity: 0;
    pointer-events: none;
  }
  .journal-item,
  :is(.site-main, .site-footer) .btn {
    position: relative;
    overflow: clip;
  }
  .work.is-in::before,
  li.is-in > .journal-item::before {
    animation: card-scan 460ms var(--ease-out) both;
    animation-delay: var(--rd, 0ms);
  }
  :is(.site-main, .site-footer) .btn:is(:hover, :focus-visible)::after {
    animation: card-scan 270ms ease-out both;
  }
  @keyframes card-scan {
    0% { opacity: 0; transform: translate3d(-90%, 0, 0); }
    23% { opacity: 0.56; }
    81% { opacity: 0.36; }
    100% { opacity: 0; transform: translate3d(95%, 0, 0); }
  }
  .marquee-track,
  .scroll-hint b,
  .site-footer .live-dot::after {
    animation-play-state: paused;
  }
  .marquee.is-onscreen:not(:hover) .marquee-track,
  .scroll-hint.is-onscreen b,
  .site-footer .live-dot.is-onscreen::after {
    animation-play-state: running;
  }
  .motion-paused :is(.marquee-track, .nav-eq i, .scroll-hint b),
  .motion-paused .live-dot::after {
    animation-play-state: paused !important;
  }

  @media (min-width: 1480px) {
    .scroll-hud {
      position: fixed;
      inset: 50% 13px auto auto;
      z-index: 50;
      display: grid;
      justify-items: center;
      gap: 10px;
      transform: translateY(-50%);
      color: var(--text-2);
      font: 10px/1 var(--font-hud);
      font-variant-numeric: tabular-nums;
      pointer-events: none;
    }
    .scroll-hud-track {
      position: relative;
      display: block;
      width: 12px;
      height: 82px;
      background: repeating-linear-gradient(180deg, rgb(0 240 255 / 0.27) 0 1px, transparent 1px 8px) right / 5px 100% no-repeat;
    }
    .scroll-hud-track i {
      position: absolute;
      inset: 0 auto 0 0;
      width: 1px;
      background: var(--accent-2);
      transform: scaleY(var(--scroll-ratio, 0));
      transform-origin: top;
    }
    .scroll-hud > :last-child {
      writing-mode: vertical-rl;
      letter-spacing: 0.09em;
    }
  }

  @media (min-width: 720px) {
    .nav-eq {
      align-items: center;
      display: inline-flex;
      gap: 2px;
      height: 15px;
      margin-inline: 6px 1px;
      padding-top: 3px;
    }
    .nav-eq i {
      width: 2px;
      height: 12px;
      background: var(--accent-2);
      transform: scaleY(0.35);
      transform-origin: 50% 85%;
    }
    .scene-active .nav-eq i {
      animation: nav-level 1.55s ease-in-out infinite alternate;
    }
    .scene-active.scene-energizing .nav-eq i {
      animation: nav-energy 2.6s ease-in-out both;
    }
    @keyframes nav-energy {
      0%, 100% { transform: scaleY(0.36); opacity: 0.65; }
      55% { transform: scaleY(1.25); opacity: 0.98; }
    }
    .nav-eq i:nth-child(2n) { animation-delay: -0.47s; }
    .nav-eq i:nth-child(3n) { animation-delay: -0.92s; }
    .nav-eq i:nth-child(5n) { animation-delay: -1.3s; }
    @keyframes nav-level {
      0% { transform: scaleY(0.28); opacity: 0.62; }
      53% { transform: scaleY(1); opacity: 0.92; }
      100% { transform: scaleY(0.5); opacity: 0.8; }
    }
  }

  @media (hover: hover) and (pointer: fine) {
    :is(.work, .journal-item, .explore-card).is-tilted {
      transform: perspective(700px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
      transition: transform 130ms ease-out;
    }
    .motion-edge {
      position: absolute;
      z-index: 3;
      inset: 1px;
      overflow: clip;
      padding: 1.5px;
      opacity: 0;
      pointer-events: none;
      mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
      mask-composite: exclude;
      transition: opacity 200ms ease-out;
    }
    .motion-edge::before {
      position: absolute;
      inset: 0 auto auto 0;
      width: 230px;
      height: 230px;
      background: radial-gradient(circle, #e5fdff, var(--accent-2) 38%, transparent 70%);
      transform: translate3d(var(--edge-x, 0px), var(--edge-y, 0px), 0);
      content: '';
    }
    .is-tilted > .motion-edge {
      opacity: 0.9;
    }
    :is(.footer-social a, .post-toc a, .back-link, .post-meta a):not(.footer-logo) {
      position: relative;
    }
    :is(.footer-social a, .post-toc a, .back-link, .post-meta a):not(.footer-logo)::after {
      position: absolute;
      inset: auto 0 0;
      height: 1px;
      background: var(--accent-2);
      content: '';
      opacity: 0;
      transform: scaleX(0);
      transform-origin: left;
      transition: transform 240ms var(--ease-out), opacity 170ms;
      pointer-events: none;
    }
    :is(.footer-social a, .post-toc a, .back-link, .post-meta a):is(:hover, :focus-visible)::after {
      opacity: 0.9;
      transform: scaleX(1);
    }
    .hud-reticle {
      position: fixed;
      inset: 0;
      z-index: 72;
      opacity: 0;
      pointer-events: none;
      transition: opacity 160ms ease;
    }
    .hud-reticle.is-visible {
      opacity: 1;
    }
    .hud-reticle i,
    .hud-reticle b {
      position: absolute;
      inset: -13px auto auto -13px;
      width: 26px;
      height: 26px;
      border: 1px solid rgb(0 240 255 / 0.56);
      border-radius: 50%;
      transition: scale 160ms ease, opacity 160ms ease;
    }
    .hud-reticle i {
      mask-image: conic-gradient(transparent 0 16%, #000 16% 27%, transparent 27% 65%, #000 65% 78%, transparent 78%);
    }
    .hud-reticle b {
      scale: 1.55;
      opacity: 0.33;
    }
    .hud-reticle.is-action i {
      scale: 1.5;
    }
    .hud-reticle.is-action b {
      scale: 0.76;
      opacity: 0.62;
    }
  }
}
@media (max-width: 640px) {
  .hero-telemetry {
    bottom: 34px;
    font-size: 9px;
    letter-spacing: 0.06em;
  }
}
@media (prefers-reduced-motion: reduce) {
  .motion-glyphs, .hud-reticle, .motion-edge {
    display: none;
  }
  .lightbox[open], .site-footer .live-dot::after {
    animation: none;
  }
}

