/* =========================================================
   Interactive career timeline — "The Journey"
   ========================================================= */

.journey { padding-block: clamp(2rem, 5vw, 3rem); }

/* ---- Era navigator (the rail) ---- */
.tl-nav { position: relative; margin-top: 2.5rem; }
.tl-scroll { overflow-x: auto; scrollbar-width: thin; padding-bottom: .5rem; -webkit-overflow-scrolling: touch; }
.tl-track {
  position: relative;
  display: flex;
  gap: 0;
  min-width: min(100%, 720px);
  padding-top: 28px;       /* room for the dots above labels */
}
/* the base line */
.tl-track::before {
  content: "";
  position: absolute;
  top: 33px; left: 0; right: 0;
  height: 2px; background: var(--line);
}
/* progress fill up to active node */
.tl-fill {
  position: absolute; top: 33px; left: 0;
  height: 2px; background: var(--accent);
  transition: width .35s ease;
}

.tl-node {
  position: relative;
  flex: 1 1 0;
  min-width: 120px;
  background: none; border: 0; cursor: pointer;
  font-family: var(--sans);
  text-align: center;
  padding: 0 .4rem;
  color: var(--muted);
  transition: color .2s ease;
}
.tl-node .dot {
  position: absolute; top: -22px; left: 50%; transform: translateX(-50%);
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--line);
  transition: all .2s ease;
}
.tl-node .yr { display: block; font-weight: 700; font-size: .95rem; color: var(--ink); }
.tl-node .lb { display: block; font-size: .8rem; margin-top: .15rem; line-height: 1.2; }
.tl-node:hover .dot { border-color: var(--accent); transform: translateX(-50%) scale(1.1); }
.tl-node:hover { color: var(--ink); }
.tl-node.active .dot { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 16%, transparent); }
.tl-node.active .lb { color: var(--accent); font-weight: 600; }

/* ---- Era detail panel ---- */
.era-panel {
  margin-top: 2.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: clamp(1.5rem, 4vw, 2.6rem);
  box-shadow: 0 18px 50px -34px rgba(0,0,0,.35);
}
.era-panel.swap { animation: eraIn .4s ease; }
@keyframes eraIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.era-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .6rem 1rem; }
.era-flag { font-size: 1.8rem; line-height: 1; }
.era-title { font-family: var(--serif); font-size: clamp(1.5rem, 4vw, 2.2rem); font-weight: 600; letter-spacing: -.01em; }
.era-period { font-family: var(--sans); font-size: .95rem; font-weight: 600; color: var(--accent); }
.era-where { width: 100%; font-size: .95rem; color: var(--muted); margin-top: .1rem; }
.era-summary { margin-top: 1.1rem; font-size: 1.1rem; color: var(--ink); max-width: 60ch; }

.era-cols { display: grid; gap: 1.8rem 2.4rem; grid-template-columns: 1fr 1fr; margin-top: 1.8rem; }
@media (max-width: 720px) { .era-cols { grid-template-columns: 1fr; } }

.era-block h4 {
  font-family: var(--sans); text-transform: uppercase; letter-spacing: .12em;
  font-size: .72rem; font-weight: 700; color: var(--muted);
  display: flex; align-items: center; gap: .5rem; margin-bottom: .9rem;
}
.era-block h4 .ic { font-size: 1rem; }
.era-block ul { list-style: none; padding: 0; margin: 0; }
.era-block li { position: relative; padding-left: 1.3rem; margin-bottom: .7rem; font-size: 1rem; line-height: 1.5; max-width: 52ch; }
.era-block li::before { content: ""; position: absolute; left: 0; top: .6em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.era-block.life li::before { background: var(--gold); }
.era-block li .role { font-weight: 600; }
.era-block li.placeholder { color: var(--muted); font-style: italic; }
.era-block li.placeholder::before { background: var(--line); }

/* ---- Controls ---- */
.era-controls { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 2rem; }
.era-controls .count { font-size: .9rem; color: var(--muted); }
.era-btn {
  display: inline-flex; align-items: center; gap: .4rem;
  font-family: var(--sans); font-size: .95rem; font-weight: 600;
  background: none; border: 1px solid var(--line); color: var(--ink);
  padding: .55rem 1rem; border-radius: 999px; cursor: pointer;
  transition: all .15s ease;
}
.era-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.era-btn:disabled { opacity: .35; cursor: default; }

.tl-hint { font-size: .85rem; color: var(--muted); margin-top: 1rem; text-align: center; }
