﻿/* --- 核心背景与纹理 --- */
body {
    background-color: #1A2026;
    color: #E8E8E8;
    overflow-x: hidden;
    /* 网格背景 */
    background-image: 
        linear-gradient(rgba(0, 200, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 200, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    background-attachment: fixed;
}

/* 扫描线遮罩 (CRT效果) */
.scanlines {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0) 50%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0.2));
    background-size: 100% 4px;
    pointer-events: none; z-index: 9999; opacity: 0.6;
}

/* --- 更真实的故障标题效果 --- */
.glitch-wrapper {
    position: relative;
    display: inline-grid;
    place-items: center;
    isolation: isolate;
    padding: 0.15em 0.08em;
}

.glitch-wrapper::before {
    content: "";
    position: absolute;
    inset: -0.18em -0.08em;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(0, 200, 255, 0.18) 46%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 0, 85, 0.15) 54%,
        rgba(255, 255, 255, 0) 100%
    );
    opacity: 0;
    pointer-events: none;
    mix-blend-mode: screen;
    z-index: 3;
    animation: glitch-sweep 6s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

.glitch-wrapper::after {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.12) 0 1px,
        rgba(255, 255, 255, 0) 1px 4px
    );
    opacity: 0.08;
    pointer-events: none;
    mix-blend-mode: soft-light;
    z-index: 5;
}

.glitch {
    --glitch-shift-x: 0px;
    --glitch-shift-y: 0px;
    --glitch-skew: 0deg;
    --slice-a-top: 16%;
    --slice-a-bottom: 58%;
    --slice-b-top: 68%;
    --slice-b-bottom: 8%;
    --noise-top: 28%;
    --noise-bottom: 26%;
    --noise-shift-x: 0px;
    --noise-shift-y: 0px;
    --noise-skew: 0deg;
    --noise-opacity: 0;
    position: relative;
    display: inline-block;
    color: #FFFFFF;
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    line-height: 0.95;
    text-shadow: 0 0 14px rgba(0, 200, 255, 0.12), 0 0 26px rgba(255, 255, 255, 0.1);
    z-index: 1;
}

@media (min-width: 640px) { .glitch { font-size: 3.5rem; } }
@media (min-width: 768px) { .glitch { font-size: 5rem; } }

.glitch-text {
    position: relative;
    display: block;
    z-index: 2;
    transform: translate3d(var(--glitch-shift-x), var(--glitch-shift-y), 0) skewX(var(--glitch-skew));
    filter: drop-shadow(0 0 10px rgba(0, 200, 255, 0.08));
    animation: glitch-flicker 7s steps(1, end) infinite;
    transition: transform 80ms linear, filter 80ms linear;
}

/* RGB 分离层 */
.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    pointer-events: none;
    mix-blend-mode: screen;
    opacity: 0.75;
}

.glitch::before {
    color: rgba(255, 255, 255, 0.96);
    text-shadow: -2px 0 rgba(0, 200, 255, 0.92);
    transform: translate3d(calc(var(--glitch-shift-x) - 2px), var(--glitch-shift-y), 0);
    clip-path: inset(var(--slice-a-top) 0 var(--slice-a-bottom) 0);
}

.glitch::after {
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 2px 0 rgba(255, 0, 85, 0.85);
    transform: translate3d(calc(var(--glitch-shift-x) + 2px), calc(0px - var(--glitch-shift-y)), 0);
    clip-path: inset(var(--slice-b-top) 0 var(--slice-b-bottom) 0);
}

.glitch-noise {
    position: absolute;
    inset: 0;
    display: block;
    font: inherit;
    letter-spacing: inherit;
    line-height: inherit;
    color: rgba(255, 255, 255, 0.88);
    opacity: var(--noise-opacity);
    pointer-events: none;
    mix-blend-mode: screen;
    text-shadow:
        -2px 0 rgba(0, 200, 255, 0.82),
        2px 0 rgba(255, 0, 85, 0.78),
        0 0 12px rgba(255, 255, 255, 0.2);
    clip-path: inset(var(--noise-top) 0 var(--noise-bottom) 0);
    transform: translate3d(var(--noise-shift-x), var(--noise-shift-y), 0) skewX(var(--noise-skew));
    transition: opacity 70ms linear, transform 70ms linear;
    z-index: 4;
}

@keyframes glitch-sweep {
    0%, 78%, 100% {
        transform: translateY(-145%);
        opacity: 0;
    }
    82% {
        opacity: 0.26;
    }
    90% {
        transform: translateY(145%);
        opacity: 0.18;
    }
    92% {
        opacity: 0;
    }
}

@keyframes glitch-flicker {
    0%, 95%, 100% {
        opacity: 1;
        filter: drop-shadow(0 0 10px rgba(0, 200, 255, 0.08));
    }
    96% {
        opacity: 0.92;
        filter: drop-shadow(0 0 16px rgba(0, 200, 255, 0.18));
    }
    97% {
        opacity: 1;
    }
    98% {
        opacity: 0.88;
    }
    99% {
        opacity: 0.96;
    }
}

@media (prefers-reduced-motion: reduce) {
    .glitch-wrapper::before,
    .glitch-text {
        animation: none;
    }
}

#hero {
    --hero-offset-x: 0px;
    --hero-offset-y: 0px;
    --hero-scroll-shift: 0px;
}

.hero-ambient {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    isolation: isolate;
}

.hero-ambient::before {
    content: "";
    position: absolute;
    inset: -12%;
    background:
        radial-gradient(circle at 50% 50%, rgba(0, 200, 255, 0.08) 0%, rgba(0, 200, 255, 0.03) 24%, transparent 58%),
        linear-gradient(125deg, rgba(255, 255, 255, 0.018) 0%, transparent 42%, rgba(0, 200, 255, 0.024) 100%);
    opacity: 0.9;
    animation: hero-breathe 12s ease-in-out infinite;
}

.hero-ambient::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(0, 200, 255, 0.045) 24%, transparent 52%, rgba(255, 255, 255, 0.03) 78%, transparent 100%);
    opacity: 0.32;
    transform: translate3d(-16%, 0, 0);
    animation: hero-sweep 16s linear infinite;
}

.hero-ambient-grid {
    position: absolute;
    inset: 10% 8%;
    border: 1px solid rgba(45, 59, 72, 0.24);
    clip-path: polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px);
    background-image:
        linear-gradient(rgba(0, 200, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 200, 255, 0.02) 1px, transparent 1px);
    background-size: 90px 90px;
    opacity: 0.22;
}

.hero-console-frame {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(92vw, 980px);
    height: clamp(360px, 54vw, 560px);
    transform: translate(-50%, -50%);
    clip-path: polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px);
    border: 1px solid rgba(45, 59, 72, 0.52);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.024) 0%, rgba(255, 255, 255, 0) 24%, rgba(0, 200, 255, 0.02) 100%),
        radial-gradient(circle at 50% 42%, rgba(0, 200, 255, 0.1) 0%, rgba(0, 200, 255, 0.03) 28%, transparent 68%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02), 0 0 54px rgba(0, 200, 255, 0.04);
    opacity: 0.58;
}

.hero-console-frame::before {
    content: "";
    position: absolute;
    inset: 18px 28px;
    border-top: 1px solid rgba(0, 200, 255, 0.12);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.hero-console-frame::after {
    content: "";
    position: absolute;
    left: 24px;
    right: 24px;
    top: 0;
    height: 20%;
    background: linear-gradient(180deg, rgba(0, 200, 255, 0.1), rgba(0, 200, 255, 0));
    opacity: 0;
    transform: translateY(-100%);
    animation: hero-frame-scan 9s linear infinite;
}

.hero-orbits {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(72vw, 640px);
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    opacity: 0.88;
    pointer-events: none;
}

.hero-orbit {
    position: absolute;
    inset: 0;
}

.hero-orbit svg {
    width: 100%;
    height: 100%;
    overflow: visible;
    display: block;
}

.hero-orbit circle {
    fill: none;
    vector-effect: non-scaling-stroke;
}

.hero-orbit-solid {
    animation: hero-rotate 34s linear infinite;
    transform-origin: 50% 50%;
}

.hero-orbit-solid .primary-ring {
    stroke: rgba(45, 59, 72, 0.62);
    stroke-width: 1.15;
}

.hero-orbit-solid .secondary-ring {
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 0.48;
}

.hero-orbit-dashed {
    inset: 12%;
    filter: drop-shadow(0 0 18px rgba(0, 200, 255, 0.08));
}

.hero-orbit-dashed .main-dash {
    stroke: rgba(0, 200, 255, 0.36);
    stroke-width: 1.45;
    stroke-linecap: round;
    stroke-dasharray: 14 18;
    animation: hero-dash-loop 12s linear infinite;
}

.hero-orbit-dashed .ghost-dash {
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 0.7;
    stroke-linecap: round;
    stroke-dasharray: 8 24;
    animation: hero-dash-loop-reverse 18s linear infinite;
}

.hero-orbit-halo {
    inset: 24%;
    opacity: 0.72;
}

.hero-orbit-halo circle {
    stroke: rgba(100, 181, 246, 0.22);
    stroke-width: 0.82;
    stroke-dasharray: 3 9;
    stroke-linecap: round;
    animation: hero-halo-loop 24s linear infinite;
}

.hero-orbit-nodes {
    position: absolute;
    inset: 0;
    animation: hero-rotate-reverse 28s linear infinite;
    transform-origin: 50% 50%;
}

.hero-orbit-node {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    border: 1px solid rgba(0, 200, 255, 0.28);
    background: rgba(13, 16, 19, 0.9);
    box-shadow: 0 0 12px rgba(0, 200, 255, 0.15), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    animation: hero-node-pulse 5.6s ease-in-out infinite;
}

.hero-orbit-node::before {
    content: "";
    position: absolute;
    inset: 2px;
    border-radius: inherit;
    background: rgba(255, 255, 255, 0.72);
    opacity: 0.72;
}

.hero-orbit-node-a {
    top: 10.6%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.hero-orbit-node-b {
    top: 50%;
    right: 10.6%;
    transform: translate(50%, -50%);
    animation-delay: -1.9s;
}

.hero-orbit-node-c {
    bottom: 10.6%;
    left: 50%;
    transform: translate(-50%, 50%);
    animation-delay: -3.1s;
}

.hero-parallax {
    position: absolute;
    will-change: transform;
}

.hero-depth-soft {
    transform: translate3d(calc(var(--hero-offset-x, 0px) * 0.18), calc(var(--hero-offset-y, 0px) * 0.16 + var(--hero-scroll-shift, 0px) * 0.1), 0);
}

.hero-depth-mid {
    transform: translate3d(calc(var(--hero-offset-x, 0px) * 0.32), calc(var(--hero-offset-y, 0px) * 0.24 + var(--hero-scroll-shift, 0px) * 0.18), 0);
}

.hero-depth-strong {
    transform: translate3d(calc(var(--hero-offset-x, 0px) * 0.48), calc(var(--hero-offset-y, 0px) * 0.34 + var(--hero-scroll-shift, 0px) * 0.24), 0);
}

.hero-atmosphere {
    width: clamp(220px, 26vw, 420px);
    height: clamp(220px, 26vw, 420px);
    opacity: 0.44;
}

.hero-atmosphere-left {
    left: -5%;
    top: 10%;
}

.hero-atmosphere-right {
    right: -7%;
    bottom: 8%;
}

.hero-atmosphere-core {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.14) 0%, rgba(100, 181, 246, 0.14) 14%, rgba(0, 200, 255, 0.12) 24%, rgba(0, 200, 255, 0.03) 52%, transparent 72%);
    filter: blur(8px);
    animation: hero-drift 14s ease-in-out infinite;
}

.hero-atmosphere-right .hero-atmosphere-core {
    animation-duration: 18s;
    animation-delay: -6s;
}

.hero-wire {
    width: min(28vw, 340px);
    height: 20px;
    opacity: 0.74;
}

.hero-wire-left {
    left: clamp(18px, 4vw, 72px);
    top: clamp(136px, 24vh, 240px);
}

.hero-wire-right {
    right: clamp(18px, 4vw, 72px);
    bottom: clamp(116px, 20vh, 220px);
}

.hero-wire-core {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 200, 255, 0), rgba(0, 200, 255, 0.38) 18%, rgba(255, 255, 255, 0.32) 48%, rgba(0, 200, 255, 0.14) 72%, rgba(0, 200, 255, 0));
    background-size: 200% 100%;
    animation: hero-wire-flow 7s linear infinite;
}

.hero-wire-core::before {
    content: "";
    position: absolute;
    inset: 5px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(0, 200, 255, 0.08);
    opacity: 0.8;
}

.hero-wire-core::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 0;
    width: 11px;
    height: 11px;
    border: 1px solid rgba(0, 200, 255, 0.35);
    border-radius: 999px;
    background: rgba(13, 16, 19, 0.82);
    box-shadow: 0 0 12px rgba(0, 200, 255, 0.18), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    transform: translate(40%, -50%);
    animation: hero-node-pulse 4.6s ease-in-out infinite;
}

.hero-wire-right .hero-wire-core {
    transform: scaleX(-1);
    transform-origin: 50% 50%;
}

.hero-satellite {
    width: clamp(92px, 11vw, 140px);
    height: clamp(92px, 11vw, 140px);
    opacity: 0.5;
}

.hero-satellite-top {
    right: clamp(94px, 14vw, 180px);
    top: clamp(88px, 16vh, 150px);
}

.hero-satellite-bottom {
    left: clamp(86px, 12vw, 170px);
    bottom: clamp(76px, 14vh, 140px);
}

.hero-satellite-core {
    position: absolute;
    inset: 0;
    border: 1px solid rgba(45, 59, 72, 0.6);
    border-radius: 999px;
    background: radial-gradient(circle, rgba(0, 200, 255, 0.08), transparent 62%);
    animation: hero-rotate 26s linear infinite;
}

.hero-satellite-core::before {
    content: "";
    position: absolute;
    inset: 16%;
    border: 1px dashed rgba(0, 200, 255, 0.22);
    border-radius: 999px;
    animation: hero-rotate 16s linear infinite reverse;
}

.hero-satellite-core::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.72);
    border-radius: 999px;
    box-shadow: 0 0 0 6px rgba(0, 200, 255, 0.08), 0 0 16px rgba(0, 200, 255, 0.18);
    transform: translate(-50%, -50%);
    animation: hero-node-pulse 5.4s ease-in-out infinite;
}

.hero-bracket {
    width: clamp(96px, 11vw, 144px);
    height: clamp(96px, 11vw, 144px);
    opacity: 0.46;
}

.hero-bracket-left {
    left: clamp(24px, 3vw, 52px);
    bottom: clamp(120px, 18vh, 180px);
}

.hero-bracket-right {
    right: clamp(24px, 3vw, 52px);
    top: clamp(110px, 18vh, 170px);
}

.hero-bracket-core {
    position: absolute;
    inset: 0;
    animation: hero-breathe 7.6s ease-in-out infinite;
}

.hero-bracket-core::before,
.hero-bracket-core::after {
    content: "";
    position: absolute;
    border-color: rgba(0, 200, 255, 0.2);
    border-style: solid;
}

.hero-bracket-core::before {
    inset: 0 58% 58% 0;
    border-width: 1px 0 0 1px;
}

.hero-bracket-core::after {
    inset: 42% 0 0 42%;
    border-width: 0 1px 1px 0;
}

.hero-bracket-right .hero-bracket-core {
    transform: rotate(180deg);
    animation-duration: 9s;
}

.title-field {
    position: relative;
    display: inline-grid;
    place-items: center;
    isolation: isolate;
    padding: clamp(0.6rem, 2vw, 1.35rem) clamp(0.7rem, 2.8vw, 2rem);
}

.title-field-aura,
.title-field-frame {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.title-field-aura::before {
    content: "";
    position: absolute;
    inset: 12% -4%;
    border-radius: 999px;
    background: radial-gradient(circle at 50% 50%, rgba(0, 200, 255, 0.22) 0%, rgba(0, 200, 255, 0.08) 24%, transparent 66%);
    filter: blur(18px);
    opacity: 0.72;
    transform: translate3d(calc(var(--hero-offset-x, 0px) * 0.16), calc(var(--hero-offset-y, 0px) * 0.14 + var(--hero-scroll-shift, 0px) * 0.05), 0);
    animation: title-aura-breathe 10s ease-in-out infinite;
}

.title-field-aura::after {
    content: "";
    position: absolute;
    inset: 18% 6%;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.05) 20%, rgba(0, 200, 255, 0.18) 50%, rgba(255, 255, 255, 0.05) 80%, transparent 100%);
    opacity: 0.26;
    transform: translate3d(-18%, 0, 0);
    animation: title-sheen 12s linear infinite;
}

.title-field-frame::before,
.title-field-frame::after {
    content: "";
    position: absolute;
    inset: 6% 4%;
    border: 1px solid rgba(45, 59, 72, 0.36);
    clip-path: polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px);
    opacity: 0.26;
    animation: title-frame-pulse 8s ease-in-out infinite;
}

.title-field-frame::after {
    inset: 0;
    border-color: rgba(0, 200, 255, 0.18);
    opacity: 0.18;
    animation-delay: -3.4s;
}

.glitch-wrapper {
    z-index: 2;
}

.glitch {
    animation: title-shadow-breathe 9s ease-in-out infinite;
}

.glitch-text::before {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    color: transparent;
    background: linear-gradient(92deg, transparent 0%, rgba(255, 255, 255, 0) 32%, rgba(255, 255, 255, 0.88) 48%, rgba(0, 200, 255, 0.78) 54%, rgba(255, 255, 255, 0) 70%, transparent 100%);
    background-size: 220% 100%;
    background-position: 100% 50%;
    -webkit-background-clip: text;
    background-clip: text;
    mix-blend-mode: screen;
    opacity: 0.48;
    pointer-events: none;
    animation: title-text-gloss 8.8s linear infinite;
}

.glitch-text::after {
    content: "";
    position: absolute;
    inset: -0.12em -0.16em;
    border-top: 1px solid rgba(0, 200, 255, 0.18);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    opacity: 0.16;
    transform: scaleX(0.92);
    animation: title-signal-trace 6.5s ease-in-out infinite;
}

@keyframes hero-breathe {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 0.78;
    }
}

@keyframes hero-sweep {
    0% {
        transform: translate3d(-18%, 0, 0);
    }
    100% {
        transform: translate3d(18%, 0, 0);
    }
}

@keyframes hero-frame-scan {
    0%, 72%, 100% {
        transform: translateY(-100%);
        opacity: 0;
    }
    78% {
        opacity: 0.16;
    }
    90% {
        transform: translateY(440%);
        opacity: 0.1;
    }
}

@keyframes hero-drift {
    0%, 100% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    50% {
        transform: translate3d(12px, -16px, 0) scale(1.05);
    }
}

@keyframes hero-wire-flow {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 200% 50%;
    }
}

@keyframes hero-node-pulse {
    0%, 100% {
        opacity: 0.38;
        box-shadow: 0 0 12px rgba(0, 200, 255, 0.18), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    }
    50% {
        opacity: 0.82;
        box-shadow: 0 0 18px rgba(0, 200, 255, 0.28), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    }
}

@keyframes hero-dash-loop {
    from {
        stroke-dashoffset: 0;
    }
    to {
        stroke-dashoffset: -32;
    }
}

@keyframes hero-dash-loop-reverse {
    from {
        stroke-dashoffset: 0;
    }
    to {
        stroke-dashoffset: 32;
    }
}

@keyframes hero-halo-loop {
    from {
        stroke-dashoffset: 0;
    }
    to {
        stroke-dashoffset: -12;
    }
}

@keyframes hero-rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes hero-rotate-reverse {
    0% {
        transform: rotate(360deg);
    }
    100% {
        transform: rotate(0deg);
    }
}

@keyframes title-aura-breathe {
    0%, 100% {
        opacity: 0.58;
        filter: blur(18px);
    }
    50% {
        opacity: 0.9;
        filter: blur(22px);
    }
}

@keyframes title-sheen {
    0% {
        transform: translate3d(-18%, 0, 0);
        opacity: 0;
    }
    12% {
        opacity: 0.2;
    }
    50% {
        transform: translate3d(18%, 0, 0);
        opacity: 0.32;
    }
    100% {
        transform: translate3d(42%, 0, 0);
        opacity: 0;
    }
}

@keyframes title-frame-pulse {
    0%, 100% {
        opacity: 0.16;
        transform: scale(0.995);
    }
    50% {
        opacity: 0.32;
        transform: scale(1.01);
    }
}

@keyframes title-text-gloss {
    0% {
        background-position: 130% 50%;
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    38% {
        background-position: 58% 50%;
        opacity: 0.52;
    }
    60% {
        opacity: 0.08;
    }
    100% {
        background-position: -60% 50%;
        opacity: 0;
    }
}

@keyframes title-signal-trace {
    0%, 100% {
        opacity: 0.08;
        transform: scaleX(0.92);
    }
    45% {
        opacity: 0.24;
        transform: scaleX(1);
    }
    70% {
        opacity: 0.12;
    }
}

@keyframes title-shadow-breathe {
    0%, 100% {
        text-shadow: 0 0 14px rgba(0, 200, 255, 0.12), 0 0 26px rgba(255, 255, 255, 0.1);
    }
    50% {
        text-shadow: 0 0 18px rgba(0, 200, 255, 0.2), 0 0 32px rgba(255, 255, 255, 0.14);
    }
}

.ambient-section {
    position: relative;
    overflow: hidden;
    --section-shift: 0px;
}

.ambient-section::before,
.ambient-section::after {
    content: "";
    position: absolute;
    pointer-events: none;
}

.ambient-section::before {
    inset: -8% -10%;
    background-image:
        linear-gradient(rgba(0, 200, 255, 0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 200, 255, 0.018) 1px, transparent 1px);
    background-size: 84px 84px;
    opacity: 0.16;
    animation: section-grid-loop 24s linear infinite;
}

.ambient-section::after {
    inset: 0;
    background: radial-gradient(circle at 50% 24%, rgba(0, 200, 255, 0.07) 0%, transparent 58%);
    opacity: 0.48;
    transform: translate3d(calc(var(--section-shift, 0px) * 0.16), calc(var(--section-shift, 0px) * 0.5), 0);
}

#gallery.ambient-section::before {
    opacity: 0.09;
}

#friends.ambient-section::after {
    background: radial-gradient(circle at 50% 22%, rgba(100, 181, 246, 0.08) 0%, transparent 60%);
}

.section-watermark {
    transform: translate3d(0, calc(var(--section-shift, 0px) * 0.36), 0);
    will-change: transform;
}

@keyframes section-grid-loop {
    from {
        transform: translate3d(0, 0, 0);
    }
    to {
        transform: translate3d(84px, 0, 0);
    }
}

@media (max-width: 767px) {
    .hero-orbits {
        width: min(82vw, 520px);
        opacity: 0.8;
    }

    .hero-ambient-grid {
        inset: 12% 3%;
        background-size: 72px 72px;
    }

    .hero-console-frame {
        width: calc(100% - 28px);
        height: clamp(320px, 88vw, 460px);
        opacity: 0.46;
    }

    .hero-wire {
        width: min(42vw, 220px);
        opacity: 0.56;
    }

    .hero-atmosphere {
        opacity: 0.34;
    }

    .title-field {
        padding-inline: 0.55rem;
    }

    .title-field-frame::before,
    .title-field-frame::after {
        inset: 10% 3%;
    }
}

@media (max-width: 640px) {
    .hero-orbits {
        width: min(86vw, 410px);
    }

    .hero-satellite,
    .hero-bracket {
        display: none;
    }

    .hero-orbit-node-b,
    .hero-orbit-node-c {
        display: none;
    }

    .ambient-section::before {
        background-size: 64px 64px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-ambient::before,
    .hero-ambient::after,
    .hero-console-frame::after,
    .hero-orbit-solid,
    .hero-orbit-dashed .main-dash,
    .hero-orbit-dashed .ghost-dash,
    .hero-orbit-halo circle,
    .hero-orbit-nodes,
    .hero-atmosphere-core,
    .hero-wire-core,
    .hero-wire-core::after,
    .hero-satellite-core,
    .hero-satellite-core::before,
    .hero-satellite-core::after,
    .hero-bracket-core,
    .title-field-aura::before,
    .title-field-aura::after,
    .title-field-frame::before,
    .title-field-frame::after,
    .glitch,
    .glitch-text::before,
    .glitch-text::after,
    .ambient-section::before,
    .tech-card::before,
    .micro-float,
    .micro-pulse {
        animation: none;
    }

    .hero-depth-soft,
    .hero-depth-mid,
    .hero-depth-strong,
    .ambient-section::after,
    .section-watermark {
        transform: none;
    }
}

/* --- 科技感组件 --- */
.tech-card {
    background: rgba(26, 32, 38, 0.7);
    border: 1px solid #2D3B48;
    position: relative;
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
    backdrop-filter: blur(8px);
    touch-action: manipulation;
    isolation: isolate;
    --card-glow-x: 50%;
    --card-glow-y: 50%;
    will-change: transform, box-shadow;
}
.tech-card:hover {
    border-color: #00C8FF;
    box-shadow: 0 0 15px rgba(0, 200, 255, 0.15);
    background: rgba(26, 32, 38, 0.9);
}
.tech-card:active {
    transform: scale(0.98);
}

.tech-card > * {
    position: relative;
    z-index: 1;
}

.tech-card::before,
.tech-card::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.tech-card::before {
    inset: -1px;
    padding: 1px;
    opacity: 0.16;
    background:
        repeating-linear-gradient(120deg,
            rgba(0, 200, 255, 0) 0 38px,
            rgba(0, 200, 255, 0.26) 46px 52px,
            rgba(255, 255, 255, 0.32) 52px 58px,
            rgba(0, 200, 255, 0.16) 58px 66px,
            rgba(0, 200, 255, 0) 76px 126px);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    animation: card-border-flow 10s linear infinite;
}

.tech-card::after {
    background: radial-gradient(circle at var(--card-glow-x) var(--card-glow-y), rgba(0, 200, 255, 0.16) 0%, transparent 34%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tech-card:hover::before,
.tech-card:focus-within::before {
    opacity: 0.28;
}

.tech-card:hover::after,
.tech-card:focus-within::after {
    opacity: 1;
}

@keyframes card-border-flow {
    from {
        background-position: 0 0;
    }
    to {
        background-position: 126px 0;
    }
}

/* 角落支架 */
.corner-brackets { position: absolute; inset: 0; pointer-events: none; }
.corner-brackets::before, .corner-brackets::after {
    content: ''; position: absolute; width: 10px; height: 10px;
    border: 2px solid transparent; transition: all 0.4s;
}
.corner-brackets::before { top: -1px; left: -1px; border-top-color: #2D3B48; border-left-color: #2D3B48; }
.corner-brackets::after { bottom: -1px; right: -1px; border-bottom-color: #2D3B48; border-right-color: #2D3B48; }

.tech-card:hover .corner-brackets::before {
    border-color: #00C8FF; width: 100%; height: 100%; opacity: 0.5;
}
.tech-card:hover .corner-brackets::after {
    border-color: #00C8FF; width: 100%; height: 100%; opacity: 0.5;
}

/* 滚动出现动画 */
.reveal-section {
    --reveal-x: 0px;
    --reveal-y: 30px;
    --reveal-scale: 0.985;
    --reveal-delay: 0ms;
    opacity: 0;
    transform: translate3d(var(--reveal-x), var(--reveal-y), 0) scale(var(--reveal-scale));
    filter: blur(14px);
    transition:
        opacity 0.72s cubic-bezier(0.2, 0.8, 0.2, 1),
        transform 0.85s cubic-bezier(0.2, 0.8, 0.2, 1),
        filter 0.85s cubic-bezier(0.2, 0.8, 0.2, 1);
    transition-delay: var(--reveal-delay);
    will-change: transform, opacity, filter;
}
.reveal-section.active {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0);
}

/* 霓虹按钮 */
.neon-btn {
    position: relative; overflow: hidden; transition: all 0.3s;
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
}
.neon-btn:hover { text-shadow: 0 0 8px rgba(255,255,255,0.8); box-shadow: 0 0 20px rgba(0,200,255,0.4); }
.neon-btn:active { transform: scale(0.98); }

/* 滚动条 */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #0d1013; }
::-webkit-scrollbar-thumb { background: #2D3B48; border: 1px solid #1A2026; }
::-webkit-scrollbar-thumb:hover { background: #00C8FF; }

/* 光标闪烁 */
.typing-cursor::after { content: '█'; animation: blink 0.8s steps(2, start) infinite; color: #00C8FF; margin-left: 5px;}
@keyframes blink { to { opacity: 0; } }

.micro-float {
    animation: micro-float 6.8s ease-in-out infinite;
}

.micro-pulse {
    animation: micro-pulse 5.4s ease-in-out infinite;
}

@keyframes micro-float {
    0%, 100% {
        transform: translate3d(0, 0, 0);
    }
    50% {
        transform: translate3d(0, -6px, 0);
    }
}

@keyframes micro-pulse {
    0%, 100% {
        opacity: 0.64;
        transform: translate3d(0, 0, 0);
    }
    50% {
        opacity: 1;
        transform: translate3d(2px, -2px, 0);
    }
}

/* -----------------------
   色彩块（color swatch）交互样式
   ----------------------- */
/* 基本布局：保持块状、允许键盘焦点 */
.color-swatch {
    position: relative; /* 用于伪元素定位 */
    overflow: visible;
    border-radius: 0.25rem; /* 与你的 rounded-sm 相同 */
    transition: transform 280ms cubic-bezier(.2,.9,.2,1), box-shadow 280ms ease;
    cursor: pointer;
    /* 创建自己的 stacking context 以便 ::after z-index 管理更可控 */
    isolation: isolate;
    /* 给键盘用户可聚焦 */
    outline: none;
    /* 保留一个轻微的边界以在深色背景中可见 */
    border: 1px solid rgba(255,255,255,0.03);
}

/* 发光的伪元素：使用 CSS 变量 --swatch 传入颜色 */
.color-swatch::after{
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.85);
    pointer-events: none;
    width: 260%;   /* 控制横向扩散 */
    height: 260%;  /* 控制纵向扩散 */
    border-radius: 50%;
    z-index: -1;   /* 放在颜色块后面以不遮挡块本身 */
    filter: blur(18px); /* 扩散柔和度（模糊） */
    background: radial-gradient(circle at center, var(--swatch) 0%, transparent 55%);
    opacity: 0;
    transition: opacity 320ms cubic-bezier(.2,.9,.2,1), transform 320ms cubic-bezier(.2,.9,.2,1), filter 320ms ease;
    mix-blend-mode: screen; /* 更自然地与背景融合（可选） */
}

/* hover 与键盘 focus 效果（轻微放大 + 增加发光） */
.color-swatch:hover,
.color-swatch:focus-visible {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 6px 18px rgba(0,0,0,0.45);
}
.color-swatch:hover::after,
.color-swatch:focus-visible::after {
    opacity: 0.75;               /* 发光强度（适中） */
    transform: translate(-50%, -50%) scale(1.08); /* 扩散范围的过渡 */
    filter: blur(22px);         /* 鼠标悬停时更柔和、更大范围 */
}

/* 当页面背景非常暗时，降低光晕对比，避免干扰可读性（可根据需要微调） */
@media (prefers-reduced-motion: reduce) {
    .color-swatch, .color-swatch::after { transition: none; transform: none; filter: none; }
}

/* 小屏下缩小光晕避免遮挡 */
@media (max-width: 640px) {
    .color-swatch::after { width: 200%; height: 200%; filter: blur(16px); }
    .color-swatch:hover::after { transform: translate(-50%, -50%) scale(1.03); opacity: 0.6; }
}

/* 保证相邻元素不会被发光遮挡太多（可微调） */
.color-swatch + .color-swatch { margin-left: 0.5rem; } /* 保持间距一致（如果需要） */

