/* Container: Fades in first */
.mini-timeline {
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  position: relative;
  margin: 30px 0 10px;
  padding: 40px 0 10px; 
  opacity: 0;
  animation: fadeInTimeline 0.8s ease forwards;
}

/* Horizontal Line: Draws itself faster (0.6s instead of 1s) */
.mini-timeline::before {
  content: "";
  position: absolute;
  top: 0;
  left: 5%;
  right: 5%;
  height: 2px;
  background-color: var(--ink);
  z-index: 0;
  transform-origin: left center;
  transform: scaleX(0); 
  animation: drawLine 0.6s ease-out forwards 0.5s; /* Reduced delay and duration */
  transition: transform 0.3s ease, height 0.3s ease;
}

.mini-point {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
  cursor: pointer;
  opacity: 0;
  transform: translateY(5px); /* Reduced distance for smoother entrance */
  animation: popInPoint 0.6s ease-out forwards; /* Smoother easing */
}

/* Staggered start times - adjusted to match faster line draw */
.mini-point:nth-child(1) { animation-delay: 0.9s; }
.mini-point:nth-child(2) { animation-delay: 1.05s; }
.mini-point:nth-child(3) { animation-delay: 1.2s; }
.mini-point:nth-child(4) { animation-delay: 1.35s; }

/* Vertical Connector (The Stick): Now remains stationary on hover */
.mini-point::before {
  content: "";
  position: absolute;
  top: -40px; 
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 0;
  background-color: var(--ink);
  animation: dropConnector 0.4s ease forwards;
  /* Inherits delay from parent .mini-point */
}

.mini-dot {
  width: 12px;
  height: 12px;
  background-color: var(--ink);
  border-radius: 50%;
  position: relative;
  top: -14px;  
  margin-bottom: 6px;
  transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

/* HOVER: Point Lift, Glow, and Pulse */
.mini-point:hover .mini-dot {
  transform: scale(1.3); /* Lift the dot and scale slightly */
  background-color: var(--accent-2);
  /* Apply the pulse animation */
  animation: pointPulse 1.5s infinite ease-in-out;
}

.mini-point:hover .mini-label {
  color: var(--accent-2);
}

/* Note: Removed the transform from the whole .mini-point 
   so the ::before (the stick) stays attached to the top line */
.mini-point:hover {
  transform: none !important; 
}

.mini-label {
  font-family: 'Georgia', serif;
  font-size: 14px;
  color: var(--ink);
  text-align: center;
  transition: all 0.3s ease;
}

/* --- ANIMATIONS --- */

@keyframes fadeInTimeline {
  to { opacity: 1; }
}

@keyframes drawLine {
  to { transform: scaleX(1); }
}

@keyframes popInPoint {
  to { 
    opacity: 1; 
    transform: translateY(0);
  }
}

@keyframes dropConnector {
  from { height: 0; opacity: 0; }
  to { height: 14px; opacity: 1; }
}

/* Glow Pulse Animation */
@keyframes pointPulse {
  0% {
    box-shadow: 0 0 0 0px rgba(var(--accent-2-rgb, 100, 100, 100), 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(var(--accent-2-rgb, 100, 100, 100), 0);
  }
  100% {
    box-shadow: 0 0 0 0px rgba(var(--accent-2-rgb, 100, 100, 100), 0);
  }
}

/* Note Text: Fades in last */
.timeline-link-note {
  text-align: center;
  margin-top: 15px;
  display: block;
  
  /* Start hidden */
  opacity: 0;
  transform: translateY(5px);
  
  /* Animation: 1.8s delay ensures the timeline is fully drawn first */
  animation: fadeInNote 0.8s ease forwards;
  animation-delay: 1.8s; 
}

@keyframes fadeInNote {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}