:root {
  --bg: #fafaf7;
  --surface: #ffffff;
  --text: #1c1c1a;
  --muted: #6b6b66;
  --line: #e6e4dc;
  --accent: #2f5d50;
  --accent-soft: #e3eee9;
  --warn: #9a5b13;
  --warn-soft: #f7ecdd;
  --radius: 14px;
  --nav-h: 58px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121412; --surface: #1a1d1b; --text: #ecece6; --muted: #9a9b94;
    --line: #2a2e2b; --accent: #8cc7b2; --accent-soft: #1f2d28;
    --warn: #e0a868; --warn-soft: #2d2419;
  }
}
:root[data-theme="dark"] {
  --bg: #121412; --surface: #1a1d1b; --text: #ecece6; --muted: #9a9b94;
  --line: #2a2e2b; --accent: #8cc7b2; --accent-soft: #1f2d28;
  --warn: #e0a868; --warn-soft: #2d2419;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); line-height: 1.7; font-size: 16px;
}
a { color: inherit; }

/* 顶部导航：固定在顶上，底边一条细进度条 */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  height: 100%; display: flex; justify-content: space-between; align-items: center;
  max-width: 1120px; margin: 0 auto; padding: 0 16px;
}
.brand { font-weight: 700; text-decoration: none; }
.nav nav { display: flex; gap: 18px; align-items: center; }
.nav nav a { text-decoration: none; color: var(--muted); font-size: 15px; }
.nav nav a:hover { color: var(--text); }
.nav button {
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  border-radius: 999px; padding: 4px 12px; font: inherit; font-size: 14px; cursor: pointer;
}
.nav-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; }
.nav-progress span { display: block; height: 100%; width: 0; background: var(--accent); }

/* 左侧进度条：宽屏显示点和名字，中屏只显示点，窄屏隐藏（靠顶部细条） */
.rail {
  position: fixed; z-index: 40; left: 20px; top: 50%; transform: translateY(-50%);
  display: none;
}
.rail-track {
  position: absolute; left: 6px; top: 8px; bottom: 8px; width: 2px; background: var(--line); border-radius: 2px;
}
.rail-track span { display: block; width: 100%; height: 0; background: var(--accent); border-radius: 2px; transition: height .15s linear; }
.rail ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; position: relative; }
.rail a { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--muted); font-size: 13px; }
.rail-dot {
  flex: none; width: 14px; height: 14px; border-radius: 50%; background: var(--bg);
  border: 2px solid var(--line); transition: all .15s ease;
}
.rail li.passed .rail-dot { border-color: var(--accent); background: var(--accent); }
.rail li.active .rail-dot { border-color: var(--accent); background: var(--bg); box-shadow: 0 0 0 4px var(--accent-soft); }
.rail li.active a { color: var(--text); font-weight: 600; }
.rail a:hover { color: var(--text); }
.rail-label { white-space: nowrap; opacity: 0; transform: translateX(-4px); transition: opacity .15s, transform .15s; }
.rail:hover .rail-label, .rail li.active .rail-label { opacity: 1; transform: none; }
@media (min-width: 1000px) { .rail { display: block; } }
@media (min-width: 1500px) { .rail-label { opacity: 1; transform: none; } }

main { max-width: 1120px; margin: 0 auto; padding: calc(var(--nav-h)) 16px 0; }
@media (min-width: 1000px) and (max-width: 1499px) { main { padding-left: 64px; } }
h2 { font-size: 30px; margin: 0 0 20px; letter-spacing: -0.01em; line-height: 1.25; }
h3 { margin: 0 0 6px; font-size: 18px; }

.hero { padding: 120px 0 64px; }
.eyebrow { color: var(--accent); font-weight: 600; margin: 0; }
.hero h1 { font-size: clamp(40px, 8vw, 72px); line-height: 1.05; margin: 8px 0 16px; letter-spacing: -0.03em; }
.tagline { font-size: clamp(18px, 2.4vw, 22px); color: var(--muted); max-width: 640px; margin: 0; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.btn {
  display: inline-block; padding: 10px 20px; border-radius: 999px; text-decoration: none;
  border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 15px;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--bg); }

.block { padding: 72px 0 24px; }
.prose { max-width: 720px; }
.prose p { margin: 0 0 14px; }
.focus { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 32px; }
.focus-item { padding: 20px; border-radius: var(--radius); background: var(--accent-soft); }
.focus-item .icon { color: var(--accent); font-size: 18px; }
.focus-item p { margin: 0; color: var(--muted); font-size: 15px; }

/* 作品时间轴：左边一条竖线，每个项目一个节点 */
.timeline { position: relative; padding-top: 72px; }
.timeline-title { margin-bottom: 40px; }
.project { position: relative; display: grid; grid-template-columns: 150px 1fr; gap: 0 32px; padding-bottom: 88px; }
.project::before {
  content: ""; position: absolute; left: 157px; top: 10px; bottom: 0; width: 2px; background: var(--line);
}
.project:last-child::before { bottom: 40px; }
.tl-marker { position: relative; text-align: right; padding-right: 22px; }
.tl-dot {
  position: absolute; right: -24px; top: 6px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--accent);
}
.tl-date { display: block; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; line-height: 1.5; padding-top: 2px; }
.tl-body { min-width: 0; }
.project-head h2 { margin-bottom: 10px; }
.lead { color: var(--muted); font-size: 17px; margin: 14px 0 0; max-width: 760px; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-size: 12px; padding: 2px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 28px 0 32px; }
.stat { padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.stat-value { display: block; font-size: 24px; font-weight: 700; color: var(--accent); line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat-label { display: block; font-size: 13px; color: var(--muted); margin-top: 4px; line-height: 1.4; }

.subhead {
  font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--accent);
  margin: 40px 0 14px; font-weight: 700;
}
.milestones { list-style: none; margin: 0; padding: 0; max-width: 820px; }
.milestones li { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); }
.milestones li:last-child { border-bottom: 1px solid var(--line); }
.ms-date { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; padding-top: 1px; }
.pitfalls { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.pitfall { padding: 18px 20px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--warn); }
.pitfall h4 { margin: 0 0 10px; font-size: 16px; }
.pitfall p { margin: 0 0 6px; font-size: 14.5px; color: var(--muted); line-height: 1.6; }
.pitfall p:last-child { margin: 0; color: var(--text); }
.pf-label {
  display: inline-block; min-width: 2.6em; margin-right: 8px; font-size: 12px; font-weight: 700; color: var(--warn);
}
.status { margin-top: 28px; padding: 14px 18px; border-radius: 12px; background: var(--accent-soft); max-width: 820px; }
.status .pf-label { color: var(--accent); }

/* 图库 */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; align-items: start; margin-top: 28px; }
.shot { margin: 0; min-width: 0; }
.span-1 { grid-column: span 1; }
.span-2 { grid-column: span 2; }
.span-4 { grid-column: span 4; justify-self: center; width: 100%; }
.shot-btn {
  position: relative; display: block; width: 100%; padding: 0; border: 1px solid var(--line);
  border-radius: 10px; overflow: hidden; background: var(--surface); cursor: zoom-in;
  transition: border-color .15s ease, transform .15s ease;
}
.shot-btn:hover { border-color: var(--accent); transform: translateY(-2px); }
.shot-btn img { display: block; width: 100%; height: auto; }
.gallery.crop .shot-btn img { object-fit: cover; object-position: top; }
.gallery.crop .span-2 img { aspect-ratio: 4 / 3; }
.gallery.crop .span-1 img { aspect-ratio: 2 / 3; }
.badge {
  position: absolute; right: 8px; bottom: 8px; font-size: 12px; padding: 2px 8px; border-radius: 999px;
  background: rgba(0, 0, 0, .7); color: #fff;
}
.shot figcaption { font-size: 13.5px; color: var(--muted); margin-top: 8px; }

#contact p { color: var(--muted); }
footer { text-align: center; color: var(--muted); font-size: 14px; padding: 64px 16px 40px; }

/* 点开看大图；整页长图在框里上下滚动 */
.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(10, 12, 11, .92);
  display: flex; align-items: center; justify-content: center;
}
.lightbox[hidden] { display: none; }
.lb-stage { margin: 0; display: flex; flex-direction: column; align-items: center; max-width: 94vw; max-height: 94vh; }
.lb-scroll { overflow: auto; max-height: calc(94vh - 40px); }
.lb-scroll img { display: block; max-width: 94vw; max-height: calc(94vh - 40px); }
.lightbox.tall .lb-scroll img { max-height: none; width: min(1000px, 94vw); }
.lb-stage figcaption { color: #ddd; font-size: 14px; padding-top: 10px; text-align: center; }
.lightbox button {
  position: absolute; z-index: 1; border: 0; background: rgba(255, 255, 255, .12); color: #fff;
  width: 44px; height: 44px; border-radius: 50%; font-size: 26px; line-height: 1; cursor: pointer;
}
.lightbox button:hover { background: rgba(255, 255, 255, .25); }
.lb-close { top: 14px; right: 14px; }
.lb-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 14px; top: 50%; transform: translateY(-50%); }

@media (max-width: 900px) {
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .span-2, .span-4 { grid-column: span 2; }
  .project { grid-template-columns: 1fr; padding-left: 26px; }
  .project::before { left: 6px; top: 12px; }
  .tl-marker { text-align: left; padding: 0 0 6px; }
  .tl-dot { right: auto; left: -26px; top: 5px; width: 14px; height: 14px; }
}
@media (max-width: 600px) {
  .nav nav { gap: 10px; }
  .nav nav a { font-size: 14px; }
  .hero { padding: 72px 0 40px; }
  .block { padding: 56px 0 16px; }
  h2 { font-size: 25px; }
  .milestones li { grid-template-columns: 1fr; gap: 2px; }
  .pitfalls { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .gallery { grid-template-columns: 1fr; }
  .span-1, .span-2, .span-4 { grid-column: span 1; }
  .lb-prev, .lb-next { top: auto; bottom: 14px; transform: none; }
}
@media (max-width: 420px) {
  .nav nav a { display: none; }
}
