/* 工作经历部分样式 */
.experience-container {
    display: flex;
    flex-direction: column;
    position: relative;
    width: 100%;
    margin-top: 2rem;
    padding: 0 clamp(1rem, 5vw, 3rem);
    max-width: 1400px;
    margin: 2rem auto 0;
}

/* 侧边栏样式 */
.experience-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border-radius: 16px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.experience-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(2rem, 5vw, 4rem);
    margin: 0 auto 3rem;
    padding: clamp(1rem, 3vw, 2rem);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.stats-numbers {
    display: flex;
    align-items: center;
    gap: clamp(2rem, 5vw, 4rem);
    flex-wrap: wrap;
    justify-content: center;
}

.stat-item {
    text-align: center;
    padding: 0.5rem;
    min-width: 120px;
    position: relative;
}

.stat-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -1.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 30px;
    background: rgba(255, 255, 255, 0.1);
}

.stat-number {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.3rem;
    display: block;
    line-height: 1;
    font-family: 'Poppins', sans-serif;
}

.stat-label {
    font-size: clamp(0.8rem, 1.5vw, 0.9rem);
    color: var(--text-color);
    opacity: 0.9;
    font-weight: 500;
}

/* 技能标签样式 */
.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(0.8rem, 2vw, 1rem);
    padding: clamp(1rem, 2.5vw, 1.5rem);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    justify-content: center;
    margin-top: 1rem;
}

.skill-tags .tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: default;
    backdrop-filter: blur(5px);
    animation: tagAppear 0.5s ease forwards;
}

.skill-tags .tag:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.1) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

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

.tag {
    padding: 0.4rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    color: var(--text-color);
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.tag:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.portfolio-link {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
}

.portfolio-link:hover {
    color: #646cff;
}

.portfolio-link::after {
    content: '查看作品';
    display: inline-block;
    margin-top: 4px;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(100, 108, 255, 0.1);
    color: #646cff;
    font-size: 0.85em;
    transition: all 0.3s ease;
}

.portfolio-link:hover::after {
    background: rgba(100, 108, 255, 0.2);
}

@media (max-width: 768px) {
    .experience-stats {
        flex-direction: column;
        gap: 1.5rem;
        padding: 1rem;
    }

    .stats-numbers {
        flex-direction: column;
        gap: 1.5rem;
    }

    .stat-item {
        width: 100%;
        padding: 0.5rem 0;
    }

    .stat-item:not(:last-child)::after {
        display: none;
    }

    .stat-number {
        font-size: 2rem;
    }

    .stat-label {
        font-size: 0.8rem;
    }

    .skill-tags {
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* 时间线样式 */
.experience-timeline {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(1.5rem, 3vw, 2rem);
    padding: clamp(1rem, 2vw, 1.5rem) 0;
    position: relative;
    z-index: 1;
}

.timeline-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: clamp(1.5rem, 3vw, 2rem);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    cursor: pointer;
    opacity: 0;
    transform: translateY(30px);
    min-height: clamp(140px, 20vw, 160px);
}

.timeline-card .period {
    position: absolute;
    top: clamp(1rem, 2vw, 1.5rem);
    right: clamp(1rem, 2vw, 1.5rem);
    font-size: clamp(0.75rem, 1.5vw, 0.85rem);
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.08);
    padding: clamp(0.3rem, 1vw, 0.5rem) clamp(0.8rem, 2vw, 1rem);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.timeline-card .company {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    font-weight: 600;
    color: #fff;
    margin-bottom: clamp(0.3rem, 1vw, 0.5rem);
    padding-right: clamp(100px, 15vw, 140px); /* 为右上角的日期留出空间 */
}

.timeline-card .position {
    font-size: clamp(0.85rem, 2vw, 0.95rem);
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: clamp(0.5rem, 1.5vw, 0.8rem);
    font-weight: 500;
}

.timeline-card .description {
    font-size: clamp(0.8rem, 1.8vw, 0.9rem);
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

.timeline-card.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.timeline-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(255,255,255,0.1) 0%, rgba(0,0,0,0) 70%);
    pointer-events: none;
    transition: opacity 0.3s ease;
    opacity: 0;
}

.timeline-card::after {
    content: '点击查看详情';
    position: absolute;
    bottom: 20%;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    color: var(--text-light);
    font-size: 0.9rem;
    opacity: 0;
    transition: all 0.3s ease;
}

.timeline-card:hover {
    transform: translateX(10px) translateY(-5px);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.timeline-card:hover::before {
    opacity: 1;
}

.timeline-card:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    transition: all 0.4s ease;
}

.company-info h3 {
    color: var(--text-light);
    font-size: 1.3em;
    margin-bottom: 6px;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.position {
    color: var(--primary-color);
    font-size: 1em;
    margin-bottom: 4px;
    font-weight: 500;
    letter-spacing: 0.2px;
}

.period {
    color: var(--text-secondary);
    font-size: 0.85em;
    padding: 4px 12px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    border-radius: 12px;
    white-space: nowrap;
    margin-left: 12px;
    font-weight: 500;
    letter-spacing: 0.2px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.description {
    color: var(--text-secondary);
    line-height: 1.5;
    font-size: 0.95em;
    letter-spacing: 0.2px;
}

/* 经历模态框样式 */
.experience-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.experience-modal .modal-content {
    position: relative;
    background: rgba(25, 25, 25, 0.95);
    border-radius: 15px;
    padding: 2rem;
    width: 90%;
    max-width: 800px;
    color: #fff;
    transform: translateY(0);
    transition: transform 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    max-height: 80vh;
    overflow-y: auto;
}

.experience-modal .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.experience-modal .modal-header h2 {
    font-size: 1.8rem;
    margin: 0;
    color: var(--accent-color);
}

.experience-modal .close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    color: #fff;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0.5rem;
    transition: transform 0.3s ease;
}

.experience-modal .close-btn:hover {
    transform: rotate(90deg);
}

.experience-modal .modal-body {
    font-size: 1rem;
    line-height: 1.6;
}

.experience-modal .detail-item {
    margin-bottom: 1.5rem;
}

.experience-modal .detail-item strong {
    color: var(--accent-color);
    display: inline-block;
    margin-right: 0.5rem;
}

.experience-modal .modal-description {
    white-space: pre-line;
    line-height: 1.8;
}

/* 样式化项目符号和缩进 */
.modal-description ul {
    list-style: none;
    padding-left: 0;
    margin: 1rem 0;
}

.modal-description li {
    padding-left: 1.5em;
    position: relative;
    margin-bottom: 0.5rem;
}

.modal-description li:before {
    content: "•";
    position: absolute;
    left: 0.5em;
    color: var(--accent-color);
}

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

.experience-modal .modal-content {
    animation: modalFadeIn 0.3s ease forwards;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .experience-container {
        grid-template-columns: 220px 1fr;
        gap: 30px;
    }
}

@media (max-width: 992px) {
    .experience-container {
        grid-template-columns: 1fr;
    }

    .experience-sidebar {
        position: relative;
        top: 0;
    }

    .experience-stats {
        grid-template-columns: repeat(3, 1fr);
    }

    .timeline-card:hover {
        transform: translateY(-5px);
    }
}

@media (max-width: 576px) {
    .experience-stats {
        grid-template-columns: 1fr;
    }

    .card-header {
        flex-direction: column;
    }

    .period {
        margin: 15px 0 0 0;
    }

    .timeline-card {
        padding: 20px;
    }

    .company-info h3 {
        font-size: 1.4em;
    }

    .position {
        font-size: 1em;
    }

    .timeline-card:hover {
        transform: none;
    }

    .modal-content {
        width: 95%;
        padding: 20px;
    }
    
    .modal-header h2 {
        font-size: 1.5em;
    }
}

/* 浮动气泡样式 */
.bubbles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.bubble {
    position: absolute;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 8s infinite ease-in-out;
    opacity: 0;
    transition: opacity 0.5s ease;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.bubble::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(2px);
}

.bubble.visible {
    opacity: 0.33;
}

.bubble:nth-child(1) { top: 2%; left: 2%; width: 180px; height: 180px; animation-delay: 0s; }
.bubble:nth-child(3) { top: 15%; left: 8%; width: 240px; height: 240px; animation-delay: 1s; }
.bubble:nth-child(4) { top: 35%; left: 1%; width: 170px; height: 170px; animation-delay: 1.5s; }
.bubble:nth-child(7) { top: 55%; left: 6%; width: 220px; height: 220px; animation-delay: 3s; }
.bubble:nth-child(9) { top: 75%; left: 2%; width: 190px; height: 190px; animation-delay: 4s; }
.bubble:nth-child(11) { top: 88%; left: 8%; width: 160px; height: 160px; animation-delay: 5s; }

.bubble:nth-child(2) { top: 8%; right: 4%; width: 200px; height: 200px; animation-delay: 0.5s; }
.bubble:nth-child(5) { top: 25%; right: 2%; width: 180px; height: 180px; animation-delay: 2s; }
.bubble:nth-child(6) { top: 45%; right: 6%; width: 230px; height: 230px; animation-delay: 2.5s; }
.bubble:nth-child(8) { top: 62%; right: 1%; width: 170px; height: 170px; animation-delay: 3.5s; }
.bubble:nth-child(10) { top: 78%; right: 8%; width: 210px; height: 210px; animation-delay: 4.5s; }
.bubble:nth-child(12) { top: 92%; right: 3%; width: 190px; height: 190px; animation-delay: 5.5s; }

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

#experience {
    width: 100%;
    max-width: 100%;
    padding: 50px 0 60px;
    position: relative;
    overflow: hidden;
}

#experience .container {
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
}

/* 视频链接样式 */
.video-link {
    text-decoration: none;
    margin-left: 8px;
}

.view-video {
    display: inline-block;
    background: linear-gradient(135deg, #ff4e50, #f9d423);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.view-video:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #f9d423, #ff4e50);
}
