/* Gradient text helper */
.gradient-text {
    background: linear-gradient(135deg, #6366f1, #a855f7, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Animated gradient border */
.card-glow {
    position: relative;
    background: #1e1b4e;
    border-radius: 1rem;
    overflow: hidden;
}

.card-glow::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 1rem;
    padding: 1px;
    background: linear-gradient(135deg, #6366f1, #a855f7, #ec4899);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* Smooth reveal animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Floating dots background */
.bg-dots {
    background-image: radial-gradient(circle, rgba(99, 102, 241, 0.15) 1px, transparent 1px);
    background-size: 30px 30px;
}

/* Nav active link */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #6366f1, #a855f7);
    transition: width 0.3s ease, left 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
    left: 0;
}

/* Tag pill */
.tag {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

/* Timeline */
.timeline-wrapper {
    position: relative;
    padding-left: 8rem;
}

.timeline-line {
    position: absolute;
    left: 6.5rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, #6366f1, #a855f7, #ec4899);
}

.timeline-item {
    position: relative;
    padding-bottom: 3rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

/* Year label on the left */
.timeline-year {
    position: absolute;
    left: -8rem;
    top: 0.2rem;
    width: 5.5rem;
    text-align: right;
    font-size: 0.875rem;
    font-weight: 700;
    color: #818cf8;
    transition: color 0.3s ease;
}

.timeline-item:hover .timeline-year {
    color: #a855f7;
}

/* Active year with pill background */
.timeline-year.active-year {
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 9999px;
    padding: 0.15rem 0.6rem;
    text-align: center;
    width: auto;
    left: -8.5rem;
}

/* Interactive dot */
.timeline-dot {
    width: 14px;
    height: 14px;
    background: #1e1b4e;
    border: 3px solid #6366f1;
    border-radius: 50%;
    position: absolute;
    left: -1.85rem;
    top: 0.35rem;
    z-index: 2;
    transition: all 0.3s ease;
    cursor: pointer;
}

.timeline-dot::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: scale(0.5);
}

.timeline-item:hover .timeline-dot {
    background: #6366f1;
    border-color: #a855f7;
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.5);
}

.timeline-item:hover .timeline-dot::after {
    opacity: 1;
    transform: scale(1);
}

/* Card lift on hover */
.timeline-item .card-glow {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-item:hover .card-glow {
    transform: translateX(4px);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.15);
}
