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

:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --accent-color: #e74c3c;
    --gray-color: #95a5a6;
    --white-color: #ffffff;
    --black-color: #000000;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --border-radius: 8px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: var(--light-color);
    overflow-x: hidden;
}

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

/* 导航栏样式 */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--dark-color);
    color: var(--white-color);
    z-index: 1000;
    transition: var(--transition);
}

#navbar.scrolled {
    background-color: rgba(44, 62, 80, 0.95);
    padding: 10px 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--white-color);
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    color: var(--white-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary-color);
    transition: var(--transition);
}

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

.menu-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
}

/* 主页部分样式 */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('https://via.placeholder.com/1920x1080') center/cover no-repeat;
    color: var(--white-color);
    text-align: center;
    padding: 0 20px;
}

.hero-content {
    max-width: 800px;
    animation: fadeIn 1s ease-in-out;
}

.hero-content h2 {
    font-size: 48px;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-content h2 span {
    color: var(--primary-color);
}

.hero-content p {
    font-size: 20px;
    margin-bottom: 30px;
    color: var(--light-color);
}

.social-links {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white-color);
    border-radius: 50%;
    margin: 0 10px;
    transition: var(--transition);
    text-decoration: none;
}

.social-icon:hover {
    background-color: var(--primary-color);
    transform: translateY(-5px);
}

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white-color);
    padding: 12px 30px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid var(--primary-color);
}

.btn:hover {
    background-color: transparent;
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

/* 通用部分标题样式 */
.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 36px;
    color: var(--dark-color);
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

.section-title h2::after {
    content: '';
    position: absolute;
    width: 100px;
    height: 3px;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary-color);
}

.underline {
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 0 auto;
}

/* 关于我部分样式 */
.about-section {
    padding: 100px 0;
    background-color: var(--white-color);
}

.about-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.about-image {
    flex: 0 0 300px;
    margin-bottom: 30px;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 50%;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.about-image img:hover {
    transform: scale(1.05);
}

.about-text {
    flex: 1;
    min-width: 300px;
    padding-left: 40px;
}

.about-text h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--dark-color);
}

.about-text p {
    margin-bottom: 20px;
    color: var(--dark-color);
    line-height: 1.8;
}

.personal-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 30px;
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-label {
    font-weight: 600;
    color: var(--gray-color);
    margin-bottom: 5px;
}

.info-value {
    color: var(--dark-color);
}

/* 技能部分样式 */
.skills-section {
    padding: 100px 0;
    background-color: var(--light-color);
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.skill-category {
    background-color: var(--white-color);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.skill-category:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.skill-category h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--dark-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
}

.skill-bar {
    margin-bottom: 20px;
}

.skill-name {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--dark-color);
}

.skill-progress {
    width: 100%;
    height: 10px;
    background-color: #ddd;
    border-radius: 5px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 5px;
    transition: width 1s ease-in-out;
}

.skill-percentage {
    font-size: 14px;
    color: var(--primary-color);
    font-weight: 600;
}

/* 经历部分样式 */
.experience-section {
    padding: 100px 0;
    background-color: var(--white-color);
}

.timeline {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--primary-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: var(--white-color);
    border: 4px solid var(--primary-color);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-item:nth-child(odd)::after {
    right: -12px;
}

.timeline-item:nth-child(even)::after {
    left: -12px;
}

.timeline-content {
    padding: 20px 30px;
    background-color: var(--light-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.timeline-content:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.timeline-date {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.timeline-content h3 {
    font-size: 20px;
    margin-bottom: 5px;
    color: var(--dark-color);
}

.timeline-content h4 {
    font-size: 16px;
    color: var(--gray-color);
    margin-bottom: 15px;
}

.timeline-content p {
    margin-bottom: 15px;
    color: var(--dark-color);
}

.timeline-content ul {
    list-style: none;
    padding-left: 0;
}

.timeline-content li {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
    color: var(--dark-color);
}

.timeline-content li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 18px;
}

/* 联系方式部分样式 */
.contact-section {
    padding: 100px 0;
    background-color: var(--light-color);
}

.contact-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 40px;
}

.contact-info {
    flex: 1;
    min-width: 300px;
    background-color: var(--white-color);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.contact-info h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--dark-color);
}

.contact-info p {
    margin-bottom: 30px;
    color: var(--dark-color);
    line-height: 1.8;
}

.contact-details {
    margin-bottom: 30px;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.contact-item i {
    font-size: 20px;
    color: var(--primary-color);
    margin-right: 15px;
    width: 30px;
    text-align: center;
}

.contact-item span {
    color: var(--dark-color);
}

.contact-social {
    display: flex;
    gap: 15px;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: var(--white-color);
    border-radius: 50%;
    transition: var(--transition);
    text-decoration: none;
}

.social-btn:hover {
    background-color: var(--dark-color);
    transform: translateY(-3px);
}

.contact-form {
    flex: 1;
    min-width: 300px;
    background-color: var(--white-color);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.contact-form h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--dark-color);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--dark-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 16px;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.submit-btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white-color);
    padding: 12px 30px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
}

.submit-btn:hover {
    background-color: var(--dark-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

/* 教育背景部分样式 */
.education-section {
    padding: 100px 0;
    background-color: var(--light-color);
}

.education-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.education-item {
    display: flex;
    background-color: var(--white-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
}

.education-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.education-year {
    flex: 0 0 200px;
    background-color: var(--primary-color);
    color: var(--white-color);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    font-weight: 600;
    font-size: 18px;
}

.education-content {
    flex: 1;
    padding: 30px;
}

.education-content h3 {
    font-size: 22px;
    margin-bottom: 5px;
    color: var(--dark-color);
}

.education-content h4 {
    font-size: 18px;
    color: var(--gray-color);
    margin-bottom: 15px;
}

.education-content p {
    margin-bottom: 10px;
    color: var(--dark-color);
    line-height: 1.6;
}

/* 项目经验部分样式 */
.projects-section {
    padding: 100px 0;
    background-color: var(--white-color);
}

.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.project-item {
    background-color: var(--light-color);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.project-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary-color);
}

.project-header h3 {
    font-size: 20px;
    color: var(--dark-color);
    margin: 0;
}

.project-date {
    font-size: 14px;
    color: var(--gray-color);
    font-weight: 500;
}

.project-description {
    margin-bottom: 20px;
    color: var(--dark-color);
    line-height: 1.6;
}

.project-tech {
    margin-bottom: 20px;
}

.tech-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-right: 10px;
}

.tech-tag {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white-color);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 14px;
    margin-right: 8px;
    margin-bottom: 8px;
}

.project-responsibilities h4 {
    font-size: 16px;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.project-responsibilities ul {
    list-style: none;
    padding-left: 0;
}

.project-responsibilities li {
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
    color: var(--dark-color);
}

.project-responsibilities li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: bold;
}

/* 页脚样式 */
.footer {
    background-color: var(--dark-color);
    color: var(--white-color);
    padding: 50px 0 20px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 30px;
}

.footer-info {
    flex: 1;
    min-width: 200px;
    margin-bottom: 30px;
}

.footer-info h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: var(--white-color);
}

.footer-info p {
    color: var(--light-color);
}

.footer-nav {
    flex: 1;
    min-width: 200px;
    margin-bottom: 30px;
}

.footer-nav h4 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--white-color);
}

.footer-nav ul {
    list-style: none;
    padding-left: 0;
}

.footer-nav li {
    margin-bottom: 10px;
}

.footer-nav a {
    color: var(--light-color);
    text-decoration: none;
    transition: var(--transition);
}

.footer-nav a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-social {
    flex: 1;
    min-width: 200px;
    margin-bottom: 30px;
}

.footer-social h4 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--white-color);
}

.footer-social .social-link {
    display: inline-block;
    color: var(--light-color);
    margin-right: 15px;
    font-size: 20px;
    transition: var(--transition);
}

.footer-social .social-link:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: var(--light-color);
    font-size: 14px;
}

/* 响应式设计 */
/* 超大屏幕响应式调整 */
@media (max-width: 1200px) {
    .container {
        padding: 0 30px;
    }
    
    .projects-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 大屏幕响应式调整 */
@media (max-width: 992px) {
    .container {
        padding: 0 25px;
    }
    
    .about-content {
        flex-direction: column;
        text-align: center;
    }

    .about-text {
        padding-left: 0;
        margin-top: 30px;
    }

    .timeline::after {
        left: 31px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

    .timeline-item:nth-child(even) {
        left: 0;
    }

    .timeline-item:nth-child(odd)::after,
    .timeline-item:nth-child(even)::after {
        left: 19px;
    }
    
    .skills-container {
        grid-template-columns: 1fr;
    }
    
    .projects-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .contact-form {
        padding: 30px;
    }
}

/* 平板设备响应式调整 */
@media (max-width: 768px) {
    /* 导航栏调整 */
    .hero-content h2 {
        font-size: 36px;
    }

    .hero-content p {
        font-size: 18px;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        background-color: var(--dark-color);
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        transition: var(--transition);
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        z-index: 99;
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links li {
        margin: 15px 0;
    }
    
    .nav-links a {
        font-size: 1.1rem;
    }

    .menu-toggle {
        display: block;
    }

    .section-title h2 {
        font-size: 30px;
    }

    .education-item {
        flex-direction: column;
    }

    .education-year {
        flex: none;
        text-align: center;
        padding: 20px;
    }

    .education-content {
        padding: 20px;
    }

    .projects-container {
        grid-template-columns: 1fr;
    }

    .project-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .contact-container {
        flex-direction: column;
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

/* 小平板和大屏手机响应式调整 */
@media (max-width: 640px) {
    .hero-content h2 {
        font-size: 32px;
    }
    
    .hero-content p {
        font-size: 17px;
    }
    
    .section-title h2 {
        font-size: 28px;
    }
    
    .btn {
        padding: 12px 30px;
        font-size: 1rem;
    }
    
    .social-icon {
        width: 35px;
        height: 35px;
    }
    
    .timeline-content {
        padding: 20px;
    }
}

/* 手机设备响应式调整 */
@media (max-width: 576px) {
    .container {
        padding: 0 20px;
    }
    
    .hero-content h2 {
        font-size: 28px;
    }

    .hero-content p {
        font-size: 16px;
    }

    .section-title h2 {
        font-size: 24px;
    }

    .about-image {
        flex: 0 0 250px;
    }

    .personal-info {
        grid-template-columns: 1fr;
    }

    .timeline-content {
        padding: 15px 20px;
    }

    .timeline-content h3 {
        font-size: 18px;
    }

    .timeline-content h4 {
        font-size: 14px;
    }

    .education-year {
        font-size: 16px;
    }

    .education-content h3 {
        font-size: 20px;
    }

    .education-content h4 {
        font-size: 16px;
    }

    .project-item {
        padding: 20px;
    }

    .project-header h3 {
        font-size: 18px;
    }

    .tech-tag {
        font-size: 12px;
        padding: 3px 8px;
    }
    
    /* 表单调整 */
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-group input,
    .form-group textarea {
        font-size: 1rem;
        padding: 10px;
    }
}

/* 小屏幕手机响应式调整 */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-content h2 {
        font-size: 24px;
    }
    
    .hero-content p {
        font-size: 15px;
    }
    
    .section-title h2 {
        font-size: 22px;
    }
    
    .nav-links li {
        margin: 12px 0;
    }
    
    .about-image {
        flex: 0 0 200px;
    }
    
    .timeline-content,
    .education-content {
        padding: 15px;
    }
    
    .timeline-content h3,
    .education-content h3 {
        font-size: 17px;
    }
    
    .project-item {
        padding: 15px;
    }
    
    /* 确保按钮在小屏幕上有足够的点击区域 */
    .btn {
        padding: 12px 28px;
        min-width: 120px;
    }
    
    .social-icon {
        width: 32px;
        height: 32px;
    }
}

/* 确保在超高分辨率屏幕上的可读性 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-content h2, .section-title h2 {
        text-rendering: optimizeLegibility;
    }
    
    .about-image img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 滚动动画 */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.active {
    opacity: 1;
    transform: translateY(0);
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 打印样式 */
@media print {
    .navbar,
    .btn,
    .social-links,
    .footer-social,
    .contact-form {
        display: none;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }

    .container {
        width: 100%;
        max-width: none;
        padding: 0;
    }

    section {
        page-break-after: always;
    }
}