/* Samahith Thellakal — the portfolio.
   Home is paper and olive: the olive is lifted straight from the Snoopy
   gif on my GitHub, so the site starts where the profile does. Each
   chapter then gets its own room: bio is dark cytoplasm with pink cells,
   hardware is the bright CAD bench HighTide was drawn on (team orange
   and teal), software is a night sea of code. Anybody is the display
   face because its width axis can breathe; JetBrains Mono labels. */

:root {
  --paper: #f3f1ea;
  --paper-2: #e9e6dc;
  --ink: #17171a;
  --ink-2: #55544f;
  --ink-3: #8c8a82;
  --olive: #5a613a;
  --olive-2: #7d8552;
  --bio: #ff5c93;
  --bio-bg: #16080f;
  --hw: #c8502b;
  --teal: #2e8a8f;
  --sw: #6d8bff;
  --sw-bg: #07090f;
  --display: 'Anybody', 'Arial Narrow', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Roboto, sans-serif;
  --spring: cubic-bezier(0.32, 0.72, 0, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--paper); }
body { margin: 0; color: var(--ink); font: 400 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
.mono { font-family: var(--mono); }
:focus-visible { outline: 2px solid var(--olive); outline-offset: 3px; border-radius: 6px; }
canvas { display: block; }

/* ── nav ─────────────────────────────────────────── */
.nav {
  position: fixed; z-index: 20; top: 14px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 22px;
  padding: 7px 8px 7px 18px; border-radius: 999px;
  background: rgba(243, 241, 234, 0.72);
  backdrop-filter: blur(16px) saturate(1.6); -webkit-backdrop-filter: blur(16px) saturate(1.6);
  box-shadow: 0 0 0 1px rgba(23, 23, 26, 0.08), 0 8px 30px rgba(0, 0, 0, 0.08);
  font-size: 12px; letter-spacing: 0.04em;
  transition: background 300ms ease, color 300ms ease, box-shadow 300ms ease;
}
.nav.dark { background: rgba(20, 20, 24, 0.6); color: #eceae3; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 8px 30px rgba(0, 0, 0, 0.3); }
.nav-home { font-weight: 500; }
.nav-links { display: flex; gap: 2px; }
.nav-links a { display: flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; transition: background 160ms ease; }
.nav-links a:hover, .nav-links a.on { background: rgba(127, 127, 127, 0.14); }
.nav-links i { width: 7px; height: 7px; border-radius: 50%; }
[data-c='bio'] i, .door[data-c='bio'] { --c: var(--bio); }
[data-c='hw'] i, .door[data-c='hw'] { --c: var(--hw); }
[data-c='sw'] i, .door[data-c='sw'] { --c: var(--sw); }
.nav-links i { background: var(--c); }

/* ── hero ────────────────────────────────────────── */
.hero {
  min-height: 100vh; padding: 110px 6vw 48px;
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  grid-template-areas: 'text term' 'doors doors';
  gap: 40px 5vw; align-items: center;
}
.hero-text { grid-area: text; }
.kicker { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 10px; }
h1 {
  font-family: var(--display); font-weight: 800; font-size: clamp(52px, 8.2vw, 132px);
  line-height: 0.86; letter-spacing: -0.02em; margin: 0; cursor: default;
}
h1 .line { display: block; white-space: nowrap; }
h1 .ch { display: inline-block; font-variation-settings: 'wdth' var(--w, 100); transition: font-variation-settings 380ms var(--spring), color 300ms ease; }
.about { font-size: 18px; color: var(--ink-2); max-width: 42ch; margin: 26px 0 26px; text-wrap: pretty; }
.links { display: flex; flex-wrap: wrap; gap: 10px; }
.pill {
  display: inline-flex; align-items: center; gap: 9px; padding: 11px 18px; border-radius: 999px;
  background: var(--ink); color: var(--paper); font: 500 13px var(--mono); letter-spacing: 0.02em;
  transition: transform 200ms var(--spring), background 200ms ease;
}
.pill svg { width: 15px; height: 15px; }
.pill:hover { background: var(--olive); transform: translateY(-2px); }
.pill:active { transform: scale(0.97); }
.pill.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.pill.ghost:hover { background: var(--ink); color: var(--paper); }

.term {
  grid-area: term; background: var(--olive); border-radius: 18px; overflow: hidden;
  box-shadow: 0 30px 70px -20px rgba(58, 64, 30, 0.55), 0 0 0 1px rgba(0, 0, 0, 0.08);
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 500ms var(--spring); will-change: transform;
}
.term-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; background: rgba(0, 0, 0, 0.16); color: rgba(243, 241, 234, 0.7); font-size: 11.5px; }
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: rgba(243, 241, 234, 0.35); }
.term-bar span { margin-left: 8px; }
.term img { display: block; width: 100%; height: auto; image-rendering: pixelated; }
.term-foot { display: flex; justify-content: space-between; padding: 10px 16px 13px; color: #eceae3; font-size: 13px; }
.caret { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.doors { grid-area: doors; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.door {
  position: relative; overflow: hidden; padding: 22px 22px 24px; border-radius: 16px;
  background: var(--paper-2); display: grid; gap: 6px;
  transition: transform 260ms var(--spring), color 260ms ease;
}
.door::before { content: ''; position: absolute; inset: 0; background: var(--c); transform: translateY(101%); transition: transform 420ms var(--spring); }
.door > * { position: relative; }
.door span { font-size: 12px; color: var(--ink-3); transition: color 260ms ease; }
.door b { font-family: var(--display); font-size: 40px; font-weight: 750; line-height: 1; font-variation-settings: 'wdth' 100; transition: font-variation-settings 420ms var(--spring); }
.door em { font-style: normal; color: var(--ink-2); font-size: 14px; transition: color 260ms ease; }
.door:hover { color: #fff; transform: translateY(-4px); }
.door:hover::before { transform: none; }
.door:hover b { font-variation-settings: 'wdth' 150; }
.door:hover span, .door:hover em { color: rgba(255, 255, 255, 0.82); }

/* ── chapters ────────────────────────────────────── */
.chapter { position: relative; }
.chapter h2 { font-family: var(--display); font-weight: 800; font-size: clamp(46px, 7.5vw, 104px); line-height: 0.9; letter-spacing: -0.02em; margin: 0 0 20px; }
.blurb { max-width: 40ch; font-size: 17px; margin: 0 0 18px; text-wrap: pretty; }
.hint { font-size: 12px; letter-spacing: 0.06em; }

.bio { background: var(--bio-bg); color: #f5e6ec; min-height: 100vh; }
.bio #cells, .sw #code { position: absolute; inset: 0; width: 100%; height: 100%; }
.bio .chapter-head, .sw .chapter-head { position: relative; z-index: 1; padding: 22vh 6vw 0; pointer-events: none; }
.bio .blurb { color: rgba(245, 230, 236, 0.74); }
.bio .kicker, .bio .hint { color: var(--bio); }
.bio h2 span { color: var(--bio); }

.shelf { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; padding: 12vh 6vw 10vh; }
.shelf:empty::before {
  content: attr(data-empty); display: block; padding: 22px; border-radius: 14px;
  font: 500 12.5px var(--mono); letter-spacing: 0.03em; opacity: 0.6;
  box-shadow: inset 0 0 0 1.5px currentColor; box-shadow: inset 0 0 0 1px rgba(127, 127, 127, 0.45);
  max-width: 360px;
}
.bio .shelf { padding-top: 34vh; }

/* hardware: a tall scroll track with a pinned bench */
.hw { background: var(--paper); }
.build { height: 700vh; }
.build-stage { position: sticky; top: 0; height: 100vh; overflow: hidden; }
#robot { position: absolute; inset: 0; width: 100%; height: 100%; }
.build-copy { position: absolute; left: 6vw; top: 18vh; max-width: 360px; pointer-events: none; }
.hw .kicker { color: var(--hw); }
.hw h2 { color: var(--ink); }
.hw .blurb { color: var(--ink-2); }
.stage-card {
  display: grid; gap: 4px; margin-top: 26px; padding: 16px 18px 18px; border-radius: 14px;
  background: rgba(255, 255, 255, 0.72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 0 0 1px rgba(23, 23, 26, 0.08), 0 10px 30px rgba(0, 0, 0, 0.06);
  pointer-events: auto;
}
.stage-n { font-size: 11px; color: var(--teal); letter-spacing: 0.1em; }
.stage-card b { font-family: var(--display); font-size: 30px; font-weight: 750; line-height: 1.05; }
.stage-card em { font-style: normal; color: var(--ink-2); font-size: 14px; }
.stage-card.pop { animation: pop 420ms var(--spring); }
@keyframes pop { from { transform: translateY(6px) scale(0.98); opacity: 0.4; } }
.progress { position: absolute; left: 6vw; right: 6vw; bottom: 92px; height: 2px; background: rgba(23, 23, 26, 0.08); border-radius: 2px; }
.progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--teal), var(--hw)); border-radius: 2px; }
.subnav {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  display: flex; gap: 2px; padding: 5px; border-radius: 999px; background: #fff;
  box-shadow: 0 0 0 1px rgba(23, 23, 26, 0.1), 0 10px 30px rgba(0, 0, 0, 0.08);
  max-width: calc(100vw - 24px); overflow-x: auto; scrollbar-width: none;
}
.subnav button {
  font: 500 11.5px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; white-space: nowrap;
  padding: 10px 16px; border: 0; border-radius: 999px; background: none; color: var(--ink-2); cursor: pointer;
  transition: background 200ms ease, color 200ms ease;
}
.subnav button:hover { color: var(--ink); }
.subnav button.on { background: var(--teal); color: #fff; }
.hw .shelf { color: var(--ink); padding-top: 4vh; }

/* software */
.sw { background: var(--sw-bg); color: #e6e9f5; min-height: 100vh; }
.sw .kicker { color: var(--sw); }
.sw .blurb { color: rgba(230, 233, 245, 0.7); }
.sw .shelf { padding-top: 30vh; }
.card {
  display: grid; gap: 8px; padding: 22px; border-radius: 16px; min-height: 190px; align-content: start;
  background: rgba(20, 24, 40, 0.62); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.09);
  transition: transform 260ms var(--spring), box-shadow 260ms ease;
}
a.card:hover { transform: translateY(-4px); box-shadow: inset 0 0 0 1px var(--sw), 0 20px 50px -20px rgba(109, 139, 255, 0.6); }
.card-k { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--sw); }
.card b { font-family: var(--display); font-size: 30px; font-weight: 750; line-height: 1; }
.card em { font-style: normal; font-size: 14px; color: rgba(230, 233, 245, 0.66); }
.card-go { margin-top: auto; font: 500 12px var(--mono); color: var(--sw); }
.card.empty { background: transparent; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14); opacity: 0.7; }

.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 26px 6vw 30px; background: var(--sw-bg); color: rgba(230, 233, 245, 0.45); font-size: 12px; }
.foot a:hover { color: #fff; }

/* ── small screens ───────────────────────────────── */
@media (max-width: 860px) {
  .nav { gap: 8px; padding-left: 14px; }
  .nav-links a { padding: 6px 8px; }
  .hero { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'text' 'term' 'doors'; padding-top: 96px; }
  .doors { grid-template-columns: 1fr; }
  .build-copy { top: 90px; left: 20px; right: 20px; max-width: none; }
  .build-copy .blurb { display: none; }
  .stage-card { margin-top: 12px; }
  .progress { bottom: 84px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .term, .door, .door::before, .pill, h1 .ch { transition: none; }
  .caret { animation: none; }
}

/* the name, drawn in Snoopy's ASCII */
h1#name { position: relative; display: inline-block; }
h1 .ch.glyph { text-align: center; color: var(--olive); font-family: var(--mono); font-variation-settings: normal; font-weight: 500; }
.swash { position: absolute; left: 0; right: 0; bottom: -0.16em; width: 100%; height: 0.22em; overflow: visible; pointer-events: none; }
.swash path { fill: none; stroke: var(--olive); stroke-width: 7; stroke-linecap: round; stroke-dasharray: 700; stroke-dashoffset: 700; animation: draw 1.1s var(--spring) 0.9s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.spark { position: absolute; right: -0.34em; top: -0.08em; width: 0.3em; height: 0.3em; fill: #c8321e; opacity: 0; transform: scale(0.3) rotate(-30deg); animation: spark-in 600ms var(--spring) 1.6s forwards, twinkle 3.2s ease-in-out 2.4s infinite; }
@keyframes spark-in { to { opacity: 1; transform: scale(1) rotate(0deg); } }
@keyframes twinkle { 50% { transform: scale(0.72) rotate(45deg); } }
.about b { font-weight: 650; color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .swash path { animation: none; stroke-dashoffset: 0; } .spark { animation: none; opacity: 1; transform: none; } }

/* ── intro: the terminal types a quote, then flies into the Snoopy card ── */
#intro {
  position: fixed; inset: 0; z-index: 100; background: var(--olive); color: #eceae3;
  display: flex; flex-direction: column; cursor: pointer;
  transition: transform 850ms var(--spring), border-radius 850ms var(--spring);
}
#intro .i-bar { display: flex; align-items: center; gap: 8px; padding: 16px 22px; background: rgba(0, 0, 0, 0.16); font: 13px var(--mono); color: rgba(243, 241, 234, 0.7); transition: opacity 300ms ease; }
#intro .i-bar i { width: 12px; height: 12px; border-radius: 50%; background: rgba(243, 241, 234, 0.35); }
#intro .i-bar span { margin-left: 8px; }
#intro .i-body { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 0 12vw; transition: opacity 250ms ease; }
#intro .i-q { font: 500 clamp(22px, 3.2vw, 44px)/1.35 var(--mono); margin: 0; max-width: 32ch; }
#intro .i-pr { color: rgba(243, 241, 234, 0.45); }
#intro .i-caret { animation: blink 1s steps(1) infinite; }
#intro .i-by { font: 15px var(--mono); color: rgba(243, 241, 234, 0.6); margin: 22px 0 0; opacity: 0; transform: translateY(6px); transition: opacity 500ms ease, transform 500ms var(--spring); }
#intro .i-by.on { opacity: 1; transform: none; }
#intro .i-skip { position: absolute; right: 22px; bottom: 20px; font: 12px var(--mono); color: rgba(243, 241, 234, 0.5); background: none; border: 0; cursor: pointer; }
#intro.leaving .i-body, #intro.leaving .i-skip { opacity: 0; }
html.intro-on body { overflow: hidden; }
html.intro-on .hero-text, html.intro-on .doors, html.intro-on .nav, html.intro-on .also { opacity: 0; }
.hero-text, .doors, .nav { transition: opacity 600ms ease 250ms; }
#intro .i-sound { position: absolute; left: 22px; bottom: 20px; font: 12px var(--mono); color: rgba(243, 241, 234, 0.5); animation: pulse-soft 2.4s ease-in-out infinite; }
@keyframes pulse-soft { 50% { opacity: 0.45; } }
#intro.leaving .i-sound { opacity: 0; }

/* woodstock follows the cursor over the Snoopy card; the card replays the intro */
.term { position: relative; cursor: pointer; }
.woodstock {
  position: absolute; left: 0; top: 0; pointer-events: none; z-index: 2;
  opacity: 0; transition: opacity 250ms ease; will-change: transform; transform-origin: 50% 50%;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.25));
}
.woodstock.on { opacity: 1; }
.term-hint { margin-left: auto; margin-right: 12px; font-size: 11px; opacity: 0; transition: opacity 250ms ease; color: rgba(243, 241, 234, 0.6); }
.term:hover .term-hint { opacity: 1; }
.desc { margin: -6px 0 22px; max-width: 46ch; font-size: 16px; line-height: 1.55; color: #45443f; }
.pill.resume { background: var(--olive); }
.pill.resume:hover { background: var(--ink); }

/* the name, in Happy Monkey */
h1#name { font-family: 'Happy Monkey', var(--display); font-weight: 400; letter-spacing: 0; line-height: 0.95; }
h1#name .ch { font-variation-settings: normal; }
.desc .mail { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--olive); text-underline-offset: 3px; white-space: nowrap; }
.desc .mail:hover { color: var(--olive); }

/* also: everything that isn't a room */
.also { padding: 24px 6vw 6vh; }
.also h2 { margin: 0 0 22px; font: 800 clamp(32px, 4vw, 48px)/1 var(--display); font-stretch: 120%; letter-spacing: -0.02em; }
.also-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 36px; }
.also-k { margin: 0 0 12px; padding-bottom: 8px; font-size: 12px; letter-spacing: 0.06em; color: #6b6a63; border-bottom: 1px solid rgba(23, 23, 26, 0.12); }
.also ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.also li { font-size: 15px; line-height: 1.5; color: #45443f; }
.also li b { color: var(--ink); font-weight: 650; }
@media (max-width: 900px) { .also-grid { grid-template-columns: 1fr; } }

/* ════════ keycaps: every button is a key you press ════════
   The site opens by typing, so its controls are keys: a slightly rounded cap with a
   visible bottom edge that travels down when pressed. Options that are "on" stay
   latched down. Containers are trays, not capsules (tray radius = key radius + padding). */
:root { --key-r: 7px; --key-travel: 3px; }
.nav { border-radius: 14px; padding: 6px 6px 6px 16px; }
.nav-links { gap: 4px; }
.nav-links a { border-radius: var(--key-r); min-height: 32px; padding: 6px 12px; transition: background 150ms ease, transform 120ms cubic-bezier(0.32, 0.72, 0, 1), box-shadow 120ms ease; }
.nav-links a:hover { background: rgba(127, 127, 127, 0.1); }
.nav-links a.on { background: #fff; color: var(--ink); box-shadow: 0 0 0 1px rgba(23, 23, 26, 0.16), 0 1px 0 rgba(23, 23, 26, 0.22); transform: translateY(1px); }
.nav.dark .nav-links a.on { background: rgba(255, 255, 255, 0.16); color: inherit; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14), 0 1px 0 rgba(0, 0, 0, 0.5); }
.nav-links a:active { transform: translateY(2px); }

.pill {
  border-radius: var(--key-r); min-height: 44px; padding: 0 16px; background: #fbfaf6; color: var(--ink);
  border: 1px solid rgba(23, 23, 26, 0.22); box-shadow: 0 var(--key-travel) 0 #c9c5b8, inset 0 1px 0 #fff;
  transition: transform 120ms cubic-bezier(0.32, 0.72, 0, 1), box-shadow 120ms ease, background 150ms ease;
}
.pill:hover { background: #fff; transform: none; }
.pill:active { transform: translateY(var(--key-travel)); box-shadow: 0 0 0 #c9c5b8, inset 0 1px 0 #fff; }
.pill.resume { background: var(--olive); color: #fff; border-color: #3e4426; box-shadow: 0 var(--key-travel) 0 #3e4426, inset 0 1px 0 rgba(255, 255, 255, 0.18); }
.pill.resume:hover { background: #646b41; }
.pill.resume:active { box-shadow: 0 0 0 #3e4426, inset 0 1px 0 rgba(255, 255, 255, 0.18); }
.pill.ghost { background: transparent; box-shadow: none; }

.subnav { border-radius: 14px; gap: 6px; padding: 7px 7px 10px; }
.subnav button { font: 500 12.5px var(--mono); letter-spacing: 0; text-transform: none; border-radius: var(--key-r); min-height: 40px; padding: 0 14px;
  background: #fbfaf6; color: var(--ink-2); box-shadow: 0 0 0 1px rgba(23, 23, 26, 0.16), 0 var(--key-travel) 0 #d4d0c4;
  transition: transform 120ms cubic-bezier(0.32, 0.72, 0, 1), box-shadow 120ms ease, background 150ms ease, color 150ms ease; }
.subnav button:hover { color: var(--ink); background: #fff; }
.subnav button:active, .subnav button.on { transform: translateY(2px); }
.subnav button.on { background: var(--teal); color: #fff; box-shadow: 0 0 0 1px #1f6266, 0 1px 0 #1f6266; }
@media (prefers-reduced-motion: reduce) { .pill:active, .subnav button:active, .subnav button.on, .nav-links a.on, .nav-links a:active { transform: none; } }

/* wins under each door */
.door .wins { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; font-size: 14.5px; line-height: 1.4; color: var(--ink-2); transition: color 260ms ease; }
.door .wins li { padding-left: 14px; position: relative; }
.door .wins li::before { content: ''; position: absolute; left: 0; top: 0.58em; width: 6px; height: 6px; border-radius: 1px; background: var(--c); transition: background 260ms ease; }
.door .wins .wins-note { padding-left: 0; font-style: italic; color: var(--ink); }
.door .wins .wins-note::before { display: none; }
.door:hover .wins, .door:hover .wins .wins-note { color: rgba(255, 255, 255, 0.92); }
.door:hover .wins li::before { background: #fff; }
.door { justify-content: flex-start; align-content: start; } .door b { margin-top: 6px; }

/* a hand-drawn nudge toward the three rooms */
.hero { position: relative; }
.doors-note { position: absolute; grid-area: doors; align-self: start; justify-self: start; margin: -58px 0 0 calc(50% - 300px); display: flex; align-items: flex-start; gap: 4px; pointer-events: none;
  font: 400 22px/1 'Happy Monkey', var(--sans); color: var(--olive); transform: rotate(-3deg); }
.doors-note svg { width: 86px; height: 44px; margin-top: 4px; fill: none; stroke: var(--olive); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
html.intro-on .doors-note { opacity: 0; }
@media (max-width: 900px) { .doors-note { position: static; margin: 0 0 -6px 4px; font-size: 19px; } .doors-note svg { width: 64px; height: 34px; } }
/* polaroids above the name: faded until you hover. Drop photos in assets/polaroids/1.jpg, 2.jpg, 3.jpg */
.polaroids { position: relative; height: 150px; margin: 0 0 22px; }
.pol { position: absolute; top: 0; margin: 0; width: 118px; padding: 7px 7px 24px; background: #ebe8e0; border-radius: 2px;
  box-shadow: 0 1px 0 rgba(23, 23, 26, 0.08), 0 10px 22px -14px rgba(23, 23, 26, 0.45); opacity: 0.55; filter: saturate(0.25) sepia(0.25);
  transition: transform 320ms cubic-bezier(0.32, 0.72, 0, 1), opacity 250ms ease, filter 250ms ease, box-shadow 250ms ease; }
.pol::before { content: ''; display: block; aspect-ratio: 1; background: #1b1b1d; }
.pol img { position: absolute; left: 7px; top: 7px; width: calc(100% - 14px); aspect-ratio: 1; object-fit: cover; display: block; }
.pol.p1 { left: 0; transform: rotate(-9deg); }
.pol.p2 { left: 92px; top: 10px; transform: rotate(6deg); z-index: 1; }
.pol.p3 { left: 190px; top: 2px; transform: rotate(-3deg); }
.pol:hover { opacity: 1; filter: none; z-index: 3; transform: rotate(0deg) translateY(-6px) scale(1.06); box-shadow: 0 1px 0 rgba(23, 23, 26, 0.08), 0 22px 40px -16px rgba(23, 23, 26, 0.5); }
@media (max-width: 900px) { .polaroids { height: 120px; } .pol { width: 92px; padding: 5px 5px 18px; } .pol img { left: 5px; top: 5px; width: calc(100% - 10px); } .pol.p2 { left: 72px; } .pol.p3 { left: 148px; } }
@media (prefers-reduced-motion: reduce) { .pol { transition: opacity 200ms, filter 200ms; } .pol:hover { transform: none; } }

/* five polaroids in a loose row, none overlapping */
.polaroids { display: flex; gap: 26px; height: auto; align-items: flex-start; padding: 6px 4px 0; }
.pol, .pol.p1, .pol.p2, .pol.p3 { position: relative; left: auto; top: auto; flex: none; width: 112px; }
.pol img { left: 7px; top: 7px; }
.pol.p1 { transform: rotate(-6deg); }
.pol.p2 { transform: rotate(4deg) translateY(8px); }
.pol.p3 { transform: rotate(-2deg) translateY(2px); }
.pol.p4 { transform: rotate(5deg) translateY(10px); }
.pol.p5 { transform: rotate(-4deg) translateY(3px); }
.pol:hover { transform: rotate(0deg) translateY(-6px) scale(1.06); }
@media (max-width: 900px) {
  .polaroids { gap: 14px; overflow-x: auto; padding: 6px 4px 14px; scrollbar-width: none; }
  .pol, .pol.p1, .pol.p2, .pol.p3 { width: 88px; }
}
/* the photos are faded in the files themselves; the frames just sit at rest and lift on hover */
.pol { opacity: 0.92; filter: none; }
.pol::before { background: #efe9dd; }
.pol:hover { opacity: 1; filter: none; }
.doors-note { margin-left: 4px; margin-top: -54px; font-size: 21px; }
.hero { row-gap: 66px; } .doors-note { margin-top: -50px; }

/* ── time capsule: a sealed letter with a three-year countdown ── */
.capsule { padding: 0 6vw 12vh; }
.cap-card { display: flex; align-items: center; gap: clamp(20px, 4vw, 48px); max-width: 860px; padding: 26px clamp(20px, 3vw, 34px);
  background: #fbfaf6; border: 1px solid rgba(23, 23, 26, 0.14); border-radius: 14px; box-shadow: 0 4px 0 #d9d5c8; }
.cap-env { flex: none; width: clamp(110px, 14vw, 160px); transform: rotate(-4deg); }
.cap-env rect, .cap-env path { fill: var(--paper-2); stroke: var(--ink-2); stroke-width: 1.6; stroke-linejoin: round; }
.cap-env path { fill: none; }
.cap-env .cap-seal { fill: var(--olive); stroke: #3e4426; stroke-width: 1.5; }
.cap-env text { font: 700 15px var(--display); fill: #f3f1ea; }
.cap-k { margin: 0 0 6px; font-size: 12px; letter-spacing: 0.06em; color: #6b6a63; }
.cap-k span { opacity: 0.5; }
.cap-copy h2 { margin: 0 0 14px; font: 800 clamp(24px, 3vw, 34px)/1.05 var(--display); font-stretch: 115%; letter-spacing: -0.02em; }
.cap-count { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.cap-count span { display: grid; justify-items: center; min-width: 64px; padding: 8px 10px 7px; border-radius: var(--key-r, 7px); background: var(--ink); color: #9a9888; font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; }
.cap-count b { font: 500 24px/1.1 var(--mono); color: #f3f1ea; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.cap-foot { margin: 0; font-size: 12.5px; color: var(--ink-3); }
html.intro-on .capsule { opacity: 0; }
@media (max-width: 600px) { .cap-card { flex-direction: column; align-items: flex-start; } .cap-count span { min-width: 56px; } }

/* ── sidequest recs: a sticky note on home opens a board of visitor notes ── */
.sq-open { display: inline-grid; justify-items: start; gap: 2px; margin-top: 26px; padding: 12px 18px 14px; border: 0; cursor: pointer;
  background: #e6d488; color: #3e4426; font: 400 15px/1.15 'Happy Monkey', var(--sans); text-align: left;
  transform: rotate(-2.5deg); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06), 0 8px 16px -8px rgba(62, 68, 38, 0.45);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%);
  transition: transform 220ms var(--spring); }
.sq-open b { font-weight: 400; font-size: 19px; color: var(--ink); }
.sq-open:hover { transform: rotate(-1deg) translateY(-2px); }
.sq-open:active { transform: rotate(-1deg) translateY(1px) scale(0.98); }
html.intro-on .sq-open { opacity: 0; }

.sq { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(23, 23, 26, 0); transition: background 220ms ease; }
.sq[hidden], .sq-open[hidden] { display: none; }
.sq.in { background: rgba(23, 23, 26, 0.42); }
html.sq-on body { overflow: hidden; }
.sq-panel { position: relative; width: min(920px, 100%); max-height: min(88vh, 900px); overflow-y: auto; overscroll-behavior: contain; padding: 26px clamp(18px, 3vw, 34px) 32px;
  background: var(--paper); border-radius: 16px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.5);
  opacity: 0; transform: translateY(16px) scale(0.98); transition: opacity 220ms ease, transform 320ms var(--spring); }
.sq.in .sq-panel { opacity: 1; transform: none; }
.sq-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.sq-k { margin: 0 0 6px; font-size: 12px; letter-spacing: 0.06em; color: #6b6a63; }
.sq-head h2 { margin: 0 0 6px; font: 800 clamp(26px, 3.4vw, 38px)/1.05 var(--display); font-stretch: 115%; letter-spacing: -0.02em; }
.sq-sub { margin: 0; max-width: 54ch; color: #45443f; font-size: 15px; }
.sq-close { position: absolute; top: 18px; right: 18px; z-index: 1; flex: none; width: 40px; height: 40px; border-radius: var(--key-r); border: 1px solid rgba(23, 23, 26, 0.18); background: #fbfaf6; cursor: pointer; font-size: 14px;
  box-shadow: 0 var(--key-travel) 0 #c9c5b8; transition: transform 120ms var(--spring), box-shadow 120ms ease; }
.sq-close:active { transform: translateY(var(--key-travel)); box-shadow: none; }

.sq-form { display: grid; gap: 14px; margin: 22px 0 26px; padding: 18px; background: #fbfaf6; border: 1px solid rgba(23, 23, 26, 0.12); border-radius: 12px; }
.sq-kind { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; border: 0; }
.sq-kind legend { padding: 0; margin-bottom: 8px; }
.sq-kind label { position: relative; }
.sq-kind input { position: absolute; opacity: 0; }
.sq-kind span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: var(--key-r); cursor: pointer; font: 500 13px var(--mono);
  background: #fff; color: var(--ink-2); box-shadow: 0 0 0 1px rgba(23, 23, 26, 0.16), 0 var(--key-travel) 0 #d4d0c4; transition: transform 120ms var(--spring), box-shadow 120ms ease; }
.sq-kind input:checked + span { color: var(--ink); background: #e6d488; transform: translateY(var(--key-travel)); box-shadow: 0 0 0 1px rgba(62, 68, 38, 0.35); }
.sq-kind input[value=todo]:checked + span { background: #dfe3c8; }
.sq-kind input:focus-visible + span { outline: 2px solid var(--olive); outline-offset: 3px; }
.sq-field { display: grid; gap: 0; flex: 1; }
.sq-field .sq-k { display: flex; justify-content: space-between; }
.sq-left { font-style: normal; color: var(--ink-3); }
.sq-field textarea, .sq-field input { width: 100%; padding: 10px 12px; border-radius: 9px; border: 1px solid rgba(23, 23, 26, 0.2); background: #fff; color: var(--ink); font: 400 16px/1.45 var(--sans); resize: vertical; }
.sq-field textarea:focus, .sq-field input:focus { outline: 2px solid var(--olive); outline-offset: 1px; }
.sq-row { display: flex; align-items: flex-end; gap: 12px; }
.sq-row .pill { flex: none; cursor: pointer; font: 500 14px var(--mono); }
.sq-row .pill:disabled { opacity: 0.6; cursor: progress; }
.sq-hp { position: absolute; left: -9999px; width: 1px; height: 1px; }
.sq-status { margin: 0; min-height: 1.2em; font-size: 14px; color: var(--olive); }

.sq-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; }
.sq-note { margin: 0; padding: 14px 16px 16px; background: #e6d488; transform: rotate(var(--tilt, 0deg)); box-shadow: 0 8px 16px -10px rgba(62, 68, 38, 0.55);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%); }
.sq-note.todo { background: #dfe3c8; }
.sq-tag { display: block; margin-bottom: 8px; font-size: 10.5px; letter-spacing: 0.04em; color: #5a613a; }
.sq-note p { margin: 0 0 10px; font: 400 17px/1.3 'Happy Monkey', var(--sans); color: var(--ink); overflow-wrap: anywhere; }
.sq-note figcaption { font-size: 13px; color: #55544f; }
.sq-empty { grid-column: 1 / -1; margin: 6px 0; color: var(--ink-3); font: 400 14px var(--mono); }
@media (max-width: 600px) { .sq-row { flex-wrap: wrap; } .sq-row .pill { width: 100%; } }
@media (prefers-reduced-motion: reduce) { .sq-panel, .sq-open { transition: opacity 200ms ease; transform: none !important; } .sq-note { transform: none; } }

/* one-textbox version */
.sq-form { margin-top: 0; }
.sq-form h2 { margin: 0 52px 12px 0; font: 800 clamp(24px, 3.2vw, 36px)/1.05 var(--display); font-stretch: 115%; letter-spacing: -0.02em; color: var(--ink); }
.sq-row { justify-content: space-between; align-items: center; }
.sq-note.alt { background: #dfe3c8; }
.sq-form { padding: 0; background: none; border: 0; margin-bottom: 0; }
.sq-board:not(:empty) { margin-top: 26px; }

/* ── burger menu, top right of home ── */
.mn { position: fixed; z-index: 21; top: 14px; right: 16px; }
.mn-btn { display: grid; place-content: center; gap: 4px; width: 46px; height: 46px; padding: 0; cursor: pointer; border-radius: 14px; border: 0;
  background: rgba(243, 241, 234, 0.72); backdrop-filter: blur(16px) saturate(1.6); -webkit-backdrop-filter: blur(16px) saturate(1.6);
  box-shadow: 0 0 0 1px rgba(23, 23, 26, 0.08), 0 8px 30px rgba(0, 0, 0, 0.08); transition: transform 120ms var(--spring); }
.mn-btn i { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform 260ms var(--spring), opacity 160ms ease; }
.mn-btn:active { transform: scale(0.94); }
.mn-btn.on i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.mn-btn.on i:nth-child(2) { opacity: 0; }
.mn-btn.on i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.mn-list { position: absolute; top: 54px; right: 0; min-width: 220px; margin: 0; padding: 6px; list-style: none; border-radius: 14px;
  background: rgba(251, 250, 246, 0.94); backdrop-filter: blur(16px) saturate(1.6); -webkit-backdrop-filter: blur(16px) saturate(1.6);
  box-shadow: 0 0 0 1px rgba(23, 23, 26, 0.1), 0 18px 40px -12px rgba(0, 0, 0, 0.25);
  transform-origin: top right; opacity: 0; transform: scale(0.94) translateY(-4px); transition: opacity 160ms ease, transform 240ms var(--spring); }
.mn-list[hidden] { display: none; }
.mn-list.in { opacity: 1; transform: none; }
.mn-list button { display: block; width: 100%; padding: 11px 14px; border: 0; border-radius: 9px; background: none; text-align: left; cursor: pointer;
  font: 500 14px var(--mono); color: var(--ink); }
.mn-list button:hover, .mn-list button:focus-visible { background: rgba(90, 97, 58, 0.12); outline: none; }
html.intro-on .mn { opacity: 0; }
.mp h2 { margin: 0 52px 10px 0; font: 800 clamp(26px, 3.4vw, 38px)/1.05 var(--display); font-stretch: 115%; letter-spacing: -0.02em; }
.mp-soon { margin: 0; color: var(--ink-3); font: 400 14px var(--mono); }
.mp .sq-panel { width: min(760px, 100%); }
@media (max-width: 600px) { .mn { top: 70px; right: 12px; } .mn-btn { width: 42px; height: 42px; } .mn-list { top: 50px; } }
@media (prefers-reduced-motion: reduce) { .mn-list, .mn-btn i { transition: opacity 160ms ease; } }

/* door cards: the title link stretches over the whole card; win links sit above it */
.door { cursor: pointer; }
.door b { position: static; }
.door-link::after { content: ''; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.door-link:focus-visible { outline: none; }
.door:has(.door-link:focus-visible) { outline: 2px solid var(--olive); outline-offset: 3px; }
.door .wl { position: relative; z-index: 2; color: var(--ink); text-decoration: underline; text-decoration-color: var(--c); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.door .wl:hover { text-decoration-thickness: 2.5px; }
.door:hover .wl { color: #fff; text-decoration-color: rgba(255, 255, 255, 0.7); }
.mp-q { margin: 6px 0 22px; max-width: 64ch; font-size: 15px; line-height: 1.5; color: var(--ink); }
.mp-q b { font-weight: 650; }
.mp-k { margin: 18px 0 4px; font-size: 12px; letter-spacing: 0.06em; color: #6b6a63; }
.mp-v { margin: 0; font-size: 16px; line-height: 1.55; color: #45443f; }
.mp-end { margin: 24px 0 0; font-size: 16px; line-height: 1.55; color: var(--ink); }
.mp-ol { margin: 0; padding-left: 1.4em; display: grid; gap: 6px; font-size: 16px; line-height: 1.5; color: #45443f; }
.mp-ol li::marker { font: 500 13px var(--mono); color: var(--ink-3); }
.cl { list-style: none; margin: 8px 0 0; padding: 0 0 0 22px; position: relative; display: grid; gap: 18px; }
.cl::before { content: ''; position: absolute; left: 5px; top: 8px; bottom: 8px; border-left: 2px solid rgba(90, 97, 58, 0.35); }
.cl li { position: relative; display: flex; align-items: baseline; gap: 14px; }
.cl li::before { content: ''; position: absolute; left: -22px; top: 0.45em; width: 12px; height: 12px; border-radius: 50%; background: var(--olive); box-shadow: 0 0 0 3px var(--paper); }
.cl-v { flex: none; min-width: 40px; font-size: 12.5px; color: var(--ink-3); }
.cl p { margin: 0; font-size: 16px; line-height: 1.5; color: var(--ink); }
.cl .cl-gap { padding: 14px 0; }
.cl .cl-gap::before { left: -17px; top: -10px; bottom: -10px; width: 2px; height: auto; border-radius: 0; box-shadow: none;
  background: repeating-linear-gradient(to bottom, var(--olive) 0 4px, var(--paper) 4px 9px); }
.cl .cl-gap p { font: 400 18px/1.3 'Happy Monkey', var(--sans); color: var(--olive); }

/* random words: the Dictionary of metarealizations */
.wd-k { margin: 0 0 4px; font-size: 12px; letter-spacing: 0.06em; color: #6b6a63; }
.wd-note { margin: 0 0 18px; font: 400 18px/1.3 'Happy Monkey', var(--sans); color: var(--olive); }
.wd-card { min-height: 150px; padding: 22px 24px 24px; border-radius: 12px; background: #fbfaf6; border: 1px solid rgba(23, 23, 26, 0.12); }
.wd-card.in { animation: wd-in 360ms var(--spring); }
@keyframes wd-in { from { opacity: 0; transform: translateY(6px); } }
.wd-card h3 { margin: 0 0 6px; font: 800 clamp(28px, 4vw, 44px)/1.05 var(--display); font-stretch: 115%; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.wd-card h3.wd-blank { width: 7ch; border-bottom: 2px solid var(--ink); }
.wd-from { margin: 0 0 14px; font-size: 12.5px; line-height: 1.5; color: var(--ink-3); white-space: pre-line; }
.wd-def { margin: 0; max-width: 62ch; font-size: 16.5px; line-height: 1.6; color: #45443f; }
.wd-empty { margin: 0; color: var(--ink-3); font: 400 14px var(--mono); }
.wd-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; }
.wd-row .pill { cursor: pointer; font: 500 14px var(--mono); }
.wd-count { font-size: 12px; color: var(--ink-3); }
@media (prefers-reduced-motion: reduce) { .wd-card.in { animation: none; } }
.wd-row { justify-content: flex-end; }
