/* The cat note belongs above page content, but below the sticky navigation. */
.page-home .hero.section { position: relative; }
.page-home .hero:has(.home-cat-easter-egg[open]) { z-index: 2; }
.page-home .hero-panel:has(.home-cat-easter-egg[open]) { z-index: 2; }
.page-home .hero-grid > * { min-width: 0; }
/* Keep the Easter egg with the person, not against the main action column. */
.page-home .portrait-byline { padding-right: 28px; }
.page-home .home-cat-easter-egg {
  position: relative;
  inset: auto;
  display: table;
  margin-top: 16px;
}
.page-home .home-cat-easter-egg > summary {
  width: 46px;
  height: 46px;
  background: var(--solid-accent-tint);
  color: var(--solid-accent-ink);
  border: 1px solid var(--solid-accent-ink);
}
.page-home .home-cat-easter-egg > summary:hover,
.page-home .home-cat-easter-egg[open] > summary {
  background: var(--solid-orange);
  color: var(--solid-ink);
  border-color: var(--solid-ink);
}
.page-home .cat-surprise {
  width: var(--cat-popup-width, min(320px, calc(100vw - 32px)));
  right: var(--cat-popup-right, 0px);
  overscroll-behavior: contain;
  padding-top: 22px;
  padding-bottom: 16px;
}
.page-home .cat-surprise > p {
  padding-right: 32px;
  font-size: clamp(26px, 7vw, 33.6px);
  overflow-wrap: break-word;
}
.cat-surprise-close {
  position: absolute;
  top: 4px;
  right: 4px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 3px;
  color: var(--solid-ink);
  cursor: pointer;
  touch-action: manipulation;
}
.cat-surprise-close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.cat-surprise-close[hidden] { display: none; }
.cat-surprise-close:hover { background: var(--solid-soft, #f2f2f2); }

/* Stack the introduction before the narrow two-column layout becomes cramped. */
@media (max-width: 840px) {
  .page-home .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .page-home .hero-panel { grid-column: 1; grid-row: 1; }
  .page-home .hero-copy { grid-column: 1; grid-row: 2; padding-top: 0; }
  .page-home .hero-copy h1.hero-thesis > span { white-space: normal; }
  .page-home .portrait-card { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 17px; align-items: center; }
  .page-home .portrait-frame { width: 130px; height: 154px; grid-row: 1 / 3; align-self: start; }
  .page-home .portrait-byline { margin: 0; padding: 0; overflow-wrap: break-word; align-self: end; }
  .page-home .home-cat-easter-egg { grid-column: 2; grid-row: 2; margin: 0; justify-self: start; align-self: start; }
  .page-home .portrait-byline p { line-height: 1.6; }
  .page-home .hero-motto { display: none; }
}
@media (max-width: 600px) {
  .page-home .work-chapter .section-heading h2 { font-size: clamp(40px, 10.7vw, 49px); line-height: 1.05; text-wrap: balance; }
}
@media (max-width: 360px) {
  .page-home .portrait-card { grid-template-columns: 104px minmax(0, 1fr); gap: 14px; }
  .page-home .portrait-frame { width: 104px; height: 132px; }
  .page-home .portrait-byline strong { font-size: 17px; }
}
@media print { .home-cat-easter-egg { display: none; } }
