.journey-intro {
  max-width: 620px;
  margin: 0 0 2.2em 0;
  color: #494e52;
}

/* ---- Layout: stacked (map above route, both full width, no sticky) by
   default; explicitly switched to a side-by-side sticky layout only once
   there's confirmed room, via a single clean breakpoint rather than letting
   flex-wrap decide - mixing sticky with auto-wrapping caused the map to
   overlay the text instead of sitting beside it. ---- */

.journey-layout {
  display: flex;
  flex-direction: column;
  gap: 1.5em;
}

.journey-map-panel {
  width: 100%;
}

#journey-map {
  width: 100%;
  height: 400px;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  border: 1px solid #f0f1f1;
}

.journey-map-caption {
  font-size: 0.75em;
  color: #9199a0;
  text-align: center;
  margin: 0.5em 0 0 0;
}

@media screen and (min-width: 1300px) {
  .journey-layout {
    flex-direction: row;
    align-items: flex-start;
  }

  .journey-map-panel {
    flex: 0 0 440px;
    width: 440px;
    position: sticky;
    top: 100px;
  }

  #journey-map {
    height: 520px;
  }
}

/* ---- Main route ---- */

.journey-route {
  flex: 1 1 auto;
  min-width: 300px;
  max-width: 560px;
  position: relative;
  padding-left: 2.3em;
}

.journey-route::before {
  content: "";
  position: absolute;
  top: 0.4em;
  bottom: 0.4em;
  left: 0.85em;
  width: 2px;
  background: repeating-linear-gradient(
    to bottom,
    #0288d1 0,
    #0288d1 6px,
    transparent 6px,
    transparent 12px
  );
}

.journey-stop {
  position: relative;
  margin-bottom: 3em;
}

.journey-stop:last-child {
  margin-bottom: 0;
}

.journey-stop::before {
  content: "";
  position: absolute;
  left: -2.3em;
  top: 0.15em;
  width: 1.7em;
  height: 1.7em;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #0288d1;
}

.journey-stop > .journey-icon {
  position: absolute;
  left: -1.98em;
  top: 0.53em;
  font-size: 0.78em;
  color: #0288d1;
}

.journey-place {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-weight: 600;
  font-size: 1.25em;
  color: #303336;
  margin: 0 0 0.1em 0;
  line-height: 1.25;
}

.journey-coords {
  font-family: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.7em;
  letter-spacing: 0.02em;
  color: #9199a0;
  margin: 0 0 0.5em 0;
}

.journey-role {
  font-weight: 600;
  color: #494e52;
  margin: 0;
  font-size: 0.95em;
}

.journey-dates {
  font-family: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.75em;
  color: #0288d1;
  margin: 0.15em 0 0.6em 0;
}

.journey-desc {
  font-size: 0.88em;
  line-height: 1.55;
  color: #494e52;
  margin: 0;
}

/* ---- Nested sub-lists (internships / role progression) ---- */

.journey-sublist {
  margin-top: 1em;
  padding: 0.8em 1em;
  background-color: #f7f8f8;
  border-radius: 6px;
  border-left: 3px solid #e0793f;
}

.journey-sublist-label {
  font-size: 0.72em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9199a0;
  margin: 0 0 0.5em 0;
}

.journey-subitem {
  display: flex;
  align-items: baseline;
  gap: 0.5em;
  font-size: 0.85em;
  line-height: 1.4;
  color: #494e52;
  margin-bottom: 0.5em;
}

.journey-subitem:last-child {
  margin-bottom: 0;
}

.journey-subicon {
  color: #e0793f;
  font-size: 0.8em;
  flex-shrink: 0;
}

.journey-subtext {
  display: block;
}

.journey-subdates {
  font-family: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.85em;
  color: #9199a0;
  margin-left: 0.4em;
  white-space: nowrap;
}

.journey-roleitem {
  display: flex;
  justify-content: space-between;
  gap: 1em;
  font-size: 0.85em;
  color: #494e52;
  padding: 0.25em 0;
  border-bottom: 1px solid #ebecec;
}

.journey-roleitem:last-child {
  border-bottom: none;
}

/* ---- Scroll reveal ---- */

.journey-stop.journey-reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.journey-stop.journey-reveal.journey-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .journey-stop.journey-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media screen and (max-width: 600px) {
  .journey-route {
    padding-left: 1.8em;
  }
  .journey-stop::before {
    left: -1.8em;
  }
  .journey-stop > .journey-icon {
    left: -1.55em;
  }
  .journey-subitem {
    flex-wrap: wrap;
  }
}

/* Leaflet marker styling (custom divIcon, no default image assets needed) */
.journey-marker {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #0288d1;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px #0288d1;
}

.journey-marker.journey-marker-active {
  background: #e0793f;
  box-shadow: 0 0 0 4px rgba(224, 121, 63, 0.35);
}
