/* ==============================================================================
   Personal Homepage - Premium Developer Portfolio
   Design inspired by: Linear, Vercel, Raycast
   ============================================================================== */

:root {
    /* 深空黑色调 */
    --bg-0: #07080c;
    --bg-1: #0b0d13;
    --bg-2: #11141c;
    --bg-3: #1a1e28;
    --bg-panel: rgba(17, 20, 28, 0.6);

    /* 边框层次 */
    --border-1: rgba(255, 255, 255, 0.06);
    --border-2: rgba(255, 255, 255, 0.1);
    --border-hover: rgba(120, 180, 255, 0.3);

    /* 品牌色 - 渐变友好 */
    --accent-blue: #4f8bff;
    --accent-cyan: #22d3ee;
    --accent-purple: #a78bfa;
    --accent-pink: #ec4899;
    --accent-green: #34d399;
    --accent-yellow: #fbbf24;
    --accent-red: #fb7185;

    /* 文字层次 */
    --text-1: #f5f7fa;
    --text-2: #c0c6d4;
    --text-3: #7a8191;
    --text-4: #4a5162;

    /* 代码高亮 (One Dark Pro 优化版) */
    --code-keyword: #c678dd;
    --code-string: #98c379;
    --code-function: #61afef;
    --code-type: #e5c07b;
    --code-variable: #e06c75;
    --code-comment: #5c6370;
    --code-number: #d19a66;

    /* 字体 */
    --font-mono: 'Fira Code', 'JetBrains Mono', Consolas, 'Courier New', monospace;
    --font-sans: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* 阴影 */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 40px rgba(79, 139, 255, 0.15);
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-0);
    color: var(--text-1);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(79, 139, 255, 0.15), transparent),
        radial-gradient(ellipse 60% 40% at 80% 50%, rgba(167, 139, 250, 0.08), transparent),
        radial-gradient(ellipse 60% 40% at 20% 80%, rgba(34, 211, 238, 0.06), transparent);
    background-attachment: fixed;
}

/* 当存在自定义背景图时，隐藏默认的极光渐变 (被背景图取代) */
body.has-bg {
    background-image: none;
}

/* =========================================
   自定义网站背景图层
   ========================================= */
.site-bg {
    position: fixed;
    inset: 0;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    z-index: -2;
    filter: brightness(0.55) saturate(1.1);
    animation: bgZoom 40s ease-in-out infinite alternate;
}

/* 背景缓慢缩放动画，让静态图片有呼吸感 */
@keyframes bgZoom {
    0%   { transform: scale(1) translate(0, 0); }
    100% { transform: scale(1.08) translate(-1%, -1%); }
}

/* 背景之上叠加一层深色渐变遮罩，保证文字可读 & 极客氛围 */
.site-bg-overlay {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(79, 139, 255, 0.25), transparent),
        radial-gradient(ellipse 60% 40% at 80% 50%, rgba(167, 139, 250, 0.15), transparent),
        radial-gradient(ellipse 60% 40% at 20% 80%, rgba(34, 211, 238, 0.12), transparent),
        linear-gradient(180deg, rgba(7, 8, 12, 0.6) 0%, rgba(7, 8, 12, 0.85) 60%, rgba(7, 8, 12, 0.95) 100%);
    backdrop-filter: blur(1px);
}

/* 有背景图时，网格纹理更淡一点，避免喧宾夺主 */
body.has-bg::before {
    opacity: 0.35;
}

/* 有背景图时，粒子透明度稍微降低 */
body.has-bg #particle-canvas {
    opacity: 0.25;
}

/* 选中文字样式 */
::selection {
    background: rgba(79, 139, 255, 0.3);
    color: #fff;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-0);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-3);
    border-radius: 5px;
    border: 2px solid var(--bg-0);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-blue);
}

/* =========================================
   全局背景装饰
   ========================================= */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    opacity: 0.4;
    pointer-events: none;
}

/* 网格纹理背景 (极客感) */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: 0;
    pointer-events: none;
}

/* CRT 扫描线 */
.scanline {
    position: fixed;
    left: 0;
    width: 100%;
    height: 120px;
    pointer-events: none;
    z-index: 1;
    background: linear-gradient(0deg,
        rgba(0, 0, 0, 0) 0%,
        rgba(79, 139, 255, 0.05) 50%,
        rgba(0, 0, 0, 0) 100%);
    animation: scanline 12s linear infinite;
}

@keyframes scanline {
    0% { top: -120px; }
    100% { top: 100%; }
}

/* 纸飞机彩蛋 */
.paper-plane {
    position: fixed;
    top: 0;
    left: 0;
    font-size: 1.3rem;
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
    transform-origin: center;
    filter: drop-shadow(0 0 8px rgba(79, 139, 255, 0.9));
}

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 2;
}

/* =========================================
   顶部状态栏 (高级感重构)
   ========================================= */
.ide-statusbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-2);
    background: linear-gradient(90deg,
        rgba(79, 139, 255, 0.1),
        rgba(167, 139, 250, 0.08),
        rgba(34, 211, 238, 0.1));
    border: 1px solid var(--border-1);
    border-radius: 12px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    margin-top: 20px;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 20px;
    z-index: 100;
    transition: border-color 0.3s;
}

.ide-statusbar:hover {
    border-color: var(--border-hover);
}

.status-left, .status-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.ide-statusbar .logo {
    font-weight: 700;
    color: var(--text-1);
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.status-item {
    cursor: pointer;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.status-item:hover {
    color: var(--text-1);
}

.status-item.branch {
    color: var(--accent-green);
}

.status-item.sync::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--accent-green);
    border-radius: 50%;
    margin-right: 6px;
    box-shadow: 0 0 6px var(--accent-green);
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* =========================================
   Hero 区域
   ========================================= */
.hero {
    margin: 60px 0 100px;
}

.hero-content {
    display: grid;
    grid-template-columns: 1.4fr 0.9fr;
    gap: 32px;
    align-items: start;
}

/* =========================================
   终端窗口 (顶级质感)
   ========================================= */
.terminal-window {
    background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
    border: 1px solid var(--border-2);
    border-radius: 16px;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    overflow: hidden;
    position: relative;
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s;
}

/* 终端窗口顶部的彩色光晕 */
.terminal-window::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-blue), var(--accent-purple), transparent);
    opacity: 0.8;
}

.terminal-window:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-lg), 0 0 60px rgba(79, 139, 255, 0.2);
}

.terminal-header {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-1);
    position: relative;
}

.mac-btns {
    display: flex;
    gap: 8px;
}

.mac-btns span {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    position: relative;
    transition: transform 0.2s;
    cursor: pointer;
}

.mac-btns span:hover {
    transform: scale(1.15);
}

.close {
    background: linear-gradient(180deg, #ff6159, #d94a42);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.minimize {
    background: linear-gradient(180deg, #ffbd2e, #e0a020);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.maximize {
    background: linear-gradient(180deg, #27c93f, #1fa733);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.terminal-title {
    margin: 0 auto;
    font-family: var(--font-mono);
    color: var(--text-3);
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.terminal-body {
    padding: 32px 36px;
    font-family: var(--font-mono);
    min-height: 380px;
    position: relative;
}

.hidden {
    display: none !important;
}

/* 启动序列 */
.boot-line {
    color: var(--text-3);
    margin-bottom: 6px;
    font-size: 0.88rem;
    letter-spacing: 0.3px;
    animation: fadeInBoot 0.3s ease-out;
}

@keyframes fadeInBoot {
    from { opacity: 0; transform: translateX(-5px); }
    to { opacity: 1; transform: translateX(0); }
}

.boot-line .ok {
    color: var(--accent-green);
    font-weight: 700;
    text-shadow: 0 0 8px rgba(52, 211, 153, 0.5);
}
.boot-line .warn {
    color: var(--accent-yellow);
    font-weight: 700;
    text-shadow: 0 0 8px rgba(251, 191, 36, 0.5);
}

.command-line {
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.prompt {
    background: linear-gradient(135deg, var(--accent-green), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-right: 12px;
    font-weight: 700;
}

.command {
    color: var(--text-1);
    font-weight: 500;
}

.output {
    margin-bottom: 24px;
    padding-left: 16px;
    border-left: 2px solid var(--accent-blue);
    color: var(--text-2);
    position: relative;
}

.output::before {
    content: '';
    position: absolute;
    left: -2px;
    top: 0;
    width: 2px;
    height: 30%;
    background: linear-gradient(180deg, var(--accent-cyan), transparent);
}

.glow-text {
    color: var(--text-1);
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.glow-text::first-letter {
    color: var(--accent-cyan);
}

.title-gradient {
    background: linear-gradient(135deg, #fff 0%, var(--accent-cyan) 40%, var(--accent-blue) 70%, var(--accent-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.9rem;
    font-weight: 800;
    line-height: 1.4;
    min-height: 3.5rem;
    letter-spacing: 0.5px;
    filter: drop-shadow(0 2px 20px rgba(79, 139, 255, 0.2));
}

/* =========================================
   按钮 (精致化)
   ========================================= */
.actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 32px;
}

.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 32px; }

.btn {
    padding: 11px 22px;
    border-radius: 10px;
    font-family: var(--font-mono);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

.btn .icon {
    font-size: 0.9em;
    opacity: 0.9;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: #fff;
    border: 1px solid transparent;
    box-shadow: 0 4px 14px rgba(79, 139, 255, 0.35);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(79, 139, 255, 0.5);
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-outline {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-1);
    border: 1px solid var(--border-2);
    backdrop-filter: blur(10px);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

/* =========================================
   头像区域 (重磅升级)
   ========================================= */
.hero-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: stretch;
}

.avatar-wrapper {
    position: relative;
    aspect-ratio: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    margin: 10px auto 0;
    width: 100%;
    max-width: 280px;
}

/* 头像外层发光背景 */
.avatar-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        var(--accent-blue),
        var(--accent-purple),
        var(--accent-pink),
        var(--accent-cyan),
        var(--accent-blue)
    );
    filter: blur(30px);
    opacity: 0.5;
    z-index: 0;
    animation: spin 15s linear infinite;
}

.profile-img {
    width: 82%;
    height: 82%;
    border-radius: 50%;
    object-fit: cover;
    z-index: 3;
    border: 3px solid var(--bg-1);
    box-shadow:
        0 0 0 1px var(--accent-blue),
        0 20px 60px rgba(0, 0, 0, 0.6),
        inset 0 0 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.5s;
    background: var(--bg-2);
    position: relative;
}

.avatar-wrapper:hover .profile-img {
    transform: scale(1.08);
    box-shadow:
        0 0 0 2px var(--accent-cyan),
        0 25px 70px rgba(79, 139, 255, 0.4);
}

/* 科技感旋转环 - 重新设计 */
.tech-ring {
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 1px solid transparent;
    border-top-color: var(--accent-cyan);
    border-right-color: rgba(34, 211, 238, 0.3);
    z-index: 2;
    animation: spin 6s linear infinite;
}

.tech-ring.ring-2 {
    inset: -18px;
    border: 1px dashed rgba(167, 139, 250, 0.3);
    border-top-color: var(--accent-purple);
    animation: spin 10s linear infinite reverse;
}

/* 彩蛋激活 */
.avatar-wrapper.magic-active::before {
    opacity: 0.8;
    animation-duration: 4s;
}
.avatar-wrapper.magic-active .profile-img {
    animation: magicGlow 2s infinite alternate;
}
@keyframes magicGlow {
    0% { box-shadow: 0 0 0 2px var(--accent-purple), 0 0 40px rgba(167, 139, 250, 0.6); }
    100% { box-shadow: 0 0 0 2px var(--accent-pink), 0 0 60px rgba(236, 72, 153, 0.8); }
}

/* 状态徽章 */
.status-badge {
    position: absolute;
    bottom: 4%;
    right: -8px;
    background: var(--bg-1);
    border: 1px solid var(--border-2);
    padding: 6px 14px 6px 10px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 7px;
    z-index: 4;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(10px);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-green);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-green);
    animation: pulse 2s infinite;
}

.status-text {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-1);
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* 服务器探针 (升级版) */
.server-probe {
    background: var(--bg-panel);
    border: 1px solid var(--border-2);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: border-color 0.3s, transform 0.3s;
}

.server-probe:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.probe-header {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent);
    padding: 10px 16px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-3);
    border-bottom: 1px solid var(--border-1);
    font-weight: 600;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.probe-body {
    padding: 14px 16px;
    font-family: var(--font-mono);
    font-size: 0.82rem;
}

.probe-item {
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    border-bottom: 1px dashed var(--border-1);
}

.probe-item:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.probe-item .key {
    color: var(--accent-cyan);
    font-weight: 600;
}

.probe-item .val {
    color: var(--text-2);
    text-align: right;
    word-break: break-all;
    max-width: 60%;
    font-weight: 500;
}

/* =========================================
   通用区块标题 (精致升级)
   ========================================= */
.section {
    margin: 140px 0;
    position: relative;
}

.section-title {
    font-family: var(--font-mono);
    font-size: 1.7rem;
    font-weight: 700;
    margin-bottom: 40px;
    color: var(--text-1);
    display: flex;
    align-items: center;
    letter-spacing: -0.5px;
    position: relative;
}

.section-title .tag {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-right: 14px;
    font-weight: 800;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--border-2) 0%, transparent 100%);
    margin-left: 20px;
    margin-top: 5px;
}

/* =========================================
   代码编辑器 (IDE 风格)
   ========================================= */
.ide-editor {
    background: var(--bg-1);
    border: 1px solid var(--border-2);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: border-color 0.3s, transform 0.3s;
}

.ide-editor:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.editor-tabs {
    display: flex;
    background: var(--bg-2);
    border-bottom: 1px solid var(--border-1);
    padding: 0 8px;
}

.editor-tabs .tab {
    padding: 12px 22px;
    font-family: var(--font-mono);
    font-size: 0.88rem;
    color: var(--text-3);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    position: relative;
}

.editor-tabs .tab:hover {
    color: var(--text-2);
}

.editor-tabs .tab.active {
    color: var(--accent-cyan);
    border-bottom-color: var(--accent-cyan);
    background: linear-gradient(180deg, transparent, rgba(34, 211, 238, 0.05));
}

.editor-body {
    display: flex;
    font-family: var(--font-mono);
    font-size: 1rem;
    line-height: 1.75;
}

.line-numbers {
    padding: 24px 16px;
    color: var(--text-4);
    text-align: right;
    user-select: none;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-1);
    font-size: 0.9rem;
}

.code-lines {
    padding: 24px 28px;
    flex: 1;
    overflow-x: auto;
}

.keyword { color: var(--code-keyword); font-weight: 500; }
.class-name { color: var(--code-type); font-weight: 500; }
.type { color: var(--code-type); }
.variable { color: var(--code-variable); }
.string { color: var(--code-string); }
.function { color: var(--code-function); font-weight: 500; }
.comment { color: var(--code-comment); font-style: italic; }

/* =========================================
   通用卡片
   ========================================= */
.ide-panel {
    background: var(--bg-panel);
    border: 1px solid var(--border-2);
    border-radius: 14px;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.ide-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-2), transparent);
}

.hover-glow:hover {
    transform: translateY(-6px);
    border-color: var(--border-hover);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(79, 139, 255, 0.15);
}

/* =========================================
   技能栈
   ========================================= */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.skill-card {
    padding: 28px 28px 28px;
}

.card-header {
    display: flex;
    align-items: center;
    margin-bottom: 22px;
    padding-bottom: 16px;
    border-bottom: 1px dashed var(--border-1);
}

.folder-icon {
    font-size: 1.3rem;
    margin-right: 12px;
    color: var(--accent-yellow);
    font-family: var(--font-mono);
    font-weight: 700;
}

.skill-card h3 {
    color: var(--text-1);
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-tag {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-1);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.82rem;
    color: var(--code-string);
    font-family: var(--font-mono);
    transition: all 0.3s;
    font-weight: 500;
}

.skill-card:hover .tech-tag {
    border-color: var(--border-2);
}

.tech-tag:hover {
    background: rgba(52, 211, 153, 0.08);
    border-color: var(--accent-green);
    transform: translateY(-2px);
    color: var(--accent-green);
}

/* =========================================
   项目卡片 (精致化)
   ========================================= */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 28px;
}

.project-card {
    padding: 32px;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.project-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple), var(--accent-pink));
    opacity: 0;
    transition: opacity 0.4s;
}

.project-card:hover::after {
    opacity: 1;
}

.project-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.project-icon {
    font-size: 1.6rem;
    margin-right: 16px;
    background: linear-gradient(135deg, rgba(79, 139, 255, 0.15), rgba(167, 139, 250, 0.15));
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid var(--border-2);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    flex-shrink: 0;
}

.project-card:hover .project-icon {
    transform: scale(1.1) rotate(-5deg);
    border-color: var(--accent-blue);
}

.project-name {
    font-size: 1.15rem;
    color: var(--text-1);
    font-weight: 700;
    font-family: var(--font-mono);
    letter-spacing: 0.3px;
}

.project-desc {
    color: var(--text-2);
    margin-bottom: 22px;
    flex-grow: 1;
    font-size: 0.92rem;
    line-height: 1.75;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 24px;
}

.tech-badge {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-2);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-1);
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.project-footer {
    border-top: 1px solid var(--border-1);
    padding-top: 18px;
    margin-top: auto;
}

.project-link {
    color: var(--accent-cyan);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s;
    letter-spacing: 0.3px;
}

.project-link:hover {
    color: var(--accent-blue);
}

.project-link .arrow {
    margin-left: 8px;
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.project-card:hover .project-link .arrow {
    transform: translateX(6px);
}

/* =========================================
   联系方式
   ========================================= */
.contact-panel {
    padding: 72px 40px;
    text-align: center;
    position: relative;
}

.contact-panel::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(79, 139, 255, 0.08), transparent 70%);
    pointer-events: none;
}

.contact-content {
    position: relative;
    z-index: 1;
}

.contact-text {
    font-size: 1.15rem;
    margin-bottom: 44px;
    color: var(--text-2);
    line-height: 1.8;
}

.contact-text br + br {
    display: none;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 28px;
    border-radius: 10px;
    font-family: var(--font-mono);
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    letter-spacing: 0.3px;
}

.contact-btn.primary {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    color: #000;
    box-shadow: 0 6px 20px rgba(34, 211, 238, 0.3);
}

.contact-btn.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(34, 211, 238, 0.5);
}

.contact-btn.secondary {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-2);
    color: var(--text-1);
    backdrop-filter: blur(10px);
}

.contact-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--accent-purple);
    transform: translateY(-3px);
}

.ping-animation {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent-green);
    padding: 8px 18px;
    background: rgba(52, 211, 153, 0.05);
    border: 1px solid rgba(52, 211, 153, 0.2);
    border-radius: 30px;
}

.ping-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-green);
    border-radius: 50%;
    position: relative;
}

.ping-dot::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: var(--accent-green);
    animation: ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

/* =========================================
   动画
   ========================================= */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(52, 211, 153, 0); }
}

@keyframes ping {
    75%, 100% { transform: scale(2.5); opacity: 0; }
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease-out, transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.15s; }

.cursor-blink {
    display: inline-block;
    width: 3px;
    height: 1.3em;
    background: linear-gradient(180deg, var(--accent-cyan), var(--accent-blue));
    vertical-align: text-bottom;
    margin-left: 6px;
    animation: blink 1s step-end infinite;
    border-radius: 1px;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* 页脚 */
.footer {
    text-align: center;
    padding: 50px 0 40px;
    font-family: var(--font-mono);
    color: var(--text-3);
    font-size: 0.85rem;
}

.footer-line {
    width: 120px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-2), transparent);
    margin: 0 auto 24px;
}

.footer-secret {
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.08);
    transition: color 0.3s;
    cursor: default;
}

.footer-secret:hover {
    color: var(--accent-purple);
}

/* =========================================
   响应式
   ========================================= */
@media (max-width: 992px) {
    .hero-content {
        grid-template-columns: 1fr;
    }
    .hero-sidebar {
        flex-direction: row;
        gap: 24px;
        justify-content: center;
        flex-wrap: wrap;
    }
    .avatar-wrapper {
        max-width: 220px;
    }
    .server-probe {
        flex: 1;
        min-width: 280px;
        max-width: 400px;
    }
}

@media (max-width: 768px) {
    .container { padding: 0 16px; }
    .ide-statusbar { padding: 8px 14px; flex-wrap: wrap; gap: 8px; }
    .status-left, .status-right { gap: 12px; font-size: 0.72rem; }
    .status-right .status-item:nth-child(n+3) { display: none; }
    .hero { margin: 30px 0 60px; }
    .hero-sidebar { flex-direction: column; }
    .server-probe { max-width: 100%; }
    .section { margin: 80px 0; }
    .section-title { font-size: 1.35rem; }
    .terminal-body { padding: 24px 20px; min-height: auto; }
    .title-gradient { font-size: 1.45rem; }
    .contact-panel { padding: 50px 24px; }
    .contact-links { flex-direction: column; gap: 14px; }
    .contact-btn { justify-content: center; }
    .code-lines { padding: 20px; font-size: 0.88rem; }
    .line-numbers { padding: 20px 12px; font-size: 0.82rem; }
    .project-card, .skill-card { padding: 24px; }
}
