/* ==========================================================================
   critical.css — 首屏关键 CSS（由 index.html <head> 内联）
   用途：让首屏零网络往返立即按最终布局渲染；完整样式 style/app.css 异步加载，
        加载后只补全非首屏/交互态规则，首屏元素计算样式不变（无可见位移）。
   来源：style/word.css、new.css、icon.css、lan.css、aoo.css 原规则（数值原样摘抄）。
   约束：自包含；不引用字体文件、不引入其他样式表、不含外部资源地址，可安全内联。
        'ZQKNNY' 字体与其余样式有意留在 app.css，靠 font-display:swap 兜底。
   ========================================================================== */

/* ===== word.css ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --text: rgba(255, 255, 255, 0.92);
    --text-muted: rgba(255, 255, 255, 0.7);
    --accent: #fff;
    --accent-rgb: 255, 255, 255;
    --accent-glow: rgba(255, 255, 255, 0.1);
    --accent-glow-strong: rgba(255, 255, 255, 0.2);
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-bg-hover: rgba(255, 255, 255, 0.09);
    --card-border: rgba(255, 255, 255, 0.08);
    --card-border-hover: rgba(255, 255, 255, 0.18);
    --glass-blur: 12px;
    --site-bg-start: #232526;
    --site-bg-end: #414345;
}

body {
    margin: 0;
    padding: 48px 20px;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--site-bg-start), var(--site-bg-end));
    color: var(--text);
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

.bg-blur {
    position: fixed;
    inset: 0;
    z-index: 1;
    background: rgba(24, 28, 33, 0.3);
    pointer-events: none;
}

.container {
    position: relative;
    z-index: 2;
    width: min(1200px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    align-items: start;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 20px;
    height: fit-content;
}

.avatar-card,
.avatar-card:hover {
    padding: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.avatar {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(var(--accent-rgb), 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid rgba(var(--accent-rgb), 0.25);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.avatar-placeholder {
    font-size: 16px;
    color: var(--text-muted);
    font-weight: 500;
    z-index: 1;
    letter-spacing: 0.5px;
}

.sidebar .content {
    width: 100%;
    height: 80px;
    border-radius: 12px;
}

.sidebar .content .benefits {
    min-width: 700px;
}

.sidebar .content .basic-marquee svg {
    width: 30px;
}

.radio-container {
    font-size: 14px;
    letter-spacing: 0.3px;
}

.main-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.fade-in {
    animation: fadeInUp .5s ease both;
}

.title-card,
.title-card:hover {
    padding: 40px 4px 16px;
    text-align: left;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.title-wrap {
    display: flex;
    align-items: baseline;
    gap: 12px;
    font-size: 48px;
    font-weight: 700;
    font-family: 'ZQKNNY', sans-serif;
}

.title-prefix {
    color: #fff;
    -webkit-text-fill-color: #fff;
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: 1px;
    flex-shrink: 0;
}

.title {
    font-size: inherit;
    font-weight: inherit;
    background: linear-gradient(135deg, #ff6b6b, #ffd93d, #6bcb77, #4d96ff, #9b59b6, #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradientText 4s ease infinite;
}

@keyframes gradientText {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.subtitle-card,
.subtitle-card:hover {
    padding: 0 4px 24px;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.subtitle-wrap {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: 32px;
    font-weight: 600;
    letter-spacing: 1px;
    font-family: 'ZQKNNY', sans-serif;
}

.subtitle-prefix {
    color: var(--text-muted);
    font-size: inherit;
    font-weight: inherit;
    flex-shrink: 0;
}

.subtitle-name {
    font-size: inherit;
    font-weight: inherit;
    background: linear-gradient(135deg, #ff6b6b, #ffd93d, #6bcb77, #4d96ff, #9b59b6, #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradientText 4s ease infinite;
}

.pixel-banner {
    display: flex;
    justify-content: flex-start;
    padding: 8px 0;
    overflow: hidden;
    max-width: 100%;
}

.pixel-grid {
    display: flex;
    line-height: 0;
    max-width: 100%;
    overflow: hidden;
}

.pixel-banner--svg {
    justify-content: flex-start;
    padding: 0;
    margin: 0;
}

.pixel-grid--svg {
    display: block;
    width: 100%;
    max-width: 620px;
    margin-left: 0;
    padding-left: 0;
    line-height: 0;
    overflow: hidden;
}

.pixel-grid--svg svg {
    width: 100%;
    height: auto;
    max-height: 110px;
    display: block;
}

@media (max-width: 600px) {
    .pixel-grid--svg { max-width: 100%; }
    .pixel-grid--svg svg { max-height: 70px; }
}

/* 折叠线附近：简介 / 技能（避免 app.css 到达时可见重排） */
.intro-card {
    padding: 16px 4px 8px;
    line-height: 1.8;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    text-align: left;
}

.intro-text {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.9;
    white-space: pre-wrap;
    word-break: break-word;
    text-align: left !important;
}

.skills-card {
    padding: 16px 4px 8px;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    display: inline-flex;
    align-items: center;
    padding: 8px 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text);
    font-size: 13px;
    letter-spacing: 0.3px;
    transition: background 0.25s ease, border-color 0.25s ease;
}

.section-title {
    font-size: 20px;
    color: var(--text);
    margin-bottom: 20px;
    font-weight: 600;
    padding-left: 4px;
    letter-spacing: 0.5px;
}

.mobile-avatar-card {
    display: none;
}

.mobile-avatar {
    width: 150px;
    height: 150px;
    min-width: 150px;
    min-height: 150px;
    border-radius: 50%;
    background: rgba(var(--accent-rgb), 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid rgba(var(--accent-rgb), 0.25);
    position: relative;
    overflow: hidden;
    margin: 0 auto;
}

.mobile-avatar .avatar-placeholder {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    z-index: 1;
}

@media (max-width: 1024px) {
    body {
        padding: clamp(12px, 3vw, 48px) clamp(10px, 3vw, 20px);
    }

    .container {
        grid-template-columns: 1fr;
        gap: 0;
        max-width: 100%;
        overflow: hidden;
    }

    .sidebar {
        display: none !important;
    }

    .mobile-avatar-card {
        display: flex;
        justify-content: center;
        padding: 10px 0 6px;
    }

    .title-card, .title-card:hover {
        padding: clamp(8px, 2vw, 40px) 0 clamp(4px, 1vw, 16px);
    }

    .title-wrap {
        font-size: clamp(22px, 6vw, 48px);
        flex-wrap: wrap;
        gap: 6px;
    }

    .title-prefix {
        flex-shrink: 1;
    }

    .subtitle-card, .subtitle-card:hover {
        padding: 0 0 clamp(8px, 1.5vw, 24px);
    }

    .subtitle-wrap {
        font-size: clamp(13px, 3.5vw, 32px);
        flex-wrap: wrap;
        gap: 4px;
    }

    .subtitle-prefix {
        flex-shrink: 1;
    }

    .pixel-banner {
        justify-content: flex-start;
    }

    .main-content {
        gap: clamp(10px, 2vw, 20px);
        max-width: 100%;
        overflow: hidden;
    }

    .section-title {
        font-size: clamp(16px, 4vw, 20px);
    }

    .intro-text {
        overflow-wrap: break-word;
        text-align: left;
    }

    .skills-grid {
        gap: 8px;
    }

    .skill-tag {
        font-size: 12px;
        padding: 6px 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .fade-in {
        animation: none;
    }
}

/* ===== new.css ===== */
.bg {
    position: fixed;
    inset: 0;
    background: #181c21;
    width: 100%;
    height: 100%;
    margin: 0;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    z-index: 0;
}

.pattern-bg {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
    background: repeating-linear-gradient(
        135deg,
        #232526 0px,
        #232526 60px,
        #23252699 70px,
        #414345 130px
    );
}

.cube-svg {
    position: absolute;
    width: 200%;
    height: 200%;
    left: -30%;
    top: -20%;
    background: transparent;
    opacity: 0.7;
    z-index: 1;
    animation: cubeMove 18s linear infinite alternate;
    will-change: transform;
    contain: strict;
}

@keyframes cubeMove {
    from {
        transform: translateY(0) scale(1);
    }
    to {
        transform: translateY(-20%) scale(1.02) rotate(1deg);
    }
}

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

/* ===== icon.css ===== */
.glass-radio-group {
    --bg: rgba(255, 255, 255, 0.06);
    --text: #999;

    display: flex;
    position: relative;
    background: var(--bg);
    border-radius: 1rem;
    backdrop-filter: blur(12px);
    box-shadow:
        inset 1px 1px 4px rgba(255, 255, 255, 0.15),
        inset -1px -1px 6px rgba(0, 0, 0, 0.3),
        0 4px 12px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    width: 100%;
}

.glass-radio-group input {
    display: none;
}

.glass-radio-group label {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 0;
    cursor: pointer;
    color: var(--text);
    position: relative;
    z-index: 2;
    transition: color 0.3s ease-in-out;
}

.glass-radio-group label svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 1.5;
    fill: none;
}

.glass-radio-group label:hover {
    color: #ccc;
}

.glass-radio-group input:checked + label {
    color: #fff;
}

.glass-glider {
    position: absolute;
    top: 0;
    bottom: 0;
    width: calc(100% / 4);
    border-radius: 1rem;
    z-index: 1;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.35));
    box-shadow:
        0 0 16px rgba(255, 255, 255, 0.15),
        0 0 8px rgba(255, 255, 255, 0.1) inset;
    transition:
        transform 0.5s cubic-bezier(0.37, 1.95, 0.66, 0.56),
        background 0.4s ease-in-out,
        box-shadow 0.4s ease-in-out;
}

/* ===== lan.css ===== */
.radio-container {
    --main-color: #fff;
    --main-color-opacity: rgba(255, 255, 255, 0.08);

    --total-radio: 3;

    display: flex;
    flex-direction: column;
    position: relative;
    padding-left: 0.5rem;
}

.radio-container input {
    cursor: pointer;
    appearance: none;
}

.radio-container .glider-container {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: linear-gradient(
        0deg,
        rgba(0, 0, 0, 0) 0%,
        rgba(27, 27, 27, 1) 50%,
        rgba(0, 0, 0, 0) 100%
    );
    width: 1px;
}

.radio-container .glider-container .glider {
    position: relative;
    height: calc(100% / var(--total-radio));
    width: 100%;
    background: linear-gradient(
        0deg,
        rgba(0, 0, 0, 0) 0%,
        var(--main-color) 50%,
        rgba(0, 0, 0, 0) 100%
    );
    transition: transform 0.5s cubic-bezier(0.37, 1.95, 0.66, 0.56);
}

.radio-container .glider-container .glider::before {
    content: "";
    position: absolute;
    height: 60%;
    width: 300%;
    top: 50%;
    transform: translateY(-50%);
    background: var(--main-color);
    box-shadow: 0 0 12px 4px var(--main-color);
    opacity: 0.6;
}

.radio-container .glider-container .glider::after {
    content: "";
    position: absolute;
    left: 0;
    height: 100%;
    width: 150px;
    background: linear-gradient(
        90deg,
        var(--main-color-opacity) 0%,
        rgba(0, 0, 0, 0) 100%
    );
}

.radio-container label {
    cursor: pointer;
    padding: 1rem;
    position: relative;
    color: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease-in-out;
}

.radio-container input:checked + label {
    color: var(--main-color);
}

/* ===== aoo.css ===== */
/* 侧栏滚动区外框（内容由 JS/接口注入，晚于 CSS 生效） */
.content {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 15px;
    width: 300px;
    height: 100px;
    position: relative;
    overflow: hidden;
    border-radius: 14px;
}
