/* The other pages are the same cards as on the desk, opened full length. The office stays behind them,
   framed on the thing the card belongs to; the × (or the room itself) takes you back to it. */

body.page { background: oklch(96.4% 0.013 80); min-height: 100svh; padding-bottom: calc(var(--dock-h) + 40px); }
body.page .site-head { position: fixed; inset: 0 0 auto 0; pointer-events: none; }
body.page .site-head > * { pointer-events: auto; }

.backdrop { position: fixed; inset: 0; z-index: 0; display: block; cursor: pointer; }
.backdrop img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; }
.backdrop::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.22; mix-blend-mode: multiply; background-image: var(--grain); }

main.sheets { position: relative; z-index: 1; pointer-events: none; padding: calc(var(--head) + 8px) var(--gutter) 0; }
.sheet {
  pointer-events: auto; width: min(680px, 100%); padding: 22px clamp(20px, 3vw, 34px) 30px;
  view-transition-name: held; animation: sheet-in 420ms var(--ease-out) backwards;
}
@keyframes sheet-in { from { opacity: 0; transform: translateY(-14px); } }
.sheet > * + * { margin-top: 18px; }
.sheet h1 { font-size: clamp(2.1rem, 1.3rem + 2.4vw, 3.4rem); letter-spacing: -0.04em; max-width: 14ch; }
.sheet .lede { font-size: var(--step-1); line-height: 1.4; color: var(--ink-2); max-width: 34ch; }
.sheet-foot { display: flex; flex-wrap: wrap; gap: 6px 18px; padding-top: 16px; border-top: 1px solid var(--rule); font-size: var(--step--1); color: var(--ink-3); }
.sheet-foot a { color: var(--ink); font-weight: 700; text-decoration: none; }
.sheet-foot a:hover { text-decoration: underline; text-decoration-color: var(--amber); }
.sheet-jh .sheet-foot { border-color: var(--jh-hair); color: var(--jh-muted); }
.sheet-jh .sheet-foot a { color: var(--jh-fg); }

@media (min-width: 861px) {
  /* like the cards on the desk: the card scrolls inside itself, the room and the dock stay put */
  .sheet { max-height: calc(100svh - var(--head) - 104px); overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--ink-3) transparent; }
  .sheet-jh { scrollbar-color: var(--jh-dim) transparent; }
  body.page { padding-bottom: 0; }
}
@media (max-width: 860px) {
  /* the room fills the top of the screen; the card comes up over it and scrolls like a sheet */
  .backdrop img { object-position: 50% 0; }
  main.sheets { padding: 40svh 0 0; }
  .sheet { width: 100%; border-width: var(--rule-w) 0 0; box-shadow: 0 -4px 0 var(--ink); padding-bottom: 40px; min-height: 60svh; }
  .sheet-jh { border-radius: 18px 18px 0 0; border-width: 6px 0 0; box-shadow: 0 calc(-1 * var(--rule-w)) 0 var(--ink); }
}

/* ---------- work: the pinboard, five things and a free sixth ---------- */
.cases { list-style: none; margin: 26px 0 0; padding: 0; counter-reset: c; }
.case { padding: 28px 0; border-top: 1px solid var(--rule); scroll-margin-top: calc(var(--head) + 16px); }
.case-no { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 0.9375rem; }
.case-no i {
  display: inline-grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; font-style: normal; font-size: 0.875rem;
  background: var(--amber); box-shadow: 0 0 0 2px var(--ink);
}
.case-shot { display: block; margin-top: 14px; border: var(--rule-w) solid var(--ink); box-shadow: 4px 4px 0 var(--ink); transition: translate 200ms var(--ease-out), box-shadow 200ms var(--ease-out); }
.case-shot:hover { translate: -2px -2px; box-shadow: 6px 6px 0 var(--ink); }
.case-shot img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: top; }
.case h2 { margin-top: 18px; max-width: 22ch; }
.case:target .case-no i { animation: found 900ms var(--ease-out) 2; }
@keyframes found { 50% { transform: scale(1.3); } }
.ledger { margin: 16px 0 0; padding: 0; border-top: 1px solid var(--rule); }
.ledger div { display: grid; grid-template-columns: 8rem 1fr; gap: 2px 14px; padding: 8px 0; border-bottom: 1px solid var(--rule); font-size: var(--step--1); }
.ledger dt { font-weight: 700; }
.ledger dd { margin: 0; color: var(--ink-2); }
@media (max-width: 480px) { .ledger div { grid-template-columns: 1fr; } }
.all-work { margin-top: 28px !important; padding-top: 26px; border-top: 1px solid var(--rule); scroll-margin-top: calc(var(--head) + 16px); }
.all-work h2 { font-size: var(--step-2); }
.six {
  display: grid; grid-template-columns: auto 1fr; gap: 6px 22px; align-items: center;
  margin-top: 28px !important; padding: 22px; border: 3px dashed var(--amber); background: oklch(78.5% 0.165 67 / 0.08);
}
.six > b { grid-row: span 3; font-size: clamp(4rem, 2.6rem + 4vw, 6.5rem); line-height: 0.8; letter-spacing: -0.06em; color: oklch(30% 0.03 50 / 0.3); }
.six h2 { font-size: var(--step-2); }
.six .actions { margin-top: 8px !important; }
@media (max-width: 480px) { .six { grid-template-columns: 1fr; } .six > b { grid-row: auto; } }

/* ---------- speaking: the dark card, opened all the way ---------- */
.sheet-jh h1 { font-size: clamp(2.2rem, 1.3rem + 2.4vw, 3.5rem); max-width: 15ch; }
.sheet-jh .clip { margin-top: 22px; }
.talks { list-style: none; margin: 30px 0 0; padding: 0; }
.talk { display: grid; grid-template-columns: 1fr 34%; gap: 18px; align-items: center; padding: 22px 0; border-top: 1px solid var(--jh-hair); }
.talk h2 { font-size: clamp(1.5rem, 1rem + 1.6vw, 2.1rem); margin-top: 10px; }
.talk p { margin-top: 10px; max-width: 34ch; }
.talk img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; }
@media (max-width: 480px) { .talk { grid-template-columns: 1fr; } .talk img { order: -1; } }

/* ---------- about: the card on the wall, turned over ---------- */
.sheet .story p { font-size: 1.125rem; line-height: 1.55; }
.sheet .story p + p { margin-top: 14px; }
.snaps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; align-items: start; margin-top: 26px !important; }
.snaps figure { margin: 0; padding: 6% 6% 0; background: var(--paper); box-shadow: 0 1px 0 oklch(30% 0.03 50 / 0.25), 3px 5px 0 oklch(30% 0.03 50 / 0.18); rotate: var(--r, 0deg); }
.snaps img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.snaps figcaption { padding: 0.6em 0 0.7em; font-weight: 700; font-size: 0.8125rem; line-height: 1.2; }

/* ---------- contact: the empty spot ---------- */
.sent-note { display: none; padding: 12px 14px; border: var(--rule-w) solid var(--ink); background: var(--amber-soft); color: var(--ink) !important; }
.sent-note:target { display: block; }
.portal-exits .big-mail { margin-top: 4px; }
.sheet .portal { margin-top: 22px; }
.big-mail { display: inline-block; font-size: var(--step-2); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.big-mail:hover { text-decoration: underline; text-decoration-color: var(--amber); text-decoration-thickness: 3px; }

/* ---------- 404: a polaroid to draw on ---------- */
.doodle { position: relative; width: min(360px, 100%); margin: 26px auto 0 !important; padding: 5% 5% 16%; background: var(--paper); rotate: -1.5deg; box-shadow: 0 1px 0 oklch(30% 0.03 50 / 0.25), 5px 7px 0 oklch(30% 0.03 50 / 0.18); }
.doodle::before { content: ""; position: absolute; left: 50%; top: -7px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 2px var(--ink); z-index: 1; }
.doodle-paper { position: relative; aspect-ratio: 1; background: var(--ink); touch-action: none; cursor: crosshair; }
.doodle canvas { width: 100%; height: 100%; }
.doodle-hint { position: absolute; left: 50%; top: 50%; translate: -50% -50%; display: inline-flex; align-items: center; gap: 10px; color: var(--paper); font-weight: 700; pointer-events: none; white-space: nowrap; }
.doodle figcaption { padding: 0.8em 0 0.9em; font-weight: 700; text-align: center; }

@media (prefers-reduced-motion: reduce) { .sheet { animation: none; } }
