/* ==========================================================================
   BASE — reset, type, layout primitives, shell (nav/footer), motion states.
   Shared by every page.
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 var(--t-body)/1.55 var(--f-sans);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; text-wrap: balance; font-weight: 800; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
dl, dd { margin: 0; }
button { font: inherit; }
em { font-family: var(--f-serif); font-style: italic; font-weight: 400; letter-spacing: -.005em; }
:focus-visible { outline: 2px solid var(--hi); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; padding: 10px 16px; background: var(--ink); color: var(--bg); border-radius: 999px; }
.skip:focus { left: 16px; }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
section { position: relative; }

/* ---------- atoms ---------- */
.hl {
  color: inherit;
  background: linear-gradient(var(--hi), var(--hi)) no-repeat 0 90% / 100% 36%;
  padding: 0 .06em;
  transition: background-size 1.1s var(--ease) .75s;
}
.act-dark .hl { color: var(--hi); background-size: 0 0 !important; }

.stage-tag, .impact-type, .r-t {
  font-family: var(--f-mono);
  font-size: var(--t-label);
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.stage-tag { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); }
.stage-tag i { width: 8px; height: 8px; border-radius: 50%; background: var(--hi); box-shadow: 0 0 0 4px color-mix(in srgb, var(--hi) 25%, transparent); }

.open-dot { display: inline-flex; align-items: center; gap: 8px; }
.open-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #22b573; box-shadow: 0 0 0 0 rgba(34, 181, 115, .5); animation: ping 2.4s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 8px rgba(34, 181, 115, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 181, 115, 0); } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 7px 12px; border-radius: 999px; background: var(--chip); font-size: var(--t-small); font-weight: 500; }
.chips-solid li { background: var(--ink); color: var(--bg); }

.ticks { display: grid; gap: 14px; }
.ticks li { position: relative; padding-left: 32px; font-size: 1.0625rem; color: var(--ink-2); }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .3em;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--hi) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%23121214' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat;
}

.note { font-size: var(--t-small); color: var(--muted); }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-row li { padding: 7px 12px; border-radius: 999px; background: var(--chip); font-size: var(--t-small); font-weight: 500; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* ---------- buttons ---------- */
.btn {
  --h: 52px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--h);
  padding: 0 24px;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  background: transparent; color: var(--ink);
  font: 600 .9375rem/1 var(--f-sans);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .4s var(--ease), background-color .3s, color .3s, border-color .3s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-solid { background: var(--ink); color: var(--bg); }
.btn-ghost { border-color: var(--dim); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-link { border-color: transparent; padding-inline: 8px; text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1.5px; }
.btn-sm { --h: 40px; padding: 0 16px; font-size: .875rem; }
.btn-lg { --h: 60px; padding: 0 30px; font-size: 1.0625rem; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1.5px; cursor: pointer; }
.link-btn:hover { text-decoration-color: var(--hi); }
.arrow-link { display: inline-flex; gap: 8px; font-weight: 700; text-decoration: none; padding-bottom: 3px; border-bottom: 2px solid var(--ink); }
.arrow-link span { transition: transform .4s var(--ease); }
.arrow-link:hover span { transform: translateX(5px); }

/* ---------- section heads ---------- */
.sec-head { display: grid; gap: 18px; max-width: 880px; margin-bottom: clamp(40px, 6vh, 72px); }
.sec-head h2 { font-size: var(--t-h2); letter-spacing: -.045em; line-height: .98; }
.sec-sub { font-size: var(--t-lead); color: var(--muted); max-width: 54ch; line-height: 1.45; }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 60;
  padding-top: env(safe-area-inset-top, 0px);
  transition: background-color .4s, border-color .4s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled, .nav.is-open {
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom-color: var(--line);
}
.nav-inner {
  max-width: var(--wrap); margin-inline: auto;
  min-height: 68px;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.brand-mark {
  flex: none; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--hi); color: var(--hi-ink);
  font: 800 .8125rem/1 var(--f-sans); letter-spacing: -.02em;
}
.brand-text { display: grid; line-height: 1.15; min-width: 0; }
.brand-text b { font-size: .9375rem; }
.brand-text span { font-size: .75rem; color: var(--muted); white-space: nowrap; }
.nav-links { display: flex; align-items: center; gap: 28px; font-weight: 600; font-size: .9375rem; }
.nav-links a:not(.btn) { text-decoration: none; color: var(--ink-2); padding-block: 6px; border-bottom: 1.5px solid transparent; transition: border-color .2s, color .2s; }
.nav-links a:not(.btn):hover, .nav-links a[aria-current] { color: var(--ink); border-bottom-color: var(--hi); }
.nav-cv { color: var(--muted) !important; }
.menu-toggle { display: none; align-items: center; gap: 10px; min-height: 44px; padding: 0 4px; background: none; border: 0; font: 600 .9375rem/1 var(--f-sans); color: var(--ink); cursor: pointer; }
.menu-icon { position: relative; width: 22px; height: 12px; }
.menu-icon i { position: absolute; left: 0; right: 0; height: 2px; border-radius: 2px; background: currentColor; transition: transform .35s var(--ease), top .35s var(--ease); }
.menu-icon i:first-child { top: 0; }
.menu-icon i:last-child { top: 10px; }
.nav.is-open .menu-icon i:first-child { top: 5px; transform: rotate(45deg); }
.nav.is-open .menu-icon i:last-child { top: 5px; transform: rotate(-45deg); }
.nav-progress { height: 2px; }
.nav-progress i { display: block; height: 100%; background: var(--hi); transform-origin: left; transform: scaleX(0); }

@media (max-width: 900px) {
  .menu-toggle { display: inline-flex; }
  .nav-links {
    position: fixed; left: 0; right: 0; top: calc(68px + env(safe-area-inset-top, 0px));
    height: calc(100dvh - 68px - env(safe-area-inset-top, 0px));
    flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0;
    padding: 16px max(var(--gutter), env(safe-area-inset-right, 0px)) calc(32px + env(safe-area-inset-bottom, 0px)) max(var(--gutter), env(safe-area-inset-left, 0px));
    background: var(--bg);
    font-size: clamp(1.75rem, 8vw, 2.4rem); font-weight: 800; letter-spacing: -.035em;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .3s var(--ease), transform .4s var(--ease), visibility 0s .3s;
    overflow-y: auto;
  }
  .nav-links a:not(.btn) { padding-block: 14px; border-bottom: 1px solid var(--line); color: var(--ink); }
  .nav-links .nav-cv { color: var(--ink) !important; }
  .nav-links .nav-talk { margin-top: 28px; --h: 56px; font-size: 1.0625rem; letter-spacing: 0; }
  .nav.is-open .nav-links { opacity: 1; visibility: visible; transform: none; transition: opacity .3s var(--ease), transform .4s var(--ease); }
  body.menu-open { overflow: hidden; }
}
@media (max-width: 420px) { .brand-text span { display: none; } }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); }
.foot-grid {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px 48px; align-items: start;
  padding-block: 48px calc(40px + env(safe-area-inset-bottom, 0px));
}
.foot-id { display: grid; gap: 6px; }
.foot-id b { font-size: 1.25rem; letter-spacing: -.02em; }
.foot-id span { color: var(--muted); font-size: var(--t-small); }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: flex-end; font-weight: 600; }
.foot-links a { text-decoration: none; border-bottom: 1.5px solid var(--dim); padding-bottom: 2px; }
.foot-links a:hover { border-color: var(--hi); }
.foot-meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-family: var(--f-mono); font-size: var(--t-label); color: var(--muted); padding-top: 24px; border-top: 1px solid var(--line); }

/* ---------- motion states (only when JS + motion allowed) ---------- */
.wr { display: inline-block; overflow: hidden; vertical-align: bottom; padding: .08em .06em .14em; margin: -.08em -.06em -.14em; }
.wi { display: inline-block; }
.motion .wi {
  transform: translateY(112%) rotate(3deg);
  transform-origin: 0 100%;
  transition: transform 1.15s var(--ease) calc(var(--i, 0) * 38ms + 60ms);
}
.motion .in .wi { transform: none; }
.motion [data-split] .hl { background-size: 0% 36%; }
.motion [data-split].in .hl { background-size: 100% 36%; }

.motion [data-reveal] {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .9s var(--ease) calc(var(--d, 0) * 90ms), transform 1.2s var(--ease) calc(var(--d, 0) * 90ms);
}
.motion [data-reveal].in { opacity: 1; transform: none; }

/* ---------- noscript fallback ---------- */
[data-module]:empty { display: none; } /* unrendered module slots take no space */
.nojs { max-width: 760px; margin: 0 auto; padding: 96px 24px; display: grid; gap: 20px; }
.nojs h1 { font-size: clamp(2rem, 6vw, 3.4rem); letter-spacing: -.04em; line-height: 1.02; }
.nojs ul { display: grid; gap: 6px; list-style: disc; padding-left: 20px; }

/* ---------- responsive shell ---------- */
@media (max-width: 900px) {
  .foot-grid { grid-template-columns: 1fr; }
  .foot-links { justify-content: flex-start; }
}
@media (max-width: 560px) {
  :root { --gutter: 16px; }
  .btn { padding: 0 20px; }
  .btn-lg { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- evidence figures: real screenshots in a light frame ---------- */
.ev { margin: 0; display: grid; gap: 12px; min-width: 0; }
.ev-open { position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; text-align: left; border-radius: var(--r-md); }
.ev-frame { display: block; overflow: hidden; border-radius: var(--r-md); border: 1px solid var(--line); background: #fff; box-shadow: 0 1px 0 var(--line), 0 30px 60px -40px rgba(18, 18, 20, .35); transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.ev-bar { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-bottom: 1px solid #ececef; background: #f6f6f7; font: 500 .6875rem/1 var(--f-mono); color: #6b6b74; white-space: nowrap; overflow: hidden; }
.ev-bar i { width: 8px; height: 8px; border-radius: 50%; background: #dcdce0; flex: none; }
.ev-bar span { margin-left: 8px; overflow: hidden; text-overflow: ellipsis; }
.ev-frame img { display: block; width: 100%; height: auto; }
.ev-zoom { position: absolute; right: 12px; bottom: 12px; padding: 6px 10px; border-radius: 999px; background: rgba(18, 18, 20, .82); color: #fff; font: 600 .75rem/1 var(--f-sans); opacity: 0; transform: translateY(4px); transition: opacity .25s, transform .25s; }
.ev-open:hover .ev-frame, .ev-open:focus-visible .ev-frame { transform: translateY(-3px); box-shadow: 0 1px 0 var(--line), 0 40px 70px -40px rgba(18, 18, 20, .45); }
.ev-zoom::after { content: " ↗"; }
.ev-open:hover .ev-zoom, .ev-open:focus-visible .ev-zoom { opacity: 1; transform: none; }
.ev figcaption { font-size: var(--t-small); color: var(--muted); line-height: 1.5; max-width: 70ch; }
.figs { display: grid; gap: 24px; margin-top: 32px; }
.figs-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
@media (max-width: 700px) { .figs-pair { grid-template-columns: 1fr; } }

/* ---------- lightbox ---------- */
.lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(12, 12, 14, .94); color: #f4f4f6; }
.lightbox::backdrop { background: rgba(12, 12, 14, .6); }
.lightbox[open] { display: grid; grid-template-rows: auto 1fr auto; }
.lb-top, .lb-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: calc(12px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 12px max(16px, env(safe-area-inset-left, 0px)); }
.lb-nav { padding-top: 12px; padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
.lb-count { font: 500 .8125rem/1 var(--f-mono); color: #b8b8c0; }
.lb-btn { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .25); background: transparent; color: #fff; font: 600 .875rem/1 var(--f-sans); cursor: pointer; }
.lb-btn:hover { background: rgba(255, 255, 255, .1); }
.lightbox.is-single .lb-nav { visibility: hidden; }
.lb-figure { margin: 0; min-height: 0; display: grid; grid-template-rows: 1fr auto; justify-items: center; gap: 12px; padding: 0 max(16px, env(safe-area-inset-left, 0px)); overflow: auto; }
.lb-img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 8px; background: #fff; align-self: center; }
.lb-cap { max-width: 70ch; text-align: center; font-size: .9375rem; color: #d4d4da; }
body.lb-open { overflow: hidden; }
