/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    color: #333;
    line-height: 1.6;
    background-color: #f9f9f9;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏样式 */
.navbar {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-item {
    margin-left: 20px;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #6c63ff;
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: #6c63ff;
}

.nav-link:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
    background-color: #333;
}

/* 英雄区域样式 */
.hero {
    display: flex;
    align-items: center;
    min-height: 100vh;
    padding: 100px 0 50px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.hero-content {
    flex: 1;
    padding-right: 50px;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.highlight {
    color: #6c63ff;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: #666;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #6c63ff;
    color: white;
    box-shadow: 0 5px 15px rgba(108, 99, 255, 0.3);
}

.btn-primary:hover {
    background-color: #5a52d5;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(108, 99, 255, 0.4);
}

.btn-secondary {
    background-color: white;
    color: #6c63ff;
    border: 2px solid #6c63ff;
}

.btn-secondary:hover {
    background-color: #6c63ff;
    color: white;
    transform: translateY(-3px);
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.hero-image-container {
    width: 400px;
    height: 400px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

.hero-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 关于我部分样式 */
.about {
    padding: 100px 0;
    background-color: white;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 4px;
    background-color: #6c63ff;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
}

.about-content {
    display: flex;
    gap: 50px;
}

.about-image {
    flex: 1;
}

.about-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.about-text {
    flex: 1;
}

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #333;
}

.about-text p {
    margin-bottom: 20px;
    color: #666;
}

.about-stats {
    display: flex;
    gap: 30px;
    margin-top: 30px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    color: #6c63ff;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
}

/* 作品集部分样式 */
.portfolio {
    padding: 100px 0;
    background-color: #f9f9f9;
}

.portfolio-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
}

.filter-btn {
    padding: 8px 20px;
    border: none;
    background-color: white;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.filter-btn:hover, .filter-btn.active {
    background-color: #6c63ff;
    color: white;
    box-shadow: 0 5px 15px rgba(108, 99, 255, 0.3);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.portfolio-item {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.portfolio-item:hover {
    transform: translateY(-10px);
}

.portfolio-image {
    position: relative;
    overflow: hidden;
    height: 250px;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.portfolio-item:hover .portfolio-image img {
    transform: scale(1.1);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(108, 99, 255, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-overlay h3 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 10px;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.portfolio-overlay p {
    color: white;
    margin-bottom: 20px;
    transform: translateY(20px);
    transition: transform 0.3s ease 0.1s;
}

.portfolio-item:hover .portfolio-overlay h3,
.portfolio-item:hover .portfolio-overlay p {
    transform: translateY(0);
}

.portfolio-link {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    background-color: white;
    color: #6c63ff;
    border-radius: 50%;
    text-decoration: none;
    transform: translateY(20px);
    transition: transform 0.3s ease 0.2s;
}

.portfolio-item:hover .portfolio-link {
    transform: translateY(0);
}

/* 技能部分样式 */
.skills {
    padding: 100px 0;
    background-color: white;
}

.skills-content {
    display: flex;
    gap: 50px;
}

.skill-category {
    flex: 1;
}

.skill-category h3 {
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: #333;
}

.skill-item {
    margin-bottom: 25px;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.skill-bar {
    width: 100%;
    height: 10px;
    background-color: #f0f0f0;
    border-radius: 5px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background-color: #6c63ff;
    border-radius: 5px;
    animation: progress 1.5s ease-in-out;
}

@keyframes progress {
    from { width: 0; }
}

/* 联系我部分样式 */
.contact {
    padding: 100px 0;
    background-color: #f9f9f9;
}

.contact-content {
    display: flex;
    gap: 50px;
}

.contact-info {
    flex: 1;
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #333;
}

.contact-info p {
    margin-bottom: 30px;
    color: #666;
}

.contact-details {
    margin-bottom: 30px;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.contact-item i {
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #6c63ff;
    color: white;
    border-radius: 50%;
    margin-right: 15px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background-color: #f0f0f0;
    color: #333;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background-color: #6c63ff;
    color: white;
    transform: translateY(-3px);
}

.contact-form {
    flex: 1;
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #6c63ff;
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

/* 页脚样式 */
.footer {
    background-color: #333;
    color: white;
    padding: 30px 0;
    text-align: center;
}

.footer p {
    margin: 0;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 120px;
    }
    
    .hero-content {
        padding-right: 0;
        margin-bottom: 50px;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-image-container {
        width: 300px;
        height: 300px;
    }
    
    .about-content,
    .skills-content,
    .contact-content {
        flex-direction: column;
    }
    
    .about-image,
    .about-text,
    .skill-category,
    .contact-info,
    .contact-form {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        flex-direction: column;
        background-color: white;
        width: 100%;
        height: 100vh;
        padding-top: 80px;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-item {
        margin: 0;
        padding: 15px 0;
        text-align: center;
    }
    
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .about-stats {
        flex-direction: column;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
}