/* =========================================================
   个人作品集 · 极简 · 纯黑白灰（参考 jiejoe.com 的高级感）
   设计 token 全在 :root
   ========================================================= */
:root {
  --bg: #ffffff;
  --fg: #0a0a0a;
  --muted: #6e6e73;
  --faint: #a1a1a6;
  --line: rgba(0, 0, 0, .12);
  --line-soft: rgba(0, 0, 0, .07);
  --accent: #e60000;
  --accent-soft: rgba(230, 0, 0, .12);
  --accent-line: rgba(230, 0, 0, .55);

  --inv-bg: #0a0a0a;
  --inv-fg: #f4f4f5;
  --inv-muted: #a1a1a6;

  --maxw: 1200px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --expo: cubic-bezier(.16, 1, .3, 1);

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Microsoft YaHei", "Hiragino Sans GB", "Noto Sans CJK SC",
               system-ui, sans-serif;
  --font-mono: ui-monospace, "JetBrains Mono", "Cascadia Code", SFMono-Regular,
               Menlo, Consolas, "Liberation Mono", monospace;
}

/* ---------------- Reset ---------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
html.js { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg); color: var(--fg);
  line-height: 1.6; font-size: 16px;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
img { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
h1, h2, h3 { font-weight: 700; line-height: 1.05; }
::selection { background: var(--fg); color: var(--bg); }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }

/* ---------------- 工具类 ---------------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(20px, 5vw, 64px); }
.mono { font-family: var(--font-mono); }
.display { letter-spacing: 0; line-height: 1.0; }
.text-red { color: var(--accent); }
.eyebrow { font-size: .78rem; letter-spacing: .14em; color: var(--muted); text-transform: uppercase; }
.skip-link { position: fixed; left: 16px; top: -60px; z-index: 1001; background: var(--fg); color: var(--bg); padding: 10px 16px; border-radius: 6px; transition: top .2s var(--ease); }
.skip-link:focus { top: 16px; }

/* ---------------- 全局红色线条 ---------------- */
.redline-layer {
  position: fixed;
  inset: 0;
  z-index: 2;
  width: 100vw;
  height: 100svh;
  pointer-events: none;
  overflow: visible;
}
.redline {
  fill: none;
  stroke: var(--accent);
  stroke-width: .16;
  vector-effect: non-scaling-stroke;
  opacity: 1;
}
.redline--soft {
  stroke-width: .11;
  opacity: .68;
}
.redline-dots {
  fill: var(--accent);
  opacity: .95;
}

/* 链接下划线滑入 */
.link-underline { position: relative; display: inline-block; padding-bottom: 3px; font-weight: 500; }
.link-underline::after { content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .5s var(--expo); }
.link-underline:hover::after { transform: scaleX(1); transform-origin: left; }

/* =========================================================
   顶部进度条 & 加载动画
   ========================================================= */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 95; }
.progress span { display: block; height: 100%; width: 0; background: var(--fg); }

#preloader {
  position: fixed; inset: 0; z-index: 1000; background: var(--bg);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: clamp(24px, 5vw, 60px);
}
#preloader.is-done { transform: translateY(-100%); transition: transform 1s var(--expo); }
.preloader__inner { display: flex; justify-content: space-between; align-items: flex-end; }
.preloader__word { color: var(--muted); letter-spacing: .25em; font-size: .8rem; }
.preloader__num { font-size: clamp(3.5rem, 15vw, 10rem); font-weight: 700; line-height: .9; letter-spacing: -.04em; }
.preloader__pct { font-size: .32em; vertical-align: super; color: var(--muted); margin-left: .08em; }
.preloader__bar { margin-top: 22px; height: 2px; width: 100%; background: var(--line); overflow: hidden; }
.preloader__bar span { display: block; height: 100%; width: 0; background: var(--fg); }

/* =========================================================
   导航
   ========================================================= */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 90; transition: background .4s var(--ease), border-color .4s var(--ease); border-bottom: 1px solid transparent; }
.nav.is-scrolled { background: rgba(255, 255, 255, .82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom-color: var(--line-soft); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.nav__brand { display: inline-flex; align-items: baseline; gap: 10px; font-weight: 700; font-size: 1.06rem; letter-spacing: -.01em; }
.nav__name { white-space: nowrap; }
.nav__role { display: none; color: var(--muted); font-family: var(--font-mono); font-size: .78rem; font-weight: 500; letter-spacing: .02em; white-space: nowrap; }
.nav__dot { color: var(--faint); }
.nav__links { display: flex; align-items: center; gap: 30px; }
.nav__links a { font-size: .94rem; display: inline-flex; align-items: center; gap: 6px; position: relative; color: var(--fg); }
.nav__idx { color: var(--faint); font-size: .68rem; transition: color .2s var(--ease); }
.nav__links a:hover .nav__idx { color: var(--fg); }
.nav__links a::after { content: ""; position: absolute; left: 0; bottom: -4px; height: 1px; width: 100%; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .45s var(--expo); }
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__resume { font-weight: 600; }
.nav__toggle { display: none; flex-direction: column; gap: 6px; width: 30px; height: 30px; align-items: flex-end; justify-content: center; }
.nav__toggle span { display: block; height: 2px; width: 26px; background: var(--fg); transition: transform .35s var(--expo), opacity .2s var(--ease); }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

/* =========================================================
   通用区块
   ========================================================= */
.section { padding: clamp(80px, 14vh, 170px) 0; }
.section__head { margin-bottom: clamp(36px, 6vh, 72px); }
.section__head--row .h2 { margin-top: .25em; }
.section__note { color: var(--muted); margin-top: 16px; max-width: 50ch; }
.h2 { font-size: clamp(2rem, 6vw, 4rem); }

/* ---------------- Hero ---------------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 74px;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0) 0 50%, rgba(0, 0, 0, .025) 100%),
    var(--bg);
}
.hero .container { position: relative; z-index: 3; }
.hero__title { font-size: clamp(2.9rem, 11vw, 9.5rem); font-weight: 800; margin: .26em 0 .42em; max-width: 18ch; }
.hero__title--poster {
  width: min(78rem, 100%);
  max-width: none;
  margin: .32em 0 .45em;
  font-size: clamp(5.2rem, 8.15vw, 8.9rem);
  font-weight: 900;
  line-height: 1;
  word-break: keep-all;
  text-shadow: 0 14px 28px rgba(0, 0, 0, .08);
}
.hero__line {
  display: block;
  white-space: nowrap;
}
.hero__line--top {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: end;
  column-gap: clamp(2rem, 7vw, 8rem);
}
.hero__line--bottom {
  margin-top: .02em;
}
.hero__phrase { display: inline-block; }
.hero__phrase--right {
  justify-self: end;
}
.hero__lead { font-size: clamp(1.05rem, 1.7vw, 1.35rem); color: var(--muted); max-width: 38ch; margin-bottom: 2.8em; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 30px; font-size: 1.05rem; }
.hero__cue { position: absolute; left: 50%; bottom: 30px; transform: translateX(-50%); color: var(--faint); font-size: .76rem; letter-spacing: .12em; display: flex; align-items: center; gap: 10px; }
.hero__cue-line { width: 40px; height: 1px; background: var(--faint); display: inline-block; animation: cue 2.2s var(--ease) infinite; transform-origin: left; }
@keyframes cue { 0%, 100% { transform: scaleX(.4); opacity: .5; } 50% { transform: scaleX(1); opacity: 1; } }

@media (max-width: 900px) {
  .hero__title--poster {
    width: 100%;
    font-size: clamp(4.2rem, 12vw, 6.1rem);
  }
  .hero__line--top {
    grid-template-columns: 1fr;
    row-gap: 0;
  }
  .hero__phrase--right { justify-self: start; }
  .hero__line--bottom { margin-top: .02em; }
  .redline-layer { opacity: .9; }
}

@media (max-width: 640px) {
  .hero__title--poster {
    font-size: clamp(2.7rem, 13.2vw, 3.7rem);
    line-height: 1.08;
  }
  .hero__line { white-space: nowrap; }
  .hero__line--top { row-gap: .02em; }
  .hero__line--bottom { margin-top: .04em; }
  .redline-layer { opacity: .72; }
}

@media (max-width: 420px) {
  .hero__title--poster { font-size: clamp(2.55rem, 12.8vw, 3.25rem); }
}

/* ---------------- 关于 ---------------- */
.grid-2 { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.grid-2 .section__head { margin-bottom: 0; position: sticky; top: 110px; }
.prose p { font-size: clamp(1.05rem, 1.5vw, 1.28rem); margin-bottom: 1.3em; max-width: 60ch; color: #2a2a2e; }
.prose em { font-style: normal; font-weight: 600; color: var(--fg); }
.facts { margin-top: 44px; border-top: 1px solid var(--line); }
.facts li { display: flex; justify-content: space-between; gap: 24px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.facts__k { color: var(--muted); }
.facts__v { font-weight: 600; text-align: right; }

/* ---------------- 技能 ---------------- */
.rows { border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: 240px 1fr; gap: 24px; padding: clamp(20px, 3vh, 30px) 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.row__k { color: var(--muted); letter-spacing: .04em; }
.row__v { font-size: clamp(1.15rem, 2.2vw, 1.7rem); font-weight: 600; letter-spacing: -.01em; }

.skill-scenes {
  border-top: 1px solid var(--line);
  margin-top: clamp(8px, 2vh, 20px);
}
.skill-scene {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
  gap: clamp(32px, 6vw, 84px);
  min-height: clamp(440px, 70vh, 760px);
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.skill-scene--reverse {
  grid-template-columns: minmax(320px, .85fr) minmax(0, 1.15fr);
}
.skill-scene--reverse .skill-scene__word {
  grid-column: 2;
  grid-row: 1;
  text-align: right;
}
.skill-scene--reverse .skill-scene__body {
  grid-column: 1;
  grid-row: 1;
}
.skill-scene__word {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--fg);
  font-size: clamp(4.8rem, 11vw, 11.5rem);
  font-weight: 900;
  line-height: .8;
  overflow-wrap: anywhere;
}
.skill-scene__word--solid {
  color: var(--accent);
  -webkit-text-stroke: 0;
  text-shadow: 0 14px 28px rgba(230, 0, 0, .12);
}
.skill-scene__body {
  position: relative;
  align-self: center;
}
.skill-scene__idx {
  display: block;
  color: var(--accent);
  font-size: .82rem;
  letter-spacing: .16em;
  margin-bottom: 18px;
}
.skill-scene__title {
  display: none;
}
.skill-list {
  border-top: 1px solid var(--line);
}
.skill-list li {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: clamp(1.05rem, 2vw, 1.55rem);
  line-height: 1.2;
  transition: color .25s var(--ease), transform .25s var(--ease);
}
.skill-list li:hover {
  color: var(--accent);
  transform: translateX(8px);
}
.skill-scene__note {
  margin-top: 28px;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.55vw, 1.28rem);
  max-width: 28ch;
}

/* ---------------- 作品 ---------------- */
.works { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(28px, 4vw, 60px); }
.work { display: block; }
.work__media { aspect-ratio: 16 / 10; overflow: hidden; background: #f1f1f2; border: 1px solid var(--line); }
.work__media img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); transition: filter .6s var(--expo), transform .9s var(--expo); }
.work:hover .work__media img { filter: grayscale(0); transform: scale(1.04); }
.work__body { padding-top: 18px; display: flex; flex-direction: column; gap: 11px; }
.work__index { font-size: .74rem; color: var(--faint); }
.work__title { font-size: clamp(1.3rem, 2.6vw, 2rem); font-weight: 700; letter-spacing: -.02em; }
.work__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { font-family: var(--font-mono); font-size: .72rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 3px 11px; }
.work__desc { color: var(--muted); font-size: .98rem; }
.work__links { display: flex; flex-wrap: wrap; gap: 18px; padding-top: 6px; }
.work__link { font-size: .9rem; font-weight: 600; }

/* ---------------- 联系（反色）---------------- */
.section--invert { background: var(--inv-bg); color: var(--inv-fg); }
.section--invert .eyebrow { color: var(--inv-muted); }
.contact__mail { display: inline-block; font-size: clamp(1.9rem, 8vw, 6rem); font-weight: 800; margin: .25em 0 .5em; color: var(--inv-fg); word-break: break-word; }
.contact__note { color: var(--inv-muted); max-width: 42ch; margin-bottom: 2.2em; font-size: 1.05rem; }
.contact__links { display: flex; flex-wrap: wrap; gap: 30px; font-size: 1.05rem; }
.link-underline--light { color: var(--inv-fg); }

/* ---------------- 页脚 ---------------- */
.footer { border-top: 1px solid var(--line); padding: 30px 0; }
.footer__inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--muted); font-size: .85rem; }

/* =========================================================
   动效：揭示 / 文字遮罩
   ========================================================= */
.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--expo), transform 1s var(--expo); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

.js [data-split] { visibility: hidden; }
.js [data-split].split-ready { visibility: visible; }
.split-w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .14em; margin-bottom: -.14em; }
.split-i { display: inline-block; transform: translateY(110%); transition: transform .95s var(--expo); transition-delay: var(--d, 0ms); }
[data-split].is-in .split-i { transform: translateY(0); }

/* =========================================================
   响应式
   ========================================================= */
@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; gap: 32px; }
  .grid-2 .section__head { position: static; }
  .works { grid-template-columns: 1fr; }
  .row { grid-template-columns: 1fr; gap: 8px; }
  .skill-scene,
  .skill-scene--reverse {
    grid-template-columns: 1fr;
    gap: 24px;
    min-height: auto;
    padding: 72px 0;
  }
  .skill-scene--reverse .skill-scene__word,
  .skill-scene--reverse .skill-scene__body {
    grid-column: auto;
    grid-row: auto;
  }
  .skill-scene__word,
  .skill-scene--reverse .skill-scene__word {
    text-align: left;
    font-size: clamp(4.2rem, 16vw, 8rem);
  }
  .skill-scene__body {
    max-width: 620px;
  }

  .nav__toggle { display: flex; }
  .nav__inner {
    height: 60px;
    position: relative;
  }
  .nav__brand {
    min-width: 0;
    max-width: calc(100% - 48px);
    align-items: center;
    gap: 8px;
    overflow: hidden;
  }
  .nav__name {
    flex: 0 0 auto;
  }
  .nav__toggle {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    margin-left: 14px;
    position: fixed;
    top: 13px;
    right: clamp(20px, 5vw, 64px);
    z-index: 100;
    align-items: flex-end;
  }
  .nav__toggle span {
    display: none;
  }
  .nav__toggle::before,
  .nav__toggle::after {
    content: "";
    display: block;
    height: 2px;
    width: 28px;
    background: var(--fg);
    transition: transform .35s var(--expo), opacity .2s var(--ease);
  }
  .nav__toggle[aria-expanded="true"]::before {
    transform: translateY(4px) rotate(45deg);
  }
  .nav__toggle[aria-expanded="true"]::after {
    transform: translateY(-4px) rotate(-45deg);
  }
  .nav__role {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: clamp(.68rem, 3vw, .78rem);
  }
  .nav__links {
    position: fixed; inset: 0; z-index: -1;
    flex-direction: column; align-items: flex-start; justify-content: center;
    gap: 10px; padding: 0 clamp(20px, 8vw, 64px);
    background: var(--bg);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-100%);
    transition: transform .6s var(--expo), opacity .3s var(--ease), visibility 0s linear .6s;
  }
  .nav__links.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    transition: transform .6s var(--expo), opacity .3s var(--ease), visibility 0s;
  }
  .nav__links a { font-size: clamp(1.8rem, 7vw, 2.6rem); font-weight: 700; }
  .nav__idx { font-size: .9rem; }
  .nav__resume { font-size: clamp(1.2rem, 5vw, 1.6rem); color: var(--muted); }
}

@media (max-width: 420px) {
  .nav__brand {
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
    line-height: 1.15;
  }
  .nav__role {
    max-width: 100%;
    font-size: .68rem;
  }
}

@media (max-width: 520px) {
  .skill-scene,
  .skill-scene--reverse {
    padding: 56px 0;
  }
  .skill-list li {
    padding: 14px 0;
    font-size: 1rem;
  }
  .skill-scene__note {
    font-size: 1rem;
  }
}

@media (max-width: 520px) {
  .hero__actions { flex-direction: column; gap: 16px; align-items: flex-start; }
}

/* 尊重「减少动态效果」 */
@media (prefers-reduced-motion: reduce) {
  html.js { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js [data-reveal], .js [data-split] { opacity: 1 !important; visibility: visible !important; transform: none !important; }
  .split-i { transform: none !important; }
}

/* =========================================================
   I'M A ___ 动画角色面板（白底 + 亮红强调）
   ========================================================= */
:root { --accent: #e60000; --accent-soft: rgba(230, 0, 0, .12); }

.panels .panel { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(32px, 6vw, 80px); align-items: center; min-height: 72vh; }
.panel__im { color: var(--muted); letter-spacing: .22em; font-size: .9rem; margin-bottom: 10px; }
.panel__role { font-size: clamp(2.4rem, 7vw, 5.4rem); font-weight: 800; line-height: .96; color: var(--accent); }
.panel__sub { margin-top: 18px; color: var(--muted); font-size: clamp(1.05rem, 1.6vw, 1.3rem); max-width: 34ch; }
.panel__idx { display: block; margin-top: 34px; font-family: var(--font-mono); font-size: clamp(4rem, 12vw, 9rem); font-weight: 700; line-height: 1; color: transparent; -webkit-text-stroke: 1.5px var(--line); }
.panel__art { width: 100%; }
.mk { width: 100%; height: auto; display: block; }

.mk-ball { transform-box: fill-box; transform-origin: center; animation: mkBounce 1.5s var(--ease) infinite; }
@keyframes mkBounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-42px); } }
.mk-shadow { transform-box: fill-box; transform-origin: center; animation: mkShadow 1.5s var(--ease) infinite; }
@keyframes mkShadow { 0%, 100% { transform: scaleX(1); opacity: .26; } 50% { transform: scaleX(.6); opacity: .12; } }
.mk-playhead { animation: mkPlayhead 2.8s ease-in-out infinite; }
@keyframes mkPlayhead { 0% { transform: translateX(0); } 100% { transform: translateX(300px); } }
.mk-play { transform-box: fill-box; transform-origin: center; animation: mkPulse 1.6s ease-in-out infinite; }
@keyframes mkPulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

@media (max-width: 900px) {
  .panels .panel { grid-template-columns: 1fr; gap: 30px; min-height: auto; }
  .panel__art { order: -1; }
}
@media (prefers-reduced-motion: reduce) {
  .mk-ball, .mk-shadow, .mk-playhead, .mk-play { animation: none !important; }
}

/* ===== 多面板间距（关于我 ×3）===== */
.panels .panel + .panel { margin-top: clamp(56px, 10vh, 130px); padding-top: clamp(56px, 10vh, 130px); border-top: 1px solid var(--line); }

/* ===== AI EXPLORER 场景 ===== */
.ai-edge line { stroke-dasharray: 3 7; animation: aiFlow 1s linear infinite; }
@keyframes aiFlow { to { stroke-dashoffset: -20; } }
.ai-node { transform-box: fill-box; transform-origin: center; animation: aiNode 1.8s var(--ease) infinite; }
@keyframes aiNode { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.16); } }
.ai-live { transform-box: fill-box; transform-origin: center; animation: mkPulse 1.4s ease-in-out infinite; }
.ai-cursor { animation: blink 1.05s steps(1, end) infinite; }
@keyframes blink { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0; } }

/* ===== GAME ENTHUSIAST 场景 ===== */
.gm-hop { transform-box: fill-box; transform-origin: center bottom; animation: gmHop 1.1s var(--ease) infinite; }
@keyframes gmHop { 0%, 100% { transform: translateY(0); } 45% { transform: translateY(-30px); } }
.gm-coin { transform-box: fill-box; transform-origin: center; animation: gmCoin 1.2s ease-in-out infinite; }
@keyframes gmCoin { 0%, 100% { transform: scaleX(1); opacity: 1; } 50% { transform: scaleX(.25); opacity: .55; } }
.gm-btn { transform-box: fill-box; transform-origin: center; animation: mkPulse 1s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  .ai-edge line, .ai-node, .ai-live, .ai-cursor, .gm-hop, .gm-coin, .gm-btn { animation: none !important; }
}

/* ===== 面板排版（参考 jiejoe：整屏 + 序号锚定左下）===== */
.section.panels { padding-top: 0; padding-bottom: 0; }
.panels .panel { position: relative; min-height: 100vh; align-items: center; }
.panels .panel + .panel { margin-top: 0; padding-top: 0; border-top: 0; }
.panel__text { display: flex; flex-direction: column; justify-content: center; min-height: 100vh; padding: 96px 0; }
.panel__im { margin-bottom: 14px; }
.panel__sub { margin-top: 22px; }
.panel__idx { position: absolute; left: 0; bottom: 7vh; margin-top: 0; font-size: clamp(4.5rem, 13vw, 11rem); -webkit-text-stroke: 1.5px var(--line); }

@media (max-width: 900px) {
  .section.panels { padding: 80px 0; }
  .panels .panel { min-height: auto; grid-template-columns: 1fr; }
  .panel__text { min-height: auto; padding: 0; }
  .panel__art { order: -1; }
  .panel__idx { position: static; margin-top: 24px; bottom: auto; }
  .panels .panel + .panel { margin-top: 64px; padding-top: 64px; border-top: 1px solid var(--line); }
}

/* ===== 错版排列（左右交替；自适应高度；不整屏、不居中）===== */
.section.panels { padding: clamp(72px, 11vh, 150px) 0; }
.panels .panel { position: relative; min-height: auto; align-items: start; margin-bottom: clamp(90px, 16vh, 210px); }
.panels .panel:last-child { margin-bottom: 0; }
.panels .panel + .panel { margin-top: 0; padding-top: 0; border-top: 0; }
.panel__text { display: block; min-height: auto; padding: 0; }
.panel__idx { position: static; bottom: auto; margin-top: clamp(48px, 9vh, 120px); }
.panels .panel:nth-child(even) .panel__text { order: 2; }
.panels .panel:nth-child(even) .panel__art { order: 1; }
@media (max-width: 900px) {
  .section.panels { padding: 72px 0; }
  .panels .panel { margin-bottom: 72px; align-items: stretch; }
  .panels .panel:nth-child(even) .panel__text,
  .panels .panel:nth-child(even) .panel__art { order: 0; }
  .panel__idx { margin-top: 28px; }
}

/* ===== 色块扫场转场（点击导航/锚点触发）===== */
.wipe { position: fixed; inset: 0; z-index: 500; background: #0a0a0a; transform: translateY(100%); pointer-events: none; display: flex; align-items: center; justify-content: center; will-change: transform; }
.wipe__mark { color: #fff; font-family: var(--font-mono); font-size: 2rem; letter-spacing: .12em; opacity: 0; }
.wipe.is-cover { transition: transform .5s var(--expo); transform: translateY(0); }
.wipe.is-cover .wipe__mark { opacity: 1; transition: opacity .3s ease .12s; }
.wipe.is-reveal { transition: transform .55s var(--expo); transform: translateY(-100%); }
@media (prefers-reduced-motion: reduce) { .wipe { display: none !important; } }

/* ===== 关于我：JIEJOE 式三段小板块（白底 + 红色主色）===== */
.section.about-showcase {
  padding: clamp(58px, 8vh, 96px) 0 clamp(78px, 10vh, 128px);
  overflow: hidden;
}
.about-showcase .container {
  max-width: 1180px;
}
.about-showcase__head {
  max-width: 740px;
  margin-bottom: clamp(48px, 7vh, 84px);
  padding-bottom: clamp(28px, 4vh, 44px);
  border-bottom: 1px solid var(--line);
}
.about-showcase__head .eyebrow {
  color: var(--muted);
}
.about-showcase .panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, .72fr) minmax(420px, 1fr);
  gap: clamp(48px, 6vw, 86px);
  align-items: center;
  min-height: clamp(360px, 42vw, 520px);
  margin: 0 0 clamp(78px, 11vh, 132px);
  padding: 0;
}
.about-showcase .panel:last-child {
  margin-bottom: 0;
}
.about-showcase .panel:nth-child(2) {
  transform: none;
}
.about-showcase .panel:nth-child(3) {
  transform: none;
}
.about-showcase .panel:nth-child(even) .panel__text,
.about-showcase .panel:nth-child(even) .panel__art {
  order: initial;
}
/* 三个小板块统一为「插图在左 · 文字在右」，与第一个保持一致 */
.about-showcase .panel .panel__art {
  grid-column: 1;
  grid-row: 1;
}
.about-showcase .panel .panel__text {
  grid-column: 2;
  grid-row: 1;
}
.about-showcase .panel__text {
  display: block;
  min-height: auto;
  padding: 0;
  align-self: center;
}
.about-showcase .panel__im {
  color: var(--fg);
  font-size: clamp(1.25rem, 2vw, 2rem);
  font-weight: 900;
  line-height: .95;
  letter-spacing: 0;
  margin: 0 0 clamp(12px, 1.8vh, 18px);
}
.about-showcase .panel__role {
  color: var(--accent);
  font-size: clamp(3rem, 4.6vw, 5.1rem);
  font-weight: 900;
  line-height: .94;
  max-width: 8.4ch;
  word-break: keep-all;
}
.about-showcase .panel__sub {
  color: #4d4d52;
  font-size: clamp(1.05rem, 1.45vw, 1.45rem);
  font-weight: 650;
  letter-spacing: .045em;
  line-height: 1.45;
  margin-top: clamp(20px, 3vh, 30px);
  max-width: 22em;
}
.about-showcase .panel__idx {
  display: none;
}
.about-showcase .panel__art {
  position: relative;
  order: initial;
  width: 100%;
  align-self: center;
  display: flex;
  justify-content: center;
  isolation: isolate;
  padding: clamp(12px, 1.4vw, 18px);
}
.about-showcase .panel__art::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(calc(100% - 24px), 560px);
  aspect-ratio: 560 / 380;
  transform: translate(-45%, -43%);
  border: 2px solid rgba(230, 0, 0, .36);
  border-radius: 18px;
  pointer-events: none;
  z-index: 0;
}
.about-showcase .mk {
  position: relative;
  z-index: 1;
  width: min(100%, 560px);
  margin-inline: auto;
  filter: drop-shadow(0 22px 34px rgba(0, 0, 0, .1));
}

/* ===== 桌面端「错版」之字排列：第二块左右互换 + 三块交替靠左/靠右 ===== */
@media (min-width: 981px) {
  /* 之字错位：靠左 · 靠右 · 靠左（板块略窄于整宽，交替对齐，故意不对齐边缘） */
  .about-showcase .panel:nth-child(2) { margin-right: clamp(40px, 9vw, 150px); }
  .about-showcase .panel:nth-child(3) { margin-left: clamp(40px, 9vw, 150px); }
  .about-showcase .panel:nth-child(4) { margin-right: clamp(40px, 9vw, 150px); }

  /* 第二个小板块（AI EXPLORER）：文字在左 · 插图在右（镜像第一块） */
  .about-showcase .panel:nth-child(3) {
    grid-template-columns: minmax(420px, 1fr) minmax(260px, .72fr);
  }
  .about-showcase .panel:nth-child(3) .panel__text { grid-column: 1; }
  .about-showcase .panel:nth-child(3) .panel__art { grid-column: 2; }
  /* 镜像红框点缀，让其偏向内侧（左下），与靠右的插图呼应 */
  .about-showcase .panel:nth-child(3) .panel__art::after { transform: translate(-55%, -43%); }
}

@media (max-width: 980px) {
  .about-showcase .panel,
  .about-showcase .panel:nth-child(2),
  .about-showcase .panel:nth-child(3) {
    grid-template-columns: 1fr;
    gap: 24px;
    transform: none;
    min-height: auto;
    margin-bottom: 68px;
  }
  .about-showcase .panel .panel__text {
    order: 1;
    grid-column: 1;
    grid-row: auto;
  }
  .about-showcase .panel .panel__art {
    order: 2;
    grid-column: 1;
    grid-row: auto;
    padding: 0;
  }
  .about-showcase .panel__role {
    max-width: 9ch;
  }
  .about-showcase .panel__idx {
    display: none;
  }
}

@media (max-width: 560px) {
  .section.about-showcase {
    padding: 54px 0 74px;
  }
  .about-showcase__head {
    margin-bottom: 42px;
    padding-bottom: 24px;
  }
  .about-showcase .panel {
    margin-bottom: 58px;
  }
  .about-showcase .panel__im {
    font-size: 1.12rem;
  }
  .about-showcase .panel__role {
    font-size: clamp(2.55rem, 13vw, 3.7rem);
  }
  .about-showcase .panel__sub {
    font-size: 1rem;
    letter-spacing: .04em;
  }
  .about-showcase .panel__idx {
    display: none;
  }
  .about-showcase .panel__art::after {
    width: min(calc(100% - 18px), 560px);
    transform: translate(-45%, -43%);
    border-radius: 14px;
  }
}
