/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #00d9ff;
    --primary-dark: #0099cc;
    --secondary-color: #6c63ff;
    --dark-bg: #0a192f;
    --card-bg: #112240;
    --text-primary: #e6f1ff;
    --text-secondary: #8892b0;
    --accent: #64ffda;
    --border-color: #233554;
    --shadow: rgba(2, 12, 27, 0.7);
    --gradient: linear-gradient(135deg, #00d9ff, #6c63ff);
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.5; /* 缩小行高 */
    overflow-x: hidden;
    position: relative;
    font-size: 14px; /* 基础字体缩小 */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem; /* 缩小内边距 */
    position: relative;
    z-index: 1;
}

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 2rem; /* 缩小间距 */
    position: relative;
    padding: 2rem 0; /* 缩小内边距 */
    overflow: hidden;
}

.tech-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(var(--border-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--border-color) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.1;
    z-index: -1;
}

.avatar {
    margin: 0 auto 1rem; /* 缩小间距 */
    width: 100px; /* 缩小头像尺寸 */
    height: 100px;
    border-radius: 50%;
    background: var(--gradient);
    padding: 2px; /* 缩小边框 */
    position: relative;
    animation: float 6s ease-in-out infinite;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    background: var(--card-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem; /* 缩小图标 */
    color: var(--primary-color);
}

.name {
    font-size: 1.6rem; /* 缩小名字字体 */
    font-weight: 700;
    margin-bottom: 0.3rem; /* 缩小间距 */
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.title {
    font-size: 1rem; /* 缩小标题字体 */
    color: var(--text-secondary);
    margin-bottom: 0.8rem; /* 缩小间距 */
    font-weight: 300;
    letter-spacing: 2px; /* 缩小字间距 */
    text-transform: uppercase;
}

.tagline {
    font-size: 0.95rem; /* 缩小标语字体 */
    color: var(--primary-color);
    font-family: 'JetBrains Mono', monospace;
    min-height: 20px; /* 缩小最小高度 */
}

.typewriter {
    border-right: 2px solid var(--primary-color);
    padding-right: 5px;
    animation: blink 1s infinite;
}

/* 布局 */
.content-grid {
    display: grid;
    grid-template-columns: 280px 1fr; /* 缩小侧边栏宽度 */
    gap: 1.5rem; /* 缩小间距 */
    margin-bottom: 2rem; /* 缩小间距 */
}

/* 卡片样式 */
.card {
    background: var(--card-bg);
    border-radius: 8px; /* 缩小圆角 */
    padding: 1.2rem; /* 缩小内边距 */
    margin-bottom: 1.2rem; /* 缩小间距 */
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-3px); /* 缩小悬浮位移 */
    box-shadow: 0 8px 25px -12px rgba(2, 12, 27, 0.7); /* 调整阴影 */
}

.card:hover::before {
    transform: scaleX(1);
}

.card h2 {
    color: var(--text-primary);
    font-size: 1.1rem; /* 缩小标题字体 */
    margin-bottom: 1rem; /* 缩小间距 */
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card h2 i {
    color: var(--primary-color);
    font-size: 0.9rem; /* 缩小图标 */
}

/* 联系方式 */
.contact-info ul {
    list-style: none;
}

.contact-info li {
    display: flex;
    align-items: center;
    gap: 0.6rem; /* 缩小间距 */
    margin-bottom: 0.6rem; /* 缩小间距 */
    padding: 0.4rem 0; /* 缩小内边距 */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.contact-info li:last-child {
    border-bottom: none;
}

.contact-info i {
    color: var(--primary-color);
    width: 16px; /* 缩小图标宽度 */
    text-align: center;
    font-size: 0.8rem; /* 缩小图标 */
}

/* 技能标签 */
.skill-category {
    margin-bottom: 1rem; /* 缩小间距 */
}

.skill-category h3 {
    color: var(--text-secondary);
    font-size: 0.8rem; /* 缩小字体 */
    font-weight: 500;
    margin-bottom: 0.4rem; /* 缩小间距 */
    text-transform: uppercase;
    letter-spacing: 0.5px; /* 缩小字间距 */
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem; /* 缩小间距 */
}

.skill-tag {
    background: rgba(100, 255, 218, 0.1);
    color: var(--accent);
    padding: 0.2rem 0.6rem; /* 缩小内边距 */
    border-radius: 12px; /* 缩小圆角 */
    font-size: 0.75rem; /* 缩小字体 */
    border: 1px solid rgba(100, 255, 218, 0.2);
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background: rgba(100, 255, 218, 0.2);
    transform: translateY(-1px); /* 缩小悬浮位移 */
}

/* 语言能力 */
.language-item {
    margin-bottom: 0.8rem; /* 缩小间距 */
}

.level-bar {
    height: 4px; /* 缩小进度条高度 */
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px; /* 缩小圆角 */
    margin-top: 0.2rem; /* 缩小间距 */
    overflow: hidden;
}

.level {
    height: 100%;
    background: var(--gradient);
    border-radius: 2px; /* 缩小圆角 */
    transition: width 1s ease;
}

/* 时间线 */
.timeline-item {
    position: relative;
    padding-left: 1.2rem; /* 缩小内边距 */
    margin-bottom: 1.2rem; /* 缩小间距 */
    padding-bottom: 1.2rem; /* 缩小内边距 */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.timeline-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px; /* 调整位置 */
    width: 6px; /* 缩小圆点 */
    height: 6px;
    background: var(--primary-color);
    border-radius: 50%;
}

.timeline-header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.8rem; /* 缩小间距 */
    margin-bottom: 0.4rem; /* 缩小间距 */
}

.timeline-header h3 {
    color: var(--text-primary);
    font-size: 1rem; /* 缩小字体 */
}

.company {
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.9rem; /* 缩小字体 */
}

.date {
    color: var(--text-secondary);
    font-size: 0.8rem; /* 缩小字体 */
    margin-left: auto;
}

.timeline-item ul {
    list-style: none;
    padding-left: 0.8rem; /* 缩小内边距 */
}

.timeline-item li {
    position: relative;
    padding-left: 0.8rem; /* 缩小内边距 */
    margin-bottom: 0.2rem; /* 缩小间距 */
    color: var(--text-secondary);
    font-size: 0.85rem; /* 缩小字体 */
}

.timeline-item li::before {
    content: '▸▸';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-size: 0.8rem; /* 缩小图标 */
}

/* 项目卡片 */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); /* 调整最小宽度 */
    gap: 0.8rem; /* 缩小间距 */
}

.project-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px; /* 缩小圆角 */
    padding: 1rem; /* 缩小内边距 */
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.project-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px); /* 缩小悬浮位移 */
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.6rem; /* 缩小间距 */
    flex-wrap: wrap;
    gap: 0.4rem; /* 缩小间距 */
}

.project-header h3 {
    color: var(--text-primary);
    font-size: 1rem; /* 缩小字体 */
}

.project-tag {
    background: rgba(108, 99, 255, 0.1);
    color: var(--text-primary);
    padding: 0.15rem 0.5rem; /* 缩小内边距 */
    border-radius: 10px; /* 缩小圆角 */
    font-size: 0.7rem; /* 缩小字体 */
    border: 1px solid rgba(108, 99, 255, 0.2);
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem; /* 缩小间距 */
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.8rem; /* 缩小字体 */
    margin-top: 0.6rem; /* 缩小间距 */
    transition: all 0.3s ease;
}

.project-link:hover {
    color: var(--primary-dark);
    gap: 0.3rem; /* 缩小间距 */
}

/* 教育背景 */
.edu-item {
    margin-bottom: 1.2rem; /* 缩小间距 */
    padding-bottom: 1.2rem; /* 缩小内边距 */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.edu-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.edu-item h3 {
    color: var(--text-primary);
    font-size: 1rem; /* 缩小字体 */
    margin-bottom: 0.2rem; /* 缩小间距 */
}

.degree {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 0.2rem; /* 缩小间距 */
    font-size: 0.9rem; /* 缩小字体 */
}

.edu-item .date {
    color: var(--text-secondary);
    font-size: 0.8rem; /* 缩小字体 */
    margin-bottom: 0.2rem; /* 缩小间距 */
}

.note {
    color: var(--text-secondary);
    font-size: 0.8rem; /* 缩小字体 */
    font-style: italic;
}

/* 终端样式 */
.terminal {
    background: #1a1a1a;
    border-radius: 6px; /* 缩小圆角 */
    overflow: hidden;
    margin-bottom: 1.2rem; /* 缩小间距 */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5); /* 调整阴影 */
}

.terminal-header {
    background: #333;
    padding: 0.4rem 0.8rem; /* 缩小内边距 */
    display: flex;
    align-items: center;
    gap: 0.4rem; /* 缩小间距 */
}

.terminal-dot {
    width: 10px; /* 缩小圆点 */
    height: 10px;
    border-radius: 50%;
}

.terminal-dot.red { background: #ff5f56; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green { background: #27ca3f; }

.terminal-title {
    color: #aaa;
    font-size: 0.8rem; /* 缩小字体 */
    margin-left: 0.8rem; /* 缩小间距 */
    font-family: 'JetBrains Mono', monospace;
}

.terminal-body {
    padding: 0.8rem; /* 缩小内边距 */
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem; /* 缩小字体 */
    min-height: 50px; /* 缩小最小高度 */
}

.prompt {
    color: #27ca3f;
    margin-right: 0.4rem; /* 缩小间距 */
}

.cursor {
    animation: blink 1s infinite;
    color: #00d9ff;
    font-weight: bold;
}

/* 页脚 */
.footer {
    text-align: center;
    margin-top: 2rem; /* 缩小间距 */
    padding-top: 1.5rem; /* 缩小内边距 */
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.copyright {
    color: var(--text-secondary);
    font-size: 0.8rem; /* 缩小字体 */
}

/* 粒子特效 */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* 头像照片样式 */
.avatar-photo {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.1); /* 缩小边框 */
    transition: transform 0.3s ease;
}

.avatar-photo:hover {
    transform: scale(1.03); /* 缩小缩放效果 */
}

/* 动画 */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); } /* 缩小浮动幅度 */
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* 荣誉奖项样式 */
.honors-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.honor-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
    transition: all 0.3s ease;
}

.honor-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(5px);
}

.honor-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.honor-icon i {
    color: white;
    font-size: 1rem;
}

.honor-content {
    flex: 1;
}

.honor-content h3 {
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 0.3rem;
    font-weight: 600;
}

.honor-date {
    color: var(--primary-color);
    font-size: 0.8rem;
    margin-bottom: 0.3rem;
    font-weight: 500;
}

.honor-desc {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.4;
}

/* 专业资格证书样式 - 与项目经验配色一致 */
.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem; /* 缩小间距 */
    margin-top: 1rem;
}

.cert-item {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem; /* 缩小间距 */
    padding: 1rem; /* 缩小内边距 */
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px; /* 缩小圆角 */
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-left: 3px solid var(--primary-color); /* 使用主色调 */
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cert-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.cert-item:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
    box-shadow: 0 8px 25px -12px var(--shadow);
}

.cert-item:hover::before {
    transform: scaleX(1);
}

.cert-icon {
    color: var(--primary-color);
    background: rgba(0, 217, 255, 0.1);
    width: 40px; /* 缩小尺寸 */
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem; /* 缩小图标 */
    border: 1px solid rgba(0, 217, 255, 0.2);
}

.cert-content {
    flex: 1;
}

.cert-content h3 {
    color: var(--text-primary);
    font-size: 1rem; /* 缩小字体 */
    margin-bottom: 0.4rem; /* 缩小间距 */
    font-weight: 600;
}

.cert-org {
    color: var(--primary-color);
    font-size: 0.85rem; /* 缩小字体 */
    margin-bottom: 0.3rem; /* 缩小间距 */
    font-weight: 500;
}

.cert-date {
    color: var(--text-secondary);
    font-size: 0.8rem; /* 缩小字体 */
    margin-bottom: 0.3rem; /* 缩小间距 */
}

.cert-desc {
    color: var(--text-secondary);
    font-size: 0.8rem; /* 缩小字体 */
    line-height: 1.4;
}

/* 职称样式 */
.title-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem; /* 缩小间距 */
    margin-top: 1rem;
}

.title-item {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem; /* 缩小间距 */
    padding: 1rem; /* 缩小内边距 */
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px; /* 缩小圆角 */
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-left: 3px solid var(--primary-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.title-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.title-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
    border-color: var(--secondary-color);
    box-shadow: 0 8px 25px -12px var(--shadow);
}

.title-item:hover::before {
    transform: scaleX(1);
}

.title-icon {
    color: var(--primary-color);
    background: rgba(108, 99, 255, 0.1);
    width: 40px; /* 缩小尺寸 */
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem; /* 缩小图标 */
    border: 1px solid rgba(108, 99, 255, 0.2);
}

.title-content {
    flex: 1;
}

.title-content h3 {
    color: var(--text-primary);
    font-size: 1rem; /* 缩小字体 */
    margin-bottom: 0.4rem; /* 缩小间距 */
    font-weight: 600;
}

.title-org {
    color: var(--text-primary);
    font-size: 0.85rem; /* 缩小字体 */
    margin-bottom: 0.3rem; /* 缩小间距 */
    font-weight: 500;
}

.title-date {
    color: var(--text-secondary);
    font-size: 0.8rem; /* 缩小字体 */
    margin-bottom: 0.3rem; /* 缩小间距 */
}

.title-desc {
    color: var(--text-secondary);
    font-size: 0.8rem; /* 缩小字体 */
    line-height: 1.4;
}

/* 响应式设计 */
@media (max-width: 768px) {

    .tech-advantages-box {
        padding: 1.2rem;
        margin-bottom: 1.5rem;
    }
    
    .tech-advantages-header {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .tech-advantages-header h3 {
        font-size: 1.1rem;
    }
    
    .tech-advantages-content p {
        font-size: 1.0rem;
        text-align: left;
    }

    .content-grid {
        grid-template-columns: 1fr;
        gap: 1rem; /* 缩小间距 */
    }
    
    .name {
        font-size: 1.8rem; /* 缩小字体 */
    }
    
    .container {
        padding: 1.2rem; /* 缩小内边距 */
    }
    
    .project-grid {
        grid-template-columns: 1fr;
        gap: 1.1rem; /* 缩小间距 */
    }
    
    .card {
        margin-bottom: 1rem; /* 缩小间距 */
        padding: 1rem; /* 缩小内边距 */
    }
    
    .honor-item {
        flex-direction: column;
        text-align: center;
        gap: 0.8rem;
    }
    
    .honor-icon {
        align-self: center;
    }
    
    .honor-item:hover {
        transform: translateY(-3px);
    }
    
    .certifications-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem; /* 缩小间距 */
    }
    
    .cert-item {
        flex-direction: column;
        text-align: center;
        gap: 0.8rem;
    }
    
    .cert-icon {
        align-self: center;
    }
    
    .cert-item:hover {
        transform: translateY(-2px);
    }
    
    .title-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    .title-item {
        flex-direction: column;
        text-align: center;
        gap: 0.8rem;
    }
    
    .title-icon {
        align-self: center;
    }
    
    .title-item:hover {
        transform: translateY(-3px);
    }
}

@media (max-width: 480px) {
    .timeline-header {
        flex-direction: column;
        gap: 0.3rem; /* 缩小间距 */
    }
    
    .date {
        margin-left: 0;
    }
    
    .name {
        font-size: 1.6rem; /* 缩小字体 */
    }
    
    .avatar {
        width: 80px; /* 缩小头像 */
        height: 80px;
    }
    
    .header {
        padding: 1.5rem 0; /* 缩小内边距 */
        margin-bottom: 1.5rem; /* 缩小间距 */
    }
    
    .cert-item {
        padding: 0.8rem; /* 缩小内边距 */
    }
    
    .cert-icon {
        width: 35px; /* 缩小尺寸 */
        height: 35px;
        font-size: 0.9rem; /* 缩小图标 */
    }
    
    .title-item {
        padding: 1rem;
    }
    
    .title-icon {
        width: 40px;
        height: 40px;
    }
    
    .title-content h3 {
        font-size: 1.1rem;
    }
}

/* 技术优势框框样式 */
.tech-advantages-box {
    background: var(--card-bg);
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 217, 255, 0.1);
    transition: all 0.3s ease;
}

.tech-advantages-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.05) 0%, transparent 50%);
    z-index: 0;
}

.tech-advantages-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 217, 255, 0.15);
    border-color: var(--accent);
}

.tech-advantages-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.tech-advantages-header i {
    color: var(--accent);
    font-size: 1.0rem;
    background: rgba(100, 255, 218, 0.1);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(100, 255, 218, 0.2);
}

.tech-advantages-header h3 {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tech-advantages-content {
    position: relative;
    z-index: 1;
}

.tech-advantages-content p {
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.6;
    margin: 0;
    text-align: justify;
}