:root {
  --bg: #0b0a10;
  --bg-2: #121019;
  --surface: #17141f;
  --line: rgba(236, 232, 225, 0.1);
  --line-2: rgba(236, 232, 225, 0.18);
  --text: #ece8e1;
  --muted: #a19cab;
  --faint: #6c6876;
  --gold: #f2b84b;
  --violet: #8f7dff;
  --blue: #5aa9ff;
  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Noto Sans JP", system-ui, -apple-system, "Hiragino Sans", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --gutter: clamp(16px, 5vw, 64px);
  --max: 1200px;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.85;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p, dl, dd, figure, blockquote { margin: 0; }
::selection { background: var(--gold); color: #1a1408; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--gold); color: #000; padding: 8px 14px; border-radius: 8px;
}
.skip:focus { top: 16px; }
.sp { display: none; }

/* film grain */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 60; opacity: 0.05;
  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%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- NAV ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 18px var(--gutter);
  transition: background 0.4s, padding 0.4s, border-color 0.4s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  padding-block: 12px;
  background: rgba(11, 10, 16, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-color: var(--line);
}
.nav-mark { font-family: var(--serif); font-size: 26px; letter-spacing: 0.04em; line-height: 1; }
.nav-mark i { color: var(--gold); font-style: normal; }
.nav-links { display: flex; gap: 6px; }
.nav-links a {
  font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--muted); padding: 8px 14px; border-radius: 99px; transition: color 0.25s, background 0.25s;
}
.nav-links a:hover, .nav-links a.is-active { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.nav-cta {
  font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.14em;
  padding: 9px 18px; border: 1px solid var(--line-2); border-radius: 99px; transition: all 0.25s;
}
.nav-cta:hover { background: var(--text); color: var(--bg); border-color: var(--text); }

/* ---------- HERO ---------- */
.hero {
  position: relative; min-height: 100svh; display: grid; align-items: center;
  padding: 120px var(--gutter) 96px; overflow: hidden; isolation: isolate;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 50% at 78% 40%, rgba(143, 125, 255, 0.22), transparent 70%),
    radial-gradient(40% 40% at 15% 85%, rgba(242, 184, 75, 0.1), transparent 70%);
}
.hero::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 160px; z-index: -1;
  background: linear-gradient(to bottom, transparent, var(--bg));
}
.bokeh { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }

.hero-inner {
  width: 100%; max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: 1.25fr 0.75fr; gap: clamp(32px, 6vw, 96px); align-items: center;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--gold); }
.dot { width: 4px; height: 4px; border-radius: 50%; background: var(--faint); }

.hero-name {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(64px, 11.5vw, 168px); line-height: 0.92; letter-spacing: -0.02em;
  margin: 24px 0 32px;
}
.hero-name em {
  font-style: italic;
  background: linear-gradient(100deg, var(--gold) 10%, #ffd9a0 45%, var(--violet) 95%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-right: 0.06em;
}
.hero-lead { font-size: clamp(16px, 1.5vw, 19px); color: var(--muted); max-width: 34em; line-height: 2; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }

.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 26px; border-radius: 99px;
  font-size: 14px; font-weight: 500; letter-spacing: 0.06em; transition: transform 0.3s var(--ease), background 0.3s, color 0.3s, border-color 0.3s;
}
.btn span { transition: transform 0.3s var(--ease); }
.btn:hover span { transform: translateX(4px); }
.btn-primary { background: var(--text); color: var(--bg); }
.btn-primary:hover { background: var(--gold); }
.btn-ghost { border: 1px solid var(--line-2); }
.btn-ghost:hover { border-color: var(--text); }

.hero-photo { position: relative; justify-self: end; width: min(100%, 420px); }
.hero-photo picture {
  display: block; position: relative; overflow: hidden;
  border-radius: 999px 999px 28px 28px; aspect-ratio: 4 / 5;
  box-shadow: 0 40px 120px -30px rgba(143, 125, 255, 0.55), 0 0 0 1px var(--line);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; transform: scale(1.04); transition: transform 1.6s var(--ease); }
.hero-photo:hover img { transform: scale(1.08); }
.hero-photo figcaption {
  display: flex; justify-content: space-between; margin-top: 14px; padding: 0 6px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint);
}

.scroll-cue {
  position: absolute; left: 50%; bottom: 28px; translate: -50% 0;
  width: 22px; height: 36px; border: 1px solid var(--line-2); border-radius: 99px;
}
.scroll-cue span {
  position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px;
  border-radius: 2px; background: var(--gold); animation: cue 2s infinite var(--ease);
}
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

/* ---------- SECTIONS ---------- */
.section { max-width: calc(var(--max) + var(--gutter) * 2); margin: 0 auto; padding: clamp(96px, 14vw, 168px) var(--gutter) 0; }
.section-head {
  display: grid; grid-template-columns: auto 1fr auto; align-items: end; gap: 20px;
  padding-bottom: 24px; margin-bottom: clamp(40px, 6vw, 72px); border-bottom: 1px solid var(--line);
}
.num { font-family: var(--mono); font-size: 12px; color: var(--gold); letter-spacing: 0.1em; padding-bottom: 14px; }
.section-head h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(48px, 7vw, 96px); line-height: 0.95; letter-spacing: -0.01em; }
.kicker { font-size: 13px; color: var(--muted); padding-bottom: 12px; }

/* ---------- ABOUT ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 112px); align-items: start; }
.about-intro { position: sticky; top: 112px; }
.about-statement { font-size: clamp(22px, 2.4vw, 30px); line-height: 1.7; font-weight: 500; letter-spacing: 0.04em; }
.about-statement em { font-style: normal; color: var(--gold); }
.about-body { margin-top: 28px; color: var(--muted); }
.facts { margin-top: 36px; border-top: 1px solid var(--line); }
.facts div { display: grid; grid-template-columns: 72px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.facts dt { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; color: var(--faint); padding-top: 3px; }

.timeline { position: relative; padding-left: 28px; }
.timeline::before { content: ""; position: absolute; left: 4px; top: 10px; bottom: 10px; width: 1px; background: linear-gradient(var(--line-2), var(--gold) 70%, var(--violet)); }
.timeline li { position: relative; display: grid; grid-template-columns: 84px 1fr; gap: 16px; padding: 14px 0; }
.timeline li::before {
  content: ""; position: absolute; left: -28px; top: 23px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--muted);
}
.timeline time { font-family: var(--mono); font-size: 13px; color: var(--faint); padding-top: 2px; }
.timeline p { font-size: 15px; }
.timeline small { font-size: 13px; color: var(--muted); }
.timeline .is-key::before { border-color: var(--gold); }
.timeline .is-research { grid-template-columns: 84px 1fr; }
.timeline .is-research::before { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 16px var(--gold); }
.timeline .is-research p { color: var(--gold); font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; padding-top: 3px; }
.timeline blockquote {
  grid-column: 2; margin-top: -6px; padding: 18px 20px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(242, 184, 75, 0.1), rgba(143, 125, 255, 0.08));
  border: 1px solid rgba(242, 184, 75, 0.25); font-size: 15px; line-height: 1.8;
}
.timeline .is-now::before { background: var(--violet); border-color: var(--violet); box-shadow: 0 0 0 5px rgba(143, 125, 255, 0.2); animation: pulse 2.4s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 9px rgba(143, 125, 255, 0); } }

/* ---------- SKILL ---------- */
.skill-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.skill-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 26px 24px 28px;
  transition: border-color 0.3s, transform 0.4s var(--ease);
}
.skill-card:hover { border-color: var(--line-2); transform: translateY(-4px); }
.skill-card h3 { font-size: 15px; font-weight: 500; margin-bottom: 20px; }
.skill-card h3 span { display: block; font-family: var(--mono); font-size: 11px; font-weight: 400; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); margin-bottom: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font-size: 13px; padding: 5px 12px; border-radius: 99px; border: 1px solid var(--line-2); color: var(--muted); line-height: 1.6; }
.chips li.strong { color: var(--text); border-color: rgba(242, 184, 75, 0.45); background: rgba(242, 184, 75, 0.07); }

.does { margin-top: 56px; display: grid; grid-template-columns: 160px 1fr; gap: 24px; align-items: start; }
.does-label { font-family: var(--serif); font-style: italic; font-size: 28px; color: var(--muted); line-height: 1.2; }
.does-list { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.does-list li { padding: 18px 16px 18px 0; border-bottom: 1px solid var(--line); font-size: clamp(16px, 1.6vw, 20px); font-weight: 500; }
.does-list span { display: block; font-family: var(--mono); font-size: 11px; color: var(--gold); font-weight: 400; margin-bottom: 6px; }

/* ---------- CLIENT ---------- */
.note { font-size: 13px; color: var(--faint); margin: -40px 0 32px; }
.client-list { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.client {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: clamp(24px, 3vw, 40px);
  display: flex; flex-direction: column; gap: 28px;
}
.client::after {
  content: ""; position: absolute; width: 320px; height: 320px; right: -120px; top: -140px; border-radius: 50%;
  background: radial-gradient(circle, rgba(143, 125, 255, 0.18), transparent 70%); pointer-events: none;
}
.client + .client::after { background: radial-gradient(circle, rgba(242, 184, 75, 0.14), transparent 70%); }
.client-meta { display: flex; align-items: center; justify-content: space-between; }
.client-idx { font-family: var(--serif); font-style: italic; font-size: 56px; line-height: 1; color: var(--faint); }
.tag { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 99px; }
.client h3 { font-size: clamp(19px, 1.8vw, 23px); font-weight: 700; line-height: 1.5; margin-bottom: 12px; }
.client-body > p { color: var(--muted); font-size: 15px; }
.roles { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; padding-top: 20px; border-top: 1px dashed var(--line-2); }
.roles::before { content: "担当"; font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; color: var(--gold); width: 100%; }
.roles li { font-size: 13px; padding: 4px 12px; border-radius: 8px; background: rgba(255, 255, 255, 0.05); }

/* ---------- INDIE ---------- */
.works { display: grid; gap: clamp(64px, 9vw, 120px); }
.work { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.work.is-flip .work-visual { order: 2; }
.work-visual {
  position: relative; display: grid; place-items: center; aspect-ratio: 16 / 10.5; border-radius: 24px; overflow: hidden;
  border: 1px solid var(--line); transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease);
}
.work:hover .work-visual { transform: translateY(-6px); box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.8); }
.work-visual img { transition: transform 0.8s var(--ease); }
.work:hover .work-visual img { transform: scale(1.04); }

.v-haxie { background: #f6f1eb; }
.v-haxie img { width: 100%; height: 100%; object-fit: cover; }
.v-qwyzm { background: radial-gradient(120% 90% at 50% 0%, #ffffff, #e5effc); }
.v-qwyzm img { width: 78%; }
.v-eleveleep {
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 28px),
    radial-gradient(90% 80% at 30% 20%, #6d3a76, #3b1c41 70%);
  grid-template-rows: 1fr auto; padding: 12% 10% 10%; gap: 6%;
}
.v-eleveleep .ev-mark { width: 30%; align-self: end; filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.4)); }
.v-eleveleep .ev-type { width: 70%; }

.work-type { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; color: var(--gold); text-transform: uppercase; }
.work h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(48px, 6vw, 80px); line-height: 1; letter-spacing: 0.01em; margin: 14px 0 20px; }
.work h3 small { font-family: var(--sans); font-size: 14px; color: var(--muted); letter-spacing: 0.1em; margin-left: 8px; vertical-align: middle; }
.work-desc { color: var(--muted); font-size: 15px; line-height: 2; }
.stack { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 24px; }
.stack li { font-family: var(--mono); font-size: 12px; color: var(--text); }
.stack li::before { content: "#"; color: var(--faint); margin-right: 2px; }
.work-link {
  display: inline-flex; gap: 8px; margin-top: 28px; padding-bottom: 4px; font-family: var(--mono); font-size: 13px;
  border-bottom: 1px solid var(--gold); transition: color 0.25s, gap 0.25s;
}
.work-link:hover { color: var(--gold); gap: 12px; }
.work-status {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 28px; padding: 6px 14px 6px 12px;
  border: 1px solid rgba(90, 169, 255, 0.4); border-radius: 99px; background: rgba(90, 169, 255, 0.08);
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; color: #bcdcff;
}
.work-status span { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 0 rgba(90, 169, 255, 0.6); animation: live 2s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 7px rgba(90, 169, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(90, 169, 255, 0); } }
@media (prefers-reduced-motion: reduce) { .work-status span { animation: none; } }

/* ---------- CONTACT ---------- */
.contact { padding: clamp(120px, 16vw, 200px) var(--gutter) clamp(96px, 12vw, 160px); position: relative; overflow: hidden; }
.contact::before {
  content: ""; position: absolute; left: 50%; top: 55%; width: min(1100px, 140vw); aspect-ratio: 1; translate: -50% -50%; z-index: -1;
  background: radial-gradient(circle, rgba(143, 125, 255, 0.16), rgba(242, 184, 75, 0.06) 40%, transparent 65%);
}
.contact-inner { max-width: var(--max); margin: 0 auto; text-align: center; display: flex; flex-direction: column; align-items: center; }
.contact .num { padding: 0; }
.contact-kicker { font-family: var(--mono); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin-top: 8px; }
.contact-title { font-size: clamp(36px, 6vw, 76px); font-weight: 700; letter-spacing: 0.02em; line-height: 1.3; margin: 18px 0 16px; }
.contact-sub { color: var(--muted); }
.mail { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px; margin-top: 48px; }
.mail-link {
  font-family: var(--serif); font-style: italic; font-size: clamp(28px, 5.4vw, 64px); line-height: 1.2;
  background: linear-gradient(90deg, var(--text), var(--text)) left bottom / 0 1px no-repeat;
  transition: background-size 0.5s var(--ease), color 0.3s; overflow-wrap: anywhere;
}
.mail-link:hover { background-size: 100% 1px; color: var(--gold); }
.copy {
  font: inherit; font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; color: var(--text); cursor: pointer;
  background: transparent; border: 1px solid var(--line-2); border-radius: 99px; padding: 9px 18px; transition: all 0.25s;
}
.copy:hover { background: var(--text); color: var(--bg); }
.copy.is-done { background: var(--gold); color: #1a1408; border-color: var(--gold); }

.footer {
  max-width: calc(var(--max) + var(--gutter) * 2); margin: 0 auto; padding: 28px var(--gutter) 40px;
  display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 12px; color: var(--faint);
}
.footer a:hover { color: var(--text); }

/* ---------- REVEAL ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-cue span, .timeline .is-now::before { animation: none; }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
  .skill-grid { grid-template-columns: repeat(2, 1fr); }
  .does { grid-template-columns: 1fr; }
  .does-list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .nav-links { display: none; }
  .hero { padding-top: 104px; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-photo { order: -1; justify-self: start; width: min(56vw, 260px); }
  .hero-name { margin: 18px 0 24px; }
  .about-grid, .client-list { grid-template-columns: 1fr; }
  .about-intro { position: static; }
  .work, .work.is-flip { grid-template-columns: 1fr; }
  .work.is-flip .work-visual { order: 0; }
  .section-head { grid-template-columns: auto 1fr; }
  .kicker { grid-column: 1 / -1; padding: 0; }
  .note { margin-top: -24px; }
}
@media (max-width: 520px) {
  .sp { display: inline; }
  .eyebrow { font-size: 11px; letter-spacing: 0.12em; white-space: nowrap; }
  .eyebrow .dot, .eyebrow-co { display: none; }
  .skill-grid { grid-template-columns: 1fr; }
  .timeline li, .timeline .is-research { grid-template-columns: 1fr; gap: 2px; }
  .timeline blockquote { grid-column: 1; margin-top: 8px; }
  .facts div { grid-template-columns: 56px 1fr; }
  .footer { flex-direction: column; }
}
