/* ============================================================
   简历 / 作品集 · 单页
   纯静态，无外链。深色编辑风 + 琥珀色强调
   ============================================================ */

:root {
  --bg: #0b0c0f;
  --bg-2: #101217;
  --panel: #14161c;
  --panel-2: #191c23;
  --text: #e9e7e3;
  --muted: #9298a3;
  --muted-2: #6b7280;
  --accent: #d8a657;
  --accent-soft: rgba(216, 166, 87, 0.14);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --radius: 14px;
  --maxw: 1120px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --sans: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans SC",
    system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* 细颗粒噪点，让纯色不至于死板 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.16;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

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

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

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

/* ============================== 顶部导航 ============================== */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 62px;
  padding: 0 clamp(16px, 4vw, 40px);
  background: linear-gradient(to bottom, rgba(11, 12, 15, 0.92), rgba(11, 12, 15, 0.7));
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s var(--ease), background 0.4s var(--ease);
}
.nav.scrolled { border-bottom-color: var(--line); background: rgba(11, 12, 15, 0.86); }

.brand { display: flex; align-items: center; gap: 9px; font-size: 14px; letter-spacing: 0.12em; }
.brand-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(216, 166, 87, 0.7);
}
.brand-name { color: var(--text); }

.nav-links { display: flex; align-items: center; gap: clamp(8px, 2.4vw, 28px); }
.nav-links a {
  position: relative;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.06em;
  padding: 4px 2px;
  transition: color 0.25s var(--ease);
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a::after {
  content: "";
  position: absolute; left: 2px; right: 2px; bottom: -2px;
  height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.nav-links a.active::after, .nav-links a:hover::after { transform: scaleX(1); }

@media (max-width: 680px) {
  .nav-links { gap: 12px; }
  .nav-links a { font-size: 12px; }
  .brand-name { display: none; }
}

/* ============================== 通用 ============================== */
main { position: relative; z-index: 2; }

.sec {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(72px, 11vh, 140px) clamp(18px, 4vw, 40px) 0;
  scroll-margin-top: 70px;
}

.sec-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding-bottom: 26px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--line);
}
.sec-num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.1em;
}
.sec-head h2 {
  margin: 0;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.sec-en {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--muted-2);
}

/* 未填的占位符：虚线，提醒替换而不是装作有内容 */
.slot {
  border-bottom: 1px dashed rgba(216, 166, 87, 0.55);
  padding-bottom: 1px;
}

.hl { color: var(--accent); }

/* ============================== HERO ============================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 100px clamp(18px, 4vw, 40px) 60px;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -12%;
  right: -18%;
  width: 78vw;
  height: 78vw;
  max-width: 900px; max-height: 900px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, rgba(216, 166, 87, 0.13), transparent 62%);
  pointer-events: none;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.26em;
  color: var(--accent);
  margin: 0 0 26px;
}

h1 {
  margin: 0;
  font-size: clamp(46px, 9vw, 96px);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.01em;
}
h1 .line { display: block; }
h1 .accent { color: var(--accent); }

.lede {
  max-width: 620px;
  margin: clamp(22px, 4vh, 38px) 0 0;
  font-size: clamp(15px, 1.6vw, 18px);
  color: var(--muted);
  line-height: 1.85;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
  font-size: 12.5px;
  color: var(--muted-2);
  letter-spacing: 0.04em;
}
.hero-meta li { display: flex; align-items: center; gap: 10px; }
.hero-meta li + li::before {
  content: "";
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--line-strong);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(28px, 5vh, 46px); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 999px;
  font-size: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease),
    border-color 0.25s var(--ease), color 0.25s var(--ease), box-shadow 0.3s var(--ease);
}
.btn.primary {
  background: var(--accent);
  color: #14100a;
  font-weight: 600;
  box-shadow: 0 10px 30px -12px rgba(216, 166, 87, 0.7);
}
.btn.primary:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -14px rgba(216, 166, 87, 0.85); }
.btn.ghost { border-color: var(--line-strong); color: var(--text); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn .arrow { font-size: 12px; opacity: 0.7; }

/* 底部胶片孔装饰 */
.filmstrip {
  position: absolute;
  left: clamp(18px, 4vw, 40px);
  right: clamp(18px, 4vw, 40px);
  bottom: 34px;
  display: flex;
  justify-content: space-between;
  opacity: 0.3;
}
.filmstrip i {
  width: 26px; height: 15px;
  border-radius: 3px;
  border: 1px solid var(--line-strong);
}

/* ============================== 简介 ============================== */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(26px, 5vw, 64px);
}
.about-copy p {
  margin: 0 0 18px;
  font-size: 15.5px;
  color: #cfcdc8;
}
.about-copy p:last-child { margin-bottom: 0; }

.about-facts { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.fact { background: var(--panel); padding: 15px 18px; }
.fact .k { display: block; font-size: 11px; letter-spacing: 0.16em; color: var(--muted-2); margin-bottom: 4px; }
.fact .v { font-size: 14px; color: var(--text); }

@media (max-width: 780px) {
  .about-grid { grid-template-columns: 1fr; }
}

/* ============================== 能力卡 ============================== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.card {
  position: relative;
  padding: 26px 24px 28px;
  background: linear-gradient(160deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease),
    box-shadow 0.35s var(--ease);
  overflow: hidden;
}
.card::after {
  content: "";
  position: absolute; inset: auto -30% -60% auto;
  width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(216, 166, 87, 0.16), transparent 65%);
  opacity: 0; transition: opacity 0.4s var(--ease);
}
.card:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: 0 22px 50px -30px #000; }
.card:hover::after { opacity: 1; }
.card-idx {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.14em;
}
.card h3 { margin: 10px 0 10px; font-size: 17px; font-weight: 600; }
.card p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.85; }

/* ============================== 经历 ============================== */
.timeline { position: relative; padding-left: 34px; }
.timeline::before {
  content: "";
  position: absolute; left: 8px; top: 6px; bottom: 6px;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent), var(--line) 22%, var(--line) 85%, transparent);
}
.job {
  position: relative;
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: clamp(16px, 3vw, 40px);
  padding: 0 0 44px;
}
.job::before {
  content: "";
  position: absolute;
  left: -30px; top: 8px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--accent);
  box-shadow: 0 0 0 4px rgba(216, 166, 87, 0.1);
}
.job-when { font-family: var(--mono); font-size: 12px; color: var(--muted-2); letter-spacing: 0.05em; padding-top: 2px; }
.job-main h3 { margin: 0 0 12px; font-size: 17.5px; font-weight: 600; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tag {
  font-size: 11px;
  font-weight: 400;
  color: var(--accent);
  border: 1px solid rgba(216, 166, 87, 0.4);
  background: var(--accent-soft);
  border-radius: 4px;
  padding: 1px 7px;
  letter-spacing: 0.06em;
}
.job-main ul { margin: 0; padding-left: 18px; }
.job-main li { margin: 0 0 6px; font-size: 14px; color: var(--muted); line-height: 1.85; }
.job-main li::marker { color: rgba(216, 166, 87, 0.5); }

@media (max-width: 640px) {
  .job { grid-template-columns: 1fr; gap: 8px; }
  .job-when { padding-top: 0; }
}

/* ============================== 作品 ============================== */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.fbtn {
  padding: 7px 15px;
  font-size: 12.5px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.25s var(--ease);
}
.fbtn:hover { color: var(--text); border-color: var(--line-strong); }
.fbtn[aria-pressed="true"] {
  color: #14100a;
  background: var(--accent);
  border-color: var(--accent);
  font-weight: 600;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.work {
  position: relative;
  display: block;
  text-align: left;
  padding: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  color: inherit;
  font: inherit;
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.work:hover { transform: translateY(-5px); border-color: rgba(216, 166, 87, 0.4); box-shadow: 0 26px 60px -34px #000; }

.work-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--cover, linear-gradient(135deg, #1b1e26, #0f1116));
  overflow: hidden;
}
.work-cover img,
.work-cover video {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease), filter 0.5s var(--ease);
}
.work:hover .work-cover img { transform: scale(1.05); }

/* 没有素材时：编号 + 大字排版的占位封面 */
.work-cover .ph {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
}
.work-cover .ph .no {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.55);
}
.work-cover .ph .big {
  font-size: clamp(22px, 3.4vw, 34px);
  line-height: 1.15;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: -0.01em;
  max-width: 12em;
}
.work-cover .ph .big span { color: var(--accent); }

.work-body { padding: 16px 18px 18px; }
.work-cat {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--accent);
  text-transform: uppercase;
}
.work-title { margin: 7px 0 6px; font-size: 15.5px; font-weight: 600; line-height: 1.5; }
.work-sub { font-size: 12.5px; color: var(--muted-2); line-height: 1.7; }

.work-play {
  position: absolute;
  right: 14px; bottom: 14px;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(6px);
  font-size: 11px;
  color: #fff;
}

.grid-note { margin: 18px 0 0; font-size: 12px; color: var(--muted-2); }

/* ============================== 联系 ============================== */
.contact-box {
  padding: clamp(28px, 5vw, 52px);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: radial-gradient(120% 140% at 100% 0%, rgba(216, 166, 87, 0.09), transparent 55%), var(--panel);
}
.contact-box h3 { margin: 0 0 10px; font-size: clamp(21px, 3vw, 28px); }
.contact-box p { margin: 0 0 26px; color: var(--muted); font-size: 14.5px; }
.contact-list { margin: 0 0 28px; display: grid; gap: 12px; }
.contact-list > div { display: grid; grid-template-columns: 74px minmax(0, 1fr); align-items: baseline; }
.contact-list dt { font-size: 11px; letter-spacing: 0.18em; color: var(--muted-2); }
.contact-list dd { margin: 0; font-size: 15px; }
.copy-btn {
  margin-left: 8px; padding: 2px 9px; border-radius: 999px;
  border: 1px solid rgba(216,166,87,.42); background: transparent;
  color: var(--accent); font: 11px/1.6 var(--sans); cursor: pointer;
  vertical-align: 1px; transition: border-color .2s, color .2s;
}
.copy-btn:hover { border-color: var(--accent); }
.copy-btn:active { transform: translateY(1px); }

/* ============================== 页脚 ============================== */
.foot {
  position: relative; z-index: 2;
  max-width: var(--maxw);
  margin: clamp(60px, 10vh, 120px) auto 0;
  padding: 26px clamp(18px, 4vw, 40px) 46px;
  border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11.5px; color: var(--muted-2); letter-spacing: 0.06em;
}
.foot-en { font-family: var(--mono); letter-spacing: 0.2em; }

/* ============================== 作品弹层 ============================== */
.lightbox { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 24px; }
.lightbox[hidden] { display: none; }
.lb-scrim { position: absolute; inset: 0; background: rgba(4, 5, 7, 0.82); backdrop-filter: blur(10px); }
.lb-panel {
  position: relative;
  width: min(960px, 100%);
  max-height: min(88vh, 900px);
  display: flex; flex-direction: column;
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 40px 120px -40px #000;
  animation: lbIn 0.35s var(--ease);
}
@keyframes lbIn { from { opacity: 0; transform: translateY(14px) scale(0.985); } to { opacity: 1; transform: none; } }

.lb-close {
  position: absolute; top: 12px; right: 12px; z-index: 3;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(0, 0, 0, 0.5); border: 1px solid var(--line-strong);
  color: #fff; font-size: 18px; line-height: 1; cursor: pointer;
  backdrop-filter: blur(6px);
}
.lb-close:hover { background: var(--accent); color: #14100a; border-color: var(--accent); }

.lb-media { background: #000; }
.lb-media video, .lb-media img { width: 100%; max-height: 56vh; object-fit: contain; margin: 0 auto; }
/* 外链视频（B 站 / 腾讯视频等）用 iframe 直接播放 */
.lb-embed { width: 100%; background: #000; }
.lb-embed iframe { display: block; width: 100%; height: min(56vh, 460px); border: 0; }
.lb-ext {
  display: grid; gap: 14px; justify-items: center;
  padding: 44px 24px;
  background: linear-gradient(135deg, #1b1e26, #0f1116);
}
.lb-ext p { margin: 0; color: var(--muted-2); font-size: 12px; letter-spacing: 0.16em; }
.lb-media .ph {
  aspect-ratio: 16 / 9;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #1b1e26, #0f1116);
  color: var(--muted-2);
  font-size: 12px; letter-spacing: 0.16em;
}
.lb-body { padding: 22px clamp(18px, 3vw, 30px) 26px; overflow: auto; }
.lb-cat { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.16em; color: var(--accent); }
.lb-body h3 { margin: 8px 0 10px; font-size: 20px; }
.lb-body p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.85; }
.lb-meta { margin: 18px 0 0; display: grid; gap: 8px; }
.lb-meta > div { display: grid; grid-template-columns: 68px minmax(0, 1fr); font-size: 12.5px; }
.lb-meta dt { color: var(--muted-2); letter-spacing: 0.1em; font-size: 11px; }
.lb-meta dd { margin: 0; color: #cfcdc8; }

@media (max-width: 640px) {
  .lb-panel { max-height: 92vh; border-radius: 14px; }
  .lb-media video, .lb-media img { max-height: 42vh; }
  .lb-embed iframe { height: 42vh; }
}

/* ============================== 进场动画 ============================== */
/* 兜底优先：默认可见。只有 JS 明确判定「在首屏之外」的元素才加 .pre 藏起来，
   这样脚本没跑、观察器没回调、浏览器不支持动画，页面都不会白屏。 */
.reveal { transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.pre { opacity: 0; transform: translateY(18px); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .work, .card { transition: none; }
}

/* ============================== 打印：一份像样的纸质简历 ============================== */
@media print {
  body { background: #fff; color: #111; font-size: 11.5pt; }
  body::before, .nav, .hero-glow, .filmstrip, .hero-actions, .filters, .grid-note,
  .lightbox, .foot, .contact-box .btn { display: none !important; }
  .hero { min-height: auto; padding: 0 0 18pt; }
  h1 { font-size: 30pt; color: #111; }
  h1 .accent { color: #8a5a12; }
  .eyebrow { color: #8a5a12; }
  .lede, .hero-meta, .about-copy p, .job-main li, .card p, .work-sub, .contact-list dd { color: #333; }
  .sec { padding: 18pt 0 0; max-width: none; }
  .sec-head { padding-bottom: 8pt; margin-bottom: 12pt; border-color: #ddd; }
  .sec-en, .sec-num { color: #8a5a12; }
  .card, .work, .about-facts, .contact-box { background: #fff !important; border-color: #ddd; box-shadow: none; break-inside: avoid; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 8pt; }
  .work-cover { aspect-ratio: 16 / 9; background: #eee; }
  .work-cover .ph .big { color: #111; font-size: 14pt; }
  .timeline::before { background: #ddd; }
  .job { padding-bottom: 10pt; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
