/* =========================================================
   许知夏 · 插画作品集
   1. 变量与基础
   2. 页头与导航
   3. 首屏
   4. 通用区块 / 标题 / 按钮
   5. 作品画廊 + 筛选
   6. 视频卡片
   7. 技能与流程
   8. 关于 / 联系 / 页脚
   9. 灯箱
   10. 动效与响应式
   ========================================================= */

/* ---------- 1. 变量与基础 ---------- */
:root {
  --paper: #f7f3ec;
  --paper-2: #efe8dd;
  --surface: #fffdf9;
  --surface-2: #ece5da;
  --ink: #1b1815;
  --ink-2: #5c544c;
  --ink-3: #756b60;
  --line: rgba(27, 24, 21, 0.13);
  --line-strong: rgba(27, 24, 21, 0.26);
  --accent: #c0492c;
  --accent-ink: #ffffff;
  --btn-bg: #1b1815;
  --btn-fg: #f7f3ec;
  --header-bg: rgba(247, 243, 236, 0.86);
  --bg-veil: rgba(247, 243, 236, 0.84);
  --bg-opacity: 0.17;
  --shadow-sm: 0 1px 2px rgba(27, 24, 21, 0.05), 0 10px 28px -16px rgba(27, 24, 21, 0.28);
  --shadow-lg: 0 26px 60px -28px rgba(27, 24, 21, 0.4);

  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC",
    system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Consolas, monospace;

  --ease: cubic-bezier(0.22, 0.68, 0.16, 1);
  --header-h: 68px;
}

[data-theme="dark"] {
  --paper: #141210;
  --paper-2: #1c1916;
  --surface: #1b1815;
  --surface-2: #242019;
  --ink: #f4efe6;
  --ink-2: #b7ada1;
  --ink-3: #9c9287;
  --line: rgba(244, 239, 230, 0.14);
  --line-strong: rgba(244, 239, 230, 0.3);
  --accent: #e2704f;
  --accent-ink: #1b1210;
  --btn-bg: #f4efe6;
  --btn-fg: #141210;
  --header-bg: rgba(20, 18, 16, 0.86);
  --bg-veil: rgba(18, 16, 14, 0.92);
  --bg-opacity: 0.1;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 30px -18px rgba(0, 0, 0, 0.8);
  --shadow-lg: 0 30px 70px -30px rgba(0, 0, 0, 0.9);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

/* ---------- 背景作品轮播 ---------- */
.bg-stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: var(--paper);
}
.bg-slide {
  position: absolute;
  inset: -2%;
  background-position: center;
  background-size: cover;
  opacity: 0;
  filter: blur(2px) saturate(0.88) contrast(0.95);
  transition: opacity 1.8s var(--ease);
}
.bg-slide.is-active { opacity: var(--bg-opacity); }
.bg-veil {
  position: absolute;
  inset: 0;
  background: transparent;
}
main,
.site-footer {
  position: relative;
  z-index: 1;
}

@media (max-width: 700px) {
  :root { --bg-opacity: 0.15; }
  [data-theme="dark"] { --bg-opacity: 0.09; }
}

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { max-width: 100%; }
a { color: inherit; }
button { font: inherit; }

::selection {
  background: var(--accent);
  color: #fff;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 14px;
  transform: translateY(-160%);
  transition: transform 0.2s var(--ease);
}
.skip-link:focus-visible { transform: none; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 44px);
}

.icon {
  width: 18px;
  height: 18px;
  flex: none;
  display: block;
}

/* ---------- 2. 页头与导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  letter-spacing: -0.01em;
}
.logo-name {
  font-size: 17px;
  font-weight: 700;
}
.logo-sub {
  padding-left: 10px;
  border-left: 1px solid var(--line-strong);
  font-family: var(--font-serif);
  font-size: 11.5px;
  font-style: italic;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}
.site-nav a {
  position: relative;
  padding-block: 6px;
  font-size: 14.5px;
  color: var(--ink-2);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s var(--ease);
}
.site-nav a:hover { color: var(--ink); }
.site-nav a:hover::after { transform: scaleX(1); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.icon-btn:hover {
  background: var(--paper-2);
  border-color: var(--line);
}
.menu-btn { display: none; }

[data-theme="light"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: block; }

/* ---------- 3. 首屏 ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
  padding-block: clamp(44px, 7vw, 92px) clamp(40px, 5vw, 68px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 26px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 12.5px;
  letter-spacing: 0.01em;
  color: var(--ink-2);
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent);
  animation: pulse 2.6s var(--ease) infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(192, 73, 44, 0.4); }
  60%  { box-shadow: 0 0 0 7px rgba(192, 73, 44, 0); }
  100% { box-shadow: 0 0 0 0 rgba(192, 73, 44, 0); }
}

.hero-title {
  font-size: clamp(2.4rem, 4.4vw, 3.85rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.035em;
  margin-bottom: 26px;
}
.hero-title em {
  font-style: normal;
  color: var(--accent);
  position: relative;
  z-index: 0;
  isolation: isolate;
  white-space: nowrap;
}
.hero-title em::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.08em;
  height: 0.32em;
  background: var(--accent);
  opacity: 0.16;
  border-radius: 2px;
  z-index: -1;
}

.hero-lede {
  max-width: 34em;
  font-size: clamp(15px, 1.35vw, 16.5px);
  line-height: 1.85;
  color: var(--ink-2);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 26px;
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-3);
}
.hero-meta li { display: inline-flex; align-items: baseline; gap: 7px; }
.hero-meta b {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.hero-art {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.hero-frame {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface-2);
  box-shadow: var(--shadow-lg);
  transform: rotate(-1.4deg);
  transition: transform 0.7s var(--ease), box-shadow 0.7s var(--ease);
}
.hero-frame img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.hero-frame:hover {
  transform: rotate(0deg) translateY(-4px);
}
.hero-stamp {
  position: absolute;
  left: 18px;
  bottom: 18px;
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  transform: rotate(-8deg);
  box-shadow: 0 10px 26px -10px rgba(0, 0, 0, 0.55);
}
.hero-stamp span {
  font-family: var(--font-serif);
  font-size: 10.5px;
  font-weight: 600;
  font-style: italic;
  line-height: 1.35;
  letter-spacing: 0.1em;
  text-align: center;
  text-transform: uppercase;
}
.hero-art figcaption {
  padding-left: 4px;
  font-size: 12.5px;
  color: var(--ink-3);
  letter-spacing: 0.01em;
}

/* ---------- 4. 通用区块 / 标题 / 按钮 ---------- */
.section {
  padding-block: clamp(52px, 7.5vw, 96px);
  border-top: 1px solid var(--line);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: clamp(26px, 3.5vw, 40px);
}

.section-kicker {
  margin-bottom: 10px;
  font-family: var(--font-serif);
  font-size: 12.5px;
  font-style: italic;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--accent);
}

.section-head h2 {
  font-size: clamp(1.85rem, 3.6vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.no-ai {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  padding: 5px 12px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--accent);
}
.no-ai::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.section-note {
  max-width: 330px;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--ink-2);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 48px;
  padding-inline: 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease),
    border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--btn-bg);
  color: var(--btn-fg);
}
.btn-primary:hover {
  background: var(--accent);
  color: #fff;
}
.btn-primary .icon,
.btn-ghost .icon { transition: transform 0.3s var(--ease); }
.btn-primary:hover .icon { transform: translateX(3px); }

.btn-ghost {
  border-color: var(--line-strong);
  color: var(--ink);
  background: transparent;
}
.btn-ghost:hover {
  background: var(--paper-2);
  border-color: var(--ink);
}

.btn-lg {
  height: 56px;
  padding-inline: 26px;
  font-size: 15.5px;
}

/* ---------- 5. 作品画廊 ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
}

.chip {
  padding: 7px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font-size: 13px;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: all 0.22s var(--ease);
}
.chip:hover {
  border-color: var(--ink-3);
  color: var(--ink);
}
.chip.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
[data-theme="dark"] .chip.is-active {
  background: var(--ink);
  color: var(--paper);
}

.gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px 24px;
}

.work {
  margin: 0;
}
.work--feature { grid-column: 1 / -1; }
.work--feature .work-title { font-size: 18px; }
.work[hidden] { display: none; }

.work-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.work-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
  cursor: zoom-in;
}

.work-media {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
  box-shadow: var(--shadow-sm);
}
.work-media img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.85s var(--ease), filter 0.5s var(--ease);
}
.work-btn:hover .work-media img,
.work-btn:focus-visible .work-media img {
  transform: scale(1.035);
}

.work-hint {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(18, 15, 13, 0.62);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 11.5px;
  letter-spacing: 0.05em;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.work-btn:hover .work-hint,
.work-btn:focus-visible .work-hint {
  opacity: 1;
  transform: none;
}

.work-cap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 2px 0;
}
.work-title {
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.work-sub {
  flex: none;
  font-size: 12px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.gallery-foot {
  margin-top: 6px;
  font-size: 13.5px;
  color: var(--ink-3);
}
.gallery-foot a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
}

/* ---------- 早期作品 ---------- */
.archive-grid {
  column-count: 2;
  column-gap: 16px;
}
.archive-grid .work { margin-bottom: 22px; }
.archive-grid .work-media { border-radius: 10px; }
.archive-grid .work-cap {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding-top: 9px;
}
.archive-grid .work-title { font-size: 13.5px; }
.archive-grid .work-sub { font-size: 10.5px; }
.archive-grid .work-hint { display: none; }

@media (min-width: 700px) {
  .archive-grid { column-count: 3; column-gap: 20px; }
}
@media (min-width: 1000px) {
  .archive-grid { column-count: 4; }
}

/* ---------- 6. 视频 ---------- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(276px, 1fr));
  gap: 22px;
}

.video-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}
.video-card:hover {
  transform: translateY(-5px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-lg);
}

.video-media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0d0c0b;
}
.video-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}
.video-card:hover .video-media img { transform: scale(1.04); }

.video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(247, 243, 236, 0.92);
  color: #17140f;
  transform: translate(-50%, -50%);
  box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.55);
  transition: transform 0.35s var(--ease), background 0.35s var(--ease), color 0.35s var(--ease);
}
.video-play svg { width: 24px; height: 24px; margin-left: 2px; }
.video-card:hover .video-play {
  background: var(--accent);
  color: #fff;
  transform: translate(-50%, -50%) scale(1.08);
}

.video-platform,
.video-dur {
  position: absolute;
  padding: 5px 10px;
  border-radius: 7px;
  background: rgba(14, 12, 10, 0.62);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #f6f2ea;
  font-size: 11.5px;
  line-height: 1.3;
  letter-spacing: 0.04em;
}
.video-platform { top: 12px; left: 12px; }
.video-dur {
  right: 12px;
  bottom: 12px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.video-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 20px 20px;
  flex: 1;
}
.video-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.55;
  letter-spacing: -0.01em;
}
.video-desc {
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-2);
}
.video-cta {
  margin-top: auto;
  padding-top: 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent);
}
.video-card:hover .video-cta { text-decoration: underline; text-underline-offset: 3px; }

.video-note {
  margin-top: 20px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink-3);
}
.video-note a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
}

/* ---------- Live2D 实机展示 ---------- */
.live2d-feature {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
  margin-bottom: clamp(30px, 4vw, 46px);
  padding-bottom: clamp(30px, 4vw, 46px);
  border-bottom: 1px solid var(--line);
}
.live2d-media {
  width: 100%;
  max-width: 380px;
}
.live2d-media video {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #0a0a0a;
  box-shadow: var(--shadow-lg);
}
.live2d-copy h3 {
  margin: 8px 0 14px;
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.03em;
}
.live2d-copy p {
  max-width: 46ch;
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--ink-2);
}
.live2d-copy .chips {
  margin: 18px 0 16px;
}

.video-card--more {
  justify-content: center;
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
.video-card--more:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.video-more {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  padding: 28px;
  justify-content: center;
}
.video-more-kicker {
  font-family: var(--font-serif);
  font-size: 12px;
  font-style: italic;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.65;
}
.video-more-title {
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.video-more-arrow {
  margin-top: 6px;
  font-size: 22px;
}

@media (max-width: 760px) {
  .live2d-feature { grid-template-columns: 1fr; }
  .live2d-media { max-width: 300px; }
}

/* ---------- 7. 技能与流程 ---------- */
.skills-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}

.skills-intro .skills-quote {
  padding-left: 18px;
  border-left: 2px solid var(--accent);
  font-size: 18px;
  line-height: 1.75;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
  color: var(--ink);
}
.skills-intro p {
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--ink-2);
  max-width: 40ch;
}
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}
.link-arrow span { transition: transform 0.3s var(--ease); }
.link-arrow:hover span { transform: translateX(4px); }

.skill-groups {
  display: grid;
  gap: 24px;
}
.skill-group h3 {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.skill-group h3 span {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chips li {
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 13px;
  color: var(--ink-2);
  transition: border-color 0.22s var(--ease), color 0.22s var(--ease);
}
.chips li:hover {
  border-color: var(--accent);
  color: var(--ink);
}

.process {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin-top: clamp(40px, 5vw, 60px);
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.process li b {
  display: block;
  margin-bottom: 10px;
  font-family: var(--font-serif);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--accent);
}
.process h3 {
  margin-bottom: 7px;
  font-size: 15.5px;
  font-weight: 700;
}
.process p {
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-2);
}

/* ---------- 8. 关于 / 联系 / 页脚 ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  gap: clamp(30px, 5vw, 64px);
  align-items: start;
}

.portrait {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface-2);
  aspect-ratio: 1 / 1;
  box-shadow: var(--shadow-sm);
}
.portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.about-media .caption {
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--ink-3);
}

.about-copy h2 {
  margin: 12px 0 20px;
  font-size: clamp(1.55rem, 2.9vw, 2.1rem);
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.03em;
}
.about-copy > p {
  max-width: 56ch;
  font-size: 14.5px;
  line-height: 1.9;
  color: var(--ink-2);
}
.about-copy > p + p { margin-top: 14px; }

.about-copy .about-note {
  margin-top: 18px;
  padding: 12px 16px;
  border-left: 2px solid var(--accent);
  border-radius: 0 8px 8px 0;
  background: var(--surface);
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--ink-2);
}

.hire-info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 24px;
  margin: 28px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.hire-info dt {
  margin-bottom: 4px;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}
.hire-info dd {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.5;
}

.about-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.contact h2 {
  margin: 10px 0 22px;
  font-size: clamp(2rem, 4.6vw, 3.25rem);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -0.035em;
}
.contact-lede {
  max-width: 48ch;
  font-size: 15px;
  line-height: 1.85;
  color: var(--ink-2);
}
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 30px 0 34px;
}
.social {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.social a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13.5px;
  color: var(--ink-2);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}
.social a:hover { color: var(--accent); }
.social a span { font-size: 11px; }

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 26px 40px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  font-size: 12.5px;
  color: var(--ink-3);
}
.footer-meta { font-size: 12px; }
.to-top {
  text-decoration: none;
  color: var(--ink-2);
}
.to-top:hover { color: var(--accent); }

/* ---------- 9. 灯箱 ---------- */
.lightbox {
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  max-height: 100vh;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #f4efe6;
  overflow: hidden;
}
.lightbox[open] {
  display: grid;
  place-items: center;
}
.lightbox::backdrop {
  background: rgba(10, 8, 7, 0.9);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.lb-inner {
  position: relative;
  width: min(1080px, 94vw);
  max-height: 94vh;
  padding: 0;
}
.lb-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
}
#lb-img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 76vh;
  border-radius: 10px;
  background: #191715;
  box-shadow: 0 30px 90px -20px rgba(0, 0, 0, 0.8);
}
.lb-bar {
  display: flex;
  align-items: baseline;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  margin-inline: auto;
  padding: 0 4px;
  color: #f4efe6;
}
.lb-title { font-size: 15px; font-weight: 600; }
.lb-sub { font-size: 12.5px; color: rgba(244, 239, 230, 0.62); }
.lb-count {
  margin-left: auto;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: rgba(244, 239, 230, 0.5);
}

.lb-btn {
  position: absolute;
  z-index: 2;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(244, 239, 230, 0.24);
  border-radius: 50%;
  background: rgba(30, 26, 22, 0.62);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #f4efe6;
  cursor: pointer;
  transition: background 0.22s var(--ease), border-color 0.22s var(--ease);
}
.lb-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
}
.lb-btn svg { width: 20px; height: 20px; }
.lb-close { position: fixed; top: 18px; right: 18px; }
.lb-prev { top: 50%; left: 10px; transform: translateY(-50%); }
.lb-next { top: 50%; right: 10px; transform: translateY(-50%); }
.lb-prev svg { margin-right: 2px; }
.lb-next svg { margin-left: 2px; }

/* ---------- 10. 动效与响应式 ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

body.lb-open { overflow: hidden; }

@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 36px;
    padding-block: 36px 64px;
  }
  .hero-frame { transform: none; }
  .hero-frame:hover { transform: translateY(-3px); }
  .hero-meta { margin-top: 34px; }

  .skills-layout,
  .about-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .about-media { max-width: 320px; }
  .process { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  :root { --header-h: 62px; }
  .menu-btn { display: grid; }

  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px clamp(20px, 5vw, 44px) 20px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
  }
  .nav-open .site-nav { display: flex; }
  .site-nav a {
    width: 100%;
    padding-block: 14px;
    font-size: 15px;
    border-bottom: 1px solid var(--line);
  }
  .site-nav a::after { display: none; }
  .site-nav a:last-child { border-bottom: 0; }
}

@media (min-width: 700px) {
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .hero-title { letter-spacing: -0.03em; }
  .hero-actions .btn { flex: 1 1 auto; }
  .section-head { padding-bottom: 20px; }
  .process { grid-template-columns: 1fr; gap: 20px; }
  .hire-info { grid-template-columns: 1fr; }
  .lb-prev { left: 2px; }
  .lb-next { right: 2px; }
  .lb-btn { width: 40px; height: 40px; }
  #lb-img { max-height: 68vh; }
  .lb-bar { flex-wrap: wrap; gap: 4px 10px; }
  .lb-count { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}

@media print {
  .site-header, .filters, .lightbox, .video-play, .to-top, .about-actions, .contact-actions { display: none !important; }
  body { background: #fff; color: #000; }
  .work, .video-card { break-inside: avoid; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .snow-bank, .snowfall, .music-player { display: none !important; }
}

/* ---------- 雪堆 / 飘雪 / 背景音乐 ---------- */
.snow-bank {
  position: fixed;
  left: 0;
  right: 0;
  bottom: -2px;
  z-index: 0;
  height: 26vh;
  pointer-events: none;
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: 100% 100%;
  opacity: 0.95;
  filter: drop-shadow(0 -8px 28px rgba(90, 120, 150, 0.28));
}

[data-theme="dark"] .snow-bank {
  opacity: 0.38;
  filter: drop-shadow(0 -8px 26px rgba(0, 0, 0, 0.5)) brightness(0.9);
}

.snowfall {
  position: fixed;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.music-player {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100vw - 32px);
  padding: 7px 12px 7px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-lg);
}
.music-play {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--btn-bg);
  color: var(--btn-fg);
  cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease);
}
.music-play:hover { transform: scale(1.06); }
.music-icon {
  display: none;
  width: 16px;
  height: 16px;
}
.music-player:not(.is-playing) .music-icon--play { display: block; }
.music-player.is-playing .music-icon--pause { display: block; }

.music-player.needs-tap .music-play {
  animation: music-pulse 2.2s var(--ease) infinite;
}
@keyframes music-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(192, 73, 44, 0.4); }
  50% { box-shadow: 0 0 0 10px rgba(192, 73, 44, 0); }
}
.music-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.music-kicker {
  font-family: var(--font-serif);
  font-size: 9px;
  font-style: italic;
  letter-spacing: 0.18em;
  color: var(--ink-3);
}
.music-title {
  max-width: 190px;
  overflow: hidden;
  font-size: 12.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.music-nav { display: flex; gap: 2px; }
.music-skip {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
}
.music-skip:hover { background: var(--paper-2); color: var(--ink); }
.music-skip svg { width: 15px; height: 15px; }

@media (max-width: 700px) {
  .snow-bank { height: 20vh; opacity: 0.9; }
  .site-footer { padding-bottom: 88px; }
  .music-player { right: 12px; bottom: 12px; gap: 8px; padding: 6px 10px 6px 6px; }
  .music-play { width: 34px; height: 34px; }
  .music-title { max-width: 118px; font-size: 11.5px; }
  .music-kicker { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .snowfall { display: none; }
}

/* ---------- 开场动画 ---------- */
.intro {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
.intro.is-leaving { opacity: 0; visibility: hidden; }
.intro[hidden] { display: none; }
html.intro-pending,
html.intro-pending body { overflow: hidden; }

.intro-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.intro-ui {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px clamp(18px, 4vw, 44px);
  padding-bottom: max(22px, env(safe-area-inset-bottom));
  background: linear-gradient(to top, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0));
  pointer-events: none;
}

.intro-note {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
}

.intro-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  pointer-events: auto;
}

.intro-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: opacity 0.35s ease, visibility 0.35s ease, transform 0.35s ease;
}
.intro-play-icon {
  position: relative;
  width: 88px;
  height: 88px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(8px);
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}
.intro-play-icon::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-35%, -50%);
  border-style: solid;
  border-width: 14px 0 14px 22px;
  border-color: transparent transparent transparent #fff;
}
.intro-play:hover .intro-play-icon,
.intro-play:focus-visible .intro-play-icon {
  transform: scale(1.06);
  border-color: #fff;
  background: rgba(255, 255, 255, 0.14);
}
.intro-play:focus-visible { outline: none; }
.intro-play-label {
  font-size: 12px;
  letter-spacing: 0.28em;
  color: rgba(255, 255, 255, 0.7);
}
.intro.is-playing .intro-play {
  display: none;
}

.intro-skip {
  pointer-events: auto;
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.78);
  padding: 9px 18px;
  font: inherit;
  font-size: 13px;
  letter-spacing: 0.1em;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background 0.25s, border-color 0.25s, color 0.25s;
}
.intro-skip:hover,
.intro-skip:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.65);
  color: #fff;
  outline: none;
}

.intro-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.12);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.intro.is-playing .intro-progress { opacity: 1; }
.intro-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent);
  transition: width 0.2s linear;
}

@media (max-width: 700px) {
  .intro-note { display: none; }
  .intro-ui { padding: 16px; padding-bottom: max(16px, env(safe-area-inset-bottom)); }
  .intro-play-icon { width: 74px; height: 74px; }
  .intro-play-icon::before { border-width: 12px 0 12px 19px; }
  .intro-play-label { font-size: 11px; letter-spacing: 0.2em; }
  .intro-skip { margin-left: auto; padding: 10px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .intro { display: none !important; }
}
@media print {
  .intro { display: none !important; }
}
