/* 重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4f46e5;
    --primary-dark: #4338ca;
    --secondary-color: #10b981;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --bg-color: #ffffff;
    --bg-light: #f9fafb;
    --bg-dark: #111827;
    --border-color: #e5e7eb;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 8px;
    --radius-lg: 12px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo i {
    font-size: 1.8rem;
}

.nav {
    display: flex;
    gap: 30px;
}

.nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--radius);
    transition: all 0.3s ease;
}

.nav a:hover,
.nav a.active {
    background: var(--primary-color);
    color: white;
}

/* 主要内容区域 */
.main-content {
    background: var(--bg-color);
    border-radius: var(--radius-lg);
    margin: 20px 0;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

/* Hero 区域 */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    padding: 80px 40px;
    background: linear-gradient(135deg, var(--bg-light) 0%, #ffffff 100%);
}

.hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.highlight {
    color: var(--primary-color);
    -webkit-text-fill-color: var(--primary-color);
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-light);
    margin-bottom: 20px;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 40px;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn i {
    font-size: 1.1rem;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* 代码窗口样式 */
.code-window {
    background: var(--bg-dark);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.window-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: #1a1a1a;
    border-bottom: 1px solid #333;
}

.window-dots {
    display: flex;
    gap: 8px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27ca3f; }

.window-title {
    color: #999;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.9rem;
}

.window-content {
    padding: 30px;
}

.window-content pre {
    margin: 0;
    overflow-x: auto;
}

.window-content code {
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #e6e6e6;
}

.window-content .keyword { color: #ff79c6; }
.window-content .string { color: #f1fa8c; }
.window-content .function { color: #50fa7b; }
.window-content .comment { color: #6272a4; }

/* 通用区域样式 */
.section {
    padding: 80px 40px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 60px;
    color: var(--text-color);
}

/* 关于区域 */
.about-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.about-card {
    background: var(--bg-light);
    padding: 40px 30px;
    border-radius: var(--radius);
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.about-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.about-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.about-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-color);
}

.about-card p {
    color: var(--text-light);
    line-height: 1.7;
}

/* 项目区域 */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background: white;
    padding: 30px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.project-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.project-header i {
    font-size: 2rem;
    color: var(--primary-color);
}

.project-header h3 {
    font-size: 1.3rem;
    color: var(--text-color);
}

.project-card p {
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.7;
}

.project-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tag {
    background: var(--bg-light);
    color: var(--primary-color);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* 联系区域 */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    max-width: 900px;
    margin: 0 auto;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: var(--bg-light);
    border-radius: var(--radius);
    transition: all 0.3s ease;
}

.contact-item:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(5px);
}

.contact-item:hover i,
.contact-item:hover span {
    color: white;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    width: 30px;
}

.contact-item span {
    font-size: 1.1rem;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.contact-form form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-form input,
.contact-form textarea {
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

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

/* 页脚样式 */
.footer {
    background: var(--bg-dark);
    color: white;
    padding: 60px 0 30px;
}

.footer-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: white;
}

.footer-text {
    color: #9ca3af;
    margin-bottom: 30px;
    font-size: 1rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.footer-links a {
    color: #9ca3af;
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 60px 30px;
    }
    
    .hero-title {
        font-size: 2.8rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 20px;
        padding: 15px 0;
    }
    
    .nav {
        gap: 15px;
    }
    
    .nav a {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .section {
        padding: 60px 20px;
    }
    
    .section-title {
        font-size: 2rem;
        margin-bottom: 40px;
    }
    
    .about-content,
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 40px 20px;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .section {
        padding: 40px 15px;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
}