/* About page, personal half: a FigJam-style dotted board.
   Same trick as the brand chapter in the SEO case: once the section crosses
   the middle of the viewport, board.js puts .is-board-bg on <body> and the
   whole page fades into a dotted canvas (a fixed .page-dots layer), so the
   board is not a box but the page itself. The stage is drawn at a fixed
   design size (1360 x 960) and scaled to the content width, so the
   composition holds at any desktop width. Below 1000px it becomes a static
   two-column collage. */

/* ---------- page-wide dotted canvas ---------- */
.about-page { overflow-x: clip; }

.page-dots {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  background-color: #F4F4F6;
  background-image: radial-gradient(circle, #CBCBD3 1.3px, transparent 1.6px);
  background-size: 24px 24px;
  transition: opacity 700ms var(--ease);
}

body.is-board-bg .page-dots { opacity: 1; }
body.is-board-bg { background-color: #F4F4F6; }
body.is-board-bg .nav-wrap { background: rgba(244, 244, 246, 0.78); }

@media (prefers-reduced-motion: reduce) {
  .page-dots { transition: none; }
}

/* intro block: the origin line that replaced the three story cards */
.about-identity__origin {
  margin: 0;
  max-width: 62ch;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0;
  color: var(--color-desc);
}

/* Work Experience: no visible heading, the rows sit right under the intro
   with the same 16px gap as every other tile (heading kept for screen readers) */
.about-experience { padding: 0; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- section ---------- */
.about-personal {
  /* break out of the 1360px grid to the full viewport width */
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-top: 0;
  padding: var(--space-6) var(--side-padding) calc(var(--space-7) + 48px);
  overflow: clip;
}

.about-personal__inner {
  max-width: var(--content-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.about-personal__head {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: 0 var(--space-1);
}

.about-personal__heading {
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--color-text-black);
}

.about-personal__sub {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-desc);
}

/* ---------- board ---------- */
.board {
  --stage-w: 1360;
  --stage-h: 960;
  --s: 1;
  position: relative;
  width: 100%;
  aspect-ratio: 1360 / 960;
  /* items may be dragged a little past the edge; the section clips them */
  overflow: visible;
}

.board__stage {
  position: absolute;
  top: 0;
  left: 0;
  width: 1360px;
  height: 960px;
  transform: scale(var(--s));
  transform-origin: 0 0;
}

.board-item {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: rotate(var(--r, 0deg));
  /* keep the item's own size near the stage edge (absolute boxes otherwise
     shrink to the space left, which squeezed photos on the right side) */
  width: max-content;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 220ms var(--ease), box-shadow 220ms var(--ease);
}

.board-item:hover { transform: rotate(var(--r, 0deg)) scale(1.015); }

.board-item.is-dragging {
  cursor: grabbing;
  transform: rotate(calc(var(--r, 0deg) * 0.4)) scale(1.04);
  transition: none;
}

/* ---------- polaroids ---------- */
.polaroid {
  margin: 0;
  padding: 10px 10px 0;
  background: #FFFFFF;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(30, 30, 30, 0.08), 0 10px 24px -10px rgba(30, 30, 30, 0.22);
}

.polaroid.is-dragging {
  box-shadow: 0 2px 4px rgba(30, 30, 30, 0.08), 0 24px 40px -12px rgba(30, 30, 30, 0.3);
}

.polaroid img {
  display: block;
  max-width: none;
  object-fit: cover;
  border-radius: 2px;
  pointer-events: none;
}

.polaroid--portrait img { width: 180px; height: 240px; }
.polaroid--landscape img { width: 300px; height: 210px; }

.polaroid figcaption {
  padding: 10px 2px 12px;
  font-size: 13px;
  line-height: 1.3;
  color: var(--color-text);
}

/* washi tape */
.polaroid::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 50%;
  width: 72px;
  height: 22px;
  margin-left: -36px;
  background: rgba(252, 193, 120, 0.72);
  transform: rotate(-4deg);
  box-shadow: 0 1px 1px rgba(30, 30, 30, 0.06);
}

.polaroid:nth-of-type(3n)::before { background: rgba(241, 86, 127, 0.45); transform: rotate(5deg); }
.polaroid:nth-of-type(3n + 1)::before { background: rgba(189, 227, 255, 0.85); }

/* ---------- sticky notes ---------- */
.sticky {
  width: 220px;
  min-height: 200px;
  padding: 20px 20px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(30, 30, 30, 0.06), 0 12px 22px -12px rgba(30, 30, 30, 0.28);
}

.sticky--yellow { background: #FFE38A; }
.sticky--pink { background: #FFC9D9; }
.sticky--peach { background: #FFD5B0; }
.sticky--blue { background: #C7E6FF; }
.sticky--green { background: #CDEFD3; }

.sticky__text {
  margin: 0;
  font-size: 17px;
  line-height: 1.4;
  color: var(--color-text-black);
}

.sticky__text strong { font-weight: 500; }

.sticky__author {
  font-size: 11px;
  letter-spacing: 0.04em;
  color: rgba(30, 30, 30, 0.5);
}

/* emoji at the top of each note (Diana's call, overrides AI-RULES §8 here) */
.sticky__emoji {
  display: block;
  font-size: 34px;
  line-height: 1;
  margin-bottom: -4px;
  transform: rotate(-6deg);
  transform-origin: left center;
}

/* emoji inline at the end of a line, sized to the text */
.sticky__inline-emoji {
  display: inline-block;
  font-size: 1.15em;
  line-height: 1;
  vertical-align: -0.1em;
}

/* blank note visitors can write on; Send opens a prefilled email */
.sticky--wish { width: 240px; cursor: grab; }

.sticky__label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(30, 30, 30, 0.55);
}

.sticky__input {
  width: 100%;
  min-height: 96px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  resize: none;
  font: inherit;
  font-size: 17px;
  line-height: 1.4;
  color: var(--color-text-black);
  cursor: text;
  outline: none;
}

.sticky__input::placeholder { color: rgba(30, 30, 30, 0.42); }

.sticky__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sticky__send {
  padding: 6px 12px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--color-text-black);
  color: #FFFFFF;
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 200ms var(--ease);
}

.sticky__send:disabled { opacity: 0.3; cursor: default; }

.sticky--wish:focus-within { box-shadow: 0 0 0 2px rgba(30, 30, 30, 0.7), 0 12px 22px -12px rgba(30, 30, 30, 0.28); }

/* ---------- stickers ---------- */
.board-sticker {
  filter: drop-shadow(0 4px 6px rgba(153, 53, 64, 0.22));
}

/* ---------- Pluto on the board ---------- */
.board-pluto { cursor: grab; }
.board-pluto .pluto__screen,
.board-pluto .pluto__btn { cursor: pointer; }

/* ---------- fake multiplayer cursor ---------- */
.board-cursor {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  align-items: flex-start;
  gap: 2px;
  pointer-events: none;
  z-index: 9999;
  animation: board-cursor 26s ease-in-out infinite;
}

.board-cursor__label {
  display: inline-flex;
  align-items: center;
  margin-top: 14px;
  padding: 3px 8px;
  border-radius: 6px 6px 6px 2px;
  background: var(--color-accent-1);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

/* Watching mode: while a visitor types in the "Your turn" note, board.js
   glides the cursor over to it and a pair of eyes pops into the label.
   They blink, and the pupils (--px/--py) dart with every keystroke. */
.board-cursor.is-watching {
  animation: none;
  transition: transform 900ms var(--ease);
}

.board-cursor__eyes {
  display: inline-flex;
  gap: 3px;
  width: 0;
  margin-right: 0;
  overflow: hidden;
  opacity: 0;
  transition: width 300ms var(--ease), margin-right 300ms var(--ease), opacity 300ms var(--ease);
}

.board-cursor.is-watching .board-cursor__eyes {
  width: 25px;
  margin-right: 6px;
  opacity: 1;
}

.board-cursor__eye {
  position: relative;
  width: 11px;
  height: 13px;
  border-radius: 50%;
  background: #FFFFFF;
  animation: board-blink 3.6s infinite;
}

.board-cursor__eye b {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: #1E1E1E;
  transform: translate(var(--px, -2px), var(--py, 1px));
  transition: transform 160ms var(--ease);
}

@keyframes board-blink {
  0%, 90%, 100% { transform: scaleY(1); }
  94% { transform: scaleY(0.1); }
}

@keyframes board-cursor {
  0%   { transform: translate(470px, 360px); }
  20%  { transform: translate(860px, 330px); }
  38%  { transform: translate(1200px, 720px); }
  56%  { transform: translate(640px, 770px); }
  74%  { transform: translate(260px, 400px); }
  88%  { transform: translate(400px, 330px); }
  100% { transform: translate(470px, 360px); }
}

@media (prefers-reduced-motion: reduce) {
  .board-cursor { animation: none; transform: translate(800px, 260px); }
  .board-cursor.is-watching { transition: none; }
  .board-cursor__eye { animation: none; }
}

/* ---------- toolbar ---------- */
.board__toolbar {
  position: absolute;
  left: 50%;
  bottom: -64px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 6px 6px 18px;
  border-radius: var(--radius-pill);
  background: #FFFFFF;
  box-shadow: 0 1px 2px rgba(30, 30, 30, 0.08), 0 8px 20px -8px rgba(30, 30, 30, 0.2);
  z-index: 10000;
}

.board__toolbar-hint {
  font-size: 13px;
  color: var(--color-desc);
  white-space: nowrap;
}

.board__reset {
  white-space: nowrap;
}

.board__reset {
  padding: 8px 16px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--color-tile);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-black);
  cursor: pointer;
  transition: background 200ms var(--ease);
}

.board__reset:hover { background: var(--color-tile-hover); }

/* ---------- static collage below 1000px ---------- */
@media (max-width: 999px) {
  .about-personal { margin-top: 0; padding: var(--space-5) var(--side-padding) var(--space-6); }
  .about-personal__drag-hint { display: none; }

  .board {
    aspect-ratio: auto;
  }

  .board__stage {
    position: static;
    width: auto;
    height: auto;
    transform: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 14px;
    align-items: start;
  }

  .board-item {
    position: relative;
    left: auto;
    top: auto;
    width: auto;
    cursor: default;
    touch-action: auto;
    transform: rotate(calc(var(--r, 0deg) * 0.5));
  }

  .board-item:hover { transform: rotate(calc(var(--r, 0deg) * 0.5)); }

  .board-pluto {
    order: -1; /* first thing you see on a phone too */
    grid-column: 1 / -1;
    justify-self: center;
    transform: none;
    margin: var(--space-1) 0;
  }

  .polaroid { padding: 6px 6px 0; }
  .polaroid img,
  .polaroid--portrait img,
  .polaroid--landscape img { width: 100%; max-width: 100%; height: auto; aspect-ratio: 3 / 4; }
  .polaroid--landscape img { aspect-ratio: 4 / 3; }
  .polaroid figcaption { padding: 8px 2px 10px; font-size: 12px; }

  .sticky { width: auto; min-height: 0; padding: 16px 14px 12px; gap: 12px; }
  .sticky--wish { order: -1; grid-column: 1 / -1; width: auto; } /* right under Pluto */
  .sticky__text { font-size: 15px; }
  .sticky__emoji { font-size: 28px; }

  .board-sticker,
  .board-cursor,
  .board__toolbar { display: none; }
}
