
/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

:root {
    --primary-color: #ffffff;
    --secondary-color: #f8f9fa;
    --accent-color: #4a6cf7;
    --text-color: #333333;
    --text-light: #6c757d;
    --border-radius: 16px;
    --section-padding: 80px 20px;
    --container-max-width: 1200px;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
}

body {
    background-color: #f8f9fa;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* 导航栏样式 */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.nav-container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-color);
    display: flex;
    align-items: center;
}

.logo-icon {
    margin-right: 8px;
    font-size: 28px;
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-menu li {
    margin: 0 12px;
}

.nav-menu a {
    padding: 8px 16px;
    border-radius: 30px;
    font-weight: 500;
    position: relative;
}

.nav-menu a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-menu a:hover {
    color: var(--accent-color);
}

.nav-menu a:hover::before {
    width: 70%;
}


.hamburger {
    display: none;
    cursor: pointer;
    font-size: 24px;
}

/* 主要内容区域 */
main {
    margin-top: 80px;
}

section {
    background-color: var(--primary-color);
    margin: 40px auto;
    max-width: var(--container-max-width);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: var(--section-padding);
    transition: var(--transition);
}

section:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    font-size: 36px;
    position: relative;
    font-weight: 600;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), #6c8eff);
    border-radius: 2px;
}

/* 首页区域 */
.hero {
    text-align: center;
    padding: 120px 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e9f2 100%);
    border-radius: var(--border-radius);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" width="100" height="100" opacity="0.05"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="gray" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero p {
    font-size: 20px;
    max-width: 700px;
    margin: 0 auto 40px;
    color: var(--text-light);
}

.btn {
    display: inline-block;
    padding: 14px 32px;
    background: linear-gradient(90deg, var(--accent-color), #6c8eff);
    color: var(--primary-color);
    border-radius: 30px;
    font-weight: 500;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(74, 108, 247, 0.3);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(74, 108, 247, 0.4);
}

/* 自我介绍区域 */
.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-image {
    flex: 1;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: var(--transition);
}

.about-image:hover img {
    transform: scale(1.05);
}

.about-text {
    flex: 2;
}

.about-text h3 {
    margin-bottom: 20px;
    font-size: 28px;
    font-weight: 600;
}

.about-text p {
    margin-bottom: 20px;
    color: var(--text-light);
}

.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 30px;
}

.skill-tag {
    padding: 8px 16px;
    background-color: #f0f4ff;
    color: var(--accent-color);
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
}

/* 作品区域 */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.portfolio-item {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    background-color: var(--primary-color);
}

.portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.portfolio-image {
    height: 220px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e9f2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.portfolio-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(74, 108, 247, 0.1);
    opacity: 0;
    transition: var(--transition);
}

.portfolio-item:hover .portfolio-image::before {
    opacity: 1;
}

.portfolio-content {
    padding: 25px;
}

.portfolio-content h3 {
    margin-bottom: 10px;
    font-weight: 600;
}

.portfolio-content p {
    color: var(--text-light);
    margin-bottom: 15px;
}

.portfolio-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.portfolio-tag {
    padding: 4px 12px;
    background-color: #f0f4ff;
    color: var(--accent-color);
    border-radius: 30px;
    font-size: 12px;
}

/* 联系区域 */
.contact-form {
    max-width: 700px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 15px 20px;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    font-size: 16px;
    transition: var(--transition);
    background-color: #f8f9fa;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.1);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* 页脚 */
footer {
    background-color: var(--primary-color);
    padding: 60px 20px 30px;
    text-align: center;
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.05);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.social-links a {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #f0f4ff;
    color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 20px;
}

.social-links a:hover {
    background-color: var(--accent-color);
    color: var(--primary-color);
    transform: translateY(-5px);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-light);
}

.footer-links a:hover {
    color: var(--accent-color);
}

.copyright {
    color: var(--text-light);
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .about-content {
        flex-direction: column;
    }

    .about-image {
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }

    .portfolio-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 80%;
        height: calc(100vh - 70px);
        background-color: var(--primary-color);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 40px;
        transition: all 0.5s ease;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.05);
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu li {
        margin: 15px 0;
    }

    .nav-right {
        display: none;
    }

    .hero h1 {
        font-size: 36px;
    }

    .hero p {
        font-size: 18px;
    }

    .section-title {
        font-size: 30px;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 26px;
    }

    .hero h1 {
        font-size: 30px;
    }

    .hero p {
        font-size: 16px;
    }

    .footer-links {
        flex-direction: column;
        gap: 15px;
    }
}