/* 水墨 × 霓虹：墨色底、宣纸色字、青色霓虹、朱砂印章。
   不加载任何外部字体，国内访问也快：中文用系统宋体，等宽用系统 mono。 */
:root {
  --ink: #0b0d10;
  --ink-2: #12161b;
  --ink-3: #1b2129;
  --paper: #ece6d9;
  --paper-dim: #a9a399;
  --paper-faint: #6f6b64;
  --neon: #3ef2e0;
  --neon-soft: rgba(62, 242, 224, .16);
  --cinnabar: #ff4d6d;
  --seal: #c8323f;
  --violet: #8b7bff;
  --line: rgba(236, 230, 217, .12);

  --serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "Iowan Old Style", Georgia, serif;
  --sans: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  --gutter: clamp(16px, 5vw, 72px);
  --maxw: 1240px;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* 细微的宣纸颗粒 */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: .05;
  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='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
em { font-style: normal; color: var(--neon); }
.mono { font-family: var(--mono); letter-spacing: .08em; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 200; background: var(--paper); color: var(--ink); padding: 8px 12px; }

:focus-visible { outline: 2px solid var(--neon); outline-offset: 3px; border-radius: 4px; }

/* ---------- 印章 ---------- */
.seal {
  display: inline-grid;
  place-items: center;
  width: 44px; height: 44px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.05;
  writing-mode: vertical-rl;
  letter-spacing: .05em;
  color: #fff3ef;
  background: var(--seal);
  border-radius: 6px;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .25), 0 0 18px rgba(200, 50, 63, .35);
  transform: rotate(-4deg);
}
.seal--sm { width: 32px; height: 32px; font-size: 11px; border-radius: 4px; }

/* ---------- 导航 ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--gutter);
  transition: background .4s var(--ease), padding .4s var(--ease), border-color .4s;
  border-bottom: 1px solid transparent;
}
.nav.is-solid {
  background: rgba(11, 13, 16, .72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
  padding-top: 12px; padding-bottom: 12px;
}
.nav__brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.nav__name { font-family: var(--serif); font-size: 18px; letter-spacing: .04em; }
.nav__links { display: flex; gap: clamp(16px, 3vw, 36px); }
.nav__links a {
  text-decoration: none;
  font-size: 15px;
  color: var(--paper-dim);
  position: relative;
  transition: color .3s;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px;
  background: var(--neon); box-shadow: 0 0 8px var(--neon);
  transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
}
.nav__links a:hover { color: var(--paper); }
.nav__links a:hover::after { transform: scaleX(1); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 15px;
  text-decoration: none;
  transition: transform .25s var(--ease), box-shadow .25s, background .25s, color .25s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn--neon {
  color: var(--ink);
  background: var(--neon);
  box-shadow: 0 0 0 1px var(--neon), 0 0 24px rgba(62, 242, 224, .35);
  font-weight: 600;
}
.btn--neon:hover { box-shadow: 0 0 0 1px var(--neon), 0 0 40px rgba(62, 242, 224, .6); }
.btn--ghost {
  color: var(--paper);
  border: 1px solid rgba(236, 230, 217, .3);
  background: rgba(11, 13, 16, .25);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.btn--ghost:hover { border-color: var(--paper); }

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  align-items: center;
  padding: 120px var(--gutter) 96px;
  overflow: hidden;
  isolation: isolate;
}
.hero__canvas, .hero__video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: -2;
}
.hero__video { object-fit: cover; }
.hero__veil {
  position: absolute; inset: 0; z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(11, 13, 16, .78) 0%, rgba(11, 13, 16, .35) 45%, rgba(11, 13, 16, 0) 70%),
    linear-gradient(0deg, var(--ink) 0%, rgba(11, 13, 16, 0) 12%);
}
.hero__copy { max-width: 640px; position: relative; z-index: 2; pointer-events: none; }
.hero__copy a { pointer-events: auto; }
.eyebrow { margin: 0 0 18px; font-size: 12px; color: var(--neon); }
.eyebrow .mono, .eyebrow.mono { letter-spacing: .3em; }
.hero__title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(56px, 11vw, 148px);
  line-height: 1.02;
  letter-spacing: .02em;
}
.hero__line {
  display: block;
  opacity: 0;
  filter: blur(14px);
  transform: translateY(18px);
  animation: inkIn 1.6s var(--ease) forwards;
  animation-delay: calc(.25s + var(--d) * .45s);
}
.hero__line--neon {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--neon);
  text-shadow: 0 0 22px rgba(62, 242, 224, .55);
}
@keyframes inkIn { to { opacity: 1; filter: blur(0); transform: none; } }
.hero__lede {
  margin: 28px 0 8px;
  font-size: clamp(17px, 2vw, 21px);
  color: var(--paper);
  max-width: 30em;
  opacity: 0; animation: fadeUp 1s var(--ease) 1.4s forwards;
}
.hero__sub {
  margin: 0;
  font-size: 12px;
  color: var(--paper-faint);
  opacity: 0; animation: fadeUp 1s var(--ease) 1.6s forwards;
}
.hero__cta {
  display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px;
  opacity: 0; animation: fadeUp 1s var(--ease) 1.8s forwards;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.hero__poem {
  position: absolute;
  right: var(--gutter);
  top: 18vh;
  display: flex; gap: 14px;
  writing-mode: vertical-rl;
  font-family: var(--serif);
  font-size: clamp(18px, 2vw, 24px);
  letter-spacing: .6em;
  color: rgba(236, 230, 217, .55);
  pointer-events: none;
}
.hero__poem span:last-child { margin-top: 3em; }
.hero__hint {
  position: absolute;
  left: 50%; bottom: 40px;
  transform: translateX(-50%);
  margin: 0;
  font-size: 11px;
  color: var(--paper-faint);
  transition: opacity .8s;
  pointer-events: none;
  white-space: nowrap;
}
.hero__hint.is-gone { opacity: 0; }
.hero__scroll {
  position: absolute; right: var(--gutter); bottom: 36px;
  width: 22px; height: 36px;
  border: 1px solid rgba(236, 230, 217, .35);
  border-radius: 12px;
}
.hero__scroll span {
  position: absolute; left: 50%; top: 7px;
  width: 3px; height: 7px; margin-left: -1.5px;
  border-radius: 2px;
  background: var(--neon);
  box-shadow: 0 0 8px var(--neon);
  animation: wheel 1.8s var(--ease) infinite;
}
@keyframes wheel { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }
.has-video .hero__hint { display: none; }

/* ---------- 小机器人 ---------- */
.bot {
  position: absolute;
  top: 0; left: 0;
  z-index: 40;
  width: 92px;
  cursor: pointer;
  transform-origin: 50% 100%;
  -webkit-tap-highlight-color: transparent;
  will-change: transform;
}
.bot__svg { width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .45)); }
.bot__bob { transform-box: fill-box; transform-origin: 50% 100%; animation: bob 3.2s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-3px) rotate(1.5deg); } }
.bot__bulb { animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: .65; } 50% { opacity: 1; } }
.bot__eye { transform-box: fill-box; transform-origin: center; transition: transform .08s; }
.bot.is-blink .bot__eye { transform: scaleY(.12); }
.bot__arm { transform-box: fill-box; transform-origin: 0 0; }
.bot.is-wave .bot__arm--r { animation: wave .5s ease-in-out 3; transform-origin: 0% 0%; }
@keyframes wave { 50% { transform: rotate(-70deg); } }
.bot.is-jump .bot__bob { animation: jump .6s var(--ease); }
@keyframes jump { 40% { transform: translateY(-18px) rotate(-4deg); } 100% { transform: translateY(0); } }
.bot__bubble {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translate(-50%, 6px) scale(.92);
  min-width: 132px; max-width: 220px;
  padding: 8px 12px;
  border-radius: 14px;
  background: rgba(236, 230, 217, .96);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s var(--ease);
}
.bot__bubble::after {
  content: ""; position: absolute; left: 50%; top: 100%;
  border: 6px solid transparent; border-top-color: rgba(236, 230, 217, .96);
  transform: translateX(-50%);
}
.bot__bubble.is-on { opacity: 1; transform: translate(-50%, 0) scale(1); }
/* 离开首屏后停在右下角 */
.bot.is-docked {
  position: fixed;
  top: auto; left: auto;
  right: 20px; bottom: 16px;
  width: 64px;
  transform: none !important;
  animation: dockIn .5s var(--ease);
}
.bot.is-docked .bot__bubble { left: auto; right: 0; transform: translate(0, 6px) scale(.92); }
.bot.is-docked .bot__bubble.is-on { transform: none; }
.bot.is-docked .bot__bubble::after { left: auto; right: 22px; transform: none; }
@keyframes dockIn { from { opacity: 0; transform: translateY(20px) scale(.8); } to { opacity: 1; } }

/* ---------- 通用分区 ---------- */
section { position: relative; }
.section-head { max-width: var(--maxw); margin: 0 auto 64px; }
.section-head h2, .contact h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.1;
  font-weight: 700;
}
.section-head__lede { margin: 14px 0 0; color: var(--paper-dim); font-size: 17px; }

/* ---------- 作品 ---------- */
.works { padding: 120px var(--gutter) 60px; }
.work {
  max-width: var(--maxw);
  margin: 0 auto 140px;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}
.work--flip .work__media { order: 2; }
.work__media {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: var(--ink-2);
  box-shadow: 0 0 0 1px var(--line), 0 30px 80px rgba(0, 0, 0, .55);
  aspect-ratio: 16 / 10;
}
.work__media img, .work__media video { width: 100%; height: 100%; object-fit: cover; object-position: top left; transition: transform 1.2s var(--ease); }
.work__media video { object-position: center; }
.work:hover .work__media img, .work:hover .work__media video { transform: scale(1.03); }
.work__media::after {
  /* 霓虹描边，悬停时亮起 */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(62, 242, 224, 0);
  transition: box-shadow .5s;
}
.work:hover .work__media::after { box-shadow: inset 0 0 0 1px rgba(62, 242, 224, .6), inset 0 0 40px rgba(62, 242, 224, .12); }
.work__live {
  position: absolute; left: 14px; bottom: 14px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  background: rgba(11, 13, 16, .78);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--paper);
}
.work__live i { width: 7px; height: 7px; border-radius: 50%; background: var(--neon); box-shadow: 0 0 10px var(--neon); animation: pulse 1.6s infinite; }
.work__live--local i { background: #f5b84b; box-shadow: 0 0 10px #f5b84b; }
.work__num {
  margin: 0;
  font-family: var(--serif);
  font-size: 64px;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(236, 230, 217, .35);
}
.work__title {
  margin: 14px 0 16px;
  font-family: var(--serif);
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.2;
}
.work__title .mono { display: block; margin-top: 6px; font-family: var(--mono); font-size: 13px; font-weight: 400; color: var(--neon); letter-spacing: .2em; }
.work__desc { margin: 0 0 18px; color: var(--paper); opacity: .88; }
.work__points { margin: 0 0 22px; padding: 0; list-style: none; color: var(--paper-dim); font-size: 15px; }
.work__points li { position: relative; padding-left: 20px; margin: 6px 0; }
.work__points li::before { content: ""; position: absolute; left: 0; top: .78em; width: 10px; height: 1px; background: var(--cinnabar); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 26px; padding: 0; list-style: none; }
.tags li { font-size: 11px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--paper-dim); }
.work__note { margin: 0; font-size: 14px; color: var(--paper-faint); }

/* 墨迹晕开的出现效果 */
.ink-mask {
  -webkit-mask-image: radial-gradient(circle at 30% 40%, #000 0%, #000 var(--r, 0%), transparent calc(var(--r, 0%) + 18%));
  mask-image: radial-gradient(circle at 30% 40%, #000 0%, #000 var(--r, 0%), transparent calc(var(--r, 0%) + 18%));
}
.reveal.is-in .ink-mask { animation: inkSpread 1.6s var(--ease) forwards; }
@property --r { syntax: "<percentage>"; inherits: false; initial-value: 0%; }
@keyframes inkSpread { to { --r: 140%; } }

.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- 关于 ---------- */
.about { padding: 80px var(--gutter) 120px; }
.about__grid { max-width: var(--maxw); margin: 0 auto; }
.about__intro {
  margin: 0 0 56px;
  max-width: 34em;
  font-family: var(--serif);
  font-size: clamp(20px, 2.4vw, 28px);
  line-height: 1.7;
}
.about__cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.pillar {
  position: relative;
  padding: 28px 26px 26px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .025), rgba(255, 255, 255, 0));
  overflow: hidden;
  transition: border-color .4s, transform .4s var(--ease);
}
.pillar:hover { border-color: rgba(62, 242, 224, .45); transform: translateY(-4px); }
.pillar__glyph {
  position: absolute; right: -6px; bottom: -28px;
  font-family: var(--serif); font-size: 120px; line-height: 1;
  color: rgba(236, 230, 217, .05);
  transition: color .4s;
}
.pillar:hover .pillar__glyph { color: rgba(62, 242, 224, .1); }
.pillar h3 { margin: 0 0 10px; font-family: var(--serif); font-size: 22px; }
.pillar p { margin: 0; color: var(--paper-dim); font-size: 15px; position: relative; }

/* ---------- 联系 ---------- */
.contact { padding: 100px var(--gutter) 140px; text-align: center; }
.contact__inner { max-width: 720px; margin: 0 auto; }
.contact p { color: var(--paper-dim); font-size: 17px; }
.contact__links { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.contact::before {
  /* 一缕横向霓虹弦，呼应首屏 */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--neon), transparent);
  box-shadow: 0 0 14px var(--neon);
  opacity: .5;
}

.foot {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  padding: 36px var(--gutter) 56px;
  color: var(--paper-faint);
  font-size: 12px;
}
.foot p { margin: 0; }

/* ---------- 窄屏 ---------- */
@media (max-width: 860px) {
  .work, .work--flip { grid-template-columns: 1fr; margin-bottom: 96px; }
  .work--flip .work__media { order: 0; }
  .about__cards { grid-template-columns: 1fr; }
  .hero { align-items: start; padding-top: 22vh; }
  .hero__poem { top: auto; bottom: 28vh; font-size: 16px; }
  .hero__veil { background: linear-gradient(180deg, rgba(11, 13, 16, .55) 0%, rgba(11, 13, 16, .25) 55%, rgba(11, 13, 16, .15) 85%, var(--ink) 100%); }
  .hero__scroll { display: none; }
  .nav__name { display: none; }
  .bot { width: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .hero__line, .hero__lede, .hero__sub, .hero__cta { opacity: 1; filter: none; transform: none; }
  .ink-mask { -webkit-mask-image: none; mask-image: none; }
  html { scroll-behavior: auto; }
}
