/* =============================================
   ARATA URAWA — portfolio hub（B案: 夜のアトリエ）
   闇に浮かぶ光る線画 × ステージ照明
   ============================================= */

:root {
  --night: #14131C;
  --night-deep: #0D0C13;
  --night-soft: #1E1C29;
  --chalk: #EAE6DA;
  --chalk-soft: #9A96A8;
  --c-photo: #7FB4E8;
  --c-music: #5FC99B;
  --c-web: #A99BE0;
  --c-video: #F0937A;
  --c-lab: #D9E66F;
  --font-display: "Fraunces", "Zen Kaku Gothic New", serif;
  --font-body: "Zen Kaku Gothic New", sans-serif;
  --font-hand: "Klee One", cursive;
  --max-w: 1080px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--chalk);
  background-color: var(--night);
  background-image:
    radial-gradient(ellipse 90% 60% at 50% 12%, rgba(234, 230, 218, 0.06), transparent 70%),
    radial-gradient(rgba(234, 230, 218, 0.05) 1px, transparent 1px);
  background-size: 100% 100%, 26px 26px;
  line-height: 1.9;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

::selection { background: var(--chalk); color: var(--night); }

/* ---------- header ---------- */

.site-header {
  border-bottom: 1px solid rgba(234, 230, 218, 0.28);
  background: rgba(13, 12, 19, 0.6);
}

.site-header .wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
  padding-bottom: 16px;
  flex-wrap: wrap;
}

.logo {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  white-space: nowrap;
}

.logo .logo-dot { color: var(--c-video); }

.site-nav { display: flex; gap: 22px; flex-wrap: wrap; }

.site-nav a {
  font-size: 0.92rem;
  text-decoration: none;
  padding-bottom: 2px;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 2px;
  transition: background-size 0.25s ease, text-shadow 0.25s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a[aria-current="page"] {
  background-size: 100% 2px;
  text-shadow: 0 0 14px currentColor;
}

.site-nav a.nav-photo { color: var(--c-photo); }
.site-nav a.nav-music { color: var(--c-music); }
.site-nav a.nav-web   { color: var(--c-web); }
.site-nav a.nav-video { color: var(--c-video); }
.site-nav a.nav-lab   { color: var(--c-lab); }

/* ---------- hero ---------- */

.hero .wrap { position: relative; padding-top: 76px; padding-bottom: 8px; }

.hero-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.6rem, 8vw, 5.4rem);
  line-height: 1.04;
  letter-spacing: 0.02em;
  text-shadow: 0 0 40px rgba(234, 230, 218, 0.25);
}

.hero-title .line2 { display: block; margin-left: 0.9em; }

.hero-tagline {
  font-family: var(--font-hand);
  font-size: clamp(1.05rem, 2.4vw, 1.4rem);
  color: var(--chalk-soft);
  margin-top: 26px;
}

.hero-tagline .tag-photo { color: var(--c-photo); text-shadow: 0 0 16px rgba(127, 180, 232, 0.5); }
.hero-tagline .tag-music { color: var(--c-music); text-shadow: 0 0 16px rgba(95, 201, 155, 0.5); }
.hero-tagline .tag-web   { color: var(--c-web); text-shadow: 0 0 16px rgba(169, 155, 224, 0.5); }
.hero-tagline .tag-lab   { color: var(--c-lab); text-shadow: 0 0 16px rgba(217, 230, 111, 0.5); }

.hero-roles {
  position: absolute;
  right: 24px;
  top: 80px;
  writing-mode: vertical-rl;
  font-size: 0.82rem;
  letter-spacing: 0.32em;
  color: var(--chalk-soft);
  border-left: 1px solid var(--chalk-soft);
  padding-left: 12px;
  height: 12.5em;
}

.hero-title, .hero-tagline, .hero-roles, .scene-hint {
  opacity: 0;
  transform: translateY(14px);
  animation: rise 0.7s ease forwards;
}
.hero-tagline { animation-delay: 0.15s; }
.hero-roles   { animation-delay: 0.3s; }
.scene-hint   { animation-delay: 0.45s; }

@keyframes rise { to { opacity: 1; transform: translateY(0); } }

/* ---------- atelier scene ---------- */

.scene-section { padding: 12px 0 30px; }

.scene-hint {
  font-family: var(--font-hand);
  font-size: 0.95rem;
  color: var(--chalk-soft);
  text-align: right;
  margin-bottom: -20px;
  padding-right: 6%;
}

.atelier-scene { width: 100%; height: auto; display: block; }

.scene-item { cursor: pointer; outline: none; }

.scene-item .item-hitbox {
  fill: transparent;
  stroke: none;
  pointer-events: all;
}

.scene-item .item-art {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease;
}

.scene-item.item-photo .item-art { filter: drop-shadow(0 0 5px rgba(127, 180, 232, 0.45)); }
.scene-item.item-music .item-art { filter: drop-shadow(0 0 5px rgba(95, 201, 155, 0.45)); }
.scene-item.item-web   .item-art { filter: drop-shadow(0 0 5px rgba(169, 155, 224, 0.45)); }
.scene-item.item-video .item-art { filter: drop-shadow(0 0 5px rgba(240, 147, 122, 0.45)); }

.scene-item .item-label {
  font-family: var(--font-hand);
  font-size: 30px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

.scene-item:hover .item-art,
.scene-item:focus-visible .item-art { transform: translateY(-10px); }

.scene-item.item-photo:hover .item-art, .scene-item.item-photo:focus-visible .item-art { filter: drop-shadow(0 0 14px rgba(127, 180, 232, 0.9)); }
.scene-item.item-music:hover .item-art, .scene-item.item-music:focus-visible .item-art { filter: drop-shadow(0 0 14px rgba(95, 201, 155, 0.9)); }
.scene-item.item-web:hover .item-art,   .scene-item.item-web:focus-visible .item-art   { filter: drop-shadow(0 0 14px rgba(169, 155, 224, 0.9)); }
.scene-item.item-video:hover .item-art, .scene-item.item-video:focus-visible .item-art { filter: drop-shadow(0 0 14px rgba(240, 147, 122, 0.9)); }

.scene-item:hover .item-label,
.scene-item:focus-visible .item-label { opacity: 1; transform: translateY(0); }

/* ---------- lab portal ---------- */

.lab-portal {
  display: grid;
  grid-template-columns: auto 130px 1fr auto;
  align-items: center;
  gap: 22px;
  margin: -4px 5% 24px;
  padding: 16px 20px;
  border: 1px solid color-mix(in srgb, var(--c-lab) 50%, transparent);
  border-radius: 12px;
  color: var(--c-lab);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--c-lab) 8%, transparent), transparent 45%),
    rgba(13, 12, 19, 0.7);
  text-decoration: none;
  box-shadow: inset 0 0 24px rgba(217, 230, 111, 0.03);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.lab-portal:hover,
.lab-portal:focus-visible {
  transform: translateY(-4px);
  border-color: var(--c-lab);
  box-shadow: 0 0 28px rgba(217, 230, 111, 0.14), inset 0 0 24px rgba(217, 230, 111, 0.05);
}

.lab-portal-index {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--chalk-soft);
  writing-mode: vertical-rl;
}

.lab-portal-signal {
  height: 42px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.lab-portal-signal i {
  display: block;
  width: 2px;
  height: 14px;
  background: var(--c-lab);
  box-shadow: 0 0 10px var(--c-lab);
  animation: signal 1.6s ease-in-out infinite alternate;
}

.lab-portal-signal i:nth-child(2) { height: 30px; animation-delay: -0.7s; }
.lab-portal-signal i:nth-child(3) { height: 20px; animation-delay: -1.1s; }
.lab-portal-signal i:nth-child(4) { height: 38px; animation-delay: -0.3s; }
.lab-portal-signal i:nth-child(5) { height: 24px; animation-delay: -0.9s; }

@keyframes signal { to { transform: scaleY(0.45); opacity: 0.45; } }

.lab-portal-copy { display: flex; flex-direction: column; line-height: 1.5; }
.lab-portal-copy strong { font-family: var(--font-display); letter-spacing: 0.12em; }
.lab-portal-copy small { color: var(--chalk-soft); font-size: 0.82rem; margin-top: 3px; }
.lab-portal-arrow { font-size: 1.5rem; transition: transform 0.2s ease; }
.lab-portal:hover .lab-portal-arrow { transform: translateX(5px); }

/* ---------- section cards (mobile nav) ---------- */

.nav-cards {
  display: none;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  padding: 24px 0 8px;
}

.nav-card {
  border: 1px solid rgba(234, 230, 218, 0.3);
  border-radius: 14px;
  background: var(--night-soft);
  padding: 20px 16px 14px;
  text-decoration: none;
  text-align: center;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-card:hover, .nav-card:focus-visible {
  transform: translateY(-4px);
  border-color: var(--card-accent, var(--chalk));
  box-shadow: 0 0 24px rgba(234, 230, 218, 0.12);
}

.nav-card svg { width: 64px; height: 64px; margin: 0 auto 8px; }

.nav-card .card-name { font-weight: 700; font-size: 1rem; display: block; color: var(--card-accent, var(--chalk)); }

.nav-card .card-sub { font-size: 0.78rem; color: var(--chalk-soft); display: block; }

.nav-card.card-photo { --card-accent: var(--c-photo); }
.nav-card.card-music { --card-accent: var(--c-music); }
.nav-card.card-web   { --card-accent: var(--c-web); }
.nav-card.card-video { --card-accent: var(--c-video); }
.nav-card.card-lab   { --card-accent: var(--c-lab); grid-column: 1 / -1; }

.lab-card-mark {
  width: 64px;
  height: 64px;
  margin: 0 auto 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.lab-card-mark i {
  display: block;
  width: 10px;
  height: 10px;
  border: 2px solid var(--c-lab);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(217, 230, 111, 0.7);
}

.lab-card-mark i:nth-child(2) { transform: translateY(-14px); }

@media (max-width: 767px) {
  .scene-section .atelier-scene, .scene-hint { display: none; }
  .nav-cards { display: grid; }
  .lab-portal { display: none; }
  .hero-roles { display: none; }
  .hero .wrap { padding-top: 48px; }
}

/* ---------- generic sections ---------- */

.section { padding: 72px 0 12px; }

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.9rem;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
}

.section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(234, 230, 218, 0.4);
}

.section-title .jp {
  font-family: var(--font-hand);
  font-size: 1rem;
  color: var(--chalk-soft);
  letter-spacing: 0.1em;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

/* ---------- about ---------- */

.about-lead { max-width: 640px; margin: 20px 0 40px; color: var(--chalk); }

.skill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.skill {
  border: 1px solid rgba(234, 230, 218, 0.25);
  border-radius: 14px;
  padding: 22px 22px 18px;
  background: var(--night-soft);
  position: relative;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.skill::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 13px;
  border-top: 3px solid var(--accent, var(--chalk));
  pointer-events: none;
  opacity: 0.9;
}

.skill:hover { border-color: var(--accent); box-shadow: 0 0 24px color-mix(in srgb, var(--accent) 22%, transparent); }

.skill.skill-photo { --accent: var(--c-photo); }
.skill.skill-music { --accent: var(--c-music); }
.skill.skill-web   { --accent: var(--c-web); }
.skill.skill-video { --accent: var(--c-video); }
.skill.skill-lab   { --accent: var(--c-lab); }

.skill h3 {
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin: 6px 0 8px;
  text-shadow: 0 0 12px color-mix(in srgb, var(--accent) 45%, transparent);
}

.skill p { font-size: 0.9rem; color: var(--chalk-soft); line-height: 1.85; }

.skill a { color: var(--accent); font-weight: 700; text-decoration: none; font-size: 0.88rem; }
.skill a:hover, .skill a:focus-visible { text-decoration: underline; }

.about-bio {
  margin-top: 36px;
  font-family: var(--font-hand);
  color: var(--chalk-soft);
  font-size: 0.98rem;
  border-left: 3px solid rgba(234, 230, 218, 0.25);
  padding-left: 18px;
  max-width: 560px;
}

/* ---------- contact ---------- */

.contact-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin: 26px 0 20px;
  list-style: none;
}

.contact-links a {
  display: inline-block;
  border: 1px solid var(--chalk);
  border-radius: 999px;
  padding: 10px 26px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  background: transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.contact-links a:hover, .contact-links a:focus-visible {
  transform: translateY(-3px);
  background: var(--chalk);
  color: var(--night);
  box-shadow: 0 0 28px rgba(234, 230, 218, 0.35);
}

.contact-note { font-size: 0.85rem; color: var(--chalk-soft); }

/* ---------- footer ---------- */

.site-footer { margin-top: 90px; border-top: 1px solid rgba(234, 230, 218, 0.28); }

.site-footer .wrap {
  padding-top: 22px;
  padding-bottom: 30px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--chalk-soft);
}

.site-footer .foot-logo { font-family: var(--font-display); letter-spacing: 0.08em; }

/* =============================================
   section pages（photo / music / web / video / lab）
   ============================================= */

.page-header {
  border-bottom: 1px solid rgba(234, 230, 218, 0.28);
  background:
    radial-gradient(ellipse 70% 120% at 50% 0%, color-mix(in srgb, var(--page-accent, var(--chalk)) 14%, transparent), transparent 75%),
    var(--night-deep);
}

.page-photo { --page-accent: var(--c-photo); }
.page-music { --page-accent: var(--c-music); }
.page-web   { --page-accent: var(--c-web); }
.page-video { --page-accent: var(--c-video); }
.page-lab   { --page-accent: var(--c-lab); }

.page-header .wrap { padding-top: 56px; padding-bottom: 40px; }

.page-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 5.4vw, 3.2rem);
  letter-spacing: 0.03em;
  color: var(--page-accent);
  text-shadow: 0 0 30px color-mix(in srgb, var(--page-accent) 55%, transparent);
}

.page-title-jp {
  font-family: var(--font-hand);
  font-size: 1.05rem;
  color: var(--chalk-soft);
  margin-top: 6px;
}

.page-lead { max-width: 620px; margin-top: 18px; font-size: 0.95rem; color: var(--chalk); }

.breadcrumb { font-size: 0.82rem; color: var(--chalk-soft); margin-bottom: 18px; }

.breadcrumb a { color: var(--chalk-soft); }

/* ---------- photo: tabs + gallery ---------- */

.theme-tabs {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 40px 0 28px;
  list-style: none;
}

.theme-tab {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  border: 1px solid rgba(234, 230, 218, 0.4);
  border-radius: 999px;
  background: transparent;
  color: var(--chalk);
  padding: 8px 20px;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.theme-tab:hover { transform: translateY(-2px); border-color: var(--c-photo); }

.theme-tab.is-active {
  background: var(--c-photo);
  border-color: var(--c-photo);
  color: var(--night-deep);
  box-shadow: 0 0 18px color-mix(in srgb, var(--c-photo) 45%, transparent);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
  margin-bottom: 30px;
}

.gallery-item {
  border: 1px solid rgba(234, 230, 218, 0.3);
  border-radius: 12px;
  overflow: hidden;
  background: var(--night-soft);
  cursor: zoom-in;
  padding: 0;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.gallery-item:hover, .gallery-item:focus-visible {
  transform: translateY(-4px);
  border-color: var(--c-photo);
  box-shadow: 0 0 24px color-mix(in srgb, var(--c-photo) 25%, transparent);
}

.gallery-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }

.gallery-item figcaption {
  font-size: 0.8rem;
  color: var(--chalk-soft);
  padding: 8px 12px;
  background: var(--night-deep);
  border-top: 1px solid rgba(234, 230, 218, 0.2);
}

.gallery-empty {
  border: 1px dashed var(--chalk-soft);
  border-radius: 12px;
  padding: 48px 24px;
  text-align: center;
  color: var(--chalk-soft);
  font-family: var(--font-hand);
}

/* lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(5, 4, 9, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 4vmin;
  z-index: 50;
}

.lightbox.is-open { display: flex; }

.lightbox img {
  max-width: 92vw;
  max-height: 82vh;
  border: 1px solid rgba(234, 230, 218, 0.5);
  border-radius: 4px;
  box-shadow: 0 0 60px rgba(234, 230, 218, 0.15);
}

.lightbox figcaption {
  position: absolute;
  bottom: 4vmin;
  left: 0;
  right: 0;
  text-align: center;
  color: var(--chalk);
  font-family: var(--font-hand);
  font-size: 0.95rem;
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 22px;
  background: none;
  border: none;
  color: var(--chalk);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  font-family: var(--font-body);
}

/* ---------- works（music / web / video） ---------- */

.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
  margin: 44px 0 10px;
}

.work-card {
  border: 1px solid rgba(234, 230, 218, 0.25);
  border-radius: 14px;
  background: var(--night-soft);
  padding: 26px 24px 22px;
  position: relative;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.work-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 13px;
  border-top: 3px solid var(--page-accent, var(--chalk));
  pointer-events: none;
  opacity: 0.9;
}

.work-card:hover {
  border-color: var(--page-accent);
  box-shadow: 0 0 24px color-mix(in srgb, var(--page-accent) 22%, transparent);
}

.work-card h3 { font-size: 1.08rem; margin: 4px 0 10px; letter-spacing: 0.04em; color: var(--chalk); }

.work-card .work-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--night-deep);
  background: var(--page-accent, var(--chalk));
  border-radius: 999px;
  padding: 2px 12px;
  margin-bottom: 10px;
}

.work-card p { font-size: 0.9rem; color: var(--chalk-soft); line-height: 1.85; }

.embed-slot {
  margin-top: 16px;
  border: 1px dashed var(--chalk-soft);
  border-radius: 10px;
  padding: 30px 16px;
  text-align: center;
  color: var(--chalk-soft);
  font-family: var(--font-hand);
  font-size: 0.9rem;
}

.embed-slot iframe { width: 100%; border: none; border-radius: 8px; }

.page-note {
  margin: 40px 0 0;
  font-size: 0.85rem;
  color: var(--chalk-soft);
  font-family: var(--font-hand);
}

.page-note a { color: var(--chalk); }

/* ---------- body expression lab ---------- */

.page-lab {
  background-image:
    linear-gradient(rgba(217, 230, 111, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(217, 230, 111, 0.025) 1px, transparent 1px),
    radial-gradient(ellipse 90% 60% at 50% 12%, rgba(217, 230, 111, 0.05), transparent 70%);
  background-size: 54px 54px, 54px 54px, 100% 100%;
}

.lab-page-header { position: relative; overflow: hidden; }

.lab-page-header::after {
  content: "";
  position: absolute;
  width: 340px;
  height: 340px;
  right: -80px;
  top: -170px;
  border: 1px solid rgba(217, 230, 111, 0.18);
  border-radius: 50%;
  box-shadow:
    0 0 0 42px rgba(217, 230, 111, 0.025),
    0 0 0 84px rgba(217, 230, 111, 0.018);
  pointer-events: none;
}

.lab-heading-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 40px;
  align-items: end;
}

.lab-kicker {
  color: var(--c-lab);
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  font-weight: 700;
  margin-bottom: 7px;
}

.lab-readout {
  min-width: 170px;
  padding: 15px 17px;
  border: 1px solid rgba(217, 230, 111, 0.45);
  border-radius: 9px;
  background: rgba(13, 12, 19, 0.64);
  display: grid;
  gap: 2px;
  line-height: 1.45;
  position: relative;
  z-index: 1;
}

.lab-readout span,
.lab-readout small { color: var(--chalk-soft); font-size: 0.66rem; letter-spacing: 0.14em; }
.lab-readout strong { color: var(--c-lab); font-size: 0.84rem; letter-spacing: 0.16em; text-shadow: 0 0 14px rgba(217, 230, 111, 0.55); }

.lab-live-section { padding: 44px 0 10px; }

.lab-section-label {
  display: flex;
  justify-content: space-between;
  color: var(--c-lab);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  margin-bottom: 10px;
}

.motion-stage {
  min-height: 430px;
  border: 1px solid rgba(217, 230, 111, 0.42);
  border-radius: 14px;
  background: var(--night-deep);
  overflow: hidden;
  position: relative;
  box-shadow: 0 0 34px rgba(217, 230, 111, 0.06), inset 0 0 44px rgba(217, 230, 111, 0.025);
  touch-action: none;
}

.motion-stage::before,
.motion-stage::after {
  content: "";
  position: absolute;
  width: 32px;
  height: 32px;
  pointer-events: none;
  z-index: 2;
}

.motion-stage::before { top: 12px; left: 12px; border-top: 1px solid var(--c-lab); border-left: 1px solid var(--c-lab); }
.motion-stage::after { right: 12px; bottom: 12px; border-right: 1px solid var(--c-lab); border-bottom: 1px solid var(--c-lab); }

#motion-lab-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.motion-stage-copy {
  position: absolute;
  left: 24px;
  top: 22px;
  display: flex;
  flex-direction: column;
  pointer-events: none;
  z-index: 2;
}

.motion-stage-copy strong { color: var(--c-lab); font-size: 0.72rem; letter-spacing: 0.16em; }
.motion-stage-copy span { color: var(--chalk-soft); font-size: 0.76rem; margin-top: 2px; }

.motion-stage-controls {
  position: absolute;
  right: 22px;
  top: 18px;
  display: flex;
  gap: 8px;
  z-index: 3;
}

.motion-stage-controls button {
  border: 1px solid rgba(217, 230, 111, 0.45);
  border-radius: 999px;
  background: rgba(13, 12, 19, 0.8);
  color: var(--c-lab);
  font-family: var(--font-body);
  font-size: 0.72rem;
  padding: 7px 13px;
  cursor: pointer;
}

.motion-stage-controls button:hover,
.motion-stage-controls button:focus-visible { background: var(--c-lab); color: var(--night-deep); }

.lab-caption { color: var(--chalk-soft); font-family: var(--font-hand); font-size: 0.86rem; margin: 12px 4px 0; }
.lab-intro { color: var(--chalk-soft); max-width: 640px; margin: 18px 0 30px; }

.lab-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.lab-project-card {
  min-height: 390px;
  border: 1px solid rgba(217, 230, 111, 0.23);
  border-radius: 14px;
  background: rgba(30, 28, 41, 0.82);
  padding: 22px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.lab-project-card::after {
  content: "";
  position: absolute;
  inset: auto -50px -90px auto;
  width: 180px;
  height: 180px;
  border: 1px solid rgba(217, 230, 111, 0.09);
  border-radius: 50%;
}

.lab-project-primary { grid-row: span 2; min-height: 802px; }

.lab-project-meta {
  display: flex;
  justify-content: space-between;
  color: var(--c-lab);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1;
}

.lab-project-card h3 { color: var(--chalk); font-size: 1.08rem; margin: 22px 0 9px; position: relative; z-index: 1; }
.lab-project-card p { color: var(--chalk-soft); font-size: 0.87rem; line-height: 1.85; position: relative; z-index: 1; }
.lab-project-state { margin-top: auto; color: var(--c-lab); font-size: 0.62rem; letter-spacing: 0.14em; font-weight: 700; position: relative; z-index: 1; }

.trajectory-preview {
  height: 355px;
  margin-top: 30px;
  border-left: 1px solid rgba(217, 230, 111, 0.25);
  border-bottom: 1px solid rgba(217, 230, 111, 0.25);
  position: relative;
  background:
    linear-gradient(rgba(217, 230, 111, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(217, 230, 111, 0.04) 1px, transparent 1px);
  background-size: 42px 42px;
}

.trajectory-arc {
  position: absolute;
  bottom: 36px;
  width: 42%;
  height: 67%;
  border: 2px solid transparent;
  border-top-color: var(--c-lab);
  border-radius: 50% 50% 0 0;
  filter: drop-shadow(0 0 8px rgba(217, 230, 111, 0.6));
}

.arc-one { left: 8%; transform: rotate(-4deg); }
.arc-two { right: 7%; height: 58%; border-top-color: var(--c-photo); filter: drop-shadow(0 0 8px rgba(127, 180, 232, 0.55)); transform: rotate(4deg); }

.trajectory-point {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--c-lab);
  box-shadow: 0 0 18px var(--c-lab);
}

.point-one { left: 28%; top: 30%; }
.point-two { right: 25%; top: 40%; background: var(--c-photo); box-shadow: 0 0 18px var(--c-photo); }

.lab-data-list { list-style: none; margin: 25px 0 30px; border-top: 1px solid rgba(217, 230, 111, 0.18); }
.lab-data-list li { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid rgba(217, 230, 111, 0.18); font-size: 0.7rem; letter-spacing: 0.12em; }
.lab-data-list span { color: var(--chalk-soft); }
.lab-data-list strong { color: var(--c-lab); }

.footprint-preview,
.lineup-preview {
  height: 150px;
  margin-top: 28px;
  border: 1px solid rgba(217, 230, 111, 0.13);
  border-radius: 8px;
  position: relative;
  background: rgba(13, 12, 19, 0.62);
}

.footprint-preview i {
  position: absolute;
  width: 18px;
  height: 32px;
  border-radius: 58% 58% 42% 42%;
  background: rgba(217, 230, 111, 0.72);
  box-shadow: 0 0 18px rgba(217, 230, 111, 0.45);
  transform: rotate(24deg);
}

.footprint-preview i:nth-child(1) { left: 14%; bottom: 20px; opacity: 0.22; }
.footprint-preview i:nth-child(2) { left: 31%; bottom: 65px; transform: rotate(-18deg); opacity: 0.4; }
.footprint-preview i:nth-child(3) { left: 48%; bottom: 31px; opacity: 0.6; }
.footprint-preview i:nth-child(4) { left: 66%; bottom: 78px; transform: rotate(-18deg); opacity: 0.78; }
.footprint-preview i:nth-child(5) { left: 82%; bottom: 42px; opacity: 1; }

.lineup-preview { display: flex; flex-direction: column; justify-content: center; gap: 14px; overflow: hidden; }
.lineup-row { display: flex; justify-content: center; gap: 18px; position: relative; z-index: 1; }
.lineup-row i { display: block; width: 20px; height: 20px; border: 1px solid var(--c-lab); border-radius: 50%; box-shadow: 0 0 9px rgba(217, 230, 111, 0.35); }
.row-back { opacity: 0.55; transform: scale(0.83); }
.lineup-focus { position: absolute; width: 78%; height: 72px; left: 11%; top: 38px; border: 1px dashed rgba(127, 180, 232, 0.5); border-radius: 50%; transform: perspective(200px) rotateX(62deg); }

.lab-statement .wrap {
  border-top: 1px solid rgba(217, 230, 111, 0.28);
  border-bottom: 1px solid rgba(217, 230, 111, 0.28);
  padding-top: 42px;
  padding-bottom: 42px;
}

.lab-statement-index { color: var(--c-lab); font-size: 0.68rem; letter-spacing: 0.18em; font-weight: 700; }
.lab-statement blockquote { font-family: var(--font-display); font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1.65; margin: 20px 0; color: var(--chalk); }
.lab-statement .wrap > p:last-child { color: var(--chalk-soft); max-width: 650px; font-size: 0.88rem; }

/* ---------- photography: night desk explorer ---------- */

.page-photo-explorer {
  height: 100vh;
  overflow: hidden;
  background: var(--night-deep);
}

.page-photo-explorer .site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 70;
  backdrop-filter: blur(14px);
}

.photo-room {
  position: fixed;
  inset: 64px 0 0;
  overflow: hidden;
  background:
    linear-gradient(93deg, rgba(255, 255, 255, 0.014) 1px, transparent 1px),
    linear-gradient(3deg, rgba(255, 255, 255, 0.01) 1px, transparent 1px),
    radial-gradient(ellipse 70% 55% at 45% 36%, rgba(127, 180, 232, 0.075), transparent 72%),
    #0a0910;
  background-size: 83px 100%, 100% 47px, 100% 100%, 100% 100%;
  cursor: grab;
  touch-action: none;
}

.photo-room.is-dragging { cursor: grabbing; }

.photo-room::before {
  content: "";
  position: fixed;
  inset: 64px 0 0;
  z-index: 8;
  border: 1px solid rgba(127, 180, 232, 0.12);
  box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.72);
  pointer-events: none;
}

.photo-room-glow {
  --glow-x: 50vw;
  --glow-y: 45vh;
  position: fixed;
  inset: 64px 0 0;
  z-index: 7;
  pointer-events: none;
  background: radial-gradient(circle 240px at var(--glow-x) var(--glow-y), rgba(127, 180, 232, 0.09), transparent 72%);
  mix-blend-mode: screen;
}

.photo-desk {
  position: absolute;
  left: 0;
  top: 0;
  width: 2500px;
  height: 1550px;
  transform: translate3d(0, 0, 0);
  transform-origin: 0 0;
  will-change: transform;
  background:
    linear-gradient(rgba(127, 180, 232, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(127, 180, 232, 0.018) 1px, transparent 1px);
  background-size: 52px 52px;
}

.photo-desk::before {
  content: "";
  position: absolute;
  inset: 78px;
  border: 1px solid rgba(127, 180, 232, 0.16);
  pointer-events: none;
}

.desk-title-sheet {
  position: absolute;
  left: 150px;
  top: 120px;
  width: 650px;
  min-height: 420px;
  padding: 42px 48px;
  border: 1px solid rgba(234, 230, 218, 0.38);
  background:
    linear-gradient(130deg, rgba(127, 180, 232, 0.08), transparent 42%),
    rgba(20, 19, 28, 0.94);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.46);
  transform: rotate(-0.7deg);
}

.desk-title-sheet::before,
.desk-title-sheet::after {
  content: "";
  position: absolute;
  width: 86px;
  height: 14px;
  top: -8px;
  background: rgba(154, 150, 168, 0.24);
  border: 1px solid rgba(234, 230, 218, 0.12);
}

.desk-title-sheet::before { left: 46px; transform: rotate(-4deg); }
.desk-title-sheet::after { right: 46px; transform: rotate(3deg); }

.desk-title-sheet > p:first-child {
  color: var(--c-photo);
  font-size: 0.7rem;
  letter-spacing: 0.19em;
  font-weight: 700;
}

.desk-title-sheet h1 {
  font-family: var(--font-display);
  font-size: 5.2rem;
  line-height: 0.95;
  letter-spacing: 0.01em;
  margin: 45px 0 14px;
  color: var(--chalk);
  text-shadow: 0 0 32px rgba(127, 180, 232, 0.2);
}

.desk-title-jp { font-family: var(--font-hand); color: var(--c-photo); font-size: 1.15rem; }
.desk-intro { margin-top: 27px; color: var(--chalk-soft); font-size: 0.86rem; line-height: 1.85; }
.desk-sheet-number { position: absolute; right: 28px; bottom: 17px; color: rgba(127, 180, 232, 0.18); font-family: var(--font-display); font-size: 5.5rem; line-height: 1; }

.desk-photo-layer { position: absolute; inset: 0; }

.desk-photo {
  position: absolute;
  left: var(--x);
  top: var(--y);
  z-index: var(--z, 1);
  width: var(--w);
  height: var(--h);
  margin: 0;
  padding: 12px 12px 45px;
  border: 1px solid rgba(127, 180, 232, 0.42);
  border-radius: 2px;
  background: #191722;
  color: var(--chalk);
  font-family: var(--font-body);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.54), 0 0 24px rgba(127, 180, 232, 0.055);
  transform: rotate(var(--r));
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
  text-align: left;
  cursor: zoom-in;
}

.desk-photo::before {
  content: "";
  position: absolute;
  width: 92px;
  height: 16px;
  left: 50%;
  top: -10px;
  background: rgba(154, 150, 168, 0.22);
  border: 1px solid rgba(234, 230, 218, 0.1);
  transform: translateX(-50%) rotate(-2deg);
}

.desk-photo:hover,
.desk-photo:focus-visible {
  z-index: 20;
  border-color: var(--c-photo);
  box-shadow: 0 34px 84px rgba(0, 0, 0, 0.62), 0 0 34px rgba(127, 180, 232, 0.2);
  transform: translateY(-14px) rotate(0deg) scale(1.025);
  outline: none;
}

.desk-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--night-deep);
  border: 1px solid rgba(234, 230, 218, 0.13);
  pointer-events: none;
}

.desk-photo-caption {
  position: absolute;
  left: 12px;
  right: 55px;
  bottom: 11px;
  color: var(--chalk-soft);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

.desk-photo small {
  position: absolute;
  right: 12px;
  bottom: 8px;
  color: var(--c-photo);
  font-family: var(--font-display);
  font-size: 1.1rem;
  pointer-events: none;
}

.contact-sheet {
  position: absolute;
  display: grid;
  gap: 8px;
  padding: 13px 13px 34px;
  background: rgba(8, 8, 12, 0.92);
  border: 1px solid rgba(234, 230, 218, 0.18);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.contact-sheet span { background: linear-gradient(135deg, #242130, #0e0d14); border: 1px solid rgba(127, 180, 232, 0.16); }
.contact-sheet small { position: absolute; left: 13px; bottom: 8px; color: var(--chalk-soft); font-size: 0.55rem; letter-spacing: 0.12em; }
.contact-sheet-a { left: 1910px; top: 860px; width: 380px; height: 280px; grid-template-columns: repeat(3, 1fr); transform: rotate(2.4deg); }
.contact-sheet-b { left: 200px; top: 1240px; width: 330px; height: 210px; grid-template-columns: repeat(2, 1fr); transform: rotate(-1.6deg); }

.desk-note {
  position: absolute;
  width: 410px;
  padding: 22px 0;
  border-top: 1px solid var(--c-photo);
  border-bottom: 1px solid var(--c-photo);
  color: var(--chalk);
}

.desk-note strong { display: block; font-family: var(--font-display); font-size: 2.1rem; line-height: 1; letter-spacing: 0.04em; }
.desk-note span { display: block; margin-top: 13px; color: var(--chalk-soft); font-family: var(--font-hand); font-size: 0.86rem; }
.note-one { left: 1840px; top: 1170px; transform: rotate(-1.3deg); }
.note-two { left: 650px; top: 1330px; width: 520px; transform: rotate(0.8deg); }

.film-strip {
  position: absolute;
  display: flex;
  gap: 7px;
  padding: 16px 10px;
  background: #050507;
  border-top: 5px dotted rgba(234, 230, 218, 0.45);
  border-bottom: 5px dotted rgba(234, 230, 218, 0.45);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.48);
}

.film-strip i { display: block; width: 74px; height: 54px; border: 1px solid rgba(127, 180, 232, 0.22); background: linear-gradient(145deg, #11101a, #292638); }
.film-strip-a { left: 1960px; top: 520px; transform: rotate(7deg); }
.film-strip-b { left: 80px; top: 1030px; transform: rotate(-8deg); }

.desk-index { position: absolute; color: rgba(127, 180, 232, 0.08); font-family: var(--font-display); font-size: 12rem; line-height: 1; pointer-events: none; }
.index-a { left: 2140px; top: 120px; }
.index-b { left: 920px; top: 520px; }
.index-c { left: 1380px; top: 1280px; }

.photo-room-ui {
  position: fixed;
  left: 22px;
  top: 87px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 22px;
  max-width: calc(100vw - 44px);
  pointer-events: none;
}

.photo-room-title,
.photo-theme-jumps { pointer-events: auto; }

.photo-room-title {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(127, 180, 232, 0.36);
  border-radius: 999px;
  padding: 7px 14px;
  background: rgba(13, 12, 19, 0.78);
  backdrop-filter: blur(10px);
  color: var(--chalk-soft);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
}

.photo-room-title a { color: var(--chalk-soft); text-decoration: none; }
.photo-room-title strong { color: var(--c-photo); }

.photo-theme-jumps {
  display: flex;
  gap: 6px;
  padding: 5px;
  border: 1px solid rgba(234, 230, 218, 0.2);
  border-radius: 999px;
  background: rgba(13, 12, 19, 0.78);
  backdrop-filter: blur(10px);
}

.photo-theme-jumps button {
  border: 0;
  border-radius: 999px;
  padding: 6px 12px;
  background: transparent;
  color: var(--chalk-soft);
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  cursor: pointer;
}

.photo-theme-jumps button:hover,
.photo-theme-jumps button:focus-visible,
.photo-theme-jumps button.is-active { background: var(--c-photo); color: var(--night-deep); outline: none; }

.photo-room-hint {
  position: fixed;
  left: 24px;
  bottom: 19px;
  z-index: 20;
  color: rgba(234, 230, 218, 0.55);
  font-family: var(--font-hand);
  font-size: 0.72rem;
  pointer-events: none;
}

.photo-map {
  position: fixed;
  right: 23px;
  bottom: 22px;
  z-index: 20;
  width: 132px;
  height: 84px;
  border: 1px solid rgba(127, 180, 232, 0.42);
  background: rgba(13, 12, 19, 0.78);
  backdrop-filter: blur(8px);
  pointer-events: none;
}

.photo-map-viewport { position: absolute; border: 1px solid var(--c-photo); background: rgba(127, 180, 232, 0.08); }
.photo-map .map-photo { position: absolute; width: 12px; height: 8px; background: rgba(234, 230, 218, 0.35); }
.map-photo-1 { left: 38%; top: 10%; }
.map-photo-2 { left: 66%; top: 12%; }
.map-photo-3 { left: 14%; top: 47%; }
.map-photo-4 { left: 45%; top: 52%; }

.page-photo-explorer .lightbox { z-index: 100; }

@media (max-width: 767px) {
  .page-photo-explorer .site-header .wrap { flex-wrap: nowrap; align-items: center; }
  .page-photo-explorer .site-nav { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 3px; gap: 15px; scrollbar-width: none; }
  .page-photo-explorer .site-nav::-webkit-scrollbar { display: none; }
  .page-photo-explorer .site-nav a { white-space: nowrap; }
  .photo-room-ui { top: 76px; left: 12px; right: 12px; display: block; max-width: none; }
  .photo-room-title { display: none; }
  .photo-theme-jumps { overflow-x: auto; border-radius: 10px; scrollbar-width: none; }
  .photo-theme-jumps::-webkit-scrollbar { display: none; }
  .photo-theme-jumps button { flex: 0 0 auto; }
  .photo-map { display: none; }
  .photo-room-hint { left: 14px; right: 14px; bottom: 12px; font-size: 0.65rem; text-align: center; }
  .desk-title-sheet { left: 90px; top: 110px; width: 560px; }
  .desk-title-sheet h1 { font-size: 4.3rem; }
}

@media (max-width: 767px) {
  .lab-heading-row { grid-template-columns: 1fr; gap: 24px; }
  .lab-readout { max-width: 210px; }
  .motion-stage { min-height: 480px; }
  .motion-stage-copy { top: 20px; right: 20px; }
  .motion-stage-controls { top: auto; right: 18px; left: 18px; bottom: 18px; }
  .motion-stage-controls button { flex: 1; }
  .lab-grid { grid-template-columns: 1fr; }
  .lab-project-primary { grid-row: auto; min-height: 650px; }
  .trajectory-preview { height: 270px; }
}

/* ---------- motion off ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-title, .hero-tagline, .hero-roles, .scene-hint {
    animation: none;
    opacity: 1;
    transform: none;
  }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .scene-item .item-art, .scene-item .item-label,
  .nav-card, .contact-links a, .site-nav a, .skill, .lab-portal { transition: none; }
  .lab-portal-signal i { animation: none; }
}
