/* =========================================
   CAREER TIMELINE
   ========================================= */

.career-timeline {
  position: relative;
  padding-left: 32px;
  margin-left: 16px;
  border-left: 2px solid var(--border-subtle);
}

[dir="rtl"] .career-timeline {
  border-left: none;
  padding-left: 0;
  margin-left: 0;

  border-right: 2px solid var(--border-subtle);
  padding-right: 32px;
  margin-right: 16px;
}

.timeline-node {
  position: relative;
  margin-bottom: 48px;
  opacity: 1; /* For future scroll animation, initially 1 to ensure visibility */
}

.timeline-node:last-child {
  margin-bottom: 0;
}

.timeline-marker {
  position: absolute;
  top: 6px;
  left: -41px;
  width: 16px;
  height: 16px;
  background: var(--bg-main);
  border: 3px solid var(--primary);
  border-radius: 50%;
  z-index: 2;
  transition: all 0.3s ease;
}

[dir="rtl"] .timeline-marker {
  left: auto;
  right: -41px;
}

.timeline-node:hover .timeline-marker {
  background: var(--primary);
  box-shadow: 0 0 10px var(--primary-glow);
  transform: scale(1.2);
}

.timeline-period {
  display: inline-block;
  padding: 4px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.timeline-content {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  transition:
    transform 0.3s ease,
    border-color 0.3s ease;
}

.timeline-node:hover .timeline-content {
  border-color: var(--border-strong);
  transform: translateX(5px);
}

[dir="rtl"] .timeline-node:hover .timeline-content {
  transform: translateX(-5px);
}

.timeline-content h4 {
  font-size: 1.2rem;
  color: var(--text-main);
  margin-bottom: 4px;
}

.timeline-entity {
  display: block;
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 12px;
}

.timeline-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

@media (max-width: 768px) {
  .timeline-content {
    padding: 16px;
  }
  .timeline-node:hover .timeline-content {
    transform: translateX(0); /* Disable shift on mobile */
  }
}
