/* ════════════════════════════════════════════════════════════════
   ARCHIVE (Oct 2026): styles for the retired homepage pieces, kept only
   for their lab pages in the component library (lab.html): the grey bio
   plate and its unfolding letter (js/bio-letter.js) and the pixel cat
   (js/cat.js). Extracted from css/styles.css at commit 2ed49e4, the last
   version with both on the homepage. Loaded AFTER styles.css, by lab
   pages only, so the live site carries none of it.
   ════════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: no-preference) {
  .cat-mascot { animation: enter-up 580ms var(--ease-out-expo) 240ms both; }
}

html.is-return .cat-mascot { animation: none; }

.resume-list {
  display: flex;
  flex-direction: column;
}

.resume-row {
  display: grid;
  row-gap: 3px;
  padding: 9px 0;
}

.resume-row + .resume-row {
  border-top: 1px solid color-mix(in oklab, var(--ink-1) 11%, transparent);
}

.resume-more-inner .resume-list {
  border-top: 1px solid color-mix(in oklab, var(--ink-1) 11%, transparent);
}

.resume-row__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 12px;
  row-gap: 2px;
}

.resume-row__title,
.overview-about__title {
  font-family: var(--font-primary);
  font-size: var(--t-eyebrow);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  /* .eyebrow's own ink-4 read too quiet as a section header on its own
     line rather than a caption beside a value (which is what INFO's
     labels are) — ink-1 keeps the eyebrow's shape (size, weight,
     tracking, case) but stands out the way a header should. */
  color: var(--ink-1);
}

.resume-row__title {
  flex: 1 1 auto;
  min-width: 0;
}

.resume-row__sub {
  font-family: var(--font-body);
  font-size: var(--t-meta);
  line-height: 1.3;
  color: var(--ink-3);
}

.resume-row__date {
  /* Pushes to the row's right edge when it shares the line with title
     (mimics justify-content: space-between without needing it on the
     shared axis), and keeps that same right alignment on its own wrapped
     line, so a dropped date still reads as paired with the row rather
     than stranded at the left margin. */
  margin-left: auto;
  flex: 0 0 auto;
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: var(--t-meta);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-4);
  white-space: nowrap;
}

.overview-box {
  background: var(--surface-deep);
  padding: 16px;
}

.overview-text {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: var(--font-body);
  font-size: var(--t-body);
  line-height: 1.5;
  color: var(--ink-2);
}

.overview-text.is-collapsed {
  max-height: 6.4em;
  overflow: hidden;
}

.overview-fade {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1.6em;
  background: linear-gradient(to bottom, transparent, var(--surface-deep));
  pointer-events: none;
}

.overview-text.is-collapsed .overview-fade {
  display: block;
}

.overview-toggle {
  margin-top: 12px;
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: var(--t-meta);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  background: none;
  border: none;
  padding: 0;
  transition: color 160ms var(--ease-out-quart);
}

@media (hover: hover) and (pointer: fine) {
  .overview-toggle:hover {
      color: var(--accent-blue);
    }
}

.overview-toggle:active {
  color: var(--accent-blue);
  opacity: 0.7;
}

.bio-quirk {
  position: relative;
  white-space: nowrap;   /* keep the colon married to the word */
}

.bio-quirk__ink {
  position: absolute;
  left: -1px;
  bottom: -5px;
  width: calc(100% + 3px);
  height: 8px;
  overflow: visible;
  pointer-events: none;
}

.bio-quirk__ink path {
  fill: none;
  stroke: var(--accent-blue);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bio-letter .bio-quirk__ink path {
  stroke-dasharray: 1 2;
  stroke-dashoffset: 1;
}

.bio-letter__sheet .bio-quirk__ink path {
  transition: stroke-dashoffset 480ms linear;
}

.bio-letter.is-signed .bio-letter__sheet .bio-quirk__ink path {
  stroke-dashoffset: 0;
}

@media (prefers-reduced-motion: reduce) {
  .bio-letter .bio-quirk__ink path { transition: none; stroke-dashoffset: 0; }
}

.bio-letter {
  position: fixed;
  inset: 0;
  z-index: 520;                     /* over the dock (400) and modal (500) */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  pointer-events: none;
  visibility: hidden;
}

.bio-letter.is-mounted { pointer-events: auto; visibility: visible; }

body.bio-letter-open { overflow: hidden; }

.bio-letter__scrim {
  position: absolute;
  inset: 0;
  background: color-mix(in oklab, var(--ink-1) 32%, transparent);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  opacity: 0;
  transition: opacity 380ms var(--ease-out-soft);
  overscroll-behavior: none;
}

.bio-letter.is-mounted .bio-letter__scrim { opacity: 1; }

.bio-letter.is-closing .bio-letter__scrim { opacity: 0; transition-duration: 520ms; }

.bio-letter__box {
  position: relative;
  width: var(--bl-w, 560px);
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 360ms var(--ease-out-expo),
    transform 360ms var(--ease-out-expo);
}

.bio-letter.is-mounted .bio-letter__box { opacity: 1; transform: translateY(0); }

.bio-letter.is-closing .bio-letter__box {
  opacity: 0;
  transform: translateY(8px);
  transition-duration: 220ms;
}

.bio-letter.is-closing .bio-letter__close {
  opacity: 0;
  transition: opacity 200ms var(--ease-out-quart);
}

.bio-letter__plate-ghost {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: top left;
  z-index: 4;
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms var(--ease-out-quart) 120ms;
}

.bio-letter.is-closing .bio-letter__plate-ghost { opacity: 1; }

.bio-letter__close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
}

.overview-box > * { transition: opacity 220ms var(--ease-out-quart); }

.overview-box.is-lettering { pointer-events: none; }

.overview-box.is-lettering > * { opacity: 0; }

.bio-letter__sign {
  margin-top: 0;
  text-align: center;
}

.bio-letter__sign-note {
  margin: 0;
  color: var(--ink-3);
}

.bio-letter__page p {
  font-size: 11px;
  line-height: 1.55;
  color: var(--ink-3);
}

.bio-letter__page .rcpt-totals,
.bio-letter__page .rcpt-fineprint {
  font-family: var(--font-mono);
  letter-spacing: -0.01em;
}

.bio-letter__page .rcpt-rule {
  height: 1px;
  /* 8px, down from 12px: four of these margin-edges stack up across the
     three rules on this receipt, and it's whitespace, not content — the
     cheapest place to buy back height without touching a single line
     of type. */
  margin: 8px 0;
  background-image: repeating-linear-gradient(
    to right,
    color-mix(in oklab, var(--ink-1) 34%, transparent) 0 4px,
    transparent 4px 8px
  );
}

.bio-letter__page .rcpt-line {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 9.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.bio-letter__page .rcpt-line + .rcpt-line { margin-top: 3px; }

.bio-letter__page .rcpt-line__v { color: var(--ink-2); }

.bio-letter__page .rcpt-line--total .rcpt-line__k {
  font-family: var(--font-primary);
  font-size: var(--t-eyebrow);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-1);
}

.bio-letter__page .rcpt-line--total .rcpt-line__v {
  margin-left: auto;
}

.resume-row__head { gap: 6px; }

.resume-row__head::before {
  content: "";
  order: 1;
  flex: 1 1 auto;
  align-self: center;
  height: 1px;
  min-width: 12px;
  background-image: repeating-linear-gradient(
    to right,
    color-mix(in oklab, var(--ink-1) 30%, transparent) 0 1px,
    transparent 1px 4px
  );
}

.resume-row__title { flex: 0 0 auto; }

.resume-row__date { order: 2; }

.bio-letter__page .rcpt-totals { margin-top: 2px; }

.bio-letter__page .bio-letter__sign-words { margin-top: 12px; }

.bio-letter__page .overview-career__section + .overview-career__section {
  margin-top: 12px;
}

.bio-letter__page .overview-about {
  margin-top: 2px;   /* + the shared .overview-text flex gap (10px) = 12px */
}

.bio-letter__page .overview-about p {
  font-size: var(--t-meta);
  line-height: 1.3;
  color: var(--ink-3);
}

.bio-letter__page .rcpt-barcode {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  height: 24px;
  margin-top: 10px;
}

.bio-letter__page .rcpt-barcode i {
  display: block;
  height: 100%;
  background: var(--ink-1);
}

.bio-letter__page .rcpt-fineprint {
  margin-top: 8px;
  text-align: center;
  font-size: 8.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-4);
}

.bl-sig {
  display: block;
  width: 86px;
  height: auto;
  margin: 4px auto 0;   /* text-align:center on the parent won't center a block; this does */
}

.bl-sig__path {
  stroke: var(--accent-blue);
  /* "1 2", not "1": with pathLength=1 a plain `1` is a 1-on/1-off
     pattern, and a ROUND linecap overshoots each dash boundary by half
     the stroke-width — so a couple of caps bled through as faint dots
     even at full offset, visible during the open-but-unsigned beat. The
     wider gap keeps every cap clear of the drawn region. */
  stroke-dasharray: 1 2;
  stroke-dashoffset: 1;
}

.bio-letter__sheet .bl-sig__path {
  /* linear, deliberately: ink leaves a moving pen at a roughly constant
     rate, which is DESIGN.md's documented exception for constant-rate
     motion. An ease-out here made every one of the 27 strokes lurch
     then crawl to a stop, which is precisely what read as robotic. The
     human rhythm lives in the GAPS between strokes instead, sized from
     real pen-lift distance (see the pen model in js/bio-letter.js). */
  transition: stroke-dashoffset var(--sig-dur, 24ms) linear var(--sig-delay, 0ms);
}

.bio-letter.is-signed .bio-letter__sheet .bl-sig__path {
  stroke-dashoffset: 0;
}

.bio-letter.is-refolding .bio-letter__theater .bl-sig__path,
.bio-letter.is-refolding .bio-letter__theater .bio-quirk__ink path {
  stroke-dashoffset: 0;
  transition: none;
}

@media (prefers-reduced-motion: reduce) {
  .bl-sig__path { stroke-dashoffset: 0; transition: none; }
}

.bio-letter__stage {
  position: relative;
  height: calc(var(--bl-ph, 160px) * 3);
}

.bio-letter.is-settled .bio-letter__stage { height: auto; }

.bio-letter__theater { position: absolute; inset: 0 0 auto; }

.bio-letter.is-swap-done .bio-letter__theater,
.bio-letter.is-measuring .bio-letter__theater { display: none; }

.blf { transform-style: preserve-3d; }

.blf--1 {
  position: relative;
  height: var(--bl-ph);
  perspective: 1100px;
}

.blf--2,
.blf--3 {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: var(--bl-ph);
  transform-origin: top center;
  /* Folded up FLAT behind the panel above. A full 180deg, not the 178
     this started at: the 2deg peek left a ~7px sliver of shaded
     paper-back poking out below the packet, which made the resting
     rectangle read as a 3D object instead of the flat plate it just
     lifted out of. The translateZ (in the rotated frame, so it pushes
     BEHIND the sheet) is what makes exact-180 safe — without it the
     folded plane is coplanar with the front panel inside the
     preserve-3d context and the two z-fight. Both states carry the
     same rotateX+translateZ function list so the hinge interpolates
     per-function, never through a matrix decomposition. */
  /* Quart at 640ms, not the 560ms expo this opened with (August 2026):
     a back-fold's unfold is HIDDEN until the flap passes edge-on, and
     expo front-loads so hard that each flap burst through its hidden
     half and popped into view already at peak speed — the unfolding
     read as flaps appearing abruptly rather than swinging open. Quart
     is the gentlest entry in the token set (initial slope 4 vs expo's
     6.25) and the longer run spreads the visible descent instead of
     blast-then-crawl. OPEN direction only — the close's folds run on
     the is-refolding keyframe animations, which override this. */
  transition: transform 640ms var(--ease-out-quart);
  perspective: 1100px;
}

.blf--2 { transform: rotateX(-180deg) translateZ(2px); }

.blf--3 { transform: rotateX(-180deg) translateZ(1px); }

.bio-letter.is-f2 .blf--2 { transform: rotateX(0deg) translateZ(0); }

.bio-letter.is-f3 .blf--3 { transform: rotateX(0deg) translateZ(0); }

@keyframes blf-unfold-2 {
  from { transform: rotateX(-180deg) translateZ(2px); }
  to   { transform: rotateX(0deg) translateZ(0); }
}

@keyframes blf-unfold-3 {
  from { transform: rotateX(-180deg) translateZ(1px); }
  to   { transform: rotateX(0deg) translateZ(0); }
}

.bio-letter.is-refolding .blf--3 {
  /* 140ms delay = the sheet's fade-out (see the cross-fade rules): the
     first fold starts moving just as the sheet finishes dissolving
     into the theater, so the close reads swap-then-fold as one
     breath, and the fold never rotates underneath a still-solid
     sheet where its start would be half-hidden. */
  animation: blf-unfold-3 560ms var(--ease-out-soft) 140ms reverse both;
}

.bio-letter.is-refolding .blf--2 {
  animation: blf-unfold-2 560ms var(--ease-out-soft) 340ms reverse both;
}

.bio-letter.is-refolding .blf__shade {
  transition: opacity 480ms var(--ease-out-quart);
}

.blf__face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--surface-deep);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.blf__face--back {
  transform: rotateX(180deg);
  /* Paper back: a shade darker toward the hinge, so a closed fold reads
     as the underside of the sheet rather than a blank card. */
  background:
    linear-gradient(to top, color-mix(in oklab, var(--ink-1) 9%, transparent), transparent 70%)
    var(--surface-deep);
}

.blf__shade {
  position: absolute;
  inset: 0;
  background: color-mix(in oklab, var(--ink-1) 14%, transparent);
  opacity: 1;
  transition: opacity 640ms var(--ease-out-quart);
  pointer-events: none;
}

.bio-letter.is-f2 .blf--2 > .blf__face .blf__shade,
.bio-letter.is-f3 .blf--3 > .blf__face .blf__shade { opacity: 0; }

.blf__win { position: absolute; inset: 0 0 auto; }

.blf__win--2 > .bio-letter__page { transform: translateY(calc(var(--bl-ph) * -1)); }

.blf__win--3 > .bio-letter__page { transform: translateY(calc(var(--bl-ph) * -2)); }

.bio-letter__sheet {
  display: none;
  /* Positioned, deliberately: the theater is position:absolute, and a
     positioned element paints above any non-positioned sibling no
     matter the DOM order — an unpositioned sheet would run its whole
     settle cross-fade INVISIBLY beneath the opaque theater and the
     swap would still be a cut. Positioned (and the later sibling),
     the sheet genuinely fades in on top. */
  position: relative;
  background: var(--surface-deep);   /* the plate's paper — see .blf__face */
  /* 88vh, up from 82vh: the dialog itself (.bio-letter) is a flex-
     centered overlay with its own 16px padding, so that padding alone
     already guarantees clearance at the top and bottom of the
     viewport — the extra 6% below 100 was margin on top of margin.
     Keep in step with the matching 0.88 in js/bio-letter.js measure(),
     which sizes the fold panels off this same fraction. */
  max-height: 88vh;
  overflow: auto;
  overscroll-behavior: contain;
  /* The creases the folds leave behind: hairlines at the fold thirds.
     3%, not the 8% this started at — the lines cross mid-paragraph, and
     8% was reading as a rule under the text, not a faint paper crease. */
  background-image:
    linear-gradient(color-mix(in oklab, var(--ink-1) 3%, transparent), color-mix(in oklab, var(--ink-1) 3%, transparent)),
    linear-gradient(color-mix(in oklab, var(--ink-1) 3%, transparent), color-mix(in oklab, var(--ink-1) 3%, transparent));
  background-repeat: no-repeat;
  background-size: 100% 1px, 100% 1px;
  background-position: 0 var(--bl-ph), 0 calc(var(--bl-ph) * 2);
}

.bio-letter.is-settling .bio-letter__sheet,
.bio-letter.is-measuring .bio-letter__sheet { display: block; }

.bio-letter.is-settling .bio-letter__sheet {
  opacity: 0;
  transition: opacity 220ms var(--ease-out-quart);
}

.bio-letter.is-settling.is-settled .bio-letter__sheet { opacity: 1; }

.bio-letter.is-refolding .bio-letter__sheet {
  transition: opacity 140ms var(--ease-out-quart);
}

.bio-letter.is-settling:not(.is-swap-done) .bio-letter__sheet {
  box-shadow: none;
}

.bio-letter.is-swap-done .bio-letter__sheet {
  transition: opacity 140ms var(--ease-out-quart);
}

.bio-letter.is-measuring {
  visibility: hidden;
  pointer-events: none;
}

.bio-letter__sheet:focus-visible { outline: 2px solid var(--ink-stamp); outline-offset: 3px; }

.bio-letter__page {
  position: relative;
  /* Ceiling dropped 36px -> 28px: this content now runs long enough
     (career rows, NOTES, Total, Card #, Auth code, the sign-off) that a
     real 13" laptop's browser chrome can eat enough of the viewport to
     push .bio-letter__sheet's max-height below the letter's own
     content height, which is what a scrollbar on a "big enough" screen
     actually meant. 8px back on every side, twice over (left+right),
     buys a little text width too, which thins the wrap on the longer
     bio lines for free. */
  padding: clamp(20px, 3.4vw, 28px);
  /* Head margin always clears the ✕ pocket (10px inset + 28px chip),
     so the first line never runs under it at narrow paddings. */
  padding-top: max(42px, clamp(20px, 3.4vw, 28px));
}

@media (max-width: 767px) {
  .bio-letter__page { padding-top: 62px; }
}

.blf__face--front,
.bio-letter__sheet {
  box-shadow:
    0 2px 5px -2px transparent,
    0 10px 22px -14px transparent;
  transition: box-shadow 460ms var(--ease-out-quart);
}

.bio-letter.is-f2 .blf__face--front,
.bio-letter.is-f2 .bio-letter__sheet {
  box-shadow:
    0 2px 5px -2px color-mix(in oklab, var(--ink-1) 10%, transparent),
    0 10px 22px -14px color-mix(in oklab, var(--ink-1) 26%, transparent);
}

@media (prefers-reduced-motion: reduce) {
  .bio-letter__box { transform: none; transition: opacity 200ms var(--ease-out-quart); }
  .bio-letter__scrim { transition: opacity 200ms var(--ease-out-quart); }
  .blf--2,
  .blf--3,
  .blf__shade { transition: none; animation: none; }
  .bio-letter__sheet { transition: none; }
}

html[data-theme="dark"] .bio-letter.is-f2 .blf__face--front,
html[data-theme="dark"] .bio-letter.is-f2 .bio-letter__sheet {
  box-shadow:
    0 2px 5px -2px rgba(0, 0, 0, 0.4),
    0 10px 22px -14px rgba(0, 0, 0, 0.62);
}

html[data-theme="dark"] .bio-letter.is-settling:not(.is-swap-done) .bio-letter__sheet {
  box-shadow: none;
}

html[data-theme="eink"] .bio-letter.is-f2 .blf__face--front,
html[data-theme="eink"] .blf__face--front {
  box-shadow: none;
}

html[data-theme="eink"] .bio-letter.is-f2 .bio-letter__sheet,
html[data-theme="eink"] .bio-letter__sheet {
  box-shadow: none;
}

html[data-theme="eink"] .bio-letter__sheet {
  border: 1px solid color-mix(in oklab, var(--ink-1) 18%, transparent);
}

.overview-career {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.overview-career__section + .overview-career__section {
  margin-top: 16px;
}

.overview-career__section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.overview-about {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
}

.overview-about p + p {
  margin-top: 6px;
}

.overview-career__section .resume-row:first-child {
  padding-top: 0;
}

.overview-career__section .resume-row:last-child {
  padding-bottom: 0;
}

.cat-mascot {
  position: absolute;
  left: 0;
  width: 64px;
  height: 64px;
  background-image: url('../images/Cat Sprite Sheet.png');
  background-size: 512px 640px; /* 256×320 at 2× */
  background-repeat: no-repeat;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  opacity: 1;
  pointer-events: auto;
  cursor: pointer;
  z-index: 105;
  transform-origin: center bottom;
  /* Clip faint artifact row at top of sprite frames */
  clip-path: inset(6px 0 0 0);
}

.food-bowl {
  position: absolute;
  bottom: 0;
  left: 0;           /* JS sets exact left */
  pointer-events: none;
  z-index: 106;      /* above cat (105) */
  transform-origin: bottom center;
  transform: scale(0.5);
  opacity: 0;
  transition: transform 340ms cubic-bezier(0.34, 1.56, 0.64, 1),
              opacity   220ms var(--ease-out-quart);
}

.food-bowl.is-visible {
  transform: scale(1);
  opacity: 1;
}

.food-bowl__img {
  display: block;
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.cat-speech {
  position: absolute;
  bottom: 58px;       /* closer to cat's head */
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  background: var(--ink-1);
  color: var(--ink-inv);
  padding: 4px 8px;
  border-radius: 0;
  pointer-events: none;
  z-index: 106;
  opacity: 0;
  transform: translateX(-50%) translateY(5px);
  transition: opacity 200ms var(--ease-out-quart), transform 200ms var(--ease-out-quart);
}

.cat-speech::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid var(--ink-1);
}

.cat-speech.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

html[data-theme="dark"] .overview-fade {
  background: linear-gradient(to bottom, rgba(28, 28, 28, 0), #1c1c1c);
}

/* ── The cat's lab floor (cat.html) ──
   On the homepage she walked the bio card's top edge in page coordinates;
   in the lab she has a floor of her own, a hairline she stands on. Her
   sprite, bowl and bubble sit on it, measured from it by js/cat.js. */
.cat-floor {
  position: relative;
  width: min(640px, 100%);
  height: 96px;
  border-bottom: 1px solid color-mix(in oklab, var(--ink-1) 11%, transparent);
}
.cat-floor .cat-mascot { top: auto; bottom: 0; }
.cat-floor .food-bowl { bottom: 0; }
.cat-floor .cat-speech { bottom: 58px; top: auto; }
