/* ====================================================
   gio-site — styles
   概念：湖泊旁的静思与探险
   ==================================================== */

:root {
  --color-bg:     #ffffff;
  --color-ink:    #1c1b18;
  --color-stone:  #8a8579;
  --color-moss:   #5c6e52;
  --color-water:  #7fa0a8;

  --font-sans: "Courier New", Courier, "PingFang SC", "Hiragino Sans GB", monospace;

  /* 流体字号：手机上取下限、大屏取上限，中间随视口宽度平滑过渡，
     不用断点跳档。下限都不低于 14px，正文在 17-20px 之间——
     这是长时间阅读最舒服的区间，之前全站普遍 12-15px 偏小。 */
  --fs-xs:   clamp(0.875rem, 0.84rem + 0.16vw, 1rem);      /* 14 → 16px  最次要的元信息（年份、页脚） */
  --fs-sm:   clamp(0.95rem, 0.9rem + 0.24vw, 1.125rem);    /* 15 → 18px  导航、按钮、图注 */
  --fs-base: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);      /* 17 → 20px  正文 */
  --fs-md:   clamp(1.1875rem, 1.1rem + 0.4vw, 1.4375rem);  /* 19 → 23px  引文、稍大的段落 */
  --fs-lg:   clamp(1.5rem, 1.28rem + 1vw, 2.125rem);       /* 24 → 34px  页面/区块标题 */

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 2rem;
  --space-4: 4rem;

  --header-h: 56px;
  --sidebar-w: 176px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.6;
}

/* 首页专属：整页背景纹理，纵向平铺 */
body.has-path-bg {
  background-image: url("../assets/images/home-path/background.png");
  background-repeat: repeat-y;
  background-position: top center;
  background-size: 100% auto;
}

/* 颗粒质感 overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.055;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.88' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

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

/* =====================
   Header / Nav
   ===================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-3);
  background: rgba(255, 255, 253, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  /* 两种状态的 border-bottom 都要写成"有颜色"（哪怕是 transparent），不能有一边
     直接写 none——浏览器在"没有颜色"和"有颜色"之间过渡时会把 none 当成
     currentColor（也就是墨色文字的深色）来当起点，过渡途中会闪过一段接近全黑
     的边框。这个坑现在不影响观感了（因为下面干脆不做过渡），但两边保持显式
     颜色仍然是对的写法，留着。
     鼠标进/出顶端区域要"立刻"响应，所以侧边栏 <-> 顶部横条不做任何过渡，
     所有相关属性都是瞬间切换。 */
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.site-title {
  position: relative;
  display: inline-block;
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.site-title__icon {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  /* 高度控制在导航栏本身的高度内，居中对齐——保证图标始终在导航栏这一条里，
     不会顶到视口外面看不见，也不会溢出到下面的页面内容里 */
  height: calc(var(--header-h) - 4px);
  width: auto;
  object-fit: contain;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.site-title:hover .site-title__text {
  opacity: 0;
}

.site-title:hover .site-title__icon {
  opacity: 1;
}

.site-nav {
  display: flex;
  gap: var(--space-3);
  transition: flex-direction 0.3s ease;
}

.site-nav a {
  position: relative;
  text-decoration: none;
  /* 比 --fs-sm 略小一点——用在导航上单独调，不动其他共用 --fs-sm 的地方（按钮、图注等） */
  font-size: clamp(0.85rem, 0.8rem + 0.22vw, 1rem);
  letter-spacing: 0.03em;
  color: var(--color-stone);
  padding-bottom: 2px;
  transition: color 0.3s ease;
}

.site-nav a:hover {
  color: var(--color-ink);
}

.site-nav a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-ink);
  transition: width 0.3s ease;
}

.site-nav a:hover::after,
.site-nav a.active::after {
  width: 100%;
}

/* 文字 <-> 图标切换：hover 时显示图标；当前所在的页面/区块也持续显示图标
   （颜色不受影响，所有导航项默认颜色一致，只靠图标/文字来区分当前状态）
   文字始终占据布局空间（只改 opacity），悬停热区大小不变，避免鼠标一动就在文字/图标间来回抖动 */
.site-nav__text {
  opacity: 1;
  transition: opacity 0.15s ease;
}

.site-nav__icon {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 34px;
  height: 34px;
  object-fit: contain;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.site-nav a:hover .site-nav__text,
.site-nav a.active .site-nav__text {
  opacity: 0;
}

.site-nav a:hover .site-nav__icon,
.site-nav a.active .site-nav__icon {
  opacity: 1;
}

.site-nav a:hover::after,
.site-nav a.active::after {
  display: none;
}

/* 窄屏：字号调大后顶部四个导航项容易挤到一起，收紧左右留白和间距 */
@media (max-width: 560px) {
  .site-header {
    padding: 0 var(--space-2);
  }

  .site-nav {
    gap: var(--space-2);
  }
}

/* =====================
   滚动后：顶部导航变左侧栏
   透明悬浮，不带背景板；当前区块文字变深
   （仅在较宽视口启用，窄屏保持顶部横条）
   ===================== */
@media (min-width: 720px) {
  /* 悬浮在内容之上，不挤压页面布局，也不带背景色 */
  body.nav-scrolled .site-header {
    top: 0;
    left: 0;
    width: var(--sidebar-w);
    height: 100vh;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: var(--space-4) var(--space-3);
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    /* 不写 none——写成宽度不变、颜色透明，border-color 才能真的从这个
       透明值平滑过渡到顶部横条那个很淡的黑，不会闪过 currentColor 的黑边 */
    border-bottom: 1px solid transparent;
    border-right: none;
  }

  body.nav-scrolled .site-title {
    opacity: 0;
    position: absolute;
    pointer-events: none;
  }

  /* 导航项沿侧边栏纵向排开，而不是挤在一起 */
  body.nav-scrolled .site-nav {
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    height: 100%;
    position: relative;
  }

  body.nav-scrolled .site-nav a {
    color: var(--color-stone);
  }

  /* 鼠标挪到页面最顶端时，暂时把侧边栏"拉"回原来顶部横条的样子——
     top/left/width/height 在 sidebar 和这里都是实数值，没有 auto，
     过渡才能顺滑地"拉出来"，而不是瞬间切换形状 */
  body.nav-scrolled.nav-peek .site-header {
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-h);
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-3);
    background: rgba(255, 255, 253, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  }

  body.nav-scrolled.nav-peek .site-title {
    opacity: 1;
    position: relative;
    pointer-events: auto;
  }

  body.nav-scrolled.nav-peek .site-nav {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: var(--space-3);
    height: auto;
  }

  body.nav-scrolled .site-nav a:hover,
  body.nav-scrolled .site-nav a.active {
    color: var(--color-ink);
    font-weight: 600;
  }
}

/* =====================
   子页面主体（作品分类页、堆页等）
   ===================== */
main {
  max-width: 1100px;
  margin: 0 auto;
  padding: calc(var(--header-h) + var(--space-3)) var(--space-3) var(--space-4);
}

.section-title {
  font-size: var(--fs-lg);
  font-weight: 400;
  letter-spacing: 0.02em;
  margin-bottom: var(--space-3);
}

/* =====================
   Sections
   ===================== */
.section {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: calc(var(--header-h) + var(--space-4)) var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
}

/* 每个 section 之间淡淡的分隔线 */
.section + .section {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

/* =====================
   首页背景：庭院步道一路连到堆的池塘
   （纯装饰，不影响页面布局；高度由 JS 量出到真实池塘的距离后设置）
   ===================== */
.home-path-wrap {
  position: relative;
  /* 最小高度由 main.js 精确算出（横幅实际高度 + 14 块石头 + 统一小间距），
     不用粗略估算，避免留白过多 */
}

.home-path {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.home-path__nav-banner {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
}

.home-path__stone {
  position: absolute;
  left: var(--x);
  /* top / width 由 main.js 按横幅底部与真实池塘顶部的实际像素位置动态计算并写入 */
  height: auto;
  transform: scaleX(2) scaleY(1.5);
  /* 横向从中心对称拉伸，纵向从顶部往下拉伸——纵向如果也从中心拉伸，
     会让石头的视觉顶边往上偷跑，跟 main.js 里按顶部定位的间距计算对不上 */
  transform-origin: center top;
}

/* 首页内嵌的堆/湖泊场景（与 heap/index.html 共用同一套标记和脚本） */
.heap-embed {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: var(--space-4) 0;
}

.heap-embed .section-label {
  display: block;
  margin-bottom: var(--space-2);
}

/* =====================
   两栏布局
   ===================== */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  align-items: center;
}

/* sidebar 版：左窄右宽 */
.two-col--sidebar {
  grid-template-columns: 220px 1fr;
}

/* Contact 页：左边一栏事实信息（身份/联系方式/学历/研究方向，要能被快速扫到），
   右边 Artist Statement 长文。左右两栏高度差很多，不能像别处的 .two-col 那样
   垂直居中对齐——那样左边这一小截会飘在长文中间，很奇怪，改成顶部对齐。 */
.contact-layout {
  align-items: start;
}

.contact-facts {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.contact-role {
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.5;
}

.contact-detail {
  font-size: var(--fs-xs);
  color: var(--color-stone);
}

.contact-detail a {
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.14);
}

.contact-detail a:hover {
  color: var(--color-ink);
  border-color: var(--color-ink);
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-links a {
  font-size: var(--fs-xs);
  text-decoration: none;
  color: var(--color-stone);
  transition: color 0.2s;
}

.contact-links a:hover {
  color: var(--color-ink);
}

.contact-block .section-label {
  display: block;
  margin-bottom: var(--space-1);
}

.contact-edu {
  font-size: var(--fs-xs);
  line-height: 1.6;
  color: var(--color-ink);
  margin-bottom: var(--space-1);
}

.contact-tags {
  font-size: var(--fs-xs);
  line-height: 1.7;
  color: var(--color-ink);
}

/* =====================
   首页
   ===================== */
.section--home {
  align-items: start;
  padding-bottom: var(--space-4);
}

.two-col--home {
  align-items: start;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.home-text {
  padding-top: var(--space-1);
}

.home-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 300;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin-bottom: var(--space-3);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.home-quote {
  font-size: var(--fs-md);
  color: var(--color-stone);
  line-height: 1.9;
  margin-bottom: var(--space-3);
  font-style: italic;
  max-width: 46ch;
}

.home-bio {
  /* 比正文字号 --fs-base 小一号——这段是长篇 Artist Statement，
     字号太大读起来太重，稍微收一点更接近正式文本的排版感 */
  font-size: clamp(0.9rem, 0.85rem + 0.22vw, 1.0625rem);
  line-height: 1.8;
  color: var(--color-ink);
  margin-top: var(--space-2);
  margin-bottom: var(--space-2);
  max-width: 50ch;
}

/* 池塘 canvas 容器：sticky，始终在视口内 */
.home-pond-wrap {
  position: sticky;
  top: calc(var(--header-h) + var(--space-3));
  height: calc(100vh - var(--header-h) - var(--space-3) * 2);
}

.home-pond-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* =====================
   绘画
   ===================== */
.section-label {
  font-size: var(--fs-sm);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-stone);
  line-height: 1.8;
}

/* =====================
   作品缩略图：未点击时是模糊颗粒的氤氲，hover 后才清晰
   图片按真实作品比例裁切（aspect-ratio 逐项内联设置）
   ===================== */
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-3) var(--space-2);
}

/* 窄屏：两栏并排放不下，改成上下堆叠；缩略图最小宽度也跟着放宽，
   否则 200px 的下限会把网格撑到视口外面（横向出现滚动条） */
@media (max-width: 760px) {
  .two-col,
  .two-col--sidebar,
  .two-col--home {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }

  .work-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr));
  }

  main,
  .section {
    padding-left: var(--space-2);
    padding-right: var(--space-2);
  }
}

.work-thumb {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* 承载图片的裁切框：aspect-ratio 由每件作品内联设置，按真实比例裁切 */
.work-thumb__frame {
  position: relative;
  overflow: hidden;
  background: #dcdad4;
}

.work-thumb img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(16px) saturate(0.85) brightness(1.04);
  transform: scale(1.12);
  transition: filter 0.7s ease, transform 0.7s ease;
}

/* 颗粒叠层：未 hover 时更明显，hover 时随图片一起"散开" */
.work-thumb__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.5;
  mix-blend-mode: multiply;
  pointer-events: none;
  transition: opacity 0.7s ease;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

.work-thumb:hover img,
.work-thumb:focus-visible img {
  filter: blur(0) saturate(1) brightness(1);
  transform: scale(1);
}

.work-thumb:hover .work-thumb__frame::after,
.work-thumb:focus-visible .work-thumb__frame::after {
  opacity: 0.08;
}

.work-thumb figcaption {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: var(--space-1);
  font-size: var(--fs-sm);
  /* 背景的步道石头会从文字后面透出来，加一圈纸色光晕保证小字始终读得清 */
  text-shadow:
    0 0 4px var(--color-paper),
    0 0 8px var(--color-paper),
    0 0 12px var(--color-paper);
}

.work-thumb__title {
  color: var(--color-ink);
}

.work-thumb__year,
.work-thumb__meta {
  color: var(--color-stone);
}

.work-thumb__meta {
  display: block;
  font-size: var(--fs-xs);
  margin-top: 2px;
}

/* =====================
   堆
   ===================== */
.heap-desc {
  font-size: var(--fs-base);
  color: var(--color-stone);
  line-height: 2;
  margin-top: var(--space-2);
  margin-bottom: var(--space-3);
}

.link-arrow {
  font-size: var(--fs-sm);
  text-decoration: none;
  letter-spacing: 0.03em;
  border-bottom: 1px solid var(--color-ink);
  padding-bottom: 1px;
  transition: border-color 0.2s, color 0.2s;
}

.link-arrow:hover {
  color: var(--color-moss);
  border-color: var(--color-moss);
}

.heap-preview {
  aspect-ratio: 1;
  max-width: 400px;
  justify-self: end;
  border: 1px dashed rgba(0, 0, 0, 0.1);
  /* 堆的湖泊场景下一步实现 */
}

/* =====================
   留言区
   ===================== */
.section--message {
  padding: 0;
  align-items: stretch;
  cursor: crosshair;
}

.lake-wrap {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#lake-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* 池塘区块的字幕位：标题和提示文字共用同一块地方，不是各占一行——
   标题先浮现，沉下去之后提示文字才在同一处淡入，像字幕换行一样先后顶替。
   两者字号粗细一致，只靠出场顺序区分先后，不靠大小。 */
.lake-caption {
  position: relative;
  z-index: 2;
  width: min(520px, 90%);
  min-height: 3.6em; /* 留够提示文字那两行（主文字+"Click anywhere"小字）的高度 */
}

.lake-title,
.lake-prompt {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  text-align: center;
  color: var(--color-stone);
  font-size: var(--fs-base);
  font-weight: 400;
  letter-spacing: 0.08em;
  user-select: none;
  pointer-events: none;
}

.lake-prompt {
  opacity: 0;
  transition: opacity 1.1s ease;
}

.lake-prompt.visible {
  opacity: 1;
}

.lake-prompt small {
  display: block;
  margin-top: var(--space-1);
  font-size: var(--fs-xs);
  opacity: 0.55;
  letter-spacing: 0.03em;
}

/* 石子落水后先浮出的数据碎片——她自己零散记录的生活数据，
   随机抽一条，样子要跟下面"访客自己写的留言"分得开：斜体、更轻，读起来像捞上来的东西 */
.lake-fragment {
  position: relative;
  z-index: 3;
  width: min(420px, 88%);
  text-align: center;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 1.1s ease, transform 1.1s ease;
  pointer-events: none;
  margin-bottom: var(--space-2);
}

.lake-fragment.visible {
  opacity: 1;
  transform: translateY(0);
}

.lake-fragment__label {
  display: block;
  font-size: var(--fs-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-stone);
  opacity: 0.7;
  margin-bottom: 4px;
}

.lake-fragment__value {
  display: block;
  font-size: var(--fs-md);
  font-style: italic;
  color: var(--color-ink);
  line-height: 1.5;
}

.lake-fragment__date {
  display: block;
  font-size: var(--fs-xs);
  color: var(--color-stone);
  opacity: 0.6;
  margin-top: 4px;
}

.message-form-wrap {
  position: relative;
  z-index: 3;
  width: min(500px, 88%);
  margin-top: var(--space-3);
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.message-form-wrap.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.message-form-wrap form {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.message-form-wrap textarea {
  width: 100%;
  padding: var(--space-2);
  border: 1px solid rgba(0, 0, 0, 0.14);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.7;
  background: rgba(255, 255, 255, 0.92);
  resize: none;
  outline: none;
  border-radius: 0;
  transition: border-color 0.2s;
}

.message-form-wrap textarea:focus {
  border-color: rgba(0, 0, 0, 0.3);
}

.message-form-wrap button[type="submit"] {
  align-self: flex-start;
  padding: var(--space-1) var(--space-3);
  background: none;
  border: 1px solid var(--color-ink);
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background 0.25s, color 0.25s;
}

.message-form-wrap button[type="submit"]:hover {
  background: var(--color-ink);
  color: #fff;
}

.message-thanks {
  text-align: center;
  color: var(--color-stone);
  font-size: var(--fs-base);
  letter-spacing: 0.05em;
}

/* =====================
   作品分类子导航（作品汇总页 + 各分类页共用）
   ===================== */
.works-subnav {
  display: flex;
  gap: var(--space-3);
  margin: calc(-1 * var(--space-2)) 0 var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.works-subnav a {
  text-decoration: none;
  font-size: var(--fs-sm);
  letter-spacing: 0.03em;
  color: var(--color-stone);
  transition: color 0.2s;
}

.works-subnav a:hover,
.works-subnav a.active {
  color: var(--color-ink);
}

.works-category {
  margin-bottom: var(--space-4);
}

.works-category__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--space-2);
}

.works-category__head h3 {
  font-size: var(--fs-md);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.works-category__head a {
  font-size: var(--fs-sm);
  color: var(--color-stone);
  text-decoration: none;
}

.works-category__head a:hover {
  color: var(--color-ink);
}

/* =====================
   Footer
   ===================== */
.site-footer {
  text-align: center;
  padding: var(--space-3);
  font-size: var(--fs-xs);
  color: var(--color-stone);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.site-footer__links {
  display: flex;
  justify-content: center;
  gap: var(--space-3);
  margin-bottom: var(--space-1);
}

.site-footer__links a {
  text-decoration: none;
  color: var(--color-stone);
  letter-spacing: 0.03em;
  transition: color 0.2s;
}

.site-footer__links a:hover {
  color: var(--color-ink);
}

/* =====================
   文字水下浮现
   ===================== */
.reveal-word {
  display: inline-block;
  white-space: nowrap; /* 词内部不断行，只在词与词之间的空格处换行 */
}

.reveal-char {
  display: inline-block;
  transform: translateY(0.6em);
  opacity: 0;
  filter: blur(4px);
  transition:
    transform 1.15s cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 0.9s ease,
    filter 1s ease;
  transition-delay: var(--rd, 0s);
}

.reveal-text.in-view .reveal-char {
  transform: translateY(0);
  opacity: 1;
  filter: blur(0);
}

/* 每个字浮到位之后，轻轻上下荡一下再定住——JS 监听 transform 过渡结束后
   临时加这个类播放一次，播完自动交还给上面 .in-view 的静止状态 */
@keyframes reveal-char-bob {
  0%   { transform: translateY(0); }
  35%  { transform: translateY(-0.05em); }
  68%  { transform: translateY(0.018em); }
  100% { transform: translateY(0); }
}

.reveal-char--settle {
  animation: reveal-char-bob 0.7s ease-out;
}

/* 少动效偏好：直接显示，不做浮现/沉回/浮动 */
@media (prefers-reduced-motion: reduce) {
  .reveal-char {
    transition: none;
    transform: none;
    opacity: 1;
    filter: none;
  }

  .reveal-char--settle {
    animation: none;
  }
}
