/* 基本样式设置 */
:root {
    --primary-color: #3498db;
    --secondary-color: #2980b9;
    --accent-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --text-color: #333;
    --text-light: #777;
    --section-padding: 80px 0;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f9f9f9;
    overflow: hidden; /* 防止出现滚动条 */
    touch-action: pan-y; /* 允许垂直滚动，但捕获水平滑动 */
    -webkit-overflow-scrolling: touch; /* 在iOS上提供平滑滚动 */
}

/* 页面容器 */
.page-container {
    display: flex;
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden; /* 修改为hidden，不需要滚动 */
}

/* 隐藏滚动条但保留功能 */
.page-container::-webkit-scrollbar {
    display: none;
}

.page-container {
    -ms-overflow-style: none;  /* IE 和 Edge */
    scrollbar-width: none;  /* Firefox */
}

/* 单页设置 */
.page {
    flex: 0 0 100%; /* 修改为100%，因为现在显示一页 */
    width: 100%;
    height: 100%;
    position: absolute; /* 使用绝对定位 */
    top: 0;
    left: 0;
    transition: transform 0.5s ease; /* 添加过渡效果 */
    overflow-y: auto; /* 添加垂直滚动，以防内容溢出 */
    touch-action: pan-y; /* 允许垂直滚动，但捕获水平滑动 */
}

.page-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 20px; /* 减小上下内边距 */
    height: auto; /* 允许内容自然流动 */
    min-height: 100%; /* 确保至少填满整个页面 */
    display: flex;
    flex-direction: column;
}

.page-title {
    font-size: 2rem;
    margin-bottom: 20px; /* 减小标题下方间距 */
    text-align: center;
    position: relative;
    color: var(--dark-color);
}

.page-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 10px auto 0; /* 减小标题下划线的上方间距 */
}

/* 封面部分 */
#cover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

#cover .page-content {
    justify-content: center;
    align-items: center;
    text-align: center;
}

.profile-image {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 30px;
    border: 5px solid rgba(255, 255, 255, 0.3);
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.name {
    font-size: 3.5rem;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.title {
    font-size: 1.5rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.social-links {
    margin-bottom: 50px;
}

.social-icon {
    display: inline-block;
    margin: 0 10px;
    font-size: 1.5rem;
    color: white;
    transition: var(--transition);
}

.social-icon:hover {
    transform: translateY(-5px);
}

.slide-hint {
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    animation: slide 2s infinite;
}

@keyframes slide {
    0%, 100% {
        transform: translateY(-50%) translateX(0);
    }
    50% {
        transform: translateY(-50%) translateX(10px);
    }
}

/* 基本信息部分 - 全新设计 */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    padding: 20px;
    margin-top: 20px;
}

.info-item {
    background-color: #fff;
    border-radius: 10px;
    padding: 20px 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    transition: none; /* 移除悬停效果 */
}

.info-item i {
    /* 创建蓝色圆形图标背景 */
    width: 60px;
    height: 60px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 26px;
    margin-bottom: 15px;
}

.info-item h3 {
    font-size: 16px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500; /* 使标题不那么粗 */
}

.info-item p {
    font-size: 14px;
    color: #333;
    font-weight: 400;
}

/* 让页面标题居中且更加突出 */
#info .page-title {
    position: relative;
    display: inline-block;
    margin: 0 auto 30px;
    padding-bottom: 10px;
    color: #333;
}

#info .page-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
}

/* 修改图标 - 替换为更现代的样式 */
.info-item .fa-user { content: "\f007"; }
.info-item .fa-graduation-cap { content: "\f19d"; }
.info-item .fa-university { content: "\f19c"; }
.info-item .fa-book { content: "\f02d"; }
.info-item .fa-phone { content: "\f095"; }
.info-item .fa-envelope { content: "\f0e0"; }
.info-item .fa-map-marker-alt { content: "\f3c5"; }
.info-item .fa-birthday-cake { content: "\f1fd"; }

/* 个人简介部分 */
.about-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: center;
    flex-grow: 1;
}

.about-text {
    flex: 1;
    min-width: 300px;
}

.about-text p {
    margin-bottom: 15px;
    line-height: 1.8;
}

.about-quote {
    flex: 1;
    min-width: 300px;
}

.about-quote blockquote {
    font-size: 1.5rem;
    font-style: italic;
    padding: 30px;
    border-left: 4px solid var(--primary-color);
    background-color: var(--light-color);
    color: var(--dark-color);
    position: relative;
}

.about-quote blockquote::before {
    content: '"';
    font-size: 4rem;
    position: absolute;
    top: 10px;
    left: 10px;
    opacity: 0.2;
    color: var(--primary-color);
}

/* 专业课程部分 - 全新设计 */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    padding: 20px;
    margin-top: 20px;
}

.course-card {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.course-header {
    background-color: var(--primary-color);
    color: white;
    padding: 20px;
    position: relative;
}

.course-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
}

.course-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    padding-right: 60px; /* 为右侧图标腾出空间 */
}

.course-code {
    font-size: 14px;
    opacity: 0.9;
}

.course-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.course-desc {
    flex-grow: 1;
    margin-bottom: 15px;
    color: #555;
    font-size: 14px;
    line-height: 1.6;
}

.course-stats {
    display: flex;
    justify-content: space-between;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.course-stat {
    display: flex;
    align-items: center;
    color: #777;
    font-size: 13px;
}

.course-stat i {
    margin-right: 5px;
    font-size: 14px;
    color: var(--primary-color);
}

/* 让页面标题样式与基本信息页一致 */
#courses .page-title {
    position: relative;
    display: inline-block;
    margin: 0 auto 30px;
    padding-bottom: 10px;
    color: #333;
}

#courses .page-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
}

/* 为不同类型的课程设置不同颜色 */
.course-card.core .course-header {
    background-color: #3498db; /* 蓝色 - 核心课程 */
}

.course-card.elective .course-header {
    background-color: #9b59b6; /* 紫色 - 选修课程 */
}

.course-card.lab .course-header {
    background-color: #2ecc71; /* 绿色 - 实验课 */
}

.course-card.project .course-header {
    background-color: #e67e22; /* 橙色 - 项目课程 */
}

/* 专业特长部分优化 */
.specialties-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
    padding: 15px 10px;
}

.specialty-group {
    background-color: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.specialty-group-title {
    color: var(--dark-color);
    margin-bottom: 20px;
    font-size: 1.3rem;
    position: relative;
    padding-left: 15px;
    display: flex;
    align-items: center;
}

.specialty-group-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background-color: var(--primary-color);
    border-radius: 3px;
}

.skills {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.skill {
    margin-bottom: 5px;
}

.skill-name {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-weight: 500;
    color: #444;
    font-size: 15px;
}

.skill-percentage {
    color: var(--primary-color);
    font-weight: 600;
}

.skill-bar {
    height: 10px;
    background-color: #eee;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.skill-level {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), #5dade2);
    border-radius: 10px;
    position: absolute;
    top: 0;
    left: 0;
    transition: width 1s ease-in-out;
}

.specialty-description {
    background-color: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.specialty-description h3 {
    color: var(--dark-color);
    margin-bottom: 15px;
    font-size: 1.3rem;
    position: relative;
    padding-bottom: 10px;
}

.specialty-description h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 3px;
    background-color: var(--primary-color);
}

.specialty-description p {
    color: #555;
    line-height: 1.6;
    margin-bottom: 10px;
}

/* 证书部分 */
.certificates-tabs {
    max-width: 900px;
    margin: 0 auto;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.tabs-nav {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.tab-btn {
    padding: 10px 25px;
    border: none;
    background-color: var(--light-color);
    margin: 0 10px;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border-radius: 5px;
}

.tab-btn.active {
    background-color: var(--primary-color);
    color: white;
}

.tab-content {
    display: none;
    flex-grow: 1;
}

.tab-content.active {
    display: block;
}

.certificates-grid {
    display: grid;
    gap: 20px;
}

.certificate-card {
    display: flex;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.certificate-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.certificate-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background-color: rgba(52, 152, 219, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
}

.certificate-icon i {
    font-size: 1.2rem;
    color: var(--primary-color);
}

.certificate-icon.award {
    background-color: rgba(231, 76, 60, 0.1);
}

.certificate-icon.award i {
    color: var(--accent-color);
}

.certificate-info {
    flex-grow: 1;
}

.certificate-info h3 {
    margin-bottom: 8px;
    color: var(--dark-color);
}

.certificate-date,
.certificate-org {
    color: var(--text-light);
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.certificate-desc {
    margin-top: 8px;
}

.copyright {
    text-align: center;
    margin-top: auto;
    padding-top: 20px;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* 页面指示器 */
.page-indicators {
    position: fixed;
    bottom: 20px; /* 向上移动 */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    z-index: 100;
}

.indicator {
    width: 12px;
    height: 12px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    margin: 0 8px;
    cursor: pointer;
    transition: var(--transition);
}

.indicator.active {
    background-color: var(--primary-color);
    transform: scale(1.3);
}

/* 导航控制 */
.nav-controls {
    position: fixed;
    bottom: 20px; /* 向上移动 */
    right: 40px;
    z-index: 100;
    display: flex;
}

.nav-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-left: 10px;
    transition: var(--transition);
}

.nav-btn:hover:not(:disabled) {
    background-color: var(--secondary-color);
    transform: scale(1.1);
}

.nav-btn:disabled {
    background-color: var(--text-light);
    cursor: not-allowed;
    opacity: 0.7;
}

/* 响应式设计 */
@media (max-width: 768px) {
    /* 页面标题调整 */
    .page-title {
        font-size: 1.6rem;
        margin-bottom: 15px;
    }
    
    .page-title::after {
        width: 60px;
        height: 3px;
    }
    
    /* 封面部分调整 */
    .profile-image {
        width: 140px;
        height: 140px;
        margin-bottom: 20px;
    }
    
    .name {
        font-size: 2.2rem;
    }
    
    .title {
        font-size: 1.2rem;
        margin-bottom: 20px;
    }
    
    /* 基本信息部分调整 */
    .info-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
        padding: 10px;
    }
    
    .info-item {
        padding: 15px 10px;
    }
    
    .info-item i {
        width: 50px;
        height: 50px;
        font-size: 20px;
        margin-bottom: 10px;
    }
    
    /* 专业课程部分调整 */
    .courses-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 10px;
    }
    
    .course-header {
        padding: 15px;
    }
    
    .course-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
        top: 15px;
        right: 15px;
    }
    
    .course-content {
        padding: 15px;
    }
    
    /* 专业特长部分调整 */
    .specialties-container {
        gap: 15px;
        padding: 5px;
    }
    
    .specialty-group {
        padding: 15px;
    }
    
    .specialty-group-title {
        font-size: 1.1rem;
        margin-bottom: 15px;
    }
    
    .skills {
        gap: 12px;
    }
    
    .skill-name {
        font-size: 14px;
    }
    
    .skill-bar {
        height: 8px;
    }
    
    .specialty-description {
        padding: 15px;
    }
    
    .specialty-description h3 {
        font-size: 1.1rem;
    }
    
    /* 证书和奖项调整 */
    .certificates-tabs {
        padding: 0;
    }
    
    .tabs-nav {
        padding: 0 10px;
    }
    
    .tab-btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
    
    .certificates-grid {
        padding: 10px;
        grid-template-columns: 1fr;
    }
    
    .certificate-card {
        padding: 15px;
        margin-bottom: 15px;
        flex-direction: column;
    }
    
    .certificate-icon {
        margin: 0 auto 15px;
    }
    
    .certificate-info {
        text-align: center;
    }
    
    /* 导航控制调整 */
    .nav-controls {
        bottom: 15px;
        right: 15px;
    }
    
    .nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .page-indicators {
        bottom: 15px;
    }
    
    .indicator {
        width: 10px;
        height: 10px;
        margin: 0 6px;
    }
}

/* 特小屏幕设备优化 */
@media (max-width: 400px) {
    .page-content {
        padding: 15px 10px;
    }
    
    .name {
        font-size: 1.8rem;
    }
    
    .title {
        font-size: 1rem;
    }
    
    .profile-image {
        width: 120px;
        height: 120px;
    }
    
    .info-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }
    
    .info-item {
        padding: 12px 8px;
    }
    
    .info-item i {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .course-header {
        padding: 12px;
    }
    
    .course-title {
        font-size: 16px;
    }
    
    .course-code {
        font-size: 12px;
    }
    
    .course-desc {
        font-size: 13px;
    }
    
    .course-stat {
        font-size: 12px;
    }
    
    .tab-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

/* 添加媒体查询以适应更小的显示器 */
@media (max-height: 700px) {
    .page-title {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }
    
    .info-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
    }
    
    .info-item {
        padding: 10px;
    }
    
    .info-item i {
        font-size: 1.2rem;
        margin-bottom: 5px;
    }
}

/* 专业课程部分移动端优化 */
@media (max-width: 768px) {
    /* 课程部分标题调整 */
    #courses .page-title {
        font-size: 1.6rem;
        margin-bottom: 15px;
    }
    
    /* 卡片布局优化 */
    .courses-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 10px 5px;
    }
    
    /* 卡片内部优化 */
    .course-card {
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
        transform: none !important; /* 移除悬停效果 */
        transition: none;
    }
    
    .course-header {
        padding: 15px;
        display: flex;
        flex-direction: column;
    }
    
    .course-title {
        font-size: 16px;
        padding-right: 40px; /* 为图标留出空间 */
    }
    
    .course-code {
        font-size: 12px;
        opacity: 0.7;
    }
    
    .course-icon {
        width: 36px;
        height: 36px;
        top: 10px;
        right: 10px;
        font-size: 16px;
    }
    
    .course-content {
        padding: 12px 15px;
    }
    
    .course-desc {
        font-size: 13px;
        line-height: 1.5;
        margin-bottom: 12px;
        max-height: 6em; /* 大约显示4行 */
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 4;
        -webkit-box-orient: vertical;
    }
    
    .course-stats {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .course-stat {
        font-size: 12px;
    }
    
    .course-stat i {
        font-size: 12px;
        margin-right: 4px;
    }
}

/* 超小屏幕优化 */
@media (max-width: 360px) {
    .courses-grid {
        padding: 5px 2px;
    }
    
    .course-header {
        padding: 12px 10px;
    }
    
    .course-title {
        font-size: 15px;
    }
    
    .course-content {
        padding: 10px 12px;
    }
    
    .course-desc {
        font-size: 12px;
        -webkit-line-clamp: 3; /* 在极小屏幕上只显示3行 */
    }
    
    .course-stats {
        justify-content: space-between;
    }
}

/* 交互优化 - 弹出式课程描述 */
.course-card {
    position: relative;
    overflow: hidden;
}

@media (max-width: 768px) {
    .course-card.expanded .course-desc {
        max-height: none;
        -webkit-line-clamp: initial;
    }
    
    .course-desc:after {
        content: '点击展开';
        display: block;
        text-align: center;
        color: var(--primary-color);
        font-size: 12px;
        margin-top: 5px;
        font-weight: 500;
    }
    
    .course-card.expanded .course-desc:after {
        content: '点击收起';
    }
} 