/* SPUTNIK MOMENTS - SOVIET/MAO-ERA PROPAGANDA STYLE */

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

:root {
  --red-primary: #c41e3a;
  --red-dark: #8b0000;
  --red-bright: #e63946;
  --gold: #d4a84b;
  --gold-light: #f0d78c;
  --cream: #f5e6c8;
  --cream-dark: #e8d4b0;
  --black: #1a1a1a;
  --black-light: #2d2d2d;
}

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: 'PT Serif', Georgia, serif;
  background: var(--cream);
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0,0,0,0.03) 2px,
      rgba(0,0,0,0.03) 4px
    );
  color: var(--black);
  line-height: 1.5;
  display: flex;
  flex-direction: column;
}

/* Header */
header {
  flex-shrink: 0;
  text-align: center;
  padding: 1rem 2rem 0.75rem;
  background: var(--red-primary);
  background-image:
    radial-gradient(circle at 50% 150%, var(--gold) 0%, transparent 50%),
    linear-gradient(180deg, var(--red-dark) 0%, var(--red-primary) 50%, var(--red-bright) 100%);
  border-bottom: 6px solid var(--gold);
  position: relative;
}


header h1 {
  font-family: 'Bebas Neue', 'Arial Black', sans-serif;
  font-size: 3.5rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.15rem;
  color: var(--cream);
  text-shadow: 3px 3px 0 var(--black), 4px 4px 0 rgba(0,0,0,0.3);
}

header .tagline {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.1rem;
  color: var(--gold-light);
  font-style: normal;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

/* Definition */
.definition {
  max-width: 700px;
  margin: 0 auto;
  text-align: left;
  padding: 0.75rem 1.5rem;
  background: rgba(0,0,0,0.2);
  border-left: 4px solid var(--gold);
  border-right: 4px solid var(--gold);
}

.definition p {
  font-size: 0.85rem;
  color: var(--cream);
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.definition strong {
  color: var(--gold-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.definition blockquote {
  border-left: none;
  padding-left: 0;
  margin: 0.5rem 0 0 0;
  font-style: italic;
  font-size: 0.85rem;
  color: var(--cream-dark);
  line-height: 1.5;
}

.definition cite {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: var(--gold);
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Main - horizontal scroll container */
main {
  flex: 1;
  overflow-x: auto;
  overflow-y: hidden;
  display: flex;
  align-items: stretch;
  padding: 0;
  background: var(--cream);
  background-image:
    radial-gradient(circle at 10% 50%, rgba(196, 30, 58, 0.08) 0%, transparent 30%),
    radial-gradient(circle at 90% 50%, rgba(196, 30, 58, 0.08) 0%, transparent 30%),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 100px,
      rgba(0,0,0,0.02) 100px,
      rgba(0,0,0,0.02) 101px
    );
}

/* Timeline */
.timeline {
  display: flex;
  align-items: center;
  padding: 1rem 4rem;
  gap: 2.5rem;
  min-width: min-content;
}

/* Timeline line */
.timeline::before {
  content: '';
  position: fixed;
  left: 0;
  right: 0;
  top: 50%;
  height: 4px;
  background: var(--red-primary);
  z-index: 0;
  pointer-events: none;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Timeline item */
.timeline-item {
  position: relative;
  flex-shrink: 0;
  width: 280px;
  cursor: pointer;
  z-index: 1;
  transition: transform 0.3s ease;
}

.timeline-item:hover {
  transform: translateY(-8px) scale(1.02);
}

/* Card */
.timeline-card {
  background: var(--cream-dark);
  border: 4px solid var(--black);
  overflow: hidden;
  box-shadow: 6px 6px 0 var(--black);
  transition: all 0.3s ease;
}

.timeline-item:hover .timeline-card {
  border-color: var(--red-primary);
  box-shadow: 8px 8px 0 var(--red-dark);
}

/* Image container */
.timeline-image {
  width: 100%;
  height: 200px;
  background: var(--black-light);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  border-bottom: 4px solid var(--black);
}

/* Red overlay on images */
.timeline-image::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(196, 30, 58, 0.3) 0%, transparent 50%);
  z-index: 1;
  pointer-events: none;
}

.timeline-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.1) saturate(0.8);
  transition: transform 0.3s ease, filter 0.3s ease;
}

.timeline-item:hover .timeline-image img {
  transform: scale(1.08);
  filter: contrast(1.2) saturate(1);
}

/* Fallback for broken images */
.timeline-image img.error {
  display: none;
}

.timeline-image::after {
  content: attr(data-year);
  position: absolute;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 4rem;
  font-weight: 400;
  color: var(--gold);
  opacity: 0;
  text-shadow: 2px 2px 0 var(--black);
  z-index: 2;
}

.timeline-image.no-image::after {
  opacity: 1;
}

/* Content */
.timeline-content {
  padding: 0.75rem 1rem 1rem;
  background: linear-gradient(180deg, var(--cream-dark) 0%, var(--cream) 100%);
}

.timeline-date {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.85rem;
  color: var(--red-primary);
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.timeline-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.15rem;
  font-weight: 400;
  margin-bottom: 0.15rem;
  line-height: 1.2;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--black);
}

.timeline-subtitle {
  font-family: 'PT Serif', Georgia, serif;
  font-size: 0.8rem;
  color: var(--black-light);
  font-style: italic;
}

/* Timeline dot - now a star */
.timeline-dot {
  position: absolute;
  bottom: -1.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 18px;
  background: var(--gold);
  border: 3px solid var(--black);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  transition: all 0.3s ease;
  z-index: 2;
}

.timeline-item:hover .timeline-dot {
  background: var(--red-primary);
  transform: translateX(-50%) scale(1.4) rotate(36deg);
}

/* Year label below dot */
.timeline-year {
  position: absolute;
  bottom: -2.75rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.9rem;
  color: var(--red-dark);
  white-space: nowrap;
  letter-spacing: 0.05em;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(26, 26, 26, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 1000;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--cream);
  border: 6px solid var(--red-primary);
  max-width: 600px;
  width: 100%;
  max-height: 85vh;
  overflow: hidden;
  position: relative;
  box-shadow: 12px 12px 0 var(--black);
  transform: scale(0.95);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.modal-overlay.active .modal {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 32px;
  height: 32px;
  background: var(--black);
  border: 2px solid var(--gold);
  color: var(--gold);
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10;
}

.modal-close:hover {
  background: var(--red-primary);
  border-color: var(--cream);
  color: var(--cream);
}

/* Modal image */
.modal-image {
  width: 100%;
  height: 220px;
  background: var(--black-light);
  flex-shrink: 0;
  position: relative;
  border-bottom: 4px solid var(--red-primary);
}

.modal-image::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(196, 30, 58, 0.25) 0%, transparent 60%);
  z-index: 1;
  pointer-events: none;
}

.modal-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.1) saturate(0.85);
}

/* Modal content */
.modal-body {
  padding: 1.25rem 1.5rem 1.5rem;
  overflow-y: auto;
  background: linear-gradient(180deg, var(--cream) 0%, var(--cream-dark) 100%);
}

.modal-date {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.9rem;
  color: var(--red-primary);
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.modal-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.8rem;
  font-weight: 400;
  margin-bottom: 0.15rem;
  line-height: 1.1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--black);
}

.modal-subtitle {
  font-family: 'PT Serif', Georgia, serif;
  font-size: 1rem;
  color: var(--black-light);
  font-style: italic;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--red-primary);
}

.modal-description {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--black);
  margin-bottom: 1.25rem;
}

/* Quotes */
.modal-quotes {
  margin-bottom: 1.25rem;
}

.quote {
  border-left: 4px solid var(--red-primary);
  padding-left: 1rem;
  margin-bottom: 1rem;
  background: rgba(196, 30, 58, 0.05);
  padding: 0.75rem 1rem;
}

.quote-text {
  font-family: 'PT Serif', Georgia, serif;
  font-size: 0.95rem;
  font-style: italic;
  color: var(--black);
  line-height: 1.6;
  margin-bottom: 0.35rem;
}

.quote-text::before {
  content: '"';
  color: var(--red-primary);
  font-size: 1.2em;
}

.quote-text::after {
  content: '"';
  color: var(--red-primary);
  font-size: 1.2em;
}

.quote-attribution {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.8rem;
  color: var(--red-dark);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.quote-attribution::before {
  content: '— ';
}

/* Sources */
.modal-sources {
  border-top: 2px solid var(--black);
  padding-top: 1rem;
}

.modal-sources h4 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.85rem;
  color: var(--black);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.5rem;
}

.modal-sources ul {
  list-style: none;
}

.modal-sources li {
  margin-bottom: 0.35rem;
  padding-left: 1rem;
  position: relative;
}

.modal-sources li::before {
  content: '★';
  position: absolute;
  left: 0;
  color: var(--red-primary);
  font-size: 0.6rem;
  top: 0.3rem;
}

.modal-sources a {
  color: var(--red-dark);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s ease;
}

.modal-sources a:hover {
  color: var(--red-bright);
  text-decoration: underline;
}

/* Footer */
footer {
  flex-shrink: 0;
  text-align: center;
  padding: 0.75rem 2rem;
  background: var(--red-primary);
  color: var(--cream);
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border-top: 4px solid var(--gold);
}

/* Scroll hint */
.scroll-hint {
  position: fixed;
  bottom: 3rem;
  right: 2rem;
  font-family: 'Bebas Neue', sans-serif;
  color: var(--red-dark);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.8;
  pointer-events: none;
}

.scroll-hint::after {
  content: '→';
  font-size: 1.2rem;
  animation: scrollHint 1.5s ease-in-out infinite;
}

@keyframes scrollHint {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(10px); }
}

/* Horizontal scrollbar styling */
main::-webkit-scrollbar {
  height: 12px;
}

main::-webkit-scrollbar-track {
  background: var(--cream-dark);
  border-top: 2px solid var(--black);
}

main::-webkit-scrollbar-thumb {
  background: var(--red-primary);
  border: 2px solid var(--black);
}

main::-webkit-scrollbar-thumb:hover {
  background: var(--red-dark);
}

/* Responsive */
@media (max-width: 768px) {
  header {
    padding: 1.25rem 1rem 0.75rem;
  }

  header h1 {
    font-size: 2.25rem;
  }

  header .tagline {
    font-size: 0.9rem;
  }

  .definition {
    padding: 0.5rem 1rem;
  }

  .timeline {
    padding: 0 2rem;
    gap: 2rem;
  }

  .timeline-item {
    width: 220px;
  }

  .timeline-image {
    height: 150px;
  }

  .modal {
    max-width: 95vw;
    border-width: 4px;
  }

  .modal-image {
    height: 160px;
  }

  .modal-body {
    padding: 1rem 1.25rem 1.25rem;
  }

  .modal-title {
    font-size: 1.5rem;
  }
}

/* Touch scroll on mobile */
@media (hover: none) {
  .scroll-hint {
    display: none;
  }
}
