/* 全局样式 */
:root {
    --primary-color: #4a90e2;
    --secondary-color: #63b3ed;
    --accent-color: #48bb78;
    --light-accent: #9ae6b4;
    --text-color: #2d3748;
    --light-bg: #f7fafc;
    --dark-bg: #2d3748;
    --darker-bg: #1a202c;
    --achievement-icon-color: #e53e3e;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
}

/* 导航栏样式 */
header {
    background: linear-gradient(to bottom, var(--darker-bg), var(--dark-bg));
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo h1 {
    color: white;
    font-size: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

.nav-links a:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

/* 主要内容样式 */
main {
    margin-top: 80px;
}

.hero {
    background-color: var(--light-bg);
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    opacity: 0.1;
    z-index: 0;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: -30px;
    width: 150px;
    height: 173px;
    background: linear-gradient(135deg, var(--accent-color), var(--light-accent));
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    opacity: 0.1;
    z-index: 0;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.profile-img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    margin-bottom: 2rem;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.social-links {
    margin-top: 2rem;
}

.social-links a {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin: 0 1rem;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--secondary-color);
}

/* 技能部分样式 */
.skills {
    padding: 4rem 2rem;
    background-color: white;
    position: relative;
}

.skills::before {
    content: '';
    position: absolute;
    top: 20%;
    right: -30px;
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, var(--accent-color), var(--light-accent));
    border-radius: 50%;
    opacity: 0.1;
    z-index: 0;
}

.skills h2 {
    text-align: center;
    margin-bottom: 3rem;
}

.skills-container {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.skill {
    text-align: center;
    padding: 2rem;
    background-color: var(--light-bg);
    border-radius: 10px;
    transition: transform 0.3s;
}

.skill:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.skill i {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background-color: #ddd;
    border-radius: 5px;
    margin-top: 1rem;
    overflow: hidden;
}

.progress {
    height: 100%;
    background-color: var(--secondary-color);
    border-radius: 5px;
    transition: width 0.3s ease;
}

/* 项目展示样式 */
.featured-projects {
    padding: 4rem 2rem;
    background-color: var(--light-bg);
    position: relative;
}

.featured-projects::before {
    content: '';
    position: absolute;
    bottom: 10%;
    left: -40px;
    width: 180px;
    height: 207px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    opacity: 0.1;
    z-index: 0;
}

.featured-projects::after {
    content: '';
    position: absolute;
    top: 30%;
    right: -20px;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--accent-color), var(--light-accent));
    border-radius: 50%;
    opacity: 0.1;
    z-index: 0;
}

.featured-projects h2 {
    text-align: center;
    margin-bottom: 3rem;
}

.projects-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.project-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.project-card h3 {
    padding: 1.5rem 1.5rem 0.5rem;
}

.project-card p {
    padding: 0 1.5rem 1.5rem;
    color: #666;
}

.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background-color: var(--secondary-color);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    margin: 0 1.5rem 1.5rem;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: var(--primary-color);
}

/* 页脚样式 */
footer {
    background: linear-gradient(to top, var(--darker-bg), var(--dark-bg));
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, 
        transparent, 
        rgba(255, 255, 255, 0.1), 
        transparent
    );
}

.footer-content {
    position: relative;
    z-index: 1;
}

.footer-content p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* 响应式设计 */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        text-align: center;
    }

    .nav-links {
        margin-top: 1rem;
        flex-direction: column;
    }

    .nav-links li {
        margin: 0.5rem 0;
    }

    .hero {
        padding: 2rem 1rem;
    }

    .skills-container {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }
}

/* 装饰图案样式 */
.decoration {
    position: relative;
    overflow: hidden;
}

/* 圆形装饰 */
.circle-decoration {
    position: absolute;
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
}

.circle-blue {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    opacity: 0.1;
}

.circle-green {
    background: linear-gradient(135deg, var(--accent-color), var(--light-accent));
    opacity: 0.1;
}

/* 六边形装饰 */
.hexagon-decoration {
    position: absolute;
    z-index: 0;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    pointer-events: none;
}

.hexagon-blue {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    opacity: 0.1;
}

.hexagon-green {
    background: linear-gradient(135deg, var(--accent-color), var(--light-accent));
    opacity: 0.1;
}

/* 波浪装饰 */
.wave-decoration {
    position: absolute;
    width: 100%;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    opacity: 0.1;
    clip-path: polygon(0% 0%, 16.66% 50%, 33.33% 0%, 50% 50%, 66.66% 0%, 83.33% 50%, 100% 0%, 100% 100%, 0% 100%);
}

/* 内容容器确保在装饰上层 */
.hero-content,
.skills-container,
.projects-grid {
    position: relative;
    z-index: 1;
}

/* 卡片悬停效果增强 */
.skill:hover,
.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

/* 成就部分样式 */
.achievements {
    padding: 4rem 2rem;
    background-color: var(--light-bg);
}

.achievement-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.achievement-card {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.achievement-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.achievement-card i {
    font-size: 2.5rem;
    color: var(--achievement-icon-color);
    margin-bottom: 1rem;
    background: linear-gradient(to bottom, #ff6b6b, #ffd93d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
}

.achievement-card i::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: inherit;
    filter: blur(8px);
    opacity: 0.3;
    z-index: -1;
}

.achievement-card h3 {
    margin-bottom: 1rem;
    color: var(--text-color);
}

.achievement-card p {
    color: #666;
    line-height: 1.6;
}

/* Profile照片装饰 */
.profile-container {
    position: relative;
    display: inline-block;
    margin: 20px;
}

.profile-img {
    position: relative;
    z-index: 2;
    border-radius: 50%;
    width: 200px;
    height: 200px;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.binary-decoration {
    position: absolute;
    font-family: 'Courier New', monospace;
    color: rgba(99, 179, 237, 0.2);
    font-size: 14px;
    pointer-events: none;
    white-space: nowrap;
    z-index: 1;
}

.binary-1 {
    top: 20%;
    left: -30px;
    transform: rotate(-15deg);
}

.binary-2 {
    top: 40%;
    right: -30px;
    transform: rotate(15deg);
    color: rgba(72, 187, 120, 0.2);
}

.binary-3 {
    bottom: 20%;
    left: -20px;
    transform: rotate(-10deg);
}

.binary-4 {
    bottom: 30%;
    right: -25px;
    transform: rotate(20deg);
    color: rgba(72, 187, 120, 0.2);
} 