/* ===== SCROLL TIMELINE STYLES ===== */

.timeline-section {
    min-height: 100vh;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

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

/* Header Styles */
.timeline-header {
    text-align: center;
    padding: 80px 0 60px;
}

.timeline-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #22d3ee, #6366f1, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.timeline-subtitle {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 500px;
    margin: 0 auto;
}

/* Timeline Wrapper */
.timeline-wrapper {
    position: relative;
    padding-bottom: 100px;
}

/* Timeline Line */
.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    width: 2px;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-50%);
    z-index: 10;
}

/* Progress Line with Gradient */
.timeline-progress {
    position: absolute;
    left: 50%;
    top: 0;
    width: 2px;
    height: 0%;
    background: linear-gradient(to bottom, #22d3ee, #6366f1, #a855f7);
    transform: translateX(-50%);
    z-index: 20;
    border-radius: 9999px;
    box-shadow: 
        0 0 15px rgba(99, 102, 241, 0.5),
        0 0 25px rgba(168, 85, 247, 0.3);
    transition: height 0.1s ease-out;
}

/* Traveling Glow "Comet" */
.timeline-glow {
    position: absolute;
    left: 50%;
    top: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.8) 0%, rgba(99, 102, 241, 0.5) 40%, rgba(34, 211, 238, 0) 70%);
    transform: translateX(-50%) translateY(-50%);
    z-index: 30;
    box-shadow: 
        0 0 15px 4px rgba(168, 85, 247, 0.6),
        0 0 25px 8px rgba(99, 102, 241, 0.4),
        0 0 40px 15px rgba(34, 211, 238, 0.2);
    animation: pulse-glow 2s ease-in-out infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.timeline-glow.active {
    opacity: 1;
}

@keyframes pulse-glow {
    0%, 100% { transform: translateX(-50%) translateY(-50%) scale(1); }
    50% { transform: translateX(-50%) translateY(-50%) scale(1.3); }
}

/* Timeline Events Container */
.timeline-events {
    position: relative;
    z-index: 20;
}

/* Individual Timeline Event */
.timeline-event {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 80px;
    padding: 20px 0;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.7s cubic-bezier(0.25, 0.1, 0.25, 1.0);
}

.timeline-event.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Alternating Layout */
.timeline-event:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-event:nth-child(odd) .timeline-card {
    margin-right: calc(50% + 40px);
}

.timeline-event:nth-child(even) .timeline-card {
    margin-left: calc(50% + 40px);
}

/* Timeline Dot */
.timeline-dot {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #1a1a1a;
    border: 4px solid rgba(255, 255, 255, 0.3);
    z-index: 40;
    transition: all 0.8s ease;
}

.timeline-dot.active {
    border-color: #6366f1;
    background: #6366f1;
    box-shadow: 
        0 0 12px rgba(99, 102, 241, 0.6),
        0 0 24px rgba(99, 102, 241, 0.3);
    animation: dot-pulse 0.8s ease-in-out;
}

@keyframes dot-pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.3); }
}

/* Timeline Card */
.timeline-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 32px;
    width: calc(50% - 40px);
    position: relative;
    transition: all 0.3s ease;
}

.timeline-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-5px);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(99, 102, 241, 0.1);
}

/* Card Variants */
.timeline-card.elevated {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.timeline-card.glow:hover {
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.3);
}

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

.timeline-card.bounce:active {
    transform: translateY(-2px) scale(0.97);
}

/* Card Content */
.timeline-year {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    font-weight: 700;
    color: #6366f1;
    margin-bottom: 12px;
}

.timeline-year-badge {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.timeline-title-text {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: white;
}

.timeline-subtitle-text {
    font-size: 1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 16px;
}

.timeline-description {
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
}

/* Icon Styles */
.timeline-icon {
    width: 16px;
    height: 16px;
    color: #6366f1;
}

.timeline-icon-wrapper {
    margin-bottom: 16px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.timeline-icon-wrapper .timeline-icon {
    font-size: 1.5rem;
    width: auto;
    height: auto;
}

/* Animation Effects */
.timeline-event.fade-in {
    animation: fadeSlideUp 0.7s cubic-bezier(0.25, 0.1, 0.25, 1.0) forwards;
}

.timeline-event.slide-left {
    animation: slideFromLeft 0.7s cubic-bezier(0.25, 0.1, 0.25, 1.0) forwards;
}

.timeline-event.slide-right {
    animation: slideFromRight 0.7s cubic-bezier(0.25, 0.1, 0.25, 1.0) forwards;
}

.timeline-event.scale-in {
    animation: scaleIn 0.7s cubic-bezier(0.25, 0.1, 0.25, 1.0) forwards;
}

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

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

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .timeline-event {
        flex-direction: column !important;
        margin-bottom: 60px;
    }
    
    .timeline-event:nth-child(odd) .timeline-card,
    .timeline-event:nth-child(even) .timeline-card {
        margin: 60px 0 0 0;
        width: 100%;
        max-width: 600px;
    }
    
    .timeline-dot {
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        margin: 0 auto 20px;
    }
    
    .timeline-line,
    .timeline-progress,
    .timeline-glow {
        display: none;
    }
}

@media (max-width: 768px) {
    .timeline-header {
        padding: 60px 0 40px;
    }
    
    .timeline-card {
        padding: 24px;
    }
    
    .timeline-title-text {
        font-size: 1.25rem;
    }
    
    .timeline-event {
        margin-bottom: 40px;
    }
}

/* Dark Mode Support */
.timeline-section.dark-mode {
    background: linear-gradient(135deg, #000000 0%, #111111 100%);
}

.timeline-section.dark-mode .timeline-card {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.05);
}

.timeline-section.dark-mode .timeline-card:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Smooth scroll behavior */
.timeline-section.smooth-scroll {
    scroll-behavior: smooth;
}

/* Perspective effect for cards */
.timeline-card.perspective {
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
}

.timeline-card.perspective:hover {
    transform: perspective(1000px) rotateY(5deg) rotateX(5deg) translateY(-5px);
}