/* About page: the journey walk. Built by the About page generator. */
/* ---------- About page mockup: a 2D side-scrolling walk through my journey ---------- */
.journey-title { margin: 0 0 40px; }

/* Billboards (used both in the walk and in the simple fallback grid) */
.bb { display: block; color: inherit; }
.bb-board {
  position: relative; display: grid; gap: 14px; align-content: start; padding: 18px;
  background: #1b1b1b; border: 6px solid #2f2f2f; border-radius: 6px; box-shadow: 0 0 0 2px #0c0c0c, 0 18px 40px rgba(0, 0, 0, .5);
}
/* little pixel bulbs along the top of each board */
.bb-board::before { content: ""; position: absolute; left: 14px; right: 14px; top: -13px; height: 6px; background: repeating-linear-gradient(90deg, #ffd27a 0 6px, transparent 6px 24px); filter: drop-shadow(0 0 4px rgba(255, 210, 122, .8)); }
.bb-level { font: 700 13px/1 var(--font-heading); letter-spacing: .16em; text-transform: uppercase; color: #cfc6f7; }
.bb-title { font: 700 24px/1.2 var(--font-heading); color: #fff; }
.bb-text { font-size: 16px; line-height: 25px; color: var(--text-primary); }
.bb--level .bb-board { background: linear-gradient(135deg, #4a35a8, #241a52); border-color: var(--main-hover); }
.bb--level .bb-title { font-size: 42px; line-height: 1; text-transform: uppercase; }
.bb--text .bb-title { font-size: 28px; }
.bb--cover .bb-board { grid-template-columns: 150px minmax(0, 1fr); align-items: center; }
.bb-cover { width: 150px; height: auto; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 3px; box-shadow: 0 6px 16px rgba(0, 0, 0, .5); }
.bb-photo { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 3px; }
.bb-copy { display: grid; gap: 8px; }
.bb-posts { display: none; }
a.bb:hover .bb-board { border-color: var(--main-hover); }

.walk { position: relative; }
.walk-frame { padding: 0 var(--gutter); }
.walk-track { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 32px 20px; }
.scene, .walk-hud, .walker, .bb-palm, .bb-building, .walk-fog { display: none; }
.walker { pointer-events: none; }

/* ---------- the side-scrolling walk (switched on by the script) ---------- */
.walk.is-on { height: calc(var(--length) + 100svh); }
.walk.is-on .walk-frame { position: sticky; top: var(--nav-height); height: calc(100svh - var(--nav-height)); overflow: hidden; padding: 0; }
/* Fog that rolls in at the switch from beach to city (and back), hiding the swap.
   --fog peaks when you're right at the transition. */
.walk.is-on .walk-fog {
  display: block; position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: var(--fog, 0);
  background:
    radial-gradient(ellipse 55% 40% at 25% 65%, rgba(214, 202, 236, .85), transparent 75%),
    radial-gradient(ellipse 60% 45% at 72% 50%, rgba(196, 180, 226, .8), transparent 75%),
    radial-gradient(ellipse 50% 35% at 50% 25%, rgba(176, 156, 214, .7), transparent 75%),
    linear-gradient(rgba(150, 128, 196, .55), rgba(198, 186, 228, .7) 55%, rgba(170, 150, 206, .65));
}
/* Each set of billboards only shows in its own environment */
.walk.is-on .bb--beach { opacity: var(--beach-vis, 1); }
.walk.is-on .bb--city { opacity: var(--city-vis, 0); }
.walk.is-on.in-city .bb--beach, .walk.is-on:not(.in-city) .bb--city { pointer-events: none; }

/* Two environments; the city fades in as you reach Level 3 (--city goes 0 to 1) */
.walk.is-on .scene { display: block; position: absolute; inset: 0; }
.walk.is-on .scene--beach { background: #e9e3f3; } /* matches the haze at the bottom of the sky drawing */
.walk.is-on .scene--city { opacity: var(--city, 0); background: #e9e3f3; }
.walk.is-on .scene > div { position: absolute; left: 0; right: 0; background-repeat: repeat-x; }

/* Trinidad beach, from Nabeel's own sky, sea and sand drawings (each repeats sideways) */
/* Each drawing fills the whole scene at its original canvas proportions, so the
   sky, sea and sand sit exactly where they were drawn. */
.beach-sky, .beach-sea, .beach-sand { top: 0; bottom: 0; background-size: auto 100%; background-repeat: repeat-x; }
.beach-sky { background-image: url("../assets/images/journey-scene/sky.webp"); background-position: var(--far-x, 0) 0; }
.beach-sea { background-image: url("../assets/images/journey-scene/sea.webp"); background-position: var(--mid-x, 0) 0; }
.beach-sand { background-image: url("../assets/images/journey-scene/sand.webp"); background-position: var(--road-x, 0) 0; }

/* Atlanta at dusk, drawn to match: the same sky tinted for evening, hand-drawn skylines, and the sand drawing recoloured as the street */
/* The same sky drawing as the beach, so the whole walk shares one sky */
.city-sky { top: 0; bottom: 0; background: url("../assets/images/journey-scene/sky.webp") var(--far-x, 0) 0 / auto 100% repeat-x; }
.city-far { bottom: calc(var(--road-h) - 4px); height: 46%; background: url("../assets/images/journey-scene/city-far.svg") var(--far-x, 0) 100% / auto 100% repeat-x; }
.city-near { bottom: calc(var(--road-h) - 4px); height: 34%; background: url("../assets/images/journey-scene/city-near.svg") var(--mid-x, 0) 100% / auto 100% repeat-x; }
.city-street { bottom: 0; height: var(--road-h); }
.city-street::before, .city-street::after { content: ""; position: absolute; left: 0; right: 0; }
/* sidewalk: pale slabs with joints, and a dark kerb along its front edge */
.city-street::before { top: 0; height: 30%; border-top: 4px solid #150f28; border-bottom: 6px solid #150f28;
  background:
    repeating-linear-gradient(90deg, transparent 0 86px, #6d6787 86px 90px) var(--road-x, 0) 0 / 100% 100% repeat-x,
    linear-gradient(#a7a2bd, #8f89a8); }
/* asphalt: dark, with a dashed yellow centre line, a white edge line and a little texture */
.city-street::after { top: 30%; bottom: 0;
  background:
    repeating-linear-gradient(90deg, #f7d98f 0 70px, transparent 70px 150px) var(--road-x, 0) 55% / 100% 8px repeat-x,
    linear-gradient(transparent 0 calc(100% - 14px), #e8e6f0 calc(100% - 14px) calc(100% - 9px), transparent calc(100% - 9px)),
    linear-gradient(#e8e6f0 0 5px, transparent 5px) 0 14px / 100% 100% no-repeat,
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .04) 0 3px, transparent 3px 40px) var(--road-x, 0) 0 / 100% 100%,
    linear-gradient(#34313f, #2a2733); }

/* Beach billboards: laid out exactly like the Figma example. The whole pair is one box
   with the Figma group's proportions (2878 x 1763); everything inside is placed in % of it. */
.walk.is-on .bb.bb--beach { position: relative; height: var(--grp-h); aspect-ratio: 2878 / 1763; width: auto; display: block; } /* beats the general billboard width */
.walk.is-on .bb-palm { display: block; position: absolute; height: 93.02%; width: auto; pointer-events: none; }
.walk.is-on .bb-palm--l { left: 0; top: 6.98%; }
.walk.is-on .bb-palm--r { right: 0; top: 0; }
.walk.is-on .bb-ropes { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.walk.is-on .bb-ropes line { stroke: #b48a56; stroke-width: 4; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.walk.is-on .bb--beach .bb-board {
  position: absolute; left: 22.86%; top: 46.51%; width: 60.29%; min-height: 27.45%;
  display: grid; grid-template-columns: 34% minmax(0, 1fr); align-items: center; gap: 12px; padding: 12px;
  background: #fbf3e1; color: #2a1b10; border: 4px solid #3a2414; border-radius: 4px 4px 18px 18px / 4px 4px 10px 10px;
  box-shadow: 0 8px 0 rgba(58, 36, 20, .18);
}
.walk.is-on .bb--beach .bb-board::before { display: none; }
.walk.is-on .bb--beach.bb--cover .bb-board { grid-template-columns: 20% minmax(0, 1fr); }
.walk.is-on .bb--beach.bb--level .bb-board, .walk.is-on .bb--beach.bb--text .bb-board { grid-template-columns: minmax(0, 1fr); }
.walk.is-on .bb--beach .bb-cover { width: 100%; border: 3px solid #3a2414; box-shadow: none; }
.walk.is-on .bb--beach .bb-photo { aspect-ratio: 4 / 3; border: 3px solid #3a2414; }
.walk.is-on .bb--beach .bb-copy { gap: 4px; }
.walk.is-on .bb--beach .bb-title { font-size: 18px; color: #2a1b10; }
.walk.is-on .bb--beach .bb-text { font-size: 14px; line-height: 21px; color: #4a3424; }
.walk.is-on .bb--beach.bb--level .bb-board { background: #6f51e4; color: #fff; }
.walk.is-on .bb--beach.bb--level .bb-title { font-size: 30px; color: #fff; }
.walk.is-on .bb--beach.bb--level .bb-text { color: #fff; }
.walk.is-on .bb--beach.bb--level .bb-level { color: #e8e2ff; }
.walk.is-on .bb--beach.bb--text .bb-title { font-size: 22px; }
.walk.is-on a.bb--beach:hover .bb-board { border-color: #6f51e4; }
@media (max-width: 767px) {
  .walk.is-on .bb--beach .bb-board { grid-template-columns: minmax(0, 1fr); left: 14%; width: 72%; }
  .walk.is-on .bb--beach.bb--cover .bb-board { grid-template-columns: 30% minmax(0, 1fr); }
  .walk.is-on .bb--beach .bb-photo { aspect-ratio: 2 / 1; }
}

/* City billboards: on the roof of a hand-drawn building */
.walk.is-on .bb--city .bb-board { background: #1c1733; border: 4px solid #150f28; box-shadow: 0 0 0 2px rgba(136, 114, 221, .55), 0 0 26px rgba(136, 114, 221, .4); }
.walk.is-on .bb--city .bb-posts { height: 26px; padding: 0 22%; }
.walk.is-on .bb--city .bb-posts i { width: 14px; background: #2a2150; border: 3px solid #150f28; border-bottom: 0; }
.walk.is-on .bb-building { display: block; height: calc(var(--bh) * 1px * var(--b-scale, 1)); margin: 0 -7%;
  border: 4px solid #150f28; border-bottom: 0; border-radius: 6px 6px 0 0;
  background:
    repeating-linear-gradient(180deg, transparent 0 14px, #3b3168 14px 30px),
    repeating-linear-gradient(90deg, #3b3168 0 16px, #ffcf6b 16px 28px, #3b3168 28px 46px, rgba(255, 207, 107, .35) 46px 58px, #3b3168 58px 74px); }
.walk.is-on .walk-track {
  position: absolute; left: 0; bottom: calc(var(--road-h) * .3); display: flex; align-items: flex-end; gap: var(--gap);
  padding-left: var(--start); grid-template-columns: none; will-change: transform;
}
.walk.is-on .bb { flex: none; width: var(--board-w); display: flex; flex-direction: column; }
.walk.is-on .bb-posts { display: flex; justify-content: space-between; height: var(--post-h); padding: 0 18%; }
.walk.is-on .bb-posts i { width: 18px; background: repeating-linear-gradient(180deg, #34343f 0 14px, #2a2a33 14px 18px); }
.walk.is-on .walker {
  display: block; position: absolute; left: 14%; bottom: calc(var(--road-h) * .16); height: var(--walker-h); width: calc(var(--walker-h) * 326 / 900); z-index: 3;
}
/* Character: Nabeel's drawing. It bobs and sways a little with each step while you scroll. */
.walker__img { display: block; height: 100%; width: auto; transform-origin: 50% 100%; }
.walker__shadow { position: absolute; left: 50%; bottom: -6px; width: 80%; height: 14px; margin-left: -40%; border-radius: 50%; background: rgba(42, 27, 16, .28); filter: blur(2px); transform-origin: 50% 50%; }
.walk.is-walking .walker__img { animation: step .32s ease-in-out infinite alternate; }
.walk.is-walking .walker__shadow { animation: step-shadow .32s ease-in-out infinite alternate; }
.walk.is-backwards .walker { transform: scaleX(-1); }
@keyframes step { from { transform: translateY(0) rotate(-1.5deg); } to { transform: translateY(-5px) rotate(1.5deg); } }
@keyframes step-shadow { from { transform: scaleX(1); opacity: 1; } to { transform: scaleX(.85); opacity: .75; } }
.walk.is-on .walk-hud {
  display: flex; position: absolute; left: var(--gutter); top: 22px; gap: 10px; align-items: center; z-index: 4;
  padding: 8px 12px; background: rgba(14, 14, 14, .8); border: 1px solid #2a2a2a; border-radius: 8px;
  font: 700 13px/1 var(--font-heading); letter-spacing: .12em; text-transform: uppercase; color: #fff;
}
.walk-hud__bar { width: 160px; height: 8px; background: repeating-linear-gradient(90deg, #333 0 8px, transparent 8px 11px); }
.walk-hud__fill { display: block; height: 100%; width: var(--progress, 0%); background: repeating-linear-gradient(90deg, var(--main-hover) 0 8px, transparent 8px 11px); }
.walk-hud__hint { color: var(--text-tertiary); font-weight: 500; letter-spacing: .08em; }
/* Skip button, in the same style as the bar, top right */
.walk-skip { display: none; }
.walk.is-on .walk-skip {
  display: inline-flex; position: absolute; right: var(--gutter); top: 22px; z-index: 4; align-items: center; gap: 8px;
  padding: 8px 14px; background: rgba(14, 14, 14, .8); border: 1px solid #2a2a2a; border-radius: 8px;
  font: 700 13px/1 var(--font-heading); letter-spacing: .12em; text-transform: uppercase; color: #fff;
  transition: background .2s, border-color .2s;
}
.walk.is-on .walk-skip:hover, .walk.is-on .walk-skip:focus-visible { background: var(--main); border-color: var(--main-hover); }
.walk-skip span { letter-spacing: -.1em; color: var(--main-hover); }
.walk-skip:hover span, .walk-skip:focus-visible span { color: #fff; }

.walk-after { padding-top: 96px; padding-bottom: 64px; }
@media (max-width: 767px) {
  .walk-hud__hint { display: none; }
  .walk.is-on .walk-skip { padding: 8px 10px; font-size: 12px; }
  .bb--cover .bb-board { grid-template-columns: 96px minmax(0, 1fr); }
  .bb-cover { width: 96px; }
  .bb-text { font-size: 15px; line-height: 23px; }
  .bb--level .bb-title { font-size: 32px; }
  .walk.is-on .walker { left: 8%; }
}
