/* ==========================================================================
   LIU · v3「取景器」
   整个网站就是透过 Logo 的取景框往里看：四个角、右上角录制中的猫爪、
   悬停时的对焦框、没对上焦的东西会虚掉。
   ========================================================================== */

/* ---------- 字体（本地托管，仅拉丁字符；中文用系统字体） ---------- */
@font-face {
  font-family: "Archivo";
  src: url("../assets/fonts/archivo-latin-wdth-var.woff2") format("woff2-variations"), url("../assets/fonts/archivo-latin-wdth-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2013-2014, U+2018-201E, U+2022, U+2026, U+2190-2193, U+2197, U+2212;
}
@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/inter-latin-var.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2013-2014, U+2022, U+2026, U+20AC, U+2122, U+2190-2193, U+2197, U+2212, U+2318;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../assets/fonts/jetbrains-mono-latin-var.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2013-2014, U+2022, U+2190-2193, U+2197, U+2212;
}

/* ---------- 变量 ---------- */
:root {
  color-scheme: dark;
  --bg: #0b0b0a;
  --bg-2: #141413;
  --paper: #efede7;
  --ink: #0b0b0a;
  --fg: #efede7;
  --fg-2: rgba(239, 237, 231, 0.64);
  --fg-3: rgba(239, 237, 231, 0.38);
  --rule: rgba(239, 237, 231, 0.12);
  --ink-2: rgba(11, 11, 10, 0.62);
  --ink-3: rgba(11, 11, 10, 0.4);
  --ink-rule: rgba(11, 11, 10, 0.12);
  --red: #e0140f;      /* 在深色上用，比 Logo 原色稍亮 */
  --red-brand: #cc0303; /* Logo 猫爪的原色 */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --cjk: "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC";
  --font-sans: "Inter", var(--cjk), system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Archivo", var(--cjk), "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, var(--cjk), monospace;

  /* 取景框 */
  --hud-inset: 18px;
  --frame: calc(var(--hud-inset) + 22px);
  --hud-h: calc(var(--hud-inset) * 2 + 30px);

  --container: 1320px;
  --gutter: clamp(20px, 6vw, 96px);

  /* Logo 外轮廓：四角尖、四边内凹（取自 L 和 U 的外缘） */
  --liu-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0 0C30 7 70 7 100 0C87 30 87 70 100 100C70 93 30 93 0 100C13 70 13 30 0 0Z'/%3E%3C/svg%3E");
}

/* ---------- 基础 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p, dl, dd, figure { margin: 0; }
::selection { background: var(--red); color: #fff; }
:focus-visible { outline: 1.5px solid var(--red); outline-offset: 4px; border-radius: 2px; }

kbd {
  font-family: var(--font-mono);
  font-size: 0.72em;
  line-height: 1;
  color: var(--fg-3);
}
.mono { font-family: var(--font-mono); letter-spacing: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.text-btn { font-size: 14px; color: var(--fg-2); transition: color 0.2s; }
.text-btn:hover { color: var(--fg); }

/* 页面之间切换（Chrome 126+ 原生 View Transitions，不支持的浏览器直接跳转） */
@view-transition { navigation: auto; }
::view-transition-group(*) { animation-duration: 0.7s; animation-timing-function: var(--ease); }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.45s; }

/* ==========================================================================
   开场动画（js/intro.js）
   ========================================================================== */
.intro { display: none; }
:root[data-intro="full"] .intro,
:root[data-intro="quick"] .intro {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--bg);
  color: var(--fg);
  cursor: progress;
  /* 万一脚本没跑起来，9 秒后自己消失，不会把网站挡住 */
  animation: intro-failsafe 0.6s 9s forwards;
}
:root[data-intro] .intro.is-live { background: none; animation: none; }
@keyframes intro-failsafe { to { opacity: 0; visibility: hidden; } }
.intro-stage, .intro-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.intro-svg { overflow: visible; }
.i-l {
  fill: none;
  stroke: var(--fg);
  stroke-width: 1.3;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  vector-effect: non-scaling-stroke;
}
/* 横竖两条对焦线，开场时从整屏收到中心 */
.i-hair { stroke: var(--fg); stroke-width: 1; opacity: 0.22; }
.intro-bar {
  position: absolute;
  left: var(--frame);
  right: var(--frame);
  bottom: calc(var(--hud-inset) + 6px);
  display: flex;
  justify-content: space-between;
  gap: 24px;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--fg-2);
}
.intro-line { position: absolute; left: 0; right: 0; top: -14px; height: 1px; overflow: hidden; background: var(--rule); }
.intro-line i { position: absolute; inset: 0; background: var(--fg); transform: scaleX(0); transform-origin: left; }
.intro-status.is-lock { color: var(--red); }

/* ==========================================================================
   取景器 HUD
   ========================================================================== */
.hud-top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  height: var(--hud-h);
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 calc(var(--frame) + 150px) 0 var(--frame);
  color: #fff;
  mix-blend-mode: difference;
  pointer-events: none;
}
.hud-top > * { pointer-events: auto; }
.hud-logo { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.hud-logo svg { height: 22px; width: auto; fill: currentColor; }
.hud-nav { display: flex; gap: 22px; }
.hud-nav a { display: inline-flex; align-items: baseline; gap: 6px; font-size: 13.5px; opacity: 0.62; transition: opacity 0.2s; }
.hud-nav a:hover, .hud-nav a.is-active { opacity: 1; }
.hud-nav a.is-active .nav-label::before { content: ""; display: inline-block; width: 5px; height: 5px; margin: 0 7px 0.18em 0; background: currentColor; border-radius: 50%; vertical-align: middle; }
.hud-nav kbd { color: inherit; opacity: 0.55; }
.hud-nav kbd:empty { display: none; }
.nav-label { display: inline-block; }
.hud-cmd { font-family: var(--font-mono); font-size: 12px; opacity: 0.62; transition: opacity 0.2s; }
.hud-cmd:hover { opacity: 1; }

/* 右上角：录制中的猫爪（就是 Logo 右上角那个）+ 时间码，和导航在同一行 */
.hud-rec {
  position: fixed;
  z-index: 61;
  top: 0;
  right: calc(var(--frame) - 2px);
  height: var(--hud-h);
  display: flex;
  align-items: center;
  padding: 0 2px;
}
.hud-paw { display: block; width: 19px; color: var(--red); animation: rec 1.6s steps(1) infinite; }
.hud-paw svg { width: 100%; height: auto; fill: currentColor; }
.hud-rec:hover .hud-paw { animation: none; }
.hud-tc {
  position: fixed;
  z-index: 61;
  top: 0;
  right: calc(var(--frame) + 30px);
  height: var(--hud-h);
  display: flex;
  align-items: center;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: #fff;
  opacity: 0.6;
  mix-blend-mode: difference;
  pointer-events: none;
}
@keyframes rec { 0%, 62% { opacity: 1; } 63%, 100% { opacity: 0.18; } }

.hud-bottom {
  position: fixed;
  z-index: 60;
  left: var(--frame);
  right: var(--frame);
  bottom: calc(var(--hud-inset) + 6px);
  display: flex;
  justify-content: space-between;
  gap: 24px;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: #fff;
  opacity: 0.55;
  mix-blend-mode: difference;
  pointer-events: none;
}

/* 渐进模糊：内容滑到上下边缘时慢慢虚掉 */
.edge-blur { position: fixed; left: 0; right: 0; z-index: 50; pointer-events: none; }
.edge-blur i { position: absolute; inset: 0; }
/* 层比可见区域多出 48px 伸到屏幕外，避免 backdrop-filter 在边缘镜像取样 */
.edge-blur--top { top: -48px; height: 160px; }
.edge-blur--top i:nth-child(1) { -webkit-backdrop-filter: blur(1.5px); backdrop-filter: blur(1.5px); -webkit-mask-image: linear-gradient(#000 65%, transparent); mask-image: linear-gradient(#000 65%, transparent); }
.edge-blur--top i:nth-child(2) { -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); -webkit-mask-image: linear-gradient(#000 47%, transparent 76%); mask-image: linear-gradient(#000 47%, transparent 76%); }
.edge-blur--top i:nth-child(3) { -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); -webkit-mask-image: linear-gradient(#000 30%, transparent 57%); mask-image: linear-gradient(#000 30%, transparent 57%); }
.edge-blur--bottom { bottom: -48px; height: 120px; }
.edge-blur--bottom i:nth-child(1) { -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); -webkit-mask-image: linear-gradient(transparent, #000 36%); mask-image: linear-gradient(transparent, #000 36%); }
.edge-blur--bottom i:nth-child(2) { -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); -webkit-mask-image: linear-gradient(transparent 24%, #000 60%); mask-image: linear-gradient(transparent 24%, #000 60%); }

/* 顶部 1px 阅读进度（CSS 滚动驱动动画，不支持的浏览器不显示） */
.progress-line { display: none; }
@supports (animation-timeline: scroll()) {
  .progress-line {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 62;
    height: 1.5px;
    background: var(--red);
    transform-origin: left;
    animation: progress-grow linear both;
    animation-timeline: scroll(root);
  }
  @keyframes progress-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}

/* 跟着鼠标走的对焦框 */
.af {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 55;
  width: 40px;
  height: 40px;
  pointer-events: none;
  opacity: 0;
  color: #fff;
  mix-blend-mode: difference;
}
.af i { position: absolute; width: 10px; height: 10px; border: 0 solid currentColor; }
.af i:nth-child(1) { left: 0; top: 0; border-width: 1.5px 0 0 1.5px; border-top-left-radius: 3px; }
.af i:nth-child(2) { right: 0; top: 0; border-width: 1.5px 1.5px 0 0; border-top-right-radius: 3px; }
.af i:nth-child(3) { left: 0; bottom: 0; border-width: 0 0 1.5px 1.5px; border-bottom-left-radius: 3px; }
.af i:nth-child(4) { right: 0; bottom: 0; border-width: 0 1.5px 1.5px 0; border-bottom-right-radius: 3px; }
.af.is-lock { color: var(--red); mix-blend-mode: normal; }

/* ==========================================================================
   首屏
   ========================================================================== */
.hero { position: relative; height: 175vh; height: 175svh; }
.hero-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; touch-action: pan-y; }
.hero-fallback { position: absolute; inset: 0; display: grid; place-items: center; padding-bottom: 6vh; }
.hero-fallback svg { width: min(20vh, 24vw); height: auto; fill: var(--fg); overflow: visible; }
.hero-fallback path { transform-box: fill-box; transform-origin: center; }

.hero-lockwrap, .hero-ui { position: absolute; inset: 0; pointer-events: none; }
.hero-ui a, .hero-ui button { pointer-events: auto; }
/* 3D 字母外面的取景框和猫爪：就是 Logo 本身，按原比例围着字母摆（位置由 JS 算） */
.hero-mark { position: absolute; left: 0; top: 0; width: 100px; height: 100px; pointer-events: none; }
.hero-mark svg { width: 100%; height: 100%; overflow: visible; }
.hero-mark .logo-brackets { fill: var(--fg); transition: fill 0.3s; }
.hero-mark .logo-paw { fill: var(--red); }
.hero-mark.is-locked .logo-brackets { fill: var(--red); }
.af-label { position: absolute; left: 0; top: -20px; font-size: 10.5px; letter-spacing: 0.08em; white-space: nowrap; color: var(--fg-2); }

.flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }

.hero-meta {
  position: absolute;
  left: var(--frame);
  bottom: calc(var(--frame) + 12px);
  max-width: 400px;
  pointer-events: none;
}
.hero-meta a { pointer-events: auto; }
.hero-kicker { font-size: 11.5px; letter-spacing: 0.06em; color: var(--fg-2); text-transform: uppercase; margin-bottom: 14px; }
.hero-kicker [data-bind="name"] { text-transform: none; overflow-wrap: anywhere; }
.hero-intro { font-size: 15px; line-height: 1.85; color: var(--fg-2); }
.hero-intro a { color: var(--fg); text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 4px; }
.hero-side {
  position: absolute;
  right: var(--frame);
  bottom: calc(var(--frame) + 12px);
  text-align: right;
  font-size: 14px;
}
.hero-status { display: flex; align-items: center; justify-content: flex-end; gap: 9px; color: var(--fg-2); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 rgba(224, 20, 15, 0.6); animation: ping 2.4s var(--ease) infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(224, 20, 15, 0.55); } 70%, 100% { box-shadow: 0 0 0 10px rgba(224, 20, 15, 0); } }
.hero-cta { display: inline-block; margin-top: 8px; font-weight: 600; transition: color 0.2s; }
.hero-cta:hover { color: var(--red); }
.hero-hint {
  position: absolute;
  left: 50%;
  bottom: calc(var(--frame) + 12px);
  translate: -50% 0;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--fg-3);
  pointer-events: none;
  white-space: nowrap;
}

.hero-statement {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(90vw, 15em);
  translate: -50% -50%;
  font-size: clamp(30px, 4.6vw, 70px);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.02em;
  text-align: center;
  white-space: pre-line;
  pointer-events: none;
  text-wrap: balance;
}
.hero-statement .ch { opacity: 0; }

/* ==========================================================================
   通用：区块与标题
   ========================================================================== */
.section { position: relative; padding: clamp(88px, 10vw, 160px) 0; }
.work { padding-top: clamp(40px, 5vw, 80px); }
.sec-head { margin-bottom: clamp(36px, 5vw, 64px); }
.sec-big {
  font-family: var(--font-display);
  font-size: clamp(84px, 19.5vw, 300px);
  font-weight: 800;
  font-stretch: 62%;
  line-height: 0.78;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  margin-left: -0.035em;
  white-space: nowrap;
  user-select: none;
}
.sec-big .ch { display: inline-block; transition: font-variation-settings 0.5s var(--ease); }
.sec-info { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; margin-top: 28px; }
.sec-title { display: flex; align-items: baseline; gap: 12px; font-size: 15px; font-weight: 600; letter-spacing: 0.01em; }
.sec-title .mono { font-size: 11.5px; font-weight: 400; color: var(--red); }
.sec-note { font-size: 12px; color: var(--fg-3); }

/* ==========================================================================
   作品
   ========================================================================== */
.filters { display: flex; flex-wrap: wrap; gap: 6px 26px; margin-bottom: 18px; font-size: 12px; }
.filter { color: var(--fg-3); transition: color 0.2s; padding: 4px 0; }
.filter:hover { color: var(--fg); }
.filter.is-active { color: var(--fg); }
.filter.is-active::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 8px; border-radius: 50%; background: var(--red); vertical-align: 0.1em; }
.filter-n { margin-left: 6px; opacity: 0.6; }

.work-item { border-top: 1px solid var(--rule); }
.work-item:last-child { border-bottom: 1px solid var(--rule); }
.work-row {
  width: 100%;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) minmax(220px, 300px) 28px;
  align-items: center;
  gap: 24px;
  padding: clamp(18px, 2.2vw, 30px) 0;
  transition: opacity 0.5s var(--ease), filter 0.5s var(--ease);
}
.w-idx { font-family: var(--font-mono); font-size: 12px; color: var(--fg-3); transition: color 0.3s; }
.w-title {
  font-family: var(--font-display);
  font-size: clamp(42px, 6.8vw, 112px);
  font-weight: 800;
  font-stretch: 62%;
  line-height: 0.9;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  transition: font-stretch 0.6s var(--ease), color 0.3s;
}
.w-meta { display: flex; flex-direction: column; gap: 6px; }
.w-tagline { font-size: 14px; line-height: 1.6; color: var(--fg-2); }
.w-exif { font-family: var(--font-mono); font-size: 11px; color: var(--fg-3); letter-spacing: 0.02em; }
.w-arrow { font-size: 20px; color: var(--fg-3); transition: translate 0.4s var(--ease), color 0.3s; }

@media (hover: hover) and (pointer: fine) {
  /* 对上焦的那一行清楚，其它行虚掉 —— 景深 */
  .work-list:hover .work-item:not(:hover) .work-row { opacity: 0.32; filter: blur(3px); }
  .work-item:hover .w-title { font-stretch: 100%; }
  .work-item:hover .w-idx { color: var(--red); }
  .work-item:hover .w-arrow { color: var(--fg); translate: 6px 0; }
}

.work-preview {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 30;
  width: 360px;
  height: 240px;
  pointer-events: none;
  overflow: hidden;
  border-radius: 6px;
  background: #121211;
  clip-path: inset(50% 0% 50% 0% round 6px);
  will-change: transform, clip-path;
}
/* 一圈极细的描边，像取景窗的边 */
.work-preview::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(239, 237, 231, 0.14); pointer-events: none; }
.wp-lens { width: 100%; height: 100%; }
.wp-track { will-change: transform; }
.wp-frame { width: 100%; height: 240px; overflow: hidden; }
.wp-frame img { width: 100%; height: 100%; object-fit: cover; }
.wp-frame .cg-title { translate: 0 16px; opacity: 0.4; transition: translate 0.8s var(--ease), opacity 0.6s; }
.wp-frame.is-on .cg-title { translate: none; opacity: 1; }

/* 没有截图时生成的封面：暗底 + 一束项目色的光，不是整块色块 */
.cover-gen {
  --c: #e9e5db;
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 18px 20px 16px;
  background: #121211;
  color: var(--fg);
  container-type: inline-size;
}
.cover-gen .cg-glow {
  position: absolute;
  inset: -30%;
  z-index: -2;
  background:
    radial-gradient(42% 46% at 74% 30%, color-mix(in srgb, var(--c) 46%, transparent), transparent 72%),
    radial-gradient(40% 40% at 18% 96%, color-mix(in srgb, var(--c) 14%, transparent), transparent 70%);
}
/* 很淡的扫描线，像取景器里的画面 */
.cover-gen::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: repeating-linear-gradient(0deg, rgba(239, 237, 231, 0.035) 0 1px, transparent 1px 3px);
  pointer-events: none;
}
.cover-gen .cg-letter {
  position: absolute;
  z-index: -1;
  right: -0.02em;
  bottom: -0.24em;
  font-family: var(--font-display);
  font-size: 78cqw;
  font-weight: 900;
  font-stretch: 62%;
  line-height: 1;
  text-transform: uppercase;
  color: transparent;
  -webkit-text-stroke: 1px rgba(239, 237, 231, 0.16);
}
.cover-gen .cg-top,
.cover-gen .cg-foot { display: flex; align-items: center; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; }
.cover-gen .cg-top { justify-content: space-between; color: var(--fg-2); }
.cover-gen .cg-title {
  margin-top: auto;
  font-family: var(--font-display);
  font-size: clamp(30px, 15cqw, 170px);
  font-weight: 800;
  font-stretch: 62%;
  line-height: 0.86;
  text-transform: uppercase;
}
.cover-gen .cg-foot { gap: 8px; margin-top: 10px; color: var(--fg-3); text-transform: none; letter-spacing: 0.02em; }
.cover-gen .cg-dot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 1px rgba(239, 237, 231, 0.2), 0 0 12px var(--c); }

/* 触屏：行内展开 */
.w-detail { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.6s var(--ease); }
.w-detail-in { min-height: 0; overflow: hidden; }
.wd { padding: 0 40px 30px 88px; opacity: 0; translate: 0 -10px; transition: opacity 0.3s, translate 0.6s var(--ease); }
.work-item.is-open .w-detail { grid-template-rows: 1fr; }
.work-item.is-open .wd { opacity: 1; translate: none; transition-delay: 0.1s, 0.05s; }
.work-item.is-open .w-idx { color: var(--red); }
.work-item.is-open .w-title { font-stretch: 84%; }
.work-item.is-open .w-arrow { rotate: 90deg; color: var(--fg); }
.w-arrow { transition: translate 0.4s var(--ease), rotate 0.5s var(--ease), color 0.3s; }
.wd-cover { aspect-ratio: 16 / 10; margin-bottom: 20px; overflow: hidden; border-radius: 6px; }
.wd-cover img { width: 100%; height: 100%; object-fit: cover; }
.wd-desc { max-width: 36em; font-size: 15px; line-height: 1.8; color: rgba(239, 237, 231, 0.84); }
.wd-points { margin-top: 18px; }
.wd-points li { position: relative; padding: 10px 0 10px 20px; border-top: 1px solid var(--rule); font-size: 14px; line-height: 1.6; color: var(--fg-2); }
.wd-points li::before { content: ""; position: absolute; left: 1px; top: 1.18em; width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.wd-exif { display: grid; grid-template-columns: 52px 1fr; margin-top: 18px; font-size: 11px; }
.wd-exif dt, .wd-exif dd { padding: 8px 0; border-top: 1px solid var(--rule); }
.wd-exif dt { color: var(--fg-3); }
.wd-exif dd { color: var(--fg-2); }
.wd-links { display: flex; flex-wrap: wrap; gap: 4px 28px; margin-top: 14px; }
.wd-links a { padding: 8px 0; font-size: 14px; font-weight: 600; text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 5px; }

/* ==========================================================================
   文章（和其它板块一样是暗色，背景里一个描边的大 Logo）
   ========================================================================== */
.writing { padding: 0; }
.paper {
  position: relative;
  overflow: hidden;
  padding: clamp(88px, 10vw, 160px) 0;
}
.paper-mark {
  position: absolute;
  right: -8vw;
  bottom: -18vw;
  width: min(72vw, 980px);
  pointer-events: none;
}
.paper-mark svg { width: 100%; height: auto; fill: none; stroke: var(--fg); stroke-width: 0.9; opacity: 0.1; overflow: visible; }
.writing-grid { position: relative; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(32px, 6vw, 96px); }
.writing-head { align-self: start; position: sticky; top: 110px; }
.sec-big--sm { font-size: clamp(64px, 9vw, 150px); margin-bottom: 28px; }
.writing .sec-note { margin-top: 8px; }

.post-list li { border-top: 1px solid var(--rule); }
.post-list li:last-child { border-bottom: 1px solid var(--rule); }
.post-link { display: grid; grid-template-columns: 104px minmax(0, 1fr) auto; gap: 20px; align-items: baseline; padding: 24px 0; }
.p-date { font-family: var(--font-mono); font-size: 11.5px; color: var(--fg-3); }
.p-title { display: block; font-size: clamp(18px, 1.7vw, 23px); font-weight: 650; line-height: 1.4; letter-spacing: -0.01em; transition: color 0.25s, translate 0.5s var(--ease); }
.p-summary { display: block; margin-top: 6px; font-size: 14px; line-height: 1.7; color: var(--fg-2); }
.p-side { font-family: var(--font-mono); font-size: 11.5px; color: var(--fg-3); white-space: nowrap; transition: color 0.25s; }
.post-link:hover .p-title { color: var(--red); translate: 6px 0; }
.post-link:hover .p-side { color: var(--fg); }
.writing .text-btn { margin-top: 28px; }

/* ==========================================================================
   关于
   ========================================================================== */
.about-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 7vw, 120px); align-items: start; }
.portrait {
  position: sticky;
  top: 120px;
  aspect-ratio: 4 / 5;
  background: var(--bg-2);
  -webkit-mask: var(--liu-mask) center / 100% 100% no-repeat;
  mask: var(--liu-mask) center / 100% 100% no-repeat;
  overflow: hidden;
}
.portrait img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.06); transition: filter 0.8s var(--ease), scale 1.2s var(--ease); }
.portrait img[src="assets/brand/liu-logo.svg"] { object-fit: contain; padding: 12%; background: #efede7; }
.portrait:hover img { filter: grayscale(0); scale: 1.03; }
.portrait-empty { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 14px; color: var(--fg-3); font-size: 11px; letter-spacing: 0.08em; }
.portrait-empty svg { width: 54px; fill: var(--red); }
.about-body .sec-title { margin-bottom: 36px; }
.about-lead { font-size: clamp(24px, 2.7vw, 40px); font-weight: 650; line-height: 1.42; letter-spacing: -0.015em; text-wrap: pretty; }
.bio { margin-top: 40px; max-width: 36em; }
.bio p { color: var(--fg-2); line-height: 1.95; }
.bio p + p { margin-top: 1em; }
.facts { margin-top: 56px; display: grid; grid-template-columns: 88px 1fr; }
.facts dt, .facts dd { padding: 14px 0; border-top: 1px solid var(--rule); }
.facts dt { font-family: var(--font-mono); font-size: 11.5px; color: var(--fg-3); padding-top: 17px; }
.facts dd { font-size: 15px; }
.facts .fact-paw { display: inline-block; width: 15px; margin-left: 8px; vertical-align: -1px; cursor: pointer; }
.facts .fact-paw svg { fill: var(--red); width: 100%; height: auto; }

/* ==========================================================================
   联系
   ========================================================================== */
.contact .sec-title { margin-bottom: 28px; }
.contact-lead { max-width: 30em; color: var(--fg-2); }
.mail { display: block; margin-top: clamp(28px, 4vw, 56px); text-align: left; }
.mail-text {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(44px, 10.5vw, 172px);
  font-weight: 800;
  font-stretch: 62%;
  line-height: 0.95;
  letter-spacing: -0.01em;
  word-break: break-all;
  transition: font-stretch 0.7s var(--ease), color 0.3s;
}
.mail:hover .mail-text { font-stretch: 78%; }
.mail-hint { display: inline-block; margin-top: 14px; font-size: 11.5px; color: var(--fg-3); transition: color 0.2s; }
.mail:hover .mail-hint { color: var(--red); }
.links { display: flex; flex-wrap: wrap; gap: 10px 40px; margin-top: clamp(48px, 6vw, 88px); }
.links a, .links button { font-size: 15px; color: var(--fg-2); transition: color 0.2s; }
.links a:hover, .links button:hover { color: var(--fg); }
.links .arrow { margin-left: 6px; font-family: var(--font-mono); font-size: 12px; color: var(--fg-3); }

/* ==========================================================================
   页脚
   ========================================================================== */
.footer { padding: 36px 0 calc(var(--hud-inset) + 64px); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; font-size: 13px; color: var(--fg-3); }
.footer-mark svg { height: 20px; width: auto; fill: var(--fg); }
.footer-sign { margin-right: auto; }
.footer a:hover, .footer .text-btn:hover { color: var(--fg); }
.footer .text-btn { font-size: 13px; color: var(--fg-3); }

/* ==========================================================================
   项目详情（全屏）
   ========================================================================== */
.pv { position: fixed; inset: 0; z-index: 45; background: var(--bg); }
.pv[hidden] { display: none; }
.pv-scroll { height: 100%; overflow-y: auto; overscroll-behavior: contain; }
.pv-inner { padding-top: calc(var(--frame) + 40px); padding-bottom: 120px; }
.pv-top { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--fg-3); margin-bottom: 36px; }
.pv-close { color: var(--fg-2); transition: color 0.2s; }
.pv-close:hover { color: var(--fg); }
.pv-title {
  font-family: var(--font-display);
  font-size: clamp(64px, 14vw, 230px);
  font-weight: 800;
  font-stretch: 62%;
  line-height: 0.84;
  text-transform: uppercase;
  width: fit-content;
}
.pv-tagline { margin-top: 22px; font-size: clamp(17px, 1.6vw, 21px); color: var(--fg-2); }
.pv-cover {
  position: relative;
  margin-top: clamp(40px, 5vw, 72px);
  aspect-ratio: 21 / 9;
  overflow: hidden;
  border-radius: 8px;
}
.pv-cover::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--rule); pointer-events: none; }
.pv-cover img { width: 100%; height: 100%; object-fit: cover; }
.pv-cover .cover-gen { padding: clamp(18px, 2.6vw, 36px) clamp(20px, 3vw, 44px); }
.pv-cover .cg-title { font-size: clamp(48px, 9cqw, 150px); }
.pv-cover .cg-letter { font-size: 46cqw; bottom: -0.22em; }
.pv-cover .cg-top, .pv-cover .cg-foot { font-size: 12px; }
.pv-body { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(32px, 6vw, 96px); margin-top: clamp(48px, 6vw, 88px); }
.pv-exif { display: grid; grid-template-columns: 64px 1fr; align-content: start; font-size: 12px; }
.pv-exif dt, .pv-exif dd { padding: 10px 0; border-top: 1px solid var(--rule); }
.pv-exif dt { color: var(--fg-3); }
.pv-exif dd { color: var(--fg); }
.pv-text p { font-size: clamp(17px, 1.5vw, 20px); line-height: 1.85; }
.pv-points { margin-top: 28px; }
.pv-points li { position: relative; padding: 12px 0 12px 28px; border-top: 1px solid var(--rule); color: var(--fg-2); }
.pv-points li::before { content: ""; position: absolute; left: 2px; top: 1.32em; width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
.pv-links { display: flex; flex-wrap: wrap; gap: 14px 32px; margin-top: 36px; }
.pv-links a { font-weight: 600; text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 5px; }
.pv-links a:hover { color: var(--red); }
.pv-nav { display: flex; justify-content: space-between; gap: 24px; margin-top: clamp(80px, 10vw, 140px); padding-top: 28px; border-top: 1px solid var(--rule); }
.pv-nav button { display: flex; flex-direction: column; gap: 6px; }
.pv-nav button:last-child { text-align: right; margin-left: auto; }
.pv-nav .mono { font-size: 11.5px; color: var(--fg-3); }
.pv-nav b { font-family: var(--font-display); font-size: clamp(28px, 3.4vw, 48px); font-weight: 800; font-stretch: 62%; text-transform: uppercase; line-height: 1; transition: font-stretch 0.5s var(--ease), color 0.2s; }
.pv-nav button:hover b { font-stretch: 90%; color: var(--red); }

/* ==========================================================================
   搜索面板
   ========================================================================== */
.palette { position: fixed; inset: 0; z-index: 90; display: none; }
.palette.is-open { display: block; }
.palette-backdrop { position: absolute; inset: 0; background: rgba(5, 5, 5, 0.6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); opacity: 0; }
.palette-panel {
  position: relative;
  width: min(600px, calc(100% - 32px));
  margin: 14vh auto 0;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(22, 22, 21, 0.96);
  box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.8);
  opacity: 0;
}
.palette-search { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--rule); }
.palette-search svg { width: 18px; height: 18px; fill: none; stroke: var(--fg-3); stroke-width: 2; flex: none; }
.palette-search input { flex: 1; min-width: 0; font: inherit; font-size: 16px; color: var(--fg); background: none; border: 0; outline: none; }
.palette-search input::placeholder { color: var(--fg-3); }
.palette-list { max-height: min(52vh, 440px); overflow-y: auto; padding: 6px; }
.palette-group { padding: 12px 12px 4px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.08em; color: var(--fg-3); }
.palette-item { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 9px 12px; border-radius: 6px; }
.palette-item.is-active { background: rgba(239, 237, 231, 0.07); }
.palette-text { display: flex; flex-direction: column; min-width: 0; }
.palette-title { font-size: 14.5px; }
.palette-sub { font-size: 12px; color: var(--fg-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.palette-hint { font-family: var(--font-mono); font-size: 11px; color: var(--red); }
.palette-empty { padding: 32px 12px; text-align: center; color: var(--fg-3); font-size: 14px; }

/* ==========================================================================
   提示 / 猫爪脚印
   ========================================================================== */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--hud-inset) + 40px);
  z-index: 95;
  translate: -50% 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: 6px;
  font-size: 12px;
  background: rgba(22, 22, 21, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  white-space: nowrap;
  transition: opacity 0.3s, transform 0.4s var(--ease);
}
.toast::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.toast.is-on { opacity: 1; transform: none; }

.paw-step { position: fixed; left: 0; top: 0; z-index: 96; width: 22px; pointer-events: none; color: var(--red); }
.paw-step svg { width: 100%; height: auto; fill: currentColor; }

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 1180px) {
  .hero-hint { display: none; }
}
@media (max-width: 980px) {
  .work-row { grid-template-columns: 44px minmax(0, 1fr) 24px; gap: 8px 16px; }
  .w-meta { grid-column: 2 / 3; grid-row: 2; }
  .w-arrow { grid-column: 3; grid-row: 1; }
  .wd { padding: 0 0 28px 60px; }
  .writing-grid, .about-grid, .pv-body { grid-template-columns: 1fr; }
  .writing-head, .portrait { position: static; }
  .portrait { max-width: 420px; }
  .hud-bottom #hud-shot { display: none; }
}
@media (max-width: 760px) {
  :root { --hud-inset: 10px; --frame: calc(var(--hud-inset) + 12px); --hud-h: 56px; }
  .hud-top { gap: 14px; padding-right: calc(var(--frame) + 30px); padding-left: var(--frame); }
  .hud-logo svg { height: 18px; }
  .hud-nav { gap: 14px; }
  .hud-nav a { font-size: 13px; }
  .hud-nav kbd, .hud-tc, .hud-bottom { display: none; }
  .hud-cmd { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; min-height: 36px; font-size: 0; flex-shrink: 0; }
  .hud-cmd .mod-key { display: none; }
  .hud-cmd::after { content: "搜索"; font: 11px var(--font-sans); }
  .hud-paw { width: 16px; }
  .edge-blur--top { height: 132px; }
  .hero-meta { left: var(--frame); right: var(--frame); bottom: 96px; max-width: none; }
  .hero-side { left: var(--frame); right: auto; bottom: 40px; text-align: left; display: flex; align-items: baseline; gap: 16px; }
  .hero-status { justify-content: flex-start; }
  .hero-cta { margin-top: 0; }
  .hero-hint { display: none; }
  .hero-intro { font-size: 14px; }
  .sec-info { flex-direction: column; gap: 6px; }
  .post-link { grid-template-columns: 1fr auto; gap: 4px 16px; }
  .p-date { grid-column: 1 / -1; }
  .facts { grid-template-columns: 64px 1fr; }
  .footer-sign { margin-right: 0; flex-basis: 100%; order: 3; }
  .pv-cover { aspect-ratio: 4 / 3; }
  .work-preview { display: none; }
  .hero-fallback { padding-bottom: 16vh; }
  .hero-fallback svg { width: min(17vh, 32vw); }
}

/* ==========================================================================
   减少动态效果（网址加 ?motion 可强制开启）
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  :root:not(.force-motion) { scroll-behavior: auto; }
  :root:not(.force-motion) *, :root:not(.force-motion) *::before, :root:not(.force-motion) *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  :root:not(.force-motion) .progress-line { animation-duration: auto !important; }
  :root:not(.force-motion) .hero { height: 100vh; height: 100svh; }
  :root:not(.force-motion) .hero-statement { display: none; }
  :root:not(.force-motion)::view-transition-group(*),
  :root:not(.force-motion)::view-transition-old(*),
  :root:not(.force-motion)::view-transition-new(*) { animation: none !important; }
}
