.history-page {
  padding-bottom: 8rem;
}

.history-header {
  text-align: center;
  margin-bottom: 4rem;
}

.history-badge {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--primary-100);
  background: rgba(58, 134, 255, 0.1);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  letter-spacing: 1px;
}

.history-header h1 {
  font-size: 3rem;
  margin: 1.5rem 0 0.5rem;
}

.history-header p {
  color: var(--text-200);
  max-width: 500px;
  margin: 0 auto;
}

/* Timeline Layout */
.timeline-container {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 0;
}

.timeline-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--gradient-primary);
  transform: translateX(-50%);
  opacity: 0.3;
}

.timeline-items {
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

.timeline-item {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: flex-end; /* Mobile default */
}

/* Desktop alternating */
@media (min-width: 768px) {
  .timeline-item:nth-child(even) {
    justify-content: flex-start;
  }
}

.timeline-node {
  position: absolute;
  left: 50%;
  top: 2rem;
  width: 16px;
  height: 16px;
  background: var(--bg-100);
  border: 3px solid var(--primary-100);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  box-shadow: 0 0 10px var(--primary-100);
}

.timeline-date {
  position: absolute;
  left: 50%;
  top: 2rem;
  transform: translate(-50%, -180%);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-300);
}

.timeline-card {
  width: 42%;
  background: var(--bg-200);
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  border-radius: 16px;
  position: relative;
  transition: all 0.3s;
}

.timeline-card:hover {
  border-color: var(--primary-100);
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

/* Connector Arrows (Speech bubble style) */
.timeline-card::after {
  content: '';
  position: absolute;
  top: 2rem;
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  transform: translateY(-50%);
}

.timeline-item:nth-child(odd) .timeline-card::after {
  left: -10px;
  border-right: 10px solid var(--primary-100);
}

.timeline-item:nth-child(even) .timeline-card::after {
  right: -10px;
  border-left: 10px solid var(--primary-100);
}

.milestone-title {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.milestone-org {
  font-size: 0.9rem;
  color: var(--primary-100);
  margin-bottom: 1rem;
  font-weight: 600;
}

.milestone-desc {
  font-size: 0.9rem;
  color: var(--text-200);
}

.milestone-tags {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.m-tag {
  font-size: 0.7rem;
  background: var(--bg-300);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  color: var(--text-300);
}

/* Mobile Adjustments */
@media (max-width: 767px) {
  .timeline-line {
    left: 20px;
  }
  .timeline-node {
    left: 20px;
  }
  .timeline-date {
    left: 50px;
    transform: translateY(-180%);
  }
  .timeline-item {
    justify-content: flex-end;
  }
  .timeline-card {
    width: calc(100% - 60px);
  }
  .timeline-card::after {
    left: -10px !important;
    right: auto !important;
    border-right: 10px solid var(--primary-100) !important;
    border-left: none !important;
  }
}
