/* Akshat Mishra — portfolio. Ink on paper, one vermilion seal.
   Sections: tokens · base · header · menu · hero · sections · about · projects · expertise ·
   approach · experience · certifications · résumé · contact · footer · motion · print */

/* ---------- tokens ---------- */
:root {
  --paper: #f4f1ea;
  --paper-2: #ebe7dc;
  --ink: #141412;
  --ink-2: #47453d;
  --ink-3: #686559;
  --line: rgba(20, 20, 18, .16);
  --seal: #c0341a;
  --seal-ink: #a82c15;
  --on-seal: #fff;
  --shadow: 0 34px 70px -34px rgba(20, 20, 18, .45);

  --font-display: 'Instrument Serif', 'Shippori Mincho', 'Yu Mincho', 'Hiragino Mincho ProN', Georgia, serif;
  --font-body: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Hiragino Sans', 'Yu Gothic UI', 'Meiryo', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --font-jp: 'Shippori Mincho', 'Yu Mincho', 'Hiragino Mincho ProN', 'Noto Serif JP', serif;

  --gut: clamp(20px, 5vw, 72px);
  --ease: cubic-bezier(.2, .7, .1, 1);
  --head-h: 68px;
}
[data-theme='dark'] {
  --paper: #0f0f0e;
  --paper-2: #191917;
  --ink: #f0ede4;
  --ink-2: #c2beb2;
  --ink-3: #969286;
  --line: rgba(240, 237, 228, .17);
  --seal: #ff5b3a;
  --seal-ink: #ff7a5e;
  --on-seal: #0f0f0e;
  --shadow: 0 34px 70px -34px rgba(0, 0, 0, .9);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; color-scheme: light; }
html[data-theme='dark'] { color-scheme: dark; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  transition: background-color .4s ease, color .4s ease;
}
html[lang='ja'] body { line-height: 1.9; line-break: strict; font-size: 1rem; }
html[lang='ja'] * { text-wrap: wrap; } /* balance/pretty are costly on long CJK text */
body::before { /* paper grain */
  content: ''; position: fixed; inset: 0; z-index: 100; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
[data-theme='dark'] body::before { opacity: .05; filter: invert(1); }
::selection { background: var(--seal); color: var(--on-seal); }
h1, h2, h3, h4, h5, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
button { font: inherit; color: inherit; }
em { font-style: italic; }
:focus-visible { outline: 2px solid var(--seal); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.wrap { width: min(100% - 2 * var(--gut), 1320px); margin-inline: auto; }
.i { flex: none; }

.skip { position: fixed; left: 16px; top: -80px; z-index: 200; background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: 8px; text-decoration: none; transition: top .2s; }
.skip:focus { top: 16px; }

.progress { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 90; pointer-events: none; }
.progress span { display: block; height: 100%; background: var(--seal); transform-origin: left; transform: scaleX(var(--scroll, 0)); }

/* buttons, chips, links */
.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 48px; padding: 0 24px; border: 1px solid var(--ink); border-radius: 999px;
  font-weight: 500; font-size: .9375rem; line-height: 1.2; text-decoration: none; color: var(--ink); background: none; cursor: pointer;
  transition: color .35s ease, border-color .35s ease, transform .5s var(--ease);
}
.btn::before { content: ''; position: absolute; inset: -1px; z-index: -1; border-radius: inherit; background: var(--ink); transform: translateY(102%); transition: transform .5s var(--ease); }
.btn:hover, .btn:focus-visible { color: var(--paper); }
.btn:hover::before, .btn:focus-visible::before { transform: none; }
.btn-solid { background: var(--ink); color: var(--paper); }
.btn-solid::before { background: var(--seal); }
.btn-solid:hover, .btn-solid:focus-visible { color: var(--on-seal); border-color: var(--seal); }
.btn-quiet { border-color: transparent; padding-inline: 12px; text-decoration: underline; text-decoration-color: var(--line); }
.btn-quiet::before { display: none; }
.btn-quiet:hover, .btn-quiet:focus-visible { color: var(--seal-ink); text-decoration-color: currentColor; }
.btn .i-down { transition: transform .4s var(--ease); }
.btn:hover .i-down { transform: translateY(3px); }

.chip {
  display: inline-flex; align-items: center; gap: .5em; min-height: 40px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: 999px; background: none; color: var(--ink-2);
  font: 500 .875rem/1.2 var(--font-body); cursor: pointer; white-space: nowrap;
  transition: background-color .3s ease, color .3s ease, border-color .3s ease, transform .3s var(--ease);
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip:active { transform: scale(.96); }
.chip[aria-pressed='true'] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip sup { font: 400 .6875rem var(--font-mono); opacity: .7; margin-left: 2px; }
.chip-kanji { font: 600 .875rem var(--font-jp); }

.link-arrow { display: inline-flex; align-items: center; gap: .45em; padding: 8px 0; min-height: 40px; font-weight: 500; text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 calc(100% - 6px) / 100% 1px no-repeat; transition: color .3s; }
.link-arrow .i-out, .cert-go .i-out, .elsewhere .i-out, .cp .i-out { transition: transform .4s var(--ease); }
.link-arrow:hover { color: var(--seal-ink); }
a:hover > .i-out, a:hover .cert-go .i-out { transform: translate(3px, -3px); }

/* ---------- header ---------- */
.site-head {
  position: fixed; inset: 0 0 auto 0; z-index: 80; height: var(--head-h);
  display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-inline: var(--gut);
  border-bottom: 1px solid transparent;
  transition: background-color .35s ease, border-color .35s ease;
}
.site-head.is-scrolled { background: color-mix(in srgb, var(--paper) 84%, transparent); -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3); border-bottom-color: var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 400 1.25rem/1 var(--font-display); letter-spacing: .01em; min-height: 44px; }
.brand-seal { color: var(--seal); transition: transform .5s var(--ease); }
.brand:hover .brand-seal { transform: rotate(-8deg) scale(1.06); }
.nav { position: relative; }
.nav ul { display: flex; gap: clamp(14px, 1.9vw, 30px); }
.nav a { display: block; padding: 12px 2px; font-size: .875rem; color: var(--ink-2); text-decoration: none; transition: color .3s; }
.nav a:hover, .nav a[aria-current] { color: var(--ink); }
.nav-ink { position: absolute; left: 0; bottom: 8px; height: 1.5px; width: var(--w, 0px); background: var(--seal); transform: translateX(var(--x, 0px)); transition: transform .5s var(--ease), width .5s var(--ease), opacity .3s; opacity: var(--o, 0); }
.head-tools { display: flex; align-items: center; gap: 10px; }
.lang { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 999px; font-size: .8125rem; line-height: 1; }
.lang a { display: inline-flex; align-items: center; min-height: 30px; padding: 0 12px; border-radius: 999px; text-decoration: none; color: var(--ink-2); transition: background-color .3s, color .3s; }
.lang a:hover { color: var(--ink); }
.lang a[aria-current] { background: var(--ink); color: var(--paper); }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; background: none; cursor: pointer; transition: border-color .3s, transform .6s var(--ease); }
.icon-btn:hover { border-color: var(--ink); }
[data-theme='dark'] .i-theme { transform: rotate(180deg); }
.i-theme { transition: transform .7s var(--ease); }
.menu-btn { display: none; align-items: center; gap: 10px; min-height: 40px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: none; font-size: .875rem; font-weight: 500; cursor: pointer; }
.menu-lines { width: 16px; height: 8px; border-block: 1.5px solid currentColor; }

@media (max-width: 1099px) {
  .nav, .lang-head { display: none; }
  .menu-btn { display: inline-flex; }
}

/* ---------- menu (dialog) ---------- */
.menu { border: 0; padding: 0; margin: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; background: var(--paper); color: var(--ink); overflow-y: auto; }
.menu::backdrop { background: transparent; }
.menu[open] { display: flex; flex-direction: column; animation: menu-in .55s var(--ease) both; }
.menu.is-closing { animation: menu-out .3s ease both; }
@keyframes menu-in { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0); } }
@keyframes menu-out { to { opacity: 0; transform: translateY(-12px); } }
.menu-top { display: flex; align-items: center; justify-content: space-between; height: var(--head-h); padding-inline: var(--gut); flex: none; }
.menu .menu-btn { display: inline-flex; }
.menu nav { flex: 1; display: grid; align-content: center; padding: 16px var(--gut); }
.menu-list li { border-bottom: 1px solid var(--line); }
.menu-list a { display: flex; align-items: baseline; gap: 18px; padding: 12px 0; font: 400 clamp(1.9rem, 8vw, 2.8rem)/1.15 var(--font-display); text-decoration: none; }
.menu[open] .menu-list li { animation: rise-in .7s var(--ease) both; animation-delay: calc(140ms + var(--i) * 50ms); }
.menu-no { font: 400 .75rem var(--font-mono); color: var(--seal-ink); }
.menu-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 20px var(--gut) 28px; font-size: .9375rem; }
@keyframes rise-in { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* ---------- hero ---------- */
.hero { min-height: 100svh; display: flex; flex-direction: column; justify-content: space-between; padding-top: calc(var(--head-h) + clamp(20px, 4vh, 56px)); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(280px, 340px); gap: clamp(24px, 4vw, 64px); align-items: end; flex: 1; padding-bottom: clamp(24px, 4vh, 48px); }
.kicker { font: 400 .8125rem/1.5 var(--font-mono); letter-spacing: .02em; color: var(--ink-2); }
.hero-name { position: relative; width: fit-content; margin: .12em 0 .16em; font: 400 clamp(4.4rem, min(11.6vw, 19svh), 12.5rem)/.86 var(--font-display); letter-spacing: -.025em; }
.hero-name .line { display: block; overflow: hidden; padding: .04em .06em .1em 0; margin-bottom: -.1em; }
.hero-name .line > span { display: inline-block; }
.hero-name em { padding-right: .04em; }
.seal-stamp { position: absolute; left: calc(100% + .06em); bottom: .2em; width: .4em; height: .4em; color: var(--seal); transform: rotate(-7deg); opacity: .94; }
.hero-statement { max-width: 30ch; font: 400 clamp(1.6rem, 2.9vw, 2.5rem)/1.14 var(--font-display); letter-spacing: -.005em; text-wrap: balance; }
html[lang='ja'] .hero-statement { max-width: 17em; font-size: clamp(1.35rem, 2.5vw, 2.05rem); line-height: 1.5; font-weight: 600; }
.hero-sub { max-width: 62ch; margin-top: .9em; color: var(--ink-2); text-wrap: pretty; }
html[lang='ja'] .hero-sub { max-width: 36em; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 1.5em; }

.hero-vertical { writing-mode: vertical-rl; font: 600 .8125rem/1 var(--font-jp); letter-spacing: .42em; color: var(--ink-3); padding-block: 4px; border-right: 1px solid var(--line); padding-right: 14px; white-space: nowrap; }
.hero-side { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 22px; align-items: end; }
.kanji-stage { position: relative; writing-mode: vertical-rl; width: 1em; height: 3.06em; font: 600 clamp(4.6rem, 7.4vw, 7.6rem)/1.02 var(--font-jp); }
.kj { position: absolute; inset: 0; color: var(--a); pointer-events: none; }
[data-theme='dark'] .kj { color: var(--ad); }
.kj i { display: inline-block; font-style: normal; opacity: 0; transform: translateY(.35em); filter: blur(6px); transition: opacity .45s ease, transform .7s var(--ease), filter .45s ease; }
.kj.is-on i { opacity: 1; transform: none; filter: none; transition-delay: calc(var(--k) * 90ms + 120ms); }
.pick-title { font: 400 .75rem var(--font-mono); color: var(--ink-3); margin-bottom: 8px; }
.pick { border-top: 1px solid var(--line); }
.pick a { display: grid; grid-template-columns: 2.1rem 1fr; column-gap: 4px; align-items: baseline; padding: 9px 0 9px 0; min-height: 44px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink-3); transition: color .3s, padding .45s var(--ease); }
.pick-no { font: 400 .6875rem var(--font-mono); }
.pick-name { font: 400 1.35rem/1.1 var(--font-display); color: var(--ink-2); transition: color .3s; }
.pick-type { grid-column: 2; font-size: .75rem; line-height: 1.35; }
.pick a.is-on, .pick a:hover { color: var(--ink-2); padding-left: 10px; }
.pick a.is-on .pick-name, .pick a:hover .pick-name { color: var(--ink); }
.pick a.is-on .pick-no { color: var(--seal-ink); }

.hero-facts { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--ink); }
.hero-facts > div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 6px; padding: 18px 20px 22px 0; }
.hero-facts > div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.hero-facts dd { font: 400 clamp(1.9rem, 3.4vw, 2.9rem)/1 var(--font-display); font-variant-numeric: tabular-nums; }
.hero-facts dt { font-size: .8125rem; line-height: 1.4; color: var(--ink-2); max-width: 26ch; }

@media (max-width: 1099px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .hero-vertical { display: none; }
  .hero-side { grid-template-columns: auto minmax(0, 1fr); gap: 20px; max-width: 560px; margin-top: 12px; }
  .kanji-stage { font-size: clamp(3.6rem, 13vw, 5.2rem); }
}
@media (max-width: 419px) { .sec-jp { display: none; } }
@media (max-width: 719px) {
  .hero-facts { grid-template-columns: repeat(2, 1fr); }
  .hero-facts > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .hero-facts > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .pick-type { display: none; }
  .pick a { align-items: center; }
  .btn { padding-inline: 20px; }
}

/* ---------- sections ---------- */
.sec { padding-block: clamp(72px, 8.5vw, 124px); }
.sec-head { display: flex; align-items: baseline; gap: 16px; border-top: 1px solid var(--ink); padding-top: 16px; margin-bottom: clamp(32px, 5vw, 68px); }
.sec-no { font: 500 .8125rem var(--font-mono); color: var(--seal-ink); }
.sec-head h2 { font: 400 clamp(2.7rem, 6.4vw, 5.4rem)/1 var(--font-display); letter-spacing: -.015em; }
html[lang='ja'] .sec-head h2 { font-size: clamp(2.1rem, 4.6vw, 3.9rem); font-weight: 600; letter-spacing: .02em; line-height: 1.2; }
.sec-jp { margin-left: auto; font: 600 .9375rem var(--font-jp); letter-spacing: .28em; color: var(--ink-3); white-space: nowrap; }
html[lang='ja'] .sec-jp { font: 400 1.5rem var(--font-display); letter-spacing: 0; }
.lede { max-width: 62ch; font-size: 1.125rem; color: var(--ink-2); text-wrap: pretty; }
html[lang='ja'] .lede { max-width: 40em; font-size: 1.0625rem; }
h4, .mini-h, .exp-h, .side-card h3, h5 { font: 500 .75rem/1.4 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 12px; }
html[lang='ja'] :is(h4, .mini-h, .exp-h, .side-card h3, h5) { font-family: var(--font-body); font-size: .8125rem; letter-spacing: .12em; font-weight: 600; }

/* Off-screen chapters skip layout and paint until they are near the viewport. */
.project, #expertise, #approach, #experience, #certifications, #resume, #contact { content-visibility: auto; contain-intrinsic-size: auto 1100px; }
.project { contain-intrinsic-size: auto 1700px; }

/* ---------- about ---------- */
.about-statement { max-width: 27ch; font: 400 clamp(2rem, 4.6vw, 4rem)/1.08 var(--font-display); letter-spacing: -.012em; margin-bottom: clamp(40px, 6vw, 88px); }
html[lang='ja'] .about-statement { max-width: 19em; font-size: clamp(1.5rem, 3.1vw, 2.6rem); line-height: 1.5; font-weight: 600; letter-spacing: .01em; }
.js .about-statement .w { opacity: .5; transition: opacity .5s ease; } /* .5 keeps the dimmed words above 3:1 contrast */
.js .about-statement .w.is-on { opacity: 1; }
.about-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 104px); align-items: start; }
.about-text p + p { margin-top: 1.1em; }
.about-text p:first-child { font-size: 1.1875rem; }
html[lang='ja'] .about-text p:first-child { font-size: 1.0625rem; }
.about-facts > div { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.about-facts > div:last-child { border-bottom: 1px solid var(--line); }
.about-facts dt { font: 400 .75rem/1.9 var(--font-mono); color: var(--ink-3); }
html[lang='ja'] .about-facts dt { font-family: var(--font-body); font-size: .8125rem; }
.about-facts dd { font-size: .9375rem; line-height: 1.55; }
@media (max-width: 899px) {
  .about-grid { grid-template-columns: minmax(0, 1fr); }
  .about-facts > div { grid-template-columns: 7.5rem minmax(0, 1fr); }
}

/* ---------- projects ---------- */
.sec-projects { padding-bottom: 0; }
.filter, .stack-pick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: clamp(24px, 3vw, 40px); }
.index { margin-top: clamp(24px, 3vw, 40px); border-top: 1px solid var(--ink); }
.index > li { position: relative; isolation: isolate; border-bottom: 1px solid var(--line); }
.index > li[hidden] { display: none; }
.index-row {
  position: relative; display: grid; grid-template-columns: 2.6rem 6.6rem minmax(6.5rem, .9fr) minmax(0, 2.4fr) minmax(0, 1.5fr) 1.2rem;
  gap: 16px; align-items: center; padding: 18px 6px; min-height: 68px; text-decoration: none; color: var(--ink);
  transition: color .3s ease, padding .5s var(--ease);
}
a.index-row::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--ink); transform: scaleY(0); transform-origin: 50% 100%; transition: transform .45s var(--ease); }
a.index-row:hover, a.index-row:focus-visible { color: var(--paper); padding-inline: 18px; }
a.index-row:hover::before, a.index-row:focus-visible::before { transform: none; }
.ix-no { font: 400 .75rem var(--font-mono); color: var(--ink-3); }
.ix-kanji { font: 600 1.5rem/1 var(--font-jp); white-space: nowrap; }
.ix-name { font: 400 1.75rem/1 var(--font-display); }
.ix-what { font-size: .9375rem; line-height: 1.4; color: var(--ink-2); }
.ix-type { font: 400 .75rem/1.4 var(--font-mono); color: var(--ink-3); }
html[lang='ja'] .ix-type { font-family: var(--font-body); font-size: .8125rem; }
a.index-row:hover :is(.ix-no, .ix-what, .ix-type), a.index-row:focus-visible :is(.ix-no, .ix-what, .ix-type) { color: inherit; }
.ix-arrow { transition: transform .4s var(--ease); }
a.index-row:hover .ix-arrow { transform: translateY(4px); }
.index-dev .index-row { color: var(--ink-3); }
.index-dev .ix-what { color: var(--ink-3); }
.dev-tag { display: inline-block; border: 1px dashed currentColor; border-radius: 999px; padding: 3px 10px; color: var(--ink-2); white-space: nowrap; }
.ix-preview { position: fixed; left: 0; top: 0; z-index: 70; width: 300px; border-radius: 10px; overflow: hidden; pointer-events: none; box-shadow: var(--shadow); opacity: 0; transform: translate3d(var(--x, 0px), var(--y, 0px), 0) rotate(-2deg) scale(.86); transition: opacity .25s ease; }
.ix-preview.is-on { opacity: 1; transform: translate3d(var(--x, 0px), var(--y, 0px), 0) rotate(-2deg) scale(1); }
.ix-preview img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; background: var(--paper-2); }
@media (max-width: 899px) {
  .index-row { grid-template-columns: 2rem 4.4rem minmax(0, 1fr) 1.2rem; gap: 6px 12px; padding: 14px 2px; }
  .ix-kanji { font-size: 1.25rem; }
  .ix-name { font-size: 1.5rem; }
  .ix-what { grid-column: 3; grid-row: 2; font-size: .875rem; }
  .ix-type { grid-column: 3; grid-row: 3; }
  .ix-arrow { grid-column: 4; grid-row: 1; }
  .ix-preview { display: none; }
}

.project { --a: var(--accent); margin-top: clamp(72px, 9vw, 128px); padding-block: clamp(40px, 6vw, 80px) 0; border-top: 1px solid var(--line); }
.project:first-of-type { margin-top: clamp(64px, 8vw, 112px); }
.project[hidden] { display: none; }
[data-theme='dark'] .project { --a: var(--accent-d); }
.project-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(32px, 5vw, 88px); align-items: start; }
.project-sticky { position: sticky; top: calc(var(--head-h) + 28px); padding-bottom: 8px; }
.project-no { display: flex; align-items: baseline; gap: 8px; font: 400 .75rem var(--font-mono); color: var(--ink-3); }
.project-idx { color: var(--a); font-weight: 500; }
.project-period { margin-left: auto; }
.project-kanji { margin: .14em 0 .08em -.04em; font: 600 clamp(4.4rem, 8.1vw, 8.3rem)/1.05 var(--font-jp); color: var(--a); white-space: nowrap; }
.project-kanji i { display: inline-block; font-style: normal; }
.project h3 { font: 400 clamp(2.7rem, 4.8vw, 4.4rem)/1 var(--font-display); letter-spacing: -.015em; }
.project-reading { margin-top: 6px; font: italic 400 1.125rem var(--font-display); color: var(--ink-2); }
html[lang='ja'] .project-reading { font: 600 .9375rem var(--font-jp); letter-spacing: .08em; }
.project-tagline { margin-top: 18px; font-size: 1.125rem; line-height: 1.5; max-width: 30ch; text-wrap: balance; }
html[lang='ja'] .project-tagline { font-size: 1.0625rem; max-width: 20em; line-height: 1.7; }
.project-type { margin-top: 14px; font: 400 .75rem/1.5 var(--font-mono); color: var(--ink-3); }
html[lang='ja'] .project-type { font-family: var(--font-body); font-size: .8125rem; }
.project-links { display: flex; flex-wrap: wrap; gap: 4px 22px; margin-top: 20px; }
.project-note { margin-top: 10px; font-size: .8125rem; line-height: 1.5; color: var(--ink-3); max-width: 34ch; }

.project-body > * + * { margin-top: clamp(28px, 3.4vw, 44px); }
.shot { position: relative; }
.frame { display: block; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--paper-2); box-shadow: var(--shadow); text-decoration: none; }
.frame-main { transform: perspective(1400px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .6s var(--ease); transform-origin: 50% 50%; }
.frame-bar { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-bottom: 1px solid var(--line); font: 400 .6875rem var(--font-mono); color: var(--ink-3); }
.frame-bar i { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.frame-url { margin-left: 10px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.frame-img { display: block; overflow: hidden; }
.frame-img img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top center; transition: transform 1.2s var(--ease); }
.frame-main:hover .frame-img img { transform: scale(1.025); }
.frame-2 { position: relative; z-index: 2; width: 44%; margin: -9% -2% 0 auto; }
.frame-2 .frame-bar { height: 26px; }
.frame-phone { position: relative; z-index: 2; width: 23%; margin: -33% 5% 0 auto; border: 6px solid var(--ink); border-radius: 26px; background: var(--ink); }
[data-theme='dark'] .frame-phone { border-color: #2a2a27; background: #2a2a27; }
.frame-phone .frame-img { border-radius: 20px; }
.frame-phone img { aspect-ratio: 520 / 1125; }
.shot figcaption { margin-top: 30px; font: 400 .6875rem/1.5 var(--font-mono); color: var(--ink-3); }
html[lang='ja'] .shot figcaption { font-family: var(--font-body); font-size: .75rem; }
.notice { padding: 14px 18px; border-left: 2px solid var(--a); background: color-mix(in srgb, var(--a) 9%, transparent); font-size: .9375rem; line-height: 1.55; border-radius: 0 8px 8px 0; }
.notice strong { font: 500 .6875rem var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--a); margin-right: 8px; }
.project-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 3vw, 48px); }
.project-cols p { font-size: 1rem; line-height: 1.65; }
html[lang='ja'] .project-cols p { font-size: .9375rem; line-height: 1.9; }
.highlights li { position: relative; padding: 12px 0 12px 1.9em; border-top: 1px solid var(--line); font-size: 1rem; line-height: 1.6; }
html[lang='ja'] .highlights li { font-size: .9375rem; line-height: 1.85; }
.highlights li::before { content: ''; position: absolute; left: 0; top: 1.5em; width: 1em; height: 1.5px; background: var(--a); }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-block: 1px solid var(--ink); }
.metrics > div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 8px; padding: 20px 16px 22px 0; }
.metrics > div + div { padding-left: 16px; border-left: 1px solid var(--line); }
.metrics dd { font: 400 clamp(2rem, 3.3vw, 3rem)/1 var(--font-display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.metrics dt { font-size: .8125rem; line-height: 1.4; color: var(--ink-2); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { padding: 5px 10px; border: 1px solid var(--line); border-radius: 6px; font: 400 .75rem/1.4 var(--font-mono); color: var(--ink-2); transition: border-color .3s, color .3s, transform .4s var(--ease); }
.tags li:hover { border-color: var(--a); color: var(--ink); transform: translateY(-2px); }

.more { border-block: 1px solid var(--line); }
.more-h { margin: 0; }
.more-btn { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; min-height: 56px; padding: 0; border: 0; background: none; cursor: pointer; font: inherit; letter-spacing: inherit; text-transform: inherit; color: var(--ink-2); text-align: left; transition: color .3s; }
.more-btn:hover { color: var(--ink); }
.plus { position: relative; flex: none; width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 50%; transition: transform .5s var(--ease), background-color .3s, border-color .3s; }
.plus::before, .plus::after { content: ''; position: absolute; left: 50%; top: 50%; width: 11px; height: 1.5px; margin: -.75px 0 0 -5.5px; background: currentColor; transition: transform .5s var(--ease); }
.plus::after { transform: rotate(90deg); }
.more-btn:hover .plus { border-color: var(--ink); }
.more-btn[aria-expanded='true'] .plus { transform: rotate(180deg); background: var(--ink); color: var(--paper); border-color: var(--ink); }
.more-btn[aria-expanded='true'] .plus::after { transform: rotate(0deg); }
.more-panel { display: grid; grid-template-rows: 1fr; }
.js .more-panel { grid-template-rows: 0fr; transition: grid-template-rows .6s var(--ease); }
.js .more-panel > .more-inner { visibility: hidden; transition: visibility 0s .6s; }
.js .more-btn[aria-expanded='true'] ~ .more-panel, .js .more.is-open .more-panel { grid-template-rows: 1fr; }
.js .more.is-open .more-panel > .more-inner { visibility: visible; transition-delay: 0s; }
.more-inner { overflow: hidden; }
.more-inner > :first-child { margin-top: 8px; }
.more-inner > :last-child { margin-bottom: 26px; }
.more-inner h5 + * { margin-bottom: 26px; }
.flow { display: flex; flex-wrap: wrap; gap: 10px 0; }
.flow li { position: relative; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); font-size: .8125rem; line-height: 1.4; }
.flow li + li { margin-left: 28px; }
.flow li + li::before { content: '→'; position: absolute; left: -21px; top: 50%; transform: translateY(-52%); color: var(--a); font-size: .875rem; }
.js .more.is-open .flow li { animation: rise-in .6s var(--ease) both; animation-delay: calc(160ms + var(--i) * 70ms); }
.limits li { position: relative; padding-left: 1.4em; font-size: .9375rem; line-height: 1.6; color: var(--ink-2); }
.limits li + li { margin-top: 6px; }
.limits li::before { content: '—'; position: absolute; left: 0; color: var(--ink-3); }

@media (max-width: 999px) {
  .project-grid { grid-template-columns: minmax(0, 1fr); }
  .project-sticky { position: static; }
  .project-tagline { max-width: 40ch; }
}
@media (max-width: 639px) {
  .project-cols { grid-template-columns: minmax(0, 1fr); }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metrics > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .metrics > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .frame-2 { width: 62%; margin-top: -12%; }
  .frame-phone { width: 30%; margin-top: -38%; border-width: 4px; border-radius: 18px; }
  .frame-phone .frame-img { border-radius: 14px; }
  .flow li + li { margin-left: 24px; }
}

/* ---------- expertise ---------- */
.groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(32px, 6vw, 96px); margin-top: clamp(28px, 4vw, 52px); border-bottom: 1px solid var(--line); }
.group { display: grid; grid-template-columns: minmax(8.5rem, 1fr) minmax(0, 2.4fr); gap: 18px; padding: 24px 0 30px; border-top: 1px solid var(--line); }
.group h3 { font: 400 1.5rem/1.15 var(--font-display); }
html[lang='ja'] .group h3 { font-size: 1.125rem; font-weight: 600; line-height: 1.5; }
.tech { display: flex; flex-wrap: wrap; gap: 6px; align-content: flex-start; }
.tech li { padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: .875rem; line-height: 1.45; transition: opacity .4s ease, background-color .4s ease, color .4s ease, border-color .4s ease, transform .5s var(--ease); }
.groups.is-picked .tech li { opacity: .45; }
.groups.is-picked .tech li.is-on { opacity: 1; background: var(--ink); border-color: var(--ink); color: var(--paper); transform: translateY(-1px); }
@media (max-width: 899px) { .groups { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 519px) { .group { grid-template-columns: minmax(0, 1fr); gap: 12px; } }

/* ---------- approach ---------- */
.principles { margin-top: clamp(28px, 4vw, 52px); border-bottom: 1px solid var(--line); }
.principle { display: grid; grid-template-columns: 3.2rem minmax(0, 5fr) minmax(0, 7fr); gap: clamp(16px, 3vw, 48px); padding: clamp(26px, 3.4vw, 44px) 0; border-top: 1px solid var(--line); }
.p-no { font: 400 .75rem/2.6 var(--font-mono); color: var(--seal-ink); }
.principle h3 { font: 400 clamp(1.75rem, 3.1vw, 2.7rem)/1.08 var(--font-display); letter-spacing: -.01em; text-wrap: balance; }
html[lang='ja'] .principle h3 { font-size: clamp(1.3rem, 2.1vw, 1.8rem); font-weight: 600; line-height: 1.5; }
.evidence li { display: grid; grid-template-columns: 3.9rem minmax(0, 1fr); gap: 14px; align-items: start; padding: 10px 0; font-size: .9375rem; line-height: 1.6; color: var(--ink-2); }
.evidence li + li { border-top: 1px dashed var(--line); }
.evidence b { font-weight: 600; color: var(--ink); margin-right: .3em; }
.ev-tag { display: inline-flex; align-items: center; justify-content: center; min-height: 28px; margin-top: 1px; border: 1px solid currentColor; border-radius: 5px; font: 600 .8125rem/1 var(--font-jp); color: var(--pa); text-decoration: none; white-space: nowrap; transition: background-color .3s, color .3s; }
[data-theme='dark'] .ev-tag { color: var(--pad); }
.ev-tag:hover { background: var(--pa); color: var(--paper); border-color: var(--pa); }
[data-theme='dark'] .ev-tag:hover { background: var(--pad); border-color: var(--pad); }
@media (max-width: 899px) {
  .principle { grid-template-columns: 2.4rem minmax(0, 1fr); }
  .evidence { grid-column: 2; }
}

/* ---------- experience ---------- */
.exp-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(36px, 7vw, 120px); align-items: start; }
.exp-h { margin-bottom: 22px; }
.timeline + .exp-h { margin-top: clamp(40px, 5vw, 64px); }
.timeline { position: relative; padding-left: 30px; }
.timeline::before, .timeline::after { content: ''; position: absolute; left: 4px; top: 10px; bottom: 6px; width: 1px; background: var(--line); }
.timeline::after { background: var(--seal); transform-origin: 50% 0; transform: scaleY(var(--p, 1)); }
.tl-item { position: relative; }
.tl-item + .tl-item { margin-top: clamp(30px, 4vw, 48px); }
.tl-item::before { content: ''; position: absolute; left: -30px; top: 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--paper); border: 1.5px solid var(--seal); }
.tl-date { font: 400 .75rem var(--font-mono); color: var(--ink-3); margin-bottom: 6px; }
html[lang='ja'] .tl-date { font-family: var(--font-body); font-size: .8125rem; }
.tl-item h4 { font: 400 clamp(1.6rem, 2.6vw, 2.1rem)/1.12 var(--font-display); letter-spacing: 0; text-transform: none; color: var(--ink); margin-bottom: 4px; }
html[lang='ja'] .tl-item h4 { font: 600 1.25rem/1.5 var(--font-jp); letter-spacing: .02em; }
.tl-org { font-size: .9375rem; color: var(--ink-2); }
.tl-item ul { margin-top: 12px; }
.tl-item ul li { position: relative; padding-left: 1.4em; font-size: .9375rem; line-height: 1.65; }
html[lang='ja'] .tl-item ul li { line-height: 1.85; }
.tl-item ul li + li { margin-top: 6px; }
.tl-item ul li::before { content: ''; position: absolute; left: 0; top: .78em; width: .7em; height: 1.5px; background: var(--ink-3); }
.exp-side { display: grid; gap: 20px; position: sticky; top: calc(var(--head-h) + 28px); }
.side-card { border: 1px solid var(--line); border-radius: 16px; padding: 24px; background: color-mix(in srgb, var(--paper-2) 60%, transparent); }
.langs li { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 2px 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.lang-name { font-weight: 500; }
.lang-level { font: 400 1.75rem/1 var(--font-display); }
html[lang='ja'] .lang-level { font-size: 1.375rem; }
.lang-note { grid-column: 1 / -1; font-size: .8125rem; line-height: 1.5; color: var(--ink-2); }
.cp a { display: grid; grid-template-columns: 1fr auto auto 14px; align-items: baseline; gap: 8px; padding: 12px 0; min-height: 48px; border-top: 1px solid var(--line); text-decoration: none; transition: color .3s; }
.cp a:hover { color: var(--seal-ink); }
.cp-site { font-weight: 500; }
.cp-val { font: 400 1.5rem/1 var(--font-display); font-variant-numeric: tabular-nums; }
.cp-unit { font-size: .75rem; color: var(--ink-3); }
.cp .i { align-self: center; }
@media (max-width: 899px) {
  .exp-grid { grid-template-columns: minmax(0, 1fr); }
  .exp-side { position: static; }
}

/* ---------- certifications ---------- */
.certs { margin-top: clamp(24px, 3vw, 40px); border-top: 1px solid var(--ink); }
.certs li { border-bottom: 1px solid var(--line); }
.certs a { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr) auto; gap: 8px 24px; align-items: baseline; padding: 18px 6px; text-decoration: none; transition: padding .5s var(--ease), background-color .3s; }
.certs a:hover, .certs a:focus-visible { padding-inline: 16px; background: color-mix(in srgb, var(--ink) 5%, transparent); }
.certs time { font: 400 .75rem var(--font-mono); color: var(--ink-3); white-space: nowrap; }
html[lang='ja'] .certs time { font-family: var(--font-body); font-size: .8125rem; }
.cert-main { display: grid; gap: 2px; }
.cert-title { font: 400 clamp(1.25rem, 2vw, 1.6rem)/1.2 var(--font-display); }
.cert-issuer { font-size: .875rem; color: var(--ink-2); }
.cert-go { display: inline-flex; align-items: center; gap: 6px; font: 400 .75rem var(--font-mono); color: var(--ink-2); white-space: nowrap; }
html[lang='ja'] .cert-go { font-family: var(--font-body); font-size: .8125rem; }
.certs a:hover .cert-go { color: var(--seal-ink); }
@media (max-width: 719px) {
  .certs a { grid-template-columns: minmax(0, 1fr) auto; }
  .certs time { grid-column: 1 / -1; }
}

/* ---------- résumé ---------- */
.sheets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(18px, 2.6vw, 36px); margin-top: clamp(28px, 4vw, 52px); }
.sheet { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(20px, 3vw, 40px); align-items: center; padding: clamp(22px, 3vw, 40px); border: 1px solid var(--line); border-radius: 20px; background: var(--paper-2); transition: border-color .4s, transform .6s var(--ease); }
.sheet:hover { border-color: var(--ink); }
.paper { display: flex; flex-direction: column; gap: 5px; width: clamp(104px, 11vw, 148px); aspect-ratio: 210 / 297; padding: 12% 10%; background: #fdfcf9; color: #1a1a18; border-radius: 3px; box-shadow: 0 18px 30px -16px rgba(0, 0, 0, .45), 0 0 0 1px rgba(0, 0, 0, .06); transform: rotate(-4deg); transition: transform .7s var(--ease); overflow: hidden; }
.sheet:hover .paper { transform: rotate(0deg) translateY(-6px) scale(1.03); }
.paper-name { font: 400 clamp(.55rem, .9vw, .75rem)/1 var(--font-display); text-align: center; letter-spacing: .06em; text-transform: uppercase; }
.paper-rule { height: 1px; background: currentColor; opacity: .6; }
.paper-line { font: 500 clamp(.3rem, .48vw, .4rem)/1.2 var(--font-mono); opacity: .85; margin-top: 4px; white-space: nowrap; overflow: hidden; }
.paper-bars { flex: 1; min-height: 8px; background: repeating-linear-gradient(to bottom, rgba(26, 26, 24, .28) 0 1px, transparent 1px 5px); }
.sheet-kind { font: 500 .75rem var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--seal-ink); }
html[lang='ja'] .sheet-kind { font-family: var(--font-body); font-size: .8125rem; font-weight: 600; }
.sheet h3 { margin: 6px 0 10px; font: 400 clamp(1.7rem, 2.8vw, 2.4rem)/1.08 var(--font-display); text-wrap: balance; }
html[lang='ja'] .sheet h3 { font-size: clamp(1.25rem, 1.9vw, 1.6rem); font-weight: 600; line-height: 1.45; }
.sheet-body p { font-size: .9375rem; line-height: 1.6; color: var(--ink-2); }
.sheet-meta { margin-top: 8px; font: 400 .75rem var(--font-mono) !important; color: var(--ink-3) !important; }
.sheet-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
@media (max-width: 999px) { .sheets { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 519px) {
  .sheet { grid-template-columns: minmax(0, 1fr); }
  .paper { width: 96px; }
}

/* ---------- contact ---------- */
.sec-contact { padding-bottom: clamp(64px, 8vw, 112px); }
.contact-big { max-width: 17ch; font: 400 clamp(2.6rem, 7vw, 6.2rem)/1 var(--font-display); letter-spacing: -.02em; text-wrap: balance; }
html[lang='ja'] .contact-big { max-width: 15em; font-size: clamp(1.7rem, 4vw, 3.4rem); font-weight: 600; line-height: 1.4; letter-spacing: .01em; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(36px, 6vw, 104px); margin-top: clamp(36px, 5vw, 72px); align-items: start; }
.contact-text { max-width: 54ch; color: var(--ink-2); }
.mail-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 26px; }
.mail { font: 400 clamp(1.35rem, 3.3vw, 2.6rem)/1.2 var(--font-display); text-decoration: none; padding-bottom: 4px; background: linear-gradient(var(--seal), var(--seal)) 0 100% / 100% 1.5px no-repeat; transition: background-size .6s var(--ease), color .3s; overflow-wrap: anywhere; }
.mail:hover { color: var(--seal-ink); background-size: 0% 1.5px; background-position: 100% 100%; }
.copy-btn.is-done { background: var(--seal); border-color: var(--seal); color: var(--on-seal); }
.clocks { display: flex; flex-wrap: wrap; gap: 6px 24px; margin-top: 30px; font: 400 .75rem var(--font-mono); color: var(--ink-3); }
html[lang='ja'] .clocks { font-family: var(--font-body); font-size: .8125rem; }
.clocks time { color: var(--ink); font-family: var(--font-mono); margin-left: 4px; font-variant-numeric: tabular-nums; }
.elsewhere { border-top: 1px solid var(--line); }
.elsewhere a { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr) 14px; gap: 12px; align-items: center; min-height: 52px; padding: 8px 4px; border-bottom: 1px solid var(--line); text-decoration: none; font-weight: 500; transition: padding .5s var(--ease), color .3s; }
.elsewhere a:hover { padding-inline: 12px; color: var(--seal-ink); }
.else-handle { font: 400 .8125rem var(--font-mono); color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 899px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--line); padding-block: 26px 34px; font-size: .8125rem; color: var(--ink-2); }
.foot-grid { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 32px; }
.to-top { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; margin-left: auto; text-decoration: none; }
.to-top:hover { color: var(--seal-ink); }
.foot-note { margin-top: 14px; font-size: .75rem; color: var(--ink-3); }

.cursor-tag { position: fixed; left: 0; top: 0; z-index: 95; pointer-events: none; padding: 8px 14px; border-radius: 999px; background: var(--seal); color: var(--on-seal); font: 500 .75rem/1 var(--font-mono); white-space: nowrap; opacity: 0; transform: translate3d(var(--x, 0px), var(--y, 0px), 0) scale(.5); transition: opacity .2s ease, scale .3s; }
.cursor-tag.is-on { opacity: 1; transform: translate3d(var(--x, 0px), var(--y, 0px), 0) scale(1); }

/* ---------- motion: entrances (only when JS is running) ---------- */
.js .hero-name .line > span { transform: translateY(112%); }
.js.ready .hero-name .line > span { transform: none; transition: transform 1.15s var(--ease) calc(var(--d) * 1ms); }
.js .rise { opacity: 0; transform: translateY(18px); }
.js .hero-sub.rise { opacity: 1; } /* largest text block: painted from the first frame, it only slides */
.js.ready .rise { opacity: 1; transform: none; transition: opacity .9s ease calc(var(--d) * 1ms), transform 1s var(--ease) calc(var(--d) * 1ms); }
.js .seal-stamp { opacity: 0; transform: rotate(-7deg) scale(1.9); }
.js.ready .seal-stamp { opacity: .94; transform: rotate(-7deg) scale(1); transition: opacity .18s ease .85s, transform .5s cubic-bezier(.3, 1.7, .5, 1) .85s; }

.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s ease calc(var(--i, 0) * 80ms), transform 1s var(--ease) calc(var(--i, 0) * 80ms); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .project-kanji.reveal { opacity: 1; transform: none; }
.js .project-kanji i { opacity: 0; transform: translateY(.3em) rotate(4deg); transition: opacity .7s ease calc(var(--k) * 110ms), transform 1s var(--ease) calc(var(--k) * 110ms); }
.js .project-kanji.is-in i { opacity: 1; transform: none; }
.js .reveal-shot .frame-main { clip-path: inset(0 0 100% 0 round 12px); }
.js .reveal-shot .frame-img img { transform: scale(1.14); }
.js .reveal-shot :is(.frame-2, .frame-phone) { opacity: 0; translate: 0 40px; }
.js .reveal-shot.is-in .frame-main { clip-path: inset(0 round 12px); transition: clip-path 1.2s var(--ease), transform .6s var(--ease); }
.js .reveal-shot.is-in .frame-img img { transform: none; transition: transform 1.6s var(--ease); }
.js .reveal-shot.is-in .frame-main:hover .frame-img img { transform: scale(1.025); }
.js .reveal-shot.is-in :is(.frame-2, .frame-phone) { opacity: 1; translate: 0 0; transition: opacity .9s ease .35s, translate 1.1s var(--ease) .35s; }
.failsafe .reveal, .failsafe .rise, .failsafe .project-kanji i, .failsafe .reveal-shot :is(.frame-2, .frame-phone) { opacity: 1 !important; transform: none !important; translate: none !important; }
.failsafe .reveal-shot .frame-main { clip-path: none !important; }
.failsafe .about-statement .w { opacity: 1 !important; }

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reveal-shot.is-in .frame-2, .reveal-shot.is-in .frame-phone { animation: drift linear both; animation-timeline: view(); animation-range: entry 20% exit 80%; }
    @keyframes drift { from { transform: translateY(18px); } to { transform: translateY(-18px); } }
  }
}

/* page transitions: language switch (cross-document) and theme / filter (same document) */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .4s; }
.vt-theme::view-transition-old(root) { animation: none; }
.vt-theme::view-transition-new(root) { animation: theme-reveal .7s var(--ease) both; }
@keyframes theme-reveal { from { clip-path: circle(0 at var(--tx, 90%) var(--ty, 5%)); } to { clip-path: circle(150vmax at var(--tx, 90%) var(--ty, 5%)); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  .js .reveal, .js .rise, .js .project-kanji i, .js .hero-name .line > span, .js .reveal-shot :is(.frame-2, .frame-phone) { opacity: 1; transform: none; translate: none; }
  .js .seal-stamp { opacity: .94; transform: rotate(-7deg); }
  .js .reveal-shot .frame-main { clip-path: none; }
  .js .reveal-shot .frame-img img { transform: none; }
  .js .about-statement .w { opacity: 1; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* ---------- print ---------- */
@media print {
  .site-head, .progress, .menu, .filter, .stack-pick, .ix-preview, .cursor-tag, .to-top, body::before, .hero-side, .hero-vertical { display: none !important; }
  .js .reveal, .js .rise, .js .hero-name .line > span, .js .project-kanji i { opacity: 1 !important; transform: none !important; }
  .js .reveal-shot .frame-main { clip-path: none !important; }
  .js .more-panel { grid-template-rows: 1fr !important; }
  .js .more-panel > .more-inner { visibility: visible !important; }
  .js .about-statement .w { opacity: 1 !important; }
  .hero { min-height: 0; }
  body { background: #fff; color: #000; }
}
