/* Living portrait card (hero) + the cursor moth. */

.moth-portrait {
  position: relative;
  margin: 0;
  width: 100%;
  aspect-ratio: 1024 / 1088;
  border-radius: 4px;
  overflow: hidden;
  filter: saturate(0.9);
}
.moth-portrait__img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
/* Empty layer the WebGL canvas goes into; the <img> stays underneath as the
   fallback (reduced motion, no WebGL, or before it has loaded). */
.moth-portrait__stage {
  position: absolute;
  inset: 0;
}
.portrait__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* The moth itself (created by moth-portrait/butterfly.js). Above the sticky
   nav (z 40), below the mobile menu (z 70). Never takes pointer events. */
.butterfly {
  position: fixed;
  left: 0;
  top: 0;
  width: 53px;
  height: 53px;
  margin: -26.5px 0 0 -26.5px;
  pointer-events: none;
  z-index: 50;
  will-change: transform;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.35));
}
.butterfly svg { width: 100%; height: 100%; overflow: visible; display: block; }

@media print {
  .butterfly { display: none; }
}

/* Light theme: the drawing's white paper takes on the page's oat paper (a multiply
   layer over the image and the living canvas; darks stay dark). */
body:not(.theme-dark) .moth-portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--parchment);
  mix-blend-mode: multiply;
  pointer-events: none;
}
