/* ── Post layout ───────────────────────────────────────────────────────────── */

/* Mobile: two-column grid — thin timeline left, content right */
.post-layout {
  display: grid;
  grid-template-columns: 20px 1fr;
  grid-template-rows: auto 1fr;
  column-gap: var(--space-sm);
  padding-left: var(--space-xs);
}

/* Sticky image spans both columns, sits above the timeline+text rows */
.post-col-viz {
  grid-column: 1 / -1;
  grid-row: 1;
  position: sticky;
  top: 64px;
  z-index: 10;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Text column: right column, below the image */
.post-col-text {
  grid-column: 2;
  grid-row: 2;
}

/* ── Three.js canvas container ─────────────────────────────────────────────── */
#cable-viz {
  position: relative;
  width: 100%;
  height: 38vh;
}

/* ── Timeline indicator ────────────────────────────────────────────────────── */
.viz-timeline {
  grid-column: 1;
  grid-row: 2;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0;
}

.viz-timeline-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line);
  transition: background 0.4s ease, transform 0.4s ease;
  flex-shrink: 0;
}

.viz-timeline-dot--active {
  background: var(--accent);
  transform: scale(1.4);
}

.viz-timeline-line {
  width: 1px;
  height: 60px;
  background: var(--line);
  transition: background 0.4s ease;
  flex-shrink: 0;
}

.viz-timeline-line--active {
  background: var(--accent);
}

/* ── Each scroll section ───────────────────────────────────────────────────── */
.cable-section {
  padding: var(--space-xl) 0;
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-top: 1px solid var(--line);
}

.cable-section:first-child {
  border-top: none;
}

.cable-section h2 {
  font-size: 1.3rem;
  font-weight: var(--weight-light);
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: var(--space-sm);
}

.cable-section p {
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--text-muted);
  max-width: 48ch;
  margin-bottom: var(--space-sm);
}

.cable-section p:last-child {
  margin-bottom: 0;
}

.cable-section strong {
  color: var(--text);
  font-weight: var(--weight-mid);
}

/* ── Desktop: three-column grid ────────────────────────────────────────────── */
@media (min-width: 768px) {
  .post-layout {
    grid-template-columns: 24px 1fr 1fr;
    grid-template-rows: 1fr;
    column-gap: var(--space-md);
    align-items: start;
    padding-left: var(--space-md);
  }

  .post-col-text {
    grid-column: 2;
    grid-row: 1;
  }

  .post-col-viz {
    grid-column: 3;
    grid-row: 1;
    top: 50%;
    transform: translateY(-50%);
    height: 60vh;
    max-height: 520px;
    background: transparent;
  }

  #cable-viz {
    height: 100%;
  }

  .viz-timeline {
    grid-row: 1;
    width: 24px;
  }

  .viz-timeline-line {
    height: 80px;
  }
}
