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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    scroll-behavior: smooth;
}

/* 顶部导航 */
.top-nav {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.top-nav.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

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

.nav-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #50c878;
    margin: 0;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 20px;
}

.nav-menu a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-menu a:hover {
    color: #50c878;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #50c878;
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

/* 主内容区 */
.main-content {
    margin-top: 70px;
}

/* 英雄区 */
.hero-section {
    background: linear-gradient(135deg, #50c878 0%, #36a95a 100%);
    color: #fff;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="25" cy="25" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="25" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="25" cy="75" r="2" fill="rgba(255,255,255,0.1)"/></svg>');
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 50px;
    position: relative;
    z-index: 1;
}

.hero-text {
    flex: 1;
    animation: slideInLeft 1s ease;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 20px;
    opacity: 0.9;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.hero-tags .tag {
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.hero-tags .tag:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.hero-cta {
    display: inline-block;
    background-color: #fff;
    color: #50c878;
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.hero-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.hero-image {
    flex: 0 0 300px;
    animation: slideInRight 1s ease;
}

.hero-avatar {
    width: 100%;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    border: 8px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.hero-avatar:hover {
    transform: scale(1.05) rotate(5deg);
}

/* 板块通用样式 */
.profile-section {
    background-color: #fff;
    padding: 80px 0;
    position: relative;
}

.profile-section:nth-child(even) {
    background-color: #f8f9fa;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    position: relative;
    display: inline-block;
}

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

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

/* 基本资料 */
.profile-detail {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    max-width: 900px;
    margin: 0 auto;
}

.profile-item {
    background-color: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-align: left;
}

.profile-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-left: 4px solid #50c878;
}

.profile-item h3 {
    color: #50c878;
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: 600;
}

.profile-item p {
    color: #555;
    line-height: 1.6;
    margin: 0;
}

/* 时间轴样式 */
.timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #e0e0e0;
    transform: translateX(-50%);
}

.timeline-item {
    display: flex;
    margin-bottom: 50px;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 20px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: #50c878;
    border: 4px solid #fff;
    box-shadow: 0 0 0 2px #50c878;
    transform: translateX(-50%);
    z-index: 1;
}

.timeline-date {
    flex: 0 0 200px;
    font-weight: 600;
    color: #50c878;
    text-align: right;
    padding-right: 30px;
    align-self: center;
}

.timeline-content {
    flex: 1;
    background-color: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-left: 30px;
}

.timeline-content h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.timeline-content p {
    color: #555;
    margin-bottom: 10px;
}

/* 教学经历滑动 */
.experience-slider {
    overflow: hidden;
    position: relative;
}

.slider-wrapper {
    display: flex;
    gap: 30px;
    transition: transform 0.5s ease;
}

.experience-card {
    flex: 0 0 400px;
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.experience-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.experience-date {
    font-weight: 600;
    color: #50c878;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.experience-content h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.experience-content p {
    color: #555;
    margin-bottom: 10px;
}

/* 技能网格 */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.skill-card {
    background-color: #fff;
    padding: 40px 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.skill-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #50c878;
}

.skill-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.skill-card:hover .skill-icon {
    transform: rotate(10deg) scale(1.2);
}

.skill-card h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.skill-card p {
    color: #666;
    font-size: 0.95rem;
}

/* 教学成果网格 */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    max-width: 1100px;
    margin: 0 auto;
}

.achievement-card {
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.achievement-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.achievement-image {
    height: 200px;
    overflow: hidden;
}

.achievement-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.achievement-card:hover .achievement-image img {
    transform: scale(1.1);
}

.achievement-content {
    padding: 25px;
}

.achievement-content h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.achievement-content p {
    color: #666;
    font-size: 0.95rem;
}

/* 联系方式 */
.contact-container {
    max-width: 800px;
    margin: 0 auto;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.contact-item {
    display: flex;
    gap: 20px;
    background-color: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.contact-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.contact-icon {
    font-size: 2rem;
    color: #50c878;
    align-self: center;
}

.contact-details h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.contact-link {
    color: #4a90e2;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.contact-link:hover {
    text-decoration: underline;
}

.contact-text {
    color: #555;
    margin-bottom: 15px;
}

.wechat-qr {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

.wechat-qr:hover {
    transform: scale(1.1);
    border-color: #4a90e2;
}

.wechat-qr img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 页脚 */
.footer {
    background-color: #333;
    color: #fff;
    padding: 30px 0;
    text-align: center;
}

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

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: slideInUp 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 2rem;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    background-color: #f8f9fa;
}

.close-modal:hover {
    color: #333;
    background-color: #e0e0e0;
    transform: rotate(90deg);
}

#modal-body {
    padding: 40px;
}

.modal h3 {
    color: #50c878;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.modal p {
    margin-bottom: 15px;
    color: #555;
    line-height: 1.8;
}

.skill-proficiency {
    margin: 20px 0;
}

.proficiency-bar {
    width: 100%;
    height: 12px;
    background-color: #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    margin-top: 10px;
}

.proficiency-level {
    height: 100%;
    background: linear-gradient(90deg, #50c878 0%, #36a95a 100%);
    border-radius: 6px;
    transition: width 0.8s ease;
    position: relative;
}

.proficiency-level::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shine 2s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.skill-cases {
    margin-top: 20px;
}

.skill-cases h4 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.skill-cases ul {
    list-style-type: disc;
    padding-left: 20px;
}

.skill-cases li {
    margin-bottom: 10px;
    color: #555;
    line-height: 1.6;
}

/* 动画效果 */
.animate {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.animate.visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInUp {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .hero-container {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }
    
    .hero-text {
        animation: slideInUp 1s ease;
    }
    
    .hero-image {
        animation: slideInUp 1s ease 0.3s both;
    }
    
    .timeline::before {
        left: 30px;
    }
    
    .timeline-item {
        flex-direction: column;
    }
    
    .timeline-item::before {
        left: 30px;
        transform: none;
    }
    
    .timeline-date {
        flex: none;
        text-align: left;
        padding-right: 0;
        margin-bottom: 15px;
        padding-left: 60px;
    }
    
    .timeline-content {
        margin-left: 60px;
        margin-top: 0;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .skills-grid,
    .achievements-grid,
    .contact-info {
        grid-template-columns: 1fr;
    }
    
    .experience-card {
        flex: 0 0 calc(100% - 20px);
    }
    
    .skill-card,
    .achievement-card,
    .contact-item {
        padding: 25px;
    }
    
    #modal-body {
        padding: 25px;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 60px 0;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-avatar {
        width: 200px;
        height: 200px;
    }
    
    .profile-section {
        padding: 50px 0;
    }
    
    .section-content {
        padding: 0 15px;
    }
    
    .timeline-date,
    .timeline-content {
        padding-left: 50px;
    }
    
    .timeline-item::before {
        left: 20px;
    }
    
    .timeline::before {
        left: 20px;
    }
}