/* =============================================================================
   COMPONENT: MEME STICKERS
   A cut-out character with a two-part caption stacked on top of it:
     .meme__pre  small handwritten setup line on a paper tag
     .meme__big  the punchline, in one of two voices:
       --comic   chunky yellow comic lettering, ink outline + drop (CONTROL)
       --poster  film-poster red, condensed, Devanagari-ready (DEKH RAHA HAI BINOD)
   Placement per section lives at the bottom of this file. Each sticker is
   decorative (aria-hidden), lazy-loaded, ~40–70 KB, and only moves via
   reveal (transform) + parallax (translate), both compositor-only.
   ============================================================================= */
.meme {
  position: absolute;
  z-index: 3;
  width: var(--meme-w, clamp(150px, 15vw, 220px));
  pointer-events: none;
}

.meme img { display: block; width: 100%; height: auto; filter: drop-shadow(4px 5px 0 rgb(22 19 15 / 0.22)); }

.meme__cap {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 2px;
  margin-bottom: -8%;
  text-align: center;
  rotate: var(--cap-rot, -4deg);
}

.meme__pre {
  padding: 2px 10px;
  background: var(--c-paper);
  border: var(--b-thin) solid var(--c-ink);
  border-radius: 4px;
  box-shadow: var(--sh-sm);
  font: 700 clamp(0.74rem, 0.64rem + 0.35vw, 0.95rem)/1.25 var(--f-accent);
  color: var(--c-ink);
  white-space: nowrap;
}

.meme__big { display: block; }

.meme__big--comic {
  font: 400 clamp(1.5rem, 1rem + 1.7vw, 2.5rem)/0.95 var(--f-meme);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #ffe27a;
  -webkit-text-stroke: 0.16em var(--c-ink);
  paint-order: stroke fill;
  text-shadow: 0.07em 0.08em 0 var(--c-ink);
}

.meme__big--poster {
  font: 700 clamp(1.7rem, 1.1rem + 1.9vw, 2.8rem)/0.9 var(--f-poster);
  color: #b3211b;
  -webkit-text-stroke: 0.1em #fff3cb;
  paint-order: stroke fill;
}

.meme__latin { display: block; text-transform: uppercase; letter-spacing: 0.01em; }

/* ---- Placement --------------------------------------------------------- */

/* Both stand on their section's bottom edge (bottom: 0), lined up with the
   left edge of the content column. */
.meme--control,
.meme--expert {
  bottom: 0;
  left: calc(max(0px, (100% - var(--wrap)) / 2) + var(--gutter) + 2%);
}

/* Experience: under the Seedicon card, clear of the receipt */
.meme--control { --meme-w: clamp(170px, 16vw, 230px); --cap-rot: -5deg; }

/* Skills: peeks over the report card's bottom edge, mirrored to face his line */
.meme--expert {
  --meme-w: auto;
  --cap-rot: -4deg;
  display: flex;
  align-items: center;
}

.meme--expert img { order: -1; width: clamp(130px, 11vw, 170px); scale: -1 1; }
.meme--expert .meme__cap { margin: 0 0 30px -16px; white-space: nowrap; }
.meme--expert .meme__big { font-size: clamp(1.3rem, 0.9rem + 1.2vw, 2rem); }

/* Room for him under the card: his height minus the bit that overlaps it */
@media (min-width: 901px) {
  .section.skills { padding-bottom: clamp(150px, 13vw, 185px); }
}

/* Doors: Binod watching from the hallway floor, his poster beside him */
.doors__stage { position: relative; }

.meme--binod {
  --meme-w: auto;
  --cap-rot: -3deg;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: flex-end;
}

.meme--binod img { width: clamp(140px, 12vw, 190px); }

.meme--binod .meme__cap {
  margin: 0 -18px 34px 0;
  padding: 8px 14px 4px;
  background: #f2b616;
  border: var(--b) solid var(--c-ink);
  box-shadow: var(--sh);
  white-space: nowrap;
}

.meme--binod .meme__big--poster { -webkit-text-stroke: 0; font-size: clamp(1.4rem, 0.9rem + 1.3vw, 2.2rem); }

/* Testimonials: you've scrolled a lot, have some water */
.words .wrap { position: relative; }
/* She stands on the section's bottom edge, right of the LinkedIn button,
   holding the glass out towards it; caption to her right */
.meme--jal {
  --meme-w: auto;
  --cap-rot: 4deg;
  left: calc(50% + 120px);
  bottom: calc(-1 * var(--sec-pad));
  display: flex;
  align-items: center;
}

.meme--jal img { width: clamp(140px, 12vw, 180px); }
.meme--jal .meme__cap { order: 2; margin: 0 0 40px -10px; white-space: nowrap; }

/* Finale: left of the eye-test card, saluting towards it as he signs off
   (the floating back-to-top button owns the right corner) */
.finale { position: relative; }
.meme--chalta { --meme-w: clamp(170px, 15vw, 230px); --cap-rot: -4deg; left: 3%; bottom: 0; }
.meme--chalta img { scale: -1 1; }   /* mirrored */
/* Caption wraps to his width so he never spills onto the card */
.meme--chalta .meme__pre { white-space: normal; font-size: 0.82rem; }
.meme--chalta .meme__big { font-size: clamp(1.25rem, 0.6rem + 1.1vw, 1.8rem); }

/* Not enough side room beside the eye-test card: stand under it instead */
@media (max-width: 1300px) {
  .meme--chalta {
    position: relative;
    inset: auto;
    width: min(220px, 60vw);
    margin: 28px auto calc(-1 * var(--pad-b));
    translate: none;
  }
}

/* ---- Tablet & phone: each sticker is the last thing in its section,
   centred, and sinks through the section's bottom padding (--sink) so it
   stands on the bottom edge instead of floating above it. ------------- */
@media (max-width: 900px) {
  .meme:not(.meme--binod) {
    position: relative;
    inset: auto;
    width: min(220px, 60vw);
    margin: 28px auto calc(-1 * var(--sink, var(--sec-pad)));
    translate: none;
  }

  .meme--expert,
  .meme--jal { width: auto; justify-content: center; }
  .meme--expert img,
  .meme--jal img { width: min(150px, 38vw); }
  .meme--chalta { --sink: var(--pad-b); }
}

/* Phones: Binod stays on the doors' floor, smaller, under the swipe controls */
@media (max-width: 760px) {
  .meme--binod { right: -6px; }
  .meme--binod img { width: 118px; }
  .meme--binod .meme__cap { margin: 0 -14px 24px 0; padding: 6px 10px 3px; box-shadow: var(--sh-sm); }
  .meme--binod .meme__big--poster { font-size: 1.25rem; }
}
