:root {
  --paper: #f2ede3;
  --paper-2: #e9e2d3;
  --paper-3: #ddd3c0;
  --ink: #1d1b17;
  --ink-2: #57514a;
  --ink-3: #8a8274;
  --line: #cfc5b1;
  --red: #cf4424;
  --green: #3d8a4e;
  --side-a: #cdbfa4;
  --side-b: #b9aa8c;
  --tape: rgba(214, 196, 150, .62);
  --shadow: rgba(40, 30, 15, .28);
  --f-display: "Fraunces", Georgia, "Times New Roman", serif;
  --f-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --f-hand: "Caveat", "Segoe Print", "Comic Sans MS", cursive;
  --gut: clamp(16px, 4vw, 48px);
  --maxw: 1240px;
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .1 0 0 0 0 .08 0 0 0 0 .05 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #151412;
    --paper-2: #1e1c18;
    --paper-3: #2a2722;
    --ink: #ece5d6;
    --ink-2: #b5ad9d;
    --ink-3: #847c6e;
    --line: #38332c;
    --red: #ef6744;
    --green: #6cc37e;
    --side-a: #3a352d;
    --side-b: #2b2721;
    --tape: rgba(120, 105, 75, .55);
    --shadow: rgba(0, 0, 0, .6);
    --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .95 0 0 0 0 .85 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; overflow-x: clip; }
.js:not(.rm) { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper) var(--noise);
  color: var(--ink);
  font: 400 17px/1.6 var(--f-sans);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
::selection { background: var(--red); color: var(--paper); }
a { color: inherit; }
a:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3, p { margin: 0; }
.mono { font-family: var(--f-mono); }
.hand { font-family: var(--f-hand); }
.wrap { max-width: var(--maxw); margin: 0 auto; padding-left: var(--gut); padding-right: var(--gut); }

.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 4px; font-size: 15px; }
.skip:focus { top: 12px; }

.label {
  font-family: var(--f-mono);
  font-size: 12.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.hanko { color: var(--red); display: block; }

/* ---------- header ---------- */
.top {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 36px);
  padding: 12px var(--gut);
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease;
}
.top.scrolled { border-bottom-color: var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 600 19px/1 var(--f-display); letter-spacing: .06em; }
.brand-hanko { width: 30px; height: 30px; transform: rotate(-9deg); }
.nav { display: flex; gap: clamp(12px, 2.2vw, 26px); font-size: 15px; }
.nav a { color: var(--ink-2); text-decoration: none; padding: 4px 0; }
.nav a:hover { color: var(--ink); text-decoration: underline wavy var(--red) 1.5px; text-underline-offset: 5px; }
.clock { margin-left: auto; display: flex; align-items: center; gap: 7px; font: 400 13px/1 var(--f-mono); color: var(--ink-2); white-space: nowrap; }
.clock-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 22%, transparent); }
.clock-where { color: var(--ink-3); }
.clock-state { color: var(--ink-3); font-style: italic; font-family: var(--f-sans); }
.clock-state::before { content: "· "; font-style: normal; }
.clock-state:empty { display: none; }

/* ---------- hero (static base) ---------- */
.hero { position: relative; overflow-x: clip; }
.hero-pin {
  max-width: 1400px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100svh;
  padding: 88px var(--gut) 40px;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: 2vw;
}
.hero-title {
  margin: 16px 0 22px;
  font-family: var(--f-display);
  font-weight: 380;
  font-variation-settings: "SOFT" 100, "WONK" 1;
  font-size: clamp(50px, min(8.4vw, 13.5vh), 132px);
  line-height: .9;
  letter-spacing: -.025em;
}
.hero-title em { font-style: italic; font-weight: 330; color: var(--red); }
.hero-lede { max-width: 34ch; font-size: clamp(17px, 1.45vw, 20px); line-height: 1.55; color: var(--ink-2); }
.circled { position: relative; white-space: nowrap; color: var(--ink); }
.circled .draw { position: absolute; left: -9%; top: -38%; width: 118%; height: 176%; overflow: visible; pointer-events: none; }
.draw path { fill: none; stroke: var(--red); stroke-width: 3.6; stroke-linecap: round; }
.js .draw path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.3s cubic-bezier(.6, .05, .3, 1) .5s; }
.js .ready .draw path { stroke-dashoffset: 0; }

.legend { list-style: none; margin: 30px 0 0; padding: 0; max-width: 430px; border-top: 1.5px solid var(--ink); }
.legend li { display: flex; align-items: baseline; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 15.5px; color: var(--ink-3); transition: color .35s ease, padding-left .35s ease; }
.legend b { font: 500 12px/1 var(--f-mono); color: var(--ink-3); transition: color .35s; }
.legend span { margin-left: auto; font-family: var(--f-hand); font-size: 19px; line-height: 1; }
.legend li.on { color: var(--ink); padding-left: 8px; }
.legend li.on b { color: var(--red); }
.hint { margin-top: 22px; display: flex; align-items: center; gap: 8px; font: 400 13px/1.3 var(--f-mono); color: var(--ink-3); transition: opacity .3s; }
.hint svg { width: 26px; height: 26px; flex: none; }
.hint path { fill: none; stroke: var(--red); stroke-width: 2; stroke-linecap: round; }
.rm .hint, html:not(.js) .hint { display: none; }

/* ---------- 3D stack ---------- */
.stage {
  position: relative;
  height: min(720px, 82vh);
  display: grid;
  place-items: center;
  perspective: 1700px;
  perspective-origin: 50% 32%;
}
.stack {
  --s: min(360px, 34vw);
  --t: 16px;
  position: relative;
  width: var(--s);
  height: var(--s);
  transform-style: preserve-3d;
  transform: rotateX(var(--rx, 58deg)) rotateZ(var(--rz, -34deg)) translateZ(var(--lift, -126px));
}
.js:not(.rm) .stack { will-change: transform; }
.slab {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform: translateZ(var(--z, calc(var(--i) * 62px))) rotateZ(var(--tw, calc(var(--i) * 4deg)));
}
.face { position: absolute; }
.side {
  border: 1.5px solid var(--ink);
  background: repeating-linear-gradient(135deg, var(--side-a) 0 3px, var(--side-b) 3px 7px);
  backface-visibility: hidden;
}
.s-f { left: 0; width: 100%; top: calc(100% - var(--t)); height: var(--t); transform-origin: 50% 100%; transform: rotateX(-90deg); }
.s-r { top: 0; height: 100%; left: calc(100% - var(--t)); width: var(--t); transform-origin: 100% 50%; transform: rotateY(90deg); }
.s-b { left: 0; width: 100%; top: 0; height: var(--t); transform-origin: 50% 0; transform: rotateX(90deg); }
.s-l { top: 0; height: 100%; left: 0; width: var(--t); transform-origin: 0 50%; transform: rotateY(-90deg); }
.top-face {
  inset: 0;
  transform: translateZ(var(--t));
  padding: 8% 9%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--paper-2);
  border: 1.5px solid var(--ink);
  transition: background-color .4s ease, border-color .4s ease, box-shadow .4s ease;
}
.slab.on .top-face { background: var(--paper); border-color: var(--red); box-shadow: inset 0 0 0 2px var(--red); }
.tf-row { display: flex; justify-content: space-between; align-items: flex-start; }
.tf-num { font: italic 340 calc(var(--s) * .2)/.8 var(--f-display); font-variation-settings: "SOFT" 100, "WONK" 1; color: var(--ink); transition: color .4s; }
.slab.on .tf-num { color: var(--red); }
.tf-doodle { width: 38%; height: auto; overflow: visible; }
.tf-doodle path, .tf-doodle circle { fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.tf-name { font: 500 calc(var(--s) * .088)/1.05 var(--f-display); letter-spacing: -.01em; }
.tf-sub { margin-top: 2px; font: 600 calc(var(--s) * .062)/1.1 var(--f-hand); color: var(--ink-2); }
.tf-tags { margin-top: 8px; font: 400 calc(var(--s) * .036)/1.3 var(--f-mono); color: var(--ink-3); }
.floor {
  position: absolute;
  inset: -22%;
  transform: translateZ(-1px);
  background: radial-gradient(closest-side, var(--shadow), transparent 72%);
  opacity: var(--floor-o, .9);
}
.stage-note {
  position: absolute;
  transition: opacity .2s linear;
  right: 3%;
  bottom: 9%;
  max-width: 14ch;
  font-size: 23px;
  line-height: 1.05;
  color: var(--red);
  transform: rotate(-5deg);
}
.stage-note::before {
  content: "";
  position: absolute;
  left: -46px;
  top: -30px;
  width: 44px;
  height: 36px;
  border-left: 2px solid var(--red);
  border-top: 2px solid var(--red);
  border-radius: 40px 0 0 0;
  transform: rotate(-12deg);
}
.layer-cap { display: none; }

/* pinned behaviour only with JS + motion allowed */
.js:not(.rm) .hero { height: 330vh; }
.js:not(.rm) .hero-pin { position: sticky; top: 0; height: 100vh; height: 100svh; min-height: 0; }

/* ---------- intro ---------- */
.intro { padding-top: clamp(90px, 14vh, 150px); padding-bottom: 40px; }
.intro-text {
  margin-top: 18px;
  max-width: 34ch;
  font: 330 clamp(26px, 3.2vw, 44px)/1.22 var(--f-display);
  font-variation-settings: "SOFT" 100;
  letter-spacing: -.012em;
}

/* ---------- section heads ---------- */
.sec-head {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  column-gap: 20px;
  align-items: end;
  margin-bottom: clamp(36px, 6vh, 64px);
}
.sec-head .label { padding-bottom: 14px; }
.sec-head h2, .deck-head h2 {
  font: 380 clamp(42px, 6.4vw, 92px)/.94 var(--f-display);
  font-variation-settings: "SOFT" 100, "WONK" 1;
  letter-spacing: -.022em;
}
.sec-note { grid-column: 2; margin-top: 10px; font-size: 25px; color: var(--red); transform: rotate(-1.5deg); transform-origin: left; }
.fold { perspective: 900px; }
[data-fold] { transform-origin: 50% 100%; transform: rotateX(var(--fold, 0deg)); opacity: var(--fo, 1); }
.js:not(.rm) [data-fold] { --fold: 72deg; --fo: 0; }

/* ---------- skills ---------- */
.skills { padding-top: clamp(80px, 12vh, 130px); padding-bottom: 60px; }
.skill-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(28px, 6vw, 96px);
}
.skill {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  column-gap: 12px;
  padding: 26px 0 34px;
  border-top: 1.5px solid var(--ink);
}
.skill:nth-child(even) { margin-top: 72px; }
.skill-n { font: 500 13px/1 var(--f-mono); color: var(--red); padding-top: 12px; }
.skill h3 { grid-column: 2; font: 480 clamp(25px, 2.4vw, 31px)/1.15 var(--f-display); letter-spacing: -.01em; margin-bottom: 10px; }
.skill p { grid-column: 2; color: var(--ink-2); }
.skill .eg { margin-top: 16px; font: 500 21px/1.2 var(--f-hand); color: var(--ink); }
.skill .eg span { display: block; margin-bottom: 4px; font: 400 11px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.js:not(.rm) [data-rise] {
  opacity: 0;
  transform: perspective(900px) translateY(46px) rotateX(-24deg);
  transform-origin: 50% 0;
  transition: opacity .8s ease, transform 1s cubic-bezier(.2, .75, .2, 1);
}
.js:not(.rm) [data-rise].in { opacity: 1; transform: none; }

/* ---------- deck (static base: plain list) ---------- */
.deck { padding-top: clamp(80px, 12vh, 140px); }
.deck-head { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 24px; row-gap: 6px; }
.deck-head .label { flex: none; width: 110px; }
.deck-count { margin-left: auto; font-size: 14px; color: var(--ink-3); }
.deck-count span { color: var(--red); }
.deck-bar { display: none; }
.deck-stage { display: grid; gap: 34px; max-width: var(--maxw); margin: 42px auto 0; padding: 0 var(--gut) 40px; }
.card { position: relative; }
.card-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(18px, 3vw, 34px);
  min-height: 100%;
  padding: clamp(22px, 3vw, 34px);
  background: var(--paper);
  background-image: var(--noise);
  border: 1.5px solid var(--ink);
  box-shadow: 0 34px 60px -38px var(--shadow);
  transition: transform .35s ease;
  transform: rotateX(var(--ty, 0deg)) rotateY(var(--tx, 0deg));
}
.card-inner::before {
  content: "";
  position: absolute;
  top: -13px;
  left: 50%;
  width: 118px;
  height: 26px;
  margin-left: -59px;
  background: var(--tape);
  transform: rotate(-2.5deg);
  clip-path: polygon(3% 0, 97% 4%, 100% 50%, 96% 100%, 2% 94%, 0 48%);
  opacity: calc(1 - var(--dim, 0) * 2.4);
}
.card-inner::after {
  content: "";
  position: absolute;
  inset: -1px;
  background: var(--paper);
  opacity: var(--dim, 0);
  pointer-events: none;
}
.card-text { display: flex; flex-direction: column; }
.card-tag { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.card h3 { margin: 10px 0 14px; font: 420 clamp(34px, 4.2vw, 56px)/1 var(--f-display); font-variation-settings: "SOFT" 100, "WONK" 1; letter-spacing: -.02em; }
.card-text > p:not(.card-tag):not(.card-stack) { color: var(--ink-2); font-size: 16px; }
.card-stack { margin-top: auto; padding-top: 18px; font-size: 13px; color: var(--ink-3); }
.card-link { align-self: flex-start; margin-top: 10px; font: 500 14px/1 var(--f-mono); color: var(--red); text-decoration: none; border-bottom: 1.5px solid currentColor; padding-bottom: 3px; }
.card-link:hover { border-bottom-style: dashed; }

.card-vis {
  position: relative;
  min-height: 220px;
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  background: var(--paper-2);
  overflow: hidden;
}
.vis-label { position: absolute; top: 12px; left: 14px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }

.vis-status { padding: 44px 18px 18px; display: flex; flex-direction: column; }
.vis-status ul { list-style: none; margin: 0; padding: 0; }
.vis-status li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--line); font: 500 15px/1 var(--f-mono); }
.vis-status li span { margin-left: auto; font-size: 12px; color: var(--green); }
.vis-status i { width: 9px; height: 9px; border-radius: 50%; background: var(--green); animation: pulse 2.4s ease-in-out infinite; }
.vis-status li:nth-child(2) i { animation-delay: .6s; }
.vis-status li:nth-child(3) i { animation-delay: 1.2s; }
.vis-status li:nth-child(4) i { animation-delay: 1.8s; }
.vis-foot { margin-top: auto; padding-top: 12px; font-size: 11.5px; color: var(--ink-3); }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 45%, transparent); } 50% { box-shadow: 0 0 0 6px transparent; } }

.vis-graph { padding: 40px 14px 14px; }
.vis-graph svg { width: 100%; height: calc(100% - 4px); min-height: 160px; overflow: visible; }
.vis-graph path { fill: none; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.g-grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 4; }
.g-a { stroke: var(--ink); stroke-width: 2.2; }
.g-b { stroke: var(--red); stroke-width: 2.2; }

.vis-cams { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr auto; gap: 6px; padding: 8px; background: #1b1a17; border-color: var(--ink); }
.cam { position: relative; min-height: 70px; border-radius: 3px; background: linear-gradient(160deg, #3c3a33, #24231f 70%); background-image: var(--noise), linear-gradient(160deg, #46433a, #22211d 70%); overflow: hidden; }
.cam:nth-child(2) { background-image: var(--noise), linear-gradient(200deg, #3a4040, #1f2322 70%); }
.cam:nth-child(3) { background-image: var(--noise), linear-gradient(120deg, #403a33, #201d1a 70%); }
.cam:nth-child(4) { background-image: var(--noise), linear-gradient(170deg, #353b44, #1c1f24 70%); }
.cam span { position: absolute; left: 7px; top: 6px; font: 500 10px/1 var(--f-mono); color: #e8e1d0; letter-spacing: .06em; }
.cam b { position: absolute; right: 8px; top: 7px; width: 7px; height: 7px; border-radius: 50%; background: #ef5a3c; animation: blink 1.4s steps(2, start) infinite; }
.cam-time { grid-column: 1 / -1; padding: 4px 4px 2px; font-size: 11.5px; color: #cfc6b3; text-align: right; }
@keyframes blink { to { visibility: hidden; } }

.vis-phone { display: grid; place-items: center; padding: 16px; background: var(--paper-3); }
.phone {
  width: 150px;
  min-height: 236px;
  padding: 18px 14px 14px;
  border: 2px solid var(--ink);
  border-radius: 24px;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transform: rotate(4deg);
  box-shadow: 0 20px 30px -22px var(--shadow);
}
.ph-wx { display: flex; align-items: center; gap: 6px; font: 400 11px/1 var(--f-mono); color: var(--ink-3); }
.ph-wx i { width: 11px; height: 11px; border-radius: 50%; background: #e7a83a; box-shadow: 0 0 0 3px color-mix(in srgb, #e7a83a 30%, transparent); }
.ph-title { margin: 6px 0 4px; font: 500 19px/1.1 var(--f-display); }
.ph-field { padding: 7px 8px; border: 1px solid var(--line); border-radius: 6px; font: 400 10.5px/1 var(--f-mono); color: var(--ink-3); }
.ph-btn { margin-top: 4px; padding: 8px; border-radius: 6px; background: var(--red); color: #fff; text-align: center; font: 600 12px/1 var(--f-sans); }
.ph-alt { font: 600 15px/1 var(--f-hand); color: var(--ink-2); text-align: center; }

.vis-term { background: #1b1a17; border-color: var(--ink); display: flex; align-items: center; padding: 18px; }
.vis-term pre { margin: 0; font: 400 11.6px/1.75 var(--f-mono); color: #e6dfcf; white-space: pre-wrap; overflow-wrap: anywhere; }
.vis-term .p { color: #ef7a5b; }
.caret { display: inline-block; width: 8px; height: 15px; vertical-align: -3px; background: #e6dfcf; animation: blink 1.1s steps(2, start) infinite; }

.vis-flash { display: grid; place-items: center; background: var(--paper-3); }
.flash {
  grid-area: 1 / 1;
  width: 64%;
  aspect-ratio: 1.55;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  box-shadow: 0 16px 26px -20px var(--shadow);
}
.flash-back { transform: translate(14%, 10%) rotate(7deg); font: 500 15px/1.3 var(--f-sans); color: var(--ink-2); }
.flash-back .kana { font-size: 17px; color: var(--ink); }
.flash-front { transform: translate(-10%, -8%) rotate(-5deg); }
.kanji { font: 500 clamp(40px, 4.4vw, 58px)/1 "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", var(--f-display); }

/* deck pinned 3D mode */
.js:not(.rm) .deck { height: calc(var(--n) * 78vh + 100vh); padding-top: 0; }
.js:not(.rm) .deck-pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: flex; flex-direction: column; padding-top: 86px; }
.js:not(.rm) .deck-head { position: relative; z-index: 3; padding-bottom: 12px; background: var(--paper) var(--noise); }
.js:not(.rm) .deck-bar { display: block; flex-basis: 100%; height: 1.5px; background: var(--line); margin-top: 10px; }
.js:not(.rm) .deck-bar i { display: block; height: 100%; width: 0; background: var(--red); }
.js:not(.rm) .deck-stage {
  position: relative;
  flex: 1;
  display: block;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  perspective: 1800px;
  perspective-origin: 50% 0%;
  transform-style: preserve-3d;
}
.js:not(.rm) .card {
  position: absolute;
  left: 50%;
  top: 52%;
  width: min(860px, calc(100vw - 2 * var(--gut)));
  height: min(460px, 64vh);
  transform-origin: 50% 0%;
  transform-style: preserve-3d;
  will-change: transform, opacity;
}
.js:not(.rm) .card-inner { height: 100%; }

/* ---------- log slips ---------- */
.log { padding-top: clamp(100px, 14vh, 160px); padding-bottom: 40px; overflow-x: clip; }
.slips { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px 26px; }
.slip {
  position: relative;
  padding: 20px 22px 24px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-top: 2px dashed var(--line);
  box-shadow: 0 22px 30px -26px var(--shadow);
  transform: rotate(var(--r, 0deg));
}
.slip time { display: block; margin-bottom: 8px; font: 500 12px/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--red); }
.slip p { font-size: 16px; line-height: 1.55; }
.js:not(.rm) .slip {
  opacity: 0;
  transform: perspective(1000px) rotateY(-32deg) translate3d(0, 0, -80px) rotate(var(--r, 0deg));
  transition: opacity .7s ease calc(var(--k) * 90ms), transform 1.1s cubic-bezier(.2, .75, .2, 1) calc(var(--k) * 90ms);
}
.js:not(.rm) .slip.in { opacity: 1; transform: perspective(1000px) rotate(var(--r, 0deg)); }

/* ---------- tools ---------- */
.tools { padding-top: 90px; padding-bottom: 20px; }
.tools-list { margin-top: 18px; max-width: 76ch; font-size: 15px; line-height: 2.1; color: var(--ink-2); }
.tools-list i { font-style: normal; color: var(--red); margin: 0 .25em; }

/* ---------- contact ---------- */
.contact { padding-top: clamp(110px, 16vh, 180px); padding-bottom: 90px; }
.contact-title {
  margin-top: 18px;
  max-width: 15ch;
  font: 380 clamp(42px, 7vw, 108px)/.95 var(--f-display);
  font-variation-settings: "SOFT" 100, "WONK" 1;
  letter-spacing: -.025em;
}
.contact-lede { margin-top: 26px; max-width: 42ch; font-size: clamp(17px, 1.5vw, 20px); color: var(--ink-2); }
.contact-soon { margin-top: 30px; font-size: 26px; color: var(--red); transform: rotate(-1.5deg); transform-origin: left; }
.contact-links { list-style: none; margin: 34px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 14px 40px; }
.contact-links a { font: italic 400 clamp(26px, 3vw, 38px)/1.1 var(--f-display); text-decoration: underline 1.5px var(--line); text-underline-offset: 8px; }
.contact-links a:hover { text-decoration: underline wavy var(--red) 1.5px; }
.contact-links span { font-style: normal; font-size: .6em; color: var(--red); vertical-align: .35em; }

/* ---------- footer ---------- */
.foot { display: flex; align-items: center; gap: 18px; padding-top: 26px; padding-bottom: 46px; border-top: 1.5px solid var(--ink); font-size: 15px; color: var(--ink-2); }
.foot-hanko { width: 64px; height: 64px; flex: none; transform: rotate(-11deg); }
.foot .mono { font-size: 12.5px; color: var(--ink-3); }
.to-top { margin-left: auto; font-size: 13px; text-decoration: none; color: var(--ink-2); }
.to-top:hover { color: var(--red); }

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  .slips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav { display: none; }
}

@media (max-width: 860px) {
  body { font-size: 16px; }
  .clock-where { display: none; }
  .hero-pin {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    align-items: start;
    gap: 0;
    padding-top: 74px;
    padding-bottom: 16px;
  }
  .hero-title { font-size: clamp(44px, 12.5vw, 76px); margin: 10px 0 14px; }
  .hero-lede { font-size: 16.5px; max-width: 40ch; }
  .legend, .stage-note, .hint { display: none; }
  .stage { height: 100%; min-height: 330px; }
  .stack { --s: min(240px, 58vw); --t: 12px; }
  .layer-cap {
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 4px;
    text-align: center;
    font-size: 12.5px;
    color: var(--ink-2);
  }
  .sec-head { grid-template-columns: minmax(0, 1fr); }
  .sec-head .label { padding-bottom: 8px; }
  .sec-note { grid-column: 1; font-size: 22px; }
  .skill-list { grid-template-columns: minmax(0, 1fr); }
  .skill:nth-child(even) { margin-top: 0; }
  .deck-head .label { width: auto; flex-basis: 100%; }
  .deck-head h2 { font-size: clamp(34px, 9vw, 52px); }
  .card-inner { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: 16px; }
  .card-vis { order: -1; min-height: 130px; }
  .card h3 { margin: 6px 0 8px; font-size: clamp(30px, 8vw, 40px); }
  .card-text > p:not(.card-tag):not(.card-stack) { font-size: 14.5px; line-height: 1.5; }
  .card-stack { padding-top: 10px; font-size: 12px; }
  .vis-status { padding-top: 34px; }
  .vis-status li { padding: 6px 0; font-size: 13px; }
  .vis-status .vis-foot { display: none; }
  .vis-graph svg { min-height: 90px; }
  .vis-cams .cam { min-height: 44px; }
  .phone { width: 128px; min-height: 0; padding: 12px; gap: 5px; transform: rotate(3deg) scale(.86); }
  .ph-field:nth-of-type(2), .ph-alt { display: none; }
  .vis-term pre { font-size: 11px; line-height: 1.6; }
  .flash { width: 52%; }
  .js:not(.rm) .deck-pin { padding-top: 70px; }
  .js:not(.rm) .card { top: 50%; height: min(560px, 72vh); }
  .slips { grid-template-columns: minmax(0, 1fr); }
  .foot { flex-wrap: wrap; }
  .to-top { margin-left: 82px; }
}

@media (max-width: 380px) {
  .clock-state { display: none; }
}
