/* ============================================
   Ary-Yue Huang Portfolio — GitHub Pages
   基于 Cargo 原站 (aryyuehuang.com) 样式提取
   ============================================

   使用 Favorit Mono Book 字体：如有字体文件，在 css/ 下创建 fonts/ 目录，
   放入 .woff2 文件后取消下方注释并修改路径：

   @font-face {
     font-family: 'Favorit Mono Book';
     src: url('fonts/FavoritMono-Book.woff2') format('woff2');
     font-weight: 350;
     font-style: normal;
     font-display: swap;
   }
   ============================================ */

:root {
  --page-bg: #ffffff;           /* 页面底面白色 */
  --content-bg: #ffffff;        /* 白内容区 */
  --text-on-dark: rgba(255, 255, 255, 0.85);
  --text-on-light: #000000;
  --text-muted: rgba(134, 134, 134, 0.85);
  --link-muted: rgb(157, 157, 157);
  --tag-bg: #ffffff;
  --tag-text: #000000;
  --tag-border: #A7B3BF;
  --font-caption: 'DM Sans', 'Source Sans 3', -apple-system, sans-serif;
  /* 项目详情页：标题 Arizona Serif，正文 Open Sans（与 drift 对齐） */
  --font-project-body: 'Open Sans', 'DM Sans', 'Source Sans 3', -apple-system, sans-serif;
  --font-project-title: 'ABC Arizona Serif', Georgia, 'Times New Roman', serif;
  --font-subcaption: 'IBM Plex Mono', 'JetBrains Mono', monospace;
  --font-body: 'IBM Plex Mono', 'JetBrains Mono', monospace;
  --font-mono: 'Favorit Mono Book', 'IBM Plex Mono', 'JetBrains Mono', monospace;
  --font-name: Georgia, 'Times New Roman', serif;
  --content-width: 90%;
  --max-width: min(90vw, 1400px);
  --max-width-wide: min(90vw, 1400px);
}

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

/* View Transitions：跨文档页面切换，按 index 项目顺序做前后滑动 */
@view-transition {
  navigation: auto;
}

/* forwards: 进入下一个项目（旧页左滑，新页从右入） */
@keyframes vt-slide-out-to-left {
  to { transform: translateX(-30%); opacity: 0.8; }
}
@keyframes vt-slide-in-from-right {
  from { transform: translateX(30%); opacity: 0.8; }
  to { transform: translateX(0); opacity: 1; }
}

/* backwards: 返回上一个项目（旧页右滑，新页从左入） */
@keyframes vt-slide-out-to-right {
  to { transform: translateX(30%); opacity: 0.8; }
}
@keyframes vt-slide-in-from-left {
  from { transform: translateX(-30%); opacity: 0.8; }
  to { transform: translateX(0); opacity: 1; }
}

html:active-view-transition-type(forwards),
html:active-view-transition-type(backwards) {
  :root {
    view-transition-name: none;
  }
  .page-wrapper {
    view-transition-name: page-content;
  }
}

html:active-view-transition-type(forwards) {
  &::view-transition-old(page-content) {
    animation: vt-slide-out-to-left 0.35s ease-out both;
  }
  &::view-transition-new(page-content) {
    animation: vt-slide-in-from-right 0.35s ease-out both;
  }
}

html:active-view-transition-type(backwards) {
  &::view-transition-old(page-content) {
    animation: vt-slide-out-to-right 0.35s ease-out both;
  }
  &::view-transition-new(page-content) {
    animation: vt-slide-in-from-left 0.35s ease-out both;
  }
}

/* 全局基准字号：1rem = 18px。调整此处可改变全站「正常」字号 */
html {
  font-size: 18px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-style: normal;
  color: var(--text-on-light);
  background: #ffffff;
  line-height: 1.3;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 主内容区 - 初始加载时为首屏内容留足 header 空间 */
/* 调整此处 padding-top 可改变 header 下方的留白：css/style.css 约第 53、59 行 */
.page-wrapper {
  flex: 1;
  background: var(--content-bg);
  padding: 4rem 2rem;
  padding-top: 13.5rem;
}

@media (max-width: 768px) {
  .page-wrapper {
    padding: 2rem 1.25rem;
    padding-top: 10.5rem;
  }
}

/* Index 页：首屏留白缩小 */
body.page-index .page-wrapper {
  padding-top: 4.5rem;
}

@media (max-width: 768px) {
  body.page-index .page-wrapper {
    padding-top: 3.5rem;
  }
}

/* 单页滚动吸附：上下滑动切换 Projects / About / Publications / Contact */
html.scroll-snap-page,
html.scroll-snap-page body {
  height: 100%;
}

html.scroll-snap-page {
  overflow: hidden;
}

body.scroll-snap-page {
  overflow-y: auto;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  height: 100%;
  min-height: auto;
  display: block;
  flex-direction: unset;
}

body.scroll-snap-page .scroll-section {
  min-height: 100vh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

body.scroll-snap-page .scroll-section .page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* About / Publications / Contact 区使用 Arizona Sans 字体 */
body.scroll-snap-page #about .page-wrapper,
body.scroll-snap-page #publications .page-wrapper,
body.scroll-snap-page #contact .page-wrapper {
  padding-top: 10rem;
}

body.scroll-snap-page #about .about-section {
  margin-top: 0;
  gap: 0.4rem;
}
body.scroll-snap-page #about .cv-lang-toggle {
  margin: 0 0 0.15rem 0;
}
body.scroll-snap-page #about .about-section .section-title {
  margin: 0 0 0.25rem 0;
}
body.scroll-snap-page #about .about-section .section-title:first-of-type {
  margin-top: 0;
}
body.scroll-snap-page #about .about-section,
body.scroll-snap-page #about .about-intro,
body.scroll-snap-page #about .about-bio,
body.scroll-snap-page #about .section-title,
body.scroll-snap-page #about .cv-category,
body.scroll-snap-page #about .cv-list,
body.scroll-snap-page #publications .publication,
body.scroll-snap-page #publications .pub-title,
body.scroll-snap-page #publications .pub-venue,
body.scroll-snap-page #publications .pub-authors,
body.scroll-snap-page #publications .pub-year,
body.scroll-snap-page #contact .contact-label,
body.scroll-snap-page #contact .contact-value {
  font-family: 'ABC Arizona Sans', Georgia, sans-serif;
  font-weight: 300;
}

/* About 页：第一段前留白稍多 */
body.page-arizona-sans .page-wrapper {
  padding-top: 10rem;
}

@media (max-width: 768px) {
  body.page-arizona-sans .page-wrapper {
    padding-top: 10rem;
  }
}

body.page-arizona-sans .about-section {
  margin-top: 0;
  gap: 0.4rem;
}

body.page-arizona-sans .cv-lang-toggle {
  margin: 0 0 0.15rem 0;
}

body.page-arizona-sans .about-section .section-title {
  margin: 0 0 0.25rem 0;
}

body.page-arizona-sans .about-section .section-title:first-of-type {
  margin-top: 0;
}

/* Index 页：语言切换在名字下方，永远置顶，仅 index 页显示 */
.index-lang-bar {
  display: none;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.4em;
  text-align: right;
  justify-content: flex-end;
}

body.page-index .index-lang-bar {
  display: flex;
}

.index-lang-btn {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.35rem;
  font-weight: 400;
  padding: 0;
  border: none;
  background: none;
  color: #ffffff;
  cursor: pointer;
  transition: font-weight 0.2s, opacity 0.2s;
}

.index-lang-btn:hover {
  opacity: 0.85;
}

.index-lang-btn.active {
  font-weight: 600;
}

.index-lang-sep {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.35rem;
  font-weight: 400;
  color: #ffffff;
  opacity: 0.7;
}

@media (max-width: 768px) {
  .index-lang-bar {
    margin-top: 0.3em;
  }
  .index-lang-btn,
  .index-lang-sep {
    font-size: 1rem;
  }
}

/* header-root 仅作 wrapper，overflow visible 防止名字被裁切 */
.header-root {
  position: relative;
  overflow: visible;
}

/* 顶部固定栏 - 网格：左列 nav，右列 名字 */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 2rem 0 1.5rem;
  padding-left: clamp(2.5rem, 6vw, 4rem);
  padding-right: clamp(2.5rem, 6vw, 4rem);
  display: grid;
  grid-template-columns: 3fr 8fr;
  gap: 1rem;
  align-items: start;
  background: transparent;
  pointer-events: none;
  mix-blend-mode: difference;
}

/* 全页面桌面：7 等分网格，填满全页，全部居中 */
.site-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0;
  align-items: center;
  justify-items: center;
  width: 100%;
  max-width: 100vw;
  padding-left: clamp(0.5rem, 2vw, 1.5rem);
  padding-right: clamp(0.5rem, 2vw, 1.5rem);
}

@media (max-width: 768px) {
  .site-header {
    padding-left: clamp(0.35rem, 1.5vw, 1rem);
    padding-right: clamp(0.5rem, 2vw, 1.25rem);
  }
}

.site-header .nav,
.site-header .hero {
  display: contents;
}

.site-header .nav-link:nth-child(1) { grid-column: 1; justify-self: center; }
.site-header .nav-link:nth-child(2) { grid-column: 2; justify-self: center; }
.site-header .nav-link:nth-child(3) { grid-column: 3; justify-self: center; }
.site-header .nav-link:nth-child(4) { grid-column: 4; justify-self: center; }
.site-header .index-lang-bar { grid-column: 5; justify-self: center; }
.site-header .hero-name { grid-column: 6 / 8; justify-self: center; }

body:not(.page-index) .site-header .hero-name {
  grid-column: 5 / 8;
}

.site-header .hero-name {
  display: flex;
  align-items: baseline;
  gap: 0.35em;
  justify-content: center;
  width: 100%;
}

.site-header .hero-title,
.site-header .hero-subtitle,
.site-header .index-lang-btn,
.site-header .index-lang-sep,
.site-header .nav-link {
  font-family: 'Diatype Light', 'IBM Plex Mono', 'JetBrains Mono', monospace;
  font-size: clamp(0.5rem, 1vw + 0.6rem, 1.5rem);
  font-weight: 300;
  font-style: normal;
}

.site-header .hero-title {
  margin-right: 0;
}

.site-header .hero-subtitle {
  margin-top: 0;
}

.site-header .index-lang-bar {
  margin-top: 0;
  justify-content: center;
}

.site-header > * {
  pointer-events: auto;
}

.nav-link,
.hero-title,
.hero-subtitle,
.index-lang-bar .index-lang-btn,
.index-lang-bar .index-lang-sep,
.menu-toggle {
  color: #ffffff; /* 配合 difference 实现自适应对比 */
  font-style: normal !important;
  font-synthesis: none; /* 禁止浏览器合成斜体 */
}

@media (max-width: 768px) {
  .site-header {
    grid-template-columns: 1fr 2.5fr;
    padding: 0.6rem clamp(0.5rem, 3vw, 1rem) 0.5rem;
    gap: 0.5rem;
    align-items: start;
  }

  .nav-link {
    font-size: 0.75rem;
  }

  .hero {
    text-align: right;
    justify-self: end;
    align-self: start;
  }

  .hero-title {
    font-size: 0.75rem;
  }

  .hero-subtitle {
    font-size: 0.8rem;
  }
}

/* ============================================
   Header 字体控制：
   - 左侧（PROJECTS, ABOUT 等）: .nav-link（约第 125 行）
   - 右侧（Ary-Yue HUANG, 黄钺）: .hero-title、.hero-subtitle（约第 168、178 行）
   - 手机端缩小: 见 @media (max-width: 640px) 内的 .nav-link、.hero-title、.hero-subtitle
   ============================================ */

/* 左侧导航 — 垂直排列，每项一行 */
.nav {
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  align-items: flex-start;
}

.nav-link {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 350;
  font-style: normal;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #ffffff;
  text-decoration: none;
  transition: opacity 0.2s;
  display: block;
}

.nav-link:hover {
  opacity: 0.85;
}

.nav-link.active {
  font-weight: 600;
}

/* Hero / Name - 右列 */
.hero {
  padding: 0;
  text-align: right;
  justify-self: end;
  width: 100%;
}

.hero-name {
  display: block;
}

@media (max-width: 768px) {
  .hero {
    justify-self: end;
    text-align: right;
    width: 100%;
  }

  .hero-title {
    font-size: 0.75rem;
  }

  .hero-subtitle {
    font-size: 0.8rem;
  }
}

/* 右侧名字：Georgia，中文略大 */
.hero-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.5rem;
  font-weight: 400;
  font-style: normal;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #ffffff;
}

.hero-subtitle {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.6rem;
  font-weight: 400;
  font-style: normal;
  line-height: 1.5;
  margin-top: 0.15em;
  color: #ffffff;
  opacity: 0.95;
}

/* Mobile：header 字体缩小，必须在 base 样式之后才能生效 */
@media (max-width: 768px) {
  .site-header .nav-link {
    font-size: 0.75rem;
  }
  .site-header .hero-title {
    font-size: 0.75rem;
  }
  .site-header .hero-subtitle {
    font-size: 0.8rem;
  }
  .site-header .index-lang-btn,
  .site-header .index-lang-sep {
    font-size: 1rem;
  }
}

/* Index 页 Mobile：7 等分，居中，IBM Plex Mono Light，渐进缩小（名字保持原大小、不居中） */
@media (max-width: 768px) {
  body.page-index .site-header {
    padding: 0.5rem clamp(0.5rem, 2vw, 1rem);
  }
  body.page-index .site-header .nav-link,
  body.page-index .site-header .index-lang-btn,
  body.page-index .site-header .index-lang-sep {
    font-family: 'Diatype Light', 'IBM Plex Mono', 'JetBrains Mono', monospace;
    font-size: clamp(0.4rem, 1.2vw + 0.4rem, 0.8rem);
    font-weight: 300;
    font-style: normal;
  }
  /* 名字保持桌面端大小和右对齐，不额外缩小 */
  body.page-index .site-header .hero-title,
  body.page-index .site-header .hero-subtitle {
    font-family: 'Diatype Light', 'IBM Plex Mono', 'JetBrains Mono', monospace;
    font-size: clamp(0.5rem, 1vw + 0.6rem, 1.5rem);
    font-weight: 300;
    font-style: normal;
  }
  body.page-index .site-header .hero-subtitle {
    font-size: clamp(0.55rem, 1.1vw + 0.6rem, 1.6rem);
  }
}

/* ========== Index 页 Mobile：三杠菜单（左侧） + 名字（右侧） + 全屏遮罩 ========== */
/* 三杠按钮：仅 index 页 mobile 显示，位于左侧 */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  color: #ffffff;
  pointer-events: auto;
  transition: opacity 0.2s;
}

.menu-toggle:hover {
  opacity: 0.85;
}

.menu-toggle-line {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.menu-toggle.active .menu-toggle-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.active .menu-toggle-line:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active .menu-toggle-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* 全页面 mobile（≤768px）：堆叠模式，hamburger 左 + 名字右 */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
    order: -1;
  }
  .header-root:has(.menu-overlay.active) .site-header {
    z-index: 10000;
    mix-blend-mode: normal;
  }
  .site-header .nav,
  .site-header .index-lang-bar {
    display: none !important;
  }
  .site-header {
    display: grid !important;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto;
    gap: 0;
    justify-items: end;
    align-items: center;
  }
  .site-header .menu-toggle {
    justify-self: start;
  }
  .site-header .hero-name {
    justify-self: end;
    justify-content: flex-end;
    min-width: 0;
    max-width: 100%;
  }
}

/* 全屏遮罩：纯色灰底不透，不叠加下层，只有一个可点击 X */
.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9998;
  background: #888888;
  mix-blend-mode: normal;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.menu-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.menu-overlay-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.menu-overlay-link {
  font-family: 'Diatype Light', 'IBM Plex Mono', monospace;
  font-size: 1.5rem;
  font-weight: 300;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #ffffff;
  text-decoration: none;
  transition: opacity 0.2s;
}

.menu-overlay-link:hover {
  opacity: 0.6;
}

.menu-overlay-link.active {
  font-weight: 600;
}

.menu-overlay-lang {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

body.page-index .menu-overlay-lang {
  display: flex;
}

body:not(.page-index) .menu-overlay-lang {
  display: none;
}

.menu-overlay-lang-btn {
  font-family: 'Diatype Light', 'IBM Plex Mono', monospace;
  font-size: 1.5rem;
  font-weight: 300;
  padding: 0;
  border: none;
  background: none;
  color: #ffffff;
  cursor: pointer;
  transition: font-weight 0.2s, opacity 0.2s;
}

.menu-overlay-lang-btn:hover {
  opacity: 0.6;
}

.menu-overlay-lang-btn.active {
  font-weight: 600;
}

.menu-overlay-lang-sep {
  font-family: 'Diatype Light', 'IBM Plex Mono', monospace;
  font-size: 1.5rem;
  color: #ffffff;
  opacity: 0.8;
}

/* Main content - 90% 页面宽度，响应式 */
.content {
  width: var(--content-width);
  max-width: var(--max-width);
  margin: 0 auto;
}

.content-wide {
  width: var(--content-width);
  max-width: var(--max-width-wide);
  margin: 0 auto;
}

.content-narrow {
  width: var(--content-width);
  max-width: 520px;
  margin: 0 auto;
}

/* About / Contact / Publications — Arizona Sans Light 全页 */
body.page-arizona-sans {
  font-family: 'ABC Arizona Sans', Georgia, sans-serif;
  font-weight: 300;
}
body.page-arizona-sans .about-intro,
body.page-arizona-sans .about-bio,
body.page-arizona-sans .section-title,
body.page-arizona-sans .cv-category,
body.page-arizona-sans .cv-list,
body.page-arizona-sans .contact-label,
body.page-arizona-sans .contact-value,
body.page-arizona-sans .publication,
body.page-arizona-sans .pub-title,
body.page-arizona-sans .pub-venue,
body.page-arizona-sans .pub-authors,
body.page-arizona-sans .pub-year {
  font-family: 'ABC Arizona Sans', Georgia, sans-serif;
  font-weight: 300;
}

/* Caption - 主文案：Arizona Sans Light 风格 */
.caption {
  font-family: var(--font-caption);
  font-size: 2.05em;
  font-weight: 300;
  line-height: 1.3;
  letter-spacing: 0;
  color: var(--text-on-light);
}

/* Sub-caption - 图下引用：Diatype Semi-mono 风格 */
.sub-caption {
  font-family: var(--font-subcaption);
  font-size: 1.15em;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0;
  color: var(--text-on-light);
}

/* Intro - 在 Contact/nav 下方，留足空间 */
.intro {
  margin-top: 8rem;
  margin-bottom: 3rem;
}

body.page-index .intro {
  margin-top: 2rem;
}

/* intro-text 字号 */
.intro-text {
  font-family: var(--font-caption);
  font-size: 1.5rem;
  font-weight: 300;
  font-style: normal;
  line-height: 1.3;
  letter-spacing: 0;
  color: var(--text-on-light);
  margin-bottom: 1rem;
}

/* 系列名等：灰蓝渐变圆角框（Agent-Based Art 等） */
.intro-text em,
.about-intro em,
.project-detail em,
em.series-tag {
  font-style: normal;
  display: inline-block;
  padding: 2px 8px;
  background: linear-gradient(#fff, #fff) padding-box,
              linear-gradient(to right, #7898af, #8c8c8c, #6a6a6f, #7898af) border-box;
  border: 1px solid transparent;
  border-radius: 20px;
}

.intro-link {
  display: inline-block;
  font-size: 1rem;
  color: var(--link-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.intro-link:hover {
  color: var(--text-on-light);
}

/* 标签 pill - 灰蓝渐变圆角框，hashtag 小尺寸 */
.tag {
  display: inline-block;
  padding: 1px 6px;
  background: linear-gradient(#fff, #fff) padding-box,
              linear-gradient(to right, #7898af, #8c8c8c, #6a6a6f, #7898af) border-box;
  border: 1px solid transparent;
  border-radius: 10px;
  font-family: 'ABC Arizona Sans', Georgia, sans-serif;
  font-size: 0.65rem;
  font-weight: 300;
  color: var(--tag-text);
}

/* Projects - 参考图：居中、层级排版 */
.projects {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.project {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-bottom: 2rem;
}

.project-quote {
  font-family: 'ABC Arizona Sans', Georgia, sans-serif;
  font-size: 1.15rem;
  font-weight: 300;
  line-height: 1.3;
  letter-spacing: 0.05em;
  color: var(--text-on-light);
  opacity: 0.8;
  margin-bottom: 0.75rem;
}

.project-info {
  margin-bottom: 0.25rem;
}

.project-title {
  font-family: 'ABC Arizona Sans', Georgia, sans-serif;
  font-size: 1.6rem;
  font-weight: 300;
  line-height: 1.3;
  color: var(--text-on-light);
  text-decoration: none;
  transition: opacity 0.2s;
}

.project-title:hover {
  opacity: 0.7;
}

.project-year {
  font-family: 'ABC Arizona Sans', Georgia, sans-serif;
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.3;
  color: var(--text-on-light);
  display: inline;
  margin-left: 0.35em;
}

.project-title .arrow {
  font-size: 0.45em;
  vertical-align: super;
  opacity: 0.85;
}

.project-meta {
  font-family: 'ABC Arizona Sans', Georgia, sans-serif;
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--text-on-light);
  line-height: 1.3;
  margin-top: 0.4em;
}

.project-meta .tag {
  display: inline;
  margin-right: 0.35em;
  margin-bottom: 0;
  font-size: 0.7rem;
  font-weight: 300;
}

/* 项目图片占位 - 可选嵌入 Cargo CDN 图片 */
.project-image {
  width: 100%;
  max-width: 800px;
  margin: 1rem 0;
  border-radius: 2px;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* About page */
.about-section {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
  align-items: start;
}

.about-section > * {
  grid-column: 2;
}

.about-intro {
  font-family: 'ABC Arizona Sans', Georgia, sans-serif;
  font-size: 1.1rem;
  font-weight: 300;
  line-height: 1.4;
  letter-spacing: 0;
  margin-bottom: 1.2rem;
  color: var(--text-on-light);
}

/* about-intro em 在 Intro 统一样式中 */

.about-bio {
  font-family: 'ABC Arizona Sans', Georgia, sans-serif;
  font-size: 1.1rem;
  font-weight: 300;
  line-height: 1.4;
  margin-bottom: 2rem;
  color: var(--text-on-light);
}

.about-section .section-title {
  font-family: var(--font-caption);
  font-size: 1.4rem;
  font-weight: 400;
  margin: 2rem 0 0.75rem;
  letter-spacing: 0;
  color: var(--text-on-light);
}

.cv-lang-toggle {
  display: flex;
  justify-content: flex-start;
  gap: 0.5rem;
  margin: 1rem 0 1rem 0;
}

.cv-lang-btn {
  font-family: 'ABC Arizona Sans', Georgia, sans-serif;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border: 1px solid #999;
  background: #fff;
  color: #333;
  cursor: pointer;
  transition: all 0.2s;
}

.cv-lang-btn:hover {
  border-color: #333;
  color: #000;
}

.cv-lang-btn.active {
  background: #333;
  color: #fff;
  border-color: #333;
}

.cv-label-zh { display: none; }

.about-section .cv-category {
  font-size: 0.8rem;
  font-weight: 500;
  margin: 1.2rem 0 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-on-light);
}

.cv-list {
  list-style: none;
  margin-bottom: 1.2rem;
}

.about-section .cv-list li {
  margin-bottom: 0.35rem;
  padding-left: 0;
  font-size: 0.85rem;
  color: var(--text-on-light);
}

/* Publications */
.publications-section {
  margin-top: 1rem;
}

.publication {
  display: grid;
  grid-template-columns: 4rem 1fr;
  gap: 1.5rem;
  padding: 2rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.publication:last-child {
  border-bottom: none;
}

.pub-year {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.pub-title {
  font-family: var(--font-caption);
  font-size: 1.15rem;
  font-weight: 400;
  margin-bottom: 0.35rem;
  color: var(--text-on-light);
}

.pub-authors {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.pub-venue {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.pub-doi {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: underline;
}

.pub-doi:hover {
  color: var(--text-on-light);
}

.pub-status {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Contact */
.contact-section {
  margin-top: 2rem;
}

.contact-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 1.75rem;
}

.contact-label {
  font-family: var(--font-mono);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.contact-value {
  font-size: 2rem;
  font-weight: 400;
  color: var(--text-on-light);
}

.contact-value[href] {
  text-decoration: none;
  transition: opacity 0.2s;
}

.contact-value[href]:hover {
  opacity: 0.7;
}

/* Project detail page - 原站 column-set 布局：2(meta) + 1(gutter) + 9(content) */
.content-wide .project-detail {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: 2fr 1fr 9fr;
  gap: 0 clamp(1rem, 4vw, 2rem);
  align-items: start;
  text-align: left;
}

.content-wide .project-detail-title {
  grid-column: 1 / -1;
  font-family: var(--font-project-title);
  font-size: 2.9rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
  color: var(--text-on-light);
}

.content-wide .project-detail-subtitle {
  grid-column: 1 / -1;
  font-family: var(--font-project-title);
  font-size: 1.2rem;
  font-weight: 400;
  margin-bottom: 1rem;
  color: var(--text-on-light);
  opacity: 0.85;
}

.content-wide .project-detail-meta {
  grid-column: 1;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  line-height: 1.5;
  color: var(--text-on-light);
}

.content-wide .project-detail p,
.content-wide .project-detail .subsection-title,
.content-wide .project-detail .project-collab,
.content-wide .project-detail .bibliography,
.content-wide .project-detail .back-link,
.content-wide .project-detail .bib-list {
  grid-column: 3;
}

.content-wide .project-detail .project-detail-meta {
  margin-bottom: 0;
}

/* 项目专属排版 - 根据 data-project 覆盖，每个项目可单独定制 */
.content-wide .project-detail[data-project="drift-of-the-uncharted"] {
  grid-template-columns: 2fr 1fr 9fr;
}
.content-wide .project-detail[data-project="artificial-life-one-leg"] {
  grid-template-columns: 2fr 1fr 9fr;
}
.content-wide .project-detail[data-project="buffer-beach-let-the-waves-render"] {
  grid-template-columns: 2fr 1fr 9fr;
}
.content-wide .project-detail[data-project="return-to-the-peach-blossom-wonderland"] {
  grid-template-columns: 2fr 1fr 9fr;
}
.content-wide .project-detail[data-project="nomadic-annotators"] {
  grid-template-columns: 2fr 1fr 9fr;
}
.content-wide .project-detail[data-project="i-just-stay-in-my-home-not-go-anywhere"] {
  grid-template-columns: 1fr 1fr 10fr;
}
.content-wide .project-detail[data-project="amphibious-rover-ldn2030-scouting-log"] {
  grid-template-columns: 2fr 1fr 9fr;
}
.content-wide .project-detail[data-project="phalaenopsis-and-their-friends-whisper-their-tales"] {
  grid-template-columns: 2.5fr 1fr 8.5fr;
}

.content-wide .project-detail[data-project="phalaenopsis-and-their-friends-whisper-their-tales"] p {
  font-size: 1rem;
  line-height: 1.6;
}
.content-wide .project-detail[data-project="fish-tree-rings-and-memory"] {
  grid-template-columns: 1fr 1fr 10fr;
}

/* ============================================
   Drift of the Uncharted — 深色设计稿专属样式
   黑底白字，双栏桌面 / 单栏移动
   ============================================ */
.project-page-drift {
  --drift-bg: #000000;
  --drift-text: rgba(255, 255, 255, 0.9);
  --drift-font: 'Open Sans', sans-serif;
}

body.project-page-drift,
body.project-page-drift .page-wrapper,
.project-page-drift-main {
  background: var(--drift-bg) !important;
}

body.project-page-drift {
  overflow-x: hidden;
}

.project-drift {
  color: var(--drift-text);
}

.project-drift-title {
  font-family: 'ABC Arizona Serif', Georgia, 'Times New Roman', serif;
  font-size: 2.9rem;
  font-weight: 400;
  color: #ffffff;
  margin: 2.5rem 0 1.5rem 0;
}

.project-drift-year {
  font-family: var(--drift-font);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--drift-text);
  margin: 0 0 0.6rem 0;
  line-height: 1.4;
  opacity: 0.9;
}

.project-drift-keywords {
  font-family: var(--drift-font);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--drift-text);
  margin: 0;
  line-height: 1.4;
  opacity: 0.9;
}

.project-drift-hero {
  margin-bottom: 3rem;
}

.project-drift-meta-block {
  margin-bottom: 2rem;
}

.project-drift-hero-gallery {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.project-drift-hero-img {
  width: 100%;
  overflow: hidden;
  position: relative;
}

.project-drift-hero-img img {
  width: 100%;
  height: auto;
  display: block;
}

/* 图片滚动淡入 + 悬停放大图标 */
.project-drift-img-wrap {
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 1.2s ease-out, transform 1.2s ease-out;
}

.project-drift-img-wrap.project-drift-revealed {
  opacity: 1;
  transform: translateY(0);
}

.project-drift-img-wrap .project-drift-zoom {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  font-size: 2.5rem;
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
}

.project-drift-img-wrap:hover .project-drift-zoom {
  opacity: 1;
}

.project-drift-intro {
  margin-bottom: 3rem;
}

.project-drift-video {
  margin-bottom: 2rem;
}

.project-drift-text p {
  font-family: var(--drift-font);
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--drift-text);
  margin: 0 0 1.25rem 0;
  opacity: 0.9;
}

.project-drift-text p:last-child {
  margin-bottom: 0;
}

.project-drift-video {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  overflow: hidden;
  background: #000;
}

.project-drift-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.project-drift-context {
  margin-bottom: 3rem;
}

.project-drift-context-text {
  max-width: 75%;
  text-align: left;
  margin-right: auto;
}

.project-drift-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.project-drift-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.project-drift-maps {
  margin-bottom: 3rem;
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}

.project-drift-maps-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: stretch;
}

.project-drift-maps-row .project-drift-img-wrap {
  height: 100%;
  min-height: 260px;
}

.project-drift-maps-row .project-drift-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.project-drift-gallery {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 2rem;
}

.project-drift-gallery .project-drift-img-wrap {
  width: 75%;
}

.project-drift-gallery .project-drift-img-wrap img {
  width: 100%;
  height: auto;
  display: block;
}

/* Lightbox */
.project-drift-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  cursor: pointer;
}

.project-drift-lightbox[aria-hidden="true"] {
  display: none;
}

.project-drift-lightbox img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  cursor: default;
}

.project-drift-lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem;
}

.project-drift-back {
  display: inline-block;
  font-family: var(--drift-font);
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: color 0.2s;
}

.project-drift-back:hover {
  color: var(--drift-text);
}

body.project-page-drift .footer {
  color: rgba(255, 255, 255, 0.6);
  opacity: 0.9;
}

@media (max-width: 768px) {
  .project-drift-hero {
    margin-bottom: 2rem;
  }

  .project-drift-intro {
    margin-bottom: 2rem;
  }

  .project-drift-video {
    margin-bottom: 1.5rem;
  }

  .project-drift-title {
    font-size: 1.8rem;
  }

  .project-drift-year,
  .project-drift-keywords {
    font-size: 0.95rem;
  }

  .project-drift-context-text {
    max-width: 100%;
  }

  .project-drift-text p {
    font-size: 0.95rem;
  }

  .project-drift-grid {
    order: -1;
    grid-template-columns: repeat(2, 1fr);
    margin-bottom: 1.5rem;
  }

  .project-drift-maps-row {
    grid-template-columns: 1fr;
  }

  .project-drift-maps-row .project-drift-img-wrap {
    min-height: 180px;
  }

  .project-drift-gallery {
    align-items: stretch;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    gap: 0.75rem;
  }

  .project-drift-gallery .project-drift-img-wrap {
    width: 100%;
  }
}

/* About/Publications/Contact 的 content-wide 不受影响，仅 project 详情页 */
.project-detail-title {
  font-family: var(--font-project-title);
  font-size: 2.9rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
  color: var(--text-on-light);
}

.project-detail-subtitle {
  font-family: var(--font-project-title);
  font-size: 1.2rem;
  font-weight: 400;
  margin-bottom: 1rem;
  color: var(--text-on-light);
  opacity: 0.85;
}

.project-detail-meta {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--text-on-light);
  margin-bottom: 2rem;
}

.project-collab {
  font-family: var(--font-project-body);
  font-weight: 300;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.project-collab a {
  color: var(--text-on-light);
  text-decoration: underline;
}

/* ============================================
  Artificial Life: One Leg at a Time - 黑底排版
   ============================================ */
.project-page-one-leg {
  --one-leg-bg: #000000;
  --one-leg-text: rgba(255, 255, 255, 0.9);
}

body.project-page-one-leg,
body.project-page-one-leg .page-wrapper,
.project-page-one-leg-main {
  background: var(--one-leg-bg) !important;
}

body.project-page-one-leg {
  overflow-x: hidden;
}

.project-one-leg {
  color: var(--one-leg-text);
}

.project-one-leg-title {
  font-family: 'ABC Arizona Serif', Georgia, 'Times New Roman', serif;
  font-size: 2.9rem;
  font-weight: 400;
  color: #ffffff;
  margin: 2.5rem 0 1rem 0;
}

.project-one-leg-meta {
  font-family: 'Open Sans', sans-serif;
  font-size: 1.2rem;
  line-height: 1.5;
  color: var(--one-leg-text);
  margin: 0 0 1.75rem 0;
}

.project-one-leg-hero {
  margin-bottom: 2.5rem;
}

.project-one-leg-hero-gallery {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.project-one-leg-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: clamp(1rem, 3vw, 2rem);
  align-items: start;
  margin-bottom: 2.5rem;
}

.project-one-leg-brief-title {
  font-family: 'ABC Arizona Serif', Georgia, 'Times New Roman', serif;
  font-size: 1.65rem;
  font-weight: 400;
  margin: 0;
  color: #ffffff;
}

.project-one-leg-right-content p,
.project-one-leg-left-content p {
  font-family: 'Open Sans', sans-serif;
  font-size: 1.1rem;
  line-height: 1.65;
  margin: 0 0 1.2rem 0;
  color: var(--one-leg-text);
}

.project-one-leg-left-content p:last-child {
  margin-bottom: 0;
}

.project-one-leg-mid-gallery {
  margin-top: 1rem;
}

.project-one-leg-video {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  overflow: hidden;
  margin-bottom: 2.5rem;
  background: #000;
}

.project-one-leg-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.project-one-leg-back {
  display: inline-block;
  font-family: 'Open Sans', sans-serif;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  margin-top: 0.5rem;
}

.project-one-leg-back:hover {
  color: #ffffff;
}

body.project-page-one-leg .project-gallery,
body.project-page-one-leg .project-gallery .gallery-slide {
  background: #000;
}

body.project-page-one-leg .project-gallery .gallery-arrow {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

body.project-page-one-leg .project-gallery .gallery-arrow:hover {
  background: rgba(255, 255, 255, 0.3);
}

body.project-page-one-leg .footer {
  color: rgba(255, 255, 255, 0.65);
}

/* ============================================
   Return to the Peach Blossom Wonderland — 黑底
   ============================================ */
.project-page-peach {
  --peach-bg: #000000;
  --peach-text: rgba(255, 255, 255, 0.9);
  --peach-font: 'Open Sans', sans-serif;
}

body.project-page-peach,
body.project-page-peach .page-wrapper,
.project-page-peach-main {
  background: var(--peach-bg) !important;
}

body.project-page-peach {
  overflow-x: hidden;
}

.project-peach {
  color: var(--peach-text);
}

.project-peach-title {
  font-family: 'ABC Arizona Serif', Georgia, 'Times New Roman', serif;
  font-size: 2.9rem;
  font-weight: 400;
  color: #ffffff;
  margin: 2.5rem 0 1.5rem 0;
}

.project-peach-meta {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-family: var(--peach-font);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--peach-text);
  text-align: left;
  margin: 0 0 3em 0;
  line-height: 1.5;
  opacity: 0.9;
}

.project-peach-quote {
  text-align: center;
  margin-top: 6rem;
  margin-bottom: 4rem;
}

.project-peach-quote p {
  font-family: var(--peach-font);
  font-size: 1.15rem;
  font-weight: 400;
  line-height: 1.7;
  color: var(--peach-text);
  margin: 0 0 1rem 0;
  opacity: 0.9;
}

.project-peach-quote p:last-child {
  margin-bottom: 0;
}

.project-peach-video {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  overflow: hidden;
  margin-bottom: 20rem;
  background: #000;
}

.project-peach-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.project-peach-body {
  max-width: 66.67%;
  margin: 0 auto 10rem;
}

.project-peach-text {
  margin-bottom: 2rem;
}

.project-peach-text p {
  font-family: var(--peach-font);
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--peach-text);
  margin: 0;
  opacity: 0.9;
}

.project-peach-poster {
  margin-top: 20rem;
  margin-bottom: 2rem;
}

.project-peach-poster img {
  width: 100%;
  height: auto;
  display: block;
}

.project-peach-back {
  display: inline-block;
  font-family: var(--peach-font);
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: color 0.2s;
}

.project-peach-back:hover {
  color: #ffffff;
}

body.project-page-peach .project-gallery,
body.project-page-peach .project-gallery .gallery-slide {
  background: #000;
}

body.project-page-peach .project-gallery .gallery-arrow {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

body.project-page-peach .project-gallery .gallery-arrow:hover {
  background: rgba(255, 255, 255, 0.3);
}

body.project-page-peach .footer {
  color: rgba(255, 255, 255, 0.65);
}

/* ============================================
   Buffer Beach: Let the Currents Render — 黑底
   ============================================ */
.project-page-buffer {
  --buffer-bg: #000000;
  --buffer-text: rgba(255, 255, 255, 0.9);
  --buffer-font: 'Open Sans', sans-serif;
}

body.project-page-buffer,
body.project-page-buffer .page-wrapper,
.project-page-buffer-main {
  background: var(--buffer-bg) !important;
}

body.project-page-buffer {
  overflow-x: hidden;
}

.project-buffer {
  color: var(--buffer-text);
}

.project-buffer-title {
  font-family: 'ABC Arizona Serif', Georgia, 'Times New Roman', serif;
  font-size: 2.9rem;
  font-weight: 400;
  color: #ffffff;
  margin: 2.5rem 0 2rem 0;
}

.project-buffer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: clamp(1rem, 3vw, 2rem);
  align-items: start;
  margin-bottom: 20rem;
}

.project-buffer-grid-1 {
  grid-template-columns: 0.1fr 3.8fr 0.1fr;
}

.project-buffer-grid-2 {
  grid-template-columns: 1fr 1.4fr 1fr;
}

.project-buffer-meta {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-family: var(--buffer-font);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--buffer-text);
  opacity: 0.9;
}

.project-buffer-video {
  position: relative;
  width: 100%;
  min-height: 80vh;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
}

.project-buffer-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.project-buffer-text p {
  font-family: var(--buffer-font);
  font-size: 1.15rem;
  font-weight: 400;
  line-height: 1.65;
  color: var(--buffer-text);
  margin: 0 0 1rem 0;
  opacity: 0.9;
}

.project-buffer-text p:last-child {
  margin-bottom: 0;
}

.project-buffer-text a {
  color: rgba(255, 255, 255, 0.95);
  text-decoration: underline;
}

.project-buffer-text a:hover {
  color: #ffffff;
}

.project-buffer-back {
  display: inline-block;
  font-family: var(--buffer-font);
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: color 0.2s;
}

.project-buffer-back:hover {
  color: #ffffff;
}

body.project-page-buffer .project-gallery,
body.project-page-buffer .project-gallery .gallery-slide {
  background: #000;
}

body.project-page-buffer .project-gallery .gallery-arrow {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

body.project-page-buffer .project-gallery .gallery-arrow:hover {
  background: rgba(255, 255, 255, 0.3);
}

body.project-page-buffer .footer {
  color: rgba(255, 255, 255, 0.65);
}

@media (max-width: 768px) {
  .project-buffer-title {
    font-size: 1.8rem;
  }

  .project-buffer-grid,
  .project-buffer-grid-1,
  .project-buffer-grid-2 {
    grid-template-columns: 1fr;
    margin-bottom: 6rem;
  }

  .project-buffer-meta {
    font-size: 0.95rem;
  }

  .project-buffer-text p {
    font-size: 0.95rem;
  }
}

/* ============================================
   Nomadic Annotators — 黑底
   ============================================ */
.project-page-nomadic {
  --nomadic-bg: #000000;
  --nomadic-text: rgba(255, 255, 255, 0.9);
  --nomadic-font: 'Open Sans', sans-serif;
}

body.project-page-nomadic,
body.project-page-nomadic .page-wrapper,
.project-page-nomadic-main {
  background: var(--nomadic-bg) !important;
}

body.project-page-nomadic {
  overflow-x: hidden;
}

.project-nomadic {
  color: var(--nomadic-text);
}

.project-nomadic-title {
  font-family: 'ABC Arizona Serif', Georgia, 'Times New Roman', serif;
  font-size: 2.9rem;
  font-weight: 400;
  color: #ffffff;
  margin: 2.5rem 0 2rem 0;
}

.project-nomadic-grid {
  display: grid;
  gap: clamp(1rem, 3vw, 2rem);
  align-items: start;
  margin-bottom: 2.5rem;
}

.project-nomadic-grid-1 {
  grid-template-columns: 1fr 11fr;
}

.project-nomadic-grid-2,
.project-nomadic-grid-3 {
  grid-template-columns: 1fr 2fr;
}

.project-nomadic-meta {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-family: var(--nomadic-font);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--nomadic-text);
  opacity: 0.9;
}

.project-nomadic-hero img {
  width: 100%;
  height: auto;
  display: block;
}

.project-nomadic-video {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  overflow: hidden;
  margin-bottom: 2.5rem;
  background: #000;
}

.project-nomadic-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.project-nomadic-text p {
  font-family: var(--nomadic-font);
  font-size: 1.15rem;
  font-weight: 400;
  line-height: 1.65;
  color: var(--nomadic-text);
  margin: 0 0 1rem 0;
  opacity: 0.9;
}

.project-nomadic-text p:last-child {
  margin-bottom: 0;
}

.project-nomadic-text a {
  color: rgba(255, 255, 255, 0.95);
  text-decoration: underline;
}

.project-nomadic-text a:hover {
  color: #ffffff;
}

.project-nomadic-gallery-bottom {
  margin-bottom: 2rem;
}

.project-nomadic-back {
  display: inline-block;
  font-family: var(--nomadic-font);
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: color 0.2s;
}

.project-nomadic-back:hover {
  color: #ffffff;
}

body.project-page-nomadic .project-gallery,
body.project-page-nomadic .project-gallery .gallery-slide {
  background: #000;
}

body.project-page-nomadic .project-gallery .gallery-arrow {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

body.project-page-nomadic .project-gallery .gallery-arrow:hover {
  background: rgba(255, 255, 255, 0.3);
}

body.project-page-nomadic .footer {
  color: rgba(255, 255, 255, 0.65);
}

/* ============================================
   I Just Stay in My Home, Not Go Anywhere — 黑底
   ============================================ */
.project-page-i-just-stay {
  --ijuststay-bg: #000000;
  --ijuststay-text: rgba(255, 255, 255, 0.9);
  --ijuststay-font: 'Open Sans', sans-serif;
}

body.project-page-i-just-stay,
body.project-page-i-just-stay .page-wrapper,
.project-page-i-just-stay-main {
  background: var(--ijuststay-bg) !important;
}

body.project-page-i-just-stay {
  overflow-x: hidden;
}

.project-i-just-stay {
  color: var(--ijuststay-text);
}

.project-i-just-stay-title {
  font-family: 'ABC Arizona Serif', Georgia, 'Times New Roman', serif;
  font-size: 2.9rem;
  font-weight: 400;
  color: #ffffff;
  margin: 2.5rem 0 2rem 0;
}

.project-i-just-stay-grid {
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: clamp(1rem, 3vw, 2rem);
  align-items: start;
  margin-bottom: 2.5rem;
}

.project-i-just-stay-meta {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-family: var(--ijuststay-font);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--ijuststay-text);
  opacity: 0.9;
}

.project-i-just-stay-video {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  overflow: hidden;
  background: #000;
}

.project-i-just-stay-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.project-i-just-stay-text {
  padding-top: 6em;
}

.project-i-just-stay-text p {
  font-family: var(--ijuststay-font);
  font-size: 1.15rem;
  font-weight: 400;
  line-height: 1.65;
  color: var(--ijuststay-text);
  margin: 0;
  opacity: 0.9;
}

.project-i-just-stay-back {
  display: inline-block;
  font-family: var(--ijuststay-font);
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: color 0.2s;
}

.project-i-just-stay-back:hover {
  color: #ffffff;
}

body.project-page-i-just-stay .project-gallery,
body.project-page-i-just-stay .project-gallery .gallery-slide {
  background: #000;
}

body.project-page-i-just-stay .project-gallery .gallery-arrow {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

body.project-page-i-just-stay .project-gallery .gallery-arrow:hover {
  background: rgba(255, 255, 255, 0.3);
}

body.project-page-i-just-stay .footer {
  color: rgba(255, 255, 255, 0.65);
}

@media (max-width: 768px) {
  .project-i-just-stay-title {
    font-size: 1.8rem;
  }

  .project-i-just-stay-grid {
    grid-template-columns: 1fr;
    margin-bottom: 2rem;
  }

  .project-i-just-stay-meta {
    font-size: 0.95rem;
  }

  .project-i-just-stay-text p {
    font-size: 0.95rem;
  }
}

/* ============================================
   Amphibious Rover LDN2030 Scouting Log — 黑底
   ============================================ */
.project-page-amphibious {
  --amphibious-bg: #000000;
  --amphibious-text: rgba(255, 255, 255, 0.9);
  --amphibious-font: 'Open Sans', sans-serif;
}

body.project-page-amphibious,
body.project-page-amphibious .page-wrapper,
.project-page-amphibious-main {
  background: var(--amphibious-bg) !important;
}

body.project-page-amphibious {
  overflow-x: hidden;
}

.project-amphibious {
  color: var(--amphibious-text);
}

.project-amphibious-title {
  font-family: 'ABC Arizona Serif', Georgia, 'Times New Roman', serif;
  font-size: 2.9rem;
  font-weight: 400;
  color: #ffffff;
  margin: 2.5rem 0 2rem 0;
}

.project-amphibious-grid {
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: clamp(1rem, 3vw, 2rem);
  align-items: start;
  margin-bottom: 2.5rem;
}

.project-amphibious-meta {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-family: var(--amphibious-font);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--amphibious-text);
  opacity: 0.9;
}

.project-amphibious-collab {
  font-family: var(--amphibious-font);
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--amphibious-text);
  margin: 1rem 0 0 0;
  opacity: 0.9;
}

.project-amphibious-collab a {
  color: rgba(255, 255, 255, 0.95);
  text-decoration: underline;
}

.project-amphibious-collab a:hover {
  color: #ffffff;
}

.project-amphibious-text p {
  font-family: var(--amphibious-font);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--amphibious-text);
  margin: 0 0 1rem 0;
  opacity: 0.9;
}

.project-amphibious-text p:last-child {
  margin-bottom: 0;
}

.project-amphibious-text a {
  color: rgba(255, 255, 255, 0.95);
  text-decoration: underline;
}

.project-amphibious-text a:hover {
  color: #ffffff;
}

.project-amphibious-ref {
  font-size: 0.9rem !important;
  opacity: 0.85 !important;
}

.project-amphibious-img.reveal-on-scroll {
  opacity: 0;
  transform: translateY(120px);
  transition: opacity 2s ease-out, transform 2s ease-out;
}

.project-amphibious-img.reveal-on-scroll.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

.project-amphibious-img img {
  width: 100%;
  height: auto;
  display: block;
}

.project-amphibious-video {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  overflow: hidden;
  background: #000;
}

.project-amphibious-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.project-amphibious-back {
  display: inline-block;
  font-family: var(--amphibious-font);
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: color 0.2s;
}

.project-amphibious-back:hover {
  color: #ffffff;
}

body.project-page-amphibious .footer {
  color: rgba(255, 255, 255, 0.65);
}

/* ============================================
   Fish, Tree Rings and Memory Technology — 白底
   ============================================ */
.project-page-fish {
  --fish-font: 'Open Sans', sans-serif;
}

body.project-page-fish,
body.project-page-fish .page-wrapper,
.project-page-fish-main {
  background: #ffffff !important;
}

.project-fish {
  color: #333;
}

.project-fish-title {
  font-family: 'ABC Arizona Serif', Georgia, 'Times New Roman', serif;
  font-size: 2.9rem;
  font-weight: 400;
  color: #111;
  margin: 2.5rem 0 2rem 0;
}

.project-fish-grid {
  display: grid;
  grid-template-columns: 1fr 4fr;
  gap: clamp(1rem, 3vw, 2rem);
  align-items: start;
  margin-bottom: 2.5rem;
}

.project-fish-meta {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-family: var(--fish-font);
  font-size: 1.1rem;
  font-weight: 400;
  color: #555;
}

.project-fish-video {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  overflow: hidden;
  background: #000;
}

.project-fish-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.project-fish-text p {
  font-family: var(--fish-font);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  color: #333;
  margin: 0;
}

.project-fish-back {
  display: inline-block;
  font-family: var(--fish-font);
  font-size: 1rem;
  color: #333;
  text-decoration: none;
  transition: color 0.2s;
}

.project-fish-back:hover {
  color: #000;
}

@media (max-width: 768px) {
  .project-fish-title {
    font-size: 1.8rem;
  }

  .project-fish-grid {
    grid-template-columns: 1fr;
    margin-bottom: 2rem;
  }

  .project-fish-meta {
    font-size: 0.95rem;
  }

  .project-fish-text p {
    font-size: 0.9rem;
  }
}

/* ============================================
   Phalaenopsis and their Friends — 白底
   ============================================ */
.project-page-phalaenopsis {
  --phalaenopsis-font: 'Open Sans', sans-serif;
}

body.project-page-phalaenopsis,
body.project-page-phalaenopsis .page-wrapper,
.project-page-phalaenopsis-main {
  background: #ffffff !important;
}

.project-phalaenopsis {
  color: #333;
}

.project-phalaenopsis-title {
  font-family: 'ABC Arizona Serif', Georgia, 'Times New Roman', serif;
  font-size: 2.9rem;
  font-weight: 400;
  color: #111;
  margin: 2.5rem 0 0.5rem 0;
  text-align: left;
}

.project-phalaenopsis-subtitle {
  font-family: 'ABC Arizona Serif', Georgia, 'Times New Roman', serif;
  font-size: 1.2rem;
  font-weight: 400;
  color: #555;
  margin: 0 0 2rem 0;
  text-align: left;
}

.project-phalaenopsis-grid {
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: clamp(1rem, 3vw, 2rem);
  align-items: start;
  margin-bottom: 2.5rem;
}

.project-phalaenopsis-meta {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-family: var(--phalaenopsis-font);
  font-size: 1.1rem;
  font-weight: 400;
  color: #555;
  text-align: left;
}

.project-phalaenopsis-right {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.project-phalaenopsis-video {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  overflow: hidden;
  background: #000;
}

.project-phalaenopsis-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.project-phalaenopsis-text {
  text-align: left;
}

.project-phalaenopsis-text p {
  font-family: var(--phalaenopsis-font);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  color: #333;
  margin: 0 0 1rem 0;
}

.project-phalaenopsis-text p:last-child {
  margin-bottom: 0;
}

.project-phalaenopsis-back {
  display: inline-block;
  font-family: var(--phalaenopsis-font);
  font-size: 1rem;
  color: #333;
  text-decoration: none;
  transition: color 0.2s;
}

.project-phalaenopsis-back:hover {
  color: #000;
}

.project-phalaenopsis-hero {
  width: 100%;
  margin: 2.5rem 0;
  overflow: hidden;
}

.project-phalaenopsis-hero img {
  width: 100%;
  height: auto;
  display: block;
}

.project-phalaenopsis-lang {
  display: flex;
  justify-content: flex-start;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.phala-lang-btn {
  font-family: var(--phalaenopsis-font);
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border: 1px solid #999;
  background: #fff;
  color: #333;
  cursor: pointer;
  transition: all 0.2s;
}

.phala-lang-btn:hover {
  border-color: #333;
  color: #000;
}

.phala-lang-btn.active {
  background: #333;
  color: #fff;
  border-color: #333;
}

.project-phalaenopsis-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem 2rem;
  margin-bottom: 2.5rem;
}

.phala-grid-cell {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.phala-cell-img {
  width: 80%;
  margin: 0 auto;
  min-height: 0;
  overflow: hidden;
  background: #f5f5f5;
}

.phala-cell-img img {
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
  display: block;
}

.phala-cell-poem {
  font-family: var(--phalaenopsis-font);
  font-size: 0.9rem;
  line-height: 1.6;
  color: #444;
  text-align: center;
}

.phala-cell-poem .phala-line {
  display: block;
}

.phala-cell-poem .phala-line:not(:last-child) {
  margin-bottom: 0.25rem;
}

/* Essay 2-column: EN left, CH right */
.project-phalaenopsis-essay {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.phala-essay-col {
  font-family: var(--phalaenopsis-font);
  font-size: 0.95rem;
  line-height: 1.65;
  color: #333;
  text-align: left;
}

.phala-essay-col p {
  margin: 0 0 1rem 0;
}

.phala-essay-col p:last-child {
  margin-bottom: 0;
}

.phala-essay-title {
  font-family: 'ABC Arizona Serif', Georgia, 'Times New Roman', serif;
  font-size: 1.4rem;
  font-weight: 400;
  color: #111;
  margin: 0 0 1rem 0;
}

.phala-essay-lang-en .phala-essay-zh {
  display: none;
}

.phala-essay-lang-zh .phala-essay-en {
  display: none;
}

.phala-essay-lang {
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
}

/* Reference 占全页面，在 Back 前，无 Bibliography，无 bullets，全铺开 */
.project-phalaenopsis-reference {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  padding: 2.5rem 5vw;
  background: #f8f8f8;
  margin-bottom: 2.5rem;
  margin-top: 2rem;
  box-sizing: border-box;
}

.phala-reference-title {
  font-family: 'ABC Arizona Serif', Georgia, 'Times New Roman', serif;
  font-size: 1.5rem;
  font-weight: 400;
  color: #111;
  margin: 0 0 1.25rem 0;
  text-align: left;
}

.phala-reference-list {
  font-family: var(--phalaenopsis-font);
  font-size: 0.9rem;
  line-height: 1.8;
  color: #444;
  margin: 0;
  padding: 0;
  width: 100%;
}

.phala-ref-item {
  margin-bottom: 0.6rem;
  padding: 0;
}

.phala-ref-item:last-child {
  margin-bottom: 0;
}

@media (max-width: 1024px) {
  .project-phalaenopsis-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .project-phalaenopsis-grid-4 {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .project-phalaenopsis-title {
    font-size: 1.8rem;
  }

  .project-phalaenopsis-subtitle {
    font-size: 1rem;
  }

  .project-phalaenopsis-grid {
    grid-template-columns: 1fr;
    margin-bottom: 2rem;
  }

  .project-phalaenopsis-meta {
    font-size: 0.95rem;
  }

  .project-phalaenopsis-text p {
    font-size: 0.9rem;
  }

  .project-phalaenopsis-essay {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .phala-essay-col {
    font-size: 0.9rem;
  }

  .phala-reference-list {
    font-size: 0.85rem;
  }

  .project-phalaenopsis-reference {
    margin-left: calc(50% - 50vw);
    padding: 2rem 1.25rem;
  }
}

@media (max-width: 768px) {
  .project-amphibious-title {
    font-size: 1.8rem;
  }

  .project-amphibious-grid {
    grid-template-columns: 1fr;
    margin-bottom: 2rem;
  }

  .project-amphibious-meta {
    font-size: 0.95rem;
  }

  .project-amphibious-text p {
    font-size: 0.9rem;
  }
}

@media (max-width: 768px) {
  .project-nomadic-title {
    font-size: 1.8rem;
  }

  .project-nomadic-grid-1,
  .project-nomadic-grid-2,
  .project-nomadic-grid-3 {
    grid-template-columns: 1fr;
    margin-bottom: 2rem;
  }

  .project-nomadic-meta {
    font-size: 0.95rem;
  }

  .project-nomadic-text p {
    font-size: 0.95rem;
  }
}

@media (max-width: 768px) {
  .project-peach-title {
    font-size: 1.8rem;
  }

  .project-peach-meta {
    font-size: 0.95rem;
    margin-bottom: 2.5em;
  }

  .project-peach-quote p {
    font-size: 0.95rem;
  }

  .project-peach-body {
    max-width: 100%;
  }

  .project-peach-text p {
    font-size: 0.95rem;
  }
}

@media (max-width: 768px) {
  .project-one-leg-title {
    font-size: 1.8rem;
    margin-top: 1.75rem;
  }

  .project-one-leg-meta {
    font-size: 0.95rem;
  }

  .project-one-leg-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
  }

  .project-one-leg-right-content p,
  .project-one-leg-left-content p {
    font-size: 0.95rem;
  }
}

/* Project Gallery - 标题上图库轮播，当前向左滑出、新图从右滑入 */
.project-gallery {
  position: relative;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  margin: 0 0 1.5rem 0;
  overflow: hidden;
  background: #fff;
  opacity: 0;
  transform: translateY(120px);
  transition: opacity 2s ease-out, transform 2s ease-out;
}

/* 首页 index：gallery 全页面宽 16:9，居中；overflow 放 main 避免裁切 header 名字 */
body.page-index .page-wrapper {
  overflow-x: hidden;
}
body.page-index .project-gallery {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-bottom: 1.5rem;
}

.project-gallery.gallery-visible {
  opacity: 1;
  transform: translateY(0);
}

/* 悬停时显示左右箭头 */
.project-gallery .gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.12);
  color: #333;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.2s, background 0.2s;
}

.project-gallery:hover .gallery-arrow {
  opacity: 1;
}

.project-gallery .gallery-arrow:hover {
  background: rgba(0, 0, 0, 0.22);
}

.project-gallery .gallery-arrow-prev {
  left: 12px;
}

.project-gallery .gallery-arrow-next {
  right: 12px;
}

.project-gallery .gallery-arrow svg {
  width: 20px;
  height: 20px;
}

.project-gallery .gallery-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: translateX(100%);
  opacity: 1;
  transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1), opacity 1s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
  background: #fff;
}

.project-gallery .gallery-slide.active {
  transform: translateX(0);
  opacity: 1;
  z-index: 2;
}

.project-gallery .gallery-slide.slide-out-left {
  transform: translateX(-100%);
  z-index: 1;
}

.project-gallery .gallery-slide.slide-out-right {
  transform: translateX(100%);
  z-index: 1;
}

/* 新图从右滑入时同时淡入，避免中间露出背景 */
.project-gallery .gallery-slide.slide-in-right {
  transform: translateX(100%);
  opacity: 0;
  z-index: 2;
}

.project-gallery .gallery-slide.slide-in-right.active {
  transform: translateX(0);
  opacity: 1;
  z-index: 2;
}

.project-gallery .gallery-slide.slide-in-left {
  transform: translateX(-100%);
  opacity: 0;
  z-index: 2;
}

.project-gallery .gallery-slide.slide-in-left.active {
  transform: translateX(0);
  opacity: 1;
  z-index: 2;
}

.project-gallery .gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* fit: contain - 完整显示图片不裁剪（gallery-config fit: 'contain'） */
.project-gallery.gallery-fit-contain .gallery-slide img {
  object-fit: contain !important;
  object-position: center;
}

.project-detail p {
  font-family: var(--font-project-body);
  font-weight: 300;
  font-size: 1.2rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
  color: var(--text-on-light);
}

.project-detail p:last-of-type {
  margin-bottom: 2rem;
}

.project-ref {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.project-ref a {
  color: var(--text-muted);
}

.subsection-title {
  font-family: var(--font-project-title);
  font-size: 1.5rem;
  font-weight: 400;
  margin: 2rem 0 0.75rem;
  color: var(--text-on-light);
}

.bibliography {
  margin: 2.5rem 0;
}

.bib-list {
  list-style: none;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.bib-list li {
  margin-bottom: 0.5rem;
}

.back-link {
  display: inline-block;
  font-size: 1rem;
  color: var(--text-muted);
  text-decoration: none;
  margin-top: 2rem;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--text-on-light);
}

/* Project 子页面：底部其他项目列表 */
.project-nav-wrapper {
  width: var(--content-width);
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 3rem 2rem;
}

.project-nav {
  font-family: var(--font-mono);
}

.project-nav-title {
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.project-nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.project-nav-item {
  display: flex;
  align-items: baseline;
  gap: 0.35em;
  font-size: 1.1rem;
  color: var(--text-on-light);
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.project-nav-item:hover {
  color: var(--text-muted);
}

.project-nav-item-current {
  color: var(--text-muted);
  cursor: default;
  pointer-events: none;
}

.project-nav-item-year {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.project-nav-arrow {
  margin-left: auto;
  font-size: 0.9rem;
  opacity: 0.6;
}

.project-nav-back {
  display: inline-block;
  margin-top: 2rem;
  font-size: 1rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.project-nav-back:hover {
  color: var(--text-on-light);
}

/* Footer - 透明底面 */
.footer {
  padding: 2rem;
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--text-muted);
  text-align: center;
  background: transparent;
}

/* Responsive - 手机端 */
@media (max-width: 768px) {
  html {
    font-size: 15px;
  }

  .nav {
    gap: 0.15rem;
  }

  .hero {
    padding: 0;
    text-align: right;
  }

  .content,
  .content-wide,
  .content-narrow {
    padding: 0;
  }

  /* 正文和标题缩小，避免过大 */
  .intro-text {
    font-size: 0.95rem;
    font-style: normal;
  }

  .caption {
    font-size: 1.5em;
  }

  /* 层级：标题 > 引文(caption) > 标签/关键词 */
  .project-title {
    font-size: 1.15rem;
  }

  .project-quote {
    font-size: 0.8rem;
    line-height: 1.5;
  }

  .project-year {
    font-size: 0.75em;
  }

  .project-meta {
    font-size: 0.75rem;
  }

  .project-meta .tag {
    font-size: 0.65rem;
    padding: 1px 6px;
  }

  .project-info {
    display: flex;
    flex-direction: column;
  }

  .publication {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .contact-value {
    font-size: 1.1rem;
  }

  .project-detail-title {
    font-size: 1.5rem;
    line-height: 1.35;
  }

  .project-detail-subtitle {
    font-size: 1rem;
    margin-bottom: 0.75rem;
  }

  .project-detail-meta {
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 1.25rem;
  }

  .project-detail p {
    font-size: 0.95rem;
    line-height: 1.65;
    margin-bottom: 1rem;
  }

  .content-wide .project-detail[data-project="phalaenopsis-and-their-friends-whisper-their-tales"] p {
    font-size: 0.9rem;
  }

  .subsection-title {
    font-size: 1.2rem;
    margin: 1.5rem 0 0.5rem;
  }

  .project-collab {
    font-size: 0.82rem;
    margin-bottom: 1rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  /* Project 详情页：手机端单列，meta 在上、正文在下 */
  .content-wide .project-detail {
    grid-template-columns: 1fr;
  }

  .content-wide .project-detail-meta,
  .content-wide .project-detail p,
  .content-wide .project-detail .subsection-title,
  .content-wide .project-detail .project-collab,
  .content-wide .project-detail .bibliography,
  .content-wide .project-detail .back-link,
  .content-wide .project-detail .bib-list {
    grid-column: 1;
  }

  .content-wide .project-detail-meta {
    margin-bottom: 1.25rem;
  }

  /* About 页面：手机端单列，内容全宽 */
  .about-section {
    grid-template-columns: 1fr;
  }

  .about-section > * {
    grid-column: 1;
  }

  .about-section .section-title {
    font-size: 1.2rem;
  }

  .about-intro,
  .about-bio {
    font-size: 0.95rem;
  }

  .about-section .cv-category {
    font-size: 0.75rem;
  }

  .about-section .cv-list li {
    font-size: 0.8rem;
  }
}
