:root {
  --bg: #fffafa;
  --paper: #ffffff;
  --ink: #2b1a1e;
  --muted: #7d666b;
  --accent: #d3263a;
  --accent-deep: #b01e30;
  --accent-soft: #fdeaec;
  --line: rgba(211, 38, 58, .16);
  --shadow: 0 16px 40px rgba(120, 20, 35, .10);
  --radius: 20px;
  --pad: clamp(20px, 6vw, 96px);
  --font-ja: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Yu Gothic UI", "Noto Sans JP", sans-serif;
  --font-latin: "Nunito", var(--font-ja);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ja);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { padding: 0; margin: 0; list-style: none; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.center { text-align: center; }
.br-wide { display: none; }
@media (min-width: 600px) { .br-wide { display: inline; } }

.skip {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--accent); color: #fff; padding: 8px 12px; border-radius: 8px;
}
.skip:focus { left: 8px; }

/* ---------- background artwork ---------- */
.bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: #0a1428; }
.bg picture, .bg img { width: 100%; height: 100%; }
.bg img {
  object-fit: cover;
  object-position: 50% 50%;
  transform: scale(1.04);
  animation: drift 50s ease-in-out infinite alternate;
}
.bg__layer {
  position: absolute; inset: 0; z-index: 1;
  object-position: 50% 50% !important;
  opacity: 0;
  transition: opacity var(--bg-fade, 1.8s) ease-in-out;
}
.bg__layer.is-on { opacity: 1; }
.bg.is-paused img, .hero.is-paused * { animation-play-state: paused !important; }
.bg::after {
  content: ""; position: absolute; inset: 0; z-index: 2;
  background:
    radial-gradient(55% 60% at 50% 52%, rgba(12, 8, 14, .62), rgba(12, 8, 14, 0) 100%),
    linear-gradient(180deg, rgba(12, 8, 14, .45) 0%, rgba(12, 8, 14, .08) 28%, rgba(12, 8, 14, .10) 100%);
}
#fireflies { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; pointer-events: none; mix-blend-mode: screen; }
/* scroll-linked whitening: main.js raises --bg-white from 0 to ~0.9 while the hero scrolls away */
.bg__fade { position: absolute; inset: 0; z-index: 4; background: var(--bg); opacity: var(--bg-white, 0); pointer-events: none; }

@media (max-width: 767px) {
  .bg img { object-position: 50% 20%; }
  .bg__layer { object-position: 50% 20% !important; }
  .bg::after {
    background: linear-gradient(180deg, rgba(12, 8, 14, .18) 0%, rgba(12, 8, 14, .10) 40%, rgba(12, 8, 14, .28) 100%);
  }
}

/* ---------- floating nav (liquid glass) ---------- */
.nav {
  --glass-tint: rgba(255, 255, 255, .16);
  --glass-tint-2: rgba(255, 255, 255, .06);
  --glass-rim: rgba(255, 255, 255, .55);
  --glass-shadow: rgba(0, 0, 0, .32);
  --nav-ink: #fff;
  --nav-muted: rgba(255, 255, 255, .78);
  --nav-hover-bg: rgba(255, 255, 255, .22);
  --nav-hover-ink: #fff;
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding: 7px 8px 7px 18px; border-radius: 999px;
  background: linear-gradient(135deg, var(--glass-tint), var(--glass-tint-2));
  -webkit-backdrop-filter: blur(22px) saturate(180%) brightness(1.06);
  backdrop-filter: blur(22px) saturate(180%) brightness(1.06);
  border: 1px solid transparent;
  color: var(--nav-ink); font-size: 14px; white-space: nowrap;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .70),
    inset 0 -1px 0 rgba(255, 255, 255, .18),
    inset 1px 0 0 rgba(255, 255, 255, .30),
    inset -1px 0 0 rgba(255, 255, 255, .30),
    0 14px 40px var(--glass-shadow),
    0 1px 2px rgba(0, 0, 0, .12);
  transition: color .35s, box-shadow .35s, background .35s;
  isolation: isolate;
}
/* specular sheen + a soft highlight that follows the cursor */
.nav::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
  background:
    radial-gradient(90px 60px at var(--mx, 30%) var(--my, 0%), rgba(255, 255, 255, .42), transparent 70%),
    radial-gradient(120% 90% at 18% -10%, rgba(255, 255, 255, .40), transparent 55%),
    radial-gradient(70% 70% at 88% 130%, rgba(255, 255, 255, .22), transparent 60%);
  opacity: .95;
}
/* refractive rim: bright edge that fades around the pill */
.nav::after {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; padding: 1px;
  background: linear-gradient(115deg, rgba(255, 255, 255, .95), rgba(255, 255, 255, .25) 28%, rgba(255, 255, 255, .08) 55%, rgba(255, 255, 255, .75));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.nav__brand { font-weight: 700; letter-spacing: .02em; text-shadow: 0 1px 8px rgba(0, 0, 0, .18); }
.nav nav { display: flex; gap: 2px; }
.nav nav a {
  padding: 6px 12px; border-radius: 999px; color: var(--nav-muted);
  transition: color .2s, background .2s, box-shadow .2s;
}
.nav nav a:hover, .nav nav a:focus-visible {
  color: var(--nav-hover-ink); background: var(--nav-hover-bg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 4px 14px rgba(0, 0, 0, .10);
}
/* once the white sheet is under it, switch to a light glass with dark text */
.nav.is-scrolled {
  --glass-tint: rgba(255, 250, 250, .62);
  --glass-tint-2: rgba(255, 250, 250, .38);
  --glass-shadow: rgba(120, 20, 35, .14);
  --nav-ink: var(--ink);
  --nav-muted: var(--muted);
  --nav-hover-bg: rgba(211, 38, 58, .10);
  --nav-hover-ink: var(--accent);
}
.nav.is-scrolled .nav__brand { text-shadow: none; }
.nav.is-scrolled::after {
  background: linear-gradient(115deg, rgba(255, 255, 255, 1), rgba(211, 38, 58, .18) 30%, rgba(211, 38, 58, .10) 60%, rgba(255, 255, 255, .9));
}
@media (max-width: 600px) {
  .nav { padding-left: 8px; font-size: 13px; }
  .nav__brand { display: none; }
  .nav nav a { padding: 6px 9px; }
}

/* ---------- hero ---------- */
.hero {
  --t: #fff;
  --tm: rgba(255, 255, 255, .84);
  position: relative; z-index: 1;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center; justify-content: center;
  padding: 110px var(--pad) 96px;
  text-align: center; color: var(--t);
}
.hero__inner { max-width: 640px; display: flex; flex-direction: column; align-items: center; position: relative; z-index: 1; opacity: var(--hero-opacity, 1); }
/* the photo dissolves into the white sheet: a soft band at the bottom of the hero */
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; z-index: 0; pointer-events: none;
  height: clamp(180px, 36vh, 360px);
  background: linear-gradient(to bottom, rgba(255, 250, 250, 0) 0%, rgba(255, 250, 250, .45) 50%, rgba(255, 250, 250, .9) 82%, var(--bg) 100%);
}
.avatar {
  width: 132px; height: 132px; border-radius: 50%; padding: 4px; margin: 0 0 24px;
  background: linear-gradient(135deg, #ffffff, #ff6b7a);
  box-shadow: 0 0 0 8px rgba(255, 255, 255, .14), 0 20px 60px rgba(0, 0, 0, .40);
}
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 3px solid #fff; }
.eyebrow {
  font-family: var(--font-latin); font-weight: 800; font-size: 12px;
  letter-spacing: .28em; text-transform: uppercase; color: var(--accent); margin: 0 0 10px;
}
.hero .eyebrow { color: #ff8a96; }
h1 {
  font-size: clamp(34px, 5.2vw, 60px); line-height: 1.2; margin: 0 0 16px;
  font-weight: 700; letter-spacing: .01em; text-shadow: 0 2px 24px rgba(0, 0, 0, .35);
}
.sparkle { display: inline-block; margin-left: .12em; animation: twinkle 2.6s ease-in-out infinite; }
.bio { font-size: clamp(16px, 1.5vw, 19px); color: var(--tm); margin: 0 0 26px; max-width: 46ch; }

.tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 0 0 34px; }
.tags a {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .55); background: rgba(255, 255, 255, .12);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: #fff; font-size: 14px; font-weight: 500;
  transition: transform .25s, background .25s, border-color .25s, color .25s;
}
.tags a:hover, .tags a:focus-visible { background: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
.tags a.has-img { padding-left: 6px; gap: 8px; }
.tags a img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px rgba(255, 255, 255, .7); }

/* monochrome social glyphs, no frames */
.icons { display: flex; flex-wrap: wrap; justify-content: center; gap: 34px; }
.icon {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  color: var(--t); opacity: .92;
  transition: transform .25s, opacity .25s, color .25s;
}
.icon svg { width: 30px; height: 30px; fill: currentColor; filter: drop-shadow(0 4px 14px rgba(0, 0, 0, .35)); }
.icon span { font-family: var(--font-latin); font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; opacity: .75; }
.icon:hover, .icon:focus-visible { opacity: 1; transform: translateY(-3px); color: #ff8a96; }

.scroll-cue {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 1; opacity: var(--hero-opacity, 1);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  color: var(--accent); font-family: var(--font-latin); font-size: 11px; font-weight: 800; letter-spacing: .3em; text-transform: uppercase;
}
.scroll-cue i { width: 2px; height: 38px; border-radius: 2px; background: linear-gradient(var(--accent), rgba(211, 38, 58, 0)); animation: cue 2.2s ease-in-out infinite; }

@media (max-width: 767px) {
  .hero { --t: var(--ink); --tm: var(--muted); align-items: flex-end; padding: 90px 16px 80px; }
  .hero__inner {
    width: 100%; padding: 26px 22px 24px; border-radius: 28px;
    background: rgba(255, 250, 250, .90);
    -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, .9);
    box-shadow: 0 30px 80px rgba(0, 0, 0, .30);
  }
  .avatar { width: 116px; height: 116px; margin: -84px auto 16px; box-shadow: 0 0 0 6px rgba(255, 250, 250, .9), 0 20px 50px rgba(0, 0, 0, .30); }
  .hero .eyebrow { color: var(--accent); }
  h1 { text-shadow: none; }
  .tags { margin-bottom: 26px; }
  .tags a { color: var(--accent-deep); background: var(--accent-soft); border-color: transparent; }
  .tags a:hover, .tags a:focus-visible { color: #fff; }
  .icons { gap: 26px; }
  .icon svg { width: 26px; height: 26px; filter: none; }
  .icon:hover, .icon:focus-visible { color: var(--accent); }
  .scroll-cue { bottom: 20px; }
}

/* ---------- lower sheet (white / red) ---------- */
.sheet {
  position: relative; z-index: 1;
  margin-top: 0; padding-top: 8px;
  background: var(--bg);
}
.section { padding: 64px var(--pad); max-width: 1180px; margin: 0 auto; scroll-margin-top: 72px; }
.card { scroll-margin-top: 100px; }
.section + .section { padding-top: 24px; }
.section__head { margin-bottom: 30px; text-align: center; }
.section__lead { margin: 6px 0 0; color: var(--muted); font-size: 15px; }
h2 { font-size: clamp(26px, 3vw, 36px); margin: 0; font-weight: 700; }
h3, h4 { margin: 0; }
.subhead { font-size: 20px; text-align: center; margin: 12px 0 4px; }
.subhead::after { content: ""; display: block; width: 28px; height: 3px; margin: 10px auto 0; border-radius: 3px; background: var(--accent); }

/* profile */
.profile { display: flex; flex-direction: column; align-items: center; gap: 28px; }
.profile__card {
  width: 100%; max-width: 660px; padding: 32px 28px 26px; border-radius: 24px; text-align: center;
  background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.profile__avatar {
  width: 96px; height: 96px; border-radius: 50%; margin: 0 auto 14px; object-fit: cover;
  border: 3px solid #fff; box-shadow: 0 0 0 2px var(--accent), 0 12px 30px rgba(120, 20, 35, .18);
}
.profile__name { font-size: 26px; line-height: 1.3; }
.profile__latin {
  font-family: var(--font-latin); font-weight: 800; color: var(--accent);
  font-size: 13px; letter-spacing: .22em; text-transform: uppercase; margin-left: 8px; vertical-align: middle;
}
.profile__handle { margin: 2px 0 20px; color: var(--muted); font-family: var(--font-latin); font-size: 14px; }
.profile__facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 14px; margin: 0; text-align: left; }
.profile__facts div { display: grid; grid-template-columns: 5.2em 1fr; gap: 10px; align-items: baseline; padding: 10px 14px; border-radius: 12px; background: var(--bg); }
.profile__facts dt { color: var(--accent); font-weight: 700; font-size: 13px; }
.profile__facts dd { margin: 0; font-size: 14px; }
.profile__facts a { color: var(--accent); font-family: var(--font-latin); font-weight: 600; }
.profile__intro { text-align: center; color: var(--muted); margin: 24px 0 0; font-size: 16px; }
@media (max-width: 599px) {
  .profile__card { padding: 26px 18px 20px; }
  .profile__facts { grid-template-columns: 1fr; }
}

/* gallery */
.gallery { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.gallery__row { display: flex; gap: inherit; max-width: 100%; align-items: flex-start; }
@media (max-width: 599px) { .gallery { gap: 10px; } }
.gallery__item {
  display: block; min-width: 0; margin: 0; padding: 0; border: 0;
  background: var(--paper); border-radius: 16px; overflow: hidden;
  box-shadow: var(--shadow); cursor: zoom-in;
  transition: transform .3s, box-shadow .3s;
}
.gallery__item img { width: 100%; height: 100%; object-fit: contain; display: block; transition: transform .6s ease; background: var(--accent-soft); }
.gallery__item:hover, .gallery__item:focus-visible { transform: translateY(-3px); box-shadow: 0 22px 50px rgba(120, 20, 35, .18); }
.gallery__item:hover img { transform: scale(1.03); }
.gallery__empty { width: 100%; text-align: center; color: var(--muted); padding: 30px 0; }

/* activity cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; width: 100%; }
.card {
  position: relative; overflow: hidden; text-align: center;
  padding: 28px 24px 24px; border-radius: var(--radius);
  background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  transition: transform .3s, border-color .3s, box-shadow .3s;
}
.card::before {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .3s;
  background: radial-gradient(120% 80% at 50% 0%, rgba(211, 38, 58, .10), transparent 60%);
}
.card:hover { transform: translateY(-4px); border-color: rgba(211, 38, 58, .45); }
.card:hover::before { opacity: 1; }
/* one-shot highlight when a hero tag jumps to this card (class is added by main.js and removed when done) */
.card.is-flash { animation: cardflash 1.6s ease-out 1; }
@keyframes cardflash {
  0%   { border-color: var(--accent); box-shadow: 0 0 0 5px rgba(211, 38, 58, .30), 0 16px 40px rgba(120, 20, 35, .18); transform: translateY(-4px); }
  55%  { border-color: var(--accent); box-shadow: 0 0 0 5px rgba(211, 38, 58, .18), 0 16px 40px rgba(120, 20, 35, .14); transform: translateY(-4px); }
  100% { border-color: var(--line); box-shadow: 0 0 0 0 rgba(211, 38, 58, 0), var(--shadow); transform: none; }
}
.card > * { position: relative; }
.card__emoji {
  font-size: 28px; line-height: 1; width: 56px; height: 56px;
  display: grid; place-items: center; border-radius: 16px; background: var(--accent-soft);
}
.card__icon {
  width: 64px; height: 64px; border-radius: 50%; overflow: hidden; background: var(--accent-soft);
  box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--line), 0 8px 20px rgba(120, 20, 35, .14);
}
.card__icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card h4 { margin-top: 6px; font-size: 20px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; flex: 1; }
.card__link { margin-top: 8px; display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 700; font-size: 14px; }
.card__link--soft { color: var(--muted); font-weight: 500; }

/* video */
.video {
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
  background: #000; aspect-ratio: 16 / 9; box-shadow: 0 30px 80px rgba(120, 20, 35, .18);
  max-width: 960px; margin: 0 auto;
}
.video iframe { width: 100%; height: 100%; border: 0; display: block; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; padding: 12px 22px; border-radius: 999px;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 14px;
  box-shadow: 0 10px 26px rgba(211, 38, 58, .28);
  transition: transform .25s, box-shadow .25s, background .25s;
}
.btn:hover, .btn:focus-visible { transform: translateY(-2px); background: var(--accent-deep); box-shadow: 0 14px 32px rgba(211, 38, 58, .38); }

/* links */
.linklist { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.linkcard {
  display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 14px; text-align: left;
  padding: 14px 18px; border-radius: 16px;
  background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow);
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.linkcard__icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.linkcard__icon svg { width: 22px; height: 22px; fill: currentColor; }
.linkcard__name { font-weight: 700; display: block; line-height: 1.3; }
.linkcard__handle { display: block; color: var(--muted); font-size: 13px; font-family: var(--font-latin); }
.linkcard__arrow { color: var(--accent); font-family: var(--font-latin); font-weight: 800; transition: transform .25s; }
.linkcard:hover, .linkcard:focus-visible { border-color: rgba(211, 38, 58, .45); transform: translateY(-3px); box-shadow: 0 22px 50px rgba(120, 20, 35, .16); }
.linkcard:hover .linkcard__arrow { transform: translate(3px, -3px); }

/* footer */
.footer {
  max-width: 1180px; margin: 24px auto 0; padding: 36px var(--pad) 48px;
  text-align: center; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line);
}
.footer p { margin: 4px 0; }
.copyright { color: var(--ink); font-family: var(--font-latin); font-weight: 600; font-size: 14px; }
.footer a { color: var(--accent); }

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 50; padding: 24px;
  background: rgba(24, 8, 12, .92);
  display: flex; align-items: center; justify-content: center;
}
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: min(1400px, 92vw); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.lightbox img { max-width: 100%; max-height: 84vh; object-fit: contain; border-radius: 12px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.lightbox figcaption { color: #fff; font-size: 14px; min-height: 1em; }
.lightbox__btn {
  position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .14); color: #fff; font-size: 30px; line-height: 1;
  display: grid; place-items: center; transition: background .2s;
}
.lightbox__btn:hover { background: var(--accent); }
.lightbox__close { top: 18px; right: 18px; }
.lightbox__prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 14px; top: 50%; transform: translateY(-50%); }
body.is-locked { overflow: hidden; }

/* ---------- motion ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s ease, transform .8s ease; }
.reveal.is-in, .no-js .reveal { opacity: 1; transform: none; }
@keyframes twinkle { 0%, 100% { transform: scale(1) rotate(0); opacity: 1; } 50% { transform: scale(1.25) rotate(12deg); opacity: .7; } }
@keyframes cue {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}
@keyframes drift { from { transform: scale(1.04) translate3d(0, 0, 0); } to { transform: scale(1.08) translate3d(-1%, -.5%, 0); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
