/* =====================================================
   Education timeline
   ===================================================== */

#education .education-intro {
    max-width: 680px;
    margin: 0 auto;
}

.education-timeline {
    position: relative;
    display: grid;
    max-width: 880px;
    margin: 42px auto 0;
    gap: 28px;
}

.education-timeline::before {
    position: absolute;
    top: 12px;
    bottom: 12px;
    left: 11px;
    width: 2px;
    border-radius: 999px;
    background: linear-gradient(
        180deg,
        var(--accent),
        var(--secondary-accent),
        var(--border)
    );
    content: "";
}

.education-entry {
    position: relative;
    padding-left: 52px;
}

.education-marker {
    position: absolute;
    z-index: 1;
    top: 26px;
    left: 3px;
    width: 18px;
    height: 18px;
    border: 4px solid var(--page-bg-secondary);
    border-radius: 50%;
    background: var(--secondary-accent);
    box-shadow: 0 0 0 2px var(--secondary-accent);
}

.education-entry-current .education-marker {
    background: var(--accent);
    box-shadow:
        0 0 0 2px var(--accent),
        0 0 20px rgba(77, 216, 230, 0.45);
}

.education-card {
    position: relative;
    overflow: hidden;
    padding: 28px 30px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background:
        linear-gradient(135deg, rgba(77, 216, 230, 0.07), transparent 42%),
        var(--surface);
    box-shadow: var(--shadow);
    text-align: left;
    transition:
        border-color 0.25s ease,
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.education-card::before {
    position: absolute;
    top: 0;
    left: 30px;
    width: 56px;
    height: 3px;
    border-radius: 0 0 999px 999px;
    background: linear-gradient(90deg, var(--accent), var(--secondary-accent));
    content: "";
}

.education-card:hover {
    border-color: var(--accent-border);
    box-shadow:
        var(--shadow),
        0 0 0 1px rgba(77, 216, 230, 0.06);
    transform: translateY(-4px);
}

.education-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 14px;
}

.education-meta time {
    color: var(--accent);
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.education-meta span {
    padding: 5px 10px;
    border: 1px solid var(--accent-border);
    border-radius: 999px;
    color: var(--text-muted);
    background: var(--accent-soft);
    font-size: 0.75rem;
    font-weight: 700;
}

.education-card h3 {
    margin: 0 0 8px;
    font-size: clamp(1.25rem, 3vw, 1.65rem);
    line-height: 1.35;
}

.education-degree {
    margin: 0;
    color: var(--text-secondary);
    font-weight: 500;
}

.education-focus {
    display: flex;
    flex-wrap: wrap;
    margin: 20px 0 0;
    padding: 0;
    gap: 8px;
    list-style: none;
}

.education-focus li,
.light-mode .education-focus li {
    margin: 0;
    padding: 6px 11px;
    border: 1px solid var(--accent-border);
    border-radius: 999px;
    color: var(--accent);
    background: var(--accent-soft);
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.3;
    text-shadow: none;
    transform: none;
}

@media (max-width: 576px) {
    .education-timeline {
        margin-top: 32px;
        gap: 22px;
    }

    .education-entry {
        padding-left: 38px;
    }

    .education-timeline::before {
        left: 8px;
    }

    .education-marker {
        top: 24px;
        left: 1px;
        width: 16px;
        height: 16px;
    }

    .education-card {
        padding: 24px 20px;
    }

    .education-card::before {
        left: 20px;
    }

    .education-meta {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .education-card {
        transition: none;
    }

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