/* 他山 L · about 幕：单屏控制台（field + intro / visual / detail 三列）。选择器一律以 #scene-about 开头。
   基础样式即终态；刷出、扫描、重描只写在 no-preference 且 :root:not([data-reduced]) 下。外壳不给本幕做外层过渡。 */
#scene-about .ab-console { position: relative; width: min(100% - 72px, 1480px); min-height: calc(100vh - var(--header-h)); min-height: calc(100dvh - var(--header-h)); margin: 0 auto; padding-block: 22px;
  display: grid; grid-template-columns: minmax(0, .86fr) minmax(0, 1.05fr) minmax(0, .95fr); align-items: stretch; }
/* Single-screen lock: desktop with JS only; short or narrow viewports scroll the window instead. */
@media (min-width: 1081px) and (min-height: 600px) {
  :root.js #scene-about .ab-console { height: calc(100vh - var(--header-h)); height: calc(100dvh - var(--header-h)); overflow: hidden; }
}

/* ── Field: two 34/14 dashed tracks, the comet, and the topline ruler ── */
#scene-about .ab-field { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
#scene-about .ab-track { position: absolute; top: 8px; left: -8%; width: 116%; height: 1px; opacity: .46; background: repeating-linear-gradient(90deg, var(--line-strong) 0 34px, transparent 34px 48px); }
#scene-about .ab-track-b { top: auto; bottom: 8px; }
#scene-about .ab-topline { position: absolute; z-index: 1; top: 20px; left: 0; right: 0; min-height: 26px; padding-bottom: 9px; display: flex; align-items: center; gap: 16px;
  border-bottom: 1px solid var(--line-strong); color: var(--muted); font: .58rem/1.2 var(--font-mono); white-space: nowrap; }
#scene-about .ab-idx { color: var(--accent); font-weight: 700; }
#scene-about .ab-rule { width: min(15vw, 190px); height: 1px; opacity: .72; background: repeating-linear-gradient(90deg, var(--accent) 0 24px, transparent 24px 34px); }
#scene-about .ab-tl-copy { color: var(--muted-strong); }
#scene-about .ab-stat { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; }
#scene-about .ab-stat i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent); }

/* ── Columns ── */
#scene-about .ab-intro, #scene-about .ab-visual, #scene-about .ab-detail { position: relative; z-index: 1; min-width: 0; min-height: 0; }
#scene-about .ab-intro { padding: clamp(18px, 3vh, 30px) clamp(24px, 2.6vw, 42px) 12px 0; display: flex; flex-direction: column; justify-content: center; }
#scene-about .ab-kicker { margin: 0 0 15px; color: var(--accent); font: 650 .68rem/1.4 var(--font-mono); }
#scene-about .ab-title { margin: 0; font: 720 4.7rem/.94 var(--font-display); letter-spacing: 0; }
#scene-about .ab-lead { max-width: 17em; margin: 26px 0 0; font: 620 1.48rem/1.34 var(--font-display); }
/* "About me" is wider than 关于我: keep it on one line in the desktop column so the intro still fits the locked screen. */
@media (min-width: 1081px) { :root[lang="en"] #scene-about .ab-title { font-size: min(4.7rem, 5.3vw - 6px); } }
#scene-about .ab-sum { max-width: 36rem; margin: 17px 0 0; color: var(--muted-strong); font-size: .86rem; line-height: 1.65; }
#scene-about .ab-story { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line-strong); }
#scene-about .ab-story strong { display: block; max-width: 24em; font-size: .88rem; line-height: 1.48; }
#scene-about .ab-story p { max-width: 35rem; margin: 8px 0 0; color: var(--muted); font-size: .74rem; line-height: 1.55; }
#scene-about .ab-likes { margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); list-style: none; }
#scene-about .ab-likes li { min-height: 32px; padding-top: 9px; color: var(--muted-strong); font: .66rem/1.4 var(--font-mono); }
#scene-about a.ab-r, #scene-about span.ab-r { display: inline-block; max-width: 100%; }
#scene-about .ab-likes a { color: inherit; text-decoration: underline 1px var(--accent); text-underline-offset: 3px; }
#scene-about .ab-likes a:hover { color: var(--accent); }
#scene-about a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (hover: none), (pointer: coarse) { #scene-about .ab-likes a { display: inline-flex; align-items: center; min-height: 44px; } }

/* Visual: 1:1 line-art portrait (soft surface panel, no photo) above the 78px signal band. */
#scene-about .ab-visual { padding: 8px clamp(24px, 2.6vw, 42px); display: grid; grid-template-rows: minmax(0, 1fr) 78px; gap: 12px; align-items: center; border-inline: 1px solid var(--line); }
#scene-about .ab-portrait { position: relative; width: min(100%, 520px, 100vh - 230px); width: min(100%, 520px, 100dvh - 230px); aspect-ratio: 1; margin: 0; justify-self: center; overflow: hidden;
  border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 64%, transparent); }
#scene-about .ab-portrait svg { display: block; width: 100%; height: 100%; fill: none; stroke-linecap: round; stroke-linejoin: round; }
#scene-about .ab-portrait svg * { vector-effect: non-scaling-stroke; }
#scene-about .ab-pg { stroke: var(--line); stroke-dasharray: 3 5; }
#scene-about .ab-pf { stroke: var(--text); stroke-width: 1.2; }
#scene-about .ab-pa { stroke: var(--accent); opacity: .8; }
#scene-about .ab-signal { position: relative; width: min(100%, 520px); height: 78px; justify-self: center; overflow: hidden; border-block: 1px solid var(--line); }
#scene-about .ab-signal i, #scene-about .ab-trace i { position: absolute; }
#scene-about .ab-rail { top: 18px; left: -14%; width: 128%; height: 1px; opacity: .68; background: repeating-linear-gradient(90deg, var(--line-strong) 0 28px, transparent 28px 40px); }
#scene-about .ab-rail-m { top: 38px; opacity: .3; --k: 1; }
#scene-about .ab-rail-b { top: 58px; --k: 2; }
#scene-about .ab-sp { top: 17px; left: -92px; width: 92px; height: 2px; background: var(--accent); box-shadow: 18px 0 0 -.5px var(--accent); }
#scene-about .ab-sp-b { top: 57px; left: auto; right: -92px; }
#scene-about .ab-kink { top: 27px; left: 24%; width: 58px; height: 24px; border: 1px solid var(--accent); border-left: 0; opacity: .75; transform: skewY(-18deg); --k: 3; }
#scene-about .ab-kink-r { left: auto; right: 24%; border-left: 1px solid var(--accent); border-right: 0; transform: skewY(18deg); }
#scene-about .ab-node { top: 34px; left: calc(24% - 4px); width: 9px; height: 9px; border: 1px solid var(--accent); background: var(--bg); transform: rotate(45deg); }
#scene-about .ab-node-c { top: 33px; left: calc(50% - 5px); width: 11px; height: 11px; background: var(--accent); }
#scene-about .ab-node-r { left: auto; right: calc(24% - 4px); }

/* Detail: method list and 2×2 capability grid (frame draws top + left, cells draw right + bottom). */
#scene-about .ab-detail { padding: clamp(18px, 3vh, 30px) 0 12px clamp(24px, 2.6vw, 42px); display: flex; flex-direction: column; justify-content: center; gap: 28px; }
#scene-about .ab-head { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; }
#scene-about .ab-head h3 { margin: 0; font: 680 1.35rem/1.16 var(--font-display); }
#scene-about .ab-head span { flex: 0 0 auto; color: var(--accent); font: .58rem/1.3 var(--font-mono); }
#scene-about .ab-steps { margin: 17px 0 0; padding: 0; border-top: 1px solid var(--line-strong); list-style: none; }
#scene-about .ab-steps li { min-height: 68px; padding-block: 11px; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 13px; align-items: center; border-bottom: 1px solid var(--line); }
#scene-about .ab-detail svg { width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
#scene-about .ab-steps strong { display: block; font-size: .82rem; line-height: 1.35; }
#scene-about .ab-steps p { margin: 3px 0 0; color: var(--muted); font-size: .68rem; line-height: 1.42; }
#scene-about .ab-grid { position: relative; overflow: hidden; margin-top: 17px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line-strong); border-left: 1px solid var(--line); }
#scene-about .ab-grid > div { min-width: 0; min-height: 92px; padding: 12px 11px; display: grid; grid-template-columns: 24px minmax(0, 1fr); align-content: center; gap: 3px 8px;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
#scene-about .ab-grid svg { grid-row: 1 / 3; align-self: center; width: 20px; height: 20px; }
#scene-about .ab-grid span, #scene-about .ab-grid strong { min-width: 0; overflow-wrap: anywhere; }
#scene-about .ab-grid span { color: var(--accent); font: .58rem/1.4 var(--font-mono); }
#scene-about .ab-grid strong { font-size: .7rem; line-height: 1.35; }

/* Bottom traces (260×66, skewY -13°); the detail one is mirrored. Only on tall desktop viewports (>820px). */
#scene-about .ab-trace { position: absolute; bottom: 26px; left: 0; display: none; width: min(78%, 260px); height: 66px; overflow: hidden; pointer-events: none; opacity: .78; }
#scene-about .ab-trace-d { left: auto; right: 0; transform: scaleX(-1); }
#scene-about .ab-tl { top: 13px; left: 0; width: 100%; height: 1px; background: repeating-linear-gradient(90deg, var(--line-strong) 0 20px, transparent 20px 31px); }
#scene-about .ab-tl-b { top: 32px; left: 12%; width: 64%; background: var(--accent); transform: skewY(-13deg); transform-origin: left center; --k: 1; }
#scene-about .ab-tl-c { top: 51px; left: 31%; width: 69%; opacity: .58; background: repeating-linear-gradient(90deg, var(--line-strong) 0 7px, transparent 7px 15px); --k: 2; }
#scene-about .ab-tp { top: 12px; left: -54px; width: 54px; height: 2px; background: var(--accent); }
#scene-about .ab-tn { top: 28px; left: calc(12% - 4px); width: 8px; height: 8px; border: 1px solid var(--accent); background: var(--bg); transform: rotate(45deg); }
#scene-about .ab-tn-b { top: 42px; left: calc(76% - 4px); background: var(--accent); }
@media (min-width: 1081px) and (min-height: 821px) { #scene-about .ab-trace { display: block; } }

/* ── Seven 2px scan lines. Resting state: outside their clipped hosts and transparent (also the reduced-motion state). ── */
#scene-about .ab-scan { opacity: 0; pointer-events: none; }
#scene-about .ab-comet { position: absolute; top: 7px; left: -120px; width: 120px; height: 2px; background: linear-gradient(90deg, transparent, var(--accent) 38%, var(--accent)); }
#scene-about .ab-portrait::before, #scene-about .ab-grid::before { content: ""; position: absolute; z-index: 2; top: 0; left: -22%; width: 22%; height: 2px; background: var(--accent); opacity: 0; pointer-events: none; }
#scene-about .ab-grid::before { left: -68px; width: 68px; }
@media (prefers-reduced-motion: no-preference) {
  :root:not([data-reduced]) #scene-about .ab-scan, :root:not([data-reduced]) #scene-about .ab-portrait::before, :root:not([data-reduced]) #scene-about .ab-grid::before {
    animation: ab-scan var(--t, 4.6s) var(--dl, 0s) cubic-bezier(.65, 0, .35, 1) infinite; }
  :root:not([data-reduced]) #scene-about .ab-in .ab-r { animation: ab-rise 640ms cubic-bezier(.22, 1, .36, 1) both; animation-delay: min(.66s, .05s + var(--d) * .22s); }
  :root:not([data-reduced]) #scene-about .ab-in > .ab-intro { animation: ab-fade .52s cubic-bezier(.22, 1, .36, 1) both; }
  :root:not([data-reduced]) #scene-about .ab-in > .ab-detail { animation: ab-fade .56s .04s cubic-bezier(.22, 1, .36, 1) both; }
  :root:not([data-reduced]) #scene-about .ab-in > .ab-visual { animation: ab-zoom .68s cubic-bezier(.22, 1, .36, 1) both; }
  :root:not([data-reduced]) #scene-about .ab-redraw :is(.ab-rule, .ab-rail, .ab-kink, .ab-tl) { animation: ab-draw .9s calc(var(--k, 0) * 110ms) cubic-bezier(.22, 1, .36, 1) both; }
  :root:not([data-reduced]) #scene-about .ab-redraw :is(.ab-node, .ab-tn) { animation: ab-fade .45s .7s ease-out both; }
}
#scene-about .ab-comet { --t: 7.2s; --x: calc(100vw + 240px); --o: .9; }
#scene-about .ab-tp { --x: 350px; }
#scene-about .ab-trace-d .ab-tp { --dl: -2.1s; }
#scene-about .ab-portrait::before { --t: 6.8s; --x: 555%; }
#scene-about .ab-grid::before { --t: 5.8s; --dl: -2.4s; --x: 560px; }
#scene-about .ab-sp { --t: 4.8s; --x: 612px; }
#scene-about .ab-sp-b { --t: 5.6s; --dl: 1.2s; --x: -612px; }
/* JS adds .ab-sync for one style pass to restart every scan together (L28) or the band's pulses (L29). */
#scene-about .ab-sync .ab-scan, #scene-about .ab-sync .ab-portrait::before, #scene-about .ab-sync .ab-grid::before { animation: none !important; }
@keyframes ab-scan { 0%, 12% { transform: translateX(0); opacity: 0; } 22%, 76% { opacity: var(--o, 1); } 90%, 100% { transform: translateX(var(--x, 350px)); opacity: 0; } }
@keyframes ab-rise { 0% { opacity: 0; transform: translate3d(0, 10px, 0) scale(.992); } 54% { opacity: 1; } 100% { opacity: 1; transform: none; } }
@keyframes ab-fade { from { opacity: 0; } }
@keyframes ab-zoom { from { opacity: 0; transform: scale(1.018); } }
@keyframes ab-draw { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0); } }

/* Short desktop (≤760px tall): tighten type, portrait and band as the original does. */
@media (min-width: 1081px) and (max-height: 760px) {
  #scene-about .ab-title { font-size: 3.55rem; }
  :root[lang="en"] #scene-about .ab-title { font-size: min(3.55rem, 5.3vw - 6px); }
  #scene-about .ab-kicker { margin-bottom: 10px; }
  #scene-about .ab-lead { margin-top: 18px; font-size: 1.2rem; }
  #scene-about .ab-sum { margin-top: 12px; font-size: .78rem; }
  #scene-about .ab-story { margin-top: 16px; padding-top: 12px; }
  #scene-about .ab-likes { margin-top: 12px; }
  #scene-about .ab-visual { grid-template-rows: minmax(0, 1fr) 64px; gap: 8px; }
  #scene-about .ab-portrait { width: min(100%, 470px, 100vh - 190px); width: min(100%, 470px, 100dvh - 190px); }
  #scene-about .ab-signal { height: 64px; }
  #scene-about .ab-rail { top: 13px; }
  #scene-about .ab-rail-m { top: 31px; }
  #scene-about .ab-rail-b { top: 49px; }
  #scene-about .ab-sp { top: 12px; }
  #scene-about .ab-sp-b { top: 48px; }
  #scene-about .ab-kink { top: 20px; }
  #scene-about .ab-node { top: 27px; }
  #scene-about .ab-node-c { top: 26px; }
  #scene-about .ab-detail { gap: 18px; }
  /* Clear the topline; if a column is still too tall (long EN copy) it overflows downward, not under the ruler. */
  #scene-about .ab-intro, #scene-about .ab-detail { padding-top: 42px; justify-content: safe center; }
  #scene-about .ab-head h3 { font-size: 1.12rem; }
  #scene-about .ab-steps, #scene-about .ab-grid { margin-top: 11px; }
  #scene-about .ab-steps li { min-height: 57px; padding-block: 7px; }
  #scene-about .ab-grid > div { min-height: 76px; padding-block: 8px; }
}

/* 768–1080 (no rule in the original): intro + visual side by side, detail as a two-column band below. */
@media (min-width: 768px) and (max-width: 1080px) {
  #scene-about .ab-console { width: calc(100% - 48px); grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  #scene-about .ab-intro { padding-top: 64px; padding-bottom: 28px; }
  #scene-about .ab-title { font-size: clamp(3.4rem, 6.4vw, 4.4rem); }
  #scene-about .ab-visual { padding: 64px 0 28px 28px; border-inline: 0; border-left: 1px solid var(--line); }
  #scene-about .ab-detail { grid-column: 1 / -1; padding: 32px 0 40px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px; border-top: 1px solid var(--line-strong); }
}

/* ≤767: single column, the page scrolls; heading pairs stack. */
@media (max-width: 767px) {
  #scene-about .ab-console { width: calc(100% - 32px); display: flex; flex-direction: column; padding-block: 18px 72px; }
  #scene-about .ab-topline { top: 12px; gap: 10px; font-size: .52rem; }
  #scene-about .ab-tl-copy { display: none; }
  #scene-about .ab-rule { flex: 1; width: auto; }
  #scene-about .ab-intro { padding: 64px 0 38px; }
  #scene-about .ab-title { font-size: clamp(3.4rem, 18vw, 4.8rem); }
  #scene-about .ab-lead { max-width: none; margin-top: 24px; font-size: 1.28rem; line-height: 1.42; }
  #scene-about .ab-sum { font-size: .84rem; }
  #scene-about .ab-likes li { min-height: 40px; padding-top: 11px; }
  #scene-about .ab-visual { padding: 0; grid-template-rows: auto 66px; gap: 12px; border: 0; }
  #scene-about .ab-portrait { width: min(100%, 430px); }
  #scene-about .ab-signal { width: 100%; height: 66px; }
  #scene-about .ab-rail { top: 14px; }
  #scene-about .ab-rail-m { top: 32px; }
  #scene-about .ab-rail-b { top: 50px; }
  #scene-about .ab-sp { top: 13px; }
  #scene-about .ab-sp-b { top: 49px; }
  #scene-about .ab-kink { top: 21px; }
  #scene-about .ab-node { top: 28px; }
  #scene-about .ab-node-c { top: 27px; }
  #scene-about .ab-detail { padding: 42px 0 0; gap: 42px; }
  #scene-about .ab-head { flex-direction: column; align-items: flex-start; gap: 6px; }
}
@media (max-width: 380px) { #scene-about .ab-grid { grid-template-columns: minmax(0, 1fr); } }

/* Forced colors: drop the decorative scans and traces; keep the line art visible. */
@media (forced-colors: active) {
  #scene-about .ab-scan, #scene-about .ab-trace, #scene-about .ab-portrait::before, #scene-about .ab-grid::before { display: none; }
  #scene-about .ab-portrait svg g { stroke: CanvasText; }
}
