/* fragment-mono-cyrillic-ext-400-normal */
@font-face {
  font-family: 'Fragment Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(./fonts/fragment-mono-cyrillic-ext-400-normal.woff2) format('woff2'), url(./fonts/fragment-mono-cyrillic-ext-400-normal.woff) format('woff');
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}

/* fragment-mono-latin-ext-400-normal */
@font-face {
  font-family: 'Fragment Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(./fonts/fragment-mono-latin-ext-400-normal.woff2) format('woff2'), url(./fonts/fragment-mono-latin-ext-400-normal.woff) format('woff');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* fragment-mono-latin-400-normal */
@font-face {
  font-family: 'Fragment Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(./fonts/fragment-mono-latin-400-normal.woff2) format('woff2'), url(./fonts/fragment-mono-latin-400-normal.woff) format('woff');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

  :root {
    --ink: rgb(42, 39, 36);
    --ink-82: rgba(42, 39, 36, 0.82);
    --ink-70: rgba(42, 39, 36, 0.7);
    --ink-50: rgba(42, 39, 36, 0.5);
    --ink-40: rgba(42, 39, 36, 0.4);
    --paper: rgb(250, 247, 242);
    --mono: 'Fragment Mono', 'PingFang SC', ui-monospace, monospace;
    --sans: -apple-system, 'SF Pro Text', 'PingFang SC', 'Hiragino Sans GB', system-ui, sans-serif;
    color-scheme: light;
  }

  *, *::before, *::after { box-sizing: border-box; margin: 0; }
  /* 两屏：首屏、作品链；滚动吸附到其中一屏 */
  html { scroll-snap-type: y mandatory; overscroll-behavior-y: none; }
  body {
    color: var(--ink);
    font-family: var(--sans);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    /* WebGL 起来之前和失败时的底色，与场景背景同一组颜色 */
    background:
      #f8f5ef;
  }

  .sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  }
  .skip-link {
    position: absolute; left: -9999px; top: 0; z-index: 200;
    background: var(--ink); color: var(--paper);
    padding: 10px 16px; border-radius: 0 0 8px 0;
    font: 12px var(--mono); text-decoration: none;
  }
  .skip-link:focus-visible { left: 0; }

  .sc-stage { position: fixed; inset: 0; overflow: hidden; touch-action: none; }
  .sc-stage:not(.chain-on) { touch-action: pan-y; } /* 首屏：手指上下滑交给页面 */
  /* 作品链的界面元素在首屏隐藏，滚到作品链时淡入；左上身份块两屏共用 */
  .sc-meta, .sc-hud--bottom { opacity: var(--intro, 0); }
  .sc-dots, .sc-heading { filter: opacity(var(--intro, 0)); }
  .sc-stage:not(.chain-on) .sc-back,
  .sc-stage:not(.chain-on) .sc-dots,
  .sc-stage:not(.chain-on) .sc-brief-title a { pointer-events: none; }

  .hero, .chain-anchor {
    height: 100svh;
    min-height: 560px;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }
  .hero {
    position: relative;
    z-index: 3;
    pointer-events: none;
    opacity: calc(1 - var(--intro, 0) * 1.6);
  }
  .hero a { pointer-events: auto; }
  .hero-col { position: absolute; top: 40px; }
  .hero-label {
    margin-bottom: 14px;
    font: 12px/1.4 var(--mono);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-50);
  }
  .hero-label--gap { margin-top: 40px; }
  .hero-menu { left: 62px; }
  .hero-menu-list, .hero-contact { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 6px; }
  .hero-menu-list a {
    font: 24px/1.4 var(--mono);
    color: var(--ink-50);
    text-decoration: none;
    transition: color 0.2s;
  }
  .hero-menu-list a:hover, .hero-menu-list a:focus-visible { color: var(--ink); outline: none; }
  .hero-menu-list a.is-current { color: var(--ink); }
  .hero-menu-list a.is-current::after {
    content: '';
    display: inline-block;
    width: 0.5em; height: 0.82em;
    margin-left: 0.15em;
    vertical-align: -0.06em;
    background: #b0443a;
    animation: sc-blink 1.1s steps(1) infinite;
  }
  .hero-contact a {
    font: 12px/1.6 var(--mono);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-82);
  }
  .hero-contact a:hover { color: #b0443a; }
  .hero-intro {
    position: absolute;
    left: 62px;
    bottom: 110px;
    width: min(560px, calc(100vw - 460px));
    font: 16px/1.8 var(--sans);
    color: var(--ink-82);
    text-wrap: pretty;
  }
  .hero-intro a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
  .hero-intro a:hover { color: #b0443a; }
  .hero-works { position: absolute; right: 36px; bottom: 110px; width: 290px; }
  .hero-works-title { font: 500 96px/1 var(--sans); letter-spacing: -0.02em; color: var(--ink); }
  .hero-works-sub { margin: 16px 0 14px; font: 15px/1.7 var(--sans); color: var(--ink-70); }
  .hero-works .sc-back, .hero-cue { font: 12px var(--mono); letter-spacing: 0.14em; margin-left: -5px; }
  .hero-cue { display: none; }
  .hero-mident { display: none; }
  .hero-tags { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
  .hero-tag {
    position: absolute; left: 0; top: 0;
    font: 12px/1 var(--mono);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-50);
    white-space: nowrap;
    opacity: 0;
  }
  .hero-tag-n { display: none; }
  .hero-tag.is-hot .hero-tag-k { display: none; }
  .hero-tag.is-hot .hero-tag-n {
    display: inline-block;
    position: relative; top: -36px; margin-left: -2px;
    padding: 9px 14px;
    border-radius: 999px;
    background: var(--ink);
    color: var(--paper);
    letter-spacing: 0.1em;
    animation: hero-pill 0.22s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  }
  .hero-tag[data-tag="3"].is-hot .hero-tag-n { top: 0; } /* 贴在卡片下方的那张往下让 */
  @keyframes hero-pill { from { opacity: 0; transform: translateY(4px) scale(0.94); } }
  .sc-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

  /* 移动时的暖光脉冲 */
  .sc-bloom {
    position: absolute; inset: 0; z-index: 1; pointer-events: none;
    opacity: 0;
    mix-blend-mode: screen;
    will-change: opacity;
    background:
      radial-gradient(58% 46% at 50% 44%, rgba(255, 226, 178, 0.85), transparent 72%),
      radial-gradient(70% 60% at 84% 6%, rgba(255, 178, 120, 0.55), transparent 70%),
      radial-gradient(80% 70% at 12% 108%, rgba(255, 150, 90, 0.5), transparent 68%);
  }
  .sc-scrim {
    position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background: radial-gradient(128% 104% at 50% 45%, transparent 57%, rgba(40, 36, 32, 0.22) 100%);
    opacity: 0;
    transition: opacity 0.46s;
  }
  .sc-stage.is-focused .sc-scrim { opacity: 1; }

  /* ---------- HUD ---------- */
  .sc-hud { position: absolute; left: 0; right: 0; z-index: 2; display: flex; pointer-events: none; }
  .sc-hud--top { top: 0; justify-content: space-between; align-items: flex-start; gap: 24px; padding: 28px 36px 0; }
  .sc-hud--bottom { bottom: 0; flex-direction: column; align-items: center; gap: 12px; padding: 0 36px 26px; }
  .sc-stage.is-focused .sc-hud--bottom { top: 0; }

  .sc-heading { max-width: 60vw; animation: sc-fade 0.42s ease both; }
  .sc-stage.is-focused .sc-heading { animation: sc-fade-out 0.36s ease forwards; }

  .sc-kicker {
    display: block;
    margin-bottom: 6px;
    font: 12px/1.4 var(--mono);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-82);
  }
  .sc-title {
    font: 400 clamp(24px, 2.5vw, 36px)/1.1 var(--mono);
    font-synthesis: none;
    letter-spacing: 0.01em;
    word-spacing: -0.4em;
    color: var(--ink);
  }
  .sc-tagline {
    margin-top: 6px;
    font: 24px/1.4 var(--mono);
    letter-spacing: 0.02em;
    color: var(--ink-70);
  }

  .sc-esc {
    position: absolute; top: 28px; left: 36px;
    display: none;
    padding: 0; border: 0; background: none;
    font: 12px var(--mono);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink);
    cursor: pointer;
    pointer-events: auto;
  }
  .sc-esc::before { content: '[esc] ' / ''; }
  @media (hover: none) { .sc-esc::before { content: '← ' / ''; } }
  .sc-stage.is-focused .sc-esc { display: block; animation: sc-fade 0.3s ease 0.3s both; }

  .sc-meta {
    display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
    font: 12px var(--mono);
    letter-spacing: 0.08em;
    color: var(--ink-82);
  }
  .sc-meta-top { display: flex; align-items: center; gap: 6px; min-height: 34px; }
  .sc-back {
    pointer-events: auto;
    padding: 2px 5px;
    color: var(--ink);
    text-decoration: none;
    letter-spacing: 0.14em;
    white-space: nowrap;
    background: linear-gradient(var(--ink), var(--ink)) 0 center / 0% 100% no-repeat;
    transition: background-size 0.25s cubic-bezier(0.4, 0, 0.2, 1), color 0.12s 60ms;
  }
  .sc-back::before { content: '[ ' / ''; }
  .sc-back::after { content: ' ]' / ''; }
  .sc-back:hover, .sc-back:focus-visible { color: var(--paper); background-size: 100% 100%; outline: none; }

  .sc-dots {
    position: absolute; right: 22px; top: 50%; z-index: 2;
    display: flex; flex-direction: column;
    transform: translateY(-50%);
    pointer-events: auto; touch-action: none;
    animation: sc-fade 0.42s ease 0.3s both;
  }
  .sc-dot {
    display: grid; place-items: center;
    width: 34px; height: 17px;
    padding: 0; border: 0; background: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .sc-dot::before {
    content: '';
    width: 7px; height: 7px;
    background: var(--ink-40);
    transition: background 0.2s, transform 0.2s;
  }
  .sc-dot--on::before { background: var(--ink); transform: scale(1.35); }
  .sc-dot:focus-visible { outline: none; }
  .sc-dot:focus-visible::before { outline: 1px solid var(--ink); outline-offset: 3px; }

  .sc-hint {
    max-width: 100%;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(250, 247, 242, 0.55);
    backdrop-filter: blur(6px);
    font: 12px var(--mono);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-align: center;
    color: rgba(42, 39, 36, 0.9);
    text-wrap: balance;
  }
  .sc-hint-touch { display: none; }
  @media (hover: none) and (pointer: coarse) {
    .sc-hint-pointer { display: none; }
    .sc-hint-touch { display: inline; }
  }
  .sc-stage.is-focused .sc-dots,
  .sc-stage.is-focused .sc-hint { display: none; }

  /* 顶部 / 底部的渐进模糊（参考 mikes.cv 页脚）：卡片滚进 HUD 区域时逐渐糊掉 */
  .sc-veil { position: absolute; left: 0; right: 0; z-index: 1; pointer-events: none; }
  .sc-veil i { position: absolute; inset: 0; }
  .sc-veil--top { top: 0; height: 170px; opacity: var(--intro, 0); }
  /* 顶部再盖一层和背景同色的渐隐：轨道和卡片滚进标题区时淡出，不和标题文字打架 */
  .sc-veil--top::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(to bottom, rgba(248, 245, 239, 0.94) 0%, rgba(248, 245, 239, 0.78) 45%, rgba(248, 245, 239, 0) 100%);
  }
  .sc-veil--bottom { bottom: 0; height: 150px; }
  .sc-veil--top i:nth-child(1) { backdrop-filter: blur(1.5px); mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 100%); }
  .sc-veil--top i:nth-child(2) { backdrop-filter: blur(4px); mask-image: linear-gradient(to bottom, #000 0%, #000 30%, transparent 65%); }
  .sc-veil--top i:nth-child(3) { backdrop-filter: blur(10px); mask-image: linear-gradient(to bottom, #000 0%, #000 10%, transparent 35%); }
  .sc-veil--bottom i:nth-child(1) { backdrop-filter: blur(1.5px); mask-image: linear-gradient(to top, #000 0%, #000 55%, transparent 100%); }
  .sc-veil--bottom i:nth-child(2) { backdrop-filter: blur(4px); mask-image: linear-gradient(to top, #000 0%, #000 30%, transparent 65%); }
  .sc-veil--bottom i:nth-child(3) { backdrop-filter: blur(10px); mask-image: linear-gradient(to top, #000 0%, #000 10%, transparent 35%); }
  .sc-stage.is-focused .sc-veil { opacity: 0; transition: opacity 0.4s; }

  .sc-era {
    position: absolute; right: 36px; bottom: 26px; z-index: 2;
    display: flex; gap: 10px; align-items: baseline;
    max-width: 36vw;
    text-align: right;
    font: 12px/1.5 var(--mono);
    letter-spacing: 0.1em;
    pointer-events: none;
    animation: sc-fade 0.42s ease both;
  }
  .sc-era-label { color: var(--ink); white-space: nowrap; }
  .sc-era-tools { color: var(--ink-50); }
  .sc-stage.is-focused .sc-era { display: none; }

  /* 聚焦说明：贴着卡片底边 */
  .sc-focus-info {
    position: absolute;
    left: 0; right: 0;
    top: var(--sc-card-bottom, 66%);
    margin-inline: auto;
    width: fit-content;
    max-width: min(560px, 90vw);
    padding-top: 20px;
    display: flex; flex-direction: column; align-items: center; gap: 16px;
    pointer-events: none;
    animation: sc-fade 0.34s ease both;
  }
  .sc-focus-info[hidden] { display: none; }
  .sc-focus-desc {
    text-align: center;
    text-wrap: balance;
    font: 12px/2 var(--mono);
    letter-spacing: 0.02em;
    color: var(--ink-82);
  }
  .sc-focus-meta {
    text-wrap: balance;
    font: 12px var(--mono);
    letter-spacing: 0.08em;
    color: var(--ink-50);
    text-align: center;
  }
  .sc-open {
    pointer-events: auto;
    display: inline-flex; align-items: center; gap: 10px;
    padding: 10px 15px;
    border-radius: 8px;
    font: 12px var(--mono);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(42, 39, 36, 0.92);
    text-decoration: none;
    transition: color 0.22s, background-color 0.22s;
  }
  .sc-open::before { content: '[' / ''; margin-right: 12px; color: var(--ink-40); transition: margin 0.22s, color 0.22s; }
  .sc-open::after { content: ']' / ''; margin-left: 12px; color: var(--ink-40); transition: margin 0.22s, color 0.22s; }
  .sc-open:hover { color: var(--paper); background-color: var(--ink); }
  .sc-open:hover::before { color: rgba(250, 247, 242, 0.55); margin-right: 18px; }
  .sc-open:hover::after { color: rgba(250, 247, 242, 0.55); margin-left: 18px; }
  .sc-open:focus-visible { outline: 1px solid var(--ink); outline-offset: 5px; }
  .sc-open-arrow { display: inline-block; transition: transform 0.2s; }
  .sc-open:hover .sc-open-arrow { transform: translateX(3px); }

  /* ---------- 项目简介（左侧，跟着节点走） ---------- */
  .sc-briefs { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
  .sc-stage:not(.has-briefs) .sc-briefs { display: none; }
  .sc-brief {
    position: absolute; left: 0; top: 0;
    width: 400px;
    opacity: 0;
    will-change: transform, opacity;
  }
  .sc-brief-kicker {
    margin-bottom: 8px;
    font: 12px/1.4 var(--mono);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-70);
    transition: color 0.3s;
  }
  .sc-brief.is-current .sc-brief-kicker { color: #b0443a; }
  .sc-brief-title {
    font: 400 24px/1.25 var(--mono);
    font-synthesis: none;
    word-spacing: -0.4em;
    color: var(--ink);
  }
  .sc-brief-title a {
    pointer-events: auto;
    color: inherit;
    text-decoration: none;
    background: linear-gradient(currentColor, currentColor) 0 100% / 0% 1px no-repeat;
    transition: background-size 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .sc-brief-title a:hover, .sc-brief-title a:focus-visible { background-size: 100% 1px; outline: none; }
  .sc-brief-meta {
    margin-top: 6px;
    font: 12px/1.6 var(--mono);
    letter-spacing: 0.04em;
    color: var(--ink-70);
  }
  .sc-brief-desc {
    margin-top: 10px;
    font: 15px/1.75 var(--sans);
    color: var(--ink-82);
    text-wrap: pretty;
    /* 最多三行（矮屏两行），避免和下一站叠在一起；完整的一段在展开后显示 */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
  }
  @media (max-height: 780px) {
    .sc-brief-desc { -webkit-line-clamp: 2; }
  }

  /* 宽屏有左侧简介时，隐藏顶部标题与角色 */
  .sc-stage.has-briefs .sc-heading,
  .sc-stage.has-briefs .sc-era { display: none; }

  /* 没有 WebGL：简介按普通清单排开 */
  .sc-stage.no-webgl { overflow: auto; }
  .sc-stage.no-webgl .sc-briefs { display: block; position: static; padding: 180px 36px 120px; pointer-events: auto; overflow: visible; }
  .sc-stage.no-webgl .sc-brief { position: static; width: auto; max-width: 560px; margin-bottom: 48px; opacity: 1; transform: none; }
  .sc-stage.no-webgl .sc-dots, .sc-stage.no-webgl .sc-hint, .sc-stage.no-webgl .sc-era { display: none; }

  @media (max-width: 1100px) {
    .hero-works { display: none; }
    .hero-menu { top: 160px; left: 62px; }
    .hero-intro { bottom: 120px; width: min(560px, calc(100vw - 124px)); }
    .hero-cue { display: inline-block; position: absolute; left: 57px; bottom: 72px; }
  }
  .sc-stage:not(.has-briefs) ~ .hero .hero-mident {
    display: block;
    position: absolute; top: 20px; left: 20px;
    font: 12px/1.8 var(--mono);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-70);
  }
  .hero-mident-name { color: var(--ink); }
  @media (max-width: 720px) {
    .hero-tags { display: none; }
    .hero-intro { left: 20px; bottom: 104px; width: calc(100vw - 40px); font-size: 15px; }
    .hero-menu { top: 88px; left: 20px; }
    .hero-menu-list { flex-direction: row; gap: 18px; }
    .hero-menu-list a { font-size: 24px; }
    .hero-label--gap, .hero-contact { display: none; }
    .hero-cue { left: 15px; bottom: 64px; }
  }

  @keyframes sc-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
  @keyframes sc-fade-out { to { opacity: 0; transform: translateY(-8px); } }

  @media (max-width: 1240px) {
    .sc-era { display: none; }
  }
  @media (max-width: 640px) {
    .sc-hud--top { padding: 20px 20px 0; gap: 12px; }
    .sc-hud--bottom { padding: 0 20px 20px; }
    .sc-heading { max-width: 66vw; }
    .sc-kicker { letter-spacing: 0.09em; }
    .sc-tagline { font-size: 12px; line-height: 1.6; }
    .sc-meta-top { flex-direction: column; align-items: flex-end; gap: 2px; }
    .sc-esc { top: 20px; left: 20px; }
    .sc-dots { right: 8px; }
    .sc-dot { width: 32px; height: 28px; }
    .sc-veil--top { height: 190px; }
    .sc-veil--bottom { height: 110px; }
    .sc-focus-info { gap: 12px; max-width: 92vw; padding-top: 16px; }
  }

  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  }

/* The exhibit keeps scene navigation, not outbound case navigation. */
.sc-open,.sc-meta,.hero-label--gap,.hero-contact,.hero-menu-list li:has(span){display:none!important} html{scrollbar-width:none}html::-webkit-scrollbar{display:none}

/* Case information treatment */
.hero-intro,.hero-works-sub,.hero-mident,.sc-brief-meta,.sc-brief-desc,.sc-focus-desc,.sc-focus-meta,.sc-tagline,.sc-era-tools{filter:blur(4px);user-select:none}
.sc-brief[data-index="0"] .sc-brief-title,.sc-stage[data-private-info="true"] .sc-title,.hero-tag[data-tag="0"]{filter:blur(5px);user-select:none}
