:root {
  --paper: #fbfaf7;
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --line: rgba(0, 0, 0, 0.08);
  --accent: #0071e3;
  --clay-text: #a0502f; /* the clay orange, dark enough to read as text */
  --ease: cubic-bezier(0.32, 0.72, 0, 1); /* iOS sheet curve */
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
  --serif: ui-serif, "New York", Georgia, serif;
  --hand: "Caveat", "Bradley Hand", cursive;
  --sign: "Allison", "Snell Roundhand", cursive;
  --s: 1;  /* hero scale, set by main.js */
  --ui: 1; /* chrome scale: grows on large screens only */
}

* { box-sizing: border-box; }

/* Lenis smooth scroll */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

html, body {
  margin: 0;
  overflow-x: clip; /* nothing should ever scroll sideways (clip keeps sticky sections working) */
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

button { font: inherit; color: inherit; }

/* Keyboard focus: one clear ring everywhere, only for keyboard users */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.skip-link {
  position: fixed;
  left: 12px; top: 12px;
  z-index: 2000;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  text-decoration: none;
  translate: 0 -150%;
}
.skip-link:focus-visible { translate: 0 0; outline-offset: 3px; }

/* ───────── Face ID intro ───────── */
html.is-locked, html.is-locked body { overflow: hidden; overscroll-behavior: none; }
.lock {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-content: center;
  justify-items: center;
  background: var(--paper);
  transition: opacity 0.7s var(--ease) 0.15s, visibility 0s 0.9s;
}
.lock-face {
  width: 96px;
  height: 96px;
  transition: transform 0.8s var(--ease), opacity 0.5s var(--ease);
}
/* intro.js recolors the animation to ink; it turns green once you're "recognized" */
.lock.is-ok .lock-face path[stroke]:not([stroke="none"]) { stroke: #34c759; }
.lock.is-ok .lock-face path[fill]:not([fill="none"]) { fill: #34c759; }
.lock-title { margin: 26px 0 0; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.lock-status { margin: 6px 0 0; min-height: 1.5em; font-family: var(--mono); font-size: 13px; color: var(--ink-2); }
.lock-skip {
  position: absolute;
  bottom: max(28px, env(safe-area-inset-bottom));
  left: 50%;
  translate: -50% 0;
  padding: 8px 16px;
  border: 0;
  border-radius: 99px;
  background: rgba(0, 0, 0, 0.05);
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
}
.lock-skip:hover { color: var(--ink); }
.lock.is-open { opacity: 0; visibility: hidden; pointer-events: none; }
.lock.is-open .lock-face { transform: translateY(-38vh) scale(0.4); opacity: 0; }

/* ───────── Hero ───────── */

.hero {
  position: relative;
  height: var(--app-h, 100svh);
  min-height: 560px;
  overflow: hidden;
}

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

/* Intro text */
.intro {
  position: absolute;
  right: 4.5vw;
  top: 50%;
  transform: translateY(-40%);
  width: calc(520px * var(--s));
  text-align: right;
  z-index: 50;
  pointer-events: none;
  transition: rotate 1s var(--ease);
}
/* The intro moves with the mode; main.js animates the jump between spots. */
.hero[data-mode="curiosity"] .intro {
  right: auto;
  left: 4.5vw;
  text-align: left;
}
.hero[data-mode="creativity"] .intro {
  right: auto;
  left: 50%;
  transform: translate(-50%, -42%);
  width: calc(560px * var(--s));
  text-align: center;
}
.hero[data-mode="chaos"] .intro { rotate: -3deg; }

.signature {
  margin: 0;
  font-family: var(--sign);
  font-weight: 400;
  font-size: max(56px, calc(130px * var(--s)));
  line-height: 1;
  letter-spacing: 0;
  padding-right: 0.08em; /* room for the script's trailing stroke */
}

.role {
  margin: calc(18px * var(--s)) 0 0;
  font-family: var(--mono);
  font-size: max(12px, calc(17px * var(--s)));
  letter-spacing: 0.02em;
}
.role-sub {
  display: block;
  margin-top: 4px;
  font-size: max(10px, calc(12px * var(--s)));
  font-style: italic;
  color: var(--ink-2);
}

.line {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin: calc(28px * var(--s)) 0 0;
  font-family: var(--mono);
  font-size: max(11px, calc(15px * var(--s)));
  line-height: 1.55;
}
.swap { display: grid; grid-template-columns: minmax(0, 1fr); }
.line .v,
.swap > .v {
  grid-area: 1 / 1;
  opacity: 0;
  filter: blur(6px);
  transform: translateY(6px);
  transition: opacity 0.6s var(--ease), filter 0.6s var(--ease), transform 0.6s var(--ease);
}

/* Per-mode variants (used by text and object contents) */
.hero[data-mode="creativity"] .v-creativity,
.hero[data-mode="curiosity"] .v-curiosity,
.hero[data-mode="chaos"] .v-chaos {
  opacity: 1;
  filter: none;
  transform: none;
  transition-delay: 0.15s;
}

/* Segmented control */
.modes {
  position: absolute;
  left: 50%;
  bottom: max(calc(28px * var(--ui)), env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  box-shadow: 0 0 0 0.5px var(--line), 0 8px 30px rgba(0, 0, 0, 0.06);
  z-index: 60;
}
.modes button {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(7px * var(--ui));
  padding: calc(10px * var(--ui)) calc(18px * var(--ui));
  border: 0;
  background: none;
  border-radius: 999px;
  font-size: calc(13px * var(--ui));
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink-2);
  cursor: pointer;
  transition: color 0.3s var(--ease);
}
.modes button[aria-pressed="true"] { color: var(--ink); }
.modes button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.modes svg {
  width: calc(17px * var(--ui)); height: calc(17px * var(--ui));
  fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}
.modes svg .dot { fill: currentColor; stroke: none; }
.modes-thumb {
  position: absolute;
  top: 4px; bottom: 4px; left: 4px;
  width: calc((100% - 8px) / 3);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.06);
  transition: transform 0.5s var(--ease);
}
[data-mode="curiosity"] .modes-thumb { transform: translateX(100%); }
[data-mode="chaos"] .modes-thumb { transform: translateX(200%); }

/* ───────── Top bar & logo ───────── */
.topbar {
  position: fixed;
  inset: 0 0 auto;
  height: calc(64px * var(--ui));
  z-index: 100;
  pointer-events: none;
}
/* Solid strip behind the docked logo; story.js fades it out as the sky arrives and back after it */
.topbar-bg {
  position: absolute;
  inset: 0 0 calc(-20px * var(--ui));
  /* solid behind the logo, softening over the last 20px */
  -webkit-mask: linear-gradient(#000 calc(100% - 20px * var(--ui)), transparent);
  mask: linear-gradient(#000 calc(100% - 20px * var(--ui)), transparent);
  z-index: 0;
  background: var(--bar-color, var(--paper));
  opacity: var(--bar, 0);
}
.logo {
  position: absolute;
  left: 0; top: 0;
  z-index: 2;
  color: var(--ink);
  text-decoration: none;
  transform-origin: center;
  will-change: transform;
  visibility: hidden;
  pointer-events: none;
}
.logo.is-shown { visibility: visible; }
.logo { transition: color 0.4s var(--ease); }
.topbar.on-dark .logo { color: #f5f5f7; }
.logo.is-docked { pointer-events: auto; }
.logo-text, .sig-text {
  display: inline-block;
  font-family: var(--sign);
  line-height: 1;
  white-space: nowrap;
}
.logo:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 6px; }

/* Top-right buttons: Resume, Menu, Sound */
.nav-actions {
  position: absolute;
  top: max(calc(14px * var(--ui)), env(safe-area-inset-top));
  right: calc(20px * var(--ui));
  z-index: 3;
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: calc(6px * var(--ui));
}
.nav-btn {
  --size: calc(36px * var(--ui));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: var(--size);
  padding: 0 calc(14px * var(--ui));
  border: 0;
  border-radius: 999px;
  background: #fff; /* solid white over any section color */
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.04);
  font-size: calc(13px * var(--ui));
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), scale 0.3s var(--ease);
}
.nav-btn:hover { background: #f5f5f4; }
.nav-btn:active { scale: 0.94; }
.nav-btn svg {
  flex: none;
  width: calc(16px * var(--ui)); height: calc(16px * var(--ui));
  fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}
.nav-icon { width: var(--size); padding: 0; }
.nav-resume svg { width: calc(14px * var(--ui)); height: calc(14px * var(--ui)); margin-right: -2px; }

/* Menu icon turns into an X while open */
.nav-menu path { transition: transform 0.35s var(--ease); transform-box: fill-box; transform-origin: center; }
.nav-menu[aria-expanded="true"] .l1 { transform: translateY(3px) rotate(45deg); }
.nav-menu[aria-expanded="true"] .l2 { transform: translateY(-3px) rotate(-45deg); }

/* Dropdown */
.nav-menu-wrap { position: relative; display: flex; }
.menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  min-width: 176px;
  padding: 6px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.1), 0 10px 30px rgba(0, 0, 0, 0.08);
  transform-origin: top right;
  opacity: 0;
  visibility: hidden;
  translate: 0 -4px;
  scale: 0.98;
  transition: opacity 0.18s var(--ease), translate 0.25s var(--ease), scale 0.25s var(--ease), visibility 0s 0.25s;
}
/* invisible bridge so the pointer can travel from the button into the menu */
.menu::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 10px; }
.nav-menu-wrap.is-open .menu {
  opacity: 1;
  visibility: visible;
  translate: 0 0;
  scale: 1;
  transition: opacity 0.18s var(--ease), translate 0.25s var(--ease), scale 0.25s var(--ease), visibility 0s;
}
.menu a {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--ink-2);
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
}
.menu a:hover, .menu a:focus-visible { background: #f4f4f3; color: var(--ink); }
.menu a:focus-visible { outline-offset: -2px; }
.menu-resume { display: none !important; }

/* Sound toggle */
.sound-toggle { color: var(--ink-2); }
.sound-toggle:hover { color: var(--ink); }
.sound-toggle svg { grid-area: 1 / 1; width: calc(18px * var(--ui)); height: calc(18px * var(--ui)); }
.sound-toggle[aria-pressed="true"] .off,
.sound-toggle[aria-pressed="false"] .on { display: none; }

/* ───────── Objects ───────── */

.obj {
  position: absolute;
  left: 0; top: 0;
  transform-origin: 0 0; /* scale around the placement point, not the box center (matters whenever scale < 1) */
  will-change: transform, opacity;
  transition: transform 1.1s var(--ease);
}
.obj.is-hidden { pointer-events: none; }
.obj.is-dragging { transition: none; }

.obj-par { transition: transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1); }

.obj-body {
  transform-origin: center;
  translate: -50% -50%;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  transition: scale 0.4s var(--ease), filter 0.4s var(--ease);
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.06)) drop-shadow(0 6px 14px rgba(0,0,0,.07));
}
/* On touch screens, a finger starting on a desk object should still scroll the page */
@media (pointer: coarse) {
  .obj-body { touch-action: pan-y; }
}
.obj-body:hover { scale: 1.03; }
.is-dragging .obj-body {
  cursor: grabbing;
  scale: 1.06;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,.08)) drop-shadow(0 20px 30px rgba(0,0,0,.14));
}
.obj-body > * { pointer-events: none; }
.obj-body svg { display: block; width: 100%; height: 100%; overflow: visible; }

/* Chaos: things get restless */
[data-mode="chaos"] .obj.float .obj-body { animation: wobble 5s ease-in-out infinite; }
@keyframes wobble {
  0%, 100% { rotate: 0deg; }
  50% { rotate: 3deg; }
}

/* Variant stacks inside objects */
.stack { display: grid; }
.stack > .v,
.stack-svg > .v,
.photo > .v {
  grid-area: 1 / 1;
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}

/* Music player: a picture disc peeks out of the top; hover stops it and the cover fills the card */
@keyframes spin { to { transform: rotate(360deg); } }
.player {
  width: 100%; height: 100%;
  border-radius: 24%;
  overflow: hidden;
  background: linear-gradient(180deg, #f3f3f5 0%, #e4e4e8 55%, #d7d7dc 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 0 0 0.5px rgba(0,0,0,.06);
  font-family: var(--sans);
}
.player > .stack, .player > .stack > .v { width: 100%; height: 100%; }
.player > .stack > .v { position: relative; }

/* The disc: a round picture disc of the whole cover, centered near the card's top edge.
   Container units keep it a true circle whatever the card's proportions. */
.player { container-type: size; }
.pl-disc {
  position: absolute;
  left: 6cqw;
  top: calc(12cqh - 44cqw);
  z-index: 2;
  width: 88cqw;
  height: 88cqw;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.2);
  transition: opacity 0.25s var(--ease) 0.2s;
}
.pl-disc-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; will-change: transform; }
.pl-grooves, .pl-hole {
  position: absolute;
  left: 50%; top: 50%;
  border-radius: 50%;
  translate: -50% -50%;
  pointer-events: none;
}
.pl-grooves {
  inset: 0;
  translate: none;
  background:
    repeating-radial-gradient(circle, rgba(0,0,0,.08) 0 1px, transparent 1px 4px),
    conic-gradient(from 20deg, transparent 0 10%, rgba(255,255,255,.3) 14%, transparent 20% 55%, rgba(255,255,255,.22) 60%, transparent 66%);
  mix-blend-mode: soft-light;
}
.pl-hole {
  width: 24%; aspect-ratio: 1;
  background: radial-gradient(circle, #e9e9ed 0 34%, #cfcfd5 35% 38%, rgba(255,255,255,.75) 39% 100%);
  box-shadow: 0 0 0 1px rgba(0,0,0,.08), inset 0 2px 6px rgba(0,0,0,.12);
}

/* The full cover grows out of the disc's circle once the disc is upright */
.pl-full {
  position: absolute;
  inset: 0;
  z-index: 3;
  opacity: 0;
  clip-path: circle(44cqw at 50% 12%);
  transition: clip-path 0.7s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.2s var(--ease) 0.5s;
  pointer-events: none;
}
.pl-full img { width: 100%; height: 100%; object-fit: cover; display: block; }
.player.is-open .pl-full { opacity: 1; clip-path: circle(150% at 50% 12%); transition: clip-path 0.7s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.15s var(--ease); }
.player.is-open .pl-disc { opacity: 0; }

/* info under the disc */
.pl-info {
  position: absolute;
  left: 0; right: 0; bottom: 8%;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-align: center;
  transition: opacity 0.3s var(--ease);
}
.pl-bars { display: flex; align-items: center; gap: 2px; height: 11px; margin-bottom: 2px; }
.pl-bars i { width: 2px; height: 100%; border-radius: 2px; background: #9a9aa2; transform-origin: center; animation: eq 0.9s ease-in-out infinite; }
.pl-bars i:nth-child(2) { animation-delay: -0.3s; }
.pl-bars i:nth-child(3) { animation-delay: -0.6s; }
.pl-bars i:nth-child(4) { animation-delay: -0.15s; }
.pl-bars i:nth-child(5) { animation-delay: -0.45s; }
@keyframes eq { 0%, 100% { transform: scaleY(0.3); } 50% { transform: scaleY(1); } }
.pl-artist { font-size: 10.5px; color: #8e8e93; }
.pl-title { font-size: 12.5px; font-weight: 600; color: var(--ink); max-width: 86%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-track { width: 22%; height: 3px; margin-top: 3px; border-radius: 3px; background: rgba(0,0,0,.1); overflow: hidden; }
.pl-fill { display: block; height: 100%; width: 0; background: #6e6e73; border-radius: 3px; }
.pl-time { font-size: 10.5px; color: #8e8e93; font-variant-numeric: tabular-nums; }
.pl-time b { color: var(--ink); font-weight: 600; }
.is-paused .pl-bars i { animation-play-state: paused; }

/* Finder folder */
.folder { text-align: center; font-size: 13px; font-weight: 500; }
.folder p { display: grid; margin: 6px 0 0; }
.folder-art { position: relative; aspect-ratio: 150 / 116; }
.folder-art > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.folder-front { transform-origin: 50% 100%; transition: transform 0.45s var(--ease); }
.fname { grid-area: 1 / 1; transition: opacity 0.25s var(--ease); }
.fname-open { opacity: 0; }

/* files tucked inside, fanning out on hover */
.folder-files { position: absolute; inset: 0; }
.ff {
  position: absolute;
  left: 50%; top: 42%;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  width: 44px;
  translate: -50% -50%;
  scale: 0.5;
  opacity: 0;
  transition: transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1), scale 0.55s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s var(--ease);
}
.ff b { font-size: 7.5px; font-weight: 500; white-space: nowrap; color: var(--ink); background: rgba(255,255,255,.9); padding: 1px 4px; border-radius: 4px; }
.ff-ico {
  display: grid; place-items: center;
  width: 36px; height: 44px;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 4px 10px rgba(0,0,0,.14);
}
.ff-figma svg { width: 13px !important; height: auto !important; }
.ff-claude svg { width: 24px !important; height: auto !important; }
.ff-img { background: linear-gradient(135deg, #ffd36e, #ff7a59 60%, #a259ff); }
.ff-doc { flex-direction: column; gap: 4px; padding: 0 8px; }
.ff-doc i { display: block; width: 100%; height: 2px; border-radius: 2px; background: #c7c7cc; }
.ff-doc i:last-child { width: 60%; }

.obj-body:hover .folder-front { transform: perspective(300px) rotateX(-28deg); }
.obj-body:hover .ff { opacity: 1; scale: 1; }
.obj-body:hover .ff-1 { transform: translate(-58px, -62px) rotate(-16deg); transition-delay: 0s; }
.obj-body:hover .ff-2 { transform: translate(-20px, -80px) rotate(-5deg); transition-delay: 0.05s; }
.obj-body:hover .ff-3 { transform: translate(20px, -80px) rotate(6deg); transition-delay: 0.1s; }
.obj-body:hover .ff-4 { transform: translate(58px, -60px) rotate(17deg); transition-delay: 0.15s; }
.obj-body:hover .fname { opacity: 0; }
.obj-body:hover .fname-open { opacity: 1; }

/* Paint toolbar */
.toolbar {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  background: #fff;
  border: 1.5px solid #111;
}
.toolbar span {
  display: grid; place-items: center;
  aspect-ratio: 1;
  border: 1px solid #111;
}
.toolbar svg { width: 62%; height: 62%; fill: none; stroke: #111; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* Swatches */
.swatches { position: relative; width: 100%; height: 100%; }
.chip {
  position: absolute;
  width: 96px; height: 136px;
  left: 50%; top: 50%;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(0,0,0,.05), 0 2px 6px rgba(0,0,0,.06);
  transform-origin: 50% 100%;
  font-family: var(--sans);
  font-size: 8px;
  line-height: 1.3;
  padding: 0 7px;
}
.chip::before { content: ""; display: block; height: 92px; margin: 0 -7px 6px; border-radius: 4px 4px 0 0; background: var(--c); }
.chip b { display: block; font-size: 9px; letter-spacing: .04em; }

/* Sticky note */
.sticky {
  display: grid; place-items: center;
  width: 100%; height: 100%;
  padding: 16px;
  background: linear-gradient(170deg, #fff3a8, #fde98a);
  font-family: var(--hand);
  font-size: 28px;
  line-height: 1.05;
  text-align: center;
  color: #3a3320;
}
.sticky .v { display: grid; place-items: center; }

/* Notebook */
.notebook {
  position: relative;
  display: grid; grid-template-columns: 1fr 1fr;
  width: 100%; height: 100%;
  background: #fdfdfb;
  border-radius: 3px;
}
.notebook::before, .notebook::after { content: ""; }
.notebook > .pages {
  position: absolute; inset: 0;
  display: grid; grid-template-columns: 1fr 1fr;
}
.notebook .page {
  background-image:
    linear-gradient(rgba(0,0,0,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,.06) 1px, transparent 1px);
  background-size: 14px 14px;
  background-position: 7px 7px;
}
.notebook .page:first-child { box-shadow: inset -12px 0 16px -12px rgba(0,0,0,.18); }
.notebook .page:last-child { box-shadow: inset 12px 0 16px -12px rgba(0,0,0,.12); }
.notebook .stack { position: absolute; inset: 0; }
.notebook .v { position: relative; width: 100%; height: 100%; }
.notebook .ink {
  position: absolute;
  font-family: var(--hand);
  color: #2b3a67;
  font-size: 22px;
  line-height: 1.1;
}

/* Dictionary scrap */
.dict {
  width: 100%; height: 100%;
  padding: 14px 16px;
  background: #efe6d6;
  font-family: var(--serif);
  font-size: 11.5px;
  line-height: 1.35;
  color: #2a2620;
  clip-path: polygon(0 6%, 8% 0, 22% 4%, 40% 0, 58% 3%, 76% 0, 92% 4%, 100% 1%, 98% 30%, 100% 60%, 97% 100%, 80% 96%, 60% 100%, 42% 97%, 20% 100%, 4% 96%, 2% 70%, 0 40%);
}
.dict b { font-size: 17px; }
.dict i { color: #6b6255; font-size: 10px; white-space: nowrap; }

/* Terminal */
.terminal {
  width: 100%; height: 100%;
  background: #1c1c1e;
  border-radius: 12px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.08) inset;
  color: #e5e5ea;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.6;
  overflow: hidden;
}
.terminal header { display: flex; gap: 7px; padding: 12px 14px; }
.terminal header i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.terminal header i:nth-child(2) { background: #febc2e; }
.terminal header i:nth-child(3) { background: #28c840; }
.terminal pre { margin: 0; padding: 0 18px; font: inherit; white-space: pre-wrap; }
.terminal .dim { color: #8e8e93; }
.terminal .hi { color: #e8a87c; }
.caret { display: inline-block; width: 7px; height: 14px; background: #e5e5ea; vertical-align: -2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Mascot */
.mascot .m-eye { fill: #231f1c; transform-box: fill-box; transform-origin: center; animation: blink 5s infinite; }
.mascot .m-eye:nth-child(2) { animation-delay: 0.04s; }
.mascot .m-eyes { transform: translate(calc(var(--ex, 0) * 1px), calc(var(--ey, 0) * 1px)); transition: transform 0.25s var(--ease); }
.mascot .m-happy { opacity: 0; }
.is-happy .mascot .m-open { opacity: 0; }
.is-happy .mascot .m-happy { opacity: 1; }
@keyframes blink {
  0%, 92%, 100% { transform: scaleY(1); }
  95% { transform: scaleY(0.1); }
}

/* AirDrop */
.airdrop {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  background: rgba(250,250,250,.95);
  border-radius: 14px;
  box-shadow: 0 0 0 1px rgba(0,0,0,.06);
  overflow: hidden;
  text-align: center;
  font-size: 11px;
}
.airdrop h4 { margin: 12px 0 1px; font-size: 13px; font-weight: 600; }
.airdrop p { margin: 0 10px 10px; color: #3a3a3c; }
.airdrop .img {
  flex: 1;
  margin: 0 10px;
  border-radius: 4px;
  background:
    radial-gradient(circle at 20% 80%, #c86dd7 0, transparent 45%),
    radial-gradient(circle at 80% 20%, #ff3b30 0, transparent 50%),
    linear-gradient(135deg, #ff9500, #ff2d55);
  display: grid; place-items: center;
  font-size: 44px;
}
.airdrop footer { display: flex; justify-content: space-around; padding: 10px 0; color: var(--accent); font-size: 13px; }

/* Dice */
.dice { display: flex; gap: 12px; }
.die {
  width: 52px; height: 52px;
  display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr);
  padding: 8px;
  background: #fff;
  border-radius: 11px;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.06), 0 0 0 1px rgba(0,0,0,.06);
}
.die i { width: 9px; height: 9px; border-radius: 50%; background: #1d1d1f; place-self: center; visibility: hidden; }
.die i.on { visibility: visible; }

/* Photo cutouts (assets/objects/*.png) */
.has-photo { position: relative; }
.photo { position: absolute; inset: 0; display: grid; }
.photo img { grid-area: 1 / 1; width: 100%; height: 100%; object-fit: contain; }
.on-photo { position: relative; background: none !important; box-shadow: none !important; clip-path: none !important; }
.on-photo .page { background: none !important; box-shadow: none !important; }

/* Pixel cursor */
.cursor svg { shape-rendering: crispEdges; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
}

/* ───────── Sections (placeholder) ───────── */
.section {
  min-height: var(--app-h, 100svh);
  padding: 140px max(20px, 6vw) 80px;
  box-shadow: 0 -0.5px 0 var(--line);
}
.eyebrow {
  margin: 0;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-2);
}
.section h2 {
  margin: 12px 0 0;
  font-size: clamp(40px, 6vw, 80px);
  font-weight: 600;
  letter-spacing: -0.03em;
}

/* ───────── About ───────── */
.about { box-shadow: 0 -0.5px 0 var(--line); }

.about-read { height: calc(var(--stage-h, 100svh) * 1.9); }
.about-sticky {
  position: sticky;
  top: 0;
  min-height: var(--stage-h, 100svh);
  display: flex;
  align-items: safe center; /* on short screens, start below the logo instead of overflowing upward */
  padding: calc(84px * var(--ui)) max(24px, 8vw) 40px;
}
.about-col {
  width: 100%;
  max-width: 52ch;
  margin-inline: auto;
  font-family: var(--mono);
  font-size: clamp(15px, 1.3vw, 26px);
  line-height: 1.75;
  letter-spacing: 0.01em;
}

/* Small rounded photo */
.avatar {
  --rx: 0deg; --ry: 0deg;
  width: 6.2em;
  aspect-ratio: 1;
  margin: 0 0 2.2em;
  border-radius: 1em;
  overflow: hidden;
  background: #efe9df;
  box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 10px 30px rgba(0,0,0,.12);
  rotate: -3deg;
  transform: perspective(600px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}
.avatar:hover { box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 18px 40px rgba(0,0,0,.18); }
.avatar:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.avatar-photo {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  /* undeveloped: faded to a pale grey-white, like a fresh polaroid */
  filter: brightness(1.6) grayscale(1) contrast(0.35) blur(4px);
  opacity: 0.55;
}
.avatar.developed .avatar-photo {
  filter: none;
  opacity: 1;
  transition: filter 3.2s cubic-bezier(0.2, 0.6, 0.2, 1), opacity 1.6s ease;
}
.avatar-photo svg { width: 62%; }
.avatar-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* A real photo (a transparent polaroid cutout) shows whole, bigger, with no card behind it */
.avatar.has-photo { width: 9.5em; aspect-ratio: 470 / 520; overflow: visible; border-radius: 0; background: none; box-shadow: none; rotate: 0deg; }
.avatar.has-photo:hover { box-shadow: none; }
.avatar.has-photo .avatar-photo img { object-fit: contain; filter: drop-shadow(0 10px 18px rgba(0,0,0,.18)); }

.about-text p { margin: 0; }
.about-text p + p { margin-top: 1.4em; }
.about-text .w {
  color: var(--ink);
  opacity: 0.14;
  transition: opacity 0.45s var(--ease);
}
.about-text .w.on { opacity: 1; }
.kw {
  position: relative;
  cursor: default;
  white-space: nowrap;
}
.kw::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -0.08em;
  height: 1.5px;
  border-radius: 1em;
  background: #da7756;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.7s var(--ease) 0.1s;
}
.kw.on::after { transform: scaleX(1); }
.kw:hover { color: var(--clay-text); }

.obsessed { margin: 1.4em 0 0; color: var(--ink-2); }
.roller {
  display: inline-block;
  vertical-align: top;
  height: 1.75em;
  overflow: hidden;
}
.roller-track {
  display: flex;
  flex-direction: column;
  transition: transform 0.7s cubic-bezier(0.65, 0, 0.35, 1);
}
.roller-track > span { height: 1.75em; color: var(--clay-text); }

/* Floating object that follows the cursor over keywords */
.peek {
  position: fixed;
  left: 0; top: 0;
  z-index: 90;
  pointer-events: none;
}
.peek > * {
  display: block;
  width: 170px;
  height: auto;
  translate: 24px -50%;
  scale: 0;
  opacity: 0;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.16));
  transition: scale 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s var(--ease);
}
.peek.show > * { scale: 1; opacity: 1; }


.about-facts {
  box-sizing: border-box;
  max-width: calc(52ch + 2 * max(24px, 8vw));
  padding: 0 max(24px, 8vw) 160px;
}
.facts { margin: 0; font-size: 0.8em; }
.facts > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  padding: 0.9em 0;
  border-top: 0.5px dashed rgba(0, 0, 0, 0.2);
  opacity: 0;
  translate: 0 16px;
  transition: opacity 0.7s var(--ease), translate 0.7s var(--ease);
}
.facts > div:last-child { border-bottom: 0.5px dashed rgba(0, 0, 0, 0.2); }
.facts.in > div { opacity: 1; translate: 0 0; }
.facts.in > div:nth-child(2) { transition-delay: 0.08s; }
.facts.in > div:nth-child(3) { transition-delay: 0.16s; }
.facts.in > div:nth-child(4) { transition-delay: 0.24s; }
.facts.in > div:nth-child(5) { transition-delay: 0.32s; }
.facts dt { color: var(--ink-2); }
.facts dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }

/* ───────── Sky: paper → clouds → blue ───────── */
/* One flat sky color everywhere (dawn end, story stage, outro portal) so there are no seams between sections */
:root { --sky: #8fb2df; }
.dawn {
  position: relative;
  height: 90vh;
  overflow: hidden;
  background: linear-gradient(180deg, var(--paper) 0%, #fff 30%, #dde9f7 62%, var(--sky) 100%);
}
.dawn-clouds {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  /* fade the clouds out before the edge so the dawn melts into the sky below */
  -webkit-mask: linear-gradient(180deg, #000 55%, transparent 100%);
  mask: linear-gradient(180deg, #000 55%, transparent 100%);
}

.story { height: 1100vh; background: #fff; }
.sky-stage {
  position: sticky;
  top: 0;
  height: var(--stage-h, 100svh);
  overflow: hidden;
  color: #fff;
  background: #fff; /* revealed around the closing sky: the word rows live on white */
}
/* The sky layer; story.js clips it to a closing circle at the end */
.sky-disc {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: var(--sky);
  will-change: clip-path;
}
.stage-clouds {
  position: absolute;
  inset: -10%;
  width: 120%; height: 120%;
  object-fit: cover;
  opacity: 0.55;
  will-change: transform;
  pointer-events: none;
}
/* Clouds fade out at the stage edges, so nothing is cut off where the next section begins */
.sky-disc::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(180deg, var(--sky) 0, transparent 14%, transparent 86%, var(--sky) 100%);
}
.act { position: absolute; inset: 0; z-index: 1; will-change: opacity, transform; }

/* Act 1 */
.act1 { display: grid; place-content: center; justify-items: center; padding: 0 6vw; text-align: center; }
.lit {
  margin: 0;
  font-size: clamp(40px, 6vw, 108px);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.045em;
  text-shadow: 0 2px 40px rgba(40, 80, 140, 0.2);
}
.ln { display: block; }
.lw { transition: opacity 0.2s linear; }
.wchip {
  display: inline-grid;
  place-items: center;
  width: 0.95em; height: 0.95em;
  margin: 0 0.04em;
  vertical-align: -0.14em;
  border-radius: 0.26em;
  background: #fff;
  box-shadow: 0 10px 30px rgba(30, 60, 110, 0.22);
  rotate: -7deg;
}
.wchip img { width: 78%; height: 78%; object-fit: contain; }
.wchip-aha { background: #fff6d8; rotate: 6deg; }
.scribble {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin: 34px 0 0;
  font-family: var(--hand);
  font-size: clamp(22px, 1.9vw, 30px);
  color: #fff;
}
.scribble svg { width: 38px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Act 2 */
.apps { position: absolute; inset: 0; }
.app {
  position: absolute;
  left: 0; top: 0;
  display: grid;
  place-items: center;
  width: var(--tile); height: var(--tile);
  border-radius: 24%;
  background: #fff;
  box-shadow: 0 12px 30px rgba(30, 60, 110, 0.2);
  will-change: transform, opacity;
}
.app-glyph { font-size: calc(var(--tile) * 0.46); line-height: 1; }
.app-badge {
  position: absolute;
  top: -12%; right: -22%;
  padding: 3px 8px;
  border-radius: 99px;
  background: #ff3b30;
  color: #fff;
  font: 600 12px var(--sans);
  white-space: nowrap;
  opacity: var(--badge, 1);
  transform: scale(calc(0.5 + var(--badge, 1) * 0.5));
}
.threads { position: absolute; inset: 0; width: 100%; height: 100%; stroke-dasharray: 1; }
.threads path { fill: none; stroke: rgba(255, 255, 255, 0.75); stroke-width: 1.5; }
.statement { position: absolute; left: 0; right: 0; top: 36%; display: grid; text-align: center; padding: 0 6vw; }
.st { grid-area: 1 / 1; margin: 0; font-size: clamp(34px, 4.6vw, 80px); font-weight: 600; letter-spacing: -0.04em; }
.stats {
  position: absolute;
  top: 52%; left: 50%;
  translate: -50% 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  width: min(980px, 86vw);
  text-align: center;
}
.stats p { display: grid; margin: 0; font-family: var(--mono); font-size: clamp(12px, 1vw, 15px); }
.stats span { grid-area: 1 / 1; }

/* Act 3 */
.act3 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 6vw;
  align-items: center;
  max-width: 1320px;
  margin: 0 auto;
  padding: calc(64px * var(--ui)) 7vw 0;
}
.sky-eyebrow { margin: 0; font-family: var(--mono); font-size: 13px; opacity: 0.85; }
.skills-head h3 { margin: 14px 0 0; font-size: clamp(40px, 5vw, 88px); font-weight: 600; line-height: 1; letter-spacing: -0.045em; }
.skills-head .scribble { margin-top: 18px; }
.skills {
  --x: 52px; /* center of the icon column */
  position: relative;
  margin: 0;
  padding: 26px 30px;
  list-style: none;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  box-shadow: 0 30px 60px rgba(30, 60, 110, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.skills::before, .skills::after {
  content: "";
  position: absolute;
  left: var(--x); top: 48px; bottom: 48px;
  width: 2px;
  margin-left: -1px;
  background: rgba(255, 255, 255, 0.3);
}
.skills::after { background: #fff; transform-origin: top; transform: scaleY(var(--fill, 0)); }
.skills li { position: relative; z-index: 1; display: flex; align-items: center; gap: 18px; padding: 12px 0; }
.sk-ico {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  font-size: 20px;
  transition: background 0.4s var(--ease), scale 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.skills li.on .sk-ico { background: #fff; scale: 1.08; }
.sk-ico svg { width: 62%; }
.skills b { display: block; font-size: clamp(16px, 1.35vw, 21px); font-weight: 600; letter-spacing: -0.015em; }
.skills li > div > span { display: block; margin-top: 2px; font-size: 14px; opacity: 0.8; }
.sk-ai em {
  display: inline-block;
  white-space: nowrap;
  margin-left: 8px;
  font: 500 12px var(--mono);
  font-style: normal;
  background: linear-gradient(90deg, #ffd9c9 0%, #ffd9c9 40%, #fff 50%, #ffd9c9 60%, #ffd9c9 100%) 0 0 / 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 3.5s linear infinite;
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -150% 0; } }

/* Narrow or upright screens: stack the Expertise heading above the list */
@media (max-width: 900px), (max-aspect-ratio: 9/10) {
  .act3 {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 32px;
    max-width: 640px;
    padding-inline: 6vw;
  }
  .statement { top: 30%; }
  .stats { grid-template-columns: 1fr; gap: 8px; top: 44%; }
}

/* ───────── Outro: word rows behind the sky ───────── */
.words-layer { position: absolute; inset: 0; z-index: 1; color: var(--ink); }
.olede {
  position: absolute;
  left: 50%; top: 14%;
  margin: 0;
  font-size: clamp(20px, 2vw, 32px);
  letter-spacing: -0.01em;
  color: var(--ink-2);
  white-space: nowrap;
}
.rows {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transform-origin: 0 0;
}
.row {
  overflow: visible;
  font-size: clamp(44px, 6.4vw, 116px);
  font-weight: 600;
  line-height: 1.24;
  letter-spacing: -0.04em;
  white-space: nowrap;
}
/* no will-change here: the rows are scaled up, and a pre-rasterized layer would blur */
.track { display: inline-flex; align-items: center; gap: 0.32em; }
.rb {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 0.62em; height: 0.62em;
  border-radius: 50%;
  background: #2c2c2e;
}
.rb img { width: 72%; height: 72%; object-fit: contain; }
.rb:nth-child(4n) { background: #da7756; }
.rb:nth-child(4n + 2) { background: #6b96d0; }
.rb.rb-portal { width: 0.9em; height: 0.9em; background: var(--sky); overflow: hidden; }
.rb-portal .disc-spin { width: 92%; height: 92%; animation: spin 6s linear infinite; }
/* The wrapper is positioned per frame; the image inside it spins (kept separate so they don't combine) */
.disc-art {
  position: absolute;
  left: 0; top: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
}
.disc-art .disc-spin { width: 100%; height: 100%; animation: spin 6s linear infinite; }
.ocorner {
  position: absolute;
  left: 6vw; bottom: 40px;
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-2);
}

/* ───────── Selected work: a deck of project cards ───────── */
.work { position: relative; background: #fff; }
.work-stage { position: sticky; top: 0; height: var(--stage-h, 100svh); overflow: hidden; }
/* Centered above the card: a heading with the project counter in a pill */
.work-eyebrow {
  position: absolute;
  left: 50%; top: calc(54% - min(29vh, 16vw) - 24px);
  translate: -50% -100%;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: clamp(20px, 1.8vw, 30px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  white-space: nowrap;
}
.work-count {
  padding: 4px 10px;
  border-radius: 99px;
  background: #f2f1ee;
  font: 500 12px var(--mono);
  color: #5f5f64;
  font-variant-numeric: tabular-nums;
}

/* The card sits in the middle; each project's text takes turns on the left and right */
.work-copy { position: absolute; inset: 0; pointer-events: none; }
.wc {
  position: absolute;
  top: 54%;
  width: min(18vw, 320px);
  translate: 0 -50%;
  will-change: transform, opacity;
}
.wc-left { left: 4vw; }
.wc-right { right: 4vw; }
.wc h3 {
  margin: 0;
  font-size: clamp(22px, 2.1vw, 36px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.wc p { margin: 12px 0 0; font-size: clamp(13px, 1vw, 16px); line-height: 1.55; color: var(--ink-2); }
.wc-meta { display: inline-block; margin-top: 16px; font-family: var(--mono); font-size: 12px; color: var(--ink); }

.work-deck {
  position: absolute;
  left: 50%; top: 54%;
  width: min(50vw, 1040px);
  height: min(58vh, 32vw);
  translate: -50% -50%;
}
.wcard {
  position: absolute;
  left: 50%; top: 50%;
  width: 100%;
  height: 100%;
  margin: 0;
  border-radius: clamp(24px, 3vw, 48px);
  background: #ddd center / cover no-repeat;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.12);
  transform-origin: 50% 100%;
  will-change: transform, opacity;
}

/* the little status window on each card */
.wstatus {
  position: absolute;
  left: 50%; top: 50%;
  translate: -50% -50%;
  width: min(62%, 480px);
  padding: 18px 18px 14px;
  border-radius: 18px;
  background: rgba(251, 250, 247, 0.96);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.14);
  font-size: 14px;
}
.ws-head { display: flex; align-items: center; gap: 10px; padding: 0 2px 12px; font-weight: 500; }
.ws-head svg { width: 22px; height: auto; }
.ws-list { display: grid; gap: 8px; min-height: 124px; margin: 0; padding: 0; list-style: none; align-content: start; }
.ws-list li { display: grid; grid-template-columns: 22px minmax(0, 1fr); align-items: center; gap: 10px; }
.ws-step {
  min-width: 0;
  padding: 9px 12px;
  border-radius: 10px;
  background: #fff;
  font-size: 13px;
  color: #3a3a3c;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.05);
}
.ws-list li.done .ws-step { color: var(--ink-2); }
.ws-spin { position: relative; width: 18px; height: 18px; animation: spin 1s steps(8) infinite; }
.ws-spin i { position: absolute; left: 50%; top: 0; width: 2px; height: 5px; margin-left: -1px; border-radius: 2px; background: #8a9a78; transform-origin: 1px 9px; }
.ws-spin i:nth-child(1) { rotate: 0deg; } .ws-spin i:nth-child(2) { rotate: 45deg; opacity: .85; }
.ws-spin i:nth-child(3) { rotate: 90deg; opacity: .7; } .ws-spin i:nth-child(4) { rotate: 135deg; opacity: .55; }
.ws-spin i:nth-child(5) { rotate: 180deg; opacity: .45; } .ws-spin i:nth-child(6) { rotate: 225deg; opacity: .35; }
.ws-spin i:nth-child(7) { rotate: 270deg; opacity: .25; } .ws-spin i:nth-child(8) { rotate: 315deg; opacity: .15; }
.ws-list li.done .ws-spin { animation: none; border-radius: 50%; background: #34c759 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.5l2.5 2.5 5.5-6' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100%; }
.ws-list li.done .ws-spin i { display: none; }
.ws-bar { height: 3px; margin-top: 14px; border-radius: 3px; background: #ece8e2; overflow: hidden; }
.ws-bar i { display: block; height: 100%; width: 0; border-radius: 3px; background: #6fb0d8; transition: width 0.6s var(--ease); }
.is-done .ws-bar i { background: #34c759; }
.ws-eta { margin: 8px 0 0; font-size: 12px; color: var(--ink-2); }

@media (max-width: 900px), (max-aspect-ratio: 9/10) {
  .work-eyebrow { top: calc(64% - min(25vh, 50vw) - 16px); }
  .wc, .wc-left, .wc-right { left: 6vw; right: 6vw; top: calc(130px * var(--ui)); width: auto; translate: none; }
  .work-deck { top: 64%; width: 88vw; height: min(50vh, 100vw); }
  .wstatus { width: 88%; }
}

/* ───────── Experience: the changelog ───────── */
.xp { padding: clamp(100px, 12vw, 180px) max(24px, 5vw) clamp(60px, 8vw, 120px); background: #fff; }
.xp-inner { max-width: 900px; margin: 0 auto; }
.xp-head { margin-bottom: clamp(36px, 5vw, 64px); text-align: center; }
.xp-head h2 { margin: 12px 0 0; font-size: clamp(36px, 4.4vw, 72px); font-weight: 600; letter-spacing: -0.045em; line-height: 1; }
.xp-sub { margin: 14px 0 0; font-family: var(--mono); font-size: 14px; color: var(--ink-2); }

.xp-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid rgba(0,0,0,.08); }
.xp-row {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  padding: clamp(26px, 3vw, 40px) clamp(12px, 3vw, 40px);
  border-bottom: 1px solid rgba(0,0,0,.08);
  isolation: isolate; /* keeps the hover highlight inside the row */
  outline: none;
  opacity: 0;
  translate: 0 18px;
  transition: opacity 0.7s var(--ease), translate 0.7s var(--ease), background 0.3s var(--ease);
}
.xp-row.in { opacity: 1; translate: 0 0; }
.xp-row::before { /* soft highlight behind the hovered row */
  content: "";
  position: absolute;
  inset: 6px 0;
  z-index: -1;
  border-radius: 24px;
  background: #f5f4f1;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.xp-row:hover::before, .xp-row:focus-visible::before { opacity: 1; }
.xp-row:focus-visible::before { box-shadow: inset 0 0 0 2px var(--accent); }

.xp-meta { display: flex; align-items: center; gap: 10px; }
.xp-when { font-family: var(--mono); font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.xp-ver {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px;
  border-radius: 99px;
  background: #efeee9;
  font: 500 12px var(--mono);
  color: var(--ink);
}
.xp-ver.is-now { background: #fdeee8; color: #a14f33; }
.xp-ver i { width: 7px; height: 7px; border-radius: 50%; background: #da7756; animation: ft-pulse 2.2s ease-out infinite; }
@keyframes ft-pulse { 70% { box-shadow: 0 0 0 8px rgba(218,119,86,0); } 0% { box-shadow: 0 0 0 0 rgba(218,119,86,.6); } 100% { box-shadow: 0 0 0 0 rgba(218,119,86,0); } }
.xp-main h3 { margin: 0; font-size: clamp(19px, 1.7vw, 26px); font-weight: 600; letter-spacing: -0.025em; }
.xp-main h3 span { font-weight: 400; color: var(--ink-2); }
.xp-main p { max-width: 58ch; margin: 8px auto 0; font-size: clamp(14px, 1.05vw, 16px); line-height: 1.6; color: #515154; }

/* the lesson: a sticky note that slaps onto the row on hover */
.xp-note {
  position: absolute;
  right: clamp(-16px, -1vw, -8px); top: clamp(-18px, -1.4vw, -10px);
  width: 180px;
  padding: 14px 14px 16px;
  background: linear-gradient(170deg, #fff3a8, #fde98a);
  box-shadow: 0 10px 24px rgba(0,0,0,.12);
  font-family: var(--hand);
  font-size: 20px;
  line-height: 1.1;
  color: #3a3320;
  pointer-events: none;
  opacity: 0;
  transform: translateY(10px) rotate(10deg) scale(0.85);
  transform-origin: 70% 0;
  transition: opacity 0.25s var(--ease), transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.xp-note b { display: block; margin-bottom: 4px; font: 500 10px var(--mono); letter-spacing: 0.04em; text-transform: uppercase; color: #6b5d24; }
.xp-row:hover .xp-note, .xp-row:focus-visible .xp-note { opacity: 1; transform: rotate(4deg) scale(1); }

@media (max-width: 1200px) {
  .xp-note { position: static; width: auto; max-width: 320px; margin-top: 4px; opacity: 1; transform: rotate(-1deg); }
  .xp-row:hover .xp-note, .xp-row:focus-visible .xp-note { transform: rotate(1deg); }
}

/* ───────── Testimonials: orbit + endless arc of cards ───────── */
.kind {
  position: relative;
  overflow: hidden;
  height: max(820px, var(--app-h, 100svh));
  background: #fff;
}
/* behind the cards: two slow orbits of desk things */
.kind-sky { position: absolute; left: 50%; top: 45%; width: 0; height: 0; pointer-events: none; }
.ring {
  position: absolute;
  left: 0; top: 0;
  border: 1.5px solid rgba(107, 150, 208, 0.35);
  border-radius: 50%;
  translate: -50% -50%;
  animation: orbit 90s linear infinite;
}
.ring-out { width: min(640px, 80vw, 72vh); aspect-ratio: 1; }
.ring-in { width: min(450px, 58vw, 50vh); aspect-ratio: 1; animation-duration: 70s; animation-direction: reverse; border-style: dashed; }
@keyframes orbit { to { rotate: 360deg; } }
.orb {
  position: absolute;
  left: 50%; top: 50%;
  width: 0; height: 0;
  rotate: var(--a);
}
.orb-face {
  position: absolute;
  left: 0; top: 0;
  display: grid; place-items: center;
  width: 64px; height: 64px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 8px 22px rgba(30, 60, 110, 0.14), 0 0 0 1px rgba(0,0,0,.04);
  /* push out to the ring, then undo the rotations so the object stays upright */
  translate: -50% -50%;
  transform: translateY(calc(min(640px, 80vw, 72vh) / -2)) rotate(calc(-1 * var(--a)));
  animation: orbit-upright 90s linear infinite;
}
.orb-in .orb-face {
  width: 54px; height: 54px;
  transform: translateY(calc(min(450px, 58vw, 50vh) / -2)) rotate(calc(-1 * var(--a)));
  animation: orbit-upright-rev 70s linear infinite;
}
@keyframes orbit-upright { to { rotate: -360deg; } }
@keyframes orbit-upright-rev { to { rotate: 360deg; } }
.orb-face img { width: 38px; height: 38px; object-fit: contain; }
.orb-in .orb-face img { width: 32px; height: 32px; }
.orb-mascot { background: #fdeee8; }
.orb-mascot svg { width: 62%; }

.kind-head {
  position: absolute;
  left: 50%; top: 45%;
  translate: -50% -80%;
  z-index: 1;
  text-align: center;
  width: min(90vw, 560px);
}
.kind-head h2 { margin: 12px 0 0; font-size: clamp(30px, 3.2vw, 52px); font-weight: 600; line-height: 1.08; letter-spacing: -0.035em; }
.kind-note { margin: 14px 0 0; font-family: var(--hand); font-size: 22px; color: #3f6fb0; }

/* the arc */
.arc {
  position: absolute;
  left: 0; right: 0; top: 54%;
  height: 420px;
  z-index: 2;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.arc.is-dragging { cursor: grabbing; }
.tcard {
  position: absolute;
  left: 50%; top: 0;
  width: clamp(250px, 21vw, 320px);
  height: clamp(300px, 24vw, 360px);
  margin-left: calc(clamp(250px, 21vw, 320px) / -2);
  perspective: 1200px;
  outline: none;
  will-change: transform;
}
.tflip {
  position: relative;
  width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(0.34, 1.3, 0.64, 1);
}
.tcard.is-flipped .tflip { transform: rotateY(180deg); }
.tcard:focus-within .tface { box-shadow: 0 0 0 2px var(--accent); }
.tface {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 24px 24px 22px;
  border-radius: 22px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.tfront { background: #f4f4f3; color: var(--ink); box-shadow: 0 12px 30px rgba(0,0,0,.06); }
.tback { background: #0e0e10; color: #f5f5f7; transform: rotateY(180deg); box-shadow: 0 16px 40px rgba(0,0,0,.25); }
.ttag { font-size: 13px; color: var(--ink-2); }
.tback .ttag { color: #da7756; font-family: var(--mono); font-size: 12px; }
.tquote { flex: 1; margin: 22px 0 0; font-size: clamp(14px, 1.1vw, 17px); line-height: 1.5; letter-spacing: -0.005em; }
.tback .tquote { font-family: var(--hand); font-size: clamp(22px, 1.8vw, 28px); line-height: 1.15; }
.tperson { display: flex; align-items: center; gap: 12px; padding-right: 40px; }
.tperson b { display: block; font-size: 15px; font-weight: 600; }
.tperson small { display: block; margin-top: 1px; font-size: 12.5px; color: var(--ink-2); }
.tback .tperson small { color: #8e8e93; }
.tav { flex: none; width: 46px; height: 46px; border-radius: 50%; overflow: hidden; }
.tav img, .tav span { display: grid; place-items: center; width: 100%; height: 100%; object-fit: cover; font-size: 15px; font-weight: 600; color: var(--ink); }
.tturn {
  position: absolute;
  right: 18px; bottom: 22px;
  display: grid; place-items: center;
  width: 36px; height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  transition: rotate 0.5s var(--ease);
}
.tback .tturn { background: #2c2c2e; color: #f5f5f7; }
.tcard:hover .tturn { rotate: 180deg; }
.tturn svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.arc-bar {
  position: absolute;
  left: 50%; bottom: 2.5%;
  width: 200px; height: 4px;
  translate: -50% 0;
  border-radius: 4px;
  background: #ecebe8;
  overflow: hidden;
}
.arc-bar i { display: block; height: 100%; border-radius: 4px; background: #6b96d0; }

/* ───────── Footer: a soft panel with the signature cut off at its bottom edge ───────── */
.footer { padding: clamp(120px, 14vw, 220px) max(16px, 2.5vw) 0; background: #fff; }
.ft-panel {
  position: relative;
  overflow: hidden;
  border-radius: clamp(28px, 4vw, 56px);
  background: #f2f2f0;
  padding: clamp(40px, 5vw, 72px) clamp(24px, 6vw, 110px) 0;
}
.ft-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.7fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}
.ft-intro { max-width: 22ch; margin: 0; font-size: clamp(18px, 1.5vw, 22px); font-weight: 500; line-height: 1.3; letter-spacing: -0.015em; }
.ft-col h3 { margin: 0 0 12px; font-size: 14px; font-weight: 500; }
.ft-col a { display: block; margin: 0 0 6px; font-size: 13px; color: var(--ink-2); text-decoration: none; transition: color 0.2s; }
.ft-col a:hover { color: var(--ink); }
.ft-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ft-chips .ft-chip { margin: 0; padding: 5px 11px; border-radius: 99px; background: #fff; color: var(--ink); box-shadow: 0 0 0 1px rgba(0,0,0,.05); }
.ft-chips .ft-chip:hover { box-shadow: 0 0 0 1px rgba(0,0,0,.15); }
.ft-cta-list { display: grid; }
.ft-big {
  display: block;
  padding: 0 0 16px;
  border: 0;
  background: none;
  text-align: left;
  font: inherit;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
}
.ft-big + .ft-big { padding-top: 16px; border-top: 1px solid rgba(0,0,0,.08); }
.ft-big > span { display: inline-flex; align-items: center; gap: 10px; font-size: clamp(20px, 1.7vw, 26px); letter-spacing: -0.02em; }
.ft-big i { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); transition: rotate 0.4s var(--ease); }
.ft-big i svg { width: 12px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ft-big:hover i { rotate: 45deg; }
.ft-big small { display: block; margin-top: 2px; font-size: 13px; color: var(--ink-2); }
.ft-big-accent { color: var(--clay-text); }
.ft-big-accent i { background: #da7756; }
.ft-big:focus-visible, .ft-col a:focus-visible, .ft-top:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.ft-sign {
  height: 0.72em;
  margin: clamp(10px, 2vw, 30px) 0 0;
  text-align: center;
  font-family: var(--sign);
  font-size: clamp(150px, 26vw, 460px);
  line-height: 1;
  color: #cfcfcc;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}

.ft-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 18px clamp(24px, 6vw, 110px) 22px;
  font-size: 12px;
  color: var(--ink-2);
}
.ft-meta { display: flex; gap: 18px; }
.ft-top { padding: 0; border: 0; background: none; font: inherit; color: var(--ink-2); cursor: pointer; }
.ft-top:hover { color: var(--ink); }

@media (max-width: 760px) {
  .avatar.has-photo { width: 6em; }
  .kind { height: max(760px, var(--app-h, 100svh)); }
  .ring-in { display: none; }
  .ring-out { width: 92vw; }
  .orb-out .orb-face { width: 46px; height: 46px; transform: translateY(-46vw) rotate(calc(-1 * var(--a))); }
  .orb-face img { width: 28px; height: 28px; }
  .kind-sky, .kind-head { top: 30%; }
  .kind-head h2 { font-size: 28px; }
  .kind-note { font-size: 18px; }
  .arc { top: 50%; }
}

@media (max-width: 900px) {
  .ft-grid { grid-template-columns: 1fr 1fr; }
  .ft-intro, .ft-cta-list { grid-column: 1 / -1; }
}

/* ───────── Small screens ───────── */
@media (max-width: 760px), (max-aspect-ratio: 9/10) {
  .hero[data-mode] .intro {
    left: 20px; right: 120px; top: 32px;
    width: auto;
    transform: none;
    rotate: 0deg;
    text-align: left;
  }
  .role { margin-top: 10px; font-size: 15px; }
  .line { margin-top: 14px; font-size: 13px; }
  .modes button { padding: 10px 12px; font-size: 12px; }
  .modes svg { display: none; }
  /* Phones: resume moves into the menu */
  .nav-resume { display: none; }
  .menu-resume { display: flex !important; }
}

/* Lightbulb: click to switch on */
.photo > .state-on { opacity: 0; transition: opacity 0.35s var(--ease); }
.photo > .state-off { transition: opacity 0.35s var(--ease); }
.is-on .photo > .state-on { opacity: 1; }
.is-on .photo > .state-off { opacity: 0; }
.obj.is-on .obj-body {
  filter: drop-shadow(0 0 18px rgba(255, 196, 90, 0.75)) drop-shadow(0 0 48px rgba(255, 180, 60, 0.45));
}

/* ───────── Touch screens: every button at least 44px so it's easy to tap ───────── */
@media (pointer: coarse) {
  .nav-btn { --size: 44px; }
  .menu a { min-height: 44px; }
  .modes button { min-height: 44px; }
  .lock-skip { min-height: 44px; padding-inline: 22px; }
  .tturn { width: 44px; height: 44px; right: 14px; bottom: 18px; }
  .ft-col a { display: flex; align-items: center; min-height: 44px; margin: 0; }
  .ft-chips .ft-chip { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding-inline: 16px; }
  .ft-big { min-height: 44px; }
  .ft-top { min-height: 44px; }
}
