/* ══════════ PLAYGROUND TIMELINE FEED STYLES ══════════ */

.gallery-body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  min-height: 100vh;
  margin: 0;
  padding: 0;
  transition: background-color 0.4s ease, color 0.4s ease;
  position: relative;
  overflow-x: hidden;
}

/* Grid overlay background at top (fades out) */
.gallery-body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 400px;
  background-image: 
    linear-gradient(to right, var(--playground-grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--playground-grid) 1px, transparent 1px);
  background-size: 20px 20px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 30%, rgba(0,0,0,0));
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 30%, rgba(0,0,0,0));
  z-index: 0;
  pointer-events: none;
}

.gallery-container {
  max-width: 680px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* Back Link Header */
.gallery-header {
  padding: 24px 0;
}

.gallery-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
}

.gallery-back-link:hover {
  color: var(--text);
  transform: translateX(-3px);
}

.gallery-back-link span {
  font-size: 16px;
}

/* Hero Section */
.gallery-hero {
  margin-top: 24px;
  margin-bottom: 56px;
}

.gallery-hero__label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  display: block;
  margin-bottom: 8px;
}

.gallery-hero__title {
  font-size: clamp(2.5rem, 6vw, 3.8rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 0 0 12px 0;
}

.gallery-hero__subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0;
  line-height: 1.5;
}

/* Vertical Timeline Feed */
.timeline-feed {
  position: relative;
  padding-bottom: 80px;
}

/* Timeline Vertical Line */
.timeline-feed::before {
  content: '';
  position: absolute;
  top: 8px;
  bottom: 0;
  left: 20px;
  width: 1.5px;
  background-color: var(--border);
  transition: background-color 0.4s ease;
}

.timeline-loading {
  font-size: 0.9rem;
  color: var(--text-muted);
  padding-left: 48px;
  font-style: italic;
}

/* Individual Timeline Item */
.timeline-item {
  position: relative;
  padding-left: 48px;
  margin-bottom: 48px;
  opacity: 0;
  transform: translateY(20px);
  animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Animation entry offsets */
.timeline-item:nth-child(1) { animation-delay: 0.05s; }
.timeline-item:nth-child(2) { animation-delay: 0.15s; }
.timeline-item:nth-child(3) { animation-delay: 0.25s; }
.timeline-item:nth-child(4) { animation-delay: 0.35s; }
.timeline-item:nth-child(5) { animation-delay: 0.45s; }

/* Timeline Node */
.timeline-node {
  position: absolute;
  left: 16px;
  top: 20px;
  transform: translateX(-50%);
  width: 9px;
  height: 9px;
  background-color: var(--accent);
  border-radius: 50%;
  z-index: 2;
  box-shadow: 0 0 0 4px var(--bg);
  transition: background-color 0.4s ease, box-shadow 0.4s ease;
}

/* Timeline card */
.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
  padding: 20px;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.3s ease, border-color 0.4s ease, background-color 0.4s ease;
}

.timeline-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
  border-color: rgba(12, 140, 233, 0.3); /* highlight with subtle accent border on hover */
}

/* Card Header */
.timeline-card__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
  font-family: var(--font-sans);
}

.timeline-card__name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.timeline-card__date {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Drawing Image wrapper */
.timeline-card__image-wrapper {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  overflow: hidden;
  position: relative;
  transition: border-color 0.4s ease, background-color 0.4s ease;
  aspect-ratio: 1.8 / 1; /* uniform display ratio */
  display: flex;
  align-items: center;
  justify-content: center;
}

.timeline-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  image-rendering: -webkit-optimize-contrast;
}

/* Animation */
@keyframes slideUpFade {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .gallery-hero {
    margin-bottom: 40px;
  }
  
  .timeline-card {
    padding: 16px;
  }
  
  .timeline-card__image-wrapper {
    aspect-ratio: 1.5 / 1;
  }
}
