@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap");

/* Base Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: #111111;
  color: white;
  font-family: 'Montserrat', sans-serif;
  overflow-x: hidden;
}

/* Timeline Container */
.timeline-wrapper {
  position: relative;
  padding: 2rem 0;
}

/* Central Timeline Line */
.timeline-line {
  position: absolute;
  left: 2rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, #00d4ff, #8b5cf6, #ec4899);
  opacity: 0.3;
}

@media (min-width: 768px) {
  .timeline-line {
    left: 50%;
    transform: translateX(-50%);
  }
}

/* Timeline Items Layout */
.timeline-items {
  position: relative;
}

.timeline-item {
  position: relative;
  padding-left: 5rem;
  margin-bottom: 3rem;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-item.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (min-width: 768px) {
  .timeline-item {
    padding-left: 0;
    width: 50%;
    margin-bottom: 4rem;
  }
  
  .timeline-item:nth-child(odd) {
    margin-left: 0;
    padding-right: 3rem;
    text-align: right;
  }
  
  .timeline-item:nth-child(even) {
    margin-left: 50%;
    padding-left: 3rem;
    text-align: left;
  }
}

/* Timeline Markers (Dots) */
.timeline-marker {
  position: absolute;
  left: 1.5rem;
  top: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #1e1f22;
  border: 3px solid #00d4ff;
  z-index: 10;
  transition: all 0.3s ease;
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.timeline-item[data-dimension="315"] .timeline-marker {
  border-color: #8b5cf6;
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

.timeline-item[data-dimension="106"] .timeline-marker {
  border-color: #00d4ff;
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.timeline-item:hover .timeline-marker {
  transform: scale(1.3);
  box-shadow: 0 0 30px currentColor;
}

@media (min-width: 768px) {
  .timeline-marker {
    left: auto;
    right: -10px;
  }
  
  .timeline-item:nth-child(odd) .timeline-marker {
    right: -10px;
    left: auto;
  }
  
  .timeline-item:nth-child(even) .timeline-marker {
    left: -10px;
    right: auto;
  }
}

.marker-dot {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.3;
}

/* Timeline Cards */
.timeline-card {
  background: rgba(30, 31, 34, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.timeline-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #00d4ff, #8b5cf6);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.timeline-item[data-dimension="315"] .timeline-card::before {
  background: linear-gradient(90deg, #8b5cf6, #ec4899);
}

.timeline-item[data-dimension="106"] .timeline-card::before {
  background: linear-gradient(90deg, #00d4ff, #8b5cf6);
}

.timeline-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.timeline-card:hover::before {
  opacity: 1;
}

@media (min-width: 768px) {
  .timeline-card {
    padding: 2rem;
  }
}

/* Dimension Badges */
.dimension-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  background: rgba(0, 212, 255, 0.1);
  color: #00d4ff;
  border: 1px solid rgba(0, 212, 255, 0.2);
}

.timeline-item[data-dimension="315"] .dimension-badge {
  background: rgba(139, 92, 246, 0.1);
  color: #8b5cf6;
  border-color: rgba(139, 92, 246, 0.2);
}

/* Timeline Meta (Date) */
.timeline-meta {
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

@media (min-width: 768px) {
  .timeline-item:nth-child(odd) .timeline-meta {
    justify-content: flex-end;
  }
}

/* Content Styling */
.timeline-card h2 {
  background: linear-gradient(135deg, #ffffff 0%, #a1a1aa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.timeline-card p {
  color: #a1a1aa;
  font-size: 0.95rem;
  line-height: 1.7;
}

/* Image Containers */
.timeline-card a {
  display: block;
  margin-top: 1rem;
  border-radius: 0.5rem;
  overflow: hidden;
  position: relative;
}

.timeline-card img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s ease;
}

/* Mobile Optimizations */
@media (max-width: 767px) {
  .timeline-card h2 {
    font-size: 1.25rem;
  }
  
  .timeline-card p {
    font-size: 0.875rem;
  }
  
  .timeline-item {
    padding-left: 4rem;
  }
  
  .timeline-marker {
    left: 1rem;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .timeline-item {
    opacity: 1;
    transform: none;
    transition: none;
  }
  
  html {
    scroll-behavior: auto;
  }
}

/* Print Styles */
@media print {
  .timeline-line,
  .timeline-marker {
    display: none;
  }
  
  .timeline-item {
    opacity: 1;
    transform: none;
    padding-left: 0;
    page-break-inside: avoid;
  }
}