/* ===== 基础设置 ===== */
* {
  box-sizing: border-box;
}

body {
  margin: 0 auto;
  padding: 60px 8vw;
  background: #ffffff;
  color: #111111;
  font-family: -apple-system, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  max-width: 1200px;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ===== 顶部：姓名简介 + 联系方式 ===== */
.header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 80px;
  flex-wrap: wrap;
  gap: 20px;
}

.header .bio {
  max-width: 600px;
}

.header .bio p {
  margin: 0 0 6px 0;
}

.header .contact {
  display: flex;
  gap: 24px;
  font-size: 15px;
  white-space: nowrap;
}

/* ===== 年份分组标题 ===== */
.year-block {
  margin-bottom: 60px;
}

.year-title {
  text-align: center;
  font-size: 16px;
  margin-bottom: 36px;
  letter-spacing: 1px;
}

/* ===== 作品条目网格 ===== */
.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px 40px;
}

.work-item .title-cn {
  margin: 0;
}

.work-item .title-en {
  margin: 0;
  color: #444;
}

/* 响应式：窄屏时变成单列 */
@media (max-width: 700px) {
  body {
    padding: 40px 6vw;
  }
  .works-grid {
    grid-template-columns: 1fr;
  }
  .header {
    flex-direction: column;
  }
}

/* ===== CV 页面 ===== */
.cv-meta p {
  margin: 2px 0;
}

.cv-entry {
  margin-top: 28px;
}

.cv-venue {
  font-weight: 600;
  margin: 0 0 6px 0;
}

.cv-title {
  font-weight: 600;
  margin: 0;
}

.cv-detail {
  margin: 0;
  color: #333;
}

.cv-date {
  margin: 0;
  color: #333;
}

.cv-section-title {
  font-weight: 600;
  margin-top: 48px;
  margin-bottom: 16px;
}

.cv-list {
  margin: 0;
  padding-left: 18px;
}

.cv-list li {
  margin-bottom: 8px;
}

/* ===== 作品详情页 ===== */
.back-link {
  display: inline-block;
  margin-bottom: 40px;
}

.project-title-cn {
  font-size: 22px;
  margin: 0 0 4px 0;
}

.project-title-en {
  font-size: 16px;
  color: #444;
  margin: 0 0 40px 0;
}

.project-media img,
.project-media video {
  max-width: 100%;
  display: block;
  margin-bottom: 24px;
}

.project-description {
  max-width: 700px;
}
/* ===== 自动播放相册 ===== */
.slideshow {
  position: relative;
  width: 100%;
  max-width: 700px;
  height: 500px;
  overflow: hidden;
  margin: 0 0 24px 0;
  background: #fff;
}

.slideshow img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.slide-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.7);
  border: none;
  font-size: 20px;
  padding: 8px 12px;
  cursor: pointer;
}

.slide-btn:hover {
  background: rgba(255,255,255,0.95);
}

.slide-prev {
  left: 10px;
}

.slide-next {
  right: 10px;
}
.related-works {
  margin: 24px 0 40px 0;
}

.related-works p {
  margin: 0 0 8px 0;
}

.related-works a {
  text-decoration: underline;
}

/* 手机屏幕下,相册框的高度(必须写在 .slideshow 基础规则之后才会生效) */
@media (max-width: 700px) {
  .slideshow {
    height: 300px;
  }
}

/* ===== 长文图文叙事页(如 imaginariesofanisland) ===== */
.project-quote {
  font-style: italic;
  color: #555;
  text-align: center;
  margin: 32px 0;
}

.doc-figure {
  margin: 0 0 32px 0;
}

.doc-figure img {
  width: 100%;
  display: block;
}

.img-pair {
  display: flex;
  gap: 16px;
}

.img-pair img {
  width: 50%;
  display: block;
}

.img-caption {
  font-size: 13px;
  font-style: italic;
  color: #666;
  margin: 10px 0 0 0;
}

.project-info {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid #ddd;
}

.project-info p {
  margin: 0 0 6px 0;
}

/* ===== 句子网格 + 点开弹窗(水边踏踏步) ===== */
.sentence-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 40px 0 120px 0;   /* 下面多留一段空白,不要贴着页面底部 */
}

.sentence-cell {
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* 内容统一从格子顶部开始排 */
  font-family: inherit;
  font-size: 15px;
  line-height: 1.7;
  color: inherit;
  text-align: left;
  background: #fff;
  border: 1px solid #e2e2e2;
  padding: 28px 24px;
  min-height: 140px;
  cursor: pointer;
}

.sentence-cell:hover {
  background: #f5f5f5;
}

.cell-cn {
  display: block;
}

.cell-en {
  display: block;
  margin-top: 10px;
  font-family: "Courier New", Courier, monospace;
  font-size: 14px;
  color: #666;
}

.cell-by {
  display: block;
  margin-top: 16px;
  font-size: 13px;
  color: #999;
  white-space: pre-wrap; /* 保留名字里的空格,比如 （     ） */
}

#modal-by {
  white-space: pre-wrap;
}

.modal-empty {
  margin: 0;
  padding: 80px 0;
  text-align: center;
  color: #999;
  border: 1px solid #e2e2e2;
}

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #ffffff;
  overflow-y: auto;
  padding: 60px 6vw;
  justify-content: center;
  align-items: flex-start;
}

.modal-overlay.open {
  display: flex;
}

.modal-box {
  position: relative;
  width: 100%;
  max-width: 1000px;
}

.modal-close {
  position: fixed;
  top: 20px;
  right: 6vw;
  font-size: 32px;
  line-height: 1;
  background: none;
  border: none;
  cursor: pointer;
  color: #111;
}

.modal-head {
  max-width: 700px;
  margin-bottom: 32px;
}

.modal-sentence {
  margin: 0 0 8px 0;
  font-weight: 600;
}

.modal-note {
  margin: 0;
  color: #444;
}

/* 相册:瀑布流排列,保留每张照片原始比例(横图竖图都不裁切) */
.gallery {
  columns: 3;
  column-gap: 12px;
}

.gallery img {
  width: 100%;
  display: block;
  margin-bottom: 12px;
  break-inside: avoid;
  cursor: zoom-in;
}

/* 点击照片后的大图查看 */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #ffffff;
  justify-content: center;
  align-items: center;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
}

.lb-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 28px;
  padding: 16px;
  cursor: pointer;
  color: #111;
}

.lb-prev { left: 1vw; }
.lb-next { right: 1vw; }

.lb-close {
  position: absolute;
  top: 20px;
  right: 6vw;
  font-size: 32px;
  line-height: 1;
  background: none;
  border: none;
  cursor: pointer;
  color: #111;
}

@media (max-width: 700px) {
  .sentence-grid {
    grid-template-columns: 1fr;
    margin-bottom: 140px;   /* 手机浏览器底部的工具栏会盖住一部分,所以多留一点 */
  }
  .gallery {
    columns: 2;
  }
}

/* 水边踏踏步:格子上方的介绍区域 */
.project-intro {
  margin-top: 28px;
}

/* ===== 首页轮播 ===== */
.home-slideshow {
  position: relative;
  width: 100%;
  height: 420px;
  overflow: hidden;
  background: #fff;
  margin: 0 0 12px 0;
}

.home-slideshow a {
  display: block;
  width: 100%;
  height: 100%;
}

.home-slideshow img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: opacity 0.25s ease;
}

.home-slide-caption {
  margin: 0 0 60px 0;
  font-size: 13px;
  color: #666;
  min-height: 1.6em;
}

@media (max-width: 700px) {
  .home-slideshow {
    height: 260px;
  }
}

/* ===== 顶部栏:返回 + 「作品 / Works」下拉菜单 ===== */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 40px;
}

.topbar .back-link {
  margin-bottom: 0;
}

.works-menu {
  position: relative;
}

.works-toggle {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.works-toggle:hover {
  text-decoration: underline;
}

.works-panel {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 14px);
  width: 360px;
  max-width: calc(100vw - 12vw);
  max-height: 70vh;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #e2e2e2;
  padding: 20px 24px;
  text-align: left;
  z-index: 50;
}

.works-menu.open .works-panel {
  display: block;
}

.works-year {
  margin: 20px 0 10px 0;
  font-size: 12px;
  letter-spacing: 1px;
  color: #999;
}

.works-year:first-child {
  margin-top: 0;
}

.works-panel a {
  display: block;
  margin-bottom: 10px;
}

.works-panel .w-cn {
  display: block;
}

.works-panel .w-en {
  display: block;
  font-size: 13px;
  color: #666;
}

.works-panel a.current .w-cn {
  font-weight: 600;
}

.works-note {
  margin: 0;
  color: #666;
}

/* 「作品」菜单里的二级菜单(胶冻小组) */
.works-group-toggle {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
  margin: 0 0 10px 0;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
}

.works-group-toggle::after {
  content: "▸";
  flex-shrink: 0;
  margin-left: 12px;
  color: #999;
}

.works-group.open .works-group-toggle::after {
  content: "▾";
}

.works-group-toggle:hover .w-cn {
  text-decoration: underline;
}

.works-sub {
  display: none;
  margin: 0 0 14px 4px;
  padding-left: 14px;
  border-left: 1px solid #e2e2e2;
}

.works-group.open .works-sub {
  display: block;
}

.works-sub .works-overview .w-cn {
  font-size: 13px;
  color: #666;
}

/* 水边踏踏步:规则框(蓝色,不能点开) */
.rules-cell {
  grid-column: 1 / -1;   /* 占满整整一行(横跨所有列) */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 10px 12px;
  font-size: 12.5px;
  line-height: 1.6;
  text-align: left;
  color: #1f3bff;
  background: #fff;
  border: 1px solid #1f3bff;
  cursor: default;
}

.rules-cell p {
  margin: 0 0 4px 0;
}

.rules-cell p:last-child {
  margin-bottom: 0;
}

.rules-title {
  font-weight: 600;
}

.rules-en {
  font-family: "Courier New", Courier, monospace;
  font-size: 11.5px;
}

/* 鼠标移到格子上时,一张照片从下往上滑出并盖住格子 */
.sentence-cell {
  position: relative;
  overflow: hidden;
}

.cell-cover {
  position: absolute;
  inset: 0;
  transform: translateY(calc(100% + 3px));   /* 多藏 3px,避免边缘露出一条细线 */
  transition: transform 0.45s ease;
  pointer-events: none;
}

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

/* 只在有鼠标的设备上触发,手机触屏上不会出现"点一下就卡在悬停状态"的情况 */
@media (hover: hover) {
  .sentence-cell:hover .cell-cover {
    transform: translateY(0);
  }
}

/* 用键盘 Tab 键选中格子时也会盖上照片 */
.sentence-cell:focus-visible .cell-cover {
  transform: translateY(0);
}

/* 水边踏踏步:除规则框以外,所有句子格子大小一致 */
.sentence-grid {
  grid-template-rows: auto;   /* 第一行(规则框)按它自己内容的高度 */
  grid-auto-rows: 1fr;        /* 其余所有行高度统一,等于其中最高的那一格 */
}

/* ============================================================
   杂志风长文页(mag-):标题区 + 章节 + 双语正文 + 各种图片排法
   用在 imaginariesofanisland1.html,以后别的长文页也能用同一套
   ============================================================ */

/* ---- 标题区 ---- */
.mag-header {
  max-width: 760px;
  margin: 0 auto 48px auto;
  text-align: center;
}

.mag-title {
  margin: 0 0 10px 0;
  font-size: 32px;
  line-height: 1.35;
  font-weight: 700;
}

.mag-subtitle {
  margin: 0 0 28px 0;
  font-size: 17px;
  line-height: 1.5;
  color: #555;
}

.mag-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 36px;
  margin: 0;
  padding: 12px 0;
  font-size: 13px;
  color: #555;
  border-top: 1px solid #e2e2e2;
  border-bottom: 1px solid #e2e2e2;
}

.mag-meta b {
  margin-right: 6px;
  font-weight: 600;
  color: #111;
}

/* ---- 章节标题:01 工作坊 / Workshop ---- */
.mag-section {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  max-width: 860px;
  margin: 72px auto 36px auto;
  padding-top: 14px;
  border-top: 1px solid #111;
}

.mag-section-num {
  font-size: 13px;
  letter-spacing: 1px;
  color: #999;
}

.mag-section-cn {
  font-size: 22px;
  font-weight: 600;
}

.mag-section-en {
  font-size: 15px;
  color: #666;
}

/* ---- 引言 ---- */
.mag-quote {
  max-width: 760px;
  margin: 48px auto;
  font-size: 20px;
  line-height: 1.6;
  text-align: center;
}

.mag-quote .en {
  display: block;
  margin-top: 6px;
  font-size: 15px;
  font-style: italic;
  color: #666;
}

/* ---- 双语正文:左中文,右英文 ---- */
.mag-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 48px;
  max-width: 860px;
  margin: 0 auto 40px auto;
}

.mag-cols p,
.mag-split-text p {
  margin: 0 0 12px 0;
}

.mag-cols .en,
.mag-split-text .en {
  font-size: 14px;
  color: #555;
}

/* 想只写一种语言、排成一栏时,给 mag-cols 再加上 single */
.mag-cols.single {
  grid-template-columns: 1fr;
  max-width: 640px;
}

/* ---- 单张图 ---- */
.mag-fig {
  max-width: 720px;
  margin: 0 auto 40px auto;
}

.mag-fig img {
  display: block;
  width: 100%;
}

.mag-fig figcaption,
.mag-caption {
  margin-top: 10px;
  font-size: 12.5px;
  line-height: 1.55;
  color: #666;
}

.mag-fig figcaption .en,
.mag-caption .en {
  display: block;
  margin-top: 2px;
  font-style: italic;
}

/* ---- 两张 / 三张并排 ---- */
.mag-row {
  display: grid;
  gap: 16px;
  max-width: 860px;
  margin: 0 auto 40px auto;
  align-items: start;
}

.mag-row.two {
  grid-template-columns: 1fr 1fr;
}

.mag-row.three {
  grid-template-columns: repeat(3, 1fr);
}

.mag-row .mag-fig {
  max-width: none;
  margin: 0;
}

/* 一排图共用一条说明时,说明放在这一排的下面 */
.mag-row + .mag-caption {
  max-width: 860px;
  margin: -28px auto 40px auto;
}

/* ---- 图文并排:一边图,一边字 ---- */
.mag-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  max-width: 860px;
  margin: 0 auto 40px auto;
}

.mag-split .mag-fig {
  max-width: none;
  margin: 0;
}

/* 加上 reverse,文字在左、图在右 */
.mag-split.reverse .mag-split-text {
  order: -1;
}

/* ---- 结尾信息栏 ---- */
.mag-info {
  max-width: 860px;
  margin: 64px auto 0 auto;
  padding-top: 24px;
  border-top: 1px solid #e2e2e2;
  font-size: 14px;
}

.mag-info p {
  margin: 0 0 6px 0;
}

.mag-top {
  max-width: 860px;
  margin: 40px auto 0 auto;
  font-size: 13px;
  text-align: right;
}

/* ---- 手机:全部改成一栏 ---- */
@media (max-width: 700px) {
  .mag-title {
    font-size: 25px;
  }
  .mag-cols,
  .mag-split {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .mag-split .mag-fig {
    margin-bottom: 20px;
  }
  .mag-split.reverse .mag-split-text {
    order: 0;
  }
  .mag-row.three {
    grid-template-columns: 1fr;
  }
  .mag-row + .mag-caption {
    margin-top: -28px;
  }
}

/* ===== 首页:点开式分组盒子(胶冻小组) ===== */
/* 盒子展开时占一整行,后面的作品会自动补到它上面那一行的空位里 */
.works-grid.has-group {
  grid-auto-flow: dense;
}

/* 「胶冻小组」后面的小箭头(只有脚本成功读到名单后才会出现) */
.work-item.group-ready .title-cn a::after {
  content: " ▸";
  font-size: 0.85em;
  color: #999;
}

.work-item.group-ready.open .title-cn a::after {
  content: " ▾";
}

.work-item.group-ready a {
  cursor: pointer;
}

.group-box {
  display: none;
  grid-column: 1 / -1;
  margin: 4px 0 16px 0;
  padding: 22px 28px 30px 28px;
  border: 1px solid #e2e2e2;
  background: #fff;
}

.group-box.open {
  display: block;
  animation: groupOpen 0.3s ease;
}

@keyframes groupOpen {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.group-box-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e2e2e2;
  font-size: 14px;
}

.group-intro {
  font-weight: 600;
}

.group-intro:hover {
  text-decoration: underline;
}

.group-close {
  flex-shrink: 0;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  color: #666;
  background: none;
  border: none;
  cursor: pointer;
}

.group-close:hover {
  color: #111;
  text-decoration: underline;
}

@media (max-width: 700px) {
  .group-box {
    padding: 18px 16px 22px 16px;
  }
}

/* ============================================================
   杂志风长文页:补充的版式(目录、小标题、引文、人物表、深色页)
   用在 writing-remarks.html
   ============================================================ */

/* 横向的宽图 / 竖向的图 */
.mag-fig.wide {
  max-width: 860px;
}

.mag-fig.portrait {
  max-width: 440px;
}

.mag-row .mag-fig.portrait {
  max-width: none;
}

/* ---- 目录 ---- */
.mag-toc {
  max-width: 860px;
  margin: 0 auto 64px auto;
  padding-top: 18px;
  border-top: 1px solid #e2e2e2;
  font-size: 14px;
}

.mag-toc-title {
  margin: 0 0 12px 0;
  font-size: 12px;
  letter-spacing: 1px;
  color: #999;
}

.mag-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  columns: 2;
  column-gap: 48px;
}

.mag-toc li {
  margin-bottom: 8px;
  break-inside: avoid;
}

.mag-toc ol ol {
  columns: auto;
  margin: 8px 0 0 0;
  padding-left: 1.2em;
}

.mag-toc ol ol li {
  margin-bottom: 0;
}

.mag-toc .en {
  display: block;
  font-size: 13px;
  color: #666;
}

/* ---- 小标题(章节里的小节) ---- */
.mag-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  max-width: 860px;
  margin: 56px auto 28px auto;
}

.mag-sub-cn {
  font-size: 18px;
  font-weight: 600;
}

.mag-sub-en {
  font-size: 14px;
  color: #666;
}

/* ---- 引文:左边一道竖线,中英文并排 ---- */
.mag-cols.quote {
  padding-left: 20px;
  border-left: 2px solid #111;
  font-size: 13.5px;
}

.mag-cols.quote .attr {
  margin-top: 4px;
  font-size: 12.5px;
  color: #666;
}

/* ---- 人物表 ---- */
.mag-people {
  max-width: 860px;
  margin: 0 auto 40px auto;
}

.mag-people-title {
  margin: 0 0 6px 0;
  font-size: 12px;
  letter-spacing: 1px;
  color: #999;
}

.mag-people-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 48px;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
  font-size: 14px;
}

.mag-people-row p {
  margin: 0;
}

.mag-people-row .en {
  color: #555;
  font-size: 13.5px;
}

/* ---- 深色页:卡密尔的行为谱 ---- */
.mag-dark {
  max-width: 860px;
  margin: 0 auto 40px auto;
  padding: 56px 48px;
  color: #fff;
  background: #000;
  text-align: center;
}

.mag-dark p {
  margin: 0 0 14px 0;
}

.mag-dark .en {
  font-size: 15px;
}

.mag-dark .gap {
  margin-top: 30px;
}

.mag-dark .sign {
  margin-top: 36px;
  text-align: right;
  font-size: 14px;
  color: #ccc;
}

.mag-dark img {
  display: block;
  width: 100%;
  max-width: 440px;
  margin: 48px auto 0 auto;
}

.mag-score-list {
  max-width: 440px;
  margin: 22px auto 0 auto;
  padding: 0;
  list-style: none;
  font-size: 13.5px;
  font-style: italic;
  color: #ddd;
  text-align: center;
}

.mag-score-list li {
  margin-bottom: 6px;
}

@media (max-width: 700px) {
  .mag-toc ol {
    columns: 1;
  }
  .mag-people-row {
    grid-template-columns: 1fr;
    gap: 4px 0;
  }
  .mag-dark {
    padding: 36px 20px;
  }
}

/* ===== 居中版作品页:在 <body> 上加 class="page-center" 就生效 =====
   标题、相册、介绍文字都居中(只影响加了这个 class 的页面) */
.page-center .project-title-cn,
.page-center .project-title-en {
  text-align: center;
}

.page-center .slideshow {
  margin-left: auto;
  margin-right: auto;
}

.page-center .project-description {
  margin-left: auto;
  margin-right: auto;
  text-align: center;   /* 想让段落文字保持靠左、只让这一块居中,就删掉这一行 */
}

/* ===== 写作页:语言切换按钮 + 单语阅读版式 =====
   只有页面里设置了 data-lang(writing-remarks.html)才会生效,不影响别的页面 */
.lang-switch {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 0 -8vw 36px -8vw;
  padding: 10px 8vw;
  background: #fff;
  border-bottom: 1px solid #eee;
}

.lang-switch button {
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.2;
  padding: 8px 16px;
  color: #111;
  background: #fff;
  border: 1px solid #111;
  border-radius: 999px;
  cursor: pointer;
}

.lang-switch button[aria-pressed="true"] {
  color: #fff;
  background: #111;
}

html[data-lang="zh"] .en,
html[data-lang="en"] .zh {
  display: none !important;
}

/* 单语:正文排成一栏,字号放大,更好读 */
html[data-lang] .mag-cols {
  grid-template-columns: 1fr;
  max-width: 680px;
  font-size: 17px;
  line-height: 1.9;
}

html[data-lang="en"] .mag-cols {
  line-height: 1.7;
}

html[data-lang] .mag-cols .en {
  font-size: inherit;
  color: inherit;
}

html[data-lang] .mag-cols p {
  margin-bottom: 1em;
}

html[data-lang] .mag-cols.quote {
  font-size: 15.5px;
}

html[data-lang] .mag-section,
html[data-lang] .mag-sub,
html[data-lang] .mag-people,
html[data-lang] .mag-toc,
html[data-lang] .mag-header {
  max-width: 680px;
}

html[data-lang] .mag-people-row {
  grid-template-columns: 1fr;
  font-size: 15.5px;
}

html[data-lang] .mag-people-row .en {
  font-size: inherit;
}

html[data-lang] .mag-toc ol {
  columns: 1;
}

html[data-lang] .mag-fig figcaption .en,
html[data-lang] .mag-caption .en {
  font-style: normal;
}

html[data-lang] .mag-dark .en,
html[data-lang] .mag-dark .zh {
  font-size: 16px;
  line-height: 1.8;
}

@media (max-width: 700px) {
  .lang-switch {
    margin: 0 -6vw 28px -6vw;
    padding: 8px 6vw;
    gap: 6px;
  }
  .lang-switch button {
    font-size: 12.5px;
    padding: 7px 11px;
  }
  html[data-lang] .mag-cols {
    font-size: 16.5px;
  }
}

/* ===== 翻书页(writing-remarks.html):PDF 原样翻页 ===== */
.flip-meta {
  margin: 0 0 24px 0;
  text-align: center;
  font-size: 13px;
  color: #666;
}

.flip-stage {
  position: relative;
  width: 100%;
  max-width: 1300px;
  height: min(78vh, 900px);
  min-height: 420px;
  margin: 0 auto;
  background: #f4f4f2;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.flip-book {
  margin: 0 auto;
}

.flip-loading {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  margin: 0;
  text-align: center;
  color: #999;
  pointer-events: none;
}

.flip-stage:fullscreen {
  height: 100vh;
  max-width: none;
  background: #1a1a1a;
}

.flip-stage.flip-fake-full {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 300;
  height: 100%;
  max-width: none;
  background: #1a1a1a;
}

.flip-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin: 18px 0 8px 0;
  font-size: 14px;
}

.flip-controls button {
  font-family: inherit;
  font-size: 14px;
  padding: 7px 14px;
  color: #111;
  background: #fff;
  border: 1px solid #111;
  border-radius: 999px;
  cursor: pointer;
}

.flip-controls button:hover {
  color: #fff;
  background: #111;
}

.flip-controls .flip-full {
  margin-left: 18px;
}

.flip-hint {
  margin: 6px 0;
  text-align: center;
  font-size: 12.5px;
  line-height: 1.7;
  color: #777;
}

.flip-hint a {
  text-decoration: underline;
}

.lang-switch-link {
  align-self: center;
  margin-left: 10px;
  font-size: 13px;
  text-decoration: underline;
  color: #555;
}

@media (max-width: 700px) {
  .flip-stage {
    height: 72vh;
    min-height: 380px;
  }
  .lang-switch-link {
    display: none;
  }
}

/* 作品介绍里的链接加下划线,看得出能点 */
.project-description a {
  text-decoration: underline;
}

/* ===== 影像系列页(parentheses.html):分段 + 发送请求 + 支持我 ===== */
.pv-intro {
  margin: 0 auto 56px auto;
}

.pv-section {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 36px;
  align-items: start;
  max-width: 1000px;
  margin: 0 auto 72px auto;
  padding-top: 28px;
  border-top: 1px solid #e2e2e2;
}

.pv-media {
  margin: 0;
}

.pv-media img {
  display: block;
  width: 100%;
}

.pv-media.pv-missing {
  aspect-ratio: 16 / 9;
  background: #f2f2f2;
}

.pv-media.pv-missing img {
  display: none;
}

.pv-title {
  margin: 0 0 6px 0;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.4;
}

.pv-meta {
  margin: 0 0 14px 0;
  font-size: 13px;
  color: #777;
}

.pv-text {
  margin: 0 0 22px 0;
}

.pv-request {
  padding: 16px;
  background: #f6f6f4;
}

.pv-request-label {
  margin: 0 0 10px 0;
  font-weight: 600;
  font-size: 14px;
}

.pv-request-label span {
  display: block;
  font-weight: 400;
  font-size: 12.5px;
  color: #666;
}

.pv-request input[type="email"],
.pv-request textarea {
  display: block;
  box-sizing: border-box;
  width: 100%;
  margin: 0 0 8px 0;
  padding: 9px 10px;
  font-family: inherit;
  font-size: 14px;
  color: #111;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 0;
}

.pv-request textarea {
  resize: vertical;
}

.pv-request .pv-hp {
  display: none;
}

.pv-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
}

.pv-actions button {
  font-family: inherit;
  font-size: 14px;
  padding: 8px 16px;
  color: #fff;
  background: #111;
  border: 1px solid #111;
  cursor: pointer;
}

.pv-actions button:disabled {
  opacity: 0.5;
}

.pv-support-link {
  font-size: 13px;
  text-decoration: underline;
  color: #555;
}

.pv-status {
  margin: 8px 0 0 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: #555;
}

.pv-status a {
  text-decoration: underline;
}

.pv-support {
  max-width: 700px;
  margin: 24px auto 80px auto;
  padding: 32px 28px;
  text-align: center;
  border: 1px solid #111;
}

.pv-support-title {
  margin: 0 0 14px 0;
  font-size: 19px;
  font-weight: 600;
}

.pv-support p {
  margin: 0 0 10px 0;
}

.pv-support .pv-en {
  font-size: 14px;
  color: #555;
}

.pv-support-ways {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 24px 40px;
  margin: 22px 0;
}

.pv-qr {
  margin: 0;
}

.pv-qr img {
  display: block;
  width: 180px;
  height: auto;
}

.pv-qr figcaption {
  margin-top: 6px;
  font-size: 12.5px;
  color: #666;
}

.pv-paypal {
  padding: 10px 22px;
  border: 1px solid #111;
  border-radius: 999px;
}

.pv-paypal:hover {
  color: #fff;
  background: #111;
}

.pv-support .pv-small {
  margin-top: 8px;
  font-size: 12.5px;
  color: #777;
}

@media (max-width: 700px) {
  .pv-section {
    grid-template-columns: 1fr;
    gap: 18px;
    margin-bottom: 56px;
  }
  .pv-support {
    padding: 24px 16px;
  }
}

/* ===== 影片页(hisgarden.html / lookaway.html):按原设计还原
   左边文字从页面 13% 处开始,右边图片约占页面 38% 宽;衬线字体 EB Garamond,行距很紧 ===== */
@font-face { font-family: "EB Garamond"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/eb-garamond-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "EB Garamond"; font-style: italic; font-weight: 400; font-display: swap; src: url("fonts/eb-garamond-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "EB Garamond"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/eb-garamond-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "EB Garamond"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/eb-garamond-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "EB Garamond"; font-style: italic; font-weight: 700; font-display: swap; src: url("fonts/eb-garamond-latin-700-italic.woff2") format("woff2"); }

/* 影片页取消网站默认的页面宽度限制,让版面按整个窗口的比例排 */
body.film-page {
  max-width: none;
  padding: 28px 0 80px 0;
}

.film-page .topbar {
  margin: 0 13vw 34px 13vw;
}

.film {
  display: grid;
  grid-template-columns: 31vw 38vw;
  column-gap: 3vw;
  padding-left: 13vw;
  font-family: "EB Garamond", "Hoefler Text", Garamond, Georgia, "PingFang SC", "Microsoft YaHei", serif;
  font-size: 17.2px;
  line-height: 1;
  color: #3a3a3a;
}

.film-text p {
  margin: 0 0 1em 0;
}

.film-text .film-gap {
  margin-top: 2em;
}

.film-head {
  line-height: 1.17;
  margin-bottom: 1.45em !important;
}

.film-head b {
  font-weight: 600;
}

.film-text strong {
  font-weight: 700;
}

.film-text u {
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

.film-lead {
  margin-top: 1.4em !important;
  font-size: 20px;
  font-weight: 700;
}

.film-media {
  padding-top: 53px;
}

.film-media img {
  display: block;
  width: 100%;
  margin: 0 0 69px 0;
}

/* 《她顾左右而言他》:文字和图片上下居中对齐,图片从页面一半处开始 */
.film.film-center {
  grid-template-columns: 34vw 37vw;
  column-gap: 3.75vw;
  padding-left: 12.25vw;
  align-items: center;
}

.film-center .film-media {
  padding-top: 0;
}

.film-center .film-media img {
  margin: 0;
}

.film-center .film-head {
  line-height: 1.17;
  margin-bottom: 0 !important;
}

.film-meta-gap {
  margin-top: 1.35em !important;
}

.film-text .film-big {
  margin: 0;
  font-size: 26px;
  line-height: 1.2;
  font-weight: 700;
}

.film-text .film-big.film-gap {
  margin-top: 2.15em;
}

.film-text .film-big.italic {
  margin-top: 0.5em;
  font-weight: 400;
  font-style: italic;
}

/* 手机:文字在上,图片在下 */
@media (max-width: 760px) {
  body.film-page {
    padding: 28px 6vw 60px 6vw;
  }
  .film-page .topbar {
    margin: 0 0 30px 0;
  }
  .film,
  .film.film-center {
    grid-template-columns: 1fr;
    padding-left: 0;
    font-size: 16.5px;
    line-height: 1.1;
  }
  .film-media {
    padding-top: 10px;
  }
  .film-media img {
    margin-bottom: 24px;
  }
  .film-center .film-text {
    margin-bottom: 28px;
  }
  .film-text .film-big {
    font-size: 24px;
  }
}

/* ===== 首页手机版:去掉轮播箭头,全部居中 ===== */
@media (max-width: 700px) {
  .header {
    align-items: center;
    text-align: center;
    margin-bottom: 48px;
  }
  .header .bio {
    max-width: none;
  }
  .header .contact {
    justify-content: center;
  }
  .home-slideshow .slide-btn {
    display: none;
  }
  .home-slide-caption {
    text-align: center;
    margin-bottom: 44px;
  }
  .work-item {
    text-align: center;
  }
  .group-box {
    text-align: center;
  }
  .group-box-head {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }
}
