#portfolio-intro {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: white;
  color: #2a2a2a;
  perspective: 850px;
  touch-action: none;
}
#portfolio-intro[open] { display: grid; place-items: center; }
#portfolio-intro::backdrop { background: transparent; }
#portfolio-intro.revealing { animation: intro-reveal 1.2s ease-in-out both; }
#portfolio-intro.revealing .intro-note { visibility: hidden; }
@keyframes intro-reveal { to { opacity: 0; } }

.intro-note {
  --size: clamp(138px, 17vw, 188px);
  width: var(--size);
  aspect-ratio: 1;
  transform-origin: 23% 2%;
  transform: rotate(-6deg);
  animation: intro-press .97s .19s cubic-bezier(.2,.72,.22,1) both;
}
.intro-sheet {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-content: center;
  background: #bee5ff;
  font: 400 clamp(22px, 2.6vw, 30px)/1.08 Lato, Arial, sans-serif;
  letter-spacing: -.035em;
}
.intro-sheet > span {
  display: block;
  white-space: nowrap;
  --word-delay: 1.15s;
  --letter-step: 72ms;
}
.intro-sheet > span + span { --word-delay: 1.7s; --letter-step: 140ms; }
.intro-sheet > span > span {
  animation: intro-letter 1ms step-end backwards;
  animation-delay: calc(var(--word-delay) + var(--letter-index) * var(--letter-step));
}
@keyframes intro-letter { from { opacity: 0; } to { opacity: 1; } }
@keyframes intro-press {
  0% { opacity: 0; transform: translate3d(2%, -12%, 54px) rotate(-9deg); }
  30% { opacity: 1; transform: translate3d(0, 0, 0) rotate(-6.6deg); }
  70%, 100% { transform: rotate(-6deg); }
}
.leaving .intro-note { animation: intro-fall 1.7s both; }
@keyframes intro-fall {
  0%, 28% { transform: rotate(-6deg); }
  57% {
    transform: translateY(1%) rotate(-1deg);
    animation-timing-function: cubic-bezier(.48, 0, .82, .56);
  }
  100% { transform: translate(-3%, calc(65vh + var(--size))) rotate(9deg); }
}
@media (prefers-reduced-motion: reduce) {
  #portfolio-intro *, #portfolio-intro *::after { animation: none; }
  #portfolio-intro.revealing { animation-duration: .15s; }
}

/* Compact language control on cases without the full home-page header. */
.case-language-header{position:fixed;top:24px;left:24px;z-index:140;pointer-events:none}
.case-language-switch{pointer-events:auto;display:flex;align-items:center;gap:4px;min-height:44px;padding:8px 12px;border:0;border-radius:4px;background:rgba(253,253,253,.94);color:#1f1f1f;font:400 14px/1 Lato,Arial,sans-serif;cursor:pointer}
.case-language-switch img{display:block;width:20px;height:20px;flex-shrink:0}
.case-language-switch:focus-visible{outline:2px solid currentColor;outline-offset:2px}
@media(max-width:600px){.case-language-header{top:12px;left:8px}.case-language-switch{padding:8px;font-size:12px}.case-language-switch img{width:16px;height:16px}}
@media(max-width:340px){.case-language-switch .lang-label{display:inline}}
