/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --accent-color: #06b6d4;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --gray-color: #64748b;
    --border-radius: 12px;
    --box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: var(--light-color);
    overflow-x: hidden;
}

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

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

.logo h2 {
    color: var(--primary-color);
    font-weight: 700;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 500;
    transition: var(--transition);
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--dark-color);
    margin: 3px 0;
    transition: var(--transition);
}

/* 英雄区域 */
.hero {
    height: 100vh;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #dbeafe 100%);
    position: relative;
    overflow: hidden;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: calc(100vh - 80px);
}

.hero-text {
    flex: 1;
    max-width: 600px;
}

.hero-text h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.hero-text p {
    font-size: 1.2rem;
    color: var(--gray-color);
    margin-bottom: 2rem;
}

.cta-button {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 12px 30px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid var(--primary-color);
}

.cta-button:hover {
    background: transparent;
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: var(--box-shadow);
}

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

.hero-image img {
    max-width: 100%;
    height: auto;
}

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

h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--dark-color);
    position: relative;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* 关于我们 */
.about {
    background: white;
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--gray-color);
}

.skills h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.skills ul {
    list-style: none;
}

.skills li {
    padding: 0.5rem 0;
    position: relative;
    padding-left: 1.5rem;
}

.skills li::before {
    content: '▶';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

/* 项目展示 */
.projects {
    background: linear-gradient(to bottom, #f0f9ff, #e0f2fe);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

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

.project-card p {
    color: var(--gray-color);
    margin-bottom: 1.5rem;
}

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

.tech-stack span {
    background: #e0e7ff;
    color: var(--primary-color);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* 博客 */
.blog {
    background: white;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.blog-card {
    background: #f8fafc;
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 1px solid #e2e8f0;
    transition: var(--transition);
}

.blog-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
}

.blog-card h3 {
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.date {
    color: var(--gray-color);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* 联系我们 */
.contact {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info h3 {
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.contact-info p {
    color: var(--gray-color);
    margin-bottom: 2rem;
}

.contact-info ul {
    list-style: none;
}

.contact-info li {
    padding: 0.5rem 0;
    color: var(--gray-color);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form input,
.contact-form textarea {
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: var(--border-radius);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
}

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

.submit-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

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

/* 页脚 */
footer {
    background: var(--dark-color);
    color: white;
    padding: 3rem 0 1rem;
}

footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.app-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
}

.app-links h4 {
    color: white;
    margin-right: 1rem;
    align-self: center;
}

.app-links a {
    color: white;
    text-decoration: none;
    transition: var(--transition);
    padding: 0.3rem 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 0.9rem;
}

.app-links a:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

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

.social-links a {
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

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

/* 响应式设计 */
@media screen and (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        display: none;
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
        padding-top: 80px;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    h2 {
        font-size: 2rem;
    }

    footer .container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}