:root {
    --bg-base: #ffffff;
    --bg-card: #ffffff; 
    --text-primary: #111111;  
    --text-secondary: #666666; 
    --accent-blue: #000000;
    --accent-purple: #000000;
    --accent-peach: #000000;
    
    --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 12px 24px rgba(0, 0, 0, 0.08);
    --border-glass: 1px solid rgba(0, 0, 0, 0.08);
    
    
    --font-serif: 'Lora', 'Georgia', serif;
    --font-main: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', sans-serif;
    --transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Custom Scrollbar: 加深右侧滚动胶囊，提升对比度与清晰度 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { 
    background: rgba(0, 0, 0, 0.45); 
    border-radius: 9999px; 
    transition: background-color 0.2s ease;
}
::-webkit-scrollbar-thumb:hover { background: rgba(0, 0, 0, 0.68); }
::-webkit-scrollbar-thumb:active { background: rgba(0, 0, 0, 0.85); }

* { margin: 0; padding: 0; box-sizing: border-box; }
html {
    scroll-behavior: smooth;
    overflow-y: scroll;
    scrollbar-gutter: stable;
    scrollbar-color: rgba(0, 0, 0, 0.45) transparent;
    scrollbar-width: thin;
}

html.is-loading body {
    overflow: hidden;
}


#critical-loader {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: #F8F8F8;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    contain: layout style;
    will-change: opacity;
    transform: translateZ(0);
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 0s;
}

html.is-loading #critical-loader {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

html.is-loading.is-loader-leaving #critical-loader {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 0.45s;
}

/* ============================================================
   React Bits: ThoughtLine Component (Light / Paper Theme)
   ============================================================ */
.thought-stage {
    position: relative;
    width: 480px;
    max-width: 92vw;
    height: 220px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Noto Sans SC", sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: #18181b;
    user-select: none;
    contain: layout;
    will-change: transform, opacity;
    margin-top: -88px;
    margin-left: 116px;
    transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.35s ease;
}

.thought-stage.is-settling {
    opacity: 0.9;
}

/* 思考完成后收拢居中：只移动图层，目标落点沿用原先 152×38 胶囊的位置。 */
.thought-stage.is-settled-center {
    transform: translate3d(var(--settle-x, 0px), var(--settle-y, 0px), 0);
    transform-origin: 76px 19px;
}

.thought-stage.is-settled-center .thought-collapse {
    opacity: 0;
    pointer-events: none;
}

/* 最终飞升退出动画 (纯GPU硬件加速位移与淡出，零离屏重绘) */
.thought-stage.is-flourish-exiting {
    transform: translate3d(var(--settle-x, 0px), calc(var(--settle-y, 0px) - 24px), 0) scale(0.95);
    opacity: 0;
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.thought-line-trigger {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 0.52rem;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0.3rem 0.45rem;
    border-radius: 6px;
    contain: layout style;
    transform: translateZ(0);
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}

.thought-line-trigger:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

/* 思考完成向外扩散的光晕涟漪 (自然柔光) */
.thought-complete-ripple {
    position: absolute;
    inset: -6px -14px;
    border-radius: 999px;
    pointer-events: none;
    border: 1px solid rgba(0, 0, 0, 0.12);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.06);
    opacity: 0;
    transform: scale(0.9);
}

.thought-stage.is-done-settled .thought-complete-ripple {
    animation: tl-ripple-expand 0.75s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes tl-ripple-expand {
    0% {
        opacity: 0.8;
        transform: scale(0.92);
    }
    50% {
        opacity: 0.45;
    }
    100% {
        opacity: 0;
        transform: scale(1.35);
        filter: blur(4px);
    }
}

.thought-glyph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 17px;
    height: 17px;
    color: #52525b;
    flex-shrink: 0;
    animation: tl-breath 1.6s ease-in-out infinite alternate;
}

.thought-glyph svg {
    width: 100%;
    height: 100%;
}

@keyframes tl-breath {
    0% {
        transform: scale(0.88);
        opacity: 0.7;
    }
    100% {
        transform: scale(1.12);
        opacity: 1;
    }
}

/* 完成时星星轻弹 (纯净自然光) */
.thought-stage.is-done-settled .thought-glyph {
    animation: tl-sparkle-settled 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes tl-sparkle-settled {
    0% {
        transform: scale(1) rotate(0deg);
        color: #52525b;
    }
    40% {
        transform: scale(1.35) rotate(45deg);
        filter: drop-shadow(0 0 6px rgba(0, 0, 0, 0.25));
        color: #09090b;
    }
    100% {
        transform: scale(1.05) rotate(90deg);
        filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.15));
        color: #18181b;
    }
}

/* 自然光斜向高光流光 */
.thought-status-copy {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.thought-label {
    display: inline-block;
    opacity: 1;
    transition: opacity 0.28s ease;
    font-weight: 550;
    letter-spacing: -0.01em;
    contain: layout style;
    will-change: background-position;
    transform: translateZ(0);
    backface-visibility: hidden;
    background: linear-gradient(
        105deg,
        #18181b 0%,
        #18181b 36%,
        #82828c 47%,
        #ffffff 52%,
        #82828c 57%,
        #18181b 68%,
        #18181b 100%
    );
    background-size: 200% 100%;
    background-repeat: repeat-x;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: tl-shimmer 2.6s linear infinite;
    white-space: nowrap;
}

.thought-stage.is-result-revealed .thought-label {
    animation: none;
    opacity: 0;
    -webkit-text-fill-color: #18181b;
    color: #18181b;
}

.thought-result-label {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    color: #18181b;
    font-weight: 550;
    letter-spacing: -0.01em;
    white-space: nowrap;
    pointer-events: none;
    transition: opacity 0.28s ease;
}

.thought-stage.is-result-revealed .thought-result-label {
    opacity: 1;
}

@keyframes tl-shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

.thought-timer {
    color: #71717a;
    opacity: 1;
    transition: opacity 0.28s ease;
    font-size: 14.5px;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
    min-width: 38px;
    display: inline-block;
    text-align: right;
    white-space: nowrap;
    height: 1.5em;
    line-height: 1.5;
    overflow: hidden;
    vertical-align: middle;
}

.thought-timer-track {
    display: block;
    will-change: transform;
    animation: tl-timer-count 3.8s steps(38, end) forwards;
}

.thought-timer-frame {
    display: block;
    height: 24px;
    line-height: 1.5em;
}

/* The compositor selects an already-painted number every 100ms. No DOM text
   writes or main-thread timers are needed while WebGL resources prepare. */
@keyframes tl-timer-count {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(0, calc(-100% + 24px), 0); }
}

.thought-stage.is-result-revealed .thought-timer {
    opacity: 0;
}

.thought-chevron {
    display: none !important;
}

.thought-collapse {
    overflow: hidden;
    will-change: transform, opacity;
    transition: opacity 0.35s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 200px;
    opacity: 1;
    width: 100%;
}

.thought-stage.is-collapsed .thought-collapse {
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
}

.thought-stage.is-steps-hidden .thought-collapse {
    visibility: hidden;
    opacity: 0;
    transition: none;
    pointer-events: none;
}

.thought-steps-list {
    display: flex;
    flex-direction: column;
    padding-top: 0.65rem;
    padding-left: 1.65rem;
}

/* 步骤展开动效：位移滑入、柔和显现与轻微虚化 */
.thought-step-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 14px;
    line-height: 1.4;
    height: 28px;
    margin-bottom: 0.35rem;
    overflow: hidden;
    will-change: transform, opacity, filter;
    animation: tl-step-silky 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes tl-step-silky {
    0% {
        opacity: 0;
        transform: translateY(-6px) scale(0.98);
        filter: blur(3px);
    }
    60% {
        opacity: 0.85;
        filter: blur(0.5px);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

.thought-step-item .step-bullet {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.thought-step-item.is-active .step-bullet::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #18181b;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.35);
}

.thought-step-item.is-active .step-text {
    color: #09090b;
    font-weight: 500;
}

.thought-step-item.is-done .step-bullet {
    color: #a1a1aa;
}

.thought-step-item.is-done .step-bullet svg {
    width: 13px;
    height: 13px;
    animation: tl-check-pop 0.32s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes tl-check-pop {
    0% {
        transform: scale(0.4) rotate(-15deg);
        opacity: 0;
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.thought-step-item.is-done .step-text {
    color: #62626b;
    font-weight: 400;
}

.thought-step-item .step-text {
    font-family: var(--font-main);
    letter-spacing: .01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.3s ease, font-weight 0.3s ease;
}

@media (prefers-reduced-motion: reduce) {
    .loader-ring {
        animation: none;
        border-color: rgba(43, 41, 39, 0.5);
    }

    #critical-loader,
    html.is-loader-leaving #critical-loader {
        transition-duration: 0.01ms;
    }
}

@media (max-width: 600px) {
    .thought-stage {
        margin-left: 0;
    }
}

body {
    position: relative;
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
    opacity: 1;
}

/* Section Transition Styles */
.section-transition {
    opacity: 0.2;
    transform: scale(0.95) translateY(50px);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.section-transition.in-view {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* 离屏内容跳过无效重绘与排版（彻底解决长网页全屏重绘卡顿） */

#hero,
#hero.section-transition,
#hero .hero-container,
#hero .hero-content,
#hero .reveal-up,
#hero .delay-1,
#hero .delay-2,
#hero .delay-3,
#hero .delay-4,
#hero .delay-5 {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
}

.hero-badge-3d {
    contain: strict;
    will-change: transform;
    transform: translate3d(0, 0, 0);
    opacity: 1 !important;
    backface-visibility: hidden;
}

#hero-badge-frame {
    contain: strict;
    will-change: transform;
}


html.nav-landing-in-progress .section-transition,
html.nav-landing-in-progress .reveal-up,
html.nav-landing-in-progress .reveal-fade,
html.nav-landing-in-progress .fade-only {
    transition-duration: 0.01ms !important;
}

/* Background: 全局固定视口背景，不随滚动位移 */
.ambient-background {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    overflow: hidden;
    background-color: var(--bg-base);
    pointer-events: none;
}

/* React Bits 1:1 Threads Background Animation: 视口完全铺满并自然居中流动 */
.threads-container {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.threads-canvas {
    display: block;
    width: 100%;
    height: 100%;
    pointer-events: none;
    will-change: filter, opacity;
    transform: translateZ(0);
}
.gradient-blob { display: none;  position: absolute; filter: blur(120px); opacity: 0.6; animation: blobFloat 25s infinite ease-in-out; }
.blob-blue { animation-duration: 25s; animation-direction: alternate;  top: -10%; left: 10%; width: 60vw; height: 60vw; background: var(--accent-blue); animation-delay: 0s; }
.blob-purple { animation-duration: 35s; animation-direction: alternate-reverse;  bottom: -10%; right: 10%; width: 50vw; height: 50vw; background: var(--accent-purple); animation-delay: -5s; }
.blob-peach { animation-duration: 45s; animation-direction: alternate;  top: 40%; left: 40%; width: 40vw; height: 40vw; background: var(--accent-peach); animation-delay: -10s; }
.glass-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: -1; background: transparent; }
.glass-overlay::after { content: ''; position: absolute; inset: 0; /* canvas grid is used instead */ background-size: 24px 24px; pointer-events: none; mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 30%, rgba(0,0,0,0) 100%); -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 30%, rgba(0,0,0,0) 100%); }

.hero-badge-3d .hero-badge-fallback {
    position: absolute;
    right: 10vw;
    top: calc(54vh + 25px);
    display: none;
    width: clamp(220px, 20vw, 320px);
    transform: translateY(-50%);
    pointer-events: none;
    text-align: center;
}

.hero-badge-3d .fallback-badge-note {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    padding: 0.55rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 999px;
    background: rgba(246, 248, 252, 0.78);
    box-shadow: 0 12px 30px rgba(18, 31, 58, 0.12);
    color: #1a2b4c;
    font-size: clamp(0.72rem, 1.25vw, 0.9rem);
    font-weight: 600;
    line-height: 1.45;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.hero-badge-3d .fallback-badge-img {
    width: 100%;
    display: block;
    height: auto;
    filter: drop-shadow(0 24px 60px rgba(18, 31, 58, 0.26));
}

.hero-badge-3d.badge-fallback-active iframe {
    opacity: 0;
    visibility: hidden;
}

.hero-badge-3d.badge-fallback-active .hero-badge-fallback {
    display: block;
}

.hero-badge-3d.badge-booting .fallback-badge-note {
    display: none;
}

@keyframes blobFloat {
    0% { transform: translate(0%, 0%) scale(1) rotate(0deg); border-radius: 45% 55% 65% 35% / 45% 50% 60% 50%; }
    33% { transform: translate(8%, -6%) scale(1.05) rotate(120deg); border-radius: 55% 45% 40% 60% / 55% 40% 60% 45%; }
    66% { transform: translate(-6%, 8%) scale(0.95) rotate(240deg); border-radius: 40% 60% 55% 45% / 50% 65% 45% 55%; }
    100% { transform: translate(0%, 0%) scale(1) rotate(360deg); border-radius: 45% 55% 65% 35% / 45% 50% 60% 50%; }
}

/* Layout */
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.page-wrapper { min-height: 100vh; display: flex; flex-direction: column; }
.main-content { flex: 1; padding-bottom: 5rem; }

/* Keep the first reveal's paint work inside the viewport. The offscreen
   sections retain an estimated height until Chrome renders them on scroll. */
.main-content > section:not(#hero) { content-visibility: auto; }
#projects { contain-intrinsic-size: auto 740px; }
#ai-practice { contain-intrinsic-size: auto 1300px; }
#software-stack { contain-intrinsic-size: auto 419px; }
#contact { contain-intrinsic-size: auto 406px; }
@media (min-width: 1600px) and (max-width: 1899px) {
    #ai-practice { contain-intrinsic-size: auto 1050px; }
}
@media (max-width: 1599px), (min-width: 2001px) {
    .main-content > section:not(#hero) { content-visibility: visible; }
}
.section-title { font-size: 3rem; font-weight: 800; margin-bottom: 5rem; text-align: center; letter-spacing: -0.02em; }
.page-header { text-align: center; margin-bottom: 5rem; }
.page-subtitle { font-size: 1.2rem; color: var(--text-secondary); max-width: 600px; margin: 1rem auto 0; }
.section-padding { padding: 10rem 0; }

/* Buttons */
.btn { display: inline-block; padding: 1rem 2rem; border-radius: 50px; font-weight: 500; text-decoration: none; transition: var(--transition); cursor: pointer; }
.btn-primary { background: var(--text-primary); color: #fff; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); }
.btn-primary:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15); background: #000; }
.btn-secondary { background: rgba(255, 255, 255, 0.5); color: var(--text-primary); border: var(--border-glass); backdrop-filter: blur(10px); }
.btn-secondary:hover { background: #fff; transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.btn-large { padding: 1.2rem 3rem; font-size: 1.1rem; }

/* Navigation: 初始平态无缝融合背景，滚动后丝滑浮现 3D 水晶玻璃条 */
.navbar {
    position: fixed;
    top: 1.75rem;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1040px;
    z-index: 10000;
    padding: 0.74rem 1.85rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    
    /* 核心参数与变量 (React Bits 1:1) */
    --glass-frost: 0.03;
    --glass-saturation: 1.2;
    --filter-id: url(#navbar-glass-filter);
    
    /* 初始平态与背景完全融为一体，零边框、零阴影、零背景 */
    background: transparent;
    border: 1px solid transparent;
    box-shadow: none;
    
    /* 线性且丝滑的过渡动画，杜绝变速突兀与小字松动漂移感 */
    transition: top 0.25s linear,
                max-width 0.25s linear,
                width 0.25s linear,
                padding 0.25s linear,
                border-color 0.25s linear,
                box-shadow 0.25s linear;
}

/* 3D 水晶柱体玻璃层：承载透镜折射、弧面光泽与双刃倒角微光，通过透明度硬件加速丝滑淡入 */
.navbar::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    
    /* 极致透光 3D 水晶柱体：弧面天光聚光 + 垂直柱体厚度透光渐变 */
    background: 
        linear-gradient(180deg, rgba(255, 255, 255, 0.65) 0%, rgba(255, 255, 255, 0.18) 25%, rgba(255, 255, 255, 0) 50%),
        radial-gradient(120% 100% at 50% 0%, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0) 70%),
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.32) 0%,
            rgba(255, 255, 255, 0.12) 25%,
            rgba(255, 255, 255, 0.06) 50%,
            rgba(255, 255, 255, 0.10) 75%,
            rgba(255, 255, 255, 0.26) 100%
        );
    backdrop-filter: var(--filter-id) blur(6px) saturate(1.2);
    -webkit-backdrop-filter: blur(6px) saturate(1.2);
    
    border: 1px solid rgba(255, 255, 255, 0.65);
    box-shadow: 
        /* 1. 顶部第一道微棱锐利晶莹刃线 (极高亮倒角反射) */
        inset 0 1.5px 0.5px 0 rgba(255, 255, 255, 0.95),
        /* 2. 顶部第二道 3D 圆弧倒角立体光 (向下扩散形成弧面凸起厚度) */
        inset 0 4px 6px -1px rgba(255, 255, 255, 0.45),
        /* 3. 底部边缘折射亮棱 */
        inset 0 -1.5px 0.5px 0 rgba(255, 255, 255, 0.65),
        /* 4. 底部焦散汇聚立体反光 */
        inset 0 -4px 6px -1px rgba(255, 255, 255, 0.30),
        /* 5. 全包围晶莹折射壳光 */
        inset 0 0 0 1px rgba(255, 255, 255, 0.25);
    
    transition: opacity 0.25s linear;
    will-change: opacity;
}

.glass-surface__filter {
    width: 100%;
    height: 100%;
    pointer-events: none;
    position: absolute;
    inset: 0;
    opacity: 0;
    z-index: -1;
}

/* 滚动激活态：收紧尺寸，浮现 3D 水晶玻璃胶囊条 */
.navbar.scrolled {
    top: 1rem;
    width: 85%;
    max-width: 820px;
    padding: 0.54rem 1.6rem;
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.03),
        0 10px 30px rgba(0, 0, 0, 0.04);
}

.navbar.scrolled::before {
    opacity: 1;
}

.nav-content { 
    position: relative;
    z-index: 1;
    width: 100%; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}
.logo { 
    font-family: var(--font-serif); 
    font-size: 1.58rem; 
    font-weight: 600; 
    color: var(--text-primary); 
    text-decoration: none; 
    letter-spacing: -0.5px; 
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}
.logo:hover {
    transform: scale(1.02);
    opacity: 0.85;
}
.logo:active {
    transform: scale(0.96);
    transition-duration: 0.08s;
}

.nav-links { 
    display: flex; 
    align-items: center;
    gap: 0.65rem; 
    list-style: none; 
}

.nav-links li {
    display: flex;
    align-items: center;
}

/* 导航项基础样式：无背景胶囊束缚，平滑文字过渡 */
.nav-links a.nav-item { 
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.44rem 0.95rem;
    border-radius: 9999px;
    color: var(--text-secondary); 
    text-decoration: none; 
    font-size: 0.93rem; 
    font-weight: 500; 
    letter-spacing: 0.01em;
    background-color: transparent;
    box-shadow: inset 0 0 0 1px transparent;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transform: scale(1);
    transform-origin: center center;
    will-change: transform, color;
    /* 出场动效（渐隐）及文字平滑缩回过渡 */
    transition: color 0.32s cubic-bezier(0.25, 1, 0.5, 1),
                font-weight 0.32s ease,
                transform 0.35s cubic-bezier(0.25, 1, 0.5, 1),
                background-color 0.38s cubic-bezier(0.25, 0.1, 0.25, 1),
                box-shadow 0.38s cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* 鼠标悬浮（Hover）交互动效：0.32s 匀速平滑渐显胶囊背景，肉眼清晰可感的渐入过程 */
.nav-links a.nav-item:hover { 
    color: #111111; 
    background-color: rgba(0, 0, 0, 0.08);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
    /* 入场动效（渐显）：改用 0.32s ease 曲线，杜绝前50ms瞬间暴冲，呈现细腻均匀渐显 */
    transition: color 0.25s ease,
                background-color 0.32s cubic-bezier(0.25, 0.1, 0.25, 1),
                box-shadow 0.32s cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* 当前导航项处于对应位置（.active 状态）：彻底移除背景胶囊，文字极致丝滑流体放大加黑 */
.nav-links a.nav-item.active { 
    color: #000000 !important; 
    font-weight: 700 !important; 
    background-color: transparent !important;
    box-shadow: none !important;
    transform: scale(1.12);
    /* 0.35s 苹果级 Quartic 减速曲线，起步平稳柔和，全过程如丝般流畅舒展 */
    transition: color 0.32s cubic-bezier(0.25, 1, 0.5, 1),
                font-weight 0.32s ease,
                transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

.nav-links a.nav-item.active:hover {
    background-color: transparent !important;
    box-shadow: none !important;
    color: #000000 !important;
}

.btn-nav-download { 
    background: #000; 
    color: #fff; 
    padding: 0.58rem 1.5rem; 
    border-radius: 50px; 
    text-decoration: none; 
    font-size: 0.9rem; 
    font-weight: 600; 
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s; 
}
.btn-nav-download:hover { 
    transform: scale(1.05); 
    background: #222; 
}
.btn-nav-download:active {
    transform: scale(0.95);
    background: #111;
    transition-duration: 0.08s;
}

/* ==========================================================================
   GradualBlur Component (React Bits 1:1 Implementation)
   ========================================================================== */
.gradual-blur {
    isolation: isolate;
    pointer-events: none;
    user-select: none;
}

.gradual-blur-page {
    position: fixed !important;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 900;
    pointer-events: none;
}

.gradual-blur-bottom {
    bottom: 0;
    height: 4.5rem;
}

.gradual-blur-inner {
    position: relative;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.gradual-blur-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

@supports not (backdrop-filter: blur(1px)) {
    .gradual-blur-layer {
        background: rgba(0, 0, 0, 0.05);
    }
}

/* Home Hero */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.45rem 1.25rem;
    background: #18181b;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 9999px;
    font-size: 0.88rem;
    font-weight: 500;
    margin-bottom: 2rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.08);
    letter-spacing: 0.04em;
}
.pulse-dot { width: 6px; height: 6px; background-color: #ffffff; border-radius: 50%; box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7); animation: pulseDot 2s infinite; }
@keyframes pulseDot { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7); } 70% { box-shadow: 0 0 0 6px rgba(255, 255, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); } }

.hero-container {
    width: 100%;
}

/* Anchor each transparent WebGL stage to the copy it accompanies. Its box is
   larger than the visible 3D solid because the embed camera has empty space. */
#hero { position: relative; }
#hero .hero-container { padding-left: clamp(2rem, calc(604px - 30vw), 12rem); }
.hero-badge-anchor,
.hero-overview-anchor,
.hero-title-firstline { position: relative; width: max-content; max-width: 100%; }
.hero-title-firstline { display: inline-block; }
.hero-logo {
    position: absolute;
    opacity: 0;
    transform: translate3d(0, calc(100vh + 350px), 0) rotate(-8deg);
    transition: transform 1.05s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
    transition-delay: var(--hero-logo-delay, 0s);
    will-change: transform, opacity;
    pointer-events: none;
}
.hero-logo.is-arrived { opacity: 1; transform: translate3d(0, 0, 0) rotate(0deg); }
.hero-logo::before { content: ''; position: absolute; inset: 12% 16%; border-radius: 50%; filter: blur(12px); pointer-events: none; }
.hero-logo--trae::before { background: radial-gradient(ellipse, rgba(70, 78, 90, 0.18) 0%, rgba(115, 124, 140, 0.085) 38%, transparent 72%); }
.hero-logo--antigravity::before { background: radial-gradient(ellipse at 48% 28%, rgba(255, 231, 166, 0.18), transparent 52%), radial-gradient(ellipse at 38% 48%, rgba(147, 237, 234, 0.165), transparent 58%), radial-gradient(ellipse at 60% 68%, rgba(145, 193, 255, 0.18), transparent 65%), radial-gradient(ellipse at 67% 35%, rgba(255, 192, 220, 0.09), transparent 50%); }
.hero-logo--codex::before { inset: 16% 24%; background: radial-gradient(ellipse at 40% 32%, rgba(168, 148, 255, 0.175), transparent 60%), radial-gradient(ellipse at 60% 65%, rgba(78, 67, 255, 0.161), transparent 65%); }
.hero-logo iframe { position: relative; display: block; width: 100%; height: 100%; border: 0; background: transparent; pointer-events: none; }
.hero-logo--trae { width: clamp(105px, 7.8vw, 150px); aspect-ratio: 150 / 114; right: calc(100% - 28px); top: -74px; --hero-logo-delay: 0s; }
.hero-logo--antigravity { width: clamp(150px, 13.3vw, 255px); aspect-ratio: 255 / 194; left: calc(100% + clamp(4px, 2vw, 40px)); top: -142px; --hero-logo-delay: 0.12s; }
.hero-logo--codex { width: clamp(230px, 18.25vw, 350px); aspect-ratio: 350 / 266; right: calc(100% - 56px); top: -36px; --hero-logo-delay: 0.24s; }
@media (max-width: 900px) {
    #hero .hero-container { padding-left: clamp(6rem, 18vw, 11rem); }
    .hero-logo--trae { width: 102px; top: -58px; }
    .hero-logo--antigravity { width: 136px; top: -78px; }
    .hero-logo--codex { width: 175px; top: -15px; right: calc(100% - 38px); }
    .text-type { min-width: 0; }
}
@media (max-width: 1000px) {
    #hero { min-height: 1320px !important; align-items: flex-start !important; padding-top: 180px; }
    .hero-badge-3d { top: 0 !important; height: 900px !important; }
    #hero .hero-subtitle { max-width: min(30rem, 100%); }
    #hero .hero-subtitle-line2 { white-space: normal; }
}
@media (max-width: 600px) {
    #hero { min-height: 1600px !important; }
    #hero .hero-container { padding-left: 5.5rem; padding-right: 1rem; grid-template-columns: minmax(0, 1fr) !important; }
    #hero-badge-frame { transform: translateX(calc(-15.7vw - 68px)) !important; }
    .hero-logo--trae { width: 82px; top: -47px; right: calc(100% - 26px); }
    .hero-logo--antigravity { width: 94px; top: -57px; left: calc(100% + 2px); right: auto; }
    .hero-logo--codex { width: 130px; top: 0; right: calc(100% - 28px); }
}
@media (prefers-reduced-motion: reduce) {
    .hero-logo { transition-duration: 0.01ms; transition-delay: 0s; }
}
.hero-title { font-family: var(--font-serif); font-size: clamp(2.8rem, 4.5vw, 4rem); font-weight: 500; line-height: 1.25; letter-spacing: -0.02em; margin-bottom: 1.5rem; color: #000; }
.hero-title-static { display: inline-block; }
.text-type {
    display: inline-block;
    white-space: pre-wrap;
    min-height: 1.25em;
    min-width: 14.5em; /* 预留第二行最长句子的占位宽度，避免打字/删字时区域宽度变动 */
    vertical-align: bottom;
}
.text-type__content { display: inline; }
.text-type__cursor {
    margin-left: 0.15rem;
    display: inline-block;
    opacity: 1;
    color: #1e3a8a;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 300;
    line-height: 1;
    transform: translateY(-0.04em);
    animation: textTypeCursorBlink 0.75s infinite ease-in-out;
    user-select: none;
}
.text-type__cursor--hidden { display: none; }
@keyframes textTypeCursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* AI Typing Aurora Flow Trail Engine (Apple Intelligence / Gemini Inspired) */
.ai-trail-unit {
    display: inline-grid;
    grid-template-areas: "char";
    vertical-align: baseline;
    line-height: inherit;
}

.ai-trail-base,
.ai-trail-glow {
    grid-area: char;
    line-height: inherit;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
}

.ai-trail-base {
    color: inherit;
    opacity: 0; /* 打字动效激活期间，隐藏底层底字，杜绝下层黑字边缘溢出与重影 */
    transition: opacity 1.8s ease-in-out;
}

.ai-trail-glow {
    pointer-events: none;
    user-select: none;
    background-size: 240% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: aiAuroraFlow 3s ease infinite alternate;
    transition: opacity 1.8s ease-in-out, filter 1.8s ease-in-out;
    will-change: opacity, filter;
}

.ai-trail-unit.ai-trail-ai .ai-trail-glow {
    font-style: italic;
}

/* Level 1: 最新打出的字（深邃科技蓝紫 + 微润极光轻光晕，克制高级不刺眼） */
.ai-trail-1 .ai-trail-glow {
    background-image: linear-gradient(115deg, #1d4ed8 0%, #4338ca 35%, #6d28d9 70%, #0284c7 100%);
    filter: drop-shadow(0 0 3px rgba(67, 56, 202, 0.22));
}

/* Level 2: 前一个字（中度冷蓝靛青渐变，自然内敛） */
.ai-trail-2 .ai-trail-glow {
    background-image: linear-gradient(115deg, #1e40af 0%, #4f46e5 50%, #0369a1 100%);
    filter: drop-shadow(0 0 1.5px rgba(37, 99, 235, 0.12));
}

/* Level 3: 前两个字（深海墨蓝紫，与页面 AI 渐变同源，沉稳收束） */
.ai-trail-3 .ai-trail-glow {
    background-image: linear-gradient(115deg, #1e3a8a 0%, #4c1d95 60%, #1e293b 100%);
    filter: none;
}

/* 动效淡出阶段：极光彩色平滑淡出，底字同轴平滑淡入，实现无缝溶解 */
.text-type.is-trail-fading .ai-trail-glow {
    opacity: 0 !important;
    filter: none !important;
}

.text-type.is-trail-fading .ai-trail-base {
    opacity: 1 !important;
}

@keyframes aiAuroraFlow {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 100% 50%;
    }
}
@media (max-width: 768px) {
    .hero-title {
        font-size: clamp(1.85rem, 5.5vw, 2.5rem);
        line-height: 1.28;
    }
    .text-type {
        min-width: 0;
        width: 100%;
    }
}
@keyframes textShine { 0% { background-position: 0% 50%; } 100% { background-position: 200% 50%; } }
.text-gradient { font-style: italic; background: linear-gradient(135deg, #1e3a8a, #4c1d95); -webkit-background-clip: text; -webkit-text-fill-color: transparent; position: relative; display: inline-block; }
.hero-content { text-align: left; }
.hero-subtitle { font-size: clamp(1rem, 1.2vw, 1.1rem); color: #555; max-width: 960px; line-height: 1.7; margin: 0 0 3rem; font-weight: 400; letter-spacing: 0em; }
.hero-subtitle-line2 { display: inline-block; white-space: nowrap; }
@media (max-width: 860px) {
    .hero-subtitle-line2 { white-space: normal; }
}
.hero-actions { display: flex; gap: 1rem; justify-content: flex-start; align-items: center; }

.hero-overview {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 0.75rem 1.4rem;
    color: #ffffff;
    background: #18181b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 9999px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.14), 0 2px 6px rgba(0, 0, 0, 0.08);
}

.hero-overview-item {
    font-size: 0.88rem;
    font-weight: 500;
    line-height: 1.3;
    white-space: nowrap;
    color: #ffffff;
}

.hero-overview-item + .hero-overview-item {
    margin-left: 1.15rem;
    padding-left: 1.15rem;
    border-left: 1px solid rgba(255, 255, 255, 0.18);
}

@media (max-width: 600px) {
    .hero-overview {
        display: grid;
        width: min(100%, 19rem);
        padding: 0.85rem 1.1rem;
        border-radius: 20px;
    }

    .hero-overview-item + .hero-overview-item {
        margin-left: 0;
        padding-top: 0.55rem;
        padding-left: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.15);
        border-left: 0;
    }
}

/* AI Native Layout */
.ai-layout-container { display: flex; flex-direction: column; width: 100%; max-width: 1400px; margin: 0 auto; height: 100vh; padding: 8rem 4rem 4rem; position: relative; }
.main-content-column { flex: 0 0 50%; display: flex; flex-direction: column; justify-content: center; z-index: 10; padding-right: 4rem; margin-top: -10vh; }
.interactive-column { flex: 0 0 50%; position: relative; }
.rich-grid { display: flex; flex-direction: column; gap: 4rem; max-width: 1000px; margin: 0 auto; }
.rich-card { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; background: transparent; }
.rich-card.reverse { direction: rtl; }
.rich-card.reverse > * { direction: ltr; }
.rich-image { background: var(--bg-card); backdrop-filter: blur(20px); border: var(--border-glass); border-radius: 30px; padding: 4rem 2rem; display: flex; justify-content: center; align-items: center; font-size: 4rem; box-shadow: var(--shadow-soft); transition: var(--transition); transform-style: preserve-3d; perspective: 1000px; }
.rich-image:hover { box-shadow: var(--shadow-hover); }
.rich-text h3 { font-size: 2rem; margin-bottom: 1.5rem; font-weight: 700; }
.rich-text p { color: var(--text-secondary); font-size: 1.1rem; line-height: 1.8; margin-bottom: 1rem; }

/* Experience Timeline */
.timeline-container { display: flex; flex-direction: column; gap: 2rem; max-width: 900px; margin: 0 auto; }
.experience-card { background: var(--bg-card); backdrop-filter: blur(20px); border: var(--border-glass); border-radius: 24px; padding: 3rem; box-shadow: var(--shadow-soft); transition: var(--transition); }
.experience-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-5px); }
.exp-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1.5rem; }
.exp-header h3 { font-size: 1.4rem; font-weight: 700; }
.exp-title { color: var(--text-primary); font-weight: 500; font-size: 1rem; display: block; margin-top: 0.3rem; }
.exp-date { color: var(--text-secondary); font-size: 0.9rem; background: rgba(0,0,0,0.05); padding: 0.3rem 0.8rem; border-radius: 20px; }
.exp-desc { color: var(--text-secondary); font-size: 1.05rem; }

/* Skills */
.skills-wrapper { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; max-width: 800px; margin: 0 auto; }
.skill-pill { background: #fff; border: 1px solid rgba(0,0,0,0.05); padding: 1rem 2rem; border-radius: 50px; font-size: 1.1rem; font-weight: 500; box-shadow: 0 4px 15px rgba(0,0,0,0.03); transition: var(--transition); cursor: default; }
.skill-pill:hover { transform: translateY(-5px) scale(1.05); box-shadow: 0 10px 25px rgba(0,0,0,0.08); color: var(--text-primary); }

/* Contact Page */
.contact-box {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border-radius: 40px;
    padding: 4.5rem 3rem;
    text-align: center;
    max-width: 820px;
    width: 100%;
    box-shadow: 0 20px 50px rgba(26, 43, 76, 0.06), inset 0 1px 1px rgba(255, 255, 255, 1);
    border: 1px solid rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}
.contact-box:hover {
    box-shadow: 0 25px 60px rgba(26, 43, 76, 0.1), inset 0 1px 1px rgba(255, 255, 255, 1);
}
.contact-box h2 {
    font-size: 2.6rem;
    font-weight: 700;
    color: #1a2b4c;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
}
.contact-box p { color: var(--text-secondary); font-size: 1.1rem; margin-bottom: 4rem; }
.simple-contact-links { display: flex; justify-content: center; align-items: center; gap: 1.8rem; margin-top: 2.5rem; font-size: 1.15rem; font-weight: 500; }
.contact-link { color: #1a2b4c; text-decoration: none; position: relative; padding-bottom: 2px; font-weight: 600; }
.contact-link::after { content: ''; position: absolute; left: 0; bottom: 0; width: 100%; height: 1.5px; background: #3b82f6; transform: scaleX(0); transform-origin: right; transition: transform 0.3s ease; }
.contact-link:hover::after { transform: scaleX(1); transform-origin: left; }
.contact-divider { color: rgba(26, 43, 76, 0.25); font-weight: 300; }
.contact-text { color: var(--text-secondary); }

.social-footer { margin-top: 3rem; display: flex; gap: 1rem; justify-content: center; align-items: center; }
.social-footer a { color: var(--text-secondary); text-decoration: none; font-weight: 500; transition: color 0.3s ease; }
.social-footer a:hover { color: var(--text-primary); }
.dot { color: var(--text-secondary); opacity: 0.5; }

/* Footer */
footer { text-align: center; padding: 2rem 0; color: var(--text-secondary); font-size: 0.9rem; width: 100%; border-top: 1px solid rgba(0,0,0,0.05); margin-top: auto; }

/* Reveal Animations (纯垂直位移，杜绝 scale 缩放引起的左边缘水平外扩漂移) */
.reveal-up { opacity: 0; transform: translateY(20px); transform-origin: left top; transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1); }
.active.reveal-up { opacity: 1; transform: translateY(0); }
#hero .reveal-up { opacity: 0; transform: translateY(14px); transform-origin: left top; transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
#hero .active.reveal-up { opacity: 1; transform: translateY(0); }
.fade-only { opacity: 0; transition: opacity 0.8s ease-out; }
.active.fade-only { opacity: 1; }
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }
.delay-6 { transition-delay: 0.6s; }
.delay-7 { transition-delay: 0.7s; }

/* Responsive */
@media (max-width: 900px) {
    .rich-card { grid-template-columns: 1fr; gap: 2rem; }
    .rich-card.reverse { direction: ltr; }
    .rich-image { padding: 3rem 1rem; }
}
@media (max-width: 768px) {
    .nav-links { display: none; }
    .exp-header { flex-direction: column; gap: 1rem; }
    .contact-info-grid { flex-direction: column; gap: 2.5rem; }
    .contact-box { padding: 3rem 1.5rem; }
    .scroll-progress-container { display: none; }
}


/* Area 3.5 Software Stack */
.software-track {
    height: 250vh; /* gives enough scrolling room */
    position: relative;
    width: 100%;
}

.software-sticky {
    position: sticky;
    top: 25vh;
    height: 50vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.software-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    width: 100%;
}

@media (max-width: 768px) {
    .software-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

.software-btn {
    aspect-ratio: 1;
    position: relative;
    perspective: 1000px;
}

.software-btn .btn-inner {
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, #ffffff 10%, var(--theme-color-light, #f3f4f6) 90%);
    border-radius: 28px;
    border-top: 1px solid #ffffff;
    border-left: 1px solid #ffffff;
    border-right: 1px solid rgba(0,0,0,0.05);
    border-bottom: 8px solid var(--theme-color, #d1d5db);
    box-shadow: 
        inset 0 4px 6px rgba(255,255,255,1), 
        inset 0 -2px 5px rgba(0,0,0,0.05),
        0 15px 35px var(--theme-color-shadow, rgba(0,0,0,0.1));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 12%;
    gap: 0.8rem;
    color: #1a2b4c;
    transform: rotateX(25deg) translateY(60px) scale(0.85);
    opacity: 0;
    filter: blur(10px);
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease, filter 0.4s ease;
    cursor: pointer;
}

.software-btn.popped .btn-inner {
    transform: rotateX(0deg) translateY(0) scale(1);
    opacity: 1;
    filter: blur(0);
}

/* Hover state mimicking a physical key press */
.software-btn.popped:hover .btn-inner {
    transform: rotateX(0deg) translateY(4px) scale(0.97);
    border-bottom: 2px solid var(--theme-color, #d1d5db);
    box-shadow: 
        inset 0 2px 4px rgba(255,255,255,1),
        inset 0 -1px 2px rgba(0,0,0,0.05),
        0 5px 15px var(--theme-color-shadow, rgba(0,0,0,0.2));
    transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), border-bottom 0.15s ease, box-shadow 0.15s ease;
}

.software-btn .btn-icon {
    font-size: 3rem;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.05));
    transition: transform 0.3s ease;
}

.software-btn.popped:hover .btn-icon {
    transform: scale(1.1) rotate(-5deg);
}

.software-btn .btn-text {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    opacity: 0.85;
}

.software-grid-static {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1.2rem;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .software-grid-static {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
}
@media (max-width: 480px) {
    .software-grid-static {
        grid-template-columns: repeat(2, 1fr);
    }
}

.btn-icon-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    margin: 0;
    border-radius: 20px;
    filter: drop-shadow(0 8px 12px var(--theme-color-shadow, rgba(0,0,0,0.1)));
    transform: scale(var(--base-scale, 1));
    transition: transform 0.3s ease;
}
.software-btn:hover .btn-icon-img {
    transform: scale(calc(var(--base-scale, 1) * 1.1));
}

.static-btn {
    opacity: 1; /* handled by reveal-up */
    filter: none;
    transform: none;
}

.static-btn .btn-inner {
    opacity: 1;
    filter: none;
    transform: none;
}
.static-btn:hover .btn-inner {
    transform: translateY(4px) scale(0.97);
}

.reveal-fast { opacity: 0; transform: translateY(30px) scale(0.98); transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
.active.reveal-fast { opacity: 1; transform: translateY(0) scale(1); }


.main-content > section#ai-native,
#ai-native {
    content-visibility: visible;
    min-height: 0;
    margin-top: 160px !important;
    padding-top: 0 !important;
    padding-bottom: 0;
    position: relative;
    z-index: 2;
}

/* --- AI tool soft keycaps --- */
#software-stack .software-grid-static {
    --key-size: 80px;
    grid-template-columns: repeat(7, var(--key-size));
    gap: 14px;
    inline-size: max-content;
    max-inline-size: 100%;
    margin-inline: auto;
    justify-content: center;
}

#software-stack .software-btn {
    inline-size: var(--key-size);
    block-size: var(--key-size);
}

@media (min-width: 769px) and (max-width: 1024px) {
    #software-stack .software-grid-static {
        --key-size: 72px;
        gap: 12px;
    }
}

@media (max-width: 768px) {
    #software-stack .software-grid-static {
        --key-size: 72px;
        grid-template-columns: repeat(4, var(--key-size));
        gap: 12px;
    }
}

@media (max-width: 480px) {
    #software-stack .software-grid-static {
        --key-size: 68px;
        grid-template-columns: repeat(3, var(--key-size));
        gap: 10px;
    }
}

/* --- AI tool soft-plastic keycap material --- */
#software-stack .software-btn .btn-inner {
    box-sizing: border-box;
    overflow: hidden;
    cursor: default;
    padding: 9px;
    border: 1px solid rgba(255, 255, 255, 0.92);
    border-bottom: 6px solid #d8d9dc;
    border-radius: 18px;
    background: linear-gradient(145deg, #fff 0%, #f7f7f5 52%, #ececea 100%);
    box-shadow:
        inset 0 2px 2px rgba(255, 255, 255, 0.95),
        inset 0 -2px 4px rgba(105, 108, 112, 0.10),
        0 7px 13px rgba(49, 53, 58, 0.14),
        0 2px 4px rgba(49, 53, 58, 0.08);
    transform: translateY(0) scale(1);
    transition: transform 180ms ease, box-shadow 180ms ease, border-bottom-width 140ms ease;
}

#software-stack .software-btn .btn-icon-img {
    border-radius: 12px;
    filter: none;
    transform: scale(var(--base-scale, 1));
    transition: transform 180ms ease;
}

#software-stack .software-btn:hover .btn-inner {
    transform: translateY(-2px) scale(1);
    border-bottom-width: 6px;
    box-shadow:
        inset 0 2px 2px rgba(255, 255, 255, 0.98),
        inset 0 -2px 4px rgba(105, 108, 112, 0.11),
        0 10px 18px rgba(49, 53, 58, 0.17),
        0 3px 6px rgba(49, 53, 58, 0.09);
}

#software-stack .software-btn:hover .btn-icon-img {
    transform: scale(calc(var(--base-scale, 1) * 1.03));
}

@media (prefers-reduced-motion: reduce) {
    #software-stack .software-btn .btn-inner,
    #software-stack .software-btn .btn-icon-img {
        transition: none;
    }

    #software-stack .software-btn:hover .btn-inner {
        transform: none;
    }

    #software-stack .software-btn:hover .btn-icon-img {
        transform: scale(var(--base-scale, 1));
    }
}

/* --- 常用 AI 工具 - 紧凑型胶囊阵列 (Compact Capsule Grid) --- */
#software-stack .compact-ai-tools {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    max-width: 600px; /* strict width limit */
    min-height: 180px; /* 预留占位高度 */
    margin: 0 auto;
    padding: 24px;
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 32px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

/* Strict sizing and base reset for the buttons */
#software-stack .compact-ai-tools .software-btn {
    position: relative;
    z-index: 1;
    width: 64px !important; /* Strict sizing */
    height: 64px !important; /* Strict sizing */
    margin: 0 !important;
    padding: 0 !important;
    aspect-ratio: 1;
}

/* Override default reveal-up with custom pop-in */
#software-stack .compact-ai-tools .software-btn.reveal-up {
    opacity: 0;
    transform: perspective(600px) scale(0.3) translateY(40px) rotateX(50deg) rotateY(-30deg) rotateZ(-10deg);
    transition: opacity 0.6s ease-out, transform 0.9s cubic-bezier(0.34, 1.8, 0.64, 1);
}

#software-stack .compact-ai-tools .software-btn.reveal-up.active {
    opacity: 1;
    transform: perspective(600px) scale(1) translateY(0) rotateX(0deg) rotateY(0deg) rotateZ(0deg);
}

/* Enhance the glassmorphism keycaps */
#software-stack .compact-ai-tools .software-btn .btn-inner {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    overflow: hidden;
    cursor: default;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-bottom: var(--ripple-bw, 1px) solid #d8d9dc;
    border-radius: 16px;
    background: #ffffff;
    box-shadow:
        inset 0 2px 2px rgba(255, 255, 255, 0.95),
        inset 0 -2px 4px rgba(105, 108, 112, 0.10),
        0 4px 10px rgba(0, 0, 0, 0.05);
    transform: translateY(var(--ripple-y, 0)) scale(var(--ripple-scale, 1)) translateZ(0);
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
    transition: transform 0.15s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.15s ease, border-bottom-width 0.1s ease;
}

#software-stack .compact-ai-tools .software-btn:hover .btn-inner {
    box-shadow:
        inset 0 2px 2px rgba(255, 255, 255, 0.98),
        inset 0 -2px 4px rgba(105, 108, 112, 0.11),
        0 15px 25px var(--theme-color-shadow),
        0 5px 10px rgba(0, 0, 0, 0.1);
}

#software-stack .compact-ai-tools .software-btn .btn-icon-img {
    border-radius: 10px;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: none;
    transform: scale(var(--base-scale, 1)) translateZ(0);
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#software-stack .compact-ai-tools .software-btn:hover .btn-icon-img {
    transform: scale(var(--base-scale, 1));
}

@media (max-width: 768px) {
    #software-stack .compact-ai-tools .software-btn {
        width: 56px !important;
        height: 56px !important;
    }
}

#ai-native + #software-stack { margin-top: 65px !important; }

/* Copyable Elements */
.copyable {
    cursor: pointer;
}
.copyable:hover {
    color: var(--accent-blue, #0066cc);
}

/* Toast Notification */
.toast-notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 24px;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 500;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 10000;
    pointer-events: none;
    backdrop-filter: blur(10px);
}
.toast-notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
}




/* ==========================================================================
   FolderFloat Component (React Bits 1:1 Implementation - Large Scale)
   ========================================================================== */
.folder-float-wrapper {
    position: relative;
    width: 280px;
    height: 207px;
    margin: 0 auto;
    perspective: 1000px;
    transform-style: preserve-3d;
    cursor: pointer;
    user-select: none;
    transition: transform 0.4s ease;
}

.folder-float-wrapper:hover {
    transform: translateY(-3px);
}

/* Back Plate (SVG Curved Folder) */
.folder-back {
    position: absolute;
    inset: 0;
    z-index: 1;
    filter: drop-shadow(0 18px 34px rgba(85, 95, 175, 0.32));
}

.folder-back-svg {
    width: 280px;
    height: 207px;
    display: block;
}

/* Inside Paper */
.folder-paper {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 8px;
    height: 162px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    z-index: 2;
    transform: translateY(8px);
    opacity: 0;
    transition: transform 520ms cubic-bezier(0.34, 1.56, 0.64, 1), opacity 300ms ease;
}

.folder-float-wrapper.is-open .folder-paper {
    transform: translateY(-24px);
    opacity: 1;
}

/* Front Flap (3D Flip) */
.folder-front {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 172px;
    border-radius: 18px;
    background: linear-gradient(180deg, #c4c9fe 0%, #b4bbfc 100%);
    border: 1px solid rgba(255, 255, 255, 0.75);
    box-shadow: 0 14px 34px -6px rgba(78, 86, 140, 0.24), inset 0 1.5px 3px rgba(255, 255, 255, 0.9);
    z-index: 4;
    transform-origin: bottom center;
    transform: rotateX(-16deg);
    transition: transform 520ms cubic-bezier(0.34, 1.56, 0.64, 1);
    padding: 24px 22px;
    box-sizing: border-box;
    display: flex;
    align-items: flex-end;
}

.folder-float-wrapper.is-open .folder-front {
    transform: rotateX(-34deg);
}

.folder-label-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    pointer-events: none;
}

.folder-label {
    font-size: 18px;
    font-weight: 650;
    color: #20243d;
    letter-spacing: -0.015em;
    line-height: 1.2;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.folder-sublabel {
    font-size: 14px;
    font-weight: 500;
    color: #5a6288;
    opacity: 0.88;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Floating Cloud & Items */
.folder-float-cloud {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
}

.folder-float-item {
    position: absolute;
    left: 50%;
    top: 25%;
    transform-origin: center center;
    background: #ffffff;
    color: #18181b;
    padding: 10px 22px;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: 0 10px 30px -4px rgba(45, 52, 100, 0.16), 0 4px 8px -1px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.95);
    opacity: 0;
    transform: translate(-50%, 20px) scale(0.2) rotate(0deg);
    transition: opacity 320ms ease, transform 520ms cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, color 0.2s ease;
    pointer-events: none;
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Open Targets (matching Fig 2 layout - Scaled) */
.folder-float-wrapper.is-open .folder-float-item {
    opacity: 1;
    pointer-events: auto;
}

/* Item 1: "Logo feels small" (Top Left) */
.folder-float-wrapper.is-open .folder-float-item.item-logo {
    transform: translate(calc(-50% - 96px), -188px) rotate(-6deg) scale(1);
    transition-delay: 90ms;
}

/* Item 2: "Love the new hero" (Top Right) */
.folder-float-wrapper.is-open .folder-float-item.item-hero {
    transform: translate(calc(-50% + 104px), -174px) rotate(5deg) scale(1);
    transition-delay: 135ms;
}

/* Item 3: "Try a warmer palette" (Mid Left) */
.folder-float-wrapper.is-open .folder-float-item.item-palette {
    transform: translate(calc(-50% - 156px), -110px) rotate(-8deg) scale(1);
    transition-delay: 0ms;
}

/* Item 4: "Tighten the spacing" (Mid Right) */
.folder-float-wrapper.is-open .folder-float-item.item-spacing {
    transform: translate(calc(-50% + 98px), -102px) rotate(6deg) scale(1);
    transition-delay: 45ms;
}

/* Hover effect on individual floating items */
.folder-float-item:hover {
    transform: scale(1.08) !important;
    box-shadow: 0 16px 36px -4px rgba(45, 52, 100, 0.24), 0 6px 12px -2px rgba(0, 0, 0, 0.12) !important;
    color: #000000;
    z-index: 20;
}

/* Subtle Physics Drift (Idling) */
@keyframes driftTopLeft {
    0%, 100% { transform: translate(calc(-50% - 96px), -188px) rotate(-6deg) scale(1); }
    50% { transform: translate(calc(-50% - 96px), -195px) rotate(-5deg) scale(1); }
}

@keyframes driftTopRight {
    0%, 100% { transform: translate(calc(-50% + 104px), -174px) rotate(5deg) scale(1); }
    50% { transform: translate(calc(-50% + 104px), -181px) rotate(6.5deg) scale(1); }
}

@keyframes driftMidLeft {
    0%, 100% { transform: translate(calc(-50% - 156px), -110px) rotate(-8deg) scale(1); }
    50% { transform: translate(calc(-50% - 156px), -117px) rotate(-7deg) scale(1); }
}

@keyframes driftMidRight {
    0%, 100% { transform: translate(calc(-50% + 98px), -102px) rotate(6deg) scale(1); }
    50% { transform: translate(calc(-50% + 98px), -109px) rotate(5deg) scale(1); }
}

.folder-float-wrapper.is-open.has-physics .folder-float-item.item-logo:not(:hover) {
    animation: driftTopLeft 3.2s ease-in-out infinite 520ms;
}

.folder-float-wrapper.is-open.has-physics .folder-float-item.item-hero:not(:hover) {
    animation: driftTopRight 3.6s ease-in-out infinite 565ms;
}

.folder-float-wrapper.is-open.has-physics .folder-float-item.item-palette:not(:hover) {
    animation: driftMidLeft 3.0s ease-in-out infinite 480ms;
}

.folder-float-wrapper.is-open.has-physics .folder-float-item.item-spacing:not(:hover) {
    animation: driftMidRight 3.4s ease-in-out infinite 525ms;
}

/* ==========================================================================
   React Bits: CardSwap 3D Experience Showcase Component
   ========================================================================== */
.experience-swap-section {
    margin-top: clamp(4rem, 4.7vw, 5.625rem);
    padding: clamp(5rem, 8vw, 7.5rem) 0;
    position: relative;
    z-index: 2;
    overflow: hidden; /* 关键：裁剪漫出右下角的超大卡片，展现图一显示不全的沉浸式裁切 */
}


/* React Bits SplitFlapText visual language, adapted for this static page. */
.experience-flap-sign {
    position: absolute;
    top: clamp(6rem, 6.5vw, 8rem);
    right: clamp(2.5rem, 2.6vw, 3.25rem);
    z-index: 6;
    width: 300px;
    height: 5.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.experience-flap-sign.is-ready .experience-flap-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.experience-flap-label {
    color: #172338;
    font-size: 1.4rem;
    font-weight: 700;
}

.experience-flap-tiles {
    display: inline-flex;
    align-items: center;
    gap: 0.15em;
    color: #f8fafc;
    font-family: 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
    font-size: clamp(40px, 2.9vw, 54px);
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    user-select: none;
}

.experience-flap-tile {
    position: relative;
    display: block;
    width: 1.12em;
    height: 1.26em;
    overflow: hidden;
    border-radius: 0.13em;
    background: #17202e;
    box-shadow: 0 0.03em 0.06em rgba(255, 255, 255, 0.08) inset,
                0 -0.06em 0.1em rgba(0, 0, 0, 0.28) inset,
                0 0.16em 0.32em rgba(18, 28, 42, 0.18);
    perspective: 520px;
    isolation: isolate;
}

.experience-flap-tile::after {
    content: '';
    position: absolute;
    z-index: 8;
    left: 0;
    right: 0;
    top: calc(50% - 0.5px);
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.75) 22% 78%, transparent);
    box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.1);
    pointer-events: none;
}

.experience-flap-half,
.experience-flap-turn {
    position: absolute;
    left: 0;
    width: 100%;
    height: 50%;
    overflow: hidden;
    backface-visibility: hidden;
    background: #17202e;
}

.experience-flap-half--top,
.experience-flap-turn--front { top: 0; }

.experience-flap-half--bottom,
.experience-flap-turn--back {
    bottom: 0;
    background: #111926;
}

.experience-flap-char {
    position: absolute;
    left: 0;
    width: 100%;
    height: 200%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f8fafc;
    text-shadow: 0 0.08em 0.15em rgba(0, 0, 0, 0.35);
    transform: translateY(-0.045em);
}

.experience-flap-half--top .experience-flap-char,
.experience-flap-turn--front .experience-flap-char { top: 0; }

.experience-flap-half--bottom .experience-flap-char,
.experience-flap-turn--back .experience-flap-char { bottom: 0; }

.experience-flap-turn {
    z-index: 5;
    will-change: transform;
}

.experience-flap-turn--front {
    transform-origin: center bottom;
    animation: experience-flap-front 0.11s cubic-bezier(0.23, 1, 0.32, 1) both;
}

.experience-flap-turn--back {
    transform-origin: center top;
    animation: experience-flap-back 0.11s cubic-bezier(0.23, 1, 0.32, 1) both;
}

@keyframes experience-flap-front {
    from { transform: rotateX(0deg); }
    to { transform: rotateX(-90deg); }
}

@keyframes experience-flap-back {
    0%, 45% { transform: rotateX(90deg); }
    100% { transform: rotateX(0deg); }
}

@media (prefers-reduced-motion: reduce) {
    .experience-flap-turn { animation: none !important; }
}

.experience-swap-bottom-blur {
    position: absolute;
    /* Leave room for the card blur to spread left, then feather its diagonal edge. */
    --experience-blur-edge: linear-gradient(153.435deg, transparent 0px, #000 24px);
    left: max(0px, calc(100% - 1040px + 145px - 44px));
    right: 0;
    height: 1.125rem;
    z-index: 4;
}

.experience-swap-bottom-blur .gradual-blur-layer {
    /* Mask each sampling layer; an ancestor clip would isolate its backdrop. */
    mask-image: var(--blur-band-mask), var(--experience-blur-edge) !important;
    -webkit-mask-image: var(--blur-band-mask), var(--experience-blur-edge) !important;
    mask-composite: intersect;
}

@media (min-width: 1600px) {
    .experience-swap-bottom-blur {
        left: max(0px, calc(100% - 1040px + 285px - 44px));
    }
}

.experience-swap-bottom-blur::after {
    content: '';
    position: absolute;
    inset: 0;
    mask-image: var(--experience-blur-edge);
    background: linear-gradient(to bottom, transparent 0%, rgba(255, 255, 255, 0.28) 40%, rgba(255, 255, 255, 0.82) 78%, #fff 100%);
    pointer-events: none;
}

@media (max-width: 1024px) {
    .experience-swap-section { margin-top: 2rem; }
    .experience-swap-bottom-blur { display: none; }
}

#projects .container {
    max-width: 100%;
    width: 100%;
    padding-left: clamp(3rem, 6.5vw, 8rem);
    padding-right: 2rem;
    margin: 0;
}

.experience-swap-layout {
    display: grid;
    grid-template-columns: minmax(0, 920px) 1fr;
    gap: clamp(2rem, 3.5vw, 3.5rem);
    align-items: center;
    min-height: 720px;
    position: relative;
    padding-top: 1.5rem;
}

.experience-interaction-note {
    position: absolute;
    left: clamp(3rem, 6.5vw, 8rem);
    bottom: 3.5rem;
    z-index: 5;
    max-width: calc(100% - clamp(3rem, 6.5vw, 8rem) - 2rem);
    margin: 0;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    color: #000;
    font-size: 1.06rem;
    line-height: 1.7;
}

.experience-note-mark {
    flex-shrink: 0;
    font-size: 1.1em;
    font-weight: 600;
}

/* This describes the desktop cards on the right and mouse hover. */
@media (max-width: 1024px), (hover: none) and (pointer: coarse) {
    .experience-interaction-note { display: none; }
}

/* Editorial experience copy: clean minimalist typography matching website DNA */
.experience-swap-text-col {
    position: relative;
    z-index: 5;
    width: 100%;
    max-width: 100%;
}

.experience-editorial-kicker {
    display: none;
    margin-bottom: 0;
}

.experience-editorial-kicker span {
    display: none;
}

.experience-text-deck {
    display: grid;
    position: relative;
    width: 100%;
    min-height: 480px;
    margin-bottom: 0;
}

.experience-text-panel {
    position: relative;
    grid-area: 1 / 1;
    align-self: start;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.experience-text-panel.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    position: relative;
}

.experience-text-panel[data-panel-index="0"] {
    translate: 0 24px;
}

.experience-editorial-title {
    color: #0f172a;
    font-family: var(--font-main);
    font-size: clamp(2rem, 2.5vw, 2.4rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.25;
    margin: 0 0 0.65rem;
}

.experience-editorial-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.85rem;
    row-gap: 0.45rem;
    margin-bottom: 1.15rem;
    font-size: 0.96rem;
    color: #64748b;
}

.experience-editorial-meta .experience-editorial-role {
    color: #334155;
    font-weight: 600;
    background: rgba(241, 245, 249, 0.85);
    padding: 0.2rem 0.65rem;
    border-radius: 6px;
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.experience-editorial-meta .experience-editorial-date {
    white-space: nowrap;
    color: #94a3b8;
    font-variant-numeric: tabular-nums;
    font-size: 0.94rem;
}

.experience-editorial-lead {
    color: #475569;
    font-size: 1.06rem;
    line-height: 1.7;
    margin: 0 0 1.25rem;
    max-width: 900px;
}

.experience-editorial-body {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 2.75rem;
    row-gap: 1.75rem;
    border-top: none;
    padding-top: 0;
}

/* Panel 1 (智元) 与 Panel 2 (微光): 内容较少，单列竖直排列，竖直靠近文字区域中心 */
.experience-text-panel[data-panel-index="1"],
.experience-text-panel[data-panel-index="2"] {
    align-self: center;
    max-width: 680px;
}

.experience-swap-section:not(.experience-is-stacked) .experience-text-panel[data-panel-index="1"],
.experience-swap-section:not(.experience-is-stacked) .experience-text-panel[data-panel-index="2"] {
    margin-left: clamp(0px, calc((100% - 680px) / 2), 64px);
}

.experience-text-panel[data-panel-index="1"] .experience-editorial-body,
.experience-text-panel[data-panel-index="2"] .experience-editorial-body {
    display: flex;
    flex-direction: column;
    gap: 1.85rem;
}

.experience-swap-section:not(.experience-is-constrained):not(.experience-is-stacked) .experience-text-panel[data-panel-index="1"] .experience-editorial-body,
.experience-swap-section:not(.experience-is-constrained):not(.experience-is-stacked) .experience-text-panel[data-panel-index="2"] .experience-editorial-body {
    width: calc(100% + 2rem);
}

.experience-text-panel[data-panel-index="1"] .experience-editorial-body {
    padding-top: 1.25rem;
    gap: 2rem;
}

@media (min-width: 1025px) {
    .experience-text-panel[data-panel-index="1"] {
        top: -1rem;
    }
}

/* 去掉文字背景卡片，极简纯文字与段落间距 */
.experience-point-card {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transition: none;
}

.experience-point-card:hover {
    transform: none;
    box-shadow: none;
}

.experience-card-title {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 1.06rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 0.5rem;
}

.experience-card-badge {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #3b82f6;
    flex-shrink: 0;
}

.experience-card-body {
    color: #64748b;
    font-size: 1rem;
    line-height: 1.72;
    margin: 0;
}

/* Keep the dense four-part experience balanced within the reading area. */
.experience-text-panel[data-panel-index="0"] .experience-editorial-lead {
    font-size: 1rem;
    line-height: 1.8;
    max-width: none;
    margin-bottom: 1.5rem;
}

.experience-text-panel[data-panel-index="0"] .experience-editorial-body {
    grid-template-rows: auto auto;
    min-height: 0;
    column-gap: 3rem;
    row-gap: 1.5rem;
}

.experience-text-panel[data-panel-index="0"] .experience-point-card {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.experience-text-panel[data-panel-index="0"] .experience-card-title {
    font-size: 1rem;
    line-height: 1.5;
    margin: 0;
}

.experience-text-panel[data-panel-index="0"] .experience-card-body {
    font-size: 0.94rem;
    line-height: 1.8;
}

.experience-swap-nav-pills {
    display: none;
}

/* Right Column: React Bits CardSwap Component (Expanded Proportions matching media_1790142519154.png) */
.experience-swap-visual-col {
    position: relative;
    width: 100%;
    min-height: 740px;
    pointer-events: none;
}

.card-swap-stage,
.card-swap-stage.active {
    position: absolute;
    right: -145px;
    top: 375px;
    transform: none !important;
    width: 1040px;
    height: 740px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    overflow: visible;
    z-index: 3;
    pointer-events: none;
}

@media (min-width: 1600px) {
    .card-swap-stage,
    .card-swap-stage.active { right: -285px; }
}

.card-swap-container {
    position: absolute;
    right: -26px;
    bottom: 20px;
    /* Shift the whole deck equally on both axes, independently of responsive scaling. */
    translate: -28px -32px;
    transform: translate(0, 0);
    transform-origin: center right;

    perspective: 1200px;
    overflow: visible;
    width: 1040px;
    height: 680px;
    pointer-events: auto;
}

.card {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1040px;
    height: 680px;
    border-radius: 12px;
    border: 1px solid rgba(31, 41, 55, 0.12);
    background: #ffffff;

    transform-style: preserve-3d;
    will-change: auto;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    box-shadow: none;
    overflow: hidden;
    cursor: pointer;
}

/* Minimal title bar for the three experience cards. */
.card-window-bar {
    height: 52px;
    background: #ffffff;
    border-bottom: 1px solid #e9e9ee;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0 1.4rem;
    user-select: none;
    z-index: 10;
}

.card-header-icon {
    position: relative;
    display: inline-block;
    width: 30px;
    height: 30px;
    flex: none;
    overflow: hidden;
}

.card-header-icon img {
    position: absolute;
    top: 50%;
    left: 50%;
    display: block;
    max-width: none;
    height: auto;
    transform: translate(-50%, -50%);
}

.card-header-icon--ai img { width: 48px; }
.card-header-icon--robot img { width: 56px; }
.card-header-icon--reader img { width: 50px; }

.card-header-title {
    font-family: 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
    font-size: 18px;
    font-weight: 400;
    letter-spacing: 0;
    color: #101827;
    white-space: nowrap;
}

/* Card Canvas Area */
.card-canvas {
    position: relative;
    height: calc(100% - 52px);
    padding: 2.5rem 2.8rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
}

/* 经历卡片背景：按公司 / 项目对应铺满画布。 */
.card-canvas-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.card-theme--dark .card-canvas-bg {
    background: url('assets/experience-backgrounds/mengjianxing-vineyard.png') center / cover no-repeat;
}

.card-theme--indigo .card-canvas-bg {
    background: url('assets/experience-backgrounds/zhiyuan-river-valley.png') center / cover no-repeat;
}

.card-theme--purple .card-canvas-bg {
    background: url('assets/experience-backgrounds/glimmer-tuscany.png') center / cover no-repeat;
}


/* An annotated product exhibit, contained beneath the experience card's title bar. */
.card[data-card-index="0"] .experience-evidence-notes {
    position: absolute;
    inset: 0;
    z-index: 2;
    margin: 0;
    padding: 0;
    list-style: none;
    pointer-events: none;
}

.experience-evidence-notes > li {
    position: absolute;
    width: 150px;
    min-height: 74px;
    padding: 12px 10px;
    border: 1px solid rgba(255, 251, 239, .8);
    border-radius: 8px 13px 9px 15px;
    background: linear-gradient(125deg, rgba(249, 246, 234, .96), rgba(230, 237, 236, .95));
    box-shadow: 0 3px 8px rgba(31, 51, 71, .12), inset 0 0 0 2px rgba(255, 255, 255, .15);
}

.experience-evidence-notes > li::before {
    content: "";
    position: absolute;
    top: 8px;
    right: 12px;
    width: 22px;
    height: 2px;
    border-radius: 1px;
    background: rgba(103, 125, 137, .3);
}

.experience-evidence-notes .evidence-note-practice {
    top: 66px;
    left: 34px;
    width: 150px;
}

.experience-evidence-notes .evidence-note-report {
    top: 28px;
    left: 440px;
    width: 200px;
}

.experience-evidence-notes .evidence-note-research {
    top: 306px;
    left: 28px;
    width: 138px;
}

.experience-evidence-leaders {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    overflow: visible;
}

.experience-evidence-leaders path {
    fill: none;
    stroke: #f2e7cf;
    stroke-width: 2.6;
    stroke-dasharray: 5 5.5 2 5;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: url("#experience-leader-crayon");
}

.evidence-note-index {
    display: block;
    color: #677d89;
    font: italic 11px/1.2 var(--font-serif);
    letter-spacing: .1em;
    margin-bottom: 7px;
}

.experience-evidence-notes strong {
    display: block;
    color: #2c4358;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}

.card[data-card-index="0"] .experience-evidence-layout {
    position: absolute;
    top: 145px;
    left: 196px;
    z-index: 1;
    display: grid;
    grid-template-columns: 165px 328px;
    grid-template-rows: repeat(2, 174px);
    column-gap: 24px;
    row-gap: 28px;
    pointer-events: none;
}

.experience-evidence-frame {
    position: relative;
    margin: 0;
    align-self: start;
    background: transparent;
}

.experience-evidence-portrait {
    grid-row: 1 / span 2;
}

.experience-evidence-frame img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 20px;
}

.card[data-card-index="0"] .experience-evidence-frame img {
    filter: url("#experience-evidence-sharpen");
}

.card[data-card-index="0"] .experience-evidence-frame:not(.experience-evidence-portrait) {
    padding: 8px;
    border: 1px solid rgba(241, 246, 249, 0.75);
    border-radius: 20px;
    background: #dce5eb;
    box-shadow: 0 5px 14px rgba(42, 62, 85, 0.12);
}

.card[data-card-index="0"] .experience-evidence-frame:not(.experience-evidence-portrait) img {
    border-radius: 12px;
}

.card-number-glow {
    position: absolute;
    left: 55%;
    top: 48%;
    transform: translate(-50%, -50%);
    font-family: var(--font-serif);
    font-size: 18rem;
    font-weight: 900;
    line-height: 1;
    pointer-events: none;
    user-select: none;
    z-index: 1;
    opacity: 0.96;
    transition: transform 0.4s ease;
}

.card-theme--dark .card-number-glow {
    background: linear-gradient(135deg, #bfdbfe 0%, #60a5fa 35%, #2563eb 70%, #1e40af 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 55px rgba(59, 130, 246, 0.75));
}

.card-theme--indigo .card-number-glow {
    background: linear-gradient(135deg, #c7d2fe 0%, #818cf8 35%, #4f46e5 70%, #3730a3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 55px rgba(99, 102, 241, 0.75));
}

.card-theme--purple .card-number-glow {
    background: linear-gradient(135deg, #f0abfc 0%, #c084fc 35%, #9333ea 70%, #6b21a8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 60px rgba(168, 85, 247, 0.85));
}

/* Compact Frosted Glass Caption Bar */
.card-caption-bar {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    padding: 1rem 1.6rem;
    background: rgba(5, 8, 18, 0.78);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    max-width: 620px;
}

.caption-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.caption-role {
    font-size: 0.76rem;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.65);
}

.caption-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.01em;
}

.card-placeholder-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.08);
    padding: 0.4rem 0.85rem;
    border-radius: 6px;
    border: 1px dashed rgba(255, 255, 255, 0.3);
    white-space: nowrap;
}

/* Responsive Scaling for CardSwap */
@media (max-width: 1400px) {
    .card-swap-container {
        transform: scale(0.92);
        transform-origin: center right;
    }
}

@media (max-width: 1240px) {
    .card-swap-container {
        transform: scale(0.82);
        transform-origin: center right;
    }
}

@media (max-width: 1024px) {
    .experience-flap-sign {
        position: relative;
        top: auto;
        right: auto;
        width: 100%;
        height: 4.5rem;
        margin: 0 auto 1.5rem;
    }
    .experience-flap-tiles { font-size: clamp(32px, 5vw, 40px); }
    .experience-swap-layout {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        min-height: auto;
    }
    .experience-swap-text-col {
        max-width: 100%;
    }
    .experience-swap-visual-col {
        display: none;
    }
    .experience-text-deck {
        min-height: 520px;
    }
    .card-swap-stage,
    .card-swap-stage.active {
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        width: 100%;
        height: 520px;
        justify-content: center;
        margin-top: 1rem;
        pointer-events: auto;
    }
    .card-swap-container {
        transform: scale(0.68) translate(0%, 0%);
        transform-origin: center center;
        right: auto;
        left: 50%;
        margin-left: -520px;
        bottom: auto;
        top: 50%;
        margin-top: -340px;
    }
}

@media (max-width: 768px) {
    .experience-editorial-body {
        grid-template-columns: 1fr;
        row-gap: 0.95rem;
    }
    .experience-text-panel[data-panel-index="0"] .experience-editorial-body {
        grid-template-rows: none;
        min-height: 0;
        row-gap: 1.5rem;
    }
    .card-swap-stage {
        height: 420px;
    }
    .card-swap-container {
        transform: scale(0.52) translate(0%, 0%);
        transform-origin: center center;
    }
}

@media (max-width: 480px) {
    .card-swap-stage {
        height: 340px;
    }
    .card-swap-container {
        transform: scale(0.38) translate(0%, 0%);
        transform-origin: center center;
    }
    .experience-text-deck {
        min-height: 610px;
    }
    .experience-editorial-title { font-size: 2rem; }
    .experience-editorial-lead { font-size: 1.06rem; }
    .experience-editorial-body p { font-size: 1rem; }
    .experience-swap-nav-pills { gap: 0.8rem; }
    .swap-nav-pill { font-size: 0.72rem; }
}

/* Keep the resting card footprint separate from all experience text panels. */
.experience-is-constrained .experience-swap-layout {
    grid-template-columns: minmax(0, var(--experience-copy-width)) 1fr;
}
.experience-is-compact .experience-editorial-title {
    font-size: calc(clamp(2rem, 2.5vw, 2.4rem) * var(--experience-copy-scale));
}
.experience-is-compact .experience-editorial-meta { font-size: calc(.96rem * var(--experience-copy-scale)); }
.experience-is-compact .experience-editorial-date { font-size: calc(.94rem * var(--experience-copy-scale)); }
.experience-is-compact .experience-editorial-lead,
.experience-is-compact .experience-card-title { font-size: calc(1.06rem * var(--experience-copy-scale)); }
.experience-is-compact .experience-card-body { font-size: calc(1rem * var(--experience-copy-scale)); }
.experience-is-compact .experience-text-panel[data-panel-index="0"] .experience-editorial-lead,
.experience-is-compact .experience-text-panel[data-panel-index="0"] .experience-card-title { font-size: calc(1rem * var(--experience-copy-scale)); }
.experience-is-compact .experience-text-panel[data-panel-index="0"] .experience-card-body { font-size: calc(.94rem * var(--experience-copy-scale)); }
.experience-is-compact .experience-editorial-body,
.experience-is-compact .experience-text-panel[data-panel-index="0"] .experience-editorial-body { column-gap: 1.5rem; }

.experience-is-stacked .experience-swap-layout {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 0;
}
.experience-is-stacked .experience-swap-visual-col { display: none; }
.experience-is-stacked .experience-text-deck { min-height: 0; }
.experience-is-stacked .experience-text-panel { translate: none; top: auto; max-width: 100%; }
.experience-is-stacked .card-swap-stage,
.experience-is-stacked .card-swap-stage.active {
    position: relative;
    top: auto;
    right: auto;
    width: 100%;
    height: var(--experience-stage-height);
    margin-top: 2rem;
    justify-content: center;
}
.experience-is-stacked .card-swap-container {
    top: 50%;
    left: 50%;
    right: auto;
    bottom: auto;
    margin-left: -520px;
    margin-top: -340px;
    translate: none;
    transform: scale(var(--experience-card-scale));
    transform-origin: center center;
}
.experience-is-stacked .experience-flap-sign {
    position: relative;
    top: auto;
    right: auto;
    width: auto;
    height: 4.5rem;
    margin: 0 2rem 1.5rem;
}
.experience-is-stacked .experience-interaction-note {
    position: relative;
    left: auto;
    bottom: auto;
    margin: 0 2rem;
    max-width: none;
}
.experience-is-stacked .experience-swap-bottom-blur { display: none; }

/* ==========================================================================
   FocusShowcase Component (参考视频 3 栏焦点手风琴卡片系统)
   ========================================================================== */
.focus-showcase-section {
    margin-top: clamp(12rem, 16vw, 20rem);
    padding-top: clamp(4rem, 6vw, 6rem);
    padding-bottom: clamp(6rem, 10vw, 10rem);
    position: relative;
    z-index: 3;
}

.focus-showcase-section .container {
    max-width: 100%;
    width: 100%;
    padding: 0 clamp(1.2rem, 3vw, 3.5rem);
}

.focus-showcase-section .section-title {
    color: #24272b;
    font-size: clamp(2.2rem, 2.65vw, 3.1rem);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.3;
    word-break: keep-all;
}

.focus-showcase-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(28px) saturate(160%);
    -webkit-backdrop-filter: blur(28px) saturate(160%);
    border: 1px solid rgba(26, 43, 76, 0.12);
    border-radius: 0; /* 严格按照视频要求：无倒角，硬朗直角 */
    box-shadow:
        0 24px 60px -15px rgba(26, 43, 76, 0.07),
        0 4px 16px -2px rgba(26, 43, 76, 0.03);
    overflow: hidden;
    position: relative;
}

/* 单栏卡片容器：高大占位、与视频中顶天立地的比例一致、彻底无倒角 */
.focus-card {
    position: relative;
    padding: clamp(3.2rem, 4.2vw, 4.8rem) clamp(2.4rem, 3.2vw, 3.8rem);
    min-height: clamp(820px, 86vh, 980px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    background: #ffffff;
    border-radius: 0;
    transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1),
                filter 0.45s cubic-bezier(0.16, 1, 0.3, 1),
                background-color 0.45s ease;
    border-right: 1px solid rgba(26, 43, 76, 0.1);
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.focus-card:last-child {
    border-right: none;
}

/* 背景图层：完全无倒角、贴边铺满整列，悬浮时从中心向外平缓渐显，并在最上部的边保留白边 */
.focus-card-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    opacity: 0;
    transform: scale(0.96);
    border-radius: 0;
    -webkit-mask-image: radial-gradient(ellipse at 50% 50%, #000 22%, rgba(0, 0, 0, 0.75) 52%, rgba(0, 0, 0, 0.25) 76%, transparent 92%);
    mask-image: radial-gradient(ellipse at 50% 50%, #000 22%, rgba(0, 0, 0, 0.75) 52%, rgba(0, 0, 0, 0.25) 76%, transparent 92%);
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: 20% 20%;
    mask-size: 20% 20%;
    transition: opacity 1.1s cubic-bezier(0.16, 1, 0.3, 1),
                -webkit-mask-size 1.35s cubic-bezier(0.16, 1, 0.3, 1),
                mask-size 1.35s cubic-bezier(0.16, 1, 0.3, 1),
                transform 1.25s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1;
}

.focus-card-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 0;
    opacity: 1;
    filter: none;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 白色覆盖跟随说明末行的位置淡出，下半幅保留背景原色。 */
.focus-card-bg-overlay {
    display: block;
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 1) 0%,
        rgba(255, 255, 255, 0.98) 14%,
        rgba(255, 255, 255, 0.72) var(--focus-cover-fade-start, 42%),
        rgba(255, 255, 255, 0.46) var(--focus-cover-text-bottom, 52%),
        transparent var(--focus-cover-fade-end, 60%)
    );
    opacity: 1;
}

/* 激活时自中心平滑展开，四角完全铺开，仅在最上部的边生效极大极缓羽化白边 */
.focus-card.is-active .focus-card-bg {
    opacity: 1;
    -webkit-mask-size: 220% 220%;
    mask-size: 220% 220%;
    transform: scale(1);
}

.focus-card.is-active .focus-card-bg-img {
    transform: none;
}

/* 卡片内部 Flex 布局内容层 */
.focus-card-inner {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.focus-card-top {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: auto;
    margin-bottom: 2rem;
}

.focus-card-title {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    font-family: var(--font-main);
    font-size: clamp(2.2rem, 2.8vw, 3.2rem);
    font-weight: 800;
    line-height: 1.22;
    color: #34465b;
    margin: 0;
    letter-spacing: -0.02em;
    transition: color 0.35s ease;
}

.focus-card-name {
    min-width: 0;
    font-size: clamp(1.7rem, 2vw, 2.4rem);
}

.focus-card-name-en {
    color: #5a6879;
    flex: 0 0 auto;
    font-size: clamp(0.8rem, 1vw, 1.05rem);
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0;
    white-space: nowrap;
}

.focus-card.is-active .focus-card-title {
    color: #34465b;
}

/* 修改点4：中间小字内容排版优化，居于中段，与上下元素形成匀称平衡的黄金比例 */
.focus-card-content {
    margin: auto 0;
    padding: 1.5rem 0;
    opacity: 1;
    transform: none;
    pointer-events: none;
}

.focus-card.is-active .focus-card-content {
    pointer-events: auto;
}

/* 优雅克制副文：细腻暗石板灰 + 400 自然字重 + 精致字号 + 微弱纯净衬影，清晰自然且不喧宾夺主 */
.focus-card-desc {
    text-indent: 2em;
    font-size: clamp(0.98rem, 1.14vw, 1.12rem);
    line-height: 1.85;
    color: #334155;
    margin: 0;
    font-weight: 400;
    max-width: 520px;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.65);
}

.focus-card.is-active .focus-card-desc,
.focus-card[data-index="0"].is-active .focus-card-desc,
.focus-card[data-index="1"].is-active .focus-card-desc,
.focus-card[data-index="2"].is-active .focus-card-desc {
    color: #334155;
    font-weight: 400;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.65);
}

/* 地平线遮罩容器（Mask Horizon Cut） */
.split-line-wrap {
    display: block;
    overflow: hidden; /* 地平线切口：遮挡水平线之下的字 */
    line-height: 1.85;
    padding-bottom: 2px;
}

.split-line-inner {
    display: block;
    white-space: pre;
    will-change: transform, opacity;
}

.focus-card-desc .split-line-inner {
    text-indent: 0;
}

.focus-card-desc .split-line-wrap:first-child .split-line-inner {
    text-indent: 2em;
}

/* 底部极简序号（未悬浮时镂空，悬浮后填充蓝灰） */
.focus-card-bottom {
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    margin-top: 0;
    padding-top: 1rem;
}

.focus-card-num {
    font-family: var(--font-main, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
    font-size: clamp(5.6rem, 7.5vw, 8.2rem); /* 适度放大，比例平衡 */
    font-weight: 700;
    line-height: 0.9;
    color: transparent; /* 未悬浮时镂空 */
    -webkit-text-stroke: 2px rgba(15, 23, 42, 0.22); /* 镂空精细轮廓 */
    letter-spacing: -0.05em;
    user-select: none;
    transition: color 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                -webkit-text-stroke 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-block;
}

.focus-card.is-active .focus-card-num,
.focus-card:hover .focus-card-num {
    color: #496079;
    -webkit-text-stroke: 0px transparent;
}

.focus-card[data-index="2"].is-active .focus-card-num,
.focus-card[data-index="2"]:hover .focus-card-num {
    color: #3d526b;
}


/* 响应式适配 */
@media (max-width: 992px) {
    .focus-showcase-section {
        margin-top: 5rem;
        padding-top: 3rem;
        padding-bottom: 5rem;
    }

    .focus-showcase-grid {
        grid-template-columns: 1fr;
        border-radius: 0;
    }

    .focus-card {
        border-right: none;
        border-bottom: 1px solid rgba(26, 43, 76, 0.1);
        min-height: auto;
        padding: 3.2rem 2.2rem;
    }

    .focus-card:last-child {
        border-bottom: none;
    }

    .focus-card-content {
        opacity: 0;
        transform: translateY(16px);
        margin: 2rem 0;
    }

    .focus-card.is-active .focus-card-content,
    .focus-card:hover .focus-card-content {
        opacity: 1;
        transform: none;
        animation: none; /* 移动端使用直接淡入更平顺 */
        transition: opacity 0.3s ease;
    }

    .focus-card-num {
        font-size: clamp(4.2rem, 11vw, 5.8rem);
        -webkit-text-stroke: 1.5px rgba(15, 23, 42, 0.22);
    }
}

@media (max-width: 600px) {
    .focus-showcase-section .section-title {
        font-size: 2.11rem;
    }
}

/* ============================================================
   3D Orbit / Sphere Featured Gallery (bleibtgleich.dev 1:1)
   ============================================================ */
.sphere-gallery-section {
    position: relative;
    width: 100%;
    min-height: 820px;
    height: 92vh;
    max-height: 980px;
    background: #ffffff;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    z-index: 6;
    margin-top: 1.5rem;
    margin-bottom: 4rem;
}

/* 左右分立 Editorial 标题区 */
.sphere-gallery-header-row {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 clamp(1.5rem, 4.5vw, 5.5rem);
    pointer-events: none;
    z-index: 20;
}

.sphere-side-block--left {
    text-align: left;
}

.sphere-side-block--right {
    text-align: right;
}

.sphere-editorial-kicker {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 0.35rem;
}

.sphere-hero-title {
    font-size: clamp(3.8rem, 8.5vw, 7.8rem);
    font-weight: 900;
    line-height: 0.92;
    letter-spacing: -0.05em;
    color: #090a0f;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.sphere-hero-desc {
    font-size: 0.88rem;
    font-weight: 600;
    color: #94a3b8;
    letter-spacing: 0.06em;
    margin-top: 0.6rem;
}

/* 底部超大浅色艺术水印 (bleibt gleich 风格) */
.sphere-bg-watermark {
    position: absolute;
    bottom: -2vw;
    font-size: clamp(6.5rem, 16vw, 17rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.06em;
    color: rgba(15, 23, 42, 0.038);
    pointer-events: none;
    z-index: 1;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

.sphere-bg-watermark--left {
    left: clamp(1rem, 3.5vw, 5rem);
}

.sphere-bg-watermark--right {
    right: clamp(1rem, 3.5vw, 5rem);
}

/* 3D 舞台视口容器 */
.sphere-viewport {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1200px;
    perspective-origin: 50% 50%;
    cursor: grab;
    touch-action: none;
    z-index: 4;
}

.sphere-viewport.is-dragging {
    cursor: grabbing;
}

.sphere-stage {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    transform-style: preserve-3d;
    pointer-events: none;
}

/* 3D 卡片元素 */
.sphere-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 220px;
    height: 138px;
    pointer-events: auto;
    transform-origin: 50% 50%;
    border-radius: 12px;
    background: #090a0f;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 20px 48px -10px rgba(0, 0, 0, 0.45),
                0 0 0 1px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    overflow: hidden;
    transition: box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
}

.sphere-card:focus-visible {
    outline: 2px solid #38bdf8;
    outline-offset: 4px;
}

.sphere-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
}

.sphere-card-media {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
    background: #090a0f;
}

.sphere-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}


/* 状态高亮与悬停 */
.sphere-card.is-center-focus {
    box-shadow: 0 24px 50px -10px rgba(0, 0, 0, 0.5),
                0 0 28px rgba(56, 189, 248, 0.25);
    border-color: rgba(56, 189, 248, 0.4);
}

.sphere-card.is-hovered {
    box-shadow: 0 32px 64px -12px rgba(0, 0, 0, 0.6),
                0 0 35px rgba(56, 189, 248, 0.45);
    border-color: #38bdf8;
}

/* 拖拽交互提示胶囊 */
.sphere-drag-hint {
    position: absolute;
    bottom: 2.2rem;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 1.15rem;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 500;
    color: #475569;
    box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.08);
    pointer-events: none;
    z-index: 12;
    transition: opacity 0.4s ease;
}

.sphere-viewport.is-dragging .sphere-drag-hint {
    opacity: 0.25;
}

/* 卡片预览弹窗 (Modal Lightbox) */
.sphere-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.35s ease;
}

.sphere-modal.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.sphere-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 12, 18, 0.72);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.sphere-modal-card {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 760px;
    background: #090a0f;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 35px 70px -15px rgba(0, 0, 0, 0.75),
                0 0 50px rgba(56, 189, 248, 0.2);
    transform: translateY(20px) scale(0.96);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.sphere-modal.is-open .sphere-modal-card {
    transform: translateY(0) scale(1);
}

.sphere-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.sphere-modal-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.08);
}

.sphere-modal-media {
    width: 100%;
    aspect-ratio: 16 / 10;
    background: #050608;
    overflow: hidden;
}

.sphere-modal-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sphere-modal-body {
    padding: 1.8rem 2.2rem 2.2rem;
    background: #0d0f18;
}

.sphere-modal-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.3);
    padding: 0.3rem 0.75rem;
    border-radius: 6px;
    margin-bottom: 0.8rem;
}

.sphere-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 0.45rem;
    letter-spacing: -0.02em;
}

.sphere-modal-subtitle {
    font-size: 0.95rem;
    color: #94a3b8;
    margin: 0 0 0.8rem;
}

.sphere-modal-desc {
    font-size: 0.92rem;
    line-height: 1.65;
    color: #cbd5e1;
    margin: 0 0 1.2rem;
}

.sphere-modal-metric-badge {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: monospace;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.08);
    border: 1px dashed rgba(56, 189, 248, 0.35);
    padding: 0.45rem 1rem;
    border-radius: 8px;
}

/* 响应式断点 */
@media (max-width: 1200px) {
    .sphere-card {
        width: 210px;
        height: 131px;
    }
    .sphere-hero-title {
        font-size: 5rem;
    }
}

@media (max-width: 900px) {
    .sphere-gallery-section {
        min-height: 680px;
        height: 80vh;
    }
    .sphere-gallery-header-row {
        top: 2.5rem;
        transform: none;
        padding: 0 2rem;
    }
    .sphere-hero-title {
        font-size: 3.5rem;
    }
    .sphere-card {
        width: 180px;
        height: 112px;
    }
    .sphere-bg-watermark {
        font-size: 12vw;
    }
}

@media (max-width: 640px) {
    .sphere-gallery-section {
        min-height: 580px;
    }
    .sphere-card {
        width: 145px;
        height: 90px;
        border-radius: 8px;
    }
    .sphere-card-caption {
        padding: 0.4rem 0.5rem;
    }
    .sphere-card-badge {
        font-size: 0.55rem;
        padding: 0.15rem 0.3rem;
    }
    .sphere-card-title {
        font-size: 0.65rem;
    }
    .sphere-card-num {
        display: none;
    }
    .sphere-hero-title {
        font-size: 2.8rem;
    }
}

/* ==========================================================================
   SplitText Component (React Bits 1:1 Implementation)
   ========================================================================== */
.split-parent {
    overflow: hidden;
    display: inline-block;
    white-space: normal;
    word-wrap: break-word;
    will-change: transform, opacity;
    text-align: center;
    padding-bottom: 0.12em;
}

.split-word {
    display: inline-block;
    white-space: nowrap;
}

.split-char {
    display: inline-block;
    will-change: transform, opacity;
    backface-visibility: hidden;
    opacity: 0;
    transform: translateY(32px);
}

.split-parent.is-animated .split-char {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .split-parent .split-char {
        opacity: 1 !important;
        transform: none !important;
    }
}
