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

body {
    font-family: 'Microsoft YaHei', sans-serif;
    line-height: 1.8;
    padding: 20px;
    background-color: #f4f4f9;
    color: #333;
    margin-top: 100px; /* 为页面内容添加上边距，避免被header覆盖 */
}

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

/* nav ul li {
    margin: 0 15px;
} */

/* nav ul li a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
} */

.hero {
    width: 100%;
    height: 30%;
    background-size: cover;
    background-position: center;
    /* background-image: url('assets/images/homepage.png'); */
}
.hero img {
    width: 100%;
    height: auto;
    padding: 0 150px;
}
.about {
    padding: 50px 250px;
    text-align: center;
}

.about h2 {
    margin-bottom: 30px;
}

.about p {
    text-align: left;
}
.portfolio {
    padding: 50px 0px;
    background: #f9f9f9;
}

.portfolio h2 {
    text-align: center;
    margin-bottom: 30px;
}
.portfolio .portfolio-about {
    text-align: left;
    margin-bottom: 30px;
    padding: 0 250px;
}
.project-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    padding: 0 150px;
}

.project-card {
    background: #fff;
    border: 1px solid #ddd;
    padding: 20px;
    width: 25vw;
    max-width: 300px;
    min-width: 220px;
    text-align: center;
    height: 35vh;
    max-height: 300px;
    min-height: 150px;
}

.project-card img {
    max-width: 100%;
    height: 180px;
    border-radius: 20px;
}


footer {
    background: #333;
    color: #fff;
    text-align: center;
    padding: 10px 0;
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
}

@media (max-width: 1000px) {
    header {
        flex-direction: column;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
    }

    nav ul li {
        margin: 10px 0;
    }

    .project-cards {
        flex-direction: column;
        align-items: center;
        padding: 0;
    }

    .project-card {
        /* width: 80%; */
        width: 100%;
        height: auto;
    }
    .about {
        padding: 50px 30px;
        text-align: center;
    }

    .portfolio .portfolio-about {
        padding: 0 30px;
    }
    .hero img {
        padding: 0 30px;
    }
}
