/* journey.css: the coding journey rail (journey.js), on /projects/,
   /education/ and /work/.

   Grown from the Star Wars eras rail (fanpages.css, kind: era): a track that
   bleeds off both edges of the page, hung under a time axis, dragged or
   swiped sideways. Each stop takes its school's tint as --m, straight from
   _data/mascots.yml, so the axis walks from Cielo Vista's blue through
   Trabuco's gold to UCI's. Each milestone takes its kind's color as --k.
   Nothing here is smaller than the site's 0.66rem floor. */

.journey { position: relative; margin: 0 0 2.8rem; }
.jr-lede { margin: 0.55rem 0 1.3rem; max-width: 70ch; font-size: 0.88rem; line-height: 1.7; color: var(--ink-dim); }

/* ── the bar over the rail: the filters, the hint, the arrows ── */
.jr-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem;
  margin-bottom: 0.2rem;
}
.jr-filters { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.jr-filter {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.08em;
  color: var(--ink-dim); background: transparent; cursor: pointer;
  border: 1px solid var(--line); border-radius: 100px; padding: 0.42rem 0.85rem;
  transition: color .2s, border-color .2s, background .2s;
}
.jr-filter[aria-pressed="true"] {
  color: var(--ink);
  border-color: color-mix(in srgb, var(--blue-2) 55%, transparent);
  background: color-mix(in srgb, var(--blue) 14%, transparent);
}
@media (hover: hover) { .jr-filter:hover { color: var(--ink); border-color: var(--mute); } }
.jr-count { align-self: center; margin-left: 0.35rem; font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.06em; color: var(--mute); }
.jr-hint { margin-left: auto; font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.06em; color: var(--mute); }
.jr-nav { display: flex; gap: 0.4rem; }
.jr-btn {
  width: 2.25rem; height: 2.25rem; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(255,255,255,0.02);
  color: var(--ink); font-size: 1.15rem; line-height: 1; cursor: pointer;
  transition: border-color .2s, background .2s, opacity .2s;
}
@media (hover: hover) { .jr-btn:not(:disabled):hover { border-color: var(--mute); background: rgba(255,255,255,0.05); } }
.jr-btn:disabled { opacity: .3; cursor: default; }
.jr-filter:focus-visible, .jr-btn:focus-visible { outline: 2px solid var(--blue-2); outline-offset: 2px; }

/* ── the rail: bleeds to the window's edges and fades out at both ── */
.jr-rail {
  position: relative; overflow-x: auto; overflow-y: hidden;
  margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter);
  scroll-snap-type: x proximity; scroll-padding-inline: var(--gutter);
  scrollbar-width: none; overscroll-behavior-x: contain; cursor: grab;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 min(var(--gutter), 3rem), #000 calc(100% - min(var(--gutter), 3rem)), transparent);
          mask-image: linear-gradient(90deg, transparent, #000 min(var(--gutter), 3rem), #000 calc(100% - min(var(--gutter), 3rem)), transparent);
}
.jr-rail::-webkit-scrollbar { display: none; }
/* journey.js sets the height to the tallest stop in view, at once rather
   than eased: an animated height re-laid the long page under the rail every
   frame (the whole catalog on /projects/), and the eye is on the rail anyway */
.jr-rail.is-dragging { cursor: grabbing; user-select: none; }
.jr-rail.is-dragging .jr-card { transition: none; }
.jr-rail:focus-visible { outline: none; }
.jr-rail:focus-visible .jr-track { outline: 2px solid var(--blue-2); outline-offset: 6px; border-radius: 18px; }

.jr-track {
  list-style: none; margin: 0; padding: 2.4rem 0 1rem;
  display: flex; align-items: flex-start; gap: 1rem; width: max-content;
}

/* ── a stop: its stretch of the axis, its dot, its card ── */
.jr-stop { --m: var(--blue-2); position: relative; flex: none; scroll-snap-align: start; }
.jr-axis {
  position: absolute; left: 0; right: -1rem; top: -1.45rem; height: 2px;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--m) 90%, transparent),
    color-mix(in srgb, var(--m) 30%, transparent));
}
.jr-stop:last-child .jr-axis { right: 0; }
.jr-dot {
  position: absolute; left: 1.15rem; top: -5px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--m); box-shadow: 0 0 0 4px var(--bg), 0 0 18px -1px var(--m);
}
/* the year still going gets a thinking orb (orbs.js) where its dot would be,
   on a disc of the page's color so the axis does not run through it */
.jr-orb {
  position: absolute; left: calc(1.15rem - 5px); top: -10px;
  width: 22px; height: 22px; border-radius: 50%; background: var(--bg);
}

.jr-card {
  width: 300px; padding: 1.1rem 1.15rem 1.05rem;
  border: 1px solid var(--line); border-radius: 16px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--m) 10%, transparent), transparent 7.5rem),
    rgba(255,255,255,0.012);
  transition: transform .45s var(--ease), border-color .45s, box-shadow .45s;
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .jr-stop:hover .jr-card {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--m) 45%, transparent);
    box-shadow: 0 18px 40px -24px color-mix(in srgb, var(--m) 55%, transparent);
  }
}

.jr-head { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 0.2rem 0.6rem; }
.jr-year {
  font-family: var(--serif); font-weight: 600; font-size: 1.7rem; line-height: 1;
  letter-spacing: -0.03em; color: color-mix(in srgb, var(--m) 70%, var(--ink));
}
.jr-now {
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--m); border: 1px solid color-mix(in srgb, var(--m) 50%, transparent);
  border-radius: 100px; padding: 0.15rem 0.55rem;
}
.jr-where {
  grid-column: 1 / -1; margin-top: 0.45rem;
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-dim);
}
.jr-where span { display: block; margin-top: 0.2rem; color: var(--mute); }

/* ── the milestones ── */
.jr-items { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 0.85rem; }
.jr-item { --k: var(--blue-2); display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 0.7rem; align-items: start; }
.jr-item[hidden] { display: none; }
.jr-item[data-kind="learned"] { --k: var(--green-2); }
.jr-item[data-kind="camp"]    { --k: var(--ink-dim); }
.jr-item[data-kind="built"]   { --k: var(--blue-2); }
.jr-item[data-kind="role"]    { --k: var(--gold); }
.jr-item[data-kind="award"]   { --k: var(--violet); }

.jr-pic img {
  display: block; width: 28px; height: 28px; border-radius: 8px; object-fit: cover;
  border: 1px solid rgba(255,255,255,0.08); background: var(--bg-2);
}
.jr-glyph {
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px;
  background: color-mix(in srgb, var(--k) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--k) 35%, transparent);
}
.jr-glyph::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--k); }

.jr-body { display: block; min-width: 0; }
.jr-top {
  display: flex; flex-wrap: wrap; gap: 0 0.55rem; align-items: baseline;
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase;
}
.jr-kind { color: var(--k); }
.jr-when { color: var(--mute); }
.jr-title {
  display: block; margin-top: 0.15rem;
  font-family: var(--sans); font-weight: 600; font-size: 0.9rem; line-height: 1.35; color: var(--ink);
}
a.jr-title { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; transition: text-decoration-color .2s; }
@media (hover: hover) { a.jr-title:hover { text-decoration-color: var(--k); } }
a.jr-title:focus-visible { outline: 2px solid var(--blue-2); outline-offset: 2px; border-radius: 4px; }
.jr-note { display: block; margin-top: 0.15rem; font-size: 0.8rem; line-height: 1.5; color: var(--ink-dim); }

.jr-chips { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.4rem; }
.jr-chip {
  font-family: var(--mono); font-size: 0.66rem; line-height: 1.5; color: var(--mute);
  border: 1px solid var(--line); border-radius: 100px; padding: 0.08rem 0.5rem;
}
.jr-chip--lang { color: var(--ink-dim); border-color: rgba(255,255,255,0.12); }
.jr-chip--saw { border-style: dashed; }
.jr-chip.is-new {
  color: var(--gold); border-color: color-mix(in srgb, var(--gold) 55%, transparent);
  background: color-mix(in srgb, var(--gold) 8%, transparent);
}
.jr-chip.is-new em {
  font-style: normal; margin-left: 0.35rem; padding-left: 0.35rem;
  border-left: 1px solid color-mix(in srgb, var(--gold) 45%, transparent);
  text-transform: uppercase; letter-spacing: 0.1em;
}

/* the languages I could write by then, the year's new ones lit */
.jr-knows {
  margin-top: 1rem; padding-top: 0.75rem;
  border-top: 1px dashed color-mix(in srgb, var(--m) 30%, var(--line));
  font-family: var(--mono); font-size: 0.66rem; line-height: 1.75; letter-spacing: 0.03em;
  color: var(--mute);
}
.jr-knows span { margin-right: 0.5rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-dim); }
.jr-knows b { font-weight: 500; color: color-mix(in srgb, var(--m) 75%, var(--ink)); }

/* the three years with no code: narrower, dashed, honest */
.jr-stop--gap .jr-card { width: 230px; background: transparent; border-style: dashed; }
.jr-stop--gap .jr-dot { background: var(--bg); border: 2px solid var(--m); box-shadow: 0 0 0 4px var(--bg); }
.jr-gapnote { margin-top: 0.8rem; font-size: 0.8rem; line-height: 1.6; color: var(--ink-dim); }

/* a busy year takes two columns once there is room for them, and the
   busiest three on a wide screen, so no card runs taller than the window */
@media (min-width: 900px) {
  .jr-stop--wide .jr-card { width: 590px; }
  .jr-stop--wide .jr-items { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1.3rem; }
}
@media (min-width: 1280px) {
  .jr-stop--wider .jr-card { width: 860px; }
  .jr-stop--wider .jr-items { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ── how far along the rail you are ── */
.jr-progress {
  position: relative; height: 2px; margin-top: 0.4rem; border-radius: 2px;
  background: var(--line); overflow: hidden;
}
.jr-progress i {
  position: absolute; inset: 0; transform-origin: left center; transform: scaleX(0.02);
  background: linear-gradient(90deg, var(--blue), var(--green-2), var(--gold), var(--blue-2));
}

@media (max-width: 560px) {
  .jr-card { width: min(84vw, 330px); }
  .jr-stop--gap .jr-card { width: min(70vw, 260px); }
  .jr-hint { order: 3; width: 100%; margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .jr-card, .jr-filter, .jr-btn { transition: none; }
}
