* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
}

/* 导航栏 */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    border-bottom: 1px solid #e0e0e0;
}

    nav ul {
        list-style: none;
        display: flex;
        justify-content: center;
        gap: 2rem;
        padding: 0;
        margin: 0;
    }
    nav li {
        display: inline-block;
    }

    nav a {
        color: #333;
        text-decoration: none;
        font-weight: 500;
        padding: 0.5rem 1rem;
        border-radius: 4px;
        transition: all 0.3s ease;
    }

        nav a:hover,
        nav a.active {
            background: #333;
            color: white;
        }

/* 响应式设计 */
@media (max-width: 768px) {
    nav ul {
        flex-wrap: wrap; /* 确保导航栏在小屏幕上仍然是横向排列 */
        justify-content: space-around;
    }

    nav li {
        flex: 1; /* 让每个导航项占据相等的宽度 */
        text-align: center;
    }
}

/* 通用容器 */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    min-height: 100vh;
    padding: 5rem 0;
    display: flex;
    align-items: center;
}

/* 欢迎区域 */
#welcome {
    background: #fff;
    text-align: center;
}

.welcome-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #333;
    font-weight: 300;
    animation: fadeInUp 0.8s ease-out;
}

.welcome-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #666;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.cta-button {
    display: inline-block;
    background: #333;
    color: white;
    padding: 1rem 2rem;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}
.cta-button2 {
    display: inline-block;
    background: #333;
    color: white;
    padding: 1rem 2rem;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    animation: fadeInUp 0.8s ease-out 0.4s both;
    margin-left: 1rem;
}

    .cta-button:hover {
        background: #555;
        transform: translateY(-2px);
    }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 作品介绍区域 */
#portfolio {
    background: #f9f9f9;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #333;
    font-weight: 300;
    position: relative;
}

    .section-title::after {
        content: '';
        position: absolute;
        bottom: -10px;
        left: 50%;
        transform: translateX(-50%);
        width: 50px;
        height: 2px;
        background: #333;
    }

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.portfolio-item {
    background: white;
    padding: 2rem;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

    .portfolio-item:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    }

    .portfolio-item h3 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
        color: #333;
        font-weight: 500;
    }

    .portfolio-item p {
        color: #666;
        margin-bottom: 1rem;
    }

.portfolio-href {
    color: dimgrey;
}

/* 软件作品区域 */
#software {
    background: #fff;
}

.software-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.software-item {
    background: #f9f9f9;
    padding: 2rem;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
    position: relative;
}

    .software-item::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: #333;
    }

    .software-item:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    }

    .software-item h3 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
        color: #333;
        font-weight: 500;
    }

    .software-item .tech-stack {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin: 1rem 0;
    }

.tech-tag {
    background: #333;
    color: white;
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
}

.software-item p {
    color: #666;
    margin-bottom: 1rem;
}

.software-item a {
    color: dimgray;
}

/* 联系方式区域 */
#contact {
    background: #f9f9f9;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 3rem;
}

.contact-info {
    background: white;
    padding: 2rem;
    border: 1px solid #e0e0e0;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f9f9f9;
    transition: all 0.3s ease;
}

    .contact-item:hover {
        background: #333;
        color: white;
    }

.contact-icon {
    width: 40px;
    height: 40px;
    background: #666;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-weight: bold;
}

.contact-form {
    background: white;
    padding: 2rem;
    border: 1px solid #e0e0e0;
}

.form-group {
    margin-bottom: 1.5rem;
}

    .form-group label {
        display: block;
        margin-bottom: 0.5rem;
        font-weight: 500;
        color: #333;
    }

    .form-group input,
    .form-group textarea {
        width: 100%;
        padding: 0.8rem;
        border: 1px solid #ccc;
        background: #f9f9f9;
        transition: all 0.3s ease;
    }

        .form-group input:focus,
        .form-group textarea:focus {
            outline: none;
            border-color: #333;
            background: white;
        }

.submit-btn {
    background: #333;
    color: white;
    padding: 1rem 2rem;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    width: 100%;
}

    .submit-btn:hover {
        background: #555;
        transform: translateY(-2px);
    }

/* 响应式设计 */
@media (max-width: 768px) {
    .welcome-content h1 {
        font-size: 2rem;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }

    nav ul {
        flex-direction: column;
        gap: 1rem;
    }

    .portfolio-grid,
    .software-grid {
        grid-template-columns: 1fr;
    }
}

/* 滚动动画 */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

    .fade-in.visible {
        opacity: 1;
        transform: translateY(0);
    }
/* Footer */
footer {
    background: #333;
    color: white;
    padding: 2rem 0;
    margin-top: 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

.footer-logo {
    font-size: 2rem;
    font-weight: bold;
}

.footer-text {
    text-align: center;
    color: #ccc;
}

    .footer-text p {
        margin-bottom: 0.5rem;
    }
    .footer-text a {
        color: dimgray;
    }

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1rem;
    }

    .footer-text {
        text-align: center;
    }
}