/* ==========================================================================
   Karleigh.docx — About page
   Three built pieces: the childhood collage, the "online" panel, and the
   cork board. All three scale from one container width, so they hold together
   at any size without a pile of breakpoints.
   ========================================================================== */

/* ==========================================================================
   1. CHILDHOOD — a scrapbook page taped into the document
   ========================================================================== */
.childhood {
  margin: 8px 0 34px;
  padding: 6px 0 4px;
  background-color: transparent;
  container-type: inline-size;
  /* Warm scrapbook ink on cream. Now that this block sits on the page itself
     rather than its own panel, it has to follow the sheet into night mode. */
  --scrap-ink: #6b5f43;
  --scrap-ink-soft: #7a6e50;   /* darkened from #8b7e5e to clear 4.5:1 on paper */
}
:root[data-theme="night"] .childhood {
  --scrap-ink: var(--ink-soft);
  --scrap-ink-soft: var(--ink-faint);
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] .childhood {
    --scrap-ink: var(--ink-soft);
    --scrap-ink-soft: var(--ink-faint);
  }
}

/* --- the collage ---------------------------------------------------------
   A cut-out PNG with a real alpha channel, so the paper grain of the sheet
   shows through between the objects instead of a pasted rectangle sitting
   on top of it. Nothing here is a graphic I drew — it's her artwork. */
.childhood__art {
  display: block;
  width: 100%;
  max-width: 420px;
  height: auto;
  margin: 4px auto 10px;
}

.childhood__list {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  font: 13.5px/1.85 var(--font-mono);
  color: var(--scrap-ink);
  letter-spacing: -0.01em;
}
.childhood__list li::before { content: "· "; }

@container (max-width: 460px) {
  .childhood__list { font-size: 12px; }
}

/* ==========================================================================
   3. CORK BOARD
   A flat image with a map of hotspots over it. Hovering one dims the rest of
   the board — an inverse spotlight via a huge spread box-shadow — and shows
   a caption. Every hotspot is a real button, so it all works from the
   keyboard and reads properly to a screen reader.
   ========================================================================== */
.cork {
  /* breaks into the page margins, but only while margins exist. Below 900px
     the sheet fills the viewport and any negative margin becomes overflow. */
  margin: 34px 0 8px;
}
@media (min-width: 901px) {
  .cork { margin-inline: calc(var(--page-pad-x) * -0.5); }
}
.cork__stage {
  position: relative;
  overflow: hidden;          /* clips the spotlight's spread */
  border-radius: 2px;
  line-height: 0;
}
.cork__art { display: block; width: 100%; height: auto; }

.cork__spots { position: absolute; inset: 0; }

.cork__spot {
  position: absolute;
  left: var(--x); top: var(--y);
  width: var(--w); height: var(--h);
  padding: 0;
  background: none;
  border: 0;
  border-radius: 6px;
  cursor: help;
  transition: box-shadow var(--dur) var(--ease), outline-color var(--dur) var(--ease);
  outline: 2px solid transparent;
  outline-offset: 2px;
}
/* the inverse spotlight: everything outside this box dims */
.cork__spot:hover,
.cork__spot:focus-visible,
.cork__spot.is-on {
  box-shadow: 0 0 0 9999px rgba(12, 10, 6, 0.55);
  outline-color: rgba(255, 255, 255, 0.85);
}
.cork__spot:focus-visible { outline-color: #fff; outline-width: 3px; }

/* the caption */
.cork__tip {
  position: absolute;
  z-index: 5;
  max-width: min(300px, 62%);
  padding: 10px 13px;
  background: #fffce8;
  border: 1px solid #b7ae7d;
  border-radius: 3px;
  box-shadow: 2px 3px 0 rgba(0, 0, 0, 0.32);
  font: 13px/1.5 var(--font-ui);
  color: #24211a;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 140ms var(--ease), transform 140ms var(--ease);
}
.cork__tip[hidden] { display: none; }
.cork__tip.is-on { opacity: 1; transform: none; }
/* the heading. deliberately not uppercased — these are written lowercase. */
.cork__tip b {
  display: block;
  margin-bottom: 4px;
  font: bold 12.5px/1.3 var(--font-goth);
  letter-spacing: 0.01em;
  text-transform: none;
  color: #7a6a2c;
}

.cork__cap {
  margin: 12px 0 0;
  text-align: center;
  font: var(--t-caption)/1.45 var(--font-ui);
  color: var(--ink-faint);
}

@media (max-width: 560px) {
  .cork__tip { max-width: 82%; font-size: 12.5px; }
}
/* No hover on touch — tapping a spot toggles it, handled in JS. */
@media (prefers-reduced-motion: reduce) {
  .cork__spot, .cork__tip { transition: none; }
}


/* ==========================================================================
   Snapshots — four photographs taped onto the sheet
   Small on purpose: they punctuate the page rather than take it over.
   ========================================================================== */
.snaps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 26px 0 30px;
}
.snap {
  position: relative;
  margin: 0;
  padding: 7px 7px 6px;
  background: #fff;
  box-shadow: 0 0 0 1px #e0e0e0, 0 1px 2px rgba(0,0,0,.14), 0 6px 14px rgba(0,0,0,.12);
  transform: rotate(var(--tilt, 0deg));
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
/* the bit of tape along the top edge */
.snap::before {
  content: "";
  position: absolute;
  top: -7px; left: 50%;
  width: 42px; height: 14px;
  transform: translateX(-50%) rotate(calc(var(--tilt, 0deg) * -1.6));
  background: rgba(226, 219, 190, .62);
  border-left: 1px solid rgba(255,255,255,.5);
  border-right: 1px solid rgba(0,0,0,.05);
  clip-path: polygon(0 10%, 7% 0, 93% 5%, 100% 0, 100% 90%, 92% 100%, 8% 95%, 0 100%);
}
.snap:hover, .snap:focus-within {
  transform: rotate(calc(var(--tilt, 0deg) * 0.25)) translateY(-3px);
  box-shadow: 0 0 0 1px #d4d4d4, 0 2px 4px rgba(0,0,0,.18), 0 12px 26px rgba(0,0,0,.18);
}
.snap img { display: block; width: 100%; height: auto; }
/* Word's own caption style, not a handwriting impression */
.snap figcaption {
  margin-top: 7px;
  font: italic var(--t-caption)/1.4 var(--font-ui);
  color: var(--ink-soft);
  text-align: center;
}

@media (max-width: 700px) {
  .snaps { grid-template-columns: repeat(2, 1fr); gap: 16px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .snap, .snap:hover { transition: none; transform: rotate(var(--tilt, 0deg)); }
}
