/* ========== 基础变量：黑金配色 ========== */
:root {
  --bg: #0a0a0a;
  --bg-2: #111110;
  --text: #ece6da;
  --muted: #8c8577;
  --gold: #d4af37;
  --gold-light: #f3e2a9;
  --gold-dark: #9c7a2b;
  --line: rgba(212, 175, 55, .16);
  --gold-grad: linear-gradient(110deg, #9c7a2b 0%, #d4af37 25%, #f8eab8 50%, #d4af37 75%, #9c7a2b 100%);
  --display: "Cinzel", "Songti SC", serif;
  --serif: "Cormorant Garamond", "Songti SC", serif;
  --sans: "Inter", -apple-system, "PingFang SC", sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);

  /* 背景、卡片等表面颜色（随主题切换） */
  --solid-bg: #000;
  --nav-bg: rgba(10, 10, 10, .78);
  --hero-glow: #1a160c;
  --card-bg: linear-gradient(165deg, #17150f 0%, #0e0e0d 55%, #0b0b0a 100%);
  --modal-bg: linear-gradient(165deg, #18160f 0%, #0e0e0d 50%, #0a0a0a 100%);
  --shadow-deep: rgba(0, 0, 0, .9);
  --backdrop: rgba(0, 0, 0, .72);
  --close-bg: rgba(10, 10, 10, .6);
  --desc: #bdb6a8;
  --particle: 232, 200, 110;
  color-scheme: dark;
}

/* ========== 浅色模式：白金配色 ========== */
:root[data-theme="light"] {
  --bg: #faf8f3;
  --bg-2: #f2ede2;
  --text: #1f1c16;
  --muted: #7b7262;
  --gold: #b08a2c;
  --gold-light: #8a6a1c;
  --gold-dark: #7a5c18;
  --line: rgba(168, 128, 36, .24);
  --gold-grad: linear-gradient(110deg, #7a5c18 0%, #b08a2c 25%, #dcb85e 50%, #b08a2c 75%, #7a5c18 100%);

  --solid-bg: #faf8f3;
  --nav-bg: rgba(250, 248, 243, .82);
  --hero-glow: #f4e9cd;
  --card-bg: linear-gradient(165deg, #ffffff 0%, #fcf9f2 55%, #f6f0e3 100%);
  --modal-bg: linear-gradient(165deg, #ffffff 0%, #fcfaf5 50%, #f7f2e7 100%);
  --shadow-deep: rgba(110, 85, 30, .22);
  --backdrop: rgba(45, 36, 18, .35);
  --close-bg: rgba(255, 255, 255, .75);
  --desc: #575044;
  --particle: 184, 140, 40;
  color-scheme: light;
}
/* 浅色背景上，鼠标光晕改用「正片叠底」才看得见 */
:root[data-theme="light"] .cursor-glow {
  mix-blend-mode: multiply;
  background: radial-gradient(circle, rgba(212, 175, 55, .16) 0%, transparent 65%);
}
:root[data-theme="light"] body::before { opacity: .025; }
:root[data-theme="light"] .hero-title { filter: drop-shadow(0 6px 24px rgba(176, 138, 44, .25)); }

/* ========== 主题切换按钮 ========== */
.theme-toggle {
  position: relative;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--gold);
  cursor: pointer;
  overflow: hidden;
  flex-shrink: 0;
  transition: border-color .4s, box-shadow .4s, transform .5s var(--ease);
}
.theme-toggle:hover {
  border-color: var(--gold);
  box-shadow: 0 0 22px rgba(212, 175, 55, .35);
  transform: rotate(15deg);
}
.theme-toggle:active { transform: scale(.9); }
.theme-toggle svg {
  position: absolute;
  top: 50%; left: 50%;
  width: 18px; height: 18px;
  margin: -9px 0 0 -9px;
  transition: transform .7s var(--ease), opacity .5s;
}
/* 深色模式显示太阳（点击变亮），浅色模式显示月亮（点击变暗） */
.icon-moon { transform: translateY(30px) rotate(-90deg); opacity: 0; }
:root[data-theme="light"] .icon-sun { transform: translateY(-30px) rotate(90deg); opacity: 0; }
:root[data-theme="light"] .icon-moon { transform: none; opacity: 1; }

/* 切换时：从按钮处以圆形扩散的过渡（浏览器支持时） */
::view-transition-old(root),
::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.loading { overflow: hidden; }

/* 细微的颗粒质感 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }
::selection { background: var(--gold); color: #000; }

.container { max-width: 1000px; margin: 0 auto; padding: 0 32px; position: relative; z-index: 2; }

.gold-text {
  background: var(--gold-grad);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ========== 开场加载动画 ========== */
.loader {
  position: fixed;
  inset: 0;
  background: var(--solid-bg);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  transition: transform 1.1s var(--ease) .1s;
}
.loader.done { transform: translateY(-100%); }
.loader-mark {
  font-family: var(--display);
  font-size: 44px;
  letter-spacing: .4em;
  padding-left: .4em;
  background: var(--gold-grad);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: fadeUp 1s var(--ease) both, shimmer 2.5s linear infinite;
}
.loader-line {
  width: 160px;
  height: 1px;
  background: var(--line);
  position: relative;
  overflow: hidden;
}
.loader-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gold);
  transform-origin: left;
  animation: load 1.4s var(--ease) forwards;
}
@keyframes load { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes shimmer { to { background-position: 200% center; } }

/* ========== 滚动进度条 ========== */
.progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 100%;
  background: var(--gold-grad);
  transform-origin: left;
  transform: scaleX(0);
  z-index: 200;
  box-shadow: 0 0 10px rgba(212, 175, 55, .6);
}

/* ========== 鼠标金色光晕 ========== */
.cursor-glow {
  position: fixed;
  top: 0; left: 0;
  width: 500px; height: 500px;
  margin: -250px 0 0 -250px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 175, 55, .09) 0%, transparent 65%);
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity .6s;
  will-change: transform;
}
body.has-mouse .cursor-glow { opacity: 1; }

/* ========== 导航 ========== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 30px 56px;
  z-index: 100;
  transition: padding .5s var(--ease), background .5s, border-color .5s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  padding: 18px 56px;
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.logo {
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: .2em;
  color: var(--gold);
}
.logo span { color: var(--text); }
.nav nav { display: flex; gap: 44px; }
.nav-right { display: flex; align-items: center; gap: 36px; }
.nav-link {
  font-size: 13px;
  letter-spacing: .2em;
  color: var(--muted);
  position: relative;
  transition: color .4s;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 50%; bottom: -6px;
  width: 4px; height: 4px;
  background: var(--gold);
  transform: translateX(-50%) rotate(45deg) scale(0);
  transition: transform .4s var(--ease);
}
.nav-link:hover, .nav-link.active { color: var(--gold-light); }
.nav-link.active::after { transform: translateX(-50%) rotate(45deg) scale(1); }

/* ========== 首页 ========== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  padding: 0 24px;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 45%, var(--hero-glow) 0%, var(--bg) 60%);
}
#particles { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }

.hero-ring {
  position: absolute;
  top: 50%; left: 50%;
  width: min(80vw, 620px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(212, 175, 55, .12);
  transform: translate(-50%, -50%);
  z-index: 0;
  animation: spin 60s linear infinite;
}
.hero-ring::before, .hero-ring::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}
.hero-ring::before {
  inset: 40px;
  border: 1px dashed rgba(212, 175, 55, .08);
}
.hero-ring::after {
  top: -4px; left: 50%;
  width: 7px; height: 7px;
  margin-left: -3.5px;
  background: var(--gold);
  box-shadow: 0 0 14px 3px rgba(212, 175, 55, .7);
}
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }

.hero-inner { position: relative; z-index: 2; will-change: transform, opacity; }

.eyebrow {
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  color: var(--gold);
  letter-spacing: .1em;
  margin-bottom: 4px;
}
.hero-title {
  font-family: var(--display);
  font-size: clamp(96px, 18vw, 200px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: .12em;
  padding-left: .12em;
  filter: drop-shadow(0 0 30px rgba(212, 175, 55, .25));
}
.hero-title .char {
  display: inline-block;
  background: var(--gold-grad);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0;
  transform: translateY(60px) rotateX(-80deg);
  filter: blur(12px);
  transition: opacity 1.4s var(--ease), transform 1.4s var(--ease), filter 1.4s var(--ease);
  animation: shimmer 4s linear infinite;
}
.hero-title.in .char { opacity: 1; transform: none; filter: blur(0); }

.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 20px 0 28px;
  color: var(--gold);
  font-size: 10px;
}
.divider i { font-style: normal; }
.divider span {
  width: 70px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
  transform: scaleX(0);
  transition: transform 1.4s var(--ease) .4s;
}
.divider span:first-child { transform-origin: right; }
.divider span:last-child { transform-origin: left; background: linear-gradient(270deg, transparent, var(--gold)); }
.divider.visible span { transform: scaleX(1); }

.hero-sub {
  font-size: 14px;
  letter-spacing: .3em;
  color: var(--muted);
  margin-bottom: 52px;
}
.typing { color: var(--gold-light); letter-spacing: .08em; font-family: var(--serif); font-size: 20px; font-style: italic; }
.cursor { color: var(--gold); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* 按钮：金色填充划过 + 磁吸 */
.btn {
  display: inline-block;
  position: relative;
  padding: 16px 48px;
  border: 1px solid var(--gold);
  color: var(--gold-light);
  font-size: 13px;
  letter-spacing: .3em;
  overflow: hidden;
  transition: color .5s var(--ease), box-shadow .5s, transform .3s var(--ease);
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gold-grad);
  background-size: 200% auto;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .6s var(--ease);
  animation: shimmer 3s linear infinite;
}
.btn span { position: relative; }
.btn:hover { color: #0a0a0a; box-shadow: 0 0 40px rgba(212, 175, 55, .35); }
.btn:hover::before { transform: scaleX(1); transform-origin: left; }

.scroll-hint {
  position: absolute;
  bottom: 36px; left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  letter-spacing: .4em;
  text-transform: uppercase;
  color: var(--muted);
  z-index: 2;
}
.scroll-hint::after {
  content: "";
  display: block;
  width: 1px; height: 48px;
  margin: 12px auto 0;
  background: linear-gradient(var(--gold), transparent);
  animation: drop 2.2s var(--ease) infinite;
  transform-origin: top;
}
@keyframes drop {
  0% { transform: scaleY(0); opacity: 1; }
  60% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}

/* ========== 通用区块 ========== */
.section {
  padding: 170px 0;
  position: relative;
}
.section::before {
  content: "";
  position: absolute;
  top: 0; left: 50%;
  width: min(1000px, 90%);
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}
.section-head {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 80px;
}
.index {
  font-family: var(--display);
  color: var(--gold);
  font-size: 15px;
  letter-spacing: .2em;
}
.section-head h2 {
  font-size: 30px;
  font-weight: 300;
  letter-spacing: .25em;
}
.section-head::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.6s var(--ease) .3s;
}
.section-head.visible::after { transform: scaleX(1); }

/* ========== 关于我 ========== */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 90px;
}
.lead {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 300;
  line-height: 1.6;
  margin-bottom: 28px;
}
.lead::first-letter { color: var(--gold); }
.about-text p:not(.lead) { color: var(--muted); font-size: 15px; }

.facts { list-style: none; }
.facts li {
  display: flex;
  justify-content: space-between;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  opacity: 0;
  transform: translateX(30px);
  transition: opacity .9s var(--ease), transform .9s var(--ease), padding .4s var(--ease);
}
.facts li:first-child { border-top: 1px solid var(--line); }
.facts.visible li { opacity: 1; transform: none; }
.facts li:hover { padding-left: 10px; padding-right: 10px; }
.facts span { color: var(--muted); letter-spacing: .1em; }
.facts strong { font-weight: 400; color: var(--gold-light); }

.skills { margin-top: 80px; display: flex; flex-wrap: wrap; gap: 14px; }
.skills span {
  padding: 9px 22px;
  border: 1px solid var(--line);
  font-size: 13px;
  letter-spacing: .1em;
  color: var(--text);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .8s var(--ease), transform .8s var(--ease),
              border-color .4s, color .4s, box-shadow .4s, background .4s;
}
.skills.visible span { opacity: 1; transform: none; }
.skills span:hover {
  border-color: var(--gold);
  color: var(--gold-light);
  background: rgba(212, 175, 55, .06);
  box-shadow: 0 0 24px rgba(212, 175, 55, .18);
  transform: translateY(-4px);
}

/* ========== 我的作品 ========== */
.works-lead {
  font-family: var(--serif);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(22px, 3vw, 28px);
  color: var(--muted);
  margin: -40px 0 64px;
}
.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.work-card {
  --rx: 0deg; --ry: 0deg; --lift: 0px;
  --mx: 50%; --my: 50%;
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  border: 1px solid var(--line);
  overflow: hidden;
  isolation: isolate;
}
/* 覆盖通用渐显：出现后使用 3D 倾斜 + 上浮 */
.work-card.reveal.visible {
  transform: perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry)) translateY(var(--lift));
  transition: opacity 1.2s var(--ease), filter 1.2s var(--ease),
              transform .6s var(--ease), border-color .6s, box-shadow .6s;
}
/* 顶部金线 */
.work-card::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gold-grad);
  transform: scaleX(0);
  transition: transform .8s var(--ease);
  z-index: 3;
}
/* 跟随鼠标的金色聚光 */
.work-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(212, 175, 55, .14), transparent 45%);
  opacity: 0;
  transition: opacity .5s;
  z-index: 0;
  pointer-events: none;
}
/* 划过的光泽 */
.card-shine {
  position: absolute;
  top: -50%; left: -120%;
  width: 60%; height: 200%;
  background: linear-gradient(105deg, transparent 30%, rgba(248, 234, 184, .12) 50%, transparent 70%);
  transform: rotate(8deg);
  z-index: 2;
  pointer-events: none;
}

.work-card:hover {
  --lift: -12px;
  border-color: rgba(212, 175, 55, .55);
  box-shadow: 0 30px 60px -20px var(--shadow-deep), 0 0 50px -10px rgba(212, 175, 55, .3);
}
.work-card:hover::after { transform: scaleX(1); }
.work-card:hover::before { opacity: 1; }
.work-card:hover .card-shine { left: 160%; transition: left 1.1s var(--ease); }

/* 卡片图形区（纯 CSS 绘制） */
.card-art {
  position: relative;
  height: 210px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  z-index: 1;
  background: radial-gradient(circle at 50% 60%, rgba(212, 175, 55, .1), transparent 65%);
  transition: background .6s;
}
.card-art > * { position: absolute; transition: transform 1s var(--ease), opacity .6s, height .8s var(--ease); }

/* 图形 1：轨道 */
.art-orbit span {
  top: 50%; left: 50%;
  border: 1px solid rgba(212, 175, 55, .35);
  border-radius: 50%;
  translate: -50% -50%;
  animation: spin2 18s linear infinite;
}
.art-orbit span:nth-child(1) { width: 70px; height: 70px; }
.art-orbit span:nth-child(2) { width: 120px; height: 120px; border-style: dashed; animation-direction: reverse; animation-duration: 26s; }
.art-orbit span:nth-child(3) { width: 170px; height: 170px; border-color: rgba(212, 175, 55, .15); }
.art-orbit span:nth-child(3)::after {
  content: "";
  position: absolute;
  top: -3px; left: 50%;
  width: 6px; height: 6px;
  background: var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--gold);
}
.art-orbit i {
  top: 50%; left: 50%;
  width: 14px; height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: var(--gold-grad);
  box-shadow: 0 0 24px 4px rgba(212, 175, 55, .5);
}
@keyframes spin2 { to { rotate: 360deg; } }
.work-card:hover .art-orbit span:nth-child(1) { transform: scale(1.25); }
.work-card:hover .art-orbit span:nth-child(2) { transform: scale(1.12); }
.work-card:hover .art-orbit i { transform: scale(1.5); }

/* 图形 2：柱状图 */
.art-bars {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 12px;
  padding-bottom: 36px;
}
.art-bars span {
  position: relative;
  width: 14px;
  background: linear-gradient(to top, rgba(212, 175, 55, .15), var(--gold));
  transition: height .8s var(--ease);
}
.art-bars span:nth-child(1) { height: 40px; }
.art-bars span:nth-child(2) { height: 75px; }
.art-bars span:nth-child(3) { height: 55px; }
.art-bars span:nth-child(4) { height: 110px; }
.art-bars span:nth-child(5) { height: 80px; }
.art-bars span:nth-child(6) { height: 125px; }
.art-bars span:nth-child(7) { height: 95px; }
.work-card:hover .art-bars span:nth-child(1) { height: 70px; }
.work-card:hover .art-bars span:nth-child(2) { height: 50px; }
.work-card:hover .art-bars span:nth-child(3) { height: 100px; }
.work-card:hover .art-bars span:nth-child(4) { height: 80px; }
.work-card:hover .art-bars span:nth-child(5) { height: 130px; }
.work-card:hover .art-bars span:nth-child(6) { height: 105px; }
.work-card:hover .art-bars span:nth-child(7) { height: 145px; }
.art-bars span:nth-child(2) { transition-delay: .04s; }
.art-bars span:nth-child(3) { transition-delay: .08s; }
.art-bars span:nth-child(4) { transition-delay: .12s; }
.art-bars span:nth-child(5) { transition-delay: .16s; }
.art-bars span:nth-child(6) { transition-delay: .2s; }
.art-bars span:nth-child(7) { transition-delay: .24s; }

/* 图形 3：钻石 */
.art-diamond span {
  top: 50%; left: 50%;
  border: 1px solid rgba(212, 175, 55, .45);
  translate: -50% -50%;
  transform: rotate(45deg);
}
.art-diamond span:nth-child(1) { width: 130px; height: 130px; border-color: rgba(212, 175, 55, .15); }
.art-diamond span:nth-child(2) { width: 90px; height: 90px; }
.art-diamond span:nth-child(3) {
  width: 44px; height: 44px;
  background: var(--gold-grad);
  background-size: 200% auto;
  border: none;
  box-shadow: 0 0 30px rgba(212, 175, 55, .45);
  animation: shimmer 3s linear infinite;
}
.work-card:hover .art-diamond span:nth-child(1) { transform: rotate(135deg) scale(1.1); }
.work-card:hover .art-diamond span:nth-child(2) { transform: rotate(-45deg) scale(1.15); }
.work-card:hover .art-diamond span:nth-child(3) { transform: rotate(225deg) scale(1.2); }

.work-card:hover .card-art { background: radial-gradient(circle at 50% 60%, rgba(212, 175, 55, .2), transparent 70%); }

/* 卡片文字区 */
.card-body {
  position: relative;
  z-index: 1;
  padding: 30px 28px 32px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card-no {
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: .25em;
  color: var(--gold);
  margin-bottom: 10px;
}
.card-body h3 {
  font-size: 20px;
  font-weight: 400;
  letter-spacing: .1em;
  margin-bottom: 14px;
  transition: color .4s;
}
.work-card:hover h3 { color: var(--gold-light); }
.card-body p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.85;
  margin-bottom: 22px;
  flex: 1;
}
.card-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.card-tags span {
  font-size: 11px;
  letter-spacing: .1em;
  padding: 4px 12px;
  border: 1px solid var(--line);
  color: var(--text);
}
.card-link {
  font-size: 12px;
  letter-spacing: .25em;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  align-self: flex-start;
}
.card-link em { font-style: normal; transition: transform .5s var(--ease); }
.work-card:hover .card-link em { transform: translateX(8px); }

/* ========== 联系方式 ========== */
.contact { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%); }
.contact-lead {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(30px, 4.5vw, 46px);
  margin-bottom: 64px;
}
.contact-lead::after {
  content: " ✦";
  color: var(--gold);
  font-size: .6em;
  vertical-align: middle;
}
.contact-item {
  display: grid;
  grid-template-columns: 130px 1fr auto;
  align-items: center;
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
  position: relative;
  transition: padding-left .5s var(--ease);
}
.contact-item:first-child { border-top: 1px solid var(--line); }
.contact-item::after {
  content: "";
  position: absolute;
  left: 0; bottom: -1px;
  width: 100%; height: 1px;
  background: var(--gold-grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .7s var(--ease);
}
.contact-item:hover { padding-left: 16px; }
.contact-item:hover::after { transform: scaleX(1); }
.contact-item .label { font-size: 11px; letter-spacing: .3em; color: var(--gold); text-transform: uppercase; }
.contact-item .value { font-size: 19px; word-break: break-all; transition: color .4s; }
.contact-item:hover .value { color: var(--gold-light); }
.copy {
  background: none;
  border: 1px solid var(--line);
  padding: 7px 18px;
  font-size: 12px;
  letter-spacing: .15em;
  font-family: inherit;
  color: var(--muted);
  cursor: pointer;
  transition: all .4s var(--ease);
}
.copy:hover { border-color: var(--gold); color: #0a0a0a; background: var(--gold); }

/* ========== 页脚 ========== */
.footer {
  text-align: center;
  padding: 50px 0;
  font-size: 12px;
  letter-spacing: .2em;
  color: var(--muted);
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  position: relative;
  z-index: 2;
}

/* ========== 提示 ========== */
.toast {
  position: fixed;
  bottom: 36px; left: 50%;
  transform: translate(-50%, 24px);
  background: var(--solid-bg);
  color: var(--gold-light);
  border: 1px solid var(--gold);
  padding: 13px 30px;
  font-size: 13px;
  letter-spacing: .15em;
  opacity: 0;
  pointer-events: none;
  z-index: 300;
  box-shadow: 0 10px 40px rgba(212, 175, 55, .2);
  transition: all .5s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ========== 滚动渐显动画 ========== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  filter: blur(6px);
  transition: opacity 1.2s var(--ease), transform 1.2s var(--ease), filter 1.2s var(--ease);
}
.reveal.visible { opacity: 1; transform: none; filter: blur(0); }

/* ========== 响应式（手机） ========== */
@media (max-width: 720px) {
  .nav, .nav.scrolled { padding: 18px 20px; }
  .nav nav { gap: 20px; }
  .nav-right { gap: 18px; }
  .nav-link { font-size: 12px; letter-spacing: .1em; }
  .container { padding: 0 20px; }
  .section { padding: 110px 0; }
  .about-grid { grid-template-columns: 1fr; gap: 50px; }
  .lead { font-size: 23px; }
  .contact-item { grid-template-columns: 1fr auto; gap: 6px 12px; }
  .contact-item .label { grid-column: 1 / -1; }
  .contact-item .value { font-size: 16px; }
  .cursor-glow { display: none; }
  .works-lead { margin: -40px 0 44px; }
  .works-grid { grid-template-columns: 1fr; gap: 24px; }
  .card-art { height: 180px; }
}

/* 平板：两列 */
@media (min-width: 721px) and (max-width: 960px) {
  .works-grid { grid-template-columns: repeat(2, 1fr); }
}

/* 小屏手机：导航更紧凑 */
@media (max-width: 420px) {
  .logo { font-size: 18px; letter-spacing: .12em; }
  .nav nav { gap: 14px; }
  .nav-right { gap: 12px; }
  .theme-toggle { width: 34px; height: 34px; }
  .theme-toggle svg { width: 16px; height: 16px; margin: -8px 0 0 -8px; }
  .nav-link { font-size: 11px; letter-spacing: .05em; }
}

/* 触屏设备没有悬停：直接展示卡片的高亮状态 */
@media (hover: none) {
  .work-card::after { transform: scaleX(1); }
}

/* 尊重系统「减少动态效果」设置 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .hero-title .char, .facts li, .skills span, .work-card { opacity: 1; transform: none !important; filter: none; }
}

/* ==========================================================
   作品卡片：点击交互
   ========================================================== */
.work-card { cursor: pointer; }
.work-card:focus { outline: none; }
.work-card:focus-visible {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold), 0 0 40px -6px rgba(212, 175, 55, .45);
}
/* 按下时轻微回弹 */
.work-card.reveal.visible:active {
  transform: perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry)) translateY(-6px) scale(.975);
  transition-duration: .15s;
}
/* 「查看详情」悬停时出现金色下划线 */
.card-link { position: relative; padding-bottom: 4px; }
.card-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .6s var(--ease);
}
.work-card:hover .card-link::after,
.work-card:focus-visible .card-link::after { transform: scaleX(1); }

/* ==========================================================
   作品详情弹窗
   ========================================================== */
body.modal-open { overflow: hidden; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  visibility: hidden;
  transition: visibility 0s linear .6s;
}
.modal.open { visibility: visible; transition: visibility 0s; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: var(--backdrop);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity .6s var(--ease);
}
.modal.open .modal-backdrop { opacity: 1; }

.modal-panel {
  position: relative;
  width: min(760px, 100%);
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--modal-bg);
  border: 1px solid rgba(212, 175, 55, .35);
  box-shadow: 0 40px 100px -20px var(--shadow-deep), 0 0 80px -20px rgba(212, 175, 55, .3);
  opacity: 0;
  transform: translateY(50px) scale(.94);
  transition: opacity .6s var(--ease), transform .7s var(--ease);
  scrollbar-width: thin;
  scrollbar-color: var(--gold-dark) transparent;
}
.modal.open .modal-panel { opacity: 1; transform: none; }
/* 顶部金线 */
.modal-panel::before {
  content: "";
  position: sticky;
  top: 0;
  display: block;
  height: 2px;
  margin-bottom: -2px;
  background: var(--gold-grad);
  background-size: 200% auto;
  animation: shimmer 3s linear infinite;
  z-index: 3;
}

/* 关闭按钮：两条金线组成的 X，悬停旋转 */
.modal-close {
  position: absolute;
  top: 18px; right: 18px;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--close-bg);
  backdrop-filter: blur(6px);
  cursor: pointer;
  z-index: 4;
  transition: transform .6s var(--ease), border-color .4s, background .4s;
}
.modal-close span {
  position: absolute;
  top: 50%; left: 50%;
  width: 16px; height: 1px;
  background: var(--gold-light);
  transition: background .4s;
}
.modal-close span:first-child { transform: translate(-50%, -50%) rotate(45deg); }
.modal-close span:last-child { transform: translate(-50%, -50%) rotate(-45deg); }
.modal-close:hover { transform: rotate(90deg); border-color: var(--gold); background: var(--gold); }
.modal-close:hover span { background: #0a0a0a; }

/* 弹窗顶部大图形 */
.modal-art { height: 260px; }
.modal-art.art-orbit span:nth-child(1) { width: 90px; height: 90px; }
.modal-art.art-orbit span:nth-child(2) { width: 160px; height: 160px; }
.modal-art.art-orbit span:nth-child(3) { width: 230px; height: 230px; }
.modal-art.art-bars { gap: 16px; padding-bottom: 44px; }
.modal-art.art-bars span { width: 18px; transform-origin: bottom; animation: grow 1s var(--ease) both; }
.modal-art.art-bars span:nth-child(n) { transition-delay: 0s; }
.modal-art.art-bars span:nth-child(1) { height: 60px;  animation-delay: .25s; }
.modal-art.art-bars span:nth-child(2) { height: 100px; animation-delay: .32s; }
.modal-art.art-bars span:nth-child(3) { height: 80px;  animation-delay: .39s; }
.modal-art.art-bars span:nth-child(4) { height: 140px; animation-delay: .46s; }
.modal-art.art-bars span:nth-child(5) { height: 115px; animation-delay: .53s; }
.modal-art.art-bars span:nth-child(6) { height: 170px; animation-delay: .6s; }
.modal-art.art-bars span:nth-child(7) { height: 130px; animation-delay: .67s; }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.modal-art.art-diamond span:nth-child(1) { width: 170px; height: 170px; animation: turn 24s linear infinite; }
.modal-art.art-diamond span:nth-child(2) { width: 118px; height: 118px; animation: turn 16s linear infinite reverse; }
.modal-art.art-diamond span:nth-child(3) { width: 58px; height: 58px; }
@keyframes turn { from { transform: rotate(45deg); } to { transform: rotate(405deg); } }

/* 弹窗文字 */
.modal-body { padding: 40px 48px 44px; }
.modal-body h3 {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 400;
  letter-spacing: .08em;
  line-height: 1.3;
  margin-bottom: 6px;
  color: var(--gold-light);
}
.modal-sub { font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--muted); margin-bottom: 30px; }
.modal-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 30px;
}
.modal-meta div { padding: 16px 0; }
.modal-meta div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.modal-meta span { display: block; font-size: 11px; letter-spacing: .25em; color: var(--gold); margin-bottom: 4px; }
.modal-meta strong { font-weight: 400; font-size: 14px; }
.modal-desc { color: var(--desc); font-size: 15px; line-height: 1.95; margin-bottom: 30px; }
.modal-body h4 { font-size: 13px; font-weight: 400; letter-spacing: .3em; color: var(--gold); margin-bottom: 14px; }
.modal-list { list-style: none; margin-bottom: 30px; }
.modal-list li { position: relative; padding: 8px 0 8px 24px; font-size: 14px; color: var(--text); }
.modal-list li::before {
  content: "";
  position: absolute;
  left: 2px; top: 17px;
  width: 6px; height: 6px;
  background: var(--gold);
  transform: rotate(45deg);
}
.modal-body .card-tags { margin-bottom: 36px; }

.modal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.modal-count { font-family: var(--display); font-size: 13px; letter-spacing: .25em; color: var(--muted); }
.modal-btn {
  background: none;
  border: 1px solid var(--line);
  color: var(--gold-light);
  font-family: inherit;
  font-size: 12px;
  letter-spacing: .2em;
  padding: 10px 20px;
  cursor: pointer;
  transition: all .4s var(--ease);
}
.modal-btn:hover { border-color: var(--gold); background: var(--gold); color: #0a0a0a; }

/* 内容依次浮现 */
.m-item { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.modal.open .m-item { opacity: 1; transform: none; }
.modal.open .m-item:nth-child(1) { transition-delay: .2s; }
.modal.open .m-item:nth-child(2) { transition-delay: .26s; }
.modal.open .m-item:nth-child(3) { transition-delay: .32s; }
.modal.open .m-item:nth-child(4) { transition-delay: .38s; }
.modal.open .m-item:nth-child(5) { transition-delay: .44s; }
.modal.open .m-item:nth-child(6) { transition-delay: .5s; }
.modal.open .m-item:nth-child(7) { transition-delay: .56s; }
.modal.open .m-item:nth-child(8) { transition-delay: .62s; }
.modal.open .m-item:nth-child(9) { transition-delay: .68s; }
/* 切换上一个/下一个时的淡入淡出 */
.modal-panel.switching .modal-body,
.modal-panel.switching .modal-art > * { opacity: 0; transition: opacity .25s; }
.modal-body { transition: opacity .35s var(--ease); }

/* 手机：从底部滑出的面板 */
@media (max-width: 720px) {
  .modal { align-items: flex-end; padding: 0; }
  .modal-panel {
    width: 100%;
    max-height: 90vh;
    max-height: 90dvh;
    transform: translateY(100%);
    border-left: none; border-right: none; border-bottom: none;
  }
  .modal-close { top: 14px; right: 14px; width: 40px; height: 40px; }
  .modal-art { height: 190px; }
  .modal-art.art-orbit span:nth-child(3) { width: 180px; height: 180px; }
  .modal-art.art-bars span { width: 14px; }
  .modal-body { padding: 28px 22px calc(32px + env(safe-area-inset-bottom)); }
  .modal-meta { grid-template-columns: 1fr; }
  .modal-meta div { padding: 12px 0; display: flex; justify-content: space-between; align-items: baseline; }
  .modal-meta div + div { padding-left: 0; border-left: none; border-top: 1px solid var(--line); }
  .modal-meta span { margin-bottom: 0; }
  .modal-btn { padding: 10px 14px; letter-spacing: .1em; }
}

@media (prefers-reduced-motion: reduce) {
  .modal-panel, .m-item { transform: none !important; }
}

/* 不支持圆形扩散的浏览器：颜色柔和渐变过渡 */
html.theme-fade, html.theme-fade *, html.theme-fade *::before, html.theme-fade *::after {
  transition: background-color .6s, color .6s, border-color .6s, fill .6s !important;
}

/* ==========================================================
   「联系我」按钮 & 联系方式面板
   ========================================================== */
/* 首页按钮组 */
.hero-actions { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
button.btn { font-family: inherit; background: transparent; cursor: pointer; }
/* 实心金色按钮：常亮金色，悬停时上浮 + 光泽划过 */
.btn-solid { color: #0a0a0a; font-weight: 400; }
.btn-solid::before { transform: scaleX(1); }
.btn-solid::after {
  content: "";
  position: absolute;
  top: 0; left: -80%;
  width: 50%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: skewX(-20deg);
}
.btn-solid:hover { color: #0a0a0a; box-shadow: 0 10px 40px rgba(212, 175, 55, .45); }
.btn-solid:hover::after { left: 130%; transition: left .9s var(--ease); }

/* 悬浮按钮容器（右下角） */
.contact-fab-wrap {
  position: fixed;
  right: 28px;
  bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  z-index: 400;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
  pointer-events: none;
}
.contact-fab-wrap > * { pointer-events: auto; }

.contact-fab {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 24px 0 17px;
  border-radius: 999px;
  border: 1px solid var(--gold);
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--gold-light);
  font-family: inherit;
  font-size: 13px;
  letter-spacing: .2em;
  cursor: pointer;
  box-shadow: 0 12px 34px -10px var(--shadow-deep), 0 0 26px -6px rgba(212, 175, 55, .35);
  transition: opacity .5s var(--ease), transform .6s var(--ease), padding .5s var(--ease),
              gap .5s var(--ease), background .4s, color .4s, box-shadow .4s;
}
.contact-fab:hover {
  background: var(--gold);
  color: #0a0a0a;
  box-shadow: 0 14px 40px -8px rgba(212, 175, 55, .55);
  transform: translateY(-3px);
}
/* 呼吸光圈，吸引注意 */
.contact-fab::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  border: 1px solid var(--gold);
  animation: ping 3s var(--ease) infinite;
  pointer-events: none;
}
@keyframes ping {
  0% { transform: scale(1); opacity: .7; }
  70%, 100% { transform: scale(1.35, 1.6); opacity: 0; }
}
.fab-icon { width: 20px; height: 20px; flex-shrink: 0; transition: transform .6s var(--ease), opacity .4s; }
.fab-close { position: absolute; left: 16px; top: 50%; margin-top: -10px; opacity: 0; transform: rotate(-90deg) scale(.5); }
.fab-label {
  max-width: 90px;
  overflow: hidden;
  white-space: nowrap;
  transition: max-width .5s var(--ease), opacity .4s;
}

/* 未到显示时机：隐藏悬浮按钮 */
.contact-fab-wrap.fab-hidden .contact-fab {
  opacity: 0;
  transform: translateY(24px) scale(.85);
  pointer-events: none;
}
body.modal-open .contact-fab-wrap { opacity: 0; pointer-events: none; }
body.modal-open .contact-fab-wrap > * { pointer-events: none; }

/* 打开状态：按钮收成圆形，信封变成 × */
.contact-fab-wrap.open .contact-fab { padding: 0 15px; gap: 0; }
.contact-fab-wrap.open .contact-fab::before { animation: none; opacity: 0; }
.contact-fab-wrap.open .fab-label { max-width: 0; opacity: 0; }
.contact-fab-wrap.open .fab-mail { opacity: 0; transform: rotate(90deg) scale(.5); }
.contact-fab-wrap.open .fab-close { opacity: 1; transform: none; }
.contact-fab-wrap.open .contact-fab:hover { transform: rotate(90deg); }

/* 联系方式面板：从按钮处以圆形展开 */
.contact-panel {
  position: relative;
  width: 370px;
  max-width: calc(100vw - 40px);
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  padding: 30px 28px 26px;
  background: var(--modal-bg);
  border: 1px solid rgba(212, 175, 55, .38);
  box-shadow: 0 30px 80px -20px var(--shadow-deep), 0 0 60px -20px rgba(212, 175, 55, .35);
  transform-origin: 100% 100%;
  clip-path: circle(0% at 100% 100%);
  opacity: 0;
  transform: translateY(14px) scale(.96);
  visibility: hidden;
  transition: clip-path .75s var(--ease), opacity .45s var(--ease), transform .75s var(--ease), visibility 0s linear .75s;
}
.contact-panel::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gold-grad);
  background-size: 200% auto;
  animation: shimmer 3s linear infinite;
}
.contact-fab-wrap.open .contact-panel {
  clip-path: circle(150% at 100% 100%);
  opacity: 1;
  transform: none;
  visibility: visible;
  transition: clip-path .8s var(--ease), opacity .4s var(--ease), transform .8s var(--ease), visibility 0s;
}

.cp-head h3 {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 400;
  letter-spacing: .12em;
  color: var(--gold-light);
  margin: 4px 0 6px;
}
.cp-head h3::after { content: " ✦"; color: var(--gold); font-size: .5em; vertical-align: middle; }
.cp-head p { font-size: 13px; color: var(--muted); margin-bottom: 18px; }

/* 面板里的联系方式条目（复用原样式，改为紧凑布局） */
.contact-panel .contact-item {
  grid-template-columns: 1fr auto;
  gap: 2px 12px;
  padding: 16px 0;
}
.contact-panel .contact-item:hover { padding-left: 8px; }
.contact-panel .contact-item .label { grid-column: 1 / -1; font-size: 10px; }
.contact-panel .contact-item .value { font-size: 15px; }

.cp-more {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  font-size: 12px;
  letter-spacing: .2em;
  color: var(--gold);
}
.cp-more em { font-style: normal; transition: transform .5s var(--ease); }
.cp-more:hover em { transform: translateX(6px); }

/* 面板内容依次浮现（延迟由 JS 设置） */
.cp-item { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease), padding .5s var(--ease); }
.contact-fab-wrap.open .cp-item { opacity: 1; transform: none; }

/* 复制提示要显示在面板之上 */
.toast { z-index: 700; }

/* 手机 */
@media (max-width: 720px) {
  .hero-actions { gap: 12px; }
  .hero-actions .btn { padding: 14px 32px; }
  .contact-fab-wrap { right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
  .contact-fab { height: 48px; padding: 0 20px 0 15px; }
  .contact-fab-wrap.open .contact-fab { padding: 0 13px; }
  .fab-close { left: 14px; }
  .contact-panel { width: calc(100vw - 32px); max-width: none; max-height: calc(100dvh - 110px); padding: 26px 22px 22px; }
}

/* ==========================================================
   我的技能
   ========================================================== */
.skill-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.skill-card {
  --p: 0;               /* 熟练度 0~1，由 JS 根据 data-level 设置 */
  --lift: 0px;
  --mx: 50%; --my: 50%;
  position: relative;
  padding: 36px 22px 30px;
  text-align: center;
  background: var(--card-bg);
  border: 1px solid var(--line);
  overflow: hidden;
  isolation: isolate;
}
.skill-card.reveal.visible {
  transform: translateY(var(--lift));
  transition: opacity 1.2s var(--ease), filter 1.2s var(--ease),
              transform .6s var(--ease), border-color .6s, box-shadow .6s;
}
/* 顶部金线 */
.skill-card::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gold-grad);
  transform: scaleX(0);
  transition: transform .8s var(--ease);
}
/* 跟随鼠标的金色聚光 */
.skill-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(260px circle at var(--mx) var(--my), rgba(212, 175, 55, .16), transparent 60%);
  opacity: 0;
  transition: opacity .5s;
}

/* 圆环 */
.skill-ring {
  position: relative;
  width: 112px; height: 112px;
  margin: 0 auto 22px;
}
.skill-ring svg {
  width: 100%; height: 100%;
  transform: rotate(-90deg);
  overflow: visible;
  transition: transform 1.2s var(--ease), filter .6s;
}
.skill-ring circle { fill: none; }
.ring-orbit {
  stroke: var(--line);
  stroke-width: 1;
  stroke-dasharray: 2 6;
  transform-origin: 50% 50%;
  animation: spin3 30s linear infinite;
  transition: stroke .6s;
}
@keyframes spin3 { to { transform: rotate(360deg); } }
.ring-bg { stroke: var(--line); stroke-width: 3; }
.ring-fg {
  stroke: url(#skillGold);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 263.9;
  stroke-dashoffset: 263.9;
  transition: stroke-dashoffset 1.8s var(--ease), stroke-width .5s var(--ease);
}
.skill-card.counted .ring-fg { stroke-dashoffset: calc(263.9 * (1 - var(--p))); }

.skill-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 24px;
  font-weight: 500;
  letter-spacing: .02em;
  background: var(--gold-grad);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 4s linear infinite;
  transition: transform .6s var(--ease), filter .6s;
}

.skill-card h3 {
  font-size: 17px;
  font-weight: 400;
  letter-spacing: .12em;
  margin-bottom: 2px;
  transition: color .4s;
}
.skill-level {
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: .15em;
  color: var(--gold);
  margin-bottom: 14px;
  transition: text-shadow .5s;
}
.skill-desc {
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
  min-height: 3.6em;
  margin-bottom: 20px;
}
/* 底部进度条 */
.skill-bar {
  position: relative;
  height: 2px;
  background: var(--line);
  overflow: hidden;
}
.skill-bar span {
  position: absolute;
  inset: 0;
  background: var(--gold-grad);
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 1.8s var(--ease) .2s;
}
.skill-card.counted .skill-bar span { transform: scaleX(var(--p)); }
.skill-bar::after {
  content: "";
  position: absolute;
  top: 0; left: -40%;
  width: 40%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 248, 220, .9), transparent);
  opacity: 0;
}

/* —— 悬停动画 —— */
.skill-card:hover {
  --lift: -10px;
  border-color: rgba(212, 175, 55, .55);
  box-shadow: 0 26px 50px -20px var(--shadow-deep), 0 0 40px -10px rgba(212, 175, 55, .35);
}
.skill-card:hover::after { transform: scaleX(1); }
.skill-card:hover::before { opacity: 1; }
.skill-card:hover .skill-ring svg { transform: rotate(270deg); filter: drop-shadow(0 0 8px rgba(212, 175, 55, .55)); }
.skill-card:hover .ring-fg { stroke-width: 4.5; }
.skill-card:hover .ring-orbit { stroke: rgba(212, 175, 55, .6); }
.skill-card:hover .skill-icon { transform: scale(1.18); filter: drop-shadow(0 0 10px rgba(212, 175, 55, .5)); }
.skill-card:hover h3 { color: var(--gold-light); }
.skill-card:hover .skill-level { text-shadow: 0 0 14px rgba(212, 175, 55, .7); }
.skill-card:hover .skill-bar::after { opacity: 1; animation: barShine 1.4s var(--ease) infinite; }
@keyframes barShine { to { left: 110%; } }

/* —— 响应式 —— */
@media (max-width: 960px) {
  .skill-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .skill-grid { gap: 14px; }
  .skill-card { padding: 28px 14px 22px; }
  .skill-ring { width: 92px; height: 92px; margin-bottom: 16px; }
  .skill-icon { font-size: 20px; }
  .skill-card h3 { font-size: 15px; letter-spacing: .06em; }
  .skill-desc { font-size: 12px; }
}
@media (max-width: 420px) {
  .nav nav { gap: 10px; }
  .nav-right { gap: 10px; }
}
@media (max-width: 360px) {
  .skill-grid { grid-template-columns: 1fr; }
  .nav-link { font-size: 10px; letter-spacing: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .skill-card { transform: none !important; }
}

/* ==========================================================
   待办事项
   ========================================================== */
.todo-box {
  max-width: 720px;
  padding: 40px 40px 32px;
  background: var(--card-bg);
  border: 1px solid var(--line);
  position: relative;
}
.todo-box::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gold-grad);
}

/* 输入框 + 添加按钮 */
.todo-form { display: flex; gap: 16px; align-items: stretch; }
.todo-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  padding: 12px 2px;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 300;
  color: var(--text);
  outline: none;
  transition: border-color .4s var(--ease);
}
.todo-input::placeholder { color: var(--muted); }
.todo-input:focus { border-bottom-color: var(--gold); }
.todo-input.shake { animation: todoShake .4s var(--ease); border-bottom-color: var(--gold); }
@keyframes todoShake {
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}
.todo-add { padding: 12px 34px; flex-shrink: 0; }

.todo-meta {
  margin: 26px 0 6px;
  min-height: 1.8em;
  font-size: 11px;
  letter-spacing: .25em;
  color: var(--gold);
}

/* 列表 */
.todo-list { list-style: none; }
.todo-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  transition: opacity .45s var(--ease), transform .45s var(--ease),
              height .45s var(--ease), padding .45s var(--ease), border-color .45s;
}
.todo-item.entering { opacity: 0; transform: translateY(12px); }
.todo-item.removing { opacity: 0; transform: translateX(40px); height: 0 !important; padding: 0; border-color: transparent; }

/* 自定义勾选框 */
.todo-check { position: relative; width: 22px; height: 22px; cursor: pointer; }
.todo-check input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.todo-box-mark {
  position: absolute;
  inset: 0;
  border: 1px solid var(--gold);
  transform: rotate(45deg) scale(.78);
  transition: background .35s var(--ease), box-shadow .35s;
  pointer-events: none;
}
.todo-box-mark::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 6px; height: 11px;
  border: solid #0a0a0a;
  border-width: 0 2px 2px 0;
  transform: translate(-50%, -60%) scale(0);
  transition: transform .35s var(--ease);
}
.todo-check:hover .todo-box-mark { box-shadow: 0 0 14px rgba(212, 175, 55, .45); }
.todo-check input:focus-visible + .todo-box-mark { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--gold); }
.todo-item.done .todo-box-mark { background: var(--gold-grad); background-size: 200% auto; }
.todo-item.done .todo-box-mark::after { transform: translate(-50%, -60%) scale(1); }

.todo-text {
  font-size: 16px;
  word-break: break-word;
  position: relative;
  transition: color .4s;
  justify-self: start;
}
.todo-text::after {
  content: "";
  position: absolute;
  left: 0; top: 52%;
  width: 100%; height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .5s var(--ease);
}
.todo-item.done .todo-text { color: var(--muted); }
.todo-item.done .todo-text::after { transform: scaleX(1); }

/* 删除按钮（×） */
.todo-del {
  position: relative;
  width: 32px; height: 32px;
  background: none;
  border: 1px solid transparent;
  cursor: pointer;
  opacity: .5;
  transition: opacity .3s, border-color .3s, transform .4s var(--ease);
}
.todo-del span {
  position: absolute;
  left: 50%; top: 50%;
  width: 14px; height: 1px;
  background: var(--text);
  transform: translate(-50%, -50%) rotate(45deg);
}
.todo-del span + span { transform: translate(-50%, -50%) rotate(-45deg); }
.todo-item:hover .todo-del, .todo-del:focus-visible { opacity: 1; }
.todo-del:hover { border-color: var(--gold); transform: rotate(90deg); }
.todo-del:hover span { background: var(--gold); }
.todo-del:focus-visible { outline: 1px solid var(--gold); outline-offset: 2px; }

.todo-empty {
  padding: 28px 0 8px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 19px;
  color: var(--muted);
}

@media (hover: none) {
  .todo-del { opacity: .8; }
}
@media (max-width: 720px) {
  .todo-box { padding: 28px 20px 22px; }
  .todo-form { gap: 12px; }
  .todo-add { padding: 12px 22px; letter-spacing: .2em; }
  .todo-item { gap: 14px; padding: 16px 0; }
  .todo-text { font-size: 15px; }
}
@media (max-width: 360px) {
  .todo-form { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  .todo-item.entering { opacity: 1; transform: none; }
}

/* ==========================================================
   私人留言板
   ========================================================== */
/* 导航入口：锁形图标 + 文字 */
button.nav-link {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-weight: inherit;
  cursor: pointer;
  line-height: inherit;
}
.nav-gb { display: inline-flex; align-items: center; gap: 7px; color: var(--gold); }
.nav-gb-icon { width: 15px; height: 15px; flex-shrink: 0; transition: transform .5s var(--ease); }
.nav-gb:hover .nav-gb-icon { transform: translateY(-2px); }
.nav-gb:focus-visible { outline: 1px solid var(--gold); outline-offset: 6px; }

/* 面板尺寸：锁定界面窄一些，留言板宽一些 */
.gb-panel { width: min(520px, 100%); transition: opacity .6s var(--ease), transform .7s var(--ease), width .6s var(--ease); }
.gb-panel.is-board { width: min(760px, 100%); }
.gb-view { padding: 64px 56px 48px; }
.gb-view[hidden] { display: none; }

/* 内容依次浮现 */
.gb .gb-item { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.gb.open .gb-item { opacity: 1; transform: none; }
.gb.open .gb-item:nth-child(2) { transition-delay: .18s; }
.gb.open .gb-item:nth-child(3) { transition-delay: .24s; }
.gb.open .gb-item:nth-child(4) { transition-delay: .3s; }
.gb.open .gb-item:nth-child(5) { transition-delay: .36s; }
.gb.open .gb-item:nth-child(6) { transition-delay: .42s; }
.gb.open .gb-item:nth-child(7) { transition-delay: .48s; }

/* ① 锁定界面 */
.gb-lock { text-align: center; }
.gb-emblem {
  position: relative;
  width: 132px; height: 132px;
  margin: 0 auto 30px;
  display: grid;
  place-items: center;
}
.gb-orbit {
  position: absolute;
  inset: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
}
.gb-orbit::after {
  content: "";
  position: absolute;
  top: -3px; left: 50%;
  width: 6px; height: 6px;
  margin-left: -3px;
  background: var(--gold);
  transform: rotate(45deg);
  box-shadow: 0 0 12px rgba(212, 175, 55, .8);
}
.gb-orbit { animation: spinFree 14s linear infinite; }
.gb-orbit-2 { inset: 16px; border-style: dashed; border-color: rgba(212, 175, 55, .28); animation-duration: 22s; animation-direction: reverse; }
.gb-orbit-2::after { display: none; }
@keyframes spinFree { to { transform: rotate(360deg); } }

.gb-emblem svg { width: 64px; height: 64px; position: relative; filter: drop-shadow(0 0 14px rgba(212, 175, 55, .35)); }
.gb-emblem svg * { stroke: var(--gold); stroke-width: 1.6; }
.gb-body { fill: rgba(212, 175, 55, .08); }
.gb-keyhole-dot { fill: var(--gold); stroke: none !important; }
.gb-shackle { transform-origin: 42px 29px; transition: transform .7s var(--ease); }
.gb-emblem.unlocking .gb-shackle { transform: translateY(-5px) rotate(28deg); }
.gb-emblem.unlocking svg { animation: gbGlow .75s var(--ease); }
@keyframes gbGlow { 50% { filter: drop-shadow(0 0 26px rgba(243, 226, 169, .9)); } }

.gb-title {
  font-size: 26px;
  font-weight: 300;
  letter-spacing: .25em;
  margin: 10px 0 10px;
}
.gb-sub { font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--muted); margin-bottom: 34px; }

.gb-lock-form { display: flex; gap: 14px; text-align: left; }
.gb-pass { position: relative; flex: 1; min-width: 0; }
.gb-field {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  padding: 12px 2px;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 300;
  color: var(--text);
  outline: none;
  border-radius: 0;
  transition: border-color .4s var(--ease);
}
.gb-field::placeholder { color: var(--muted); }
.gb-field:focus { border-bottom-color: var(--gold); }
.gb-pass .gb-field { padding-right: 44px; letter-spacing: .12em; }
.gb-eye {
  position: absolute;
  right: 0; top: 50%;
  width: 38px; height: 38px;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: color .3s;
}
.gb-eye:hover, .gb-eye[aria-pressed="true"] { color: var(--gold); }
.gb-eye:focus-visible { outline: 1px solid var(--gold); }
.gb-eye svg { width: 19px; height: 19px; }
.gb-eye-slash { transition: opacity .3s; }
.gb-eye[aria-pressed="true"] .gb-eye-slash { opacity: 0; }

.gb-unlock { padding: 12px 34px; flex-shrink: 0; }
.gb-unlock:disabled { cursor: progress; opacity: .85; }
.gb-unlock.loading span::after { content: "…"; display: inline-block; animation: blink 1s steps(1) infinite; }

.gb-error { min-height: 1.8em; margin: 14px 0 6px; font-size: 13px; letter-spacing: .1em; color: #e0866b; }
:root[data-theme="light"] .gb-error { color: #b4502f; }
.gb-demo {
  margin-top: 18px;
  padding: 14px 18px;
  border: 1px dashed var(--line);
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
  text-align: left;
}
.gb-demo span {
  display: inline-block;
  margin-right: 10px;
  padding: 0 8px;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: 11px;
  letter-spacing: .15em;
}

.shake { animation: todoShake .4s var(--ease); }

/* ② 留言板 */
.gb-board { animation: fadeUp .6s var(--ease) both; }
.gb-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding-right: 40px;
  margin-bottom: 34px;
}
.gb-head .gb-title { margin-bottom: 0; }
.gb-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.gb-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background: none;
  border: 1px solid var(--line);
  color: var(--gold-light);
  font-family: inherit;
  font-size: 12px;
  letter-spacing: .15em;
  cursor: pointer;
  transition: all .4s var(--ease);
}
.gb-action svg { width: 15px; height: 15px; }
.gb-action:hover { border-color: var(--gold); background: var(--gold); color: #0a0a0a; }
.gb-action:focus-visible { outline: 1px solid var(--gold); outline-offset: 2px; }

.gb-compose {
  padding: 26px 28px 24px;
  border: 1px solid var(--line);
  background: rgba(212, 175, 55, .03);
  margin-bottom: 40px;
}
.gb-label { display: block; font-size: 11px; letter-spacing: .3em; color: var(--gold); margin-top: 4px; }
.gb-label + .gb-field { margin-bottom: 18px; }
.gb-textarea { resize: vertical; min-height: 84px; line-height: 1.8; }
.gb-compose-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.gb-count { font-size: 12px; letter-spacing: .1em; color: var(--muted); }
.gb-send { padding: 12px 32px; }

.gb-list-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  letter-spacing: .25em;
  color: var(--gold);
}
.gb-local { font-size: 11px; letter-spacing: .1em; color: var(--muted); }
.gb-list { list-style: none; }
.gb-msg {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.gb-msg.entering { opacity: 0; transform: translateY(-12px); }
.gb-avatar {
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold);
  transform: rotate(45deg) scale(.82);
  background: rgba(212, 175, 55, .07);
}
.gb-avatar i {
  transform: rotate(-45deg);
  font-style: normal;
  font-family: var(--display);
  color: var(--gold-light);
  font-size: 16px;
}
.gb-msg-meta { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 4px; }
.gb-msg-meta strong { font-weight: 400; font-size: 15px; color: var(--gold-light); letter-spacing: .05em; }
.gb-msg-meta time { font-size: 11px; letter-spacing: .1em; color: var(--muted); }
.gb-msg-text { color: var(--desc); font-size: 15px; line-height: 1.85; white-space: pre-wrap; word-break: break-word; }
.gb-empty { padding: 28px 0 8px; font-family: var(--serif); font-style: italic; font-size: 19px; color: var(--muted); }

/* 平板 / 手机：导航只显示锁形图标 */
@media (max-width: 1100px) {
  .nav-gb-text { display: none; }
  .nav-gb-icon { width: 17px; height: 17px; }
}
@media (max-width: 720px) {
  .gb-panel, .gb-panel.is-board { width: 100%; }
  .gb-view { padding: 52px 22px calc(32px + env(safe-area-inset-bottom)); }
  .gb-emblem { width: 108px; height: 108px; margin-bottom: 22px; }
  .gb-emblem svg { width: 54px; height: 54px; }
  .gb-title { font-size: 22px; letter-spacing: .18em; }
  .gb-sub { font-size: 16px; margin-bottom: 26px; }
  .gb-lock-form { flex-direction: column; }
  .gb-unlock { width: 100%; }
  .gb-head { padding-right: 44px; margin-bottom: 26px; }
  .gb-compose { padding: 20px 18px 18px; }
  .gb-list-head { flex-direction: column; gap: 4px; }
  .gb-msg { gap: 14px; }
}
@media (max-width: 420px) {
  .nav-gb-icon { width: 15px; height: 15px; }
  .gb-action { padding: 8px 12px; letter-spacing: .08em; }
}
@media (prefers-reduced-motion: reduce) {
  .gb .gb-item, .gb-msg.entering { opacity: 1; transform: none; }
}

/* ==========================================================
   留言板：照片
   ========================================================== */
.gb-compose { position: relative; transition: border-color .3s, background .3s; }
.gb-compose.dragging { border-color: var(--gold); border-style: dashed; background: rgba(212, 175, 55, .08); }
.gb-compose.dragging::after {
  content: "松开即可添加照片";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 14px;
  letter-spacing: .25em;
  color: var(--gold-light);
  background: rgba(10, 10, 10, .55);
  pointer-events: none;
}
:root[data-theme="light"] .gb-compose.dragging::after { background: rgba(250, 248, 243, .75); }

.gb-photo-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: -4px 0 14px; }
.gb-photo-pick {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: none;
  border: 1px solid var(--line);
  color: var(--gold-light);
  font-family: inherit;
  font-size: 12px;
  letter-spacing: .15em;
  cursor: pointer;
  transition: all .4s var(--ease);
}
.gb-photo-pick svg { width: 17px; height: 17px; }
.gb-photo-pick:hover:not(:disabled) { border-color: var(--gold); background: var(--gold); color: #0a0a0a; }
.gb-photo-pick:focus-visible { outline: 1px solid var(--gold); outline-offset: 2px; }
.gb-photo-pick:disabled { opacity: .4; cursor: not-allowed; }
.gb-photo-hint { font-size: 11px; letter-spacing: .1em; color: var(--muted); }

/* 待发布的缩略图 */
.gb-thumbs { list-style: none; display: flex; gap: 12px; flex-wrap: wrap; }
.gb-thumbs:not(:empty) { margin-bottom: 18px; }
.gb-thumb {
  position: relative;
  width: 84px; height: 84px;
  border: 1px solid var(--line);
  animation: fadeUp .4s var(--ease) both;
}
.gb-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gb-thumb-del {
  position: absolute;
  top: -9px; right: -9px;
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: var(--solid-bg);
  cursor: pointer;
  transition: transform .4s var(--ease), background .3s;
}
.gb-thumb-del span {
  position: absolute;
  left: 50%; top: 50%;
  width: 10px; height: 1px;
  background: var(--gold-light);
  transform: translate(-50%, -50%) rotate(45deg);
}
.gb-thumb-del span + span { transform: translate(-50%, -50%) rotate(-45deg); }
.gb-thumb-del:hover { transform: rotate(90deg); background: var(--gold); }
.gb-thumb-del:hover span { background: #0a0a0a; }
.gb-thumb-del:focus-visible { outline: 1px solid var(--gold); outline-offset: 2px; }

/* 留言里的照片 */
.gb-msg-photos { display: grid; gap: 6px; margin-top: 12px; max-width: 420px; }
.gb-msg-photos.count-1 { grid-template-columns: 1fr; max-width: 360px; }
.gb-msg-photos.count-2, .gb-msg-photos.count-4 { grid-template-columns: repeat(2, 1fr); max-width: 340px; }
.gb-msg-photos.count-3 { grid-template-columns: repeat(3, 1fr); }
.gb-msg-photo {
  position: relative;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--bg-2);
  cursor: zoom-in;
  overflow: hidden;
  aspect-ratio: 1;
  transition: border-color .4s;
}
.gb-msg-photos.count-1 .gb-msg-photo { aspect-ratio: auto; max-height: 320px; }
.gb-msg-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .7s var(--ease); }
.gb-msg-photos.count-1 .gb-msg-photo img { max-height: 320px; }
.gb-msg-photo:hover { border-color: var(--gold); }
.gb-msg-photo:hover img { transform: scale(1.05); }
.gb-msg-photo:focus-visible { outline: 1px solid var(--gold); outline-offset: 2px; }

/* 大图查看 */
.gb-lightbox {
  position: fixed;
  inset: 0;
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 60px 24px;
  background: rgba(5, 5, 5, .92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .4s var(--ease), visibility 0s linear .4s;
}
.gb-lightbox.open { opacity: 1; visibility: visible; transition: opacity .4s var(--ease); }
.gb-lb-figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; min-width: 0; }
.gb-lb-figure img {
  max-width: min(1100px, 100%);
  max-height: calc(100vh - 160px);
  max-height: calc(100dvh - 160px);
  object-fit: contain;
  border: 1px solid rgba(212, 175, 55, .35);
  box-shadow: 0 30px 80px -20px #000;
  transform: scale(.96);
  transition: transform .5s var(--ease);
}
.gb-lightbox.open .gb-lb-figure img { transform: none; }
.gb-lb-figure figcaption { font-family: var(--display); font-size: 13px; letter-spacing: .25em; color: #c9b884; }
.gb-lb-nav {
  flex-shrink: 0;
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(212, 175, 55, .35);
  background: rgba(10, 10, 10, .6);
  color: #f3e2a9;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition: all .4s var(--ease);
}
.gb-lb-nav:hover { background: #d4af37; color: #0a0a0a; border-color: #d4af37; }
.gb-lb-nav:focus-visible { outline: 1px solid #d4af37; outline-offset: 2px; }
.gb-lightbox.single .gb-lb-nav { display: none; }
/* 大图背景始终是深色，关闭按钮保持金线 */
.gb-lb-close { border-color: rgba(212, 175, 55, .35); background: rgba(10, 10, 10, .6); }
.gb-lb-close span { background: #f3e2a9; }

@media (max-width: 720px) {
  .gb-thumb { width: 70px; height: 70px; }
  .gb-msg-photos { max-width: none; }
  .gb-lightbox { padding: 64px 12px 24px; gap: 0; }
  .gb-lb-nav { position: absolute; bottom: 22px; width: 44px; height: 44px; }
  .gb-lb-prev { left: calc(50% - 80px); }
  .gb-lb-next { right: calc(50% - 80px); }
  .gb-lb-figure img { max-height: calc(100dvh - 190px); }
  .gb-lb-figure figcaption { position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%); }
}
.gb-lb-close:focus { outline: none; }
.gb-lb-close:focus-visible { outline: 1px solid #d4af37; outline-offset: 3px; }
