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

:root {
    --primary: #3498db;
    --secondary: #2c3e50;
    --accent: #9b59b6;
    --light: #f8f9fa;
    --dark: #0a0a0f;
    --gray: #7f8c8d;
    --success: #2ecc71;
    --card-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #ffffff;
    background: var(--dark);
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏 */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid #2a2a3a;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.8rem;
    font-weight: bold;
    color: #ffffff;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(45deg, var(--primary), var(--accent));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}
/* Logo链接样式 */
.logo-link {
    text-decoration: none;
    color: inherit;
    display: inline-block;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.logo-link:hover {
    opacity: 0.9;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

/* 导航链接样式 */
/* 导航链接样式 - 修复版本 */
.nav-link {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 50px;
    text-decoration: none;
    padding: 0 0.5rem;
}

.nav-text-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

/* 中英文样式 */
.nav-text {
    display: block;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.nav-text-en {
    font-family: 'Segoe UI', sans-serif;
    text-transform: uppercase;
    color: #a0a0c0;
    order: 1;
}

.nav-text-zh {
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    color: #a0a0c0;
    order: 2;
}

/* 悬停效果 */
.nav-link:hover .nav-text-en,
.nav-link.active .nav-text-en {
    color: var(--primary);
    transform: translateY(-2px);
}

.nav-link:hover .nav-text-zh,
.nav-link.active .nav-text-zh {
    opacity: 0.8;
    transform: translateY(2px);
}

/* 底部线条 */
.nav-line {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: width 0.3s ease;
}

.nav-link:hover .nav-line,
.nav-link.active .nav-line {
    width: 80%;
}

/* 导航栏操作区域 */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* 用户头像链接 */
.user-avatar-link {
    text-decoration: none;
    display: block;
    cursor: pointer;
}

/* 用户头像容器 */
.user-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid transparent;
    background: linear-gradient(45deg, var(--primary), var(--accent));
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 默认头像样式 */
.default-avatar {
    background: linear-gradient(45deg, var(--primary), var(--accent));
    color: white;
    font-size: 1.5rem;
}

/* 悬停效果 */
.user-avatar-link:hover .user-avatar {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(52, 152, 219, 0.5);
    border-color: white;
}

/* 英雄区域 */
.hero-section {
    padding: 6rem 0 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1000px;
    width: 100%;
}

.hero-text h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #ffffff;
    background: linear-gradient(45deg, #ffffff, var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.hero-desc {
    font-size: 1.1rem;
    color: #a0a0c0;
    margin-bottom: 2rem;
    max-width: 500px;
    line-height: 1.8;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 1rem 2rem;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.cta-button:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.package-icon {
    font-size: 8rem;
    color: var(--primary);
    opacity: 0.8;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* 章节标题 */
.section-header {
    text-align: center;
    margin: 4rem 0 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    color: #ffffff;
    margin-bottom: 1rem;
}

.section-subtitle {
    color: #a0a0c0;
    font-size: 1.1rem;
}

/* 项目网格 */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.project-card {
    background: #1a1a24;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #2a2a3a;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.project-image {
    height: 200px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 4rem;
}

.project-tag {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary);
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.project-content {
    padding: 1.5rem;
}

.project-content h3 {
    color: #ffffff;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.project-desc {
    color: #a0a0c0;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tech-tag {
    background: rgba(52, 152, 219, 0.2);
    color: var(--primary);
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-link {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0.5rem 1rem;
    background: #2a2a3a;
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.project-link:hover {
    background: var(--primary);
    color: white;
}

/* 技能区域 */
.skills-section {
    background: #1a1a24;
    padding: 4rem 2rem;
    border-radius: 20px;
    margin: 4rem 0;
}

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

.skill-category {
    background: #2a2a3a;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
}

.skill-category h3 {
    color: #ffffff;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.skill-category ul {
    list-style: none;
}

.skill-category li {
    padding: 0.5rem 0;
    color: #a0a0c0;
    position: relative;
    padding-left: 1.5rem;
}

.skill-category li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--primary);
}

/* 联系表单 */
.contact-form {
    max-width: 500px;
    margin: 0 auto;
}

.form-title {
    color: #ffffff;
    margin-bottom: 2rem;
    font-size: 1.5rem;
}

.form-group {
    position: relative;
    margin-bottom: 2rem;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.8rem 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid #2a2a3a;
    color: #ffffff;
    font-size: 1rem;
    outline: none;
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.input-underline {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.form-input:focus ~ .input-underline,
.form-textarea:focus ~ .input-underline {
    width: 100%;
}

.send-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 1rem 2rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.send-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

/* 页脚 */
footer {
    background: #12121a;
    color: white;
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
    border-radius: 20px 20px 0 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 2rem;
    padding-right: 2rem;  /* 添加右侧内边距，使整体向右偏移 */
}

.footer-logo {
    font-size: 2rem;
    font-weight: bold;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-left: 2em;
}

.footer-tagline {
    color: #a0a0c0;
    font-size: 0.9rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #2a2a3a;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s;
}

.social-link:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    padding-top: 1.5rem;
    border-top: 1px solid #2a2a3a;
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding: 0 15px;
    }
    
    nav {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 0;
    }
    
    nav ul {
        gap: 1.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-text h1 {
        font-size: 2.5rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 2rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    nav ul {
        gap: 1rem;
    }
}
