/* 5. closing: chevron end of the rail, sign-off, fanned photo stack */
.folio-outro {
  align-self: stretch;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
  min-height: 62px;
  margin-top: -12px; /* 36 below the last entry */
}
.outro-text {
  position: relative;
  flex: 1 1 260px;
}
.path-tip {
  position: absolute;
  left: -25px;
  top: 10px; /* level with the title's center; timeline.js ends the rail here */
  width: 7px;
  height: 3px;
}
.path-tip svg { overflow: visible; }
.path-tip path { stroke-width: 1; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.tip-stem { stroke: var(--blue-light); stroke-linecap: butt; }
.tip-arms { stroke: var(--blue); }
.outro-title {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: -.12px; /* Geist (Google) sets ~1.5% wider than mikes.cv's MB Sans */
  color: var(--body);
}
.outro-sub {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: -.12px;
  color: var(--body);
  opacity: .8;
}

.memories {
  position: relative;
  flex: none;
  width: 161px;
  height: 62px;
  margin-right: 29px;
}
.memory {
  --push: 0px;
  position: absolute;
  left: 50%;
  top: 50%;
  width: 42.4px;
  height: 56.5px;
  margin: -28.25px 0 0 -21.2px;
  z-index: var(--z);
  padding: 1.234px;
  border-radius: 5.65px;
  background: var(--keyline);
  box-shadow: 0 .6px 3.6px rgba(0, 0, 0, .1), 0 .3px .9px rgba(0, 0, 0, .06);
  transform: translate(calc(var(--dx) + var(--push)), var(--dy)) rotate(var(--rot));
  transition: transform .42s var(--ease-av), box-shadow .42s var(--ease-av);
}
.memory-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4.4px;
  background: #d9d6d2;
  user-select: none;
  -webkit-user-drag: none;
}
/* Photo slot: a quiet warm card with a small photo glyph, waiting for Ali's own photo. */
.memory-slot {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 4.4px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='12' viewBox='0 0 14 12' fill='none' stroke='%23fff' stroke-width='1.1' stroke-linejoin='round'%3E%3Crect x='.55' y='.55' width='12.9' height='10.9' rx='2'/%3E%3Ccircle cx='9.4' cy='3.9' r='1.2'/%3E%3Cpath d='M.9 9.4 4.6 5.6l3.2 3.3 1.5-1.4 3.9 3.6'/%3E%3C/svg%3E") center 54% / 14px 12px no-repeat,
    linear-gradient(160deg, color-mix(in srgb, var(--tone, #d6cfc8) 70%, #fff), var(--tone, #d6cfc8));
  opacity: 1;
}
.memory.has-img .memory-slot { display: none; }
[data-theme="dark"] .memory-slot { filter: brightness(.4) saturate(.6); }

.memory.is-hover {
  z-index: 10;
  transform: translate(var(--dx), calc(var(--dy) - 11px)) rotate(calc(var(--rot) * .3)) scale(1.12);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .16), 0 1px 3px rgba(0, 0, 0, .08);
}
.memory::after {
  content: attr(data-caption);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 9px);
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(20, 19, 19, .92);
  color: #fff;
  font-family: var(--label);
  font-weight: 500;
  font-size: 9px;
  line-height: 1.75;
  letter-spacing: .6px;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 4px) rotate(calc(var(--rot) * -.3));
  transition: opacity .18s var(--ease), transform .18s var(--ease);
}
.memory.is-hover::after { opacity: 1; transform: translate(-50%, 0) rotate(calc(var(--rot) * -.3)); }

@media (max-width: 760px) {
  .folio-outro {
    margin-top: calc(44px - var(--gap));
    padding-left: 32px;
    row-gap: 23px; /* fan sits 53 device px under the sub's ink, as in the reference */
    padding-bottom: 4px; margin-bottom: -4px; /* keep the outer cards' shadow inside the box; layout unchanged */
  }
  .outro-text { padding-top: 12px; }
  .path-tip { top: 34px; } /* arrowhead ends 4px under the title ink, as in the reference */
  .path-tip { left: -32px; }
  .memories { margin-right: 0; }
}

/* Smoothing pass: the hidden caption is taken out of layout so it cannot widen the page.
   Between ~600 and 680px the last card's caption reached past the viewport and touch
   browsers widened the layout viewport by up to 32px. @starting-style keeps the 180ms fade-up. */
.memory::after {
  display: none;
  transition: opacity .18s var(--ease), transform .18s var(--ease), display .18s allow-discrete;
}
.memory.is-hover::after { display: block; }
@starting-style {
  .memory.is-hover::after { opacity: 0; transform: translate(-50%, 4px) rotate(calc(var(--rot) * -.3)); }
}
