/* ============== 基础 ============== */
:root {
  --bg: #0f0d0c;
  --bg-2: #161311;
  --paper: #f7f3ee;
  --paper-2: #efe7dc;
  --ink: #1a1714;
  --ink-2: #4a423b;
  --muted: #8a7f74;
  --line: #e3d9cb;
  --brand: #c1272d;        /* 主品牌色 - 淘宝红 */
  --brand-2: #e7b75a;      /* 辅助金 */
  --brand-3: #2b2520;      /* 深棕 */
  --maxw: 1200px;
  --r: 14px;
  --shadow: 0 30px 60px -30px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
em { font-style: normal; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.accent { color: var(--brand); }
.ok { color: #1f8a4c; }

.section { padding: 110px 0; position: relative; }
.section__kicker {
  font-size: 12px; letter-spacing: .25em; text-transform: uppercase;
  color: var(--brand); font-weight: 600; margin: 0 0 14px;
}
.section__title {
  font-family: 'Noto Serif SC', 'PingFang SC', serif;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 900;
  letter-spacing: .02em;
  margin: 0 0 14px;
  color: var(--ink);
}
.section__sub { color: var(--muted); margin: 0 0 56px; max-width: 640px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 26px; border-radius: 999px;
  font-weight: 600; font-size: 15px; letter-spacing: .02em;
  border: 1px solid transparent;
  transition: all .25s ease;
}
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: #a51f24; transform: translateY(-2px); box-shadow: var(--shadow); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn--block { width: 100%; justify-content: center; }

/* ============== 导航 ============== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  padding: 18px 0; transition: all .3s ease;
  background: rgba(247,243,238,.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled { background: rgba(247,243,238,.95); border-bottom-color: var(--line); padding: 12px 0; }
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand__mark {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--brand), #8b1a1f);
  font-family: 'Noto Serif SC', serif; font-size: 20px;
  box-shadow: 0 6px 18px -8px rgba(193,39,45,.6);
}
.brand__text strong { display: block; font-size: 15px; line-height: 1.1; }
.brand__text em { font-size: 11px; color: var(--muted); letter-spacing: .1em; }
.nav__links { display: flex; gap: 28px; font-size: 14px; }
.nav__links a { position: relative; padding: 4px 0; }
.nav__links a::after {
  content: ''; position: absolute; left: 0; right: 100%; bottom: -2px;
  height: 1px; background: var(--brand); transition: right .25s ease;
}
.nav__links a:hover::after { right: 0; }
.nav__cta {
  padding: 10px 20px; border-radius: 999px;
  background: var(--ink); color: var(--paper); font-size: 13px; font-weight: 500;
  transition: all .25s ease;
}
.nav__cta:hover { background: var(--brand); }

/* ============== Hero ============== */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; padding: 140px 0 100px;
  overflow: hidden;
}
.hero__bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(60% 50% at 80% 20%, rgba(193,39,45,.18), transparent 70%),
    radial-gradient(50% 40% at 10% 80%, rgba(231,183,90,.2), transparent 70%),
    linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
}
.hero__bg::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(26,23,20,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26,23,20,.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
}
.hero__inner { position: relative; z-index: 1; max-width: 820px; }
.hero__kicker {
  font-size: 12px; letter-spacing: .3em; color: var(--brand);
  font-weight: 600; margin: 0 0 28px;
}
.hero__title {
  font-family: 'Noto Serif SC', serif;
  font-size: clamp(40px, 6.5vw, 84px);
  font-weight: 900; line-height: 1.05;
  letter-spacing: .01em; margin: 0 0 28px;
}
.hero__title-accent {
  background: linear-gradient(120deg, var(--brand) 0%, #e7b75a 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__sub { font-size: 18px; color: var(--ink-2); margin: 0 0 40px; max-width: 620px; }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 70px; }
.hero__meta {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  border-top: 1px solid var(--line); padding-top: 32px;
}
.hero__meta li { display: flex; flex-direction: column; gap: 4px; }
.hero__meta strong { font-size: 30px; font-weight: 700; color: var(--ink); font-family: 'Noto Serif SC', serif; }
.hero__meta span { font-size: 12px; color: var(--muted); letter-spacing: .1em; }

.hero__scroll {
  position: absolute; right: 24px; bottom: 40px; z-index: 1;
  writing-mode: vertical-rl; font-size: 11px; letter-spacing: .3em; color: var(--muted);
  animation: float 2.4s ease-in-out infinite;
}
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(8px); } }

/* ============== About ============== */
.about { background: var(--paper-2); }
.about__grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 80px; align-items: start; }
.about__lead { font-size: 17px; color: var(--ink-2); margin: 0 0 18px; }
.about__tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.about__tags span {
  padding: 6px 14px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line);
  font-size: 13px; color: var(--ink-2);
}
.about__card {
  background: #fff; border-radius: var(--r);
  padding: 36px 32px; box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.about__avatar {
  width: 88px; height: 88px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; font-family: 'Noto Serif SC', serif; font-size: 40px; font-weight: 700;
  margin-bottom: 18px;
}
.about__card h3 { margin: 0 0 4px; font-size: 22px; }
.about__card > p { margin: 0 0 22px; color: var(--muted); font-size: 14px; }
.about__card ul { list-style: none; padding: 0; margin: 0; }
.about__card li {
  display: flex; justify-content: space-between; padding: 12px 0;
  border-top: 1px dashed var(--line); font-size: 14px;
}
.about__card li span { color: var(--muted); }
.about__card li b { font-weight: 600; }

/* ============== Skills ============== */
.skills__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.skill {
  position: relative; padding: 28px 26px 30px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; transition: transform .3s ease, box-shadow .3s ease;
}
.skill:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.skill__bar {
  position: absolute; left: 0; top: 0; height: 3px; width: var(--p);
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
}
.skill h3 { margin: 6px 0 8px; font-size: 17px; }
.skill p { margin: 0; color: var(--muted); font-size: 14px; }
.skill__num {
  position: absolute; right: 24px; top: 24px;
  font-family: 'Noto Serif SC', serif; font-weight: 700; color: var(--brand); font-size: 18px;
}
.tools {
  margin-top: 40px; padding: 20px 24px;
  display: flex; flex-wrap: wrap; gap: 10px;
  background: var(--ink); border-radius: var(--r);
}
.tools span {
  padding: 6px 14px; border-radius: 999px;
  background: rgba(255,255,255,.08); color: var(--paper);
  font-size: 13px; letter-spacing: .05em;
}

/* ============== Experience / Timeline ============== */
.services { background: var(--bg); color: var(--paper); }
.services .section__kicker { color: var(--brand-2); }
.services .section__title { color: var(--paper); }
.services .section__sub { color: rgba(247,243,238,.6); }

.timeline { position: relative; padding-left: 32px; margin-top: 16px; }
.timeline::before {
  content: ''; position: absolute; left: 7px; top: 8px; bottom: 8px;
  width: 2px; background: linear-gradient(180deg, var(--brand-2), rgba(255,255,255,.1));
}
.tl-item { position: relative; padding-bottom: 44px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item__dot {
  position: absolute; left: -32px; top: 6px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--brand); border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--brand);
}
.tl-item__body {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--r);
  padding: 26px 28px;
  transition: border-color .3s ease, transform .3s ease;
}
.tl-item__body:hover { border-color: var(--brand-2); transform: translateX(4px); }
.tl-item__head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 16px; flex-wrap: wrap; margin-bottom: 4px;
}
.tl-item__head h3 { margin: 0; font-size: 19px; color: var(--paper); }
.tl-item__time {
  font-size: 13px; color: var(--brand-2); letter-spacing: .1em;
  padding: 4px 12px; border: 1px solid rgba(231,183,90,.3); border-radius: 999px;
}
.tl-item__org { margin: 0 0 14px; font-size: 14px; color: rgba(247,243,238,.6); }
.tl-item__body ul { list-style: none; padding: 0; margin: 0; }
.tl-item__body li {
  position: relative; padding-left: 18px; margin: 8px 0;
  font-size: 14px; color: rgba(247,243,238,.78); line-height: 1.6;
}
.tl-item__body li::before {
  content: ''; position: absolute; left: 0; top: 10px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--brand-2);
}
.tl-item__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.tl-item__tags span {
  font-size: 12px; padding: 4px 12px; border-radius: 999px;
  background: rgba(255,255,255,.06); color: rgba(247,243,238,.7);
  letter-spacing: .05em;
}

/* ============== Works ============== */
.filters {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin: 0 0 36px;
  padding: 8px; background: #fff; border-radius: 999px;
  border: 1px solid var(--line); width: fit-content;
  max-width: 100%;
}
.filter {
  border: 0; background: transparent;
  padding: 10px 18px; border-radius: 999px;
  font-size: 14px; color: var(--ink-2); font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all .2s ease;
}
.filter em { font-size: 11px; color: var(--muted); font-style: normal; }
.filter:hover { color: var(--brand); }
.filter.is-active { background: var(--ink); color: var(--paper); }
.filter.is-active em { color: rgba(247,243,238,.5); }

.grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;
}
.card {
  position: relative; border-radius: var(--r);
  overflow: hidden; background: #000;
  aspect-ratio: 1 / 1;
  cursor: pointer;
  box-shadow: 0 6px 20px -10px rgba(0,0,0,.3);
  transition: transform .35s ease, box-shadow .35s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 24px 40px -20px rgba(0,0,0,.5); }
.card img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.card:hover img { transform: scale(1.06); }
.card__overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 20px;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.85) 100%);
  color: #fff;
  opacity: 0; transition: opacity .3s ease;
}
.card:hover .card__overlay { opacity: 1; }
.card__overlay span { font-size: 11px; letter-spacing: .2em; color: var(--brand-2); margin-bottom: 6px; }
.card__overlay h4 { margin: 0; font-size: 16px; font-weight: 500; }
.card__tag {
  position: absolute; top: 14px; left: 14px;
  background: rgba(255,255,255,.92); color: var(--ink);
  padding: 5px 12px; border-radius: 999px;
  font-size: 11px; letter-spacing: .1em; font-weight: 600;
}
.card.is-tall { aspect-ratio: 3 / 4; }   /* 海报竖版用 */
.card.is-wide { aspect-ratio: 4 / 3; }   /* 横版用 */

/* 超长图（详情/首页）：网格里只展示顶部主视觉，避免整条图被压成一条线 */
.card.is-long { aspect-ratio: 3 / 4; }
.card.is-long img { object-position: top; }
.card.is-long .card__long-badge {
  position: absolute; right: 12px; bottom: 12px; z-index: 2;
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(15,13,12,.72); color: #fff;
  padding: 5px 10px; border-radius: 999px;
  font-size: 11px; letter-spacing: .06em; font-weight: 500;
  backdrop-filter: blur(2px);
}
.card.is-long .card__long-badge::before { content: '↕'; font-size: 13px; line-height: 1; }
/* 顶部渐隐，暗示图片向下延续 */
.card.is-long::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 46px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.28));
  pointer-events: none; z-index: 1;
}

/* ============== Contact ============== */
.contact { background: var(--paper-2); }
.contact__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: start; }
.contact__lead { font-size: 17px; color: var(--ink-2); margin: 0 0 32px; }
.contact__list { list-style: none; padding: 0; margin: 0 0 28px; }
.contact__list li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 0; border-top: 1px solid var(--line);
}
.contact__list li:last-child { border-bottom: 1px solid var(--line); }
.contact__list span { color: var(--muted); font-size: 13px; letter-spacing: .1em; }
.contact__list b { font-size: 15px; }

.contact__actions { display: flex; gap: 12px; flex-wrap: wrap; }

.contact__card {
  background: #fff; padding: 36px 32px; border-radius: var(--r);
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.contact__card h3 {
  margin: 0 0 22px; font-size: 20px; padding-bottom: 14px;
  border-bottom: 2px solid var(--brand);
}
.contact__card dl { margin: 0; display: grid; gap: 14px; }
.contact__card dt {
  font-size: 12px; color: var(--muted); letter-spacing: .15em;
  text-transform: uppercase; margin-bottom: 4px;
}
.contact__card dd { margin: 0; font-size: 15px; font-weight: 500; color: var(--ink); }
.contact__note {
  margin: 24px 0 0; padding-top: 18px; border-top: 1px dashed var(--line);
  font-size: 12px; color: var(--muted); line-height: 1.6;
}

/* ============== 微信加好友浮层（手机端） ============== */
.wechat-modal {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(15,13,12,.7); backdrop-filter: blur(6px);
  display: none; align-items: center; justify-content: center;
  padding: 24px;
}
.wechat-modal.is-open { display: flex; }
.wechat-modal__box {
  position: relative; width: 100%; max-width: 340px;
  background: #fff; border-radius: var(--r); padding: 32px 24px 24px;
  text-align: center; box-shadow: var(--shadow);
  animation: pop .25s ease;
}
@keyframes pop { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.wechat-modal__close {
  position: absolute; top: 12px; right: 14px;
  border: 0; background: transparent; font-size: 26px; color: var(--muted);
  width: 36px; height: 36px; border-radius: 50%; line-height: 1;
}
.wechat-modal__close:hover { background: var(--paper-2); }
.wechat-modal__box h3 { margin: 0 0 18px; font-size: 18px; }
.wechat-modal__qr {
  width: 200px; height: 200px; margin: 0 auto 16px;
  border-radius: 12px; overflow: hidden;
  background: var(--paper-2);
  display: grid; place-items: center; position: relative;
  border: 1px solid var(--line);
}
.wechat-modal__qr img { width: 100%; height: 100%; object-fit: cover; }
.wechat-modal__qr-tip { position: absolute; bottom: 8px; left: 0; right: 0; margin: 0; font-size: 12px; color: var(--ink); background: rgba(255,255,255,.85); padding: 2px 0; }
.wechat-modal__qr-empty { display: none; font-size: 12px; color: var(--muted); padding: 16px; text-align: center; }
.wechat-modal__qr.is-empty .wechat-modal__qr-empty { display: block; }
.wechat-modal__qr.is-empty .wechat-modal__qr-tip { display: none; }
.wechat-modal__id { font-size: 14px; color: var(--ink-2); margin: 0 0 14px; }
.wechat-modal__id b { font-weight: 600; color: var(--brand); }
.wechat-modal__note { font-size: 12px; color: var(--muted); margin: 14px 0 0; line-height: 1.6; }

/* ============== Footer ============== */
.footer { background: var(--bg); color: rgba(247,243,238,.6); padding: 32px 0; font-size: 13px; }
.footer__inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer strong { color: var(--paper); }

/* ============== 灯箱 ============== */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(15,13,12,.96);
  display: none; align-items: center; justify-content: center;
  padding: 60px;
}
.lightbox.is-open { display: flex; }
.lightbox img {
  max-width: min(1200px, 90vw); max-height: 80vh;
  object-fit: contain; box-shadow: 0 30px 80px rgba(0,0,0,.6);
}

/* 超长图：按宽度完整显示，容器内垂直滚动查看全貌 */
.lightbox.is-long {
  display: none; align-items: flex-start; justify-content: center;
  padding: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.lightbox.is-long.is-open { display: flex; }
.lightbox.is-long img {
  max-width: min(900px, 100%); max-height: none;
  width: 100%; height: auto;
  margin: 72px auto 96px; box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.lightbox.is-long .lightbox__caption { position: fixed; }
.lightbox.is-long .lightbox__close,
.lightbox.is-long .lightbox__nav { position: fixed; }
.lightbox__caption {
  position: absolute; bottom: 30px; left: 0; right: 0; text-align: center;
  color: rgba(255,255,255,.7); font-size: 13px; letter-spacing: .1em;
}
.lightbox__close, .lightbox__nav {
  position: absolute; background: rgba(255,255,255,.1);
  border: 0; color: #fff; width: 48px; height: 48px;
  border-radius: 50%; font-size: 24px;
  display: grid; place-items: center;
  transition: background .2s ease;
}
.lightbox__close:hover, .lightbox__nav:hover { background: var(--brand); }
.lightbox__close { top: 24px; right: 24px; }
.lightbox__nav--prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lightbox__nav--next { right: 24px; top: 50%; transform: translateY(-50%); }

/* ============== 响应式 ============== */
@media (max-width: 960px) {
  .about__grid, .contact__inner { grid-template-columns: 1fr; gap: 48px; }
  .skills__grid { grid-template-columns: repeat(2, 1fr); }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .nav__links { display: none; }
  .hero__meta { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .section { padding: 70px 0; }
  .skills__grid, .grid { grid-template-columns: 1fr; }
  .timeline { padding-left: 24px; }
  .hero__title { font-size: 38px; }
  .hero__meta { grid-template-columns: 1fr 1fr; }
  .filters { overflow-x: auto; flex-wrap: nowrap; }
  .filter { white-space: nowrap; }
  .nav__cta { display: none; }
}

/* ============== 访问密码门禁 ============== */
.gate {
  position: fixed; inset: 0; z-index: 999;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(120% 120% at 50% 0%, #2a2622 0%, #14110f 60%, #0c0a09 100%);
  padding: 24px;
}
.gate.is-hidden { display: none; }
.gate__box {
  width: 100%; max-width: 360px; text-align: center;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px; padding: 40px 28px;
  box-shadow: 0 30px 80px rgba(0,0,0,.5);
  backdrop-filter: blur(6px);
}
.gate__lock { font-size: 44px; line-height: 1; margin-bottom: 14px; }
.gate__box h2 { color: #f3ede6; font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.gate__sub { color: rgba(243,237,230,.6); font-size: 13px; margin-bottom: 22px; }
.gate__form { display: flex; gap: 10px; }
.gate__input {
  flex: 1; min-width: 0;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14);
  color: #f3ede6; border-radius: 10px; padding: 12px 14px; font-size: 15px;
  letter-spacing: .2em; text-align: center; outline: none;
  transition: border-color .2s ease;
}
.gate__input:focus { border-color: var(--brand); }
.gate__input::placeholder { letter-spacing: normal; color: rgba(243,237,230,.35); }
.gate__error { color: #ff8a8a; font-size: 12px; margin-top: 12px; min-height: 16px; }
