﻿/* =========================================================================
   style.css —— Kurzgesagt 风格作品集
   深空底色 + 高饱和撞色 + 纯扁平色块 + 圆润几何 + 星野与漂浮动效

   结构：0 字体 / 1 设计变量 / 2 基础 / 3 通用组件 / 4 页头 / 5 首屏
        6 作品展厅 / 7 灯箱 / 8 关于 / 9 联系与页脚 / 10 动效与响应式
   ========================================================================= */

/* ------------------------------ 0. 自托管字体 ------------------------------
   Fredoka（圆体标题）与 Nunito（正文），均为 OFL 授权，见 assets/fonts/OFL-*.txt
   ------------------------------------------------------------------------ */
@font-face {
  font-family: Fredoka;
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/fredoka-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}
@font-face {
  font-family: Fredoka;
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/fredoka-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4,
    U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: Nunito;
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("../fonts/nunito-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}
@font-face {
  font-family: Nunito;
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("../fonts/nunito-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4,
    U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------------------------- 1. 设计变量 ---------------------------- */
:root {
  --wrap: 1200px;
  --header-h: 76px;
  --gap: 22px;

  --r-lg: 30px;
  --r-md: 20px;
  --r-sm: 12px;
  --r-pill: 999px;

  /* 深空三层底 */
  --space: #0b1026;
  --space-2: #141c42;
  --space-3: #1e2a5c;
  --space-4: #2a3878;

  --ink: #f2f5ff;
  --muted: #a8b3d9;
  --line: rgba(168, 179, 217, 0.24);

  /* 撞色板 */
  --yellow: #ffc93c;
  --orange: #ff7a45;
  --pink: #ff5c8a;
  --purple: #9b6bff;
  /* 悬停时当背景用的深紫：#fff 压在上面才有 4.5:1 以上 */
  --purple-deep: #6b47d6;
  --teal: #2bd9c4;
  --sky: #4cc9f0;
  --green: #5bd98a;
  --cream: #ffe9c7;

  /* 主题强调色（按钮/高亮），浅色主题会换掉 */
  --accent: var(--yellow);
  --accent-ink: #1a1300;
  --marker: var(--yellow);
  --marker-ink: #21160a;
  /* 当作「文字色」用的强调色：浅色主题下必须换成深色版本，否则对比度不够 */
  --t-yellow: var(--yellow);
  --t-teal: var(--teal);
  --t-pink: var(--pink);

  --hard: 0 7px 0 rgba(0, 0, 0, 0.42);          /* 厚重底边 */
  --pop: 0 18px 40px rgba(4, 7, 20, 0.55);      /* 浮起阴影 */

  /* 半透明毛玻璃：三档，字越多的地方越实 */
  --glass: color-mix(in srgb, var(--space) 58%, transparent);
  --glass-strong: color-mix(in srgb, var(--space-2) 78%, transparent);
  --glass-line: color-mix(in srgb, var(--ink) 14%, transparent);
  --blur: blur(18px) saturate(150%);

  --font-display: "Fredoka", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Noto Sans SC", system-ui, sans-serif;
  --font-body: "Nunito", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Noto Sans SC", system-ui, sans-serif;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  /* 出镜节奏用 expo-out：平滑减速，不用带反弹的曲线（那会显得廉价） */
  --spring: cubic-bezier(0.16, 1, 0.3, 1);
}

/* 浅色主题 = 白天的天空，色调更亮，撞色不变但强调色改用紫 */
html[data-theme="light"] {
  --space: #e9f1ff;
  --space-2: #ffffff;
  --space-3: #ffffff;
  --space-4: #c9d8f5;

  --ink: #101a3f;
  --muted: #4e5c8c;
  --line: rgba(16, 26, 63, 0.16);

  --accent: #6b4eff;
  --accent-ink: #ffffff;
  --marker: #ffc93c;
  --marker-ink: #2b1f00;
  --t-yellow: #8a5c0d;
  --t-teal: #0d6d61;
  --t-pink: #b3255a;

  --hard: 0 7px 0 rgba(16, 26, 63, 0.18);
  --pop: 0 18px 40px rgba(16, 26, 63, 0.16);
}

/* ---------------------------- 2. 基础 ---------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--space);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
}

/* 星野：两层，一层静止、一层缓慢闪烁（Kurzgesagt 的太空底） */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-repeat: repeat;
}
body::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='320'%3E%3Cg fill='%23F2F5FF'%3E%3Ccircle cx='18' cy='40' r='1.6' opacity='.55'/%3E%3Ccircle cx='92' cy='14' r='1.2' opacity='.4'/%3E%3Ccircle cx='163' cy='72' r='1.9' opacity='.6'/%3E%3Ccircle cx='241' cy='36' r='1.3' opacity='.45'/%3E%3Ccircle cx='56' cy='126' r='1.4' opacity='.5'/%3E%3Ccircle cx='138' cy='168' r='1.1' opacity='.35'/%3E%3Ccircle cx='212' cy='132' r='1.7' opacity='.55'/%3E%3Ccircle cx='292' cy='108' r='1.2' opacity='.4'/%3E%3Ccircle cx='34' cy='222' r='1.5' opacity='.5'/%3E%3Ccircle cx='108' cy='262' r='1.2' opacity='.4'/%3E%3Ccircle cx='186' cy='228' r='1.8' opacity='.6'/%3E%3Ccircle cx='268' cy='266' r='1.3' opacity='.45'/%3E%3Ccircle cx='84' cy='300' r='1.1' opacity='.35'/%3E%3Ccircle cx='228' cy='308' r='1.6' opacity='.5'/%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.9;
}
body::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='520' height='520'%3E%3Cg fill='%23F2F5FF'%3E%3Cpath d='M112 60l5 14 14 5-14 5-5 14-5-14-14-5 14-5z' opacity='.75'/%3E%3Cpath d='M400 300l4 11 11 4-11 4-4 11-4-11-11-4 11-4z' opacity='.6'/%3E%3Cpath d='M250 430l3 9 9 3-9 3-3 9-3-9-9-3 9-3z' opacity='.5'/%3E%3C/g%3E%3C/svg%3E");
  animation: twinkle 7s ease-in-out infinite;
}
html[data-theme="light"] body::before { opacity: 0.35; }
html[data-theme="light"] body::after { opacity: 0.5; }

@keyframes twinkle {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.85; }
}

/* 极光层：几团大色斑缓慢漂移，给纯扁平画面补上空气感与纵深 */
.aurora {
  position: fixed;
  inset: -12%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(38% 42% at 16% 22%, color-mix(in srgb, var(--purple) 44%, transparent), transparent 68%),
    radial-gradient(34% 38% at 84% 16%, color-mix(in srgb, var(--sky) 34%, transparent), transparent 70%),
    radial-gradient(30% 34% at 72% 84%, color-mix(in srgb, var(--pink) 26%, transparent), transparent 72%),
    radial-gradient(26% 30% at 10% 78%, color-mix(in srgb, var(--teal) 24%, transparent), transparent 74%);
  filter: blur(24px) saturate(125%);
  opacity: 0.6;
  will-change: transform;
  animation: auroraDrift 52s ease-in-out infinite alternate;
}
html[data-theme="light"] .aurora { opacity: 0.5; filter: blur(30px) saturate(115%); }

@keyframes auroraDrift {
  0%   { transform: translate3d(-2%, -1%, 0) scale(1.02) rotate(0deg); }
  50%  { transform: translate3d(2%, 2%, 0) scale(1.09) rotate(3deg); }
  100% { transform: translate3d(-1%, 3%, 0) scale(1.04) rotate(-2.5deg); }
}

/* 顶部阅读进度：一条细渐变光带 */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  z-index: 90;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(90deg, var(--yellow), var(--pink) 52%, var(--purple));
  box-shadow: 0 2px 10px rgba(4, 7, 20, 0.45);
  transition: width 0.12s linear;
  pointer-events: none;
}

/* 所有内容浮在星野之上 */
.site-header, main, .site-footer, .lightbox, .to-top { position: relative; z-index: 1; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: 0.005em;
  margin: 0;
}

button { font: inherit; color: inherit; }

:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

.wrap {
  width: min(100% - 44px, var(--wrap));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 200;
  background: var(--yellow);
  color: var(--marker-ink);
  padding: 12px 18px;
  border-radius: 0 0 var(--r-md) 0;
  font-weight: 700;
}
.skip-link:focus { left: 0; }

/* ---------------------------- 3. 通用组件 ---------------------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 16px;
}
.eyebrow::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--yellow);
  flex: none;
}

.section-title {
  font-size: clamp(1.9rem, 4.2vw, 3.1rem);
  font-weight: 600;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 34px;
}

.section-desc {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0;
}

/* 厚边按钮：按下去会真的“陷”进去 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px 26px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--space-3);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: var(--hard);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease),
    background 0.25s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(4px); box-shadow: 0 3px 0 rgba(0, 0, 0, 0.42); }

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 7px 0 color-mix(in srgb, var(--accent) 60%, #000);
}
.btn-primary:hover {
  box-shadow: 0 7px 0 color-mix(in srgb, var(--accent) 60%, #000),
    0 22px 44px rgba(4, 7, 20, 0.5);
}
.btn-primary:active { box-shadow: 0 3px 0 color-mix(in srgb, var(--accent) 60%, #000); }

.btn-ghost {
  background: var(--glass);
  backdrop-filter: var(--blur);
  border: 2px solid var(--line);
  box-shadow: inset 0 1px 0 var(--glass-line);
}
.btn-ghost:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, var(--glass));
  box-shadow: inset 0 1px 0 var(--glass-line),
    0 16px 34px rgba(4, 7, 20, 0.45);
}
.btn-ghost:active { transform: translateY(2px); box-shadow: none; }

/* ---------------------------- 4. 页头 ---------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  z-index: 60;
  display: flex;
  align-items: center;
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.site-header.is-scrolled {
  background: linear-gradient(to bottom,
    color-mix(in srgb, var(--space) 90%, transparent),
    color-mix(in srgb, var(--space) 62%, transparent));
  backdrop-filter: var(--blur);
  box-shadow: 0 1px 0 var(--glass-line), 0 16px 44px rgba(4, 7, 20, 0.3);
}

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

.brand { display: inline-flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark { width: 34px; height: 34px; flex: none; }

.brand-text { display: grid; line-height: 1.15; }
.brand-text strong {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 600;
}
.brand-text em {
  font-style: normal;
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  color: var(--muted);
}

.nav { display: flex; gap: 6px; }
.nav a {
  padding: 8px 16px;
  border-radius: var(--r-pill);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.98rem;
  color: var(--muted);
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.nav a:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 10%, transparent); }
.nav a.is-active { color: var(--ink); background: color-mix(in srgb, var(--yellow) 22%, transparent); }

.header-tools { display: flex; align-items: center; gap: 8px; flex: none; }

.icon-btn {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--space-3);
  box-shadow: var(--hard);
  cursor: pointer;
  transition: transform 0.3s var(--spring), box-shadow 0.3s var(--ease), background 0.25s var(--ease);
}
.icon-btn:hover {
  transform: translateY(-2px);
  background: var(--space-4);
  box-shadow: var(--hard), 0 14px 30px rgba(4, 7, 20, 0.45);
}
.icon-btn:active { transform: translateY(3px); box-shadow: 0 3px 0 rgba(0, 0, 0, 0.42); }
.icon-btn svg {
  width: 19px; height: 19px;
  fill: none; stroke: currentColor; stroke-width: 2.1;
  stroke-linecap: round; stroke-linejoin: round;
}
.nav-toggle { display: none; }

/* ---------------------------- 5. 首屏 ---------------------------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  /* 首屏有光晕背景，左右也要留出内边距，文字才不会贴到色块边缘 */
  padding: calc(var(--header-h) + 48px) 22px 96px;
  overflow: hidden;
}
/* 自带内边距后，内层 wrap 用满宽度，与其他区块左右对齐 */
.hero > .wrap { width: min(100%, var(--wrap)); }

/* 左上角一团暖光，模拟恒星光晕 */
.hero-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(38% 42% at 78% 26%, color-mix(in srgb, var(--purple) 40%, transparent), transparent 70%),
    radial-gradient(30% 34% at 88% 70%, color-mix(in srgb, var(--sky) 26%, transparent), transparent 72%),
    radial-gradient(26% 30% at 8% 82%, color-mix(in srgb, var(--pink) 22%, transparent), transparent 74%);
  opacity: 0.85;
}
html[data-theme="light"] .hero-glow { opacity: 0.4; }

.hero-inner { position: relative; z-index: 2; }

.hero-copy { max-width: min(660px, 56vw); }

/* 首屏文字按顺序淡入上浮，别一起蹦出来 */
.hero-copy > .reveal:nth-child(1) { transition-delay: 0.06s; }
.hero-copy > .reveal:nth-child(2) { transition-delay: 0.14s; }
.hero-copy > .reveal:nth-child(3) { transition-delay: 0.22s; }
.hero-copy > .reveal:nth-child(4) { transition-delay: 0.3s; }

.hero-title {
  font-size: clamp(2.4rem, 5.6vw, 4.4rem);
  font-weight: 600;
  margin-bottom: 22px;
}
/* 关键词：高亮色块，Kurzgesagt 字幕那种「马克笔」处理 */
.hero-title .accent {
  background: var(--marker);
  color: var(--marker-ink);
  border-radius: 14px;
  padding: 0 0.16em 0.06em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.hero-sub {
  max-width: 44ch;
  color: var(--muted);
  font-size: clamp(1.02rem, 1.6vw, 1.16rem);
  margin: 0 0 32px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 52px; }

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 0;
}
.hero-stats > div {
  background: linear-gradient(to bottom,
    color-mix(in srgb, var(--space-2) 97%, transparent),
    color-mix(in srgb, var(--space) 90%, transparent));
  border-radius: var(--r-md);
  padding: 14px 22px;
  min-width: 116px;
  box-shadow: inset 0 1px 0 var(--glass-line), 0 12px 30px rgba(4, 7, 20, 0.28);
}
.hero-stats dt {
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero-stats dd {
  margin: 2px 0 0;
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 600;
  color: var(--t-yellow);
}
.hero-stats > div:nth-child(2) dd { color: var(--t-teal); }
.hero-stats > div:nth-child(3) dd { color: var(--t-pink); }

/* 首屏插画：外层吃鼠标视差，内层自己慢慢浮动；带环境光晕 */
.hero-art-wrap {
  position: absolute;
  right: 0;
  top: 50%;
  width: min(42vw, 520px);
  transform: translate3d(calc(var(--px, 0) * 1px), calc(-50% + var(--py, 0) * 1px), 0);
  transition: transform 0.5s var(--spring);
  z-index: 1;
  pointer-events: none;
}
.hero-art {
  width: 100%;
  animation: float 9s ease-in-out infinite;
  filter: drop-shadow(0 30px 60px rgba(76, 201, 240, 0.24))
    drop-shadow(0 0 46px rgba(155, 107, 255, 0.26));
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-18px); }
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  width: 26px; height: 48px;
  border: 2px solid var(--line);
  border-radius: var(--r-pill);
  display: grid;
  justify-items: center;
  padding-top: 9px;
  z-index: 2;
}
.scroll-cue span {
  width: 3px; height: 14px;
  border-radius: 2px;
  background: var(--yellow);
  animation: cue 2.4s linear infinite;
}
@keyframes cue {
  from { transform: translateY(0); }
  to { transform: translateY(20px); }
}

/* ---------------------------- 6. 作品展厅 ---------------------------- */
.works { padding: 104px 0 30px; }

.toolbar {
  position: sticky;
  top: calc(var(--header-h) - 10px);
  z-index: 40;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin: 0 -14px 30px;
  padding: 14px;
  border-radius: var(--r-lg);
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
/* 往下滚时工具栏吸在页头下面，变磨砂玻璃，搜索随时够得着 */
.toolbar.is-stuck {
  background: var(--glass);
  backdrop-filter: var(--blur);
  box-shadow: 0 18px 42px rgba(4, 7, 20, 0.34), inset 0 0 0 1px var(--glass-line);
}

.filters { display: flex; flex-wrap: wrap; gap: 10px; }

.filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: 2px solid var(--line);
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--muted);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.96rem;
  cursor: pointer;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease),
    background 0.2s var(--ease), transform 0.18s var(--ease);
}
.filter:hover:not(:disabled) { color: var(--ink); border-color: var(--yellow); transform: translateY(-2px); }
.filter:disabled { opacity: 0.4; cursor: not-allowed; }
.filter-count {
  font-size: 0.76rem;
  padding: 1px 8px;
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--ink) 12%, transparent);
}
.filter[aria-selected="true"] {
  background: var(--yellow);
  border-color: var(--yellow);
  color: var(--marker-ink);
  font-weight: 600;
  box-shadow: 0 5px 0 color-mix(in srgb, var(--yellow) 60%, #000),
    0 14px 34px rgba(4, 7, 20, 0.5);
}
.filter[aria-selected="true"] .filter-count { background: color-mix(in srgb, #000 16%, transparent); }

/* 搜索框 */
.search {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: min(300px, 100%);
  padding: 11px 20px;
  border-radius: var(--r-pill);
  background: var(--glass);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  color: var(--muted);
  box-shadow: inset 0 1px 0 var(--glass-line);
  transition: box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}
.search svg {
  width: 18px; height: 18px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2.2;
  stroke-linecap: round;
}
.search input {
  width: 100%;
  border: 0;
  outline: none;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
}
.search input::placeholder { color: var(--muted); opacity: 0.85; }
.search input::-webkit-search-cancel-button { filter: invert(1) opacity(0.5); }
html[data-theme="light"] .search input::-webkit-search-cancel-button { filter: opacity(0.5); }
.search:focus-within {
  box-shadow: inset 0 1px 0 var(--glass-line),
    0 0 0 3px var(--sky);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  grid-auto-rows: 8px;
  gap: 0 var(--gap);
}

/* 卡片：粗色环 + 厚底边，作品嵌在色框里（Kurzgesagt 的高饱和描边感） */
.card {
  position: relative;
  margin: 0;
  padding: 9px;
  border: 0;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--space-2);
  cursor: zoom-in;
  display: block;
  width: 100%;
  --ring: var(--yellow);
  box-shadow: 0 10px 0 rgba(0, 0, 0, 0.3), 0 0 0 3px var(--ring);
  transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
  animation: cardIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.card:nth-child(6n + 2) { --ring: var(--teal); }
.card:nth-child(6n + 3) { --ring: var(--pink); }
.card:nth-child(6n + 4) { --ring: var(--sky); }
.card:nth-child(6n + 5) { --ring: var(--purple); }
.card:nth-child(6n) { --ring: var(--orange); }
.card[hidden] { display: none; }
@keyframes cardIn {
  from { opacity: 0; transform: translateY(18px) scale(0.96); }
  to { opacity: 1; transform: none; }
}
.card:hover {
  transform: translateY(-6px);
  /* 彩色只做「实心细环」，光晕一律用中性投影——彩色blur 光晕是 AI 味最重的招 */
  box-shadow: 0 0 0 4px var(--ring),
    0 16px 0 rgba(0, 0, 0, 0.28),
    0 30px 60px rgba(4, 7, 20, 0.55);
}
.card:active { transform: translateY(-2px); }

.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: calc(var(--r-lg) - 10px);
  transition: transform 0.6s var(--spring), filter 0.5s var(--ease);
}
.card:hover img {
  transform: scale(1.04);
  filter: saturate(112%) brightness(1.05);
}

/* 说明常驻；底部压暗保证可读，磨砂只在悬停那一张上做（24 张同时模糊很费） */
.card-veil {
  position: absolute;
  inset: 9px;
  border-radius: calc(var(--r-lg) - 10px);
  background: linear-gradient(to top, rgba(4, 7, 20, 0.92) 0%, rgba(4, 7, 20, 0.38) 40%, transparent 66%);
  transition: opacity 0.35s var(--ease);
}
.card:hover .card-veil {
  background: linear-gradient(to top, rgba(4, 7, 20, 0.95) 0%, rgba(4, 7, 20, 0.48) 44%, transparent 70%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  -webkit-mask-image: linear-gradient(to top, #000 0%, #000 30%, transparent 62%);
  mask-image: linear-gradient(to top, #000 0%, #000 30%, transparent 62%);
}

.card-info {
  position: absolute;
  left: 9px; right: 9px; bottom: 9px;
  padding: 20px;
  color: #fff;
  text-align: left;
  transition: transform 0.3s var(--spring);
}
.card:hover .card-info,
.card:focus-visible .card-info { transform: translateY(-4px); }

.card-info h3 { font-size: 1.14rem; font-weight: 600; margin-bottom: 3px; }
.card-info p {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.84);
}

/* 左上角色块标签 */
.card-tag {
  position: absolute;
  top: 14px; left: 14px;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  background: var(--yellow);
  color: var(--marker-ink);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.76rem;
  opacity: 0;
  transform: translateY(-8px) scale(0.9);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--spring);
}
.card:hover .card-tag { opacity: 1; transform: none; }

.empty {
  padding: 60px 0;
  text-align: center;
  color: var(--muted);
}

/* 「加载更多」与统计 */
.gallery-foot {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 40px 0 12px;
}
.gallery-foot .btn[hidden] { display: none; }
.count {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

/* ---------------------------- 7. 灯箱 ---------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 72px 78px 40px;
  opacity: 0;
  transition: opacity 0.28s var(--ease);
}
.lightbox[hidden] { display: none; }
.lightbox.is-open { opacity: 1; }

.lb-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(58% 58% at 50% 38%, color-mix(in srgb, var(--purple) 20%, transparent), transparent 72%),
    color-mix(in srgb, #05070f 88%, transparent);
  backdrop-filter: blur(12px) saturate(130%);
}

.lb-stage {
  position: relative;
  margin: 0;
  max-width: min(100%, 1100px);
  display: grid;
  gap: 18px;
  justify-items: center;
  transform: scale(0.94);
  opacity: 0;
  transition: transform 0.35s var(--spring), opacity 0.3s var(--ease);
}
.lightbox.is-open .lb-stage { transform: none; opacity: 1; }

/* 作品背后一圈环境光，让它像浮在展厅里而不是贴在黑底上 */
.lb-stage::before {
  content: "";
  position: absolute;
  inset: -12% -16% 6% -16%;
  border-radius: 50%;
  background: radial-gradient(50% 50% at 50% 46%,
    color-mix(in srgb, var(--sky) 26%, transparent), transparent 72%);
  filter: blur(46px);
  z-index: -1;
  pointer-events: none;
}

.lb-stage img {
  max-width: 100%;
  max-height: 66svh;
  width: auto;
  object-fit: contain;
  border-radius: var(--r-lg);
  box-shadow: 0 34px 80px rgba(4, 7, 20, 0.6), 0 0 0 1px var(--glass-line);
  background: var(--space-2);
  /* 换图时交叉淡入，不要硬切 */
  transition: opacity 0.28s var(--ease), transform 0.4s var(--spring);
}
.lb-stage img.is-swapping { opacity: 0; transform: scale(0.985); }

.lb-caption {
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  text-align: left;
  background: var(--glass-strong);
  backdrop-filter: var(--blur);
  border-radius: var(--r-md);
  padding: 16px 22px;
  box-shadow: inset 0 0 0 1px var(--glass-line), 0 18px 40px rgba(4, 7, 20, 0.4);
}
.lb-caption h3 { font-size: 1.24rem; font-weight: 600; }
.lb-caption p {
  margin: 3px 0 0;
  font-size: 0.84rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.lb-desc { max-width: 60ch; }
.lb-counter {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--t-yellow);
  white-space: nowrap;
}

.lb-btn {
  position: absolute;
  z-index: 2;
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--space-3);
  box-shadow: var(--hard);
  cursor: pointer;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), background 0.2s var(--ease);
}
.lb-btn:hover { transform: translateY(-2px); background: var(--purple-deep); }
.lb-btn:active { transform: translateY(3px); box-shadow: 0 3px 0 rgba(0, 0, 0, 0.42); }
.lb-btn svg {
  width: 22px; height: 22px;
  fill: none; stroke: currentColor; stroke-width: 2.4;
  stroke-linecap: round; stroke-linejoin: round;
}
.lb-close { top: 20px; right: 20px; }
.lb-prev { left: 18px; top: 50%; margin-top: -26px; }
.lb-next { right: 18px; top: 50%; margin-top: -26px; }

/* ---------------------------- 8. 关于 ---------------------------- */
.about { padding: 110px 0; }

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  background: linear-gradient(158deg,
    color-mix(in srgb, var(--space-2) 98%, transparent),
    color-mix(in srgb, var(--space) 86%, transparent));
  border-radius: var(--r-lg);
  padding: clamp(24px, 4vw, 48px);
  box-shadow: inset 0 1px 0 var(--glass-line), 0 30px 70px rgba(4, 7, 20, 0.42);
}

.about-photo { margin: 0; }
.about-photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--r-md);
  background: var(--space);
}
.about-photo figcaption {
  margin-top: 12px;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.about-body p { color: var(--muted); max-width: 58ch; }
.about-body .section-title { margin-bottom: 18px; }

.facts {
  list-style: none;
  margin: 30px 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.facts li {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  align-items: baseline;
  background: linear-gradient(to bottom,
    color-mix(in srgb, var(--space-3) 96%, transparent),
    color-mix(in srgb, var(--space-2) 92%, transparent));
  border-radius: var(--r-md);
  padding: 13px 18px;
  font-size: 0.94rem;
  box-shadow: inset 0 1px 0 var(--glass-line);
}
.facts li::before {
  content: "";
  width: 9px; height: 9px;
  border-radius: 3px;
  background: var(--teal);
  flex: none;
  transform: translateY(-1px);
}
.facts li:nth-child(2)::before { background: var(--pink); }
.facts li:nth-child(3)::before { background: var(--purple); }
.facts li:nth-child(4)::before { background: var(--orange); }
.facts span { color: var(--muted); min-width: 92px; font-size: 0.84rem; }
.facts b { font-weight: 700; }

.about-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------------------------- 9. 联系与页脚 ---------------------------- */
.contact { padding: 110px 0 90px; }

.contact-inner {
  text-align: center;
  display: grid;
  justify-items: center;
  background: linear-gradient(158deg,
    color-mix(in srgb, var(--space-2) 98%, transparent),
    color-mix(in srgb, var(--space) 86%, transparent));
  border-radius: var(--r-lg);
  padding: clamp(34px, 6vw, 72px) clamp(20px, 5vw, 60px);
  box-shadow: inset 0 1px 0 var(--glass-line), 0 30px 70px rgba(4, 7, 20, 0.42);
}
.contact .section-title { margin-bottom: 24px; }

.mail {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 4.2vw, 2.5rem);
  font-weight: 600;
  color: var(--t-yellow);
  background: color-mix(in srgb, var(--yellow) 12%, transparent);
  border-radius: var(--r-pill);
  padding: 10px 28px;
  word-break: break-all;
  transition: background 0.25s var(--ease), transform 0.2s var(--ease);
}
.mail:hover {
  background: color-mix(in srgb, var(--yellow) 26%, transparent);
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(4, 7, 20, 0.45);
}

.copy-btn {
  margin-top: 18px;
  padding: 10px 22px;
  border: 2px solid var(--line);
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--muted);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.18s var(--ease);
}
.copy-btn:hover { color: var(--ink); border-color: var(--teal); transform: translateY(-2px); }
.copy-btn.is-done { color: var(--marker-ink); background: var(--teal); border-color: var(--teal); }

.socials {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 40px 0 0;
  padding: 0;
}
.socials a {
  display: inline-block;
  padding: 9px 20px;
  border-radius: var(--r-pill);
  background: linear-gradient(to bottom,
    color-mix(in srgb, var(--space-3) 96%, transparent),
    color-mix(in srgb, var(--space) 88%, transparent));
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.92rem;
  box-shadow: inset 0 1px 0 var(--glass-line);
  transition: background 0.3s var(--ease), transform 0.3s var(--spring),
    box-shadow 0.3s var(--ease), color 0.2s var(--ease);
}
.socials a:hover {
  background: var(--purple-deep);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(4, 7, 20, 0.5);
}

.site-footer {
  border-top: 2px solid var(--line);
  padding: 28px 0;
  font-size: 0.86rem;
  color: var(--muted);
}
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }
.footer-inner p { margin: 0; }

.to-top {
  position: fixed;
  right: 24px; bottom: 24px;
  z-index: 70;
  width: 50px; height: 50px;
  display: grid; place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--marker-ink);
  box-shadow: var(--hard);
  cursor: pointer;
  transition: transform 0.3s var(--spring), box-shadow 0.3s var(--ease);
}
.to-top[hidden] { display: none; }
.to-top:hover {
  transform: translateY(-3px);
  box-shadow: var(--hard), 0 16px 34px rgba(4, 7, 20, 0.45);
}
.to-top:active { transform: translateY(3px); box-shadow: 0 3px 0 rgba(0, 0, 0, 0.42); }
.to-top svg {
  width: 22px; height: 22px;
  fill: none; stroke: currentColor; stroke-width: 2.6;
  stroke-linecap: round; stroke-linejoin: round;
}

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

@media (max-width: 1000px) {
  .hero-art-wrap {
    width: min(58vw, 430px);
    right: -8vw;
    opacity: 0.55;
  }
}

@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { max-width: 420px; }
  .about { padding: 84px 0; }
  .works { padding-top: 80px; }
  .hero-art-wrap { width: min(72vw, 380px); right: -14vw; top: 22%; opacity: 0.4; }
  .lightbox { padding: 66px 16px 24px; }
  .lb-stage img { max-height: 54svh; }
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
  .lb-caption { flex-direction: column; align-items: flex-start; gap: 6px; }
}

@media (max-width: 760px) {
  .nav {
    position: fixed;
    inset: var(--header-h) 12px auto 12px;
    flex-direction: column;
    gap: 4px;
    padding: 14px;
    background: var(--space-2);
    border-radius: var(--r-lg);
    box-shadow: var(--pop);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s var(--ease), transform 0.25s var(--spring);
  }
  .nav.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .nav a { padding: 13px 16px; color: var(--ink); }
  .nav-toggle { display: grid; }
  .gallery { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
  .card-tag { opacity: 1; transform: none; }
  .hero-stats > div { flex: 1 1 30%; min-width: 0; padding: 12px 16px; }
}

@media (max-width: 460px) {
  .wrap { width: min(100% - 32px, var(--wrap)); }
  .gallery { grid-template-columns: 1fr; }
  .hero-actions .btn { flex: 1 1 auto; }
  .hero-stats dd { font-size: 1.45rem; }
}

@media (max-width: 420px) {
  .brand-text em { display: none; }
  .header-inner { gap: 12px; }
}

/* 不支持 backdrop-filter 的浏览器：退回实色，别让文字压在花图上 */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header.is-scrolled,
  .toolbar.is-stuck,
  .lb-caption,
  .search,
  .btn-ghost { background: var(--space-2); }
  .lb-stage img { box-shadow: var(--pop); }
  .card-veil {
    background: linear-gradient(to top, rgba(4, 7, 20, 0.95) 0%, rgba(4, 7, 20, 0.6) 42%, transparent 72%);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero-art { animation: none; }
  .hero-art-wrap { transition: none; transform: translate3d(0, -50%, 0); }
  .aurora { animation: none; }
  .scroll-progress { transition: none; }
}

@media print {
  .site-header, .scroll-cue, .to-top, .filters, .lightbox, .hero-art { display: none !important; }
  body { background: #fff; color: #000; }
  body::before, body::after { display: none; }
  .gallery { grid-template-columns: repeat(2, 1fr) !important; }
}
