/* =========================================================
   工业设计作品集 · 温润之器（warm vessels）
   基调：暖灰底 / 陶土橙 + 赭石点缀 / 像素暖墨动效 / 米纸纹理
   ========================================================= */

:root {
  --bg: #F5F5F5;            /* 页面底（温润暖灰） */
  --bg-soft: #EDE8E0;       /* 暖石 */
  --bg-deep: #DCD7CC;       /* 暖灰深 */
  --bg-warm: #F1EFE8;       /* 米纸 */
  --ink: #2C2C2A;           /* 暖墨 */
  --muted: #5a554c;         /* 暖中灰 */
  --faint: #7a7468;         /* 暖浅灰 */
  --line: rgba(44, 44, 42, 0.16);
  --line-strong: rgba(44, 44, 42, 0.38);
  --accent: #C2683A;        /* 陶土橙 */
  --accent-2: #B08335;      /* 赭石 */
  --maxw: 1200px;
  --pad: clamp(20px, 5vw, 56px);
  --mono: "IBM Plex Mono", ui-monospace, "Courier New", monospace;
  --sans: "Space Grotesk", "Helvetica Neue", "PingFang SC",
          "Microsoft YaHei", system-ui, sans-serif;
  --pixel: "Press Start 2P", monospace;
  --serif: "Times New Roman", Times, serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* 首页无滚动条，内容正好一屏 */
body.home-page { overflow: hidden; }

/* 极淡的米纸纹理：几乎看不见，给页面一层“陈列器物的纸面”质感 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 140px 140px;
  opacity: 0.035;
}

/* 全屏特效画布 */
#fx {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* 内容层在画布之上 */
.nav, main, footer { position: relative; z-index: 2; }

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

::selection { background: var(--accent); color: var(--bg); }

/* 像素风英文字体（用于标题里的英文部分） */
.en { font-family: var(--pixel); font-weight: 400; text-transform: uppercase; }

/* ---------- 导航 ---------- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px var(--pad);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: rgba(245, 245, 245, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 100;
}
.home-page .nav { display: none; }

.nav .brand {
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0.5px;
  font-size: 15px;
}
.nav .brand b { font-weight: 700; }
.nav ul {
  display: flex;
  gap: clamp(14px, 3vw, 34px);
  list-style: none;
  flex-wrap: wrap;
}
.nav ul a {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.4px;
  color: var(--muted);
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s;
  cursor: pointer;
}
.nav ul a:hover,
.nav ul a.active { color: var(--accent); border-color: var(--accent); }

/* ---------- 首页 Hero ---------- */
.home-main { min-height: 100vh; }

.home-hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  padding: 12vh var(--pad) 5vh;
  /* 首页全部英文整体上移约两个像素蝴蝶高度（蝶高 7×4=28px，两蝶≈56px） */
  transform: translateY(-56px);
}

.home-center { flex: 1; display: flex; flex-direction: column; justify-content: center; }

.pixel-title {
  font-family: var(--pixel);
  font-size: clamp(28px, 7.5vw, 92px);
  line-height: 1.45;
  letter-spacing: -0.04em;
  color: var(--ink);
  text-transform: uppercase;
}
.pixel-title .line {
  display: block;
  transition: transform .3s ease;
}
/* 俏皮：两行轻微错位 + 旋转 + 像素阴影 */
.pixel-title .line:nth-child(1) {
  transform: rotate(-1.4deg) translateX(-1.5vw);
  text-shadow: 5px 5px 0 var(--bg-deep);
}
.pixel-title .line:nth-child(2) {
  transform: rotate(1.2deg) translateX(1.5vw) translateY(0.14em);
  letter-spacing: -0.06em;
  text-shadow: -5px 5px 0 var(--bg-deep);
}

.home-sub {
  margin-top: 32px;
  font-family: var(--mono);
  font-size: clamp(13px, 2.2vw, 20px);
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--muted);
}

.home-nav {
  display: flex;
  gap: clamp(32px, 8vw, 96px);
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  /* 导航（about/work/connect）在首页整体基础上再上移约一个蝴蝶高度（28px） */
  transform: translateY(-28px);
}
.home-nav a {
  font-family: var(--sans);
  font-size: clamp(16px, 2.2vw, 22px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  transition: transform .2s ease, color .2s ease;
  will-change: transform;
}
.home-nav a:hover {
  transform: scale(1.12);
  color: var(--accent);
}

/* ---------- 首页跳转过渡幕布 ---------- */
#transition {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  opacity: 0;
  transition: opacity .8s ease;
}
#transition.active { pointer-events: all; opacity: 1; }
#transition .tx-butterfly {
  width: 54px; height: 42px;
  animation: flutter 1.2s steps(2) infinite;
}
#transition .tx-text {
  font-family: var(--pixel);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--muted);
  animation: blink 1s steps(2) infinite;
}
@keyframes flutter {
  0% { transform: scaleX(1) rotate(-5deg); }
  50% { transform: scaleX(0.6) rotate(5deg); }
  100% { transform: scaleX(1) rotate(-5deg); }
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ---------- 通用页面容器 ---------- */
.page {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 110px var(--pad) 10vh;
}
.page-title {
  font-size: clamp(34px, 7vw, 72px);
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1;
  margin-bottom: 48px;
}
/* 分类过滤页大标题：字体不变，缩小为原来一半 */
.page-title.cat-title {
  font-size: clamp(17px, 3.5vw, 36px);
  line-height: 1.1;
  font-family: var(--sans);
  font-weight: 700;
  text-transform: uppercase;
  position: relative;
  top: 20px;
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 64px;
  align-items: start;
}
.about-grid p { font-size: 17px; color: #2a2a2a; margin-bottom: 18px; max-width: 620px; }
.about-grid h3 { font-size: 22px; margin: 36px 0 14px; font-weight: 600; }
.about-grid ul { max-width: 620px; margin: 0 0 10px 20px; color: #2a2a2a; }
.about-grid ul li { margin-bottom: 10px; }
.about-grid .side .blk { border-top: 1px solid var(--line); padding: 18px 0; }
.about-grid .side .blk .l { font-family: var(--mono); font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--faint); margin-bottom: 6px; }
.about-grid .side .blk .v { font-size: 15px; }
/* 完整图片：不再裁切，按原比例铺满列宽 */
.portrait {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 28px;
  background: var(--bg-warm);
  border: 1px solid var(--line);
}

/* ---------- About 新布局 ---------- */
.about-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: stretch;
  margin-bottom: 72px;
}
.about-intro {
  border: 1px solid var(--line);
  background: var(--bg-warm);
  padding: 32px 32px 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}
/* 姓名：中文 + 英文同行，底端对齐，均缩小 */
.about-intro h2.name-line {
  font-family: var(--sans);
  font-size: clamp(26px, 4.2vw, 42px);
  font-weight: 700;
  line-height: 1;
  margin-bottom: 18px;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}
.about-intro .name-line .cn { color: var(--ink); font-size: 1em; }
.about-intro .name-line .en-name {
  font-family: var(--sans);
  font-size: 0.62em;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding-bottom: 0;
}

/* EDU 单独标签 + 两行学校左对齐 */
.about-intro .edu-block {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 14px 0 8px;
  margin-bottom: 0;
}
.about-intro .edu-label {
  font-family: var(--pixel);
  font-size: 13px;
  color: var(--ink);
  margin-bottom: 4px;
}
.about-intro .edu-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: start;
  gap: 12px;
  padding: 10px 0;
}
.about-intro .edu-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.about-intro .edu-school {
  font-size: 15px;
  color: #2a2a2a;
  text-align: left;
  line-height: 1.5;
}
.about-intro .edu-degree {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  color: var(--muted);
  text-align: center;
}
.about-intro .edu-degree .edu-cn { font-size: 14px; color: var(--muted); }
.about-intro .edu-degree .edu-en { font-size: 11px; }
.about-intro .edu-date {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--faint);
  white-space: nowrap;
  text-align: right;
}
/* 日期列：右对齐并整体向右平移 2 个字符宽度 */
.about-intro .edu-cell--date {
  align-items: flex-end;
  text-align: right;
  transform: translateX(calc(2ch - 6px));
}
.about-intro .edu-en {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--faint);
  letter-spacing: 0.2px;
  line-height: 1.4;
  white-space: nowrap;
}

.about-intro .info-row {
  display: flex;
  gap: 16px;
  align-items: baseline;
  flex-wrap: wrap;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.about-intro .label { font-family: var(--pixel); font-size: 13px; color: var(--ink); min-width: 64px; }
.about-intro .pixel-label { font-family: var(--sans); font-weight: 700; }
.about-intro .contact-row .value {
  font-size: 15px;
  color: #2a2a2a;
  flex: 1 1 120px;
  text-align: left;
  min-width: 120px;
}
.about-intro .contact-row:last-of-type { border-bottom: none; }

/* 所获荣誉（替代 SOFTWARE SKILL） */
.about-intro .honor-block {
  margin-top: 0;
  margin-bottom: -2px;
  padding-top: 4px;
}
.about-intro .honor-block .label {
  display: block;
  margin-bottom: 10px;
  font-family: var(--pixel);
  font-size: 13px;
  color: var(--ink);
}
.about-intro .honor-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.about-intro .honor-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.about-intro .honor-cn {
  font-size: 15px;
  color: #2a2a2a;
  line-height: 1.5;
  text-align: left;
}
.about-intro .honor-en {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--faint);
  letter-spacing: 0.2px;
  line-height: 1.4;
  text-align: left;
}

/* 照片卡片：胶带 + 装饰 */
.photo-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 8px 14px 0 rgba(44,44,42,0.06);
  transform: rotate(1.2deg);
}
.photo-card .photo-frame {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--bg-warm);
  overflow: hidden;
}
.photo-card .photo-frame img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  object-position: 50% 22%;
}
.photo-card .tape {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  width: 96px;
  height: 30px;
  background: repeating-linear-gradient(90deg, #C2683A 0 10px, #D98B5F 10px 20px);
  opacity: 0.82;
  box-shadow: 0 2px 4px rgba(44,44,42,0.12);
  border-radius: 2px;
  clip-path: polygon(6px 0, 90px 0, 96px 8px, 88px 15px, 96px 22px, 90px 30px, 6px 30px, 0 22px, 8px 15px, 0 8px);
}
.photo-card .photo-decor {
  position: absolute;
  pointer-events: none;
  z-index: 3;
}
.photo-card .photo-decor.camera {
  top: 12px;
  right: -18px;
  width: 56px;
  transform: rotate(8deg);
}
.photo-card .photo-decor.butterfly {
  bottom: -14px;
  left: -16px;
  width: 46px;
  transform: rotate(-10deg);
}

.about-section {
  margin-bottom: 56px;
  padding-top: 40px;
  transition: opacity .7s ease, transform .7s ease;
}
.about-section.pre { opacity: 0; transform: translateY(28px); }
.about-section.in { opacity: 1; transform: none; }
/* 小板块：向下滚动逐块出现、向上滚动逐块渐消（双向切换 .in） */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.in { opacity: 1; transform: none; }
.about-section h2 {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0 14px;
  font-size: clamp(22px, 3.2vw, 30px);
  font-weight: 700;
  letter-spacing: -0.5px;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 10px;
  margin-bottom: 22px;
}
.about-section h2 .en {
  font-size: 0.7em;
  color: var(--muted);
}
.about-section h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 28px 0 12px;
}
.about-section ul { margin: 0 0 16px 20px; color: #2a2a2a; }
.about-section ul li { margin-bottom: 12px; line-height: 1.55; }
.about-section .course-list .course-line { line-height: 1.86; margin-bottom: 0; }
.about-section .course-list .course-en {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--faint);
  letter-spacing: 0.2px;
}
.about-section .item {
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.about-section .item:last-child { border-bottom: none; }
.about-section .item-title {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-weight: 600; font-size: 16px; margin-bottom: 6px;
}
.about-section .item-title .date { font-family: var(--mono); font-size: 13px; color: var(--faint); white-space: nowrap; }
.about-section .item-sub { font-size: 13px; color: var(--faint); margin-bottom: 8px; }
.about-section .item-p {
  font-size: 15px;
  color: #2a2a2a;
  margin-bottom: 10px;
  line-height: 1.6;
}
.about-section .item-p strong { color: var(--ink); font-weight: 600; }

/* 共梦AI 板块：可点击 + 悬停文字放大 */
.item-link { display: block; text-decoration: none; color: inherit; }
.gongmeng-link { display: block; border-radius: 8px; }
.gongmeng-link .item { border-radius: 8px; transition: background .2s ease; }
.gongmeng-link:hover .item { background: var(--bg-warm); }
.gongmeng-link .item-text { transition: transform .3s ease; transform-origin: left center; }
.gongmeng-link:hover .item-text { transform: scale(1.03); }
.more-hint { display: inline-block; margin-top: 8px; font-family: var(--mono); font-size: 12px; letter-spacing: 1px; color: var(--accent); }
.gongmeng-link:hover .more-hint { text-decoration: underline; }

.award-table { display: grid; gap: 0; }
.award-row {
  display: grid;
  grid-template-columns: 2fr 1.3fr 1fr;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  align-items: baseline;
}
.award-row:last-child { border-bottom: none; }
.award-row span:nth-child(2) { color: var(--muted); font-size: 15px; text-align: center; }
.award-row span:last-child {
  text-align: right;
  font-size: 15px;
  color: #2a2a2a;
}

/* ---------- Work 目录 ---------- */
.work-list {
  border-top: 1px solid var(--line);
}
.work-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
  transition: padding-left .25s ease, color .25s ease;
}
.work-item:hover {
  padding-left: 14px;
  color: var(--accent);
}
.work-item .num {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--faint);
  width: 36px;
  flex-shrink: 0;
}
.work-item .wi-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
/* 英文标题：与左上角品牌（IBM Plex Mono）一致，不换行 */
.work-item h2 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(20px, 3.2vw, 38px);
  letter-spacing: -0.01em;
  line-height: 1.1;
  white-space: nowrap;
  text-transform: uppercase;
}
.work-item h2.zh-project-title {
  font-size: clamp(16px, calc(3.2vw - 10px), 28px);
}
/* 中文副标题：位于英文下方，左对齐，颜色加深 */
.work-item .cn-title {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 400;
  color: #2a2a2a;
  text-align: left;
}
/* 英文翻译：中文副标题下方，另起一行，左对齐 */
.work-item .en-title {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.3px;
  color: var(--faint);
  text-align: left;
  margin-top: 2px;
}
/* 灰色信息：右对齐、置于最右侧，日期在上、项目类型在下 */
.work-item .meta {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--faint);
  text-align: right;
  line-height: 1.6;
  white-space: nowrap;
  flex-shrink: 0;
}
@media (max-width: 760px) {
  .work-item { flex-wrap: wrap; gap: 10px 16px; }
  .work-item .meta { width: 100%; text-align: right; }
}

/* ---------- 通用 section 头部 ---------- */
.sec-head {
  text-align: center;
  margin-bottom: 36px;
}
.sec-head .k {
  font-family: var(--mono); font-size: 13px; letter-spacing: 2px;
  text-transform: uppercase; color: var(--muted); margin-bottom: 14px;
}
.sec-head h2 {
  font-size: clamp(34px, 7vw, 72px);
  font-weight: 700; letter-spacing: -1px; line-height: 1;
}
.sec-head p {
  margin-top: 14px; color: var(--muted); font-size: 17px; max-width: 540px;
  margin-left: auto; margin-right: auto;
}

/* ---------- 3D Cover Flow 画廊（保留，供后续扩展） ---------- */
.coverflow {
  width: 100%;
  max-width: 1200px;
  height: 420px;
  margin: 0 auto;
  position: relative;
  perspective: 1200px;
  touch-action: pan-y;
  user-select: none;
}
.coverflow-track {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0; height: 0;
  transform-style: preserve-3d;
}
.cover {
  position: absolute;
  left: -140px;
  top: -180px;
  width: 280px;
  height: 360px;
  background: var(--bg-warm);
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(44, 44, 42, 0.12);
  cursor: pointer;
  transition: transform .55s cubic-bezier(0.23, 1, 0.32, 1),
              opacity .55s ease,
              filter .55s ease;
  overflow: hidden;
  transform-style: preserve-3d;
}
.cover img {
  width: 100%; height: 100%; object-fit: cover;
  display: block; pointer-events: none;
  filter: saturate(0.85);
}
.cover.active img { filter: saturate(1); }
.cover::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(44, 44, 42, 0.55) 100%);
  pointer-events: none;
}
.cover .cap {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 18px 20px;
  color: #fff;
  z-index: 2;
  transform: translateY(0);
  transition: transform .35s ease;
}
.cover .cap .st {
  font-family: var(--mono); font-size: 11px; letter-spacing: 1px;
  text-transform: uppercase; opacity: 0.72; margin-bottom: 5px;
}
.cover .cap .tt {
  font-size: 22px; font-weight: 500; line-height: 1.2;
}
.cover .cap .meta {
  font-family: var(--mono); font-size: 12px; opacity: 0.8; margin-top: 6px;
}
.cover:hover .cap { transform: translateY(-4px); }

.cover.active { cursor: default; }
.cover.active .open {
  display: inline-block;
  margin-top: 10px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(255,255,255,0.6);
}
.cover .open { display: none; }
.cover.active .open { display: inline-block; }

/* 封面留空时，文字转深色 */
.cover.empty .cap { color: var(--ink); }
.cover.empty::after { background: none; }
.cover.empty .cap .st { opacity: 0.65; }
.cover.empty .cap .meta { opacity: 0.7; }
.cover.empty .open { border-bottom-color: var(--accent); }

.cf-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 44px;
  border: 1px solid var(--accent);
  background: rgba(245, 245, 245, 0.7);
  cursor: pointer;
  font-family: var(--mono); font-size: 18px;
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  z-index: 10;
  transition: background .2s, color .2s;
}
.cf-arrow:hover { background: var(--accent); color: var(--bg); }
.cf-arrow.prev { left: 12px; }
.cf-arrow.next { right: 12px; }

.cf-dots {
  display: flex; justify-content: center; gap: 10px;
  margin-top: 18px;
}
.cf-dots span {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--line-strong); cursor: pointer;
  transition: background .2s, transform .2s;
}
.cf-dots span.active { background: var(--accent); transform: scale(1.2); }

/* ---------- 详情页：图片展开 ---------- */
.detail-wrap {
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}
.detail-view {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 32px;
  align-items: start;
}

/* 左侧：主页图 + 项目信息（sticky） */
.detail-sidebar {
  position: sticky;
  top: 90px;
  align-self: start;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding-right: 8px;
}
.detail-sidebar .k {
  font-family: var(--mono); font-size: 12px; letter-spacing: 2px;
  text-transform: uppercase; color: var(--muted); margin-bottom: 12px;
}
.detail-sidebar h1 {
  font-family: var(--mono);
  font-size: clamp(22px, 2.6vw, 34px);
  font-weight: 700; letter-spacing: -0.01em; line-height: 1.15;
}
.detail-sidebar h1.sans-title {
  font-family: var(--sans);
  font-weight: 700;
}
.detail-sidebar h1.graduation-title {
  font-size: 28px;
}
.detail-sidebar .sub {
  color: var(--muted); font-size: 15px; margin-top: 12px; line-height: 1.55;
}
.detail-sidebar .facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px; background: var(--line); border: 1px solid var(--line);
  margin: 12px 0 14px;
}
.detail-sidebar .facts div { background: var(--bg); padding: 8px 12px; }
.detail-sidebar .facts .l { font-family: var(--mono); font-size: 9px; letter-spacing: 1px; text-transform: uppercase; color: var(--faint); }
.detail-sidebar .facts .v { font-size: 13px; margin-top: 4px; white-space: nowrap; }
.detail-sidebar .main-shot {
  margin: 0 0 22px;
  border: 1px solid var(--line); background: var(--bg-warm);
  overflow: hidden;
}
.detail-sidebar .main-shot img { width: 100%; display: block; }
.detail-sidebar .main-shot.empty {
  aspect-ratio: 4 / 5;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 13px; letter-spacing: 1px; color: var(--faint);
}
.detail-sidebar p.body { font-size: 14px; color: #2a2a2a; margin-bottom: 14px; line-height: 1.6; }
.detail-sidebar h3 { font-size: 16px; margin: 22px 0 10px; font-weight: 600; }
.detail-sidebar ul.pts { margin: 0 0 10px 18px; color: #2a2a2a; font-size: 14px; }
.detail-sidebar ul.pts li { margin-bottom: 8px; }

/* 右侧：图片纵向瀑布 */
.detail-gallery {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.detail-gallery .shot {
  margin: 0; border: 1px solid var(--line); background: var(--bg-warm);
  overflow: hidden;
}
.detail-gallery .shot + .shot {
  border-top: 1px solid var(--line);
}
.detail-gallery .shot img {
  width: 100%; display: block;
  cursor: zoom-in;
  animation: reveal .8s ease both;
}
.detail-gallery .shot.empty {
  aspect-ratio: 4 / 5;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 13px; letter-spacing: 1px; color: var(--faint);
}

/* 毕业设计图片右边界保持不变，宽度缩小 20px */
.graduation-gallery .shot img {
  width: calc(100% - 40px);
  margin-left: auto;
}
.graduation-gallery .shot {
  border: none;
  background: transparent;
}
.huanghua-gallery .shot img {
  width: calc(100% - 210px);
  margin-left: auto;
  transform: translateX(-150px);
}
.huanghua-gallery .shot {
  border: none;
  background: transparent;
}
.nowrap-body {
  white-space: nowrap;
}

/* ---------- 图片灯箱（点击放大） ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 5vh 5vw;
  background: rgba(245, 245, 245, 0.95);
  cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 24px 70px rgba(44, 44, 42, 0.28);
}
@keyframes reveal {
  from { opacity: 0; transform: scale(1.04); }
  to { opacity: 1; transform: scale(1); }
}
.detail-actions { margin-top: 24px; display: flex; gap: 10px; flex-wrap: wrap; }
.detail-actions .btn { padding: 10px 16px; font-size: 12px; }

/* 返回按钮 */
.back {
  font-family: var(--mono); font-size: 26px; color: var(--muted);
  display: inline-block; margin-bottom: 24px; cursor: pointer;
}
.back:hover { color: var(--accent); }

/* 分类页返回 Work 的箭头，与详情页返回箭头保持一致的标题间距 */
.category-back {
  position: absolute;
  left: max(var(--pad), calc((100vw - var(--maxw)) / 2 + var(--pad)));
  top: 138px;
  z-index: 120;
  display: inline-block;
  font-family: var(--mono);
  font-size: 26px;
  color: var(--muted);
  line-height: 1.6;
  transition: transform .2s ease, color .2s ease, text-shadow .2s ease;
}
.category-back:hover {
  color: var(--accent);
  transform: scale(1.16);
  text-shadow: 3px 3px 0 rgba(44, 44, 42, 0.18);
}

/* ---------- 联系页 ---------- */
.connect-card {
  max-width: 620px;
}
.connect-tagline {
  max-width: 760px;
  margin: -24px 0 42px;
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.4;
}
.connect-card p {
  font-size: 20px;
  color: #2a2a2a;
  margin-bottom: 18px;
}
.connect-card a {
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
}
.connect-card a:hover { color: var(--ink); }

.connect-tags {
  font-family: var(--mono);
  font-size: 16px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 28px;
  line-height: 1.6;
}
.connect-tags strong { font-weight: 700; color: var(--ink); }
.connect-section-title {
  font-family: var(--mono);
  font-size: 21px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 12px;
}
.connect-section-title--muted {
  color: #777777;
}
.explored-tags,
.explored-tags strong {
  color: #777777 !important;
}
.explored-description {
  color: #777777 !important;
}
.connect-explore { margin-bottom: 38px; }
.connect-explore p { margin-bottom: 8px; font-size: 17px; line-height: 27px; color: #2a2a2a; }
.connect-explore .connect-tags { font-size: 14px; line-height: 23px; }
.connect-detail {
  border-left: 2px solid var(--accent);
  padding-left: 16px;
}
.connect-detail--plain {
  border-left: 0;
  padding-left: 0;
}
.connect-detail--plain p {
  line-height: 20px;
}
.connect-nowrap {
  white-space: nowrap;
  text-align: left;
}
.connect-explore .explore-label { font-weight: 600; color: var(--ink); }
.connect-explore .explore-note { color: var(--faint); font-size: 16px; margin-top: 6px; }
.connect-explore blockquote {
  margin: 14px 0 0;
  padding-left: 16px;
  border-left: 2px solid var(--accent);
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}
.connect-rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 10px 0 34px;
}
.connect-note {
  margin-top: 22px !important;
  color: var(--muted) !important;
}
.connect-cta { margin-bottom: 18px; }
.connect-cta h2 {
  font-family: var(--pixel);
  font-size: clamp(14px, 2.4vw, 18px);
  letter-spacing: 0.12em;
  line-height: 1.4;
  margin-bottom: 14px;
  color: var(--ink);
}
.connect-cta p { margin-bottom: 6px; }
.qr-wrap {
  margin-top: 54px;
  display: flex;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
  transform: translateY(-15px);
}
.qr-code {
  width: min(70px, 19%);
  display: block;
  background: transparent;
  padding: 0;
  border: none;
}
.qr-contact {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 0;
  font-family: var(--mono);
  font-size: 15px;
  color: var(--muted);
}
.qr-contact a {
  color: var(--muted);
  border-bottom: none;
}
.qr-contact a,
.qr-contact a:hover {
  color: inherit;
  border-bottom: none;
  pointer-events: none;
  cursor: default;
}

/* ---------- 页脚 ---------- */
footer {
  border-top: 1px solid var(--line);
  padding: 30px var(--pad);
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 12px; color: var(--faint); letter-spacing: 0.5px;
}
footer a:hover { color: var(--accent); }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .home-hero { padding: 10vh var(--pad) 6vh; }
  .home-nav { gap: 40px; }
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .detail-view { grid-template-columns: 1fr; }
  .detail-sidebar { position: static; max-height: none; overflow-y: visible; padding-right: 0; }
  .cover { width: 220px; height: 280px; left: -110px; top: -140px; }
  .coverflow { height: 340px; }
}
@media (max-width: 760px) {
  .nav { flex-direction: column; align-items: flex-start; gap: 12px; }
  .nav ul { gap: 14px; }
  .work-item { flex-wrap: wrap; gap: 8px; }
  .work-item .meta { text-align: left; width: 100%; }
  .cf-arrow { display: none; }
  .detail-sidebar h1 { font-size: 34px; }
}

/* ---------- Work 分类 landing ---------- */
.cat-row {
  display: flex;
  gap: 80px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 160px;            /* 图文整体下移 40px */
  transform: scale(1.3);        /* 整体放大 1.3 倍 */
  transform-origin: top center;
  margin-bottom: 120px;         /* 抵消放大后的向下视觉溢出，避免与页脚重叠 */
}
.cat-card {
  flex: 0 1 200px;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  color: var(--ink);
  padding: 30px 10px;
  border: none;
  border-radius: 0;
  background: transparent;
  transition: transform .25s ease, filter .25s ease;
}
.cat-card:hover {
  transform: translateY(-5px) scale(1.04);
  filter: drop-shadow(0 10px 20px rgba(194, 104, 58, 0.22));
}
.cat-icon {
  width: 67px;
  height: 67px;
  color: var(--ink);          /* 与大标题（暖墨）一致 */
  margin-bottom: 14px;
  transition: transform .25s ease;
}
.cat-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  display: block;
  transition: filter .25s ease;
}
.cat-card:hover .cat-icon { transform: scale(1.06); color: #C2683A; }
.cat-card:hover .cat-icon img {
  filter: brightness(0) saturate(100%) invert(47%) sepia(33%) saturate(1171%) hue-rotate(337deg) brightness(92%) contrast(89%);
}
.cat-label {
  font-family: var(--mono);
  font-size: 10.8px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--ink);
  transition: transform .25s ease;
}
.cat-card:hover .cat-label { transform: scale(1.03); }
.cat-card:hover .cat-label { color: #C2683A; }
@media (max-width: 760px) {
  .cat-row { gap: 80px; }
  .cat-card { min-width: 100%; }
}

/* ---------- 分类详情页（左侧图标导航 + 右侧项目列表） ---------- */
/* 大标题：缩小为原来的一半、不换行 */
.page-title.cat-page-title {
  font-size: clamp(16px, 3vw, 34px);
  line-height: 1.15;
  white-space: nowrap;
  letter-spacing: -0.02em;
  text-align: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
  margin-bottom: 28px;
}

.cat-split {
  display: flex;
  gap: clamp(32px, 6vw, 64px);
  align-items: flex-start;
}
/* 左侧：三个像素图标纵向排布（仅图标） */
.cat-side {
  display: flex;
  flex-direction: column;
  gap: 40px;
  flex-shrink: 0;
  padding-top: 8px;
}
.side-icon {
  width: 44px;
  height: 44px;
  display: block;
  background-color: #c4c0b6;        /* 未被点击：浅灰 */
  -webkit-mask: var(--icon) center / contain no-repeat;
          mask: var(--icon) center / contain no-repeat;
  transition: background-color .2s ease, transform .2s ease;
  cursor: pointer;
}
.side-icon:hover { transform: scale(1.1); }
.side-icon.active { background-color: var(--ink); }   /* 被点击：大标题（暖墨）色 */

/* 右侧项目标题：与 ANIOBOT 详情页字体一致（IBM Plex Mono 粗体） */
.cat-page .work-item h2 {
  font-family: var(--mono);
  font-size: clamp(22px, 3.4vw, 40px);
  letter-spacing: -0.02em;
  font-weight: 700;
}

/* 右侧：对应板块的项目列表 */
.cat-panels { flex: 1; min-width: 0; }
.cat-panel { display: none; }
.cat-panel.active { display: block; }

@media (max-width: 760px) {
  .cat-split { flex-direction: column; gap: 28px; }
  .cat-side { flex-direction: row; gap: 22px; }
}
