/* ========================================
   Interactive Timeline
   ======================================== */

.timeline-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 0;
  padding-top: 4px;
}

/* ---- Filter bar ---- */
.timeline-filters {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  flex-shrink: 0;
}

.timeline-filter-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8b949e;
  margin-right: 4px;
}

.timeline-filter-btn {
  background: transparent;
  color: #8b949e;
  border: 1px solid rgba(139, 148, 158, 0.3);
  border-radius: 4px;
  padding: 3px 10px;
  font-size: 0.7rem;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: all 0.2s ease;
}

.timeline-filter-btn:hover {
  color: #c9d1d9;
  border-color: rgba(201, 209, 217, 0.5);
}

.timeline-filter-btn.active {
  background: #1f6feb;
  color: #fff;
  border-color: #1f6feb;
}

/* ---- Track wrapper ---- */
.timeline-track-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-height: 0;
}

/* ---- Navigation buttons ---- */
.timeline-nav {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 50%;
  color: #8b949e;
  cursor: pointer;
  font-size: 0.65rem;
  transition: all 0.2s ease;
  z-index: 2;
}

.timeline-nav:hover {
  background: rgba(255,255,255,0.12);
  color: #c9d1d9;
}

.timeline-nav-prev { margin-right: 6px; }
.timeline-nav-next { margin-left: 6px; }

/* ---- Track ---- */
.timeline-track {
  position: relative;
  flex: 1 1 auto;
  overflow-x: auto;
  overflow-y: hidden;
  height: 100%;
  cursor: grab;
  scroll-behavior: smooth;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.timeline-track:active { cursor: grabbing; }
.timeline-track::-webkit-scrollbar { display: none; }

/* ---- Horizontal line ---- */
.timeline-line {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(to right,
    rgba(31, 111, 235, 0.1),
    rgba(31, 111, 235, 0.5) 20%,
    rgba(31, 111, 235, 0.6) 50%,
    rgba(31, 111, 235, 0.5) 80%,
    rgba(31, 111, 235, 0.1));
  transform: translateY(-50%);
  pointer-events: none;
}

/* ---- Markers container ---- */
.timeline-markers {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 40px;
  gap: 0;
}

/* ---- Individual marker ---- */
.timeline-marker {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 100px;
  cursor: pointer;
  z-index: 1;
  transition: transform 0.2s ease;
}

.timeline-marker:hover { transform: translateY(-2px); }
.timeline-marker.filtered-out { display: none; }

.timeline-marker.active .timeline-dot {
  background: #1f6feb;
  border-color: #1f6feb;
  box-shadow: 0 0 12px rgba(31, 111, 235, 0.6);
  transform: scale(1.3);
}
/* ---- Dot ---- */
.timeline-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #30363d;
  border: 2px solid rgba(139, 148, 158, 0.4);
  transition: all 0.25s ease;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

.timeline-marker:hover .timeline-dot {
  border-color: #c9d1d9;
  background: #484f58;
}

/* Category-colored dots */
.timeline-marker.cat-work .timeline-dot {
  border-color: rgba(31, 111, 235, 0.6);
}
.timeline-marker.cat-work.active .timeline-dot,
.timeline-marker.cat-work:hover .timeline-dot {
  background: #1f6feb;
  border-color: #1f6feb;
}

.timeline-marker.cat-training .timeline-dot {
  border-color: rgba(63, 185, 80, 0.6);
}
.timeline-marker.cat-training.active .timeline-dot,
.timeline-marker.cat-training:hover .timeline-dot {
  background: #3fb950;
  border-color: #3fb950;
}

.timeline-marker.cat-project .timeline-dot {
  border-color: rgba(210, 153, 34, 0.6);
}
.timeline-marker.cat-project.active .timeline-dot,
.timeline-marker.cat-project:hover .timeline-dot {
  background: #d29922;
  border-color: #d29922;
}

/* ---- Marker label ---- */
.timeline-label {
  position: absolute;
  top: calc(50% + 14px);
  white-space: nowrap;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #8b949e;
  transition: color 0.2s ease;
  text-align: center;
  pointer-events: none;
}

.timeline-marker:nth-child(even) .timeline-label {
  top: auto;
  bottom: calc(50% + 14px);
}

.timeline-marker.active .timeline-label {
  color: #c9d1d9;
  font-weight: 600;
}

/* ---- Detail panel ---- */
.timeline-detail {
  flex-shrink: 0;
  min-height: 60px;
  padding: 8px 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.02);
}

.timeline-detail-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #484f58;
  font-size: 0.75rem;
  padding: 10px 0;
}

.timeline-detail-content {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.timeline-detail-badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 3px;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  flex-shrink: 0;
}

.timeline-detail-badge.badge-work {
  background: rgba(31, 111, 235, 0.15);
  color: #58a6ff;
}

.timeline-detail-badge.badge-training {
  background: rgba(63, 185, 80, 0.15);
  color: #3fb950;
}

.timeline-detail-badge.badge-project {
  background: rgba(210, 153, 34, 0.15);
  color: #d29922;
}

.timeline-detail-body { flex: 1; min-width: 0; }

.timeline-detail-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: #c9d1d9;
  margin: 0;
  line-height: 1.3;
}

.timeline-detail-date {
  font-size: 0.65rem;
  color: #8b949e;
  margin-top: 2px;
}

.timeline-detail-desc {
  font-size: 0.7rem;
  color: #8b949e;
  margin: 4px 0 0;
  line-height: 1.4;
}
