/* =====================================================
   戴婉婷个人网站 · New Material 版（浅色 · 瑞士极简）
   内容结构完全不变，仅替换「颜色 / 字体 / 材质 / 圆角」
   规范来源：设计风格文档2.txt
   —— 纯白基底、墨黑文字、柔和圆角卡片、微阴影（Soft Depth）、
      Inter 无衬线、极致留白、平滑物理感动效
   可读性兜底：正文 #111（18.9:1）/ 二级 #555（7.5:1）/
      注释 #767676（4.5:1，文档原 #888 仅 3.5:1 不达标，已提深）
   ===================================================== */

:root {
  /* —— 基底 —— */
  --bg: #F2EFDE;          /* 米色底（取自底色.png RGB 242,239,222） */
  --bg-alt: #ECE8D5;      /* 同色系略深，用于交替区块 */
  --surface: #F4F5F7;     /* 卡片 / 容器底 */
  --surface-2: #EDEEF0;   /* hover 激活 */

  /* —— 文字 —— */
  --ink: #111111;         /* 主文字 · 深炭黑（非纯黑） */
  --text: #111111;
  --sub: #555555;         /* 二级文字 */
  --dim: #767676;         /* 注释 / 辅助 */

  /* —— 线与面 —— */
  --line: #E8E8EA;                /* 分割线 */
  --line-soft: rgba(17, 17, 17, .07);

  /* —— 点缀（来自作品真实色，低饱和） —— */
  --accent: #9C5F42;      /* 赭 · 大陈岛暖砂 / 虎丘赭粉 降饱和 */
  --accent-soft: rgba(156, 95, 66, .09);
  --accent2: #37707F;     /* 青 · 浮世避难所海报色 降饱和 */

  /* —— 圆角 —— */
  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 10px;
  --r-pill: 999px;

  /* —— 微阴影（多层扩散、低不透明度） —— */
  --shadow-1: 0 1px 2px rgba(17, 17, 17, .04), 0 8px 24px rgba(17, 17, 17, .05);
  --shadow-2: 0 2px 6px rgba(17, 17, 17, .05), 0 18px 44px rgba(17, 17, 17, .10);
  --shadow-3: 0 30px 80px rgba(17, 17, 17, .18);

  --ease: cubic-bezier(.16, 1, .3, 1);   /* 物理感平滑缓动 */
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 92px; }

body {
  background-color: var(--bg);
  /* 仿首页底图的细腻像素网格：与底图方格等大（51/1304 ≈ 3.9% 画框宽），极浅暗线 */
  background-image:
    linear-gradient(rgba(150, 130, 80, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(150, 130, 80, .055) 1px, transparent 1px);
  background-size: min(5.18vw, 70px) min(5.18vw, 70px);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Display",
               "Segoe UI", "PingFang SC", "HarmonyOS Sans SC",
               "Microsoft YaHei", sans-serif;
  font-size: 16.5px;
  line-height: 1.8;
  font-weight: 400;
  letter-spacing: .005em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: auto;
}

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

a { color: inherit; text-decoration: none; }
button { font-family: inherit; color: inherit; }
img { display: block; }

/* ---------- 导航 ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .74);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  backdrop-filter: blur(14px) saturate(180%);
  border-bottom: 1px solid var(--line-soft);
}
.header-inner {
  max-width: 1280px; margin: 0 auto;
  padding: 0 40px;
  height: 72px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand {
  font-weight: 600; letter-spacing: -.005em; font-size: 15.5px;
  color: var(--sub);
  display: flex; align-items: center; gap: 12px;
}
.brand-en {
  font-size: 11px; letter-spacing: .18em; color: var(--dim);
  font-weight: 500; text-transform: uppercase;
}
.nav { display: flex; gap: 30px; }
.nav a {
  font-size: 15.5px; letter-spacing: .01em;
  color: var(--sub); font-weight: 400;
  display: flex; flex-direction: column; align-items: center; line-height: 1.4;
  transition: color .3s var(--ease);
}
.nav a span {
  font-size: 11px; letter-spacing: .16em; color: var(--dim);
  font-weight: 500; margin-top: 3px;
  padding: 1px 6px; border-radius: var(--r-pill);
  transition: background .3s var(--ease), color .3s var(--ease);
}
.nav a:hover { color: var(--ink); }
.nav a.active { color: var(--ink); font-weight: 500; }
.nav a.active span { background: #E5C8AD; color: var(--ink); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; }
.nav-toggle span { display: block; width: 20px; height: 1.5px; background: var(--ink); margin: 5px 0; border-radius: 2px; }

/* ---------- HERO（像素园林版） ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  background: var(--bg);
  padding: 96px 40px 56px;
}
/* 最底层：淡化像素园林 + 网格（最下.png） */
.hero-bg {
  position: absolute; inset: 0;
  background: url("../assets/hero/base.png") center / cover no-repeat;
}

/* 黑色像素框舞台（阶梯切角 + 右下像素投影） */
.hero-stage {
  position: relative; z-index: 2;
  width: min(1200px, 88vw);
  aspect-ratio: 1386 / 765;
}
/* 像素框图片（含 1px 黑边 + 浅米色硬边投影），等比覆于场景之上 */
.hero-frame-img {
  position: absolute; inset: 0; z-index: 2;
  width: 100%; height: 100%;
  pointer-events: none;
}
/* 竖版像素框：桌面隐藏，仅手机竖屏启用 */
.hero-frame-portrait { display: none; }
.hero-scene {
  position: absolute; overflow: hidden;
  /* 与 frame.png 内部空心区域对齐 */
  left: 5%; right: 8.2%; top: 3.5%; bottom: 5.8%;
  border-radius: 10px;
  background: url("../assets/hero/scene.png") center / cover no-repeat;
}

/* 白字 + 深灰像素描边（缝合像素字体 12px） */
@font-face {
  font-family: "Fusion Pixel";
  src: url("../assets/fonts/fusion-pixel-12px-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+2000-206F;
  font-display: swap;
}
@font-face {
  font-family: "Fusion Pixel";
  src: url("../assets/fonts/fusion-pixel-12px-zh.woff2") format("woff2");
  unicode-range: U+2E80-9FFF, U+3000-303F, U+FF00-FFEF;
  font-display: swap;
}
@font-face {
  font-family: "Zpix";
  src: url("../assets/fonts/zpix.ttf") format("truetype");
  font-display: swap;
}
@font-face {
  font-family: "Silver";
  src: url("../assets/fonts/silver-full.ttf") format("truetype");
  font-display: swap;
}
.hero-text {
  position: absolute; z-index: 3;
  left: 9%; top: 28%;
  --px: #33383c;
}
.hero-title {
  font-family: "Silver", "Zpix", "Fusion Pixel", "ZCOOL QingKe HuangYou", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: min(80px, 5.9vw);
  font-weight: 400; letter-spacing: 0; line-height: 1;
  transform: translateY(.5em);
  color: #fff;
  text-shadow:
    2px 0 0 var(--px), -2px 0 0 var(--px), 0 2px 0 var(--px), 0 -2px 0 var(--px),
    2px 2px 0 var(--px), -2px -2px 0 var(--px), 2px -2px 0 var(--px), -2px 2px 0 var(--px);
}
.hero-en {
  font-family: "Silver", "Zpix", "Fusion Pixel", monospace;
  font-size: min(42px, 3.1vw);
  letter-spacing: .027em; font-weight: 400;
  color: #fff;
  margin: .1em 0 .19em;
  text-shadow:
    1px 0 0 var(--px), -1px 0 0 var(--px), 0 1px 0 var(--px), 0 -1px 0 var(--px),
    1px 1px 0 var(--px), -1px -1px 0 var(--px), 1px -1px 0 var(--px), -1px 1px 0 var(--px);
}
.hero-quote {
  font-family: "Silver", "Zpix", "Fusion Pixel", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: min(26px, 1.91vw); font-weight: 400;
  letter-spacing: .04em; line-height: 1.8;
  transform: translateY(-1.69em);
  color: #fff;
  text-shadow:
    1px 0 0 var(--px), -1px 0 0 var(--px), 0 1px 0 var(--px), 0 -1px 0 var(--px),
    1px 1px 0 var(--px), -1px -1px 0 var(--px), 1px -1px 0 var(--px), -1px 1px 0 var(--px);
}
.hero-quote .q1 { display: inline-block; transform: translateY(.85em); }

/* 像素按钮：直接使用按钮素材图，文字覆盖于图标右侧 */
.hero-actions {
  position: absolute; z-index: 3;
  left: 9%; bottom: 23%;
  display: flex; gap: 14px; flex-wrap: wrap;
}
.btn-pixel {
  position: relative;
  display: inline-block;
  transition: transform .25s var(--ease), filter .25s var(--ease);
}
.btn-bg {
  height: clamp(28px, 3.2vw, 40px);
  display: block;
}
.btn-label {
  position: absolute;
  left: 30%; right: 4%; top: 50%;
  transform: translateY(-50%);
  text-align: center;
  color: #fff;
  font-size: clamp(11px, 1.15vw, 15px);
  font-weight: 500; letter-spacing: .04em;
  white-space: nowrap;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, .35);
}
.btn-label-r { left: 50%; }
.btn-pixel:hover { transform: translateY(-2px); filter: brightness(1.08); }

/* 小女孩与橘猫：在底部小径上从右向左散步，到左侧后刷新回右侧重来 */
.walker {
  position: absolute; z-index: 2;
  bottom: 14%; left: 71%;
  height: 25%;
  animation: walkAcross 10s linear infinite;
  pointer-events: none;
}
.walker img {
  height: 100%; display: block;
  transform: scaleX(-1); /* 素材朝右，翻转为朝左 */
  image-rendering: pixelated;
}
@keyframes walkAcross {
  0%   { left: 71%; }
  100% { left: 35%; }
}

/* 屏幕角落像素动图：左上抱猫 / 右下拍照 */
.hero-pal {
  position: absolute; z-index: 3;
  image-rendering: pixelated;
  pointer-events: none;
}
.pal-cat   { left: 2.8vw; top: 12vh;  height: 21vh; }
.pal-photo { right: 2vw;  bottom: 2vh; height: 25vh; }

/* 花瓣与叶片：框内缓慢摇曳飘落 */
.petals { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.petal { position: absolute; top: -6%; animation: petalFall linear infinite; }
.petal i {
  display: block; image-rendering: pixelated;
  animation: petalSway ease-in-out infinite alternate;
}
@keyframes petalFall { from { top: -6%; } to { top: 106%; } }
@keyframes petalSway {
  from { transform: translateX(-12px) rotate(0deg); }
  to   { transform: translateX(12px) rotate(90deg); }
}

/* ---------- 通用 Section ---------- */
.section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 110px 40px 110px;
}
.section-head {
  display: flex; align-items: baseline; gap: 20px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 24px; margin-bottom: 64px;
}
.section-mascot {
  height: 96px; width: auto;
  align-self: flex-end;
  margin-bottom: -24px; /* 站在分隔线上 */
  image-rendering: pixelated;
}
.section-num {
  font-size: 12.5px; letter-spacing: .06em;
  color: var(--accent); font-weight: 500;
  background: var(--accent-soft);
  border-radius: var(--r-pill);
  padding: 4px 11px;
}
.section-head h2 {
  font-size: clamp(30px, 3.6vw, 42px);
  font-weight: 600; letter-spacing: -.015em;
  color: var(--ink);
}
.section-head h2 em {
  font-style: normal; font-size: 11px; font-weight: 500;
  letter-spacing: .22em; color: var(--dim);
  margin-left: 16px; vertical-align: middle;
}
.section-intro { color: var(--sub); max-width: 760px; margin: -26px 0 60px; font-size: 16.5px; line-height: 1.9; }
.dim-note { color: var(--dim); font-size: 13.5px; letter-spacing: .02em; margin: 18px 0 8px; }
.rule { border: none; border-top: 1px solid var(--line); margin: 96px 0; }

/* ---------- 简历 ---------- */
.resume-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.resume-block {
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: 34px 32px 30px;
  box-shadow: var(--shadow-1);
  transition: box-shadow .4s var(--ease), transform .4s var(--ease);
}
.resume-block:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.resume-block h3 {
  font-size: 13px; letter-spacing: .06em; color: var(--ink);
  font-weight: 600;
  margin-bottom: 18px; padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.meta-list { list-style: none; }
.meta-list li {
  display: flex; gap: 22px;
  padding: 11px 0; font-size: 16px;
  border-bottom: 1px solid var(--line-soft);
}
.meta-list li:last-child { border-bottom: none; }
.meta-list li span {
  color: var(--dim); font-size: 12.5px; letter-spacing: .06em;
  min-width: 3.2em; padding-top: 4px; font-weight: 500;
}
.timeline { list-style: none; }
.timeline li { padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
.timeline li:last-child { border-bottom: none; }
.t-time { font-size: 12px; letter-spacing: .06em; color: var(--dim); margin-bottom: 6px; font-weight: 500; }
.t-main { font-size: 16.5px; font-weight: 600; letter-spacing: -.005em; line-height: 1.55; color: var(--ink); }
.t-sub { font-size: 14.5px; color: var(--sub); margin-top: 8px; line-height: 1.85; }
.award-list { list-style: none; }
.award-list li {
  font-size: 14.5px; color: var(--sub);
  padding: 11px 0; border-bottom: 1px solid var(--line-soft);
  line-height: 1.8;
}
.award-list li:last-child { border-bottom: none; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-size: 13px; letter-spacing: .02em;
  color: var(--sub);
  background: var(--surface);
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  padding: 7px 15px;
  transition: background .3s var(--ease), color .3s var(--ease);
}
.tag:hover { background: var(--ink); color: #fff; }

/* ---------- 设计作品 ---------- */
.work-group-title {
  font-size: 25px; font-weight: 600; letter-spacing: -.015em; line-height: 1.4;
  color: var(--ink);
}
.work-group-title span {
  display: block; font-size: 12px; font-weight: 500;
  letter-spacing: .12em; color: var(--dim); margin-top: 10px;
}
.work-desc {
  color: var(--sub); font-size: 16px; line-height: 1.9;
  max-width: 780px; margin: 20px 0 44px;
}
.project-cards {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 30px;
}
.project-card {
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
  text-align: left;
  padding: 28px 26px 26px;
  cursor: pointer;
  display: flex; flex-direction: column; gap: 8px;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.project-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.pc-num { font-size: 12px; letter-spacing: .08em; color: var(--dim); font-weight: 500; transition: color .3s; }
.pc-title { font-size: 19.5px; font-weight: 600; letter-spacing: -.01em; color: var(--ink); }
.pc-sub { font-size: 13px; color: var(--sub); letter-spacing: .01em; line-height: 1.7; }
.project-card:hover .pc-num { color: var(--accent); }

/* 图墙 */
.gallery { display: grid; gap: 18px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.gallery .g-item {
  position: relative; overflow: hidden;
  background: var(--surface);
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
  padding: 0; cursor: zoom-in;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.gallery .g-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.gallery .g-item img {
  width: 100%; height: 100%; object-fit: cover;
  opacity: .8;
  transition: transform .5s var(--ease), opacity .5s var(--ease);
}
.gallery .g-item:hover img { transform: scale(1.025); opacity: 1; }

/* 作品集分组轮播：新图覆层从左到右划入 */
.gallery .g-item.slider img.swap {
  position: absolute; inset: 0;
  opacity: 1;
  clip-path: inset(0 100% 0 0);
  transition: clip-path .85s var(--ease);
}
.gallery .g-item.slider img.swap.on { clip-path: inset(0 0 0 0); }

/* 折山叠海单卡轮播：1/2 栏宽，按原图比例显示 */
#slider-dachen { width: 100%; }
#slider-dachen .g-item { aspect-ratio: auto; }
#slider-dachen .g-item img { height: auto; object-fit: contain; }
#slider-dachen .g-item img.swap { height: 100%; }
.gallery .g-item figcaption {
  position: absolute; left: 10px; bottom: 10px;
  font-size: 11px; letter-spacing: .08em; font-weight: 500;
  color: var(--ink);
  background: rgba(255, 255, 255, .86);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-radius: var(--r-pill);
  padding: 4px 11px;
}

/* ---------- 游戏拆解 ---------- */
.game-cards {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;
}
.game-card {
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  padding: 38px 34px 34px;
  display: flex; flex-direction: column; gap: 20px;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.game-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.gc-head h3 { font-size: 20px; font-weight: 600; letter-spacing: -.01em; line-height: 1.45; color: var(--ink); }
.gc-meta { display: block; font-size: 12px; letter-spacing: .08em; color: var(--dim); margin-top: 10px; font-weight: 500; }
.gc-line { font-size: 14.5px; color: var(--sub); line-height: 1.9; flex: 1; }
.game-card .btn {
  align-self: flex-start; padding: 10px 24px; font-size: 13px; font-weight: 700;
  border: none; border-radius: 999px;
  background: #F1F0F5; color: var(--ink);
  cursor: pointer;
  transition: background .25s var(--ease), color .25s var(--ease), transform .25s var(--ease);
}
.game-card .btn:hover { background: var(--ink); color: #fff; transform: translateY(-2px); }

/* ---------- 社群 ---------- */
.brand-line { font-size: 26px; font-weight: 600; letter-spacing: -.015em; color: var(--ink); }
.brand-line span { display: block; font-size: 12px; font-weight: 500; letter-spacing: .14em; color: var(--dim); margin-top: 10px; }
/* 浮世避难所官网入口按钮（圆角白底，文字加粗） */
.community-link {
  display: inline-block; margin-top: 20px;
  padding: 12px 30px;
  font-size: 14px; font-weight: 700;
  color: var(--text); text-decoration: none;
  background: #fff; border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.community-link:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }

.stats {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin: 44px 0 36px;
}
.stat {
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
  padding: 28px 16px 24px; text-align: center;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.stat:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.stat strong {
  display: block; font-size: 29px; font-weight: 600;
  letter-spacing: -.025em; color: var(--ink); line-height: 1.2;
}
.stat span { font-size: 12px; color: var(--sub); letter-spacing: .06em; margin-top: 10px; display: block; }
#community .gallery { margin-top: 46px; }
#community .gallery .g-item { aspect-ratio: auto; }
#community .gallery .g-item img { height: auto; }

/* 织构江南绣正图：保持原图比例、不占大版面 */
#gallery-huqiu { max-width: 720px; }
#gallery-huqiu .g-item { aspect-ratio: auto; }
#gallery-huqiu .g-item img { height: auto; object-fit: contain; }

/* ---------- 科研 ---------- */
#research .resume-block { margin-bottom: 0; }

/* 作品组抬头（本科毕业设计 2022 / 研究生设计 2023） */
.work-kicker {
  font-size: 17px; font-weight: 600; letter-spacing: -.01em;
  color: var(--ink); margin-bottom: 14px;
}
.work-kicker span {
  display: block; font-size: 11px; font-weight: 500;
  letter-spacing: .18em; color: var(--dim); margin-top: 5px;
}

/* 游戏区 · 二维码与图片占位（待替换） */
.games-top {
  display: flex; justify-content: space-between; align-items: center;
  gap: 48px; margin-bottom: 40px;
}
.games-top .section-intro { margin: 0; }
.qr-wrap {
  flex: none; width: 190px;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.qr-img {
  width: 150px; height: 150px;
  border: 1px solid var(--line-soft); border-radius: var(--r-md);
  background: #fff; box-shadow: var(--shadow-1);
  image-rendering: pixelated;
}
.qr-link { margin-top: 0; text-align: center; font-size: 12.5px; padding: 10px 16px; }
.game-slots {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;  margin-top: 22px;
}
.img-slot {
  aspect-ratio: 16 / 10;
  border: 1.5px dashed var(--line); border-radius: var(--r-lg);
  background: var(--bg-alt);
  display: flex; align-items: center; justify-content: center;
  color: var(--dim); font-size: 12.5px; letter-spacing: .1em;
}
.img-slot img, .qr-slot img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
/* 游戏卡下方三格轮播：复用 ky-slider 外观，去掉上间距 */
.game-slots .ky-slider { margin-top: 0; }
.game-slots .ky-slider img { object-fit: cover; }
/* 游戏拆解区标题行：收紧上下空档 */
#games .section-head { margin-top: 0; margin-bottom: 26px; }

/* 科研 · 两图轮播（约 0.7s 切换） */
.ky-slider {
  position: relative; margin-top: 44px;
  aspect-ratio: 16 / 9;
  background: #fff;
  border: 1px solid var(--line-soft); border-radius: var(--r-md);
  box-shadow: var(--shadow-1); overflow: hidden;
}
.ky-slider img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: contain;
  opacity: 0; transition: opacity .35s var(--ease);
}
.ky-slider img.on { opacity: 1; }
.ky-slider { cursor: zoom-in; transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.ky-slider:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }

/* 像素猫爪光标：悬停可互动内容时显示（热点在爪尖） */
a, button, .g-item, .ky-slider, .project-card {
  cursor: url("../assets/hero/paw-cursor.png") 16 4, pointer;
}

/* ---------- 页脚 ---------- */
.footer { padding-bottom: 60px; }
.contact-inner { padding: 20px 0 80px; }
.contact-line { color: var(--sub); margin-bottom: 26px; font-size: 16.5px; }
.contact-mail {
  font-size: clamp(16px, 2.2vw, 17px); font-weight: 600; letter-spacing: -.025em;
  color: var(--ink);
  display: inline-block; margin-bottom: 24px;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 6px;
  transition: color .3s var(--ease), border-color .3s var(--ease);
}
.contact-mail:hover { color: var(--accent); }
.contact-sub { color: var(--sub); font-size: 14px; letter-spacing: .06em; }
.copyright {
  border-top: 1px solid var(--line);
  padding-top: 28px;
  color: var(--dim); font-size: 12.5px; letter-spacing: .06em;
}

/* ---------- 灯箱 ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(255, 255, 255, .93);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  display: none; align-items: center; justify-content: center;
}
.lightbox.open { display: flex; animation: fadeIn .35s var(--ease); }
.lb-stage { max-width: 88vw; max-height: 88vh; text-align: center; }
.lb-stage img {
  max-width: 88vw; max-height: 82vh;
  width: auto; height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: var(--shadow-3);
}
.lb-stage figcaption { color: var(--sub); font-size: 12.5px; letter-spacing: .08em; margin-top: 18px; }
.lb-close, .lb-prev, .lb-next {
  position: fixed; z-index: 201;
  background: #fff; border: 1px solid var(--line);
  color: var(--ink); font-size: 20px;
  width: 46px; height: 46px; cursor: pointer;
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-1);
  transition: background .3s var(--ease), color .3s var(--ease),
              border-color .3s var(--ease), transform .3s var(--ease);
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover {
  background: var(--ink); color: #fff; border-color: var(--ink); transform: translateY(-2px);
}
.lb-close { top: 22px; right: 26px; }
.lb-prev { left: 22px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 22px; top: 50%; transform: translateY(-50%); }
.lb-prev:hover, .lb-next:hover { transform: translateY(-50%) scale(1.04); }
/* 灯箱文字操作键：上一页 / 下一页 / 关闭，竖排于右下 */
.lb-controls {
  position: absolute; right: 26px; bottom: 26px; z-index: 30;
  display: flex; flex-direction: column; gap: 10px;
}
.lb-controls button {
  padding: 10px 22px; border: none; border-radius: 999px;
  background: rgba(255, 255, 255, .96); color: var(--ink);
  font-size: 13px; font-weight: 700; letter-spacing: .06em;
  font-family: inherit; cursor: pointer;
  box-shadow: var(--shadow-2);
  transition: background .25s var(--ease), color .25s var(--ease), transform .25s var(--ease);
}
.lb-controls button:hover { background: var(--ink); color: #fff; transform: translateY(-2px); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- 游戏弹窗 ---------- */
.modal { position: fixed; inset: 0; z-index: 210; display: none; }
.modal.open { display: block; animation: fadeIn .35s var(--ease); }
.modal-mask {
  position: absolute; inset: 0;
  background: rgba(17, 17, 17, .26);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.modal-panel {
  position: relative; z-index: 2;
  max-width: 860px; max-height: 84vh;
  margin: 7vh auto 0;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  box-shadow: var(--shadow-3);
  overflow-y: auto;
  padding: 62px 58px 54px;
}
.modal-panel .lb-close { position: sticky; top: 0; float: right; background: #fff; }
.modal-body h3 { font-size: 26px; font-weight: 600; letter-spacing: -.015em; margin-bottom: 8px; line-height: 1.4; color: var(--ink); }
.modal-body .m-sub { color: var(--dim); font-size: 12px; letter-spacing: .14em; margin-bottom: 38px; font-weight: 500; }
.modal-body h4 {
  font-size: 13px; letter-spacing: .08em; color: var(--ink); font-weight: 600;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px; margin: 40px 0 18px;
}
.modal-body p, .modal-body li { color: var(--sub); font-size: 15.5px; line-height: 1.9; }
.modal-body ul { list-style: none; }
.modal-body li { padding: 7px 0 7px 20px; position: relative; }
.modal-body li::before {
  content: ""; position: absolute; left: 0; top: .95em;
  width: 6px; height: 6px; border-radius: var(--r-pill);
  background: var(--accent);
}

/* ---------- 入场动效（平滑淡入上浮） ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .project-cards { grid-template-columns: repeat(2, 1fr); }
  .game-cards, .game-slots { grid-template-columns: 1fr; }
  .games-top { flex-direction: column; gap: 28px; }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .resume-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .header-inner, .section { padding-left: 22px; padding-right: 22px; }
  .hero { padding: 96px 16px 64px; }
  /* 竖版舞台：换用竖版像素框 + 亭子段落插画 */
  .hero-stage { width: 92vw; max-width: 430px; aspect-ratio: 720 / 980; }
  .hero-frame-img { display: none; }
  .hero-frame-portrait { display: block; }
  .hero-scene {
    left: 9.9%; right: 15.7%; top: 2.9%; bottom: 4.5%;
    background-image: url("../assets/hero/scene-portrait.png?v=2");
  }
  /* 竖版排版：文字居中靠上，按钮居中靠下；right 6.7% 校准内容中线 */
  .hero-text { left: 0; right: 6.7%; top: 10%; text-align: center; }
  .hero-title { font-size: 7vw; }
  .hero-en { font-size: 3.6vw; }
  .hero-quote { font-size: 3vw; }
  .hero-actions { left: 0; right: 6.7%; bottom: 9%; justify-content: center; }
  .walker { height: 16%; bottom: 11%; }
  .section-mascot { height: 64px; margin-bottom: -16px; }
  .section-head { gap: 12px; }
  .pal-cat { height: 13vh; top: 10vh; }
  .pal-photo { height: 15vh; }
  body { font-size: 16px; }
  .section { padding: 100px 22px 80px; }
  .nav {
    display: none; position: absolute; top: 72px; left: 0; right: 0;
    background: rgba(255, 255, 255, .97);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    border-radius: 0 0 16px 16px;
    flex-direction: column; gap: 0; padding: 10px 22px 18px;
    box-shadow: var(--shadow-2);
  }
  .nav.open { display: flex; }
  .nav a { padding: 13px 0; flex-direction: row; align-items: center; justify-content: space-between; font-size: 17px; }
  .nav a span { margin-top: 0; }
  .nav-toggle { display: block; }
  .project-cards, .stats, .grid-4, .grid-2 { grid-template-columns: 1fr; }
  #slider-dachen { width: 100%; }
  .modal-panel { padding: 48px 24px 40px; margin-top: 4vh; border-radius: 18px; }
  .lb-prev, .lb-next { display: none; }
  .lb-controls {
    right: 50%; transform: translateX(50%);
    bottom: 16px; flex-direction: row; gap: 8px;
  }
  .lb-controls button { padding: 9px 16px; font-size: 12.5px; }
}
