/* 全局设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #050505;
    color: #e0e0e0;
    font-family: 'Share Tech Mono', 'Courier New', Courier, monospace;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

/* === 1. 自定义光标 === */
#cursor-glow {
    width: 20px;
    height: 20px;
    border: 2px solid #00f3ff;
    border-radius: 50%;
    position: fixed;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
    transition: width 0.15s, height 0.15s, background 0.15s;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.4);
    mix-blend-mode: exclusion;
}

body:active #cursor-glow {
    width: 15px;
    height: 15px;
    background: #00f3ff;
    box-shadow: 0 0 30px #00f3ff;
}

/* === 2. 背景漂浮文字层 === */
#background-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(circle at center, #111 0%, #000 100%);
}

.floating-word {
    position: absolute;
    color: rgba(0, 255, 136, 0.25);
    font-weight: bold;
    user-select: none;
    white-space: nowrap;
    will-change: transform, opacity;
    text-shadow: 0 0 5px rgba(0, 255, 136, 0.1);
}

/* === 3. 主界面布局 (毛玻璃效果) === */
.main-wrapper {
    display: flex;
    width: 1200px;
    max-width: 95%;
    height: 85vh;
    z-index: 10;
    background: rgba(20, 20, 20, 0.2);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
    border-radius: 16px;
    overflow: hidden;
}

/* --- 左侧头像区域 --- */
.left-panel {
    width: 35%;
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    padding-top: 60px;
    padding-right: 30px;
    background: rgba(0, 0, 0, 0.2);
}

.avatar-box {
    width: 300px;
    height: 300px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.1s linear;
    will-change: transform;
    margin-right: 10px;
}

.my-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.9) contrast(1.1) grayscale(0.2);
    border: 1px solid rgba(0, 243, 255, 0.3);
    position: relative;
    z-index: 2;
}

.avatar-border {
    position: absolute;
    top: -15px;
    left: -15px;
    width: 100%;
    height: 100%;
    border: 2px solid rgba(0, 243, 255, 0.3);
    z-index: 1;
    transform: translateZ(-20px);
}

/* --- 右侧信息区域 --- */
.right-panel {
    width: 65%;
    padding: 50px 50px 50px 40px;
    height: 100%;
    overflow-y: auto;
    scroll-behavior: smooth;
    /* CSS层面的平滑滚动 */
}

/* 滚动条美化 */
.right-panel::-webkit-scrollbar {
    width: 6px;
}

.right-panel::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.right-panel::-webkit-scrollbar-thumb {
    background: #004e53;
    border-radius: 3px;
}

.right-panel::-webkit-scrollbar-thumb:hover {
    background: #00f3ff;
}

header {
    margin-bottom: 40px;
}

/* === 4. 名字故障艺术效果 === */
.name {
    font-size: 4rem;
    color: #fff;
    font-weight: 900;
    letter-spacing: 2px;
    line-height: 1.1;
    position: relative;
    display: inline-block;
}

.name .en-name {
    display: block;
    font-size: 1.5rem;
    color: #00f3ff;
    font-weight: normal;
    margin-top: 5px;
    letter-spacing: 4px;
}

.name::before,
.name::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    opacity: 0.8;
}

.name::before {
    left: 2px;
    text-shadow: -2px 0 #ff00c1;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
    z-index: -1;
}

.name::after {
    left: -2px;
    text-shadow: -2px 0 #00fff9;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
    z-index: -2;
}

@keyframes glitch-anim {
    0% {
        clip: rect(30px, 9999px, 10px, 0);
    }

    5% {
        clip: rect(80px, 9999px, 90px, 0);
    }

    10% {
        clip: rect(10px, 9999px, 40px, 0);
    }

    15% {
        clip: rect(60px, 9999px, 20px, 0);
    }

    50% {
        clip: rect(0, 0, 0, 0);
    }

    100% {
        clip: rect(50px, 9999px, 60px, 0);
    }
}

@keyframes glitch-anim2 {
    0% {
        clip: rect(10px, 9999px, 80px, 0);
    }

    20% {
        clip: rect(80px, 9999px, 10px, 0);
    }

    50% {
        clip: rect(0, 0, 0, 0);
    }

    100% {
        clip: rect(30px, 9999px, 50px, 0);
    }
}

.job-title {
    color: #888;
    font-size: 1.2rem;
    margin-top: 15px;
    height: 24px;
    font-family: monospace;
}

.job-title::after {
    content: '_';
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

.divider {
    border: 0;
    height: 1px;
    background: linear-gradient(90deg, #00f3ff, transparent);
    margin: 20px 0 40px 0;
    width: 100%;
    opacity: 0.5;
}

.content-section {
    margin-bottom: 50px;
}

.content-section h3 {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.content-section h3::before {
    content: '//';
    color: #00f3ff;
    margin-right: 10px;
}

.info-list {
    list-style: none;
}

.info-list li {
    margin-bottom: 15px;
    font-size: 1.1rem;
    display: flex;
}

.key {
    color: #00f3ff;
    width: 120px;
    font-weight: bold;
    display: inline-block;
    text-shadow: 0 0 5px rgba(0, 243, 255, 0.3);
}

.value {
    color: #eee;
}

/* === 5. 技能标签样式 === */
.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.tag {
    background: rgba(255, 255, 255, 0.03);
    padding: 8px 16px;
    border-radius: 4px;
    border: 1px solid rgba(0, 243, 255, 0.15);
    color: #bbb;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.tag.highlight {
    border-color: rgba(0, 243, 255, 0.4);
    color: #e0e0e0;
    background: rgba(0, 243, 255, 0.05);
}

.tag:hover {
    background: rgba(0, 243, 255, 0.2);
    border-color: #00f3ff;
    color: #fff;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.4);
    transform: translateY(-3px) scale(1.05);
    z-index: 5;
}

/* --- 新增：可点击标签交互样式 --- */
.tag.clickable {
    cursor: pointer;
    border: 1px dashed rgba(0, 243, 255, 0.5);
    padding-right: 28px;
}

.tag.clickable::after {
    content: '↴';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    opacity: 0.7;
    transition: 0.3s;
}

.tag.clickable:hover::after {
    opacity: 1;
    transform: translateY(-30%);
}

.skill-desc {
    line-height: 1.8;
    color: #ccc;
    font-size: 1.1rem;
}

/* === 6. 项目卡片样式 (赛博风) === */
.project-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(0, 0, 0, 0.4) 100%);
    border: 1px solid rgba(0, 243, 255, 0.15);
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
}

.project-card:hover {
    border-color: rgba(0, 243, 255, 0.5);
    transform: translateY(-3px);
    box-shadow: 0 10px 40px -10px rgba(0, 243, 255, 0.15);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 12px;
}

.project-header h4 {
    color: #fff;
    font-size: 1.25rem;
    font-weight: bold;
    letter-spacing: 1px;
}

.project-en {
    color: #00f3ff;
    font-size: 0.9rem;
    font-weight: normal;
}

.project-year {
    font-size: 0.8rem;
    background: rgba(0, 243, 255, 0.1);
    color: #00f3ff;
    padding: 4px 8px;
    border-radius: 4px;
}

.project-body {
    display: flex;
    gap: 25px;
}

.project-thumb {
    width: 200px;
    height: auto;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.project-thumb img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform 0.5s ease;
    filter: grayscale(0.3);
    display: block;
}

.project-card:hover .project-thumb img {
    transform: scale(1.1);
    filter: grayscale(0);
}

.project-desc {
    flex: 1;
}

.project-desc p {
    font-size: 0.95rem;
    color: #ccc;
    line-height: 1.6;
    margin-bottom: 12px;
}

.project-points {
    list-style: none;
    margin-bottom: 20px;
}

.project-points li {
    font-size: 0.9rem;
    color: #999;
    margin-bottom: 6px;
    padding-left: 15px;
    position: relative;
}

.project-points li::before {
    content: '▹';
    color: #00f3ff;
    position: absolute;
    left: 0;
}

.project-points strong {
    color: #e0e0e0;
}

/* 按钮样式 */
.play-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 20px;
    background: rgba(0, 243, 255, 0.05);
    color: #00f3ff;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
    border: 1px solid rgba(0, 243, 255, 0.4);
    transition: all 0.3s;
    letter-spacing: 1px;
    clip-path: polygon(0 0, 100% 0, 100% 70%, 90% 100%, 0 100%);
}

.play-btn:hover {
    background: #00f3ff;
    color: #000;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.4);
}

.link-icon {
    margin-left: 8px;
    font-size: 1.1em;
}

/* === 7. 高亮闪烁动画 (JS触发) === */
.highlight-flash {
    animation: flashCard 1.5s ease-out forwards;
}

@keyframes flashCard {
    0% {
        border-color: #00f3ff;
        box-shadow: 0 0 40px rgba(0, 243, 255, 0.6);
        background: rgba(0, 243, 255, 0.15);
    }

    100% {
        border-color: rgba(0, 243, 255, 0.15);
        box-shadow: none;
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(0, 0, 0, 0.4) 100%);
    }
}

/* 下载按钮 */
.download-btn {
    position: absolute;
    top: 30px;
    right: 50px;
    text-decoration: none;
    color: #00f3ff;
    border: 1px solid #00f3ff;
    padding: 10px 20px;
    font-weight: bold;
    font-size: 0.9rem;
    transition: 0.3s;
    z-index: 100;
    background: rgba(0, 0, 0, 0.5);
    letter-spacing: 2px;
}

.download-btn:hover {
    background: #00f3ff;
    color: #000;
    box-shadow: 0 0 20px #00f3ff;
}

/* 响应式适配 */
@media (max-width: 900px) {
    .main-wrapper {
        flex-direction: column;
        height: auto;
        overflow: visible;
        width: 100%;
        max-width: 100%;
        border-radius: 0;
        background: rgba(10, 10, 10, 0.85);
    }

    body {
        height: auto;
        overflow-y: auto;
        display: block;
        padding: 0;
    }

    .left-panel {
        width: 100%;
        justify-content: center;
        padding: 40px 0;
        background: transparent;
    }

    .right-panel {
        width: 100%;
        padding: 20px 25px 60px 25px;
        overflow: visible;
    }

    .avatar-box {
        width: 200px;
        height: 200px;
        margin-right: 0;
    }

    .name {
        font-size: 2.5rem;
    }

    .download-btn {
        position: static;
        display: block;
        text-align: center;
        margin: 20px 20px 0 20px;
    }

    #cursor-glow {
        display: none;
    }

    .project-body {
        flex-direction: column;
    }

    .project-thumb {
        width: 100%;
        height: 150px;
    }
}