
.timeline-body {
  background: linear-gradient(to bottom, var(--bg-0), var(--bg-1));
  font-family: 'Georgia', 'Libre Baskerville', serif;
}

.timeline-main {
  max-width: 800px;
  margin: 60px auto;
  padding: 0 20px;
  position: relative;
}


.timeline-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 3px;
  background-color: var(--ink);
  transform: translateX(-50%);
  z-index: 0;
  opacity: 0;
  animation: lineFadeIn 1.4s ease forwards 0.5s;
}

@keyframes lineFadeIn {
  from {
    opacity: 0;
    height: 0;
  }
  to {
    opacity: 1;
    height: 100%;
  }
}

.timeline-line::before,
.timeline-line::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 18px;
  height: 2px;
  background-color: var(--ink);
  transform: translateX(-50%);
}

.timeline-line::before {
  top: 0;
}

.timeline-line::after {
  bottom: 0;
}


.timeline-entry {
  position: relative;
  padding: 40px 20px;
  min-height: 120px;
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s ease;
}


.timeline-entry:hover {
  transform: scale(1.02);
}
.timeline-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  background-color: var(--ink);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(1); /* added scale(1) */
  z-index: 2;
  cursor: pointer;
  pointer-events: auto;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.timeline-dot:hover {
  transform: translate(-50%, -50%) scale(1.1); /* now includes both translate and scale */
  background-color: var(--ink-2);
}



.timeline-dot::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: rgba(25, 34, 49, 0.2);
  transform: translate(-50%, -50%);
  z-index: -1;
  opacity: 0;
  animation: pulse 1.5s ease-out forwards;
}

@keyframes pulse {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.4;
  }
  100% {
    transform: translate(-50%, -50%) scale(2.5);
    opacity: 0;
  }
}


.timeline-dot::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 150%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #192231;
  color: #ffffff;
  padding: 6px 10px;
  font-size: 13px;
  white-space: nowrap;
  border-radius: 6px;
  font-family: 'Georgia', 'Libre Baskerville', serif;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  z-index: 10;
}

.timeline-dot:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}


/* Shared label style */
.timeline-label {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  font-family: 'Georgia', 'Libre Baskerville', serif;
  color: var(--ink);
  white-space: nowrap;
  z-index: 1;
}

/* === Odd Entries (Right side) === */
.timeline-entry:nth-child(odd) .timeline-dot {
  left: 50%;
  transform: translate(-50%, -50%);
}

.timeline-entry:nth-child(odd) .timeline-label {
  left: calc(50% + 24px);
  text-align: left;
}

/* === Even Entries (Left side) === */
.timeline-entry:nth-child(even) .timeline-dot {
  left: 50%;
  transform: translate(-50%, -50%);
}

.timeline-entry:nth-child(even) .timeline-label {
  right: calc(50% + 24px);
  text-align: right;
}

/* Entry animation */
.timeline-entry.animated {
  animation: fadeInSlideUp 1s ease forwards;
  opacity: 0;
}

@keyframes fadeInSlideUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}



#modalImage {
  width: 200px;
  height: auto;
  border-radius: 10px;
  margin: 15px auto;
  display: block;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#modalDescription p {
  margin-bottom: 14px;
  line-height: 1.6;
}
#modalDescription p:last-child {
  margin-bottom: 0;
}



.timeline-tag {
  position: absolute;
  top: calc(50% + 70px); /* push it further below the dot */
  font-size: 20px;
  font-family: 'Georgia', 'Libre Baskerville', serif;
color: var(--ghost-ink);/* slightly bold ghosting */



  white-space: nowrap;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 1.4s ease, transform 1.4s ease;
}

.timeline-entry:nth-child(odd) .timeline-tag {
  left: calc(50% + 120px);  /* further from line */
  text-align: left;
}

.timeline-entry:nth-child(even) .timeline-tag {
  right: calc(50% + 120px); /* same for other side */
  text-align: right;
}

.timeline-tag.tag-visible {
  opacity: 1;
  transform: translateY(-8px); /* gentle float */
}



@media (max-width: 600px) {
  
  .timeline-label {
    font-size: 14px;
  }
}

@media (max-width: 600px) {
  .timeline-tag {
    font-size: 16px;
    top: calc(50% + 45px);
  }

  .timeline-entry:nth-child(odd) .timeline-tag {
    left: calc(50% + 40px);
    text-align: left;
  }

  .timeline-entry:nth-child(even) .timeline-tag {
    right: calc(50% + 40px);
    text-align: right;
  }

  .timeline-label {
    font-size: 13px;
  }
}