/* Gallery edition. Homepage-only art direction; shared writing styles stay in style.css. */
/* 强调色（冷蓝）已并入 style.css 的 :root，文章页与 404 页同色 */
.stage { min-height: 760px; height: 100svh; }
.stage::after { content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: linear-gradient(90deg,var(--bg),transparent 65%),linear-gradient(0deg,var(--bg),transparent 30%); opacity: .65; }
.stage__grid { opacity: .36; }
.stage__tr { width: min(29vw,360px); top: 7.5rem; }
.stage__tl { top: 7.5rem; }
.stage__tagline { font: 11px/1.7 var(--font-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.stage__tagline br { display: none; }
.stage__tagline::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 18px var(--accent); }
.stage__bio { color: var(--muted); }
.stage__title, html:not([data-lang="en"]) .stage__title { bottom: 10rem; font-size: clamp(70px,9vw,142px); line-height: 1.08; font-weight: 500; letter-spacing: -.06em; }
.stage__line--2, html[data-lang="en"] .stage__line--2, html[data-lang="en"] .stage__line--3 { padding-left: 0; }
.stage__line--2 { color: var(--accent); }
.stage__scene { left: 20%; transform: translateY(var(--scene-shift,0px)); }
.sticker { display: none; }
.stage__state { bottom: 6rem; }
.stage__orbit { position: absolute; width: 46vw; aspect-ratio: 1; right: 1%; top: 24%; z-index: 1; border: 1px solid var(--line-strong); border-radius: 50%; opacity: .36; transform: rotate(-25deg) scaleY(.62); pointer-events: none; }
.stage__orbit::before, .stage__orbit::after { content: ''; position: absolute; inset: 9%; border: 1px solid var(--line); border-radius: 50%; }
.stage__orbit::after { inset: -12%; border-style: dashed; animation: orbit-turn 100s linear infinite; }
@keyframes orbit-turn { to { rotate: 360deg; } }
.stage__index { position: absolute; left: var(--gutter); bottom: 6rem; z-index: 4; display: flex; align-items: center; gap: 1.5rem; font: 10px var(--font-mono); letter-spacing: .14em; color: var(--muted); }
.stage__index::before { content: ''; width: 48px; height: 1px; background: var(--line-strong); }
.stage__explore { position: absolute; z-index: 5; right: var(--gutter); bottom: 9rem; display: flex; align-items: center; gap: 1rem; font: 11px var(--font-mono); }
.stage__explore b { display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid var(--line-strong); border-radius: 50%; font-size: 20px; font-weight: 400; transition: background .3s,transform .3s; }
.stage__explore:hover { text-decoration: none; }
.stage__explore:hover b { background: var(--accent-soft); transform: translateY(5px); }
.hud-bottom { font-size: 10px; padding-block: .8rem; background: color-mix(in srgb,var(--bg) 90%,transparent); border-top: 1px solid var(--line); backdrop-filter: blur(14px); }
.hud-bottom .lang button { font-size: 11px; min-height: 28px; }
.hud__globe { width: 16px; height: 16px; }
.marquee { padding-block: 1.3rem; }
.section { padding-block: clamp(5rem,10vw,9rem); }
.section__head { margin-bottom: 3.5rem; }
.h2 { line-height: 1.2; letter-spacing: -.045em; }
.about__side { position: sticky; top: 7rem; align-self: start; }
.about__main .prose { line-height: 1.95; color: var(--muted); }
.about__main .prose p:first-child { color: var(--ink); font-size: 1.1em; }
.now { border: 1px solid var(--line); padding: 1.75rem; background: var(--bg-2); }
.projects { gap: 1.25rem; counter-reset: work; }
.project, .project:nth-child(1) { grid-column: span 6; padding: clamp(1.25rem,2.5vw,2.5rem); border: 1px solid var(--line); background: linear-gradient(145deg,var(--bg-2),var(--bg)); min-height: 340px; overflow: hidden; }
.project::after { counter-increment: work; content: counter(work,decimal-leading-zero) ' /'; display: block; order: -1; margin-bottom: 2.5rem; color: var(--faint); font: 12px var(--font-mono); letter-spacing: .15em; }
.project .h3, .project:nth-child(1) .h3 { font-size: clamp(24px,2.3vw,34px); line-height: 1.3; }
.project:nth-child(1) .project__body p { font-size: 15px; }
.project__meta { gap: 1rem; flex-wrap: wrap; }
.project__foot { padding-top: 1.25rem; border-top: 1px solid var(--line); gap: 1rem; }
.project__foot span:last-child { flex-shrink: 0; }
.project:hover .h3 { text-decoration: none; color: var(--accent); }
.project:hover { border-color: var(--line-strong); }
.post { transition: background .3s, border-color .3s; }
.post:hover { background: var(--accent-soft); }
.cta__title { letter-spacing: -.055em; }
.btn { border-radius: 999px; padding: .85rem 1.5rem; }
.reveal { transform: translateY(24px); transition-duration: .85s; }
@media (max-width: 900px) { .stage__tr { width: 40vw; } .stage__title, html:not([data-lang="en"]) .stage__title { font-size: 11vw; } .about__side { position: static; } }
@media (max-width: 720px) {
  .stage { height: auto; min-height: 100svh; padding-bottom: 10rem; }
  .stage__tl { top: 6rem; }
  .stage__tr { width: auto; margin-top: 9rem; }
  .stage__title, html:not([data-lang="en"]) .stage__title { font-size: clamp(64px,17vw,108px); margin-top: 3rem; }
  .stage__scene { left: 5%; top: 15rem; opacity: .6; }
  .stage__orbit { width: 90vw; top: 40%; right: -30%; }
  .stage__explore { bottom: 4.5rem; }
  .stage__index { bottom: 5.5rem; gap: .5rem; font-size: 9px; }
  .stage__index::before { width: 18px; }
  .project, .project:nth-child(1) { grid-column: 1/-1; min-height: 300px; }
  .now { padding: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .stage__line > span, .reveal { transform: none !important; opacity: 1 !important; }
  .stage__scene { transform: none; }
}
html[data-static] .stage__orbit::after { animation: none; }
/* Keep the mobile caption and scroll target on separate baselines. */
@media (max-width: 720px) {
  .stage__index { bottom: 8.5rem; }
  .stage__bio { color: color-mix(in srgb,var(--ink) 78%,var(--bg)); }
  .stage__scene { left: 25%; opacity: .42; }
}
@media (max-width: 720px) {
  .stage__tr, .stage__title { position: relative; inset: auto; z-index: 4; }
}
@media (max-width: 720px) {
  html:not([data-lang="en"]) .stage__title { inset: auto; }
}

/* Signature moments: greeting, portrait, conviction and engineering studies. */
.stage__scene { top: 3.5rem; }
.stage__bg { filter: saturate(.5); }
.stage__greet { position: absolute; right: 18%; bottom: 26%; z-index: 5; display: flex; align-items: center; gap: .7rem; padding: .7rem 1rem; border: 1px solid var(--line); border-radius: 40px; background: color-mix(in srgb,var(--bg) 70%,transparent); backdrop-filter: blur(14px); font: 11px var(--font-mono); cursor: pointer; transition: border-color .3s,background .3s; }
.stage__greet:hover, .stage__greet:focus-visible { border-color: var(--accent); background: var(--accent-soft); }
.stage__greet-icon { color: var(--accent); font-size: 23px; line-height: 1; transition: rotate .8s var(--ease); }
.stage__greet:hover .stage__greet-icon { rotate: 180deg; }
.stage.is-greeting .stage__orbit { animation: greeting-ring 1.8s var(--ease); }
@keyframes greeting-ring { 40% { opacity: .8; scale: 1.12; } }
.portrait { width: 144px; margin: 2.25rem 0 1.5rem; }
.portrait img { width: 100%; height: 164px; object-fit: cover; object-position: 50% 35%; filter: grayscale(1); border-radius: 2px; transition: filter .6s, border-radius .6s,transform .6s var(--ease); }
.portrait:hover img { filter: grayscale(0); border-radius: 50% 50% 2px 2px; transform: rotate(-3deg); }
.portrait figcaption { display: flex; justify-content: space-between; margin-top: .7rem; font: 9px var(--font-mono); letter-spacing: .06em; color: var(--muted); }
.conviction { padding: clamp(4rem,9vw,8rem) 0; position: relative; overflow: hidden; border-block: 1px solid var(--line); background: radial-gradient(ellipse at 85% 50%,var(--accent-soft),transparent 65%),var(--bg-2); }
.conviction__grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 5vw; align-items: center; }
.conviction__title { font-size: clamp(40px,5.6vw,82px); font-weight: 500; line-height: 1.16; letter-spacing: -.055em; }
.conviction__ink { color: var(--accent); }
@supports (background-clip: text) { .conviction__ink { color: transparent; background: linear-gradient(90deg,var(--accent) var(--belief-fill,100%),var(--faint) var(--belief-fill,100%)); background-clip: text; -webkit-background-clip: text; } }
.conviction__intro { margin: 1.75rem 0; color: var(--muted); font-size: 15px; line-height: 1.9; }
.weld { min-width: 0; }
.weld__diagram { position: relative; }
.weld__diagram svg { display: block; width: 100%; overflow: visible; }
.weld__guides { opacity: .13; stroke-width: .7; }
.weld__ring { stroke: var(--line-strong); stroke-width: 1; transform-origin: 250px 194px; transition: stroke .6s,transform .8s var(--ease),fill .6s; fill: transparent; }
[data-focus="semantics"] .weld__ring--semantics, [data-focus="data"] .weld__ring--data, [data-focus="capability"] .weld__ring--capability { stroke: var(--accent); fill: var(--accent-soft); transform: scale(1.055); }
.weld__core { fill: var(--accent); filter: drop-shadow(0 0 12px var(--accent)); }
.weld__flow { stroke: var(--accent); stroke-width: 2; stroke-dasharray: 3 22; animation: weld-flow 12s linear infinite; animation-play-state: paused; }
.conviction.is-visible .weld__flow { animation-play-state: running; }
@keyframes weld-flow { to { stroke-dashoffset: -250; } }
.weld__diagram text { fill: var(--muted); font: 11px var(--font-mono); }
.weld__caption { display: block; text-align: center; color: var(--faint); font: 9px var(--font-mono); letter-spacing: .15em; margin-block: .25rem 2rem; }
.weld__controls { display: grid; grid-template-columns: repeat(3,1fr); border-bottom: 1px solid var(--line); }
.weld__controls button { padding: 1rem .5rem; background: none; border: 0; border-bottom: 2px solid transparent; cursor: pointer; font-size: 13px; color: var(--muted); transition: color .3s,border-color .3s; }
.weld__controls small { font: 9px var(--font-mono); display: block; margin-bottom: .4rem; color: var(--faint); }
.weld__controls button[aria-pressed="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.weld__description { min-height: 6rem; padding-top: 1.3rem; font-size: 13px; line-height: 1.8; color: var(--muted); }
.weld__description p:not([hidden]) { animation: detailsin .4s var(--ease); }
.project { border-radius: 3px; }
.project::after { display: none; }
.project__thumb:has(img) { display: block; position: relative; height: 260px; margin: calc(-1 * clamp(1.25rem,2.5vw,2.5rem)); margin-bottom: 1.5rem; overflow: hidden; border-bottom: 1px solid var(--line); background: #06070b; }
.project__thumb > img { display: block; width: 100%; height: 100%; object-fit: cover; transform: scale(1.001); transition: transform 1.4s var(--ease), filter .6s; }
.project:hover .project__thumb > img, .project:focus-visible .project__thumb > img { transform: scale(1.05); }
/* 每个项目一个天体代号，叠在封面上，和 OpenAI 模型卡片的 Astra / Sol 同一手法 */
.project__codename { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-weight: 600; font-size: clamp(44px, 5.2vw, 72px); letter-spacing: -.045em; line-height: 1; text-shadow: 0 2px 24px rgba(0,0,0,.45); pointer-events: none; transition: opacity .5s, transform 1.4s var(--ease); }
.project:hover .project__codename, .project:focus-visible .project__codename { transform: scale(1.02); }
.cta { position: relative; isolation: isolate; padding-top: 2rem; }
.cta__signature { position: absolute; right: 0; top: -4rem; z-index: -1; font-size: clamp(120px,25vw,360px); line-height: 1; letter-spacing: -.09em; font-weight: 600; color: var(--line); pointer-events: none; }
.cta__star { display: inline-block; font-size: .7em; vertical-align: .05em; animation: orbit-turn 60s linear infinite; animation-play-state: paused; }
.cta.is-in .cta__star { animation-play-state: running; }
@media (max-width: 900px) { .conviction__grid { gap: 2rem; } }
@media (max-width: 720px) {
  .stage__scene { top: 15rem; }
  .stage { padding-bottom: 12rem; }
  .stage__greet { position: relative; inset: auto; margin: 1.5rem var(--gutter) 0; width: fit-content; }
  .conviction__grid { grid-template-columns: 1fr; }
  .conviction__title { font-size: clamp(42px,10vw,64px); }
  .weld { max-width: 480px; width: 100%; margin: 0 auto; }
  .weld__description { min-height: 5.5rem; }
  .portrait { width: 112px; }
  .portrait img { height: 128px; }
  .project__thumb:has(img) { height: 200px; }
  .project__codename { font-size: 40px; }
  .cta__signature { top: -1rem; }
}
html[data-static] *, html[data-static] *::before, html[data-static] *::after { animation: none !important; }
@media (prefers-reduced-motion: reduce) {
  .conviction__ink { --belief-fill: 100%; }
  .project:hover .project__thumb > img, .project:hover .project__codename, .portrait:hover img { transform: none; }
}
/* Release the entrance transform after it finishes so pointer tilt can take over. */
.project { animation-fill-mode: backwards; }

/* Visible identity and business context on every viewport. */
.stage__credential { margin: .4rem 0 0 16px; font: 11px/1.7 var(--font-mono); letter-spacing: .05em; color: var(--muted); }
.stage__tagline { color: var(--ink); letter-spacing: .06em; }
.project__cover-label { position: absolute; inset: auto 0 0; padding: 2.5rem 1.5rem 1.15rem; color: #fff; background: linear-gradient(transparent,rgba(4,7,14,.88)); font: 13px/1.5 var(--font-sans); letter-spacing: .06em; text-align: left; pointer-events: none; }
@media (max-width: 720px) {
  .stage__title, html:not([data-lang="en"]) .stage__title { font-size: clamp(44px,16vw,88px); }
  .stage__line { white-space: nowrap; }
  .stage__tr { margin-top: 10.5rem; }
  .project__cover-label { padding: 2rem 1.25rem 1rem; font-size: 12px; }
}

/* Personal identity first; the glass greeting becomes a supporting object. */
.stage .stage__name, html:not([data-lang="en"]) .stage .stage__name { font-size: clamp(80px,10vw,154px); line-height: .95; letter-spacing: -.07em; font-weight: 500; bottom: 15rem; right: 42%; }
.stage__name-dot { color: var(--accent); }
.stage__name .stage__line { padding-block: .035em; }
.stage__name .stage__line:nth-child(2) > span { animation-delay: .12s; }
.stage__purpose { position: absolute; z-index: 4; left: var(--gutter); bottom: 10.5rem; font-size: clamp(20px,2.2vw,32px); letter-spacing: -.035em; }
.stage__scene { left: 43%; top: 9rem; }
.stage__orbit { width: 38vw; top: 31%; }
.stage__greet { right: 15%; bottom: 23%; }
@media (max-width: 900px) {
  .stage .stage__name, html:not([data-lang="en"]) .stage .stage__name { font-size: 11vw; }
}
@media (max-width: 720px) {
  .stage .stage__name, html:not([data-lang="en"]) .stage .stage__name { position: relative; inset: auto; font-size: clamp(60px,17vw,110px); margin: 10.5rem var(--gutter) 0; }
  .stage__purpose { position: relative; inset: auto; margin: 1.25rem var(--gutter) 0; font-size: 23px; }
  .stage__tr { margin-top: 1.5rem; }
  .stage__scene { left: 33%; top: 7rem; opacity: .3; }
  .stage__orbit { width: 75vw; top: 17%; }
  .stage__greet { position: relative; inset: auto; }
  .footer__col { min-width: 0; max-width: 100%; }
  .footer__links { flex-wrap: wrap; max-width: 100%; }
}

/* A readable architecture portrait for the selected project. */
.core-case { display: grid; grid-template-columns: 1fr 1fr; margin: 0 0 4rem; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--bg-2); }
.core-case__story { padding: clamp(24px,4vw,60px); min-width: 0; }
.core-case__eyebrow, .core-case__diagram-head, .core-case__tags, .core-case__tokens { font: 10px/1.6 var(--font-mono); letter-spacing: .08em; }
.core-case__eyebrow { margin: 0 0 2rem; color: var(--muted); }
.core-case h3 { margin: 0; font: 500 clamp(48px,6vw,88px)/1 var(--font-sans); letter-spacing: -.07em; }
.core-case h3 > span { color: var(--accent); }
.core-case__lead { font-size: clamp(22px,2.5vw,32px); line-height: 1.45; letter-spacing: -.03em; margin: 1.5rem 0 1rem; }
.core-case__description { max-width: 38ch; font-size: 14px; line-height: 1.85; color: var(--muted); }
.core-case__tags { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 1.5rem 0 2rem; color: var(--accent); }
.core-case__link { display: flex; align-items: center; gap: 20px; max-width: 100%; padding: 12px 0; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.core-case__link > [aria-hidden] { font-size: 22px; transition: transform .25s; }
.core-case__link:hover > [aria-hidden] { transform: translate(3px,-3px); }
.core-case__link:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }
.core-case__link:disabled { opacity: .4; cursor: wait; }
.core-case__diagram { min-width: 0; padding: clamp(24px,3.5vw,48px); background: radial-gradient(ellipse at 80% 40%,#1a2942 0%,transparent 65%),#0c111b; color: #e8edf7; }
.core-case__diagram-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; color: #91a2bb; padding-bottom: 24px; border-bottom: 1px solid #ffffff18; }
.core-case__flow { list-style: none; padding: 12px 0; margin: 0; }
.core-case__flow li { display: grid; grid-template-columns: 32px minmax(0,1fr); gap: 16px; position: relative; padding: 22px 0; }
.core-case__flow li:not(:last-child)::after { content: ''; position: absolute; left: 15px; top: 54px; bottom: -18px; width: 1px; background: linear-gradient(#8caefc66,#8caefc15); }
.core-case__number { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid #ffffff25; border-radius: 50%; font: 10px var(--font-mono); color: #9badca; transition: border-color .3s,box-shadow .3s; }
.core-case:hover .core-case__number, .core-case:focus-within .core-case__number { border-color: #98b7ff; box-shadow: 0 0 18px #8caefc25; }
.core-case__flow li:nth-child(2) .core-case__number { transition-delay: .1s; }
.core-case__flow li:nth-child(3) .core-case__number { transition-delay: .2s; }
.core-case__flow li:nth-child(4) .core-case__number { transition-delay: .3s; }
.core-case__flow strong { display: block; font-size: 17px; font-weight: 500; line-height: 32px; }
.core-case__flow p { color: #a4b1c5; font-size: 12px; line-height: 1.8; margin: 4px 0 0; }
.core-case__query strong { color: #b7cbff; }
.core-case__tokens { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; color: #b7cbff; }
.core-case__tokens > span { border: 1px solid #a6bbff25; border-radius: 4px; padding: 3px 7px; background: #a6bbff08; }
.core-case__foot { padding-top: 18px; margin: 0; border-top: 1px solid #ffffff18; color: #91a2bb; font-size: 11px; line-height: 1.8; }
@media (max-width: 760px) { .core-case { grid-template-columns: minmax(0,1fr); } .core-case__flow li { gap: 12px; } }
@media (prefers-reduced-motion: reduce) { .core-case__number, .core-case__link > [aria-hidden] { transition: none; } }
