/*
 * About-page timeline, styled to match the SoL site.
 *
 * Two-column, alternating layout (content one side, image the other) with a
 * centred rail + markers. Images are OPTIONAL per <article>: add an <img> for
 * the two-column photo layout, or omit it for a content-only entry. No external
 * fonts/refs — brand face + site palette tokens only. Must NOT restyle
 * <html>/<body> (the page sits in the shared cosmic chrome).
 */

.about {
  --about-nav-h: 100px; /* clears the fixed bottom nav */
  max-width: 68em;
  margin: 0 auto;
  padding: 48px 20px calc(var(--about-nav-h) + 48px);
  color: var(--color-text-primary, #e7e2ef);
}

/* ----- heading ----- */
.about-head {
  text-align: center;
  margin: 0 auto 44px;
}
.about-title {
  margin: 0;
  font-family: var(--font-brand);
  font-size: clamp(22px, 4.2vw, 40px);
  letter-spacing: 1px;
  color: var(--color-text-strong, #f4f1f8);
  text-shadow: 0 0 22px rgba(var(--color-accent-rgb, 70 156 243), 0.35);
}
.about-sub {
  margin: 10px 0 0;
  color: var(--color-text-muted, #9a95ab);
  font-size: 15px;
}

/* ----- timeline: centred rail with alternating content/image ----- */
.timeline {
  position: relative;
  max-width: 58em;
  margin: 0 auto;
}
/* the rail */
.timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0.4em;
  bottom: 0.4em;
  width: 2px;
  transform: translateX(-1px);
  border-radius: 2px;
  background: linear-gradient(
    to bottom,
    rgba(var(--color-accent-rgb, 70 156 243), 0.15),
    rgba(var(--color-accent-rgb, 70 156 243), 0.85) 10%,
    rgba(var(--color-accent-rgb, 70 156 243), 0.85) 90%,
    rgba(203, 62, 212, 0.4)
  );
}

.timeline article {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 3.5em;
  align-items: start;
  padding-bottom: 2.5em;
}
.timeline article:last-child {
  padding-bottom: 0;
}
/* marker on the rail, aligned to the top of each entry */
.timeline article::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 1.5em;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #469cf3;
  box-shadow: 0 0 0 4px rgba(var(--color-accent-rgb, 70 156 243), 0.16),
    0 0 14px rgba(var(--color-accent-rgb, 70 156 243), 0.65);
  z-index: 1;
}

/* alternate sides: odd = image left / content right; even = the reverse.
   Each element hugs the rail on its side. */
.timeline article:nth-child(odd) .timeline__content { grid-column: 2; justify-self: start; }
.timeline article:nth-child(odd) .timeline__media   { grid-column: 1; justify-self: end; }
.timeline article:nth-child(even) .timeline__content { grid-column: 1; justify-self: end; }
.timeline article:nth-child(even) .timeline__media   { grid-column: 2; justify-self: start; }

/* content card mirrors the .tool cards used elsewhere */
.timeline__content {
  max-width: 24em;
/*  background: var(--color-surface-tool, #203457);  */
  border: 1px solid var(--color-border-default, #3b2f5c);
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
.timeline h2 {
  margin: 0;
  font-family: var(--font-brand);
  font-size: 15px;
  letter-spacing: 0.5px;
  color: var(--color-text-soft, #bde1fc);
}
.timeline time {
  display: block;
  margin-top: 2px;
  font-family: var(--font-brand);
  font-size: 26px;
  line-height: 1.2;
  color: #cb3ed4; /* Steel Pink year */
}
.timeline hr {
  margin: 12px 0;
  border: 0;
  border-top: 1px solid var(--color-border-default, #3b2f5c);
}
.timeline p {
  margin: 0;
  color: var(--color-text-primary, #e7e2ef);
  font-size: 14.5px;
  line-height: 1.6;
}

/* optional image */
.timeline__media {
  display: block;
  width: min(100%, 22em);
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--color-border-strong, #5a3f7a);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

/* content-only entries: let the card sit at a comfortable width on its side
   (the empty image column just stays blank). */
.timeline article:not(:has(.timeline__media)) .timeline__content {
  max-width: 26em;
}

/* ---------- responsive: stack to a single left-rail column ---------- */
@media (max-width: 720px) {
  .about {
    --about-nav-h: 62px;
    padding-top: 32px;
  }
  .timeline::before {
    left: 0.5em;
    transform: none;
  }
  .timeline article {
    grid-template-columns: 1fr;
    row-gap: 0.9em;
    padding-left: 2.25em;
    padding-bottom: 2em;
  }
  .timeline article::before {
    left: 0.5em;
  }
  /* everything in one column, hugging the left rail; image below content */
  .timeline article:nth-child(odd) .timeline__content,
  .timeline article:nth-child(even) .timeline__content,
  .timeline article:nth-child(odd) .timeline__media,
  .timeline article:nth-child(even) .timeline__media {
    grid-column: 1;
    justify-self: stretch;
  }
  .timeline__content { max-width: none; }
  .timeline__media { width: 100%; }
}
