/* Timeline Styles */
#education {
    background-color: #111;
    /* Slightly different from main bg */
    padding: 6rem 5%;
}

.timeline-wrapper {
    position: relative;
    max-width: 1000px;
    margin: 4rem auto 0;
    display: flex;
    justify-content: space-around;
    padding-top: 40px;
    /* Space for date */
}

/* The Horizontal Line */
.timeline-line {
    position: absolute;
    top: 60px;
    /* Matches dot center */
    left: 10%;
    width: 80%;
    height: 4px;
    background: #333;
    z-index: 0;
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    z-index: 1;
    width: 300px;
    text-align: center;
    padding-top: 50px;
    /* Space between dot and content */
}

/* Dot on the line */
.timeline-dot {
    position: absolute;
    top: 10px;
    /* Relative to item top (which starts at wrapper padding) */
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    border: 4px solid #111;
    /* Match section bg */
    box-shadow: 0 0 0 2px var(--primary-color);
    z-index: 2;
    transition: transform 0.3s;
}

.timeline-item:hover .timeline-dot {
    transform: translateX(-50%) scale(1.2);
    box-shadow: 0 0 10px var(--primary-color);
}

/* Year above the dot */
.timeline-date {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.2rem;
}

/* Content Box below */
.timeline-content {
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 12px;
    border-top: 3px solid var(--primary-color);
    transition: transform 0.3s, background 0.3s;
    backdrop-filter: blur(5px);
}

.timeline-item:hover .timeline-content {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.08);
}

.timeline-content h3 {
    color: white;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.timeline-content h4 {
    color: #ccc;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    font-weight: normal;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.timeline-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Responsive Timeline */
@media (max-width: 768px) {
    .timeline-wrapper {
        flex-direction: column;
        align-items: center;
        gap: 3rem;
        margin-top: 2rem;
    }

    .timeline-line {
        width: 4px;
        height: 80%;
        left: 50%;
        top: 10%;
        transform: translateX(-50%);
    }

    .timeline-item {
        width: 100%;
        max-width: 400px;
        padding-top: 0;
        padding-left: 50px;
        /* Space for line on left */
        text-align: left;
    }

    .timeline-dot {
        left: 50%;
        /* Center dot on line */
        top: 50%;
        transform: translate(-50%, -50%);
    }

    /* Adjust for vertical layout */
    .timeline-item {
        padding-left: 0;
        padding-top: 50px;
        /* Space for dot above */
    }

    .timeline-date {
        top: 10px;
    }

    .timeline-dot {
        top: 40px;
    }

    .timeline-content {
        margin-top: 20px;
    }
}