/* Timeline Section */
.timeline-section {
    position: relative;
    padding: 6rem 0;
    background-color: var(--background);
}

/* Light mode timeline section */
[data-theme="light"] .timeline-section {
    background-color: var(--background);
}

.timeline {
    position: relative;
    max-width: 1000px; /* Reduced width for better readability */
    margin: 0 auto;
    padding: 2rem 0;
}

/* Central Line */
.timeline::after {
    content: '';
    position: absolute;
    width: 2px; /* Thinner, cleaner line */
    background-color: var(--border-color); /* Subtle line color instead of gradient */
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: none; /* Removed heavy shadow */
}

/* Timeline Item Structure */
.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    box-sizing: border-box;
    opacity: 0;
    transform: translateY(20px); /* Clean upward fade instead of side slide */
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.timeline-item.active {
    opacity: 1;
    transform: translateY(0) !important;
}

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

.timeline-item:nth-child(even).active {
    opacity: 1;
    transform: translateY(0) !important;
}

/* Content Box - Cleaner & Minimalist */
.timeline-content {
    padding: 1.5rem 2rem;
    background-color: transparent; /* Removed card background for cleaner look */
    border-left: 3px solid var(--accent); /* Simple accent indicator */
    border-radius: 0; /* Squared off for tech look */
    position: relative;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    box-shadow: none; /* No shadow */
    min-width: 280px;
    text-align: right; /* Text aligns to center line for left items */
}

.timeline-item:nth-child(even) .timeline-content {
    border-left: none;
    border-right: 3px solid var(--accent);
    text-align: left; /* Text aligns to center line for right items */
}

/* Light mode specific styling */
[data-theme="light"] .timeline-content {
    background-color: transparent;
    border: none;
    border-left: 3px solid var(--accent);
    box-shadow: none;
}
[data-theme="light"] .timeline-item:nth-child(even) .timeline-content {
    border-left: none;
    border-right: 3px solid var(--accent);
}

.timeline-content:hover {
    transform: none; /* No movement on hover */
    /* text-shadow: 0 0 1px currentColor; Subtle text bolding */
}

/* Timeline Dots - Simplified */
.timeline-content::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    right: -46px; /* Position relative to center line */
    top: 24px;
    background-color: var(--background);
    border: 2px solid var(--accent);
    border-radius: 50%;
    z-index: 1;
    box-shadow: 0 0 0 4px var(--background); /* Creates spacing from line */
}

.timeline-item:nth-child(even) .timeline-content::after {
    left: -46px;
    right: auto;
}

/* Active Dot State */
.timeline-item.active .timeline-content::after {
    background-color: var(--accent);
}

/* Typography details */
.timeline-date {
    display: inline-block;
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.timeline-title {
    margin: 0 0 0.8rem;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.4rem;
}

.timeline-description {
    margin: 0;
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .timeline::after {
        left: 31px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }
    
    .timeline-item:nth-child(even) {
        left: 0;
        transform: translateY(20px); /* Reset for mobile */
    }
    
    .timeline-content {
        text-align: left; /* Always left align on mobile */
        border-left: 3px solid var(--accent);
        border-right: none !important;
        padding: 1rem;
    }
    
    .timeline-content::after {
        left: -45px;
        right: auto !important;
    }
}

/* Light mode achievement highlight */
[data-theme="light"] .achievement-highlight {
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border-left: 4px solid #0d6efd;
}

.achievement-highlight .timeline-date {
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: var(--background);
    font-weight: 800;
}

/* Light mode achievement date */
[data-theme="light"] .achievement-highlight .timeline-date {
    background: linear-gradient(135deg, #0d6efd, #0a58ca);
    color: #ffffff;
}

.achievement-highlight:hover {
    background: linear-gradient(135deg, var(--background), var(--background-tertiary));
}

/* Light mode achievement hover */
[data-theme="light"] .achievement-highlight:hover {
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
}

/* Mobile Responsive Design */
@media screen and (max-width: 768px) {
    .timeline::after {
        left: 35px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 75px;
        padding-right: 25px;
        transform: translateX(-30px);
        left: 0 !important;
    }
    
    .timeline-item:nth-child(even) {
        left: 0 !important;
        transform: translateX(-30px);
    }
    
    .timeline-item.active,
    .timeline-item:nth-child(even).active {
        transform: translateX(0) !important;
    }
    
    .timeline-content {
        margin-bottom: 20px;
    }
    
    .timeline-item:nth-child(odd) .timeline-content::after,
    .timeline-item:nth-child(even) .timeline-content::after {
        left: -47px;
    }
    
    .timeline-date {
        font-size: 1rem;
    }
    
    .timeline-title {
        font-size: 1.2rem;
    }
    
    .timeline-description {
        font-size: 0.9rem;
    }
}