/* Education & certification timeline (About page). Uses tokens from style.css. */

.timeline-section .statement { margin-left: auto; margin-right: auto; text-align: center; max-width: 24ch; }

.timeline {
  --date-w: 130px;
  --rail-w: 40px;
  position: relative;
  list-style: none; margin: var(--s5) auto 0; padding: 0;
  max-width: 820px;
}
/* the vertical line */
.timeline::before {
  content: ""; position: absolute; top: 8px; bottom: 8px;
  left: calc(var(--date-w) + var(--rail-w) / 2 - 1px);
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--border) 85%, transparent);
}

.tl-item {
  display: grid;
  grid-template-columns: var(--date-w) var(--rail-w) minmax(0, 1fr);
  align-items: start;
  padding-bottom: var(--s5);
}
.tl-date {
  font-family: var(--font-mono); font-size: 13px; color: var(--text-muted);
  text-align: right; padding-top: 3px; white-space: nowrap;
}

/* dots */
.tl-dot {
  justify-self: center; position: relative; z-index: 1;
  width: 14px; height: 14px; margin-top: 4px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--text-muted);
}
.tl-item--milestone .tl-dot {
  width: 18px; height: 18px; margin-top: 2px;
  background: var(--accent); border-color: var(--accent);
  box-shadow: 0 0 0 6px rgba(var(--accent-rgb), .18);
}
.tl-item--cert .tl-dot { border-color: var(--accent); }
.tl-item--text .tl-dot { width: 10px; height: 10px; margin-top: 6px; background: var(--text-muted); border: 0; }
.tl-item--upcoming .tl-dot { border-style: dashed; border-color: var(--accent); }

/* text */
.tl-body { min-width: 0; }
.tl-title { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.35; }
.tl-item--milestone .tl-title { font-size: 21px; }
.tl-desc { margin: 4px 0 0; color: var(--text-muted); }

.tl-badge {
  display: inline-block; vertical-align: middle;
  font-family: var(--font-mono); font-size: 11px; font-weight: 400;
  padding: 2px 8px; border-radius: 3px;
  border: 1px solid rgba(var(--accent-rgb), .5); color: var(--accent);
}
.tl-badge--soon { border-style: dashed; margin-left: 6px; }

/* certificate card (project-card style) */
.tl-cert {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 24px; margin-top: -6px;
  transition: border-color .25s, box-shadow .25s;
}
.tl-cert:hover { border-color: var(--accent); box-shadow: 0 10px 34px rgba(var(--accent-rgb), .12); }
.tl-cert__top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.tl-cert__inst { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); }
.tl-cert .tl-title { font-family: var(--font-mono); font-weight: 500; font-size: 18px; }
.tl-cert__meta {
  display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 4px 28px;
  margin: 14px 0 0; padding-top: 14px; border-top: 1px solid var(--border);
}
.tl-cert__meta dt { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); }
.tl-cert__meta dd { margin: 2px 0 0; font-size: 14px; overflow-wrap: anywhere; }
.tl-cert__meta dd.mono { font-size: 13px; }
.tl-cta { display: inline-block; margin-top: 14px; font-size: 14px; color: var(--accent); }
.tl-cta:hover { filter: brightness(1.2); }

/* mobile: line on the left, date above the title */
@media (max-width: 720px) {
  .timeline { --rail-w: 28px; }
  .timeline::before { left: calc(var(--rail-w) / 2 - 1px); }
  .tl-item { grid-template-columns: var(--rail-w) minmax(0, 1fr); grid-template-areas: "dot date" "dot body"; }
  .tl-dot { grid-area: dot; }
  .tl-date { grid-area: date; text-align: left; padding: 0 0 6px; }
  .tl-body { grid-area: body; }
  .tl-cert { margin-top: 0; padding: 18px; }
  .tl-cert__meta { grid-template-columns: 1fr; }
}
