/* Reference-led homepage closing journey. Deliberately scoped so the approved
   hero, work, motion, recommendations and dedicated About page remain untouched. */
.experience-chapter > .chapter-container,
.contact-chapter > .chapter-container,
.portfolio-footer > .chapter-container {
  width: min(77.5rem, calc(100% - 6rem));
}

.experience-chapter {
  padding-block: 1.5rem 2.5rem;
  background:
    radial-gradient(ellipse at 50% 75%, rgb(223 235 249 / 25%), transparent 66%),
    var(--selected-work-surface);
  scroll-margin-top: 2rem;
}

.experience-chapter > .chapter-container {
  height: 39.5rem;
}

.closing-chapter-number {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0 0 1.5rem;
  color: var(--portfolio-muted);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.closing-chapter-number span {
  width: 3rem;
  height: 1px;
  background: #cfd2df;
}

.experience-header {
  position: relative;
  z-index: 1;
  display: block;
  max-width: 38rem;
  margin: 0;
  pointer-events: none;
}

.experience-header .chapter-kicker,
.contact-message .chapter-kicker {
  margin: 0 0 1.8rem;
  color: var(--portfolio-muted);
  font-size: 0.8125rem;
  font-weight: 650;
  letter-spacing: 0.08em;
}

.experience-header h2 {
  margin: 0;
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.055em;
}

.experience-intro {
  margin: 1rem 0 0;
  color: var(--portfolio-body);
  font-size: 1.2rem;
  line-height: 1.5;
  letter-spacing: -0.025em;
}

.experience-journey {
  position: absolute;
  inset: 0;
}

.experience-path {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  color: #a18af0;
  pointer-events: none;
}

.experience-path path {
  stroke: currentColor;
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.experience-path-line { stroke-dasharray: 5 5; }
.experience-path-arrow { stroke-width: 1.6 !important; }

.experience-journey-list {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.experience-stop {
  position: absolute;
  left: calc(var(--stop-x) - 2rem);
  top: var(--stop-y);
  width: 12.5rem;
  padding-top: 1.4rem;
}

.experience-stop::before {
  content: "";
  position: absolute;
  left: 1.625rem;
  top: -0.375rem;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: var(--stop-accent);
  box-shadow: 0 0 0 0.3rem var(--selected-work-surface);
}

.experience-stop-mech { --stop-x: 5.068%; --stop-y: 26.25rem; --stop-accent: #f49b79; }
.experience-stop-mpl { --stop-x: 24%; --stop-y: 24.6875rem; --stop-accent: #f394a6; }
.experience-stop-freo { --stop-x: 45%; --stop-y: 22.6875rem; --stop-accent: #667185; }
.experience-stop-games { --stop-x: 67%; --stop-y: 18.0625rem; --stop-accent: var(--portfolio-purple); }
.experience-stop-licious {
  --stop-x: 86%;
  --stop-y: 11.375rem;
  --stop-accent: #ed1748;
  width: calc(14% + 2rem);
}

.experience-stop-licious::before,
.experience-stop-licious::after {
  left: 1.5rem;
  top: -0.5rem;
  width: 1rem;
  height: 1rem;
  pointer-events: none;
}

.experience-stop-licious::before {
  z-index: 1;
  box-shadow: 0 0 0 0.3rem #fff, 0 0 1.7rem rgb(237 23 72 / 28%);
}

/* The current-role dot stays still; a filled colour pulse expands beneath it. */
.experience-stop-licious::after {
  content: "";
  position: absolute;
  z-index: 0;
  border: 0;
  border-radius: 50%;
  background: rgb(237 23 72 / 42%);
  opacity: 0;
  transform-origin: center;
  animation: current-role-ripple 2s ease-out infinite;
  animation-play-state: paused;
}

.experience-journey.is-revealed.is-motion-active .experience-stop-licious::after {
  animation-play-state: running;
}

@keyframes current-role-ripple {
  0% { transform: scale(1); opacity: 0.9; }
  40% { transform: scale(2.1); opacity: 0.6; }
  85%, 100% { transform: scale(2.75); opacity: 0; }
}

.experience-brand {
  display: grid;
  place-items: center;
  width: 4rem;
  height: 4rem;
  margin-bottom: 1rem;
  border-radius: 50%;
  background: #fff;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.07em;
  user-select: none;
}

.brand-mech { color: #e77634; font-size: 2.3rem; }
.brand-mpl { color: #e90035; font-size: 1.25rem; letter-spacing: -0.055em; }
.brand-freo { color: #fff; background: #141b29; font-size: 2rem; font-weight: 500; }
.brand-games { color: #7838e7; font-size: 3.1rem; }
.brand-licious {
  width: 4.5rem;
  height: 4.5rem;
  margin-left: -0.25rem;
  color: #fff;
  background: #e9083b;
  font-size: 1rem;
  font-weight: 750;
  letter-spacing: -0.06em;
}

.experience-stop h3 {
  margin: 0 0 0.45rem;
  color: var(--portfolio-ink);
  font-size: 1.2rem;
  font-weight: 650;
  letter-spacing: -0.04em;
  line-height: 1.25;
}

.experience-stop p {
  margin: 0;
  color: var(--portfolio-body);
  font-size: 1rem;
  line-height: 1.5;
  letter-spacing: -0.02em;
}

.experience-stop .experience-years {
  margin-top: 0.15rem;
  color: var(--portfolio-muted);
  font-variant-numeric: tabular-nums;
}

.experience-doodle,
.contact-doodle {
  position: absolute;
  color: #9275eb;
  font-family: "Bradley Hand", "Segoe Print", "Comic Sans MS", cursive;
  line-height: 1.45;
  text-align: center;
  pointer-events: none;
}

.experience-doodle {
  left: 51%;
  top: 10.5rem;
  width: 11rem;
  font-size: 1.05rem;
  transform: rotate(-9deg);
}

.experience-doodle svg {
  display: block;
  width: 5.75rem;
  height: 6rem;
  margin: 0.25rem 0 0 -0.4rem;
}

.experience-doodle path,
.contact-doodle path,
.contact-spark path {
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-chapter {
  padding-block: 3rem 2.5rem;
  background: var(--selected-work-surface);
  scroll-margin-top: 2rem;
}

.contact-chapter > .chapter-container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem;
  min-height: 45rem;
  padding-top: 0;
  text-align: left;
}

.contact-message {
  position: relative;
  z-index: 2;
}

.contact-message .chapter-kicker { margin-bottom: 2.2rem; }

.contact-heading {
  margin: 0;
  max-width: 100%;
  font-size: 4.5rem;
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.06em;
}

.contact-heading span { color: inherit; }

.contact-copy {
  margin: 1.6rem 0 1.8rem;
  max-width: 33rem;
  color: var(--portfolio-body);
  font-size: 1.2rem;
  line-height: 1.6;
  letter-spacing: -0.025em;
}

.contact-destination {
  display: inline-flex;
  align-items: center;
  gap: 1.6rem;
  padding: 1.05rem 2rem;
  border: 0;
  border-radius: 3rem;
  background: #111827;
  color: #fff;
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.3;
  box-shadow: 0 0.4rem 1rem rgb(17 24 39 / 7%);
}

.contact-heading + .contact-destination {
  margin-top: clamp(1.5rem, 2.5vw, 2rem);
}

.contact-destination[href] {
  transition: background-color 200ms ease, transform 200ms var(--ease-out);
}

.contact-destination[href]:hover {
  gap: 1.6rem;
  color: #fff;
  background: #263042;
  transform: translateY(-2px);
}

.contact-destination[href]:active { transform: translateY(0) scale(0.98); }
.contact-destination[hidden] { display: none; }

.contact-destination > span:last-child {
  display: inline-block;
  flex: none;
  transition: transform 200ms var(--ease-out);
}

.contact-destination:hover > span:last-child { transform: translate(2px, -2px); }

.contact-pending {
  margin: 1.75rem 0 0;
  color: var(--portfolio-muted);
  font-size: 0.9375rem;
  font-weight: 400;
}

.contact-details {
  margin-top: 2rem;
  color: var(--portfolio-ink);
}

.contact-email,
.contact-resource {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 1rem;
  line-height: 1.4;
}

.contact-email { width: max-content; max-width: 100%; }
.contact-email span { overflow-wrap: anywhere; }

.contact-details svg {
  flex: none;
  width: 1.4rem;
  height: 1.4rem;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-socials {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem 1.8rem;
  margin-top: 1.35rem;
}

.contact-resource-pending { color: var(--portfolio-muted); }
.contact-resource a { text-underline-offset: 0.3rem; }
.contact-details a:hover { text-decoration: underline; text-underline-offset: 0.3rem; }
.contact-details [hidden] { display: none; }

.contact-art {
  position: relative;
  isolation: isolate;
  height: 45rem;
  margin: 0;
}

.contact-art-glow {
  position: absolute;
  z-index: -1;
  top: 7rem;
  left: -4rem;
  right: -1rem;
  bottom: 0;
  border-radius: 48% 52% 43% 57% / 46% 48% 52% 54%;
  background:
    radial-gradient(ellipse at 34% 74%, rgb(213 217 255 / 42%), transparent 63%),
    radial-gradient(ellipse at 78% 45%, rgb(238 220 248 / 33%), transparent 69%),
    radial-gradient(ellipse at 66% 69%, rgb(219 234 250 / 45%), transparent 67%);
  filter: blur(1rem);
  pointer-events: none;
}

.contact-art .contact-character {
  z-index: 1;
  left: 50%;
  bottom: -1rem;
  width: 29rem;
  max-width: 100%;
  height: auto;
  transform: translateX(-50%);
  filter: none;
  mix-blend-mode: multiply;
  pointer-events: none;
}

.contact-doodle {
  z-index: 2;
  top: 1rem;
  right: 0;
  width: 14rem;
  font-size: 1.3rem;
  transform: rotate(-12deg);
}

.contact-doodle svg {
  display: block;
  width: 7rem;
  height: 5.625rem;
  margin: 0.7rem 0 0 0.6rem;
}

.contact-spark {
  position: absolute;
  left: 10%;
  top: 14rem;
  width: 3.25rem;
  height: 3.25rem;
  color: #9275eb;
  pointer-events: none;
}

.contact-spark path { stroke-width: 2.5; }

.portfolio-footer {
  padding-block: 0 2rem;
}

.portfolio-footer > .chapter-container {
  min-height: 6.5rem;
  padding-top: 1.8rem;
  border-top: 1px solid #d8dce6;
}

.footer-credit {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: var(--portfolio-muted);
  font-size: 0.8125rem;
}

.footer-signature {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--portfolio-body);
}

.footer-signature::after { content: none; }

.footer-thought {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 0;
  color: #9275eb;
  font: 1.1rem/1.4 "Bradley Hand", "Segoe Print", "Comic Sans MS", cursive;
  transform: rotate(-7deg);
}

.footer-thought span { font-size: 1.8rem; }

.footer-top {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.7rem 0;
  font-size: 0.875rem;
  color: var(--portfolio-body);
}

.footer-top span {
  margin: 0;
  font-size: 1.3rem;
  transition: transform 200ms var(--ease-out);
}

.footer-top:hover span { transform: translateY(-3px); }
.footer-top:active span { transform: translateY(-1px); }

@media (prefers-reduced-motion: reduce) {
  .experience-stop-licious::after {
    animation: none !important;
    opacity: 0;
  }

  .contact-destination,
  .contact-destination > span:last-child,
  .footer-top span {
    transition: none !important;
  }
}
