/* ============================================
   Timeline Styles
   ============================================ */

.timeline {
  position: relative;
  padding: 40px 0;
}

/* Vertical line */
.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 100%;
  background: linear-gradient(to bottom,
    transparent 0%,
    rgba(139,92,246,0.3) 5%,
    rgba(139,92,246,0.3) 95%,
    transparent 100%
  );
}

@media (max-width: 900px) {
  .timeline::before { left: 24px; }
}

.timeline-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  margin-bottom: 60px;
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.6s ease;
}
.timeline-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.timeline-item:nth-child(odd) { flex-direction: row; }
.timeline-item:nth-child(even) { flex-direction: row-reverse; }

@media (max-width: 900px) {
  .timeline-item,
  .timeline-item:nth-child(even) {
    flex-direction: row;
    padding-left: 60px;
  }
}

.timeline-item-content {
  width: calc(50% - 40px);
  padding: 0;
}

@media (max-width: 900px) {
  .timeline-item-content { width: 100%; }
}

/* Node dot */
.timeline-node {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 3px solid var(--accent-primary);
  z-index: 5;
  transition: all 0.3s;
  cursor: pointer;
}

@media (max-width: 900px) {
  .timeline-node { left: 24px; }
}

.timeline-node::after {
  content: '';
  position: absolute;
  top: -6px;
  left: -6px;
  right: -6px;
  bottom: -6px;
  border-radius: 50%;
  background: rgba(139,92,246,0.15);
  opacity: 0;
  transition: opacity 0.3s;
}
.timeline-item:hover .timeline-node::after { opacity: 1; }

.timeline-node.active {
  background: var(--accent-primary);
  box-shadow: 0 0 20px rgba(139,92,246,0.4);
}

/* Card */
.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all 0.3s;
  position: relative;
}
.timeline-card:hover {
  border-color: var(--glass-border-hover);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-glow);
}

.timeline-phase {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-primary);
  margin-bottom: 6px;
}
.timeline-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}
.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-tertiary);
  margin-bottom: 14px;
}
.timeline-description {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 18px;
}

.timeline-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}
.timeline-card.expanded .timeline-details {
  max-height: 600px;
}

.timeline-changes {
  list-style: none;
  margin-bottom: 16px;
}
.timeline-changes li {
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 5px 0;
  padding-left: 20px;
  position: relative;
}
.timeline-changes li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-primary);
}

.timeline-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.timeline-repos {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.timeline-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent-tertiary);
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px 0;
  font-family: var(--font-sans);
  transition: color 0.2s;
}
.timeline-toggle:hover { color: var(--text-primary); }
.timeline-toggle svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s;
}
.timeline-card.expanded .timeline-toggle svg { transform: rotate(180deg); }

/* --- Mini timeline (for Overview page) --- */
.mini-timeline {
  position: relative;
  display: flex;
  justify-content: space-between;
  padding: 40px 0 20px;
}
.mini-timeline::before {
  content: '';
  position: absolute;
  top: 50px;
  left: 5%;
  right: 5%;
  height: 2px;
  background: linear-gradient(90deg,
    var(--accent-secondary),
    var(--accent-primary),
    var(--accent-pink),
    var(--accent-cyan)
  );
  border-radius: 1px;
}
.mini-timeline-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
  flex: 1;
}
.mini-timeline-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-primary);
  border: 3px solid var(--bg-primary);
  margin-bottom: 14px;
  transition: all 0.3s;
}
.mini-timeline-item:hover .mini-timeline-dot {
  transform: scale(1.3);
  box-shadow: 0 0 15px rgba(139,92,246,0.5);
}
.mini-timeline-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
  max-width: 100px;
}
.mini-timeline-year {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-tertiary);
  margin-top: 4px;
}
