:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --text-color: #333;
    --light-gray: #f5f5f5;
    --white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏样式 */
header {
    background-color: var(--primary-color);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

nav {
    padding: 1rem 0;
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav h1 {
    color: var(--white);
    font-size: 1.5rem;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--secondary-color);
}

.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--white);
    margin: 5px 0;
    transition: 0.3s;
}

/* 主要内容区域 */
main {
    margin-top: 80px;
}

.section {
    padding: 4rem 0;
}

.section:nth-child(even) {
    background-color: var(--light-gray);
}

/* 个人资料部分 */
.profile {
    text-align: center;
    padding: 2rem 0;
}

.profile-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin-bottom: 1rem;
}

.title {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.contact-info {
    margin-top: 1rem;
}

.contact-info p {
    margin: 0.5rem 0;
}

.contact-info i {
    margin-right: 0.5rem;
    color: var(--secondary-color);
}

/* 技能部分 */
.skills-container {
    max-width: 1000px;
    margin: 2rem auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.skill-category {
    background-color: var(--white);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
}

.skill-category:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.skill-header {
    padding: 1.2rem 1.5rem;
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    overflow: hidden;
}

.skill-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
}

.skill-header i {
    font-size: 1.8rem;
    background: rgba(255,255,255,0.2);
    padding: 0.8rem;
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.skill-category:hover .skill-header i {
    transform: scale(1.1) rotate(5deg);
}

.skill-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.skill-header p {
    margin: 0;
    margin-left: auto;
    font-size: 0.9rem;
    opacity: 0.9;
    background: rgba(255,255,255,0.1);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
}

.skill-items {
    padding: 1.5rem;
    background: linear-gradient(to bottom, rgba(0,0,0,0.02) 0%, transparent 100%);
}

.skill-group {
    margin-bottom: 1.2rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.8rem;
    position: relative;
}

.skill-group:last-child {
    margin-bottom: 0;
}

.skill-label {
    color: #2c3e50;
    font-weight: 600;
    min-width: 85px;
    font-size: 0.95rem;
    position: relative;
    padding-left: 0.5rem;
}

.skill-label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 1rem;
    background: var(--secondary-color);
    border-radius: 2px;
}

.skill-item {
    background-color: #f8f9fa;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #2c3e50;
    border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    cursor: default;
}

.skill-item:hover {
    background-color: var(--secondary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(52,152,219,0.2);
}

/* 工作经历部分 */
.timeline {
    position: relative;
    max-width: 1000px;
    margin: 3rem auto;
    padding: 0 20px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, 
        rgba(52,152,219,0) 0%,
        rgba(52,152,219,1) 10%,
        rgba(52,152,219,1) 90%,
        rgba(52,152,219,0) 100%
    );
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    padding-left: 100px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-date {
    position: absolute;
    left: 0;
    top: 0;
    width: 100px;
    padding: 0.5rem;
    text-align: center;
    background: var(--secondary-color);
    color: var(--white);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 2px 10px rgba(52,152,219,0.2);
}

.timeline-content {
    position: relative;
    padding: 2rem;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-5px);
}

.timeline-dot {
    position: absolute;
    left: -32px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background: var(--secondary-color);
    border: 3px solid var(--white);
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(52,152,219,0.2);
}

.timeline-content h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.position {
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.description {
    color: var(--text-color);
    font-size: 0.95rem;
    line-height: 1.6;
}

.description p {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.2rem;
}

.description p:last-child {
    margin-bottom: 0;
}

.description p::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: bold;
}

/* 项目部分 */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.project-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.tech-stack {
    margin: 1rem 0;
}

.tech-stack span {
    display: inline-block;
    background-color: var(--light-gray);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.view-details {
    background-color: var(--secondary-color);
    color: var(--white);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    width: 100%;
    margin-top: 1rem;
}

.view-details:hover {
    background-color: #2980b9;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 2000;
    overflow-y: auto;
}

.modal-content {
    background-color: var(--white);
    margin: 5% auto;
    padding: 2rem;
    width: 90%;
    max-width: 1000px;
    border-radius: 8px;
    position: relative;
}

.modal-project-image {
    width: 100%;
    height: 400px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.modal-project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-content-text {
    padding: 0 1rem;
}

.achievements {
    margin-top: 2rem;
}

.achievement-item {
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: var(--light-gray);
    border-radius: 8px;
}

.achievement-item h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.achievement-item img {
    max-height: 300px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.achievement-item p {
    margin-top: 1rem;
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 2rem;
    cursor: pointer;
}

/* 页脚样式 */
footer {
    background-color: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 2rem 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--primary-color);
        padding: 1rem 0;
    }

    .nav-links.active {
        display: flex;
        flex-direction: column;
    }

    .nav-links li {
        margin: 0;
        padding: 0.5rem 2rem;
    }

    .hamburger {
        display: block;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .modal-content {
        margin: 10% auto;
        width: 95%;
        padding: 1rem;
    }

    .modal-project-image {
        height: 250px;
    }

    .skills-container {
        gap: 1rem;
        padding: 0 1rem;
    }

    .skill-header {
        padding: 1rem;
    }

    .skill-header i {
        font-size: 1.5rem;
        padding: 0.6rem;
    }

    .skill-header h3 {
        font-size: 1.1rem;
    }

    .skill-header p {
        font-size: 0.8rem;
        padding: 0.2rem 0.6rem;
    }

    .skill-items {
        padding: 1rem;
    }

    .skill-group {
        margin-bottom: 1rem;
        gap: 0.5rem;
    }

    .skill-label {
        min-width: 100%;
        margin-bottom: 0.3rem;
        font-size: 0.9rem;
    }

    .skill-item {
        font-size: 0.85rem;
        padding: 0.3rem 0.8rem;
    }

    .timeline::before {
        left: 30px;
    }

    .timeline-item {
        padding-left: 60px;
    }

    .timeline-date {
        width: auto;
        position: relative;
        left: -60px;
        margin-bottom: 1rem;
        display: inline-block;
        font-size: 0.85rem;
        padding: 0.3rem 1rem;
    }

    .timeline-dot {
        left: -22px;
        width: 12px;
        height: 12px;
    }

    .timeline-content {
        padding: 1.5rem;
    }

    .timeline-content h3 {
        font-size: 1.1rem;
    }

    .position {
        font-size: 0.95rem;
    }

    .description {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .skill-header {
        flex-wrap: wrap;
        text-align: center;
        justify-content: center;
        padding: 0.8rem;
    }

    .skill-header p {
        margin: 0.5rem 0 0 0;
        width: 100%;
        text-align: center;
    }

    .skill-items {
        padding: 0.8rem;
    }

    .skill-group {
        justify-content: center;
    }

    .skill-label {
        text-align: center;
        padding-left: 0;
    }

    .skill-label::before {
        display: none;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        padding-left: 40px;
    }

    .timeline-date {
        left: -40px;
        font-size: 0.8rem;
        padding: 0.2rem 0.8rem;
    }

    .timeline-dot {
        left: -15px;
        width: 10px;
        height: 10px;
    }

    .timeline-content {
        padding: 1rem;
    }

    .description p {
        padding-left: 1rem;
    }
} 