/* ============================================================
 * extra.css —— 站点增量样式
 * 覆盖：首屏 ASCII/渐变、区块标题 Tech Text、首页弧形卡片（Circular Gallery）、
 *       两侧装饰（Hyperspeed + HUD）、关于页版式（联系/简历 + Dither Veil）、项目图册页
 * ============================================================ */

/* ---------------- 1. 首屏 ASCII / 渐变 ---------------- */

/* 背景画布层：必须在 fixed 下，否则会把整页内容往下顶一屏（canvas 默认是行内块） */
.snow-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    z-index: -997;
    pointer-events: none;
}

/* 顶部滚动进度条 */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0;
    z-index: 120;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(139, 240, 254, .9), rgba(158, 152, 255, .9));
    box-shadow: 0 0 12px rgba(139, 240, 254, .5);
    transition: width .12s linear;
}

.ascii-hero {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* 四周虚化：两层线性蒙版求交，左右各软收 9%、顶部软收 12% */
.ascii-hero,
.ascii-grad {
    -webkit-mask-image:
        linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, #000 9%, #000 91%, rgba(0, 0, 0, 0) 100%),
        linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000 12%, #000 100%);
    mask-image:
        linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, #000 9%, #000 91%, rgba(0, 0, 0, 0) 100%),
        linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000 12%, #000 100%);
    -webkit-mask-composite: source-in;
    mask-composite: intersect;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}

/* 开场层：GradientASCII（js/gradient-ascii.js） */
.ascii-grad {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    display: block;
    transition: opacity 1.6s cubic-bezier(.45, .02, .2, 1);
}

html.hero-grad .ascii-hero {
    opacity: 0;
    transition: opacity 1.6s cubic-bezier(.22, 1, .36, 1) .2s;
}

html.hero-grad .ascii-hero.is-in {
    opacity: 1;
}

.ascii-grad.is-out {
    opacity: 0;
}

/* 首屏标题：Split Text（逐字升起） */
.index .hello .title {
    overflow: hidden;
    padding-bottom: 2px;
}

.index .hello .title .split-char {
    display: inline-block;
    white-space: pre;
}

/* 首屏大标题：原 32px × 110% = 35.2px */
.index .hello .title,
.index .hello .title .title-hi,
.index .hello .title .title-name,
.index .hello .title .split-char {
    font-size: 35.2px;
}

/* ---------------- 2. 区块标题：Tech Text ---------------- */

.index .work-heading {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 9px 0 12px;
    width: 100%;
}

.index .work-heading .tech-text {
    position: relative;
    flex: 1 1 auto;
    width: 100%;
    max-width: var(--mw, 1080px);
    height: 68px;
    color: #E8E8F6;
    opacity: 0.9;
}

.index .work-heading .tech-text-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* i18n 文案源：供 [data-i18n] 写入，不参与视觉 */
.index .work-heading .tech-text-src {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* ---------------- 3. 首页弧形卡片：Circular Gallery ---------------- */

/* 作品区：撑满内容列（.index 是 center 对齐的 flex，不铺满会塌成 0 宽） */
.index .work {
    width: 100%;
    padding-top: 56px;
    min-height: 0;
}

.cg {
    position: relative;
    width: 100%;
    max-width: var(--mw, 1080px);
    height: 360px;
    /* 上方空隙收紧 70%：margin-top 360px → 70px */
    margin: 70px auto 0;
    outline: none;
    cursor: grab;
    touch-action: pan-y;
    --cg-w: 240px;
    /* 注意：不要再给容器加 mask-image——蒙版会把超出容器边框的展开卡片一起裁掉，
       这就是外侧卡片悬浮展开后右半被遮的原因。底部收尾改由下面的 ::after 渐变层实现。 */
}

.cg::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 26px;
    background: linear-gradient(180deg, rgba(14, 14, 19, 0), #0E0E13 96%);
    pointer-events: none;
    z-index: 1000;
}

.cg.is-drag { cursor: grabbing; }

.cg__scene {
    position: absolute;
    left: 0;
    right: 0;
    top: var(--cg-pad, 0px);
    height: 100%;
    perspective: 1400px;
}

.cg__card {
    position: absolute;
    display: block;
    width: var(--cg-w);
    left: 50%;
    top: 0;
    text-decoration: none;
    opacity: calc(var(--cg-op, 1) * (1 - var(--cg-dim, 0) * 0.55));
    transform-origin: 50% 100%;
    will-change: transform, opacity;
    -webkit-tap-highlight-color: transparent;
    transition: width .44s cubic-bezier(.2, .7, .2, 1);
}

/* 悬浮这张：真的变宽（--cg-expand 由 JS 按场景宽算），配合 1.5 的横版比例整体放大 */
.cg__card.is-focus {
    width: var(--cg-expand, 420px);
}

.cg__frame {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: var(--cg-ratio, 0.78);
    border-radius: 12px;
    overflow: visible;
    background-color: #141419;
    border: 1px solid rgba(78, 78, 100, 0.25);
    box-shadow: 0 12px 30px rgba(4, 4, 10, 0.5);
    transition: aspect-ratio .42s cubic-bezier(.2,.7,.2,1), border-color .25s ease, box-shadow .3s ease;
}

.cg__img {
    position: absolute;
    inset: 0;
    border-radius: 11px;
    background-repeat: no-repeat;
    background-position: top center;
    background-size: cover;
    overflow: hidden;
    /* 别的卡展开时，这张卡虚化后退（数值由 JS 每帧写入 --cg-dim） */
    filter: blur(calc(var(--cg-dim, 0) * 3.4px))
            saturate(calc(1 - var(--cg-dim, 0) * 0.42))
            brightness(calc(1 - var(--cg-dim, 0) * 0.34));
}

/* 悬浮展开：整图完整展示（contain），不裁剪；深色底兜住四周留白 */
.cg__card.is-focus .cg__img {
    background-size: contain;
    background-position: center center;
    background-color: #101014;
}

/* 弧端压暗：焦点留在弧顶 */
.cg__shade {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: #0E0E13;
    opacity: var(--cg-shade, 0);
}

/* 底部压暗，让卡片标题区与图片分离 */
.cg__veil {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(20, 20, 25, 0) 62%, rgba(20, 20, 25, .55) 100%);
    opacity: var(--cg-op, 1);
}

/* 悬浮时的「打开」提示 */
.cg__open {
    position: absolute;
    right: 10px;
    bottom: 10px;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    color: #E8E8F6;
    background: rgba(32, 32, 42, 0.9);
    border: 1px solid rgba(150, 150, 190, 0.45);
    box-shadow: 0 2px 10px rgba(4, 4, 10, 0.5);
    opacity: 0;
    transform: translateY(4px);
    transition: opacity .25s ease, transform .25s ease;
    pointer-events: none;
}

.cg__open svg { width: 14px; height: 14px; display: block; }

.cg__card.is-focus .cg__open,
.cg__card:hover .cg__open { opacity: 1; transform: translateY(0); }

/* 卡片文字标注：与图片居中，和图片拉开一点距离 */
.cg__meta {
    position: relative;
    left: 50%;
    display: flex;
    width: max-content;
    transform: translateX(-50%);
    align-items: baseline;
    justify-content: center;
    gap: 8px;
    padding: 14px 2px 0;
    line-height: 1.2;
    text-align: center;
    /* 别的卡展开时，这些卡的标注一起淡下去，免得两行字糊在放大卡下面 */
    opacity: calc(1 - var(--cg-dim, 0) * 0.75);
}

.cg__num { display: none; }

.cg__title {
    font-size: 18.7px;
    font-weight: 500;
    letter-spacing: .02em;
    color: #E8E8F6;
    white-space: nowrap;
    text-shadow: 0 0 12px rgba(139, 240, 254, .18);
}

/* 选中态流光描边 */
@property --cg-flow {
    syntax: '<angle>';
    inherits: false;
    initial-value: 0deg;
}

@keyframes cg-ring-flow {
    to { --cg-flow: 360deg; }
}

.cg__card.is-focus .cg__frame {
    aspect-ratio: var(--cg-ratio-open, 1.5);
    border-color: rgba(139, 240, 254, 0.38);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        0 28px 62px rgba(0, 0, 0, 0.62),
        0 12px 34px rgba(99, 97, 220, 0.28),
        0 0 34px rgba(139, 240, 254, 0.13);
}

.cg__frame::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 15px;
    padding: 3px;
    pointer-events: none;
    opacity: 0;
    background: conic-gradient(from var(--cg-flow),
        rgba(139, 240, 254, 0.30) 0deg,
        rgba(139, 240, 254, 1) 26deg,
        rgba(224, 208, 255, 1) 52deg,
        rgba(139, 240, 254, 1) 78deg,
        rgba(139, 240, 254, 0.30) 132deg,
        rgba(139, 240, 254, 0.30) 360deg);
    -webkit-mask-image: linear-gradient(#000 0 0), linear-gradient(#000 0 0);
    -webkit-mask-clip: content-box, border-box;
    -webkit-mask-composite: xor;
    mask-image: linear-gradient(#000 0 0), linear-gradient(#000 0 0);
    mask-clip: content-box, border-box;
    mask-composite: exclude;
    filter: drop-shadow(0 0 6px rgba(139, 240, 254, 0.45));
    transition: opacity 0.32s ease;
    animation: cg-ring-flow 2.9s linear infinite;
    animation-play-state: paused;
}

/* 外圈柔光：流光虚化后垫在卡片后面 */
.cg__frame::before {
    content: '';
    position: absolute;
    inset: -9px;
    z-index: -1;
    border-radius: 21px;
    pointer-events: none;
    opacity: 0;
    background: conic-gradient(from var(--cg-flow),
        rgba(139, 240, 254, 0.12) 0deg,
        rgba(139, 240, 254, 0.85) 40deg,
        rgba(190, 176, 255, 0.9) 62deg,
        rgba(139, 240, 254, 0.85) 86deg,
        rgba(139, 240, 254, 0.12) 140deg,
        rgba(139, 240, 254, 0.12) 360deg);
    filter: blur(10px);
    transition: opacity 0.34s ease;
    animation: cg-ring-flow 2.9s linear infinite;
    animation-play-state: paused;
}

.cg__card.is-focus .cg__frame::before { opacity: 0.56; animation-play-state: running; }
.cg__card.is-focus .cg__frame::after { opacity: 1; animation-play-state: running; }

@media screen and (max-width: 768px) {
    .cg { height: 300px; }
}

/* ---------------- 3b. 关于页：数据卡 / 能力卡 ---------------- */

/* 数据卡只剩「工作 / 项目」两张；能力卡换成四个 3D 图标 */
.about .about-middle .power .list-00 {
    grid-template-columns: repeat(2, 1fr);
}

.about .about-middle .power .list-01 {
    grid-template-columns: repeat(4, 1fr);
}

.about .about-middle .power .power-card a .card-img {
    width: 56px;
    height: 56px;
    background-size: contain;
    background-position: center;
}

.about .about-middle .power .power-card a .card-img::after {
    width: 56px;
    height: 56px;
    background: none;
    filter: none;
}

@media screen and (max-width: 768px) {
    .about .about-middle .power .list-01 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ---------------- 4. 两侧装饰 · HUD ---------------- */

.side-deco {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    --sd-rail-x: clamp(16px, 3.2vw, 54px);
    --sd-accent: 139, 240, 254;
    --sd-violet: 158, 152, 255;
}

/* 两侧冷光底：让留白不是死黑 */
.side-deco__glow {
    position: absolute;
    width: 34vw;
    height: 74vh;
    top: -6vh;
    filter: blur(46px);
    opacity: 0.42;
    background: radial-gradient(closest-side, rgba(var(--sd-accent), 0.16), rgba(var(--sd-accent), 0) 78%);
}

.side-deco__glow--l { left: calc(var(--sd-rail-x) - 26vw); }
.side-deco__glow--r {
    right: calc(var(--sd-rail-x) - 26vw);
    background: radial-gradient(closest-side, rgba(var(--sd-violet), 0.16), rgba(var(--sd-violet), 0) 78%);
}

/* 边缘压暗 */
.side-deco__edge {
    position: absolute;
    top: 0;
    bottom: 0;
    width: min(13vw, 170px);
}

.side-deco__edge--l { left: 0; background: linear-gradient(90deg, rgba(5, 6, 11, 0.62) 0%, rgba(5, 6, 11, 0) 84%); }
.side-deco__edge--r { right: 0; background: linear-gradient(270deg, rgba(5, 6, 11, 0.62) 0%, rgba(5, 6, 11, 0) 84%); }

/* HUD 四角 */
.side-deco__corner {
    position: absolute;
    width: 22px;
    height: 22px;
    border: 0 solid rgba(var(--sd-accent), 0.26);
}

.side-deco__corner--tl { left: var(--sd-rail-x); top: 96px; border-top-width: 1px; border-left-width: 1px; }
.side-deco__corner--tr { right: var(--sd-rail-x); top: 96px; border-top-width: 1px; border-right-width: 1px; }
.side-deco__corner--bl { left: var(--sd-rail-x); bottom: 30vh; border-bottom-width: 1px; border-left-width: 1px; }
.side-deco__corner--br { right: var(--sd-rail-x); bottom: 30vh; border-bottom-width: 1px; border-right-width: 1px; }

/* 竖向光柱 */
.side-deco__strip {
    position: absolute;
    top: 14vh;
    bottom: 34vh;
    width: 34px;
    filter: blur(7px);
    opacity: 0.75;
    background: linear-gradient(180deg,
        rgba(var(--sd-accent), 0) 0%,
        rgba(var(--sd-accent), 0.07) 22%,
        rgba(var(--sd-accent), 0.11) 52%,
        rgba(var(--sd-accent), 0.05) 82%,
        rgba(var(--sd-accent), 0) 100%);
}

.side-deco__strip--l { left: calc(var(--sd-rail-x) - 17px); }
.side-deco__strip--r { right: calc(var(--sd-rail-x) - 17px); }

/* 外侧虚线 */
.side-deco__hair {
    position: absolute;
    top: 96px;
    bottom: 30vh;
    width: 1px;
    background: repeating-linear-gradient(180deg,
        rgba(var(--sd-accent), 0.18) 0 4px,
        rgba(var(--sd-accent), 0) 4px 13px);
    opacity: 0.6;
}

.side-deco__hair--l { left: calc(var(--sd-rail-x) - 11px); }
.side-deco__hair--r { right: calc(var(--sd-rail-x) - 11px); }

/* 主轨道 + 下行扫描线 */
@keyframes sd-scan {
    0%   { transform: translateY(-18vh); opacity: 0; }
    12%  { opacity: 1; }
    88%  { opacity: 1; }
    100% { transform: translateY(74vh); opacity: 0; }
}

.side-deco__rail {
    position: absolute;
    top: 96px;
    bottom: 30vh;
    width: 1px;
    background: linear-gradient(180deg, rgba(var(--sd-accent), 0) 0%, rgba(var(--sd-accent), 0.16) 12%, rgba(var(--sd-accent), 0.16) 88%, rgba(var(--sd-accent), 0) 100%);
}

.side-deco__rail--l { left: var(--sd-rail-x); }
.side-deco__rail--r { right: var(--sd-rail-x); }

.side-deco__rail::after {
    content: '';
    position: absolute;
    left: -1px;
    top: 0;
    width: 3px;
    height: 120px;
    background: linear-gradient(180deg,
        rgba(var(--sd-accent), 0) 0%,
        rgba(var(--sd-accent), 0.55) 50%,
        rgba(var(--sd-accent), 0) 100%);
    animation: sd-scan 9.5s linear infinite;
    animation-delay: -3s;
}

.side-deco__rail--r::after { animation-delay: -7.4s; }

/* 刻度尺：主刻度 8px / 次刻度 4px */
.side-deco__ruler {
    position: absolute;
    top: 96px;
    bottom: 30vh;
    width: 8px;
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 12%, #000 86%, transparent 100%);
    mask-image: linear-gradient(180deg, transparent 0%, #000 12%, #000 86%, transparent 100%);
}

.side-deco__ruler--l { left: calc(var(--sd-rail-x) + 4px); }
.side-deco__ruler--r { right: calc(var(--sd-rail-x) + 4px); }

.side-deco__ruler::before,
.side-deco__ruler::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
}

.side-deco__ruler::before {
    width: 8px;
    height: 100%;
    background: repeating-linear-gradient(180deg,
        rgba(var(--sd-accent), 0.22) 0 1px,
        rgba(var(--sd-accent), 0) 1px 64px);
}

.side-deco__ruler::after {
    width: 4px;
    height: 100%;
    background: repeating-linear-gradient(180deg,
        rgba(var(--sd-accent), 0.10) 0 1px,
        rgba(var(--sd-accent), 0) 1px 16px);
}

.side-deco__ruler--r::after { left: auto; right: 0; }

/* 星点 */
@keyframes sd-twinkle {
    0%, 100% { opacity: 0.42; }
    50%      { opacity: 0.92; }
}

.side-deco__specks {
    position: absolute;
    top: 12vh;
    width: 48px;
    height: 74vh;
    background:
        radial-gradient(2px 2px at 22% 9%,   rgba(var(--sd-accent), 0.40), transparent 62%),
        radial-gradient(1px 1px at 66% 24%, rgba(255, 255, 255, 0.26), transparent 62%),
        radial-gradient(1.5px 1.5px at 38% 41%, rgba(var(--sd-accent), 0.30), transparent 62%),
        radial-gradient(1px 1px at 74% 58%, rgba(255, 255, 255, 0.20), transparent 62%),
        radial-gradient(1.5px 1.5px at 16% 73%, rgba(var(--sd-accent), 0.32), transparent 62%),
        radial-gradient(1px 1px at 58% 88%, rgba(255, 255, 255, 0.22), transparent 62%);
    animation: sd-twinkle 7.4s ease-in-out infinite;
}

.side-deco__specks--l { left: calc(var(--sd-rail-x) - 44px); }
.side-deco__specks--r { right: calc(var(--sd-rail-x) - 44px); animation-delay: -3.1s; }

/* 套准标记 */
.side-deco__mark {
    position: absolute;
    width: 13px;
    height: 13px;
    border: 1px solid rgba(var(--sd-accent), 0.17);
    border-radius: 50%;
}

.side-deco__mark::before,
.side-deco__mark::after {
    content: '';
    position: absolute;
    background: rgba(var(--sd-accent), 0.16);
}

.side-deco__mark::before { left: 6px; top: -7px; width: 1px; height: 27px; }
.side-deco__mark::after { top: 6px; left: -7px; height: 1px; width: 27px; }

.side-deco__mark--l1 { left: calc(var(--sd-rail-x) - 32px); top: 33%; }
.side-deco__mark--l2 { left: calc(var(--sd-rail-x) - 32px); top: 69%; }
.side-deco__mark--r1 { right: calc(var(--sd-rail-x) - 32px); top: 33%; }
.side-deco__mark--r2 { right: calc(var(--sd-rail-x) - 32px); top: 69%; }

/* 轨道上的小圆点 */
.side-deco__dot {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(var(--sd-accent), 0.55);
    box-shadow: 0 0 10px rgba(var(--sd-accent), 0.55);
    top: 46%;
}

.side-deco__dot--l { left: calc(var(--sd-rail-x) - 1.5px); }
.side-deco__dot--r { right: calc(var(--sd-rail-x) - 1.5px); }

/* 竖排等宽字：极小的技术感文本 */
.side-deco__glyphs {
    position: absolute;
    top: 58%;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 9px;
    letter-spacing: 0.24em;
    color: rgba(var(--sd-accent), 0.22);
    writing-mode: vertical-rl;
    white-space: nowrap;
}

.side-deco__glyphs--l { left: calc(var(--sd-rail-x) - 30px); }
.side-deco__glyphs--r { right: calc(var(--sd-rail-x) - 30px); }

@media screen and (max-width: 1180px) {
    .side-deco__specks,
    .side-deco__mark,
    .side-deco__glyphs { display: none; }
    .side-deco__edge { width: 11vw; }
}

/* Hyperspeed 速度线（两侧） */
.hyperspeed-sides {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    mix-blend-mode: screen;
    opacity: 0.62;
    -webkit-mask-image: linear-gradient(90deg,
        #000 0%, #000 14%, transparent 27%,
        transparent 73%, #000 86%, #000 100%);
    mask-image: linear-gradient(90deg,
        #000 0%, #000 14%, transparent 27%,
        transparent 73%, #000 86%, #000 100%);
}

@media screen and (max-width: 768px) {
    .side-deco { display: none; }
}

/* ---------------- 5. 关于页：联系/简历 + Dither Veil ---------------- */

.about .about-name {
    margin-bottom: 16px;
}

/* 左栏：抖动头像（放大 10%、上移，带轻微晃动） */
.about .about-portrait {
    position: relative;
    flex: 0 0 399px;
    width: 399px;
    min-width: 0;
    gap: 0;
    margin-top: -20px;
    transform-origin: 50% 42%;
    animation: about-portrait-sway 7s ease-in-out infinite;
}

@keyframes about-portrait-sway {
    0%   { transform: rotate(-1.3deg) translateY(-3px); }
    50%  { transform: rotate(1.1deg) translateY(4px); }
    100% { transform: rotate(-1.3deg) translateY(-3px); }
}

@media (prefers-reduced-motion: reduce) {
    .about .about-portrait { animation: none; }
}

.about .about-portrait .dither-veil__canvas {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 3px;
    cursor: crosshair;
    /* 现有径向羽化 + 底部竖向渐变：头像下缘向下溶解进页面背景，不再硬切 */
    -webkit-mask-image:
        radial-gradient(118% 100% at 50% 46%, #000 56%, transparent 99%),
        linear-gradient(180deg, #000 0%, #000 72%, rgba(0, 0, 0, 0) 100%);
    mask-image:
        radial-gradient(118% 100% at 50% 46%, #000 56%, transparent 99%),
        linear-gradient(180deg, #000 0%, #000 72%, rgba(0, 0, 0, 0) 100%);
    -webkit-mask-composite: source-in;
    mask-composite: intersect;
    background: #120f17;
}

/* 名字 + 介绍作为一组，与头像竖向居中对齐 */
.about .about-info {
    gap: 48px;
    align-items: center;
}

.about .about-info-left {
    max-width: 620px;
}

/* 仅中文介绍：段间空白行距减半（英文仍走 <br><br>，不受影响） */
[data-lang="zh"] .about .about-info-left .introduce-desc p {
    margin: 0 0 12px 0;
}

[data-lang="zh"] .about .about-info-left .introduce-desc p:last-child {
    margin-bottom: 0;
}

@media screen and (max-width: 900px) {
    .about .about-portrait {
        flex: 1 1 300px;
        width: auto;
        max-width: 375px;
    }
    .about .about-info { gap: 32px; }
}

@media screen and (max-width: 768px) {
    .about .about-portrait {
        flex: 1 1 100%;
        width: 100%;
        max-width: 280px;
        margin: 8px auto 0;
    }
}

/* ---------------- 6. 项目图册页 ---------------- */

.project-top {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 28px clamp(20px, 5vw, 72px) 0;
}

.project-back {
    font-size: 14px;
    letter-spacing: .06em;
    color: #9aa0b4;
    transition: color .2s ease;
}

.project-back:hover { color: #E8E8F6; }

.project-page {
    position: relative;
    z-index: 2;
    max-width: 1080px;
    margin: 0 auto;
    padding: 36px clamp(20px, 5vw, 72px) 96px;
}

.project-header { margin-bottom: 32px; }

.project-title-row {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 16px;
}

.project-title {
    font-size: clamp(26px, 3.4vw, 40px);
    font-weight: 600;
    color: #E8E8F6;
    letter-spacing: .01em;
}

.project-tag {
    margin-top: 0;
    font-size: 12px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: rgba(139, 240, 254, .72);
}

.project-desc {
    margin-top: 14px;
    font-size: 15px;
    line-height: 1.8;
    color: #9aa0b4;
    max-width: 640px;
    border: 0;
    background: transparent;
    padding: 0;
}

/* 作品图：一行一张，单列居中，所有图片宽度统一 */
.gallery-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.gallery-item {
    position: relative;
    display: block;
    width: 100%;
    max-width: 780px;
    margin-bottom: 0;
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    overflow: hidden;
    border-radius: 8px;
    background: #141419;
    border: 1px solid rgba(78, 78, 100, 0.22);
    cursor: zoom-in;
    transition: transform .35s ease, box-shadow .35s ease, border-color .25s ease;
}

.gallery-item img {
    display: block;
    width: 100%;
    height: auto;
}

.gallery-item:hover {
    transform: translateY(-4px);
    border-color: rgba(139, 240, 254, 0.32);
    box-shadow: 0 16px 40px rgba(4, 4, 10, .55);
}

.project-empty {
    margin-top: 18px;
    font-size: 14px;
    color: #7c8298;
}

/* ---------- 下一个项目：Specular 镜面描边按钮 ---------- */
.project-next {
    display: flex;
    justify-content: center;
    margin-top: 48px;
}

.specular-button {
    --sb-radius: 18px;
    --sb-tint: #ffffff;
    --sb-tint-opacity: 0.04;
    --sb-blur: 0px;
    --sb-text-color: #f5f5f5;
    position: relative;
    isolation: isolate;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    margin: 0;
    border: 0;
    border-radius: var(--sb-radius);
    font: inherit;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0.01em;
    color: var(--sb-text-color);
    background: color-mix(in srgb, var(--sb-tint) calc(var(--sb-tint-opacity) * 100%), transparent);
    box-shadow: 0 10px 24px -14px rgba(0, 0, 0, 0.45);
    -webkit-backdrop-filter: blur(var(--sb-blur));
    backdrop-filter: blur(var(--sb-blur));
    cursor: pointer;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.specular-button:active { transform: scale(0.97); }

.specular-button:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--sb-text-color) 55%, transparent);
    outline-offset: 3px;
}

.specular-button:disabled { opacity: 0.5; cursor: default; }
.specular-button:disabled:active { transform: none; }

.specular-button--md { padding: 14px 28px; font-size: 1rem; }

.specular-button__light {
    position: absolute;
    inset: -24px;
    z-index: 1;
    display: block;
    width: calc(100% + 48px);
    height: calc(100% + 48px);
    pointer-events: none;
}

.specular-button__label {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: inherit;
}

/* 灯箱 */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox[hidden] { display: none; }

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(6, 6, 10, .92);
    backdrop-filter: blur(6px);
}

.lightbox-figure {
    position: relative;
    z-index: 2;
    max-width: min(92vw, 1280px);
    max-height: 88vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.lightbox-figure img {
    max-width: 100%;
    max-height: 82vh;
    border-radius: 6px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .7);
}

.lightbox-figure figcaption {
    font-size: 12px;
    letter-spacing: .16em;
    color: #8b90a4;
}

.lightbox-btn {
    position: absolute;
    z-index: 3;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #cfd4e6;
    background: rgba(24, 24, 32, .8);
    border: 1px solid rgba(150, 150, 190, .3);
    cursor: pointer;
    transition: background .2s ease, color .2s ease;
}

.lightbox-btn:hover { background: rgba(40, 40, 54, .92); color: #fff; }

.lightbox-close { top: 24px; right: 24px; }
.lightbox-prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 24px; top: 50%; transform: translateY(-50%); }

@media screen and (max-width: 768px) {
    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }
}

/* ---------------- 7. 动效降级 ---------------- */

/* 头部按钮里的图标尺寸（原样式只给了按钮尺寸，svg 会塌成 0） */
.menu .btn svg,
#menu-panel .btn svg {
    width: 16px;
    height: 16px;
    display: block;
}

/* 语言按钮：只显示「点一下会切到」的那一枚 */
html[data-lang="zh"] .lang-toggle svg[data-lang-icon="en"],
html[data-lang="en"] .lang-toggle svg[data-lang-icon="zh"] {
    display: none !important;
}

/* ---------------- 8. 首屏欢迎语的「暗部」 ---------------- */

/* 文字背后的暗色背景带已按要求去除：不再铺暗部椭圆与冷色边缘微光，标题与打字行直接落在动效背景上。 */
.hello-veil {
    display: none;
}

/* 开场 WebGL 层：中间椭圆让位（与暗部同形，边缘渐显） */
.ascii-grad {
    -webkit-mask-image:
        linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, #000 9%, #000 91%, rgba(0, 0, 0, 0) 100%),
        linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000 12%, #000 100%),
        radial-gradient(ellipse 50% 28% at 50% 58%,
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 0.2) 36%,
            #000 74%);
    mask-image:
        linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, #000 9%, #000 91%, rgba(0, 0, 0, 0) 100%),
        linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000 12%, #000 100%),
        radial-gradient(ellipse 50% 28% at 50% 58%,
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 0.2) 36%,
            #000 74%);
    -webkit-mask-composite: source-in, source-in;
    mask-composite: intersect, intersect;
}

/* 交棒后的呼吸层：暗区整圈彻底压黑，亮完一遍后不在暗色区域出光；
   竖向渐变只保留椭圆上半的淡淡光效，下半部分彻底压黑 */
.ascii-hero {
    -webkit-mask-image:
        linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, #000 9%, #000 91%, rgba(0, 0, 0, 0) 100%),
        linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000 12%, #000 100%),
        radial-gradient(ellipse 54% 32% at 50% 58%,
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 0) 52%,
            rgba(0, 0, 0, 0.12) 66%,
            #000 84%),
        linear-gradient(180deg, #000 0%, #000 57%, rgba(0, 0, 0, 0) 64%);
    mask-image:
        linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, #000 9%, #000 91%, rgba(0, 0, 0, 0) 100%),
        linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000 12%, #000 100%),
        radial-gradient(ellipse 54% 32% at 50% 58%,
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 0) 52%,
            rgba(0, 0, 0, 0.12) 66%,
            #000 84%),
        linear-gradient(180deg, #000 0%, #000 57%, rgba(0, 0, 0, 0) 64%);
    -webkit-mask-composite: source-in, source-in, source-in;
    mask-composite: intersect, intersect, intersect;
}

/* 标题与打字行提到暗区之上；随暗部椭圆一起下移 32px，落在 58% 高度的暗区里。
   注意：.title-hi / .title-name 是 background-clip:text 的渐变字（fill 为 transparent），
   给它们加 text-shadow 会把阴影从字腔里透出来、整个标题发灰，所以这里只用暗区托底，不加阴影。 */
.index .hello .title,
.index .hello-desc {
    position: relative;
    z-index: 2;
    transform: translateY(32px);
}

.index .hello-desc {
    color: #cfd9ea;
    text-shadow:
        0 0 16px rgba(4, 5, 9, 0.96),
        0 1px 3px rgba(0, 0, 0, 0.85);
}

/* 底部半个星球上移：卡片最低点距底 118px，星球弧顶抬到距底约 103px，
   卡片↔星球的暗空距离由约 31px 再减半到约 15px */
.widget .shape-earth {
    bottom: -1817px;
}
