/* Shinnosuke Horiuchi — v3
   Chapters change the whole page colour: night / ultramarine (from the blue jacket) / fog. */
:root {
  --night: #0A0B0F;
  --ultra: #2B2FE0;
  --fog: #E9EAED;
  --peri: #A3A7FF;

  --bg: var(--night);
  --fg: #F2F3F5;
  --dim: #8D92A2;
  --line: rgba(255, 255, 255, .14);
  --accent: #A3A7FF;

  --f-sans: "Archivo", system-ui, sans-serif;
  --f-ja: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", sans-serif;
  --f-min: "Shippori Mincho B1", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --f-mono: "IBM Plex Mono", ui-monospace, monospace;

  --gut: clamp(18px, 3.2vw, 48px);
  --ease: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-stopped { overflow: clip; }
.lenis [data-lenis-prevent] { overscroll-behavior: contain; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
:root[lang="ja"] body { font-family: var(--f-ja); font-size: 16px; line-height: 1.9; letter-spacing: .02em; font-feature-settings: "palt"; }
img, video, canvas, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
::selection { background: var(--ultra); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 200; background: #fff; color: #000; padding: 8px 14px; }
.skip:focus { left: 8px; }
.mono { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .09em; text-transform: uppercase; font-weight: 400; }
.dim { color: var(--dim); }
main { position: relative; z-index: 1; }

/* ---------- display type ---------- */
.d-xl {
  margin: 0;
  font-family: var(--f-sans);
  font-weight: 800;
  font-variation-settings: "wdth" 125;
  font-size: clamp(34px, 11.4vw, 210px);
  line-height: .8;
  letter-spacing: -.04em;
  text-transform: uppercase;
}
.split .ln { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; white-space: nowrap; }
.split .ch { display: inline-block; will-change: transform; }
.label { display: flex; gap: 14px; align-items: center; color: var(--dim); margin: 0 0 22px; }
.label::before { content: ""; width: 26px; height: 1px; background: currentColor; }
.label b { color: var(--accent); font-weight: 400; }

/* ---------- chrome ---------- */
.stage { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.stage canvas { width: 100% !important; height: 100% !important; }
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 55; background: var(--accent); transform-origin: left; transform: scaleX(0); }
.grain {
  position: fixed; inset: -50%; z-index: 60; pointer-events: none; opacity: .055;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1.1s steps(6) infinite;
}
@keyframes grain { 0% { transform: translate(0, 0); } 20% { transform: translate(-4%, 3%); } 40% { transform: translate(3%, -5%); } 60% { transform: translate(-6%, 2%); } 80% { transform: translate(5%, 4%); } 100% { transform: translate(0, 0); } }

.bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px var(--gut); color: var(--fg); pointer-events: none;
}
.bar > * { pointer-events: auto; }
/* a soft band in the chapter colour keeps the bar readable over text that scrolls under it */
.bar::before { content: ""; position: absolute; inset: 0 0 -30px; z-index: -1; pointer-events: none; background: linear-gradient(to bottom, var(--bg) 0%, var(--bg) 42%, color-mix(in srgb, var(--bg) 72%, transparent) 70%, transparent 100%); }
.bar-name { display: flex; align-items: baseline; gap: 14px; white-space: nowrap; }
.bar-name b { font-family: var(--f-min); font-weight: 700; font-size: 17px; letter-spacing: .16em; }
.bar-name .mono { color: var(--dim); }
.bar-tools { display: flex; align-items: center; gap: 10px; }
.bar-section { color: var(--dim); margin-right: 8px; min-width: 7em; text-align: right; }
.pill {
  height: 36px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap;
  transition: background-color .3s;
}
.pill:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.round { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; transition: background-color .3s; }
.round:hover { background: var(--fg); color: var(--bg); }
.round svg { width: 18px; height: 18px; }
.lang { display: inline-flex; height: 36px; padding: 3px; border-radius: 999px; border: 1px solid var(--line); }
.lang button { padding: 0 11px; border-radius: 999px; font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; }
.lang button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }

.menu {
  position: fixed; inset: 0; z-index: 70; background: var(--ultra); color: #fff;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: end;
  padding: 96px var(--gut) 36px; clip-path: inset(0 0 100% 0); visibility: hidden;
}
.menu-close { position: absolute; top: 18px; right: var(--gut); border-color: rgba(255,255,255,.4); }
.menu-close:hover { background: #fff; color: var(--ultra); }
.menu-links { list-style: none; margin: 0; padding: 0; }
.menu-links li { overflow: hidden; }
.menu-links a { display: flex; align-items: baseline; gap: 18px; padding: .04em 0; }
.menu-links .big {
  display: inline-block; font-weight: 800; font-variation-settings: "wdth" 125;
  font-size: clamp(34px, 6.4vw, 104px); line-height: .92; letter-spacing: -.035em; text-transform: uppercase;
  transition: transform .6s var(--ease), color .3s;
}
.menu-links a:hover .big { transform: translateX(24px); }
.menu-links small { font-family: var(--f-ja); font-size: 13px; letter-spacing: .12em; opacity: .7; }
.menu-side { display: grid; gap: 10px; text-align: right; color: rgba(255,255,255,.8); }
.menu-side a:hover { color: #fff; text-decoration: underline; }

.cursor {
  position: fixed; left: 0; top: 0; z-index: 95; pointer-events: none;
  width: 36px; height: 36px; margin: -18px 0 0 -18px; border-radius: 50%;
  border: 1px solid var(--fg); display: grid; place-items: center;
  transition: width .45s var(--ease), height .45s var(--ease), margin .45s var(--ease), background .3s, border-color .3s, opacity .3s;
  opacity: 0;
}
.cursor span { font-family: var(--f-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--bg); opacity: 0; transition: opacity .2s; white-space: nowrap; }
.cursor.is-on { opacity: 1; }
.cursor.is-link { width: 60px; height: 60px; margin: -30px 0 0 -30px; }
.cursor.is-label { width: 96px; height: 96px; margin: -48px 0 0 -48px; background: var(--fg); }
.cursor.is-label span { opacity: 1; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* ---------- loader ---------- */
.loader { position: fixed; inset: 0; z-index: 100; background: var(--night); color: #F2F3F5; display: grid; grid-template-rows: 1fr auto auto; padding: var(--gut); }
.loader-count { align-self: end; font-weight: 800; font-variation-settings: "wdth" 125; font-size: clamp(88px, 19vw, 320px); line-height: .78; letter-spacing: -.05em; }
.loader-bar { height: 1px; margin-top: 22px; background: rgba(255,255,255,.14); position: relative; overflow: hidden; }
.loader-bar i { position: absolute; inset: 0; background: #F2F3F5; transform-origin: left; transform: scaleX(0); }
.loader-row { display: flex; justify-content: space-between; gap: 16px; margin-top: 14px; color: #8D92A2; }
html.skip-loader .loader { display: none; }

/* ---------- hero ---------- */
.hero { position: relative; height: 100svh; min-height: 620px; padding: 96px var(--gut) clamp(22px, 3vw, 40px); display: grid; grid-template-rows: auto 1fr auto; }
.hero-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px); }
.hero-lead { grid-column: 2; margin: 0; font-size: clamp(15px, 1.1vw, 18px); line-height: 1.6; }
:root[lang="ja"] .hero-lead { font-size: clamp(14px, 1vw, 16px); line-height: 1.95; }
.hero-meta { grid-column: 2; display: flex; flex-wrap: wrap; gap: 4px 18px; color: var(--dim); margin-top: 16px; word-break: keep-all; overflow-wrap: anywhere; }
.hero-name { visibility: hidden; grid-row: 3; margin: 0; font-weight: 800; font-variation-settings: "wdth" var(--wdth, 125); font-size: 11vw; line-height: .8; letter-spacing: -.045em; text-transform: uppercase; white-space: nowrap; }
.hero-name.is-fit { visibility: visible; }
.hero-name .ln { display: block; overflow: hidden; padding-bottom: .05em; margin-bottom: -.05em; }
.hero-name .ln > span { display: inline-block; }
.hero-name .ch { display: inline-block; }
.hero-ja { position: absolute; right: var(--gut); top: 96px; margin: 0; writing-mode: vertical-rl; font-family: var(--f-min); font-weight: 700; font-size: var(--ja-size); line-height: 1.5; letter-spacing: .55em; }
.hero { --ja-size: clamp(15px, 1.25vw, 20px); }
@media (min-width: 641px) { .hero-top { padding-right: calc(var(--ja-size) * 1.5 + 24px); } }
.hero-cue { position: absolute; right: var(--gut); bottom: clamp(22px, 3vw, 40px); display: flex; align-items: center; gap: 12px; color: var(--dim); }
.hero-cue i { width: 44px; height: 1px; background: currentColor; transform-origin: left; animation: cue 2.2s var(--ease) infinite; }
@keyframes cue { 0% { transform: scaleX(0); } 50% { transform: scaleX(1); transform-origin: left; } 51% { transform-origin: right; } 100% { transform: scaleX(0); transform-origin: right; } }

/* ---------- news ---------- */
.news { padding: clamp(80px, 9vw, 140px) var(--gut); }
.news-list { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--line); }
.news-list li { display: grid; grid-template-columns: 8.5em minmax(0, 720px); gap: 12px clamp(16px, 3vw, 48px); padding: 18px 0; border-top: 1px solid var(--line); }
.news-list time { color: var(--dim); padding-top: .3em; }
@media (max-width: 640px) { .news-list li { grid-template-columns: minmax(0, 1fr); gap: 6px; } }

/* ---------- statement ---------- */
.manifesto { position: relative; height: 100svh; }
.manifesto-inner { height: 100%; padding: 0 var(--gut); display: grid; align-content: center; }
.manifesto-text { margin: 0; max-width: 1280px; font-weight: 300; font-size: clamp(26px, 3.45vw, 60px); line-height: 1.16; letter-spacing: -.018em; }
:root[lang="ja"] .manifesto-text { max-width: 1180px; font-family: var(--f-min); font-weight: 600; font-size: clamp(21px, 2.55vw, 44px); line-height: 1.8; letter-spacing: .05em; }
.manifesto-text .w { opacity: .13; }
.manifesto-text .key { color: var(--accent); font-style: italic; font-weight: 600; font-variation-settings: "wdth" 112; }
:root[lang="ja"] .manifesto-text .key { font-style: normal; font-weight: 800; }
.manifesto-foot { color: var(--dim); margin-top: 36px; word-break: keep-all; overflow-wrap: anywhere; }

/* ---------- research: one theme at a time beside a particle shape ---------- */
/* layout classes are set by app.js (layoutResearch): themes--stack (shape above, text below), themes--short (low screens);
   --k scales the text on low screens so each block fits */
.themes { position: relative; --k: 1; }
.themes-pin { height: 100svh; overflow: hidden; position: relative; }
/* the blocks share one grid cell in the left column, so they sit in the same place and swap */
.themes-col { position: absolute; left: var(--gut); top: 84px; bottom: 84px; width: min(40vw, 600px); display: grid; align-items: center; }
.themes-col > * { grid-area: 1 / 1; min-width: 0; }
.themes-intro .d-xl { margin-top: 4px; font-size: calc(clamp(34px, 11.4vw, 210px) * var(--k)); }
.themes-toc { list-style: none; margin: calc(32px * var(--k)) 0 0; padding: 0; }
.themes-toc li { display: flex; gap: 16px; align-items: baseline; padding: calc(10px * var(--k)) 0; border-top: 1px solid var(--line); font-size: calc(clamp(15px, 1.1vw, 18px) * var(--k)); }
.themes-toc li:last-child { border-bottom: 1px solid var(--line); }
.themes-toc .mono { color: var(--dim); }
.theme h3 .nw, .themes-toc .nw { white-space: nowrap; }
.theme-no { margin: 0 0 calc(18px * var(--k)); color: var(--accent); }
.theme .label { margin-bottom: calc(14px * var(--k)); }
.theme h3 { margin: 0; font-weight: 700; font-variation-settings: "wdth" 116; font-size: calc(clamp(30px, 3.4vw, 60px) * var(--k)); line-height: .98; letter-spacing: -.03em; }
:root[lang="ja"] .theme h3 { font-family: var(--f-min); font-weight: 800; font-size: calc(clamp(26px, 2.6vw, 48px) * var(--k)); line-height: 1.3; letter-spacing: .03em; }
.theme-body { margin: calc(22px * var(--k)) 0 0; max-width: 42ch; font-size: max(11px, calc(clamp(15px, 1.1vw, 19px) * var(--k))); line-height: 1.65; }
:root[lang="ja"] .theme-body { max-width: 30em; font-size: max(11px, calc(clamp(14px, 1vw, 17px) * var(--k))); line-height: 2; }
/* progress: four ticks at the bottom left */
.themes-ticks { position: absolute; left: var(--gut); bottom: 30px; display: flex; gap: 10px; list-style: none; margin: 0; padding: 0; }
.themes-ticks li { width: 56px; color: var(--dim); }
.themes-ticks i { display: block; height: 2px; background: var(--line); margin-bottom: 8px; transition: background .4s; }
.themes-ticks li.is-on { color: var(--fg); }
.themes-ticks li.is-on i { background: var(--accent); }
/* low screens (a phone on its side): the text from just under the bar to the bottom, the ticks at the bottom right under the shape */
.themes--short .themes-col { top: 80px; bottom: 12px; }
.themes--short .themes-ticks { left: auto; right: var(--gut); bottom: 10px; }
/* stacked: the shape above, the text in the lower half */
.themes--stack .themes-col { top: calc(55svh + 60px); bottom: 20px; right: var(--gut); width: auto; align-items: start; }
.themes--stack .themes-ticks { left: var(--gut); right: auto; top: 55svh; bottom: auto; }
.themes--stack .themes-toc { margin-top: 20px; }
.themes--stack .theme-no { margin-bottom: 10px; }
.themes--stack .theme .label { margin-bottom: 8px; }
.themes--stack .theme h3 { font-size: calc(clamp(24px, 6.4vw, 44px) * var(--k)); }
:root[lang="ja"] .themes--stack .theme h3 { font-size: calc(clamp(21px, 5.4vw, 36px) * var(--k)); }
.themes--stack .theme-body { margin-top: 14px; font-size: max(11px, calc(14px * var(--k))); line-height: 1.6; }
:root[lang="ja"] .themes--stack .theme-body { font-size: max(11px, calc(13.5px * var(--k))); line-height: 1.85; }

/* ---------- profile ---------- */
.profile { padding: clamp(110px, 14vw, 210px) var(--gut); }
.profile-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; max-width: 1480px; margin: 0 auto; align-items: start; }
.profile-photo { grid-column: 1 / span 5; position: relative; aspect-ratio: 3 / 4; overflow: hidden; margin: 0; clip-path: inset(100% 0 0 0); }
/* the promotional photo has little headroom: crop from the top and zoom from the top edge */
.profile-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 35% 0%; transform-origin: 50% 0%; }
.profile-body { grid-column: 7 / span 6; }
.profile-name { margin: 0 0 30px; font-weight: 800; font-variation-settings: "wdth" 118; font-size: clamp(44px, 5.6vw, 100px); line-height: .88; letter-spacing: -.035em; text-transform: uppercase; }
:root[lang="ja"] .profile-name { font-family: var(--f-min); text-transform: none; letter-spacing: .08em; font-size: clamp(40px, 5vw, 88px); line-height: 1.1; }
.profile-dl { margin: 0; border-top: 1px solid var(--fg); }
.profile-dl > div { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 22px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.profile-dl dt { color: var(--accent); padding-top: 4px; }
.profile-dl dd { margin: 0; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-top: 52px; }
.stat strong { display: block; font-weight: 800; font-variation-settings: "wdth" 125; font-size: clamp(40px, 4.4vw, 74px); line-height: 1; letter-spacing: -.04em; }
.stat span { display: block; color: var(--dim); margin-top: 8px; }
.stats-note { color: var(--dim); margin-top: 16px; }

/* ---------- books (3D ring) ---------- */
.books { position: relative; }
.books-pin { position: relative; height: 100svh; overflow: hidden; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; padding: 92px var(--gut) 26px; }
.books-glow { position: absolute; inset: 0; pointer-events: none; background-color: rgba(90, 95, 255, .22); -webkit-mask-image: radial-gradient(46% 42% at 50% 52%, #000 0%, transparent 100%); mask-image: radial-gradient(46% 42% at 50% 52%, #000 0%, transparent 100%); }
.books-word { position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%); margin: 0; pointer-events: none; font-weight: 900; font-variation-settings: "wdth" 125; font-size: 27vw; line-height: 1; letter-spacing: -.05em; text-transform: uppercase; color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, .09); white-space: nowrap; }
.books-head { position: relative; display: flex; justify-content: space-between; align-items: start; gap: 32px; }
.books-head .label { margin: 0; }
.books-role { margin: 0; max-width: 470px; color: var(--dim); font-size: 14.5px; line-height: 1.65; }
:root[lang="ja"] .books-role { font-size: 13.5px; line-height: 1.9; }
.ring-stage { position: relative; perspective: 1700px; perspective-origin: 50% 42%; touch-action: pan-y; user-select: none; -webkit-user-select: none; outline: none; }
.ring-stage:focus-visible { outline: 1px solid var(--accent); outline-offset: -8px; }
.ring { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform-style: preserve-3d; will-change: transform; }
.ring-item {
  --ch: min(46svh, 400px); --cw: calc(var(--ch) * .7);
  position: absolute; left: 0; top: 0; width: var(--cw); height: var(--ch); margin: calc(var(--ch) / -2) 0 0 calc(var(--cw) / -2);
  display: flex; justify-content: center; align-items: flex-end; backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.ring-item img { height: 100%; width: auto; max-width: none; pointer-events: none; box-shadow: 0 40px 70px -30px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 255, 255, .06); }
.ring-item .shade { position: absolute; inset: 0; background: var(--night); opacity: 0; pointer-events: none; }
.ring-info { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: clamp(18px, 3vw, 48px); align-items: end; }
.ring-year { font-weight: 800; font-variation-settings: "wdth" 125; font-size: clamp(52px, 6.4vw, 116px); line-height: .78; letter-spacing: -.05em; color: transparent; -webkit-text-stroke: 1.2px var(--fg); }
.ring-title { margin: 0; font-weight: 600; font-size: clamp(19px, 1.9vw, 30px); line-height: 1.3; }
:root[lang="ja"] .ring-title { font-family: var(--f-min); font-weight: 700; }
.ring-pub { color: var(--dim); margin-top: 10px; }
.ring-side { display: grid; justify-items: end; gap: 12px; }
.ring-count { color: var(--dim); }
.swap { transition: opacity .3s ease, transform .5s var(--ease); }
.is-swapping .swap { opacity: 0; transform: translateY(10px); }
.go { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 20px; border-radius: 999px; background: var(--fg); color: var(--bg); font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; transition: background-color .3s; }
.go:hover { background: var(--accent); color: var(--night); }

/* ---------- papers ---------- */
.papers { padding: clamp(110px, 14vw, 210px) var(--gut) clamp(90px, 10vw, 160px); }
.papers-head, .talks-head, .field-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: 28px 40px; align-items: end; margin-bottom: clamp(40px, 5vw, 72px); }
.papers-head > div:first-child, .talks-head > div:first-child, .field-head > div:first-child { grid-column: 1 / -1; }
.papers-head .role, .talks-head .role, .field-head .role { grid-column: 2; }
.role { margin: 0; font-size: clamp(16px, 1.2vw, 19px); line-height: 1.65; }
:root[lang="ja"] .role { font-size: clamp(14.5px, 1.05vw, 16.5px); line-height: 2; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.chip { height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); display: inline-flex; align-items: center; gap: 8px; font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; transition: background-color .3s; }
:root[lang="ja"] .chip { font-family: var(--f-ja); letter-spacing: .06em; font-size: 12.5px; }
.chip sup { font-family: var(--f-mono); font-size: 9.5px; opacity: .65; }
.chip:hover { border-color: var(--fg); }
.chip[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.pindex { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--fg); }
.prow { position: relative; border-bottom: 1px solid var(--line); }
.prow::before { content: ""; position: absolute; inset: 0; background: var(--fg); transform: scaleY(0); transform-origin: bottom; transition: transform .5s var(--ease); }
.prow:hover::before, .prow:focus-within::before { transform: scaleY(1); transform-origin: top; }
.prow button { position: relative; z-index: 1; width: 100%; text-align: left; display: grid; grid-template-columns: 84px minmax(0, 1fr) auto 28px; gap: 22px; align-items: baseline; padding: 22px 10px; transition: color .35s; }
.prow:hover button, .prow:focus-within button { color: var(--bg); }
.p-year { font-family: var(--f-mono); font-size: 13px; }
.p-title { display: block; font-weight: 500; font-size: clamp(17px, 1.45vw, 22px); line-height: 1.38; }
:root[lang="ja"] .p-title { font-weight: 500; line-height: 1.6; }
.p-venue { display: block; margin-top: 5px; color: var(--dim); font-size: 13px; transition: color .35s; }
.prow:hover .p-venue { color: inherit; opacity: .7; }
.p-tags { font-family: var(--f-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); white-space: nowrap; transition: color .35s; }
:root[lang="ja"] .p-tags { font-family: var(--f-ja); font-size: 11px; }
.prow:hover .p-tags { color: inherit; opacity: .75; }
.p-arrow { width: 18px; height: 18px; align-self: center; transition: transform .45s var(--ease); }
.prow:hover .p-arrow { transform: translateX(6px); }
.prow.is-hidden, .tyear.is-hidden, .tyear li.is-hidden { display: none; }
.more { margin-top: 32px; }

.peek { position: fixed; left: 0; top: 0; z-index: 45; width: 340px; padding: 18px 20px 20px; background: var(--ultra); color: #fff; pointer-events: none; opacity: 0; transition: opacity .25s; font-size: 13px; line-height: 1.65; }
:root[lang="ja"] .peek { font-size: 12.5px; line-height: 1.85; }
.peek.is-on { opacity: 1; }
.peek .mono { display: block; opacity: .75; margin-bottom: 8px; }

.drawer { position: fixed; inset: 0; z-index: 80; visibility: hidden; }
.drawer.is-open { visibility: visible; }
.drawer-scrim { position: absolute; inset: 0; background: rgba(10, 11, 15, .55); opacity: 0; transition: opacity .45s; }
.drawer.is-open .drawer-scrim { opacity: 1; }
.drawer-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(660px, 100%); background: var(--night); color: #F2F3F5; padding: 84px clamp(22px, 3vw, 52px) 56px; overflow-y: auto; transform: translateX(102%); transition: transform .7s var(--ease); --dim: #8D92A2; --line: rgba(255,255,255,.14); --accent: #A3A7FF; --fg: #F2F3F5; --bg: #0A0B0F; }
.drawer.is-open .drawer-panel { transform: none; }
.drawer-close { position: absolute; top: 20px; right: clamp(22px, 3vw, 52px); }
.drawer h3 { margin: 12px 0 14px; font-weight: 600; font-size: clamp(24px, 2.2vw, 34px); line-height: 1.28; }
:root[lang="ja"] .drawer h3 { font-family: var(--f-min); font-weight: 700; line-height: 1.55; }
.drawer .venue { color: var(--dim); margin: 0 0 28px; }
.drawer .abstract { font-size: 15.5px; line-height: 1.8; color: #D7D9E0; }
:root[lang="ja"] .drawer .abstract { font-size: 14.5px; line-height: 2.05; }
.drawer .kw { color: var(--accent); margin: 26px 0; }

/* ---------- talks ---------- */
.talks { padding: clamp(110px, 14vw, 210px) 0 clamp(90px, 10vw, 150px); }
.talks-head { padding: 0 var(--gut); }
.rail-head { padding: 0 var(--gut); display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 18px; }
.rail-head h3 { margin: 0; font-weight: 600; font-size: clamp(20px, 1.7vw, 26px); }
:root[lang="ja"] .rail-head h3 { font-family: var(--f-min); font-weight: 700; }
.deck-rail { display: flex; gap: clamp(16px, 2vw, 28px); overflow-x: auto; overscroll-behavior-x: contain; padding: 6px var(--gut) 26px; scroll-padding-inline: var(--gut); scrollbar-width: none; cursor: grab; }
.deck-rail::-webkit-scrollbar { display: none; }
.deck-rail.is-dragging { cursor: grabbing; }
.deck-rail.is-dragging .deck { pointer-events: none; }
.deck { flex: 0 0 clamp(280px, 33vw, 520px); text-align: left; }
.deck-frame { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #15171E; border-radius: 3px; }
.deck-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .5s ease, transform 1.2s var(--ease); }
.deck-frame img.b { opacity: 0; }
.deck:hover .deck-frame img { transform: scale(1.015); }
/* title-slide clip over the illustration band; scales with the slide so the two stay aligned */
.deck-clip { position: absolute; inset: 0; pointer-events: none; transition: transform 1.2s var(--ease); }
.deck:hover .deck-clip { transform: scale(1.015); }
.deck-clip video { position: absolute; object-fit: cover; opacity: 0; transition: opacity .5s ease; }
.deck-clip video.is-on { opacity: 1; }
.deck-bars { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; gap: 4px; opacity: 0; transition: opacity .3s; }
.deck:hover .deck-bars, .deck:focus-visible .deck-bars { opacity: 1; }
.deck-bars i { flex: 1; height: 2px; background: rgba(10, 11, 15, .25); }
.deck-bars i.on { background: var(--ultra); }
.deck-meta { display: flex; justify-content: space-between; gap: 12px; color: var(--dim); margin-top: 16px; }
.deck h4 { margin: 8px 0 0; font-weight: 600; font-size: clamp(17px, 1.35vw, 21px); line-height: 1.35; }
:root[lang="ja"] .deck h4 { font-family: var(--f-min); font-weight: 700; line-height: 1.6; }
.deck p { margin: 6px 0 0; color: var(--dim); font-size: 13px; }

.tyears { padding: 0 var(--gut); margin: clamp(80px, 9vw, 140px) auto 0; max-width: 1500px; }
.tyears > h3 { margin: 0 0 22px; font-weight: 600; font-size: clamp(20px, 1.7vw, 26px); }
:root[lang="ja"] .tyears > h3 { font-family: var(--f-min); font-weight: 700; }
.tyear { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 24px; border-top: 1px solid var(--line); padding: 26px 0 18px; }
.tyear h4 { position: sticky; top: 92px; align-self: start; margin: 0; font-weight: 800; font-variation-settings: "wdth" 125; font-size: clamp(44px, 5.2vw, 88px); line-height: .82; letter-spacing: -.045em; }
.tyear ul { list-style: none; margin: 0; padding: 0; }
.tyear li { padding: 4px 0 18px; }
.tyear li + li { border-top: 1px solid var(--line); padding-top: 16px; }
.t-title { font-weight: 500; font-size: 17px; line-height: 1.45; }
.t-title a { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .5s var(--ease), color .3s; }
.t-title a:hover { background-size: 100% 1px; color: var(--accent); }
.t-venue { display: block; color: var(--dim); font-size: 13px; margin-top: 4px; }

.viewer { position: fixed; inset: 0; z-index: 85; background: rgba(8, 9, 12, .97); color: #F2F3F5; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 18px; padding: 18px var(--gut) 22px; visibility: hidden; opacity: 0; transition: opacity .4s, visibility 0s .4s; --line: rgba(255,255,255,.2); --fg: #F2F3F5; --bg: #0A0B0F; }
.viewer.is-open { visibility: visible; opacity: 1; transition: opacity .4s; }
.viewer-top, .viewer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.viewer-title { margin: 0; font-weight: 600; font-size: clamp(15px, 1.2vw, 18px); }
:root[lang="ja"] .viewer-title { font-family: var(--f-min); font-weight: 700; }
.viewer-stage { position: relative; min-height: 0; touch-action: pan-y; }
/* absolute, so max-height resolves against the stage row and the slide never covers the controls */
.viewer-stage img { position: absolute; inset: 0; margin: auto; max-width: min(1240px, 100%); max-height: 100%; width: auto; height: auto; object-fit: contain; background: #fff; box-shadow: 0 40px 90px rgba(0, 0, 0, .55); }

/* ---------- media ---------- */
.media { position: relative; }
.media-pin { position: relative; height: 100svh; overflow: hidden; }
.media-frame { position: absolute; inset: 0; clip-path: inset(22% 30% 22% 30% round 16px); will-change: clip-path; background: #000; }
.media-frame img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; animation: media-drift 16s ease-in-out infinite alternate; }
@keyframes media-drift { from { scale: 1; } to { scale: 1.04; } }
/* nearly solid under the heading and text (--over-h, set by app.js), thin above so the faces stay visible */
.media-shade { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(10, 11, 15, .98) 0, rgba(10, 11, 15, .97) calc(var(--over-h, 40%) + 24px), rgba(10, 11, 15, .25) calc(var(--over-h, 40%) + 30%), rgba(10, 11, 15, .45) 100%); opacity: 0; }
.media-over { position: absolute; left: var(--gut); right: var(--gut); bottom: clamp(28px, 5vw, 64px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: 32px; align-items: end; color: #F2F3F5; }
.media-over .role { color: #E1E3EA; }
.media-list { list-style: none; margin: 0 auto; padding: clamp(80px, 9vw, 140px) var(--gut) clamp(40px, 6vw, 90px); max-width: 1500px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(24px, 4vw, 72px); }
.media-list li { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 16px; padding: 18px 0; border-top: 1px solid var(--line); }
.m-year { font-family: var(--f-mono); font-size: 13px; color: var(--accent); }
.m-outlet { display: block; color: var(--dim); margin-top: 4px; }

/* ---------- fieldwork ---------- */
.field { padding: clamp(110px, 14vw, 210px) var(--gut) clamp(90px, 10vw, 160px); }
.field-head { margin-bottom: 0; }
.collage { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px; margin: clamp(56px, 7vw, 100px) auto 0; max-width: 1560px; }
.c-item { position: relative; margin: 0; overflow: hidden; clip-path: inset(0 0 100% 0); }
.c-item img { width: 100%; height: 118%; object-fit: cover; will-change: transform; }
.c-item figcaption { position: absolute; left: 0; bottom: 0; background: var(--bg); color: var(--fg); padding: 6px 12px; }
.c-a { grid-column: 1 / span 7; aspect-ratio: 4 / 3; }
.c-b { grid-column: 9 / span 4; aspect-ratio: 3 / 4; margin-top: 16vh; }
.c-c { grid-column: 2 / span 4; aspect-ratio: 1 / 1; margin-top: -4vh; }
.c-d { grid-column: 7 / span 6; aspect-ratio: 16 / 10; margin-top: 10vh; }
.c-e { grid-column: 3 / span 5; aspect-ratio: 4 / 3; margin-top: 2vh; }
.field-items { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 52px); border-top: 1px solid var(--fg); padding-top: 28px; margin: clamp(80px, 9vw, 140px) auto 0; max-width: 1560px; }
.field-items h3 { margin: 0 0 12px; font-weight: 700; font-variation-settings: "wdth" 110; font-size: clamp(20px, 1.6vw, 26px); line-height: 1.3; white-space: pre-line; }
:root[lang="ja"] .field-items h3 { font-family: var(--f-min); font-weight: 700; line-height: 1.6; }
.field-items p { margin: 0; color: var(--dim); font-size: 15px; }

/* ---------- contact ---------- */
.contact { padding: clamp(100px, 12vw, 180px) 0 28px; overflow: hidden; }
.marquee { overflow: hidden; white-space: nowrap; }
.marquee-track { display: inline-flex; will-change: transform; }
.marquee-track span { font-weight: 800; font-variation-settings: "wdth" 125; font-size: clamp(72px, 14vw, 250px); line-height: 1; letter-spacing: -.05em; text-transform: uppercase; padding-right: .3em; }
.marquee-track span i { font-style: normal; font-family: var(--f-min); font-weight: 800; letter-spacing: .02em; text-transform: none; }
.contact-body { padding: 0 var(--gut); margin-top: clamp(56px, 7vw, 100px); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px; align-items: center; }
.orb { width: clamp(170px, 17vw, 260px); aspect-ratio: 1; border-radius: 50%; background: #fff; color: var(--ultra); display: grid; place-items: center; text-align: center; padding: 20px; will-change: transform; }
.orb span { font-weight: 700; font-variation-settings: "wdth" 110; font-size: clamp(15px, 1.3vw, 19px); line-height: 1.25; pointer-events: none; }
.contact-text { font-size: clamp(17px, 1.4vw, 22px); line-height: 1.6; margin: 0 0 26px; max-width: 34ch; }
:root[lang="ja"] .contact-text { max-width: 26em; line-height: 1.95; }
.contact-links { display: flex; flex-wrap: wrap; gap: 10px; }
.contact-links .pill { height: 44px; padding: 0 20px; border-color: rgba(255, 255, 255, .45); }
.contact-links .pill:hover { background: #fff; color: var(--ultra); }
.foot { margin: clamp(80px, 9vw, 140px) var(--gut) 0; padding-top: 18px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--dim); }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .bar-section { display: none; }
  .papers-head .role, .talks-head .role, .field-head .role { grid-column: 1 / -1; }
  .hero-top { grid-template-columns: minmax(0, 1fr); }
  .hero-lead, .hero-meta { grid-column: 1; max-width: 460px; }
  .papers-head, .talks-head, .field-head { grid-template-columns: minmax(0, 1fr); }
  .profile-photo { grid-column: 1 / -1; max-width: 520px; }
  .profile-body { grid-column: 1 / -1; margin-top: 40px; }
  .media-over { grid-template-columns: minmax(0, 1fr); }
  .media-list { grid-template-columns: minmax(0, 1fr); }
  .collage { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .c-a { grid-column: 1 / -1; }
  .c-b { grid-column: 1 / span 3; margin-top: 0; }
  .c-c { grid-column: 4 / span 3; margin-top: 12vh; }
  .c-d { grid-column: 1 / -1; margin-top: 0; }
  .c-e { grid-column: 2 / span 5; margin-top: 0; }
  .field-items { grid-template-columns: minmax(0, 1fr); }
  .contact-body { grid-template-columns: minmax(0, 1fr); }
  .tyear { grid-template-columns: minmax(0, 1fr); }
  .tyear h4 { position: static; }
}
@media (max-width: 640px) {
  .bar-name .mono { display: none; }
  .hero { padding-top: 84px; }
  .hero-ja { top: auto; bottom: 34svh; transform: none; font-size: 14px; }
  .hero-cue { display: none; }
  .profile-dl > div { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 28px; }
  .books-head { flex-direction: column; gap: 14px; }
  .books-role { display: none; }
  .ring-item { --ch: min(38svh, 300px); }
  .ring-info { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .ring-side { justify-items: start; grid-auto-flow: column; align-items: center; justify-content: space-between; }
  .prow button { grid-template-columns: 50px minmax(0, 1fr) 18px; gap: 12px; padding: 18px 4px; }
  .p-tags { display: none; }
  .deck { flex-basis: 82vw; }
  .rail-head { flex-direction: column; align-items: flex-start; gap: 6px; }
  .rail-head h3 { white-space: nowrap; }
  .media-frame { clip-path: inset(26% 10% 26% 10% round 12px); }
  .media-frame img { object-position: 74% 30%; }
}

/* ---------- motion off: every chapter still reads as a normal page ---------- */
html.static .manifesto, html.static .media-pin { height: auto; }
html.static .manifesto-inner { padding: 120px var(--gut); }
html.static .manifesto-text .w { opacity: 1; }
/* research without motion or WebGL: the intro and the four themes one under another */
html.static .themes-pin, .themes--static .themes-pin { height: auto; overflow: visible; }
html.static .themes-col, .themes--static .themes-col { position: static; width: auto; display: block; padding: 0 var(--gut); }
html.static .themes-col > *, .themes--static .themes-col > * { max-width: 720px; padding: 72px 0; border-bottom: 1px solid var(--line); opacity: 1 !important; transform: none !important; }
html.static .themes-ticks, .themes--static .themes-ticks { display: none; }
html.static .profile-photo, html.static .c-item { clip-path: none; }
html.static .media-frame { position: relative; clip-path: none; aspect-ratio: 16 / 9; }
html.static .media-frame video, html.static .media-frame img { transform: none; }
html.static .media-shade { display: none; }
html.static .media-over { position: relative; left: auto; right: auto; bottom: auto; padding: 40px var(--gut) 0; color: var(--fg); }
html.static .grain { animation: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
