:root {
  --bg: #f7faf6;
  --jacket-sky: #3e7cf0;
  --jacket-grass: #99e55a;
  --jacket-cloud: #effcfd;
  --ink: #24313a;
  --muted: #52626a;
  --line: rgb(50 65 78 / .16);
  --accent: #315d86;
  --ease: cubic-bezier(.22, 1, .36, 1);
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 2rem; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
::selection { background: #315d86; color: #f4fff0; }
a:focus-visible, button:focus-visible, [tabindex="0"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 6px;
}
.skip { position: fixed; top: .75rem; left: .75rem; z-index: 10; padding: .5rem 1rem; background: #effcfd; transform: translateY(-200%); }
.skip:focus { transform: none; }

/* 輪郭を持たない色の流れと、細かい粒子の質感 */
.backdrop { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.light-field { position: absolute; inset: -8%; transform: translate3d(var(--light-x, 0px), var(--light-y, 0px), 0); transition: transform 2s ease-out; }
.color-flow { position: absolute; width: 85vmax; height: 85vmax; border-radius: 50%; filter: blur(30px); will-change: transform; }
.flow-blue {
  width: 108vmax; height: 70vmax; right: -36vmax; top: -28vmax; rotate: -24deg;
  background: radial-gradient(ellipse, rgb(62 124 240 / .48) 0%, rgb(87 152 245 / .32) 28%, rgb(108 170 246 / .12) 54%, transparent 70%);
  animation: blue-flow 14s ease-in-out infinite alternate;
}
.flow-lime {
  left: -29vmax; bottom: -39vmax;
  background: radial-gradient(ellipse, rgb(153 229 90 / .52), rgb(188 246 109 / .28) 34%, transparent 68%);
  animation: lime-flow 18s ease-in-out infinite alternate;
}
.flow-air {
  width: 106vmax; height: 68vmax; right: -34vmax; bottom: -36vmax; rotate: -24deg;
  background: radial-gradient(ellipse, rgb(108 170 246 / .36), rgb(231 242 250 / .32) 38%, transparent 68%);
  animation: air-flow 19s ease-in-out infinite alternate;
}
.flow-mist {
  left: -31vmax; top: -43vmax;
  background: radial-gradient(ellipse, rgb(231 242 250 / .56), rgb(239 252 253 / .32) 38%, transparent 67%);
  animation: mist-flow 21s ease-in-out infinite alternate;
}
.flow-light {
  width: 125vmax; height: 31vmax; left: -40vmax; top: 14vmax; rotate: -31deg;
  background: radial-gradient(ellipse, rgb(255 255 255 / .88), rgb(239 252 253 / .55) 28%, rgb(239 252 253 / .12) 50%, transparent 68%);
  filter: blur(7px);
  animation: light-flow 12s ease-in-out infinite alternate;
}
.flow-light-two {
  width: 112vmax; height: 25vmax; right: -39vmax; bottom: -9vmax; rotate: -24deg;
  background: radial-gradient(ellipse, rgb(255 255 255 / .76), rgb(239 252 253 / .3) 32%, transparent 70%);
  filter: blur(8px);
  animation: light-flow-two 16s ease-in-out infinite alternate;
}
.backdrop::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgb(247 250 246 / .2), transparent 60%);
}
.backdrop::after {
  content: ""; position: absolute; inset: 0;
  background: url("grain.svg") repeat; background-size: 180px 180px;
  opacity: .065; mix-blend-mode: multiply;
}
@keyframes blue-flow { to { transform: translate(-33%, 39%) rotate(18deg) scale(1.16); } }
@keyframes lime-flow { to { transform: translate(34%, -29%) rotate(-13deg) scale(1.08); } }
@keyframes air-flow { to { transform: translate(-28%, -36%) rotate(-16deg) scale(1.12); } }
@keyframes mist-flow { to { transform: translate(23%, 18%) scale(1.06); } }
@keyframes light-flow { to { transform: translate(35%, 49%) rotate(22deg); } }
@keyframes light-flow-two { to { transform: translate(-31%, -44%) rotate(-18deg); } }

/* 名前とリンクを背景の上に直接置く。固定ナビゲーションは設けない。 */
.hero {
  min-height: max(720px, 100svh);
  padding: 7rem clamp(1.5rem, 10vw, 10rem) 8rem;
  display: flex; align-items: center; position: relative;
}
.profile { max-width: 960px; width: 100%; }
.identity { display: flex; align-items: center; gap: 1.05rem; }
.avatar { width: 74px; height: 74px; object-fit: cover; border-radius: 50%; display: block; }
.handle { margin: 0; font-size: .9rem; letter-spacing: .02em; color: var(--muted); }
.name { margin: 1.8rem 0 1.6rem; font-size: clamp(3.2rem, 7.25vw, 7.2rem); line-height: 1.15; letter-spacing: -.06em; font-weight: 700; white-space: nowrap; }
.name > span { color: var(--accent); margin-left: .06em; }
.bio { margin: 0; font-size: clamp(.94rem, 1.32vw, 1.13rem); line-height: 2.1; letter-spacing: .045em; }
.socials { display: flex; align-items: center; gap: .75rem; margin-top: 1.6rem; }
.socials a { display: inline-flex; align-items: center; gap: .6rem; min-height: 48px; font-size: .9rem; }
.socials .social-link { width: 48px; justify-content: center; transition: transform .4s var(--ease); }
.social-link img { display: block; object-fit: contain; }
.social-link:hover { transform: translateY(-4px); }
.scroll-hint { position: absolute; left: clamp(1.5rem, 10vw, 10rem); bottom: 2.6rem; display: flex; gap: 1.2rem; align-items: center; min-height: 44px; font-size: .68rem; letter-spacing: .09em; color: var(--muted); }
.scroll-hint > span:last-child { animation: scroll-hint 3s var(--ease) infinite; font-size: 1rem; }
@keyframes scroll-hint { 50% { transform: translateY(6px); } }

/* 作品は余白を広く、技能は密度を上げて読み分ける。 */
.sheet { width: min(100%, 1320px); margin: auto; padding: 5rem clamp(1.5rem, 7vw, 6rem) 9rem; }
.section-heading { display: flex; flex-direction: column; gap: .7rem; margin: 0 0 4rem; }
.eyebrow { color: var(--muted); font-size: .67rem; letter-spacing: .15em; }
.section-heading h2 { margin: 0; font-size: clamp(2.4rem, 5vw, 4rem); letter-spacing: -.06em; line-height: 1.2; font-weight: 600; }
.collection-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 1.5rem; margin: 0 0 3rem; }
.collection-heading h3 { margin: 0; font-size: 1.03rem; font-weight: 500; letter-spacing: .055em; }
.collection-heading > span { font-size: .64rem; color: var(--muted); letter-spacing: .08em; }
.games { display: flex; flex-direction: column; }
.game { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; min-height: 100svh; padding: 4rem 0; scroll-margin-top: 0; }
.game-art { min-width: 0; margin: 0; }
.game-art > a { display: block; width: 100%; max-width: 100%; }
.game-art img { display: block; width: 100%; height: auto; transition: transform .65s var(--ease); }
.game-art > a:hover img { transform: translateY(-5px); }
.game-art.portrait > a { width: min(100%, 280px); }
.game-art.square > a { width: min(100%, 340px); }
.game-art.limited > a { width: min(100%, 350px); }
.game-air .game-art > a { width: min(100%, 500px); }
.game-art figcaption { display: flex; flex-wrap: wrap; gap: .15rem .65rem; min-height: 2.4rem; margin-top: .75rem; font-size: .59rem; line-height: 1.9; color: var(--muted); }
.game-art figcaption a { text-decoration: underline; text-underline-offset: 3px; }
.game-info { min-width: 0; }
.game-brand { display: flex; align-items: center; gap: 1rem; margin: 0 0 .4rem; font-size: .65rem; color: var(--muted); letter-spacing: .05em; }
.game-number { font-variant-numeric: tabular-nums; color: var(--accent); }
.game h4 { min-height: 4.6rem; margin: 0; font-size: clamp(1.4rem, 2.2vw, 1.85rem); font-weight: 600; line-height: 1.45; letter-spacing: -.035em; }
.game-subtitle { display: block; font-size: .71rem; color: var(--muted); font-weight: 400; letter-spacing: .06em; margin-top: .35rem; }
/* 長文も同じ文字サイズ。収まらない分は行数と作品の高さを増やす。 */
.game-copy { min-height: 6.4em; margin: 1.6rem 0 0; font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: clamp(1.75rem, 2.5vw, 2.4rem); font-weight: 500; letter-spacing: -.015em; line-height: 1.6; text-wrap: balance; }
.copy-phrase { display: inline-block; max-width: 100%; vertical-align: baseline; }
ruby { ruby-position: over; }
rt { font-family: "Hiragino Sans", system-ui, sans-serif; font-size: .32em; font-weight: 400; letter-spacing: .12em; }
.source-link { display: inline-flex; align-items: center; gap: 1rem; min-height: 44px; margin-top: .5rem; font-size: .66rem; color: var(--muted); }
.source-link span { transition: transform .4s var(--ease); }
.source-link:hover { color: var(--ink); }
.source-link:hover span { transform: translate(3px, -3px); }
.game-art.image-unavailable::before { content: "画像は掲載元でご覧ください"; display: block; padding: 2rem 0; font-size: .8rem; color: var(--muted); }
.image-unavailable img { display: none; }

.creators { margin-top: 8rem; }
.creator-groups { display: grid; grid-template-columns: 1.65fr 1fr .75fr; gap: 3rem; }
.creator-group h4 { display: flex; align-items: baseline; gap: .8rem; margin: 0 0 1.8rem; font-size: .8rem; font-weight: 500; }
.creator-group h4 span { color: var(--muted); font-size: .61rem; font-weight: 400; }
.creator-group ul { display: flex; flex-wrap: wrap; gap: .9rem 1.7rem; padding: 0; margin: 0; list-style: none; }
.creator-group li { font-size: clamp(.95rem, 1.6vw, 1.2rem); white-space: nowrap; font-weight: 500; letter-spacing: .025em; }
.personal-interests { display: grid; grid-template-columns: 1.65fr 1fr .75fr; gap: 3rem; margin-top: 7rem; }
.personal-interests h3 { margin: .7rem 0 1.5rem; font-size: clamp(1.5rem, 2.5vw, 2rem); font-weight: 500; letter-spacing: -.04em; }
.personal-interests p { margin: 0 0 1.7rem; font-size: .84rem; }
.personal-interests dl { margin: 0; }
.personal-interests dt { color: var(--muted); font-size: .63rem; margin-bottom: .6rem; }
.personal-interests dd { margin: 0; font-size: clamp(1.1rem, 2vw, 1.5rem); line-height: 1.8; }
.interest-separator { color: var(--muted); font-size: .8rem; margin: 0 .8rem; }
.interest-investing dl { margin-top: 3.2rem; }
.skills { margin-top: 10rem; padding-top: 4rem; border-top: 1px solid var(--line); }
.skill-layout { display: grid; grid-template-columns: 1.1fr 1fr; gap: 5rem; }
.minor-heading { margin: 0 0 2rem; font-size: .83rem; font-weight: 500; letter-spacing: .035em; }
.stack { margin: 0; }
.stack > div { margin-bottom: 1.8rem; }
.stack dt { font-size: .64rem; letter-spacing: .06em; color: var(--muted); margin-bottom: .35rem; }
.stack dd { margin: 0; font-size: .94rem; line-height: 2; }
.project-list { list-style: none; margin: 0; padding: 0; }
.project-list li + li { border-top: 1px solid var(--line); }
.project-list a { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .9rem 0; min-height: 44px; font-size: .95rem; }
.project-list li:first-child a { padding-top: 0; }
.project-list small { display: block; color: var(--muted); font-size: .71rem; margin-top: .15rem; }
.project-list a > span:last-child { transition: transform .4s var(--ease); }
.project-list a:hover > span:last-child { transform: translate(3px, -3px); }

/* スクリプトが動かない場合も、すべての本文を表示する。 */
.js .identity, .js .name, .js .bio, .js .socials { animation: arrival 1.15s var(--ease) both; }
.js .name { animation-delay: .08s; }
.js .bio { animation-delay: .18s; }
.js .socials { animation-delay: .26s; }
@keyframes arrival { from { opacity: 0; transform: translateY(22px); } }
.error-page .hero { min-height: 100svh; }
.error-page .name { font-size: clamp(3rem, 8vw, 8rem); }

@media (max-width: 1000px) {
  .game { display: flex; flex-direction: column; justify-content: center; align-items: stretch; gap: 1.7rem; padding: 3rem 0; }
  .game-art figcaption, .game h4, .game-copy { min-height: 0; }
}

@media (max-width: 760px) {
  .hero { min-height: max(640px, 100svh); padding: 6rem 1.5rem 7rem; }
  .name { font-size: clamp(2.65rem, 10.6vw, 4.8rem); margin: 1.6rem 0 1.4rem; letter-spacing: -.07em; }
  .avatar { width: 66px; height: 66px; }
  .bio { font-size: .9rem; letter-spacing: .025em; }
  .scroll-hint { left: 1.5rem; bottom: 2rem; }
  .flow-blue { right: -63vmax; top: -10vmax; width: 116vmax; height: 88vmax; }
  .flow-lime { left: -48vmax; bottom: -24vmax; }
  .flow-air { right: -62vmax; bottom: -23vmax; }
  .flow-light { left: -54vmax; top: 22vmax; }
  .flow-light-two { right: -67vmax; bottom: 5vmax; }
  .sheet { padding: 3rem 1.5rem 5rem; }
  .section-heading { margin-bottom: 3rem; }
  .collection-heading { margin-bottom: 2rem; gap: .75rem; }
  .collection-heading h3 { font-size: .93rem; }
  .collection-heading > span { font-size: .57rem; }
  .game-art.portrait > a { width: min(100%, 250px); }
  .game-art.square > a { width: min(100%, 310px); }
  .game h4 { font-size: 1.4rem; }
  .creators { margin-top: 5rem; }
  .creator-groups { grid-template-columns: 1fr; gap: 2.5rem; }
  .creator-group h4 { margin-bottom: 1rem; }
  .creator-group li { font-size: 1.04rem; }
  .personal-interests { grid-template-columns: 1fr 1fr; gap: 3rem 1.5rem; margin-top: 4rem; }
  .interest-music { grid-column: 1 / -1; }
  .personal-interests h3 { margin-bottom: 1rem; }
  .personal-interests dd { font-size: 1.18rem; }
  .interest-investing dl { margin-top: 0; }
  .skills { margin-top: 5rem; padding-top: 3rem; }
  .skill-layout { grid-template-columns: 1fr; gap: 2.5rem; }
  .minor-heading { margin-bottom: 1.5rem; }
  .stack dd { font-size: .88rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
