:root {
  color-scheme: light;
  --bg: #fafaf6;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-soft: rgba(255, 255, 255, 0.7);
  --text: #111318;
  --muted: rgba(17, 19, 24, 0.66);
  --line: rgba(17, 19, 24, 0.1);
  --line-strong: rgba(17, 19, 24, 0.92);
  --accent: #0f766e;
  --accent-soft: rgba(15, 118, 110, 0.08);
  --shadow: 0 18px 40px rgba(17, 19, 24, 0.08);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Hiragino Sans",
    "Yu Gothic",
    "Yu Gothic UI",
    "Helvetica Neue",
    sans-serif;
  background:
    radial-gradient(circle at 12% 18%, rgba(15, 118, 110, 0.08), transparent 28%),
    radial-gradient(circle at 82% 12%, rgba(102, 127, 255, 0.06), transparent 24%),
    radial-gradient(circle at 62% 78%, rgba(255, 255, 255, 0.92), transparent 34%),
    repeating-linear-gradient(0deg, rgba(17, 19, 24, 0.028) 0 1px, transparent 1px 68px),
    repeating-linear-gradient(90deg, rgba(17, 19, 24, 0.028) 0 1px, transparent 1px 68px),
    linear-gradient(180deg, #fcfcfa 0%, #f6f5ef 58%, #efefe8 100%);
  overflow-x: hidden;
}

.ambient {
  display: none;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 12px;
  z-index: 1000;
  padding: 10px 14px;
  border-radius: 999px;
  background: #fff;
  color: #000;
  box-shadow: var(--shadow);
}

.skip-link:focus {
  left: 12px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(250, 250, 246, 0.86);
  backdrop-filter: blur(20px);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 0;
}

.brand {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
}

.brand-mark {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-sub {
  color: var(--muted);
  font-size: 12px;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.menu-toggle {
  display: none;
}

.site-nav a {
  padding: 10px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  border: 1px solid transparent;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: rgba(255, 255, 255, 0.66);
  border-color: var(--line);
}

.section {
  padding: 64px 0;
  border-top: 1px solid rgba(17, 19, 24, 0.08);
}

.hero {
  padding: 0;
  border-top: 0;
}

.hero-caption-band {
  padding: 0;
  border-top: 0;
}

.hero-stage {
  display: contents;
}

.glass-panel {
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  background: rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero-visual {
  position: relative;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 0;
  overflow: hidden;
  background-color: #eff2ee;
  background-image: url("assets/hero-abstract-fullbleed.svg");
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  box-shadow: var(--shadow);
  min-height: 50svh;
  height: 50svh;
  transform-origin: center;
  isolation: isolate;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  perspective: 1200px;
  transform-style: preserve-3d;
  --hero-mouse-x: 0px;
  --hero-mouse-y: 0px;
  --hero-tilt-x: 0deg;
  --hero-tilt-y: 0deg;
  --hero-depth: 0px;
  --hero-scale: 1;
  transform:
    translate3d(0, var(--hero-depth), 0)
    rotateX(var(--hero-tilt-x))
    rotateY(var(--hero-tilt-y))
    scale(var(--hero-scale));
  transition: transform 180ms ease;
}

.hero-visual::before,
.hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.hero-visual::before {
  background:
    radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.45), transparent 34%),
    linear-gradient(180deg, transparent 48%, rgba(255, 255, 255, 0.72) 100%);
  mix-blend-mode: screen;
  opacity: 0.56;
  animation: hero-glow 16s ease-in-out infinite alternate;
}

.hero-visual::after {
  background:
    radial-gradient(circle at 50% 50%, rgba(15, 118, 110, 0.08), transparent 40%),
    radial-gradient(circle at 20% 18%, rgba(102, 127, 255, 0.06), transparent 24%);
  opacity: 0.48;
  filter: blur(12px);
  animation: hero-sweep 20s linear infinite;
}

.hero-orbit,
.hero-reflection {
  position: absolute;
  pointer-events: none;
  z-index: 2;
  will-change: transform, opacity, filter;
}

.hero-orbit {
  border-radius: 50%;
  border: 1px solid rgba(17, 19, 24, 0.08);
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.72), transparent 58%),
    radial-gradient(circle at 30% 30%, rgba(15, 118, 110, 0.16), transparent 40%);
  box-shadow: 0 0 24px rgba(255, 255, 255, 0.42);
  mix-blend-mode: screen;
}

.hero-orbit--1 {
  top: 9%;
  left: 8%;
  width: 14vw;
  max-width: 160px;
  aspect-ratio: 1;
  transform: translate3d(calc(var(--hero-mouse-x) * 0.12), calc(var(--hero-mouse-y) * 0.1), 0)
    translate3d(0, 0, 0) scale(1);
  filter: blur(0.2px);
}

.hero-orbit--2 {
  top: 18%;
  right: 12%;
  width: 8vw;
  max-width: 98px;
  aspect-ratio: 1;
  background:
    radial-gradient(circle, rgba(102, 127, 255, 0.25), transparent 58%),
    radial-gradient(circle at 28% 28%, rgba(255, 255, 255, 0.76), transparent 44%);
  transform: translate3d(calc(var(--hero-mouse-x) * -0.18), calc(var(--hero-mouse-y) * 0.14), 0)
    rotate(12deg);
}

.hero-orbit--3 {
  left: 40%;
  bottom: 16%;
  width: 5vw;
  max-width: 60px;
  aspect-ratio: 1;
  background:
    radial-gradient(circle, rgba(255, 193, 92, 0.24), transparent 58%),
    radial-gradient(circle at 28% 28%, rgba(255, 255, 255, 0.84), transparent 44%);
  transform: translate3d(calc(var(--hero-mouse-x) * 0.25), calc(var(--hero-mouse-y) * -0.22), 0)
    scale(1.1);
}

.hero-reflection {
  inset: 0;
  background:
    linear-gradient(115deg, transparent 0 42%, rgba(255, 255, 255, 0.12) 50%, transparent 58%),
    linear-gradient(145deg, transparent 0 64%, rgba(15, 118, 110, 0.08) 70%, transparent 78%);
  mix-blend-mode: screen;
  opacity: 0.56;
  transform: translate3d(calc(var(--hero-mouse-x) * 0.06), calc(var(--hero-mouse-y) * 0.06), 0);
}

.hero-center-copy {
  position: absolute;
  z-index: 5;
  top: 50%;
  left: 50%;
  width: min(88%, 760px);
  padding: clamp(22px, 4vw, 42px);
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  color: #111318;
  text-align: center;
  transform: translate(-50%, -50%);
  box-shadow: 0 24px 70px rgba(17, 19, 24, 0.08);
}

.hero-center-copy span {
  display: block;
  margin-bottom: 12px;
  color: var(--accent);
  font-size: clamp(0.68rem, 1.2vw, 0.82rem);
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-center-copy h1 {
  margin: 0;
  font-size: clamp(3rem, 10vw, 3.5rem);
  line-height: 0.9;
  letter-spacing: 0.08em;
}

.hero-center-copy p {
  margin: 20px 0 0;
  font-size: clamp(0.95rem, 2vw, 1.3rem);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.hero-copy {
  position: static;
  z-index: 4;
  display: grid;
  gap: 10px;
  max-width: min(100%, 760px);
  padding: 2px 2px 0;
  margin: 0 auto;
}

.hero-note {
  margin: 0;
  font-size: clamp(1.1rem, 2.2vw, 1.7rem);
  line-height: 1.32;
  letter-spacing: -0.03em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
  justify-content: flex-start;
}

.hero-copy .button {
  min-height: 42px;
}

.hero-lead {
  margin: 18px 0 0;
  max-width: 66ch;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.85;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 14px;
  font-weight: 700;
  transition:
    transform 160ms ease,
    background 160ms ease,
    color 160ms ease,
    border-color 160ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

.button-primary {
  background: rgba(255, 255, 255, 0.9);
  color: #050507;
}

.button-primary:hover,
.button-primary:focus-visible {
  background: #fff;
}

.button-ghost {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.button-small {
  min-height: 40px;
  padding: 0 14px;
  font-size: 13px;
}

.hero-aside {
  display: grid;
  gap: 12px;
}

.hero-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow);
}

.hero-card-highlight {
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.08), rgba(255, 255, 255, 0.98)),
    var(--surface);
}

.hero-card span,
.section-kicker,
.card-kicker,
.recruit-tag {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-card strong {
  display: block;
  margin-top: 10px;
  font-size: 1.2rem;
  line-height: 1.3;
}

.hero-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.75;
}

.section-split {
  display: grid;
  gap: 22px;
}

.section-head {
  display: grid;
  gap: 10px;
  width: 100%;
  max-width: 760px;
}

.section-kicker {
  margin: 0;
}

.section-title {
  margin: 0;
  font-size: clamp(1.8rem, 4.2vw, 3.4rem);
  line-height: 1.06;
  letter-spacing: -0.04em;
  word-break: keep-all;
  overflow-wrap: normal;
}

.section-lead,
.section-copy {
  margin: 0;
  max-width: 68ch;
  color: var(--muted);
  line-height: 1.85;
}

.about-grid {
  display: grid;
  gap: 16px;
}

.profile-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.profile-list li {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 10px 22px rgba(17, 19, 24, 0.05);
}

.card-grid,
.music-grid,
.mv-grid {
  display: grid;
  gap: 16px;
  margin-top: 26px;
}

.reveal-item {
  opacity: 0;
  transform: translate3d(0, 14px, 0);
  will-change: transform, opacity;
  transition:
    opacity 700ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal-item.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.parallax-card {
  transform-style: preserve-3d;
  perspective: 1000px;
  --card-tilt-x: 0deg;
  --card-tilt-y: 0deg;
  --card-lift: 0px;
  --card-sway: 0px;
  --card-scale: 1;
  transform:
    translate3d(var(--card-sway), var(--card-lift), 0)
    rotateX(var(--card-tilt-x))
    rotateY(var(--card-tilt-y))
    scale(var(--card-scale));
  transition:
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 220ms ease,
    filter 220ms ease;
}

.parallax-card:hover,
.parallax-card:focus-within {
  box-shadow: 0 30px 70px rgba(17, 19, 24, 0.14);
  filter: saturate(1.02);
}

.parallax-card .thumb,
.parallax-card .music-cover {
  transform: translate3d(0, 0, 32px);
}

.parallax-card .tool-body,
.parallax-card .project-body,
.parallax-card .music-body,
.parallax-card .github-metrics,
.parallax-card .contact-cta {
  transform: translate3d(0, 0, 16px);
}

.tool-card,
.project-card,
.music-card,
.mv-card,
.github-card,
.contact-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow);
}

.tool-card,
.project-card,
.music-card {
  overflow: hidden;
}

.music-card {
  display: flex;
  flex-direction: column;
}

.mv-card {
  overflow: hidden;
}

.mv-player {
  aspect-ratio: 16 / 9;
  background: #000;
}

.mv-player iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.mv-body {
  padding: 18px;
}

.mv-body h3 {
  margin: 8px 0 16px;
}

.project-card {
  scroll-snap-align: start;
}

.tool-body,
.project-body,
.music-body {
  padding: 18px;
}

.thumb,
.music-cover {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
}

.thumb {
  aspect-ratio: 16 / 10;
}

.music-cover {
  aspect-ratio: auto;
  height: 156px;
}

.thumb img,
.music-cover img {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb::before,
.thumb::after,
.music-cover::before,
.music-cover::after,
.thumb-browser,
.thumb-panel {
  display: none;
  content: none;
}

.thumb-chip {
  position: absolute;
  top: 22px;
  left: 24px;
  z-index: 1;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(17, 19, 24, 0.1);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.thumb-browser {
  position: absolute;
  top: 28px;
  left: 24px;
  right: 24px;
  height: 12px;
  border-radius: 999px;
  background: rgba(17, 17, 24, 0.08);
}

.thumb-browser::before,
.thumb-browser::after {
  content: "";
  position: absolute;
  top: 3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(17, 19, 24, 0.72);
}

.thumb-browser::before {
  left: 10px;
  box-shadow: 12px 0 0 rgba(17, 19, 24, 0.56), 24px 0 0 rgba(17, 19, 24, 0.42);
}

.thumb-browser::after {
  right: 10px;
}

.thumb-panel {
  position: absolute;
  inset: auto 24px 24px 24px;
  height: 44%;
  border-radius: 16px;
  border: 1px solid rgba(17, 19, 24, 0.08);
  background: rgba(255, 255, 255, 0.74);
}

.thumb-panel::before,
.thumb-panel::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  height: 10px;
  border-radius: 999px;
  background: rgba(17, 19, 24, 0.12);
}

.thumb-panel::before {
  top: 16px;
  width: 58%;
}

.thumb-panel::after {
  bottom: 16px;
  width: 78%;
}

.thumb-panel--wide {
  inset: auto 18px 18px 18px;
  height: 50%;
}

.thumb-gridlines {
  position: absolute;
  inset: 18px;
  border-radius: 16px;
  border: 1px solid rgba(17, 19, 24, 0.08);
  background:
    linear-gradient(90deg, transparent 0 47%, rgba(17, 19, 24, 0.06) 47% 48%, transparent 48% 100%),
    linear-gradient(transparent 0 38%, rgba(17, 19, 24, 0.06) 38% 39%, transparent 39% 100%);
}

.card-kicker {
  display: inline-flex;
  margin-bottom: 8px;
}

.tool-body h3,
.project-body h3,
.music-body h3 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.32;
}

.tool-body p,
.project-body p,
.music-body p,
.github-card p,
.contact-cta p {
  color: var(--muted);
  line-height: 1.8;
}

.tool-body p,
.project-body p,
.music-body p {
  margin: 12px 0 0;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.chip-list li {
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.card-grid-three {
  grid-template-columns: 1fr;
}

.card-grid-two {
  grid-template-columns: 1fr;
}

.music-grid {
  grid-template-columns: 1fr;
}

.music-cover {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 14px;
  min-height: 128px;
}

.music-cover strong {
  position: relative;
  z-index: 1;
  max-width: 9ch;
  font-size: 1.16rem;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.music-cover .cover-note {
  position: relative;
  z-index: 1;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(17, 19, 24, 0.1);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.music-cover--take1 {
  background:
    radial-gradient(circle at 28% 26%, rgba(126, 245, 223, 0.6) 0 2px, transparent 3px),
    radial-gradient(circle at 58% 68%, rgba(104, 130, 255, 0.32) 0 20%, transparent 21%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
}

.music-cover--take2 {
  background:
    radial-gradient(circle at 72% 24%, rgba(104, 130, 255, 0.54) 0 2px, transparent 3px),
    radial-gradient(circle at 40% 60%, rgba(126, 245, 223, 0.28) 0 18%, transparent 19%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015));
}

.music-cover--take3 {
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.52) 0 2px, transparent 3px),
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(104, 130, 255, 0.06));
}

.music-cover--take4 {
  background:
    radial-gradient(circle at 26% 68%, rgba(126, 245, 223, 0.28) 0 18%, transparent 19%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015));
}

.github-card {
  display: grid;
  gap: 16px;
  padding: 20px;
  transform-style: preserve-3d;
}

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

.github-metrics div {
  padding: 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
}

.github-metrics span {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.github-metrics small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.contact-wrap {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.contact-wrap .section-head {
  display: grid;
  justify-items: start;
  text-align: left;
  width: 100%;
}

.contact-cta {
  display: grid;
  gap: 12px;
  width: 100%;
  padding: 22px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.82);
  justify-items: start;
  text-align: left;
  margin-inline: 0;
}

.contact-cta strong {
  font-size: clamp(1.2rem, 2.2vw, 1.7rem);
  line-height: 1.2;
  color: var(--text);
}

.contact-cta-label {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

@keyframes hero-glow {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(0, -3px, 0) scale(1.01);
  }
}

@keyframes hero-sweep {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(0, -4px, 0) scale(1.02);
  }
}

.site-footer {
  padding: 20px 0 28px;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.footer-inner a {
  color: var(--text);
  font-weight: 700;
}

@media (min-width: 720px) {
  .card-grid-three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card-grid-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .music-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mv-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .music-cover {
    padding: 10px;
    border-right: 0;
    height: 140px;
  }

}

@media (min-width: 920px) {
  .section-split {
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
    align-items: start;
  }

  .card-grid-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .card-grid-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .music-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mv-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero-stage {
    min-height: min(92vh, 980px);
  }

  .card-grid[data-grid="portfolio"] {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(300px, 27vw);
    overflow-x: auto;
    padding-bottom: 14px;
    scroll-snap-type: x proximity;
    overscroll-behavior-x: contain;
  }

  .card-grid[data-grid="portfolio"]::-webkit-scrollbar {
    height: 8px;
  }

  .card-grid[data-grid="portfolio"]::-webkit-scrollbar-thumb {
    background: rgba(17, 19, 24, 0.12);
    border-radius: 999px;
  }

  .contact-wrap {
    justify-items: center;
  }

  .contact-wrap .section-head {
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }

  .hero-visual,
  .parallax-card {
    transform: none !important;
    filter: none !important;
  }
}

@media (max-width: 680px) {
  .container {
    width: min(1120px, calc(100% - 24px));
  }

  .section-head {
    max-width: 100%;
  }

  .section-title {
    font-size: clamp(1.55rem, 8vw, 2.3rem);
    line-height: 1.14;
    letter-spacing: -0.03em;
  }

  .hero-visual,
  .parallax-card,
  .tool-card,
  .project-card,
  .music-card,
  .github-card,
  .contact-cta {
    transform: none !important;
    filter: none !important;
  }

  .header-inner {
    position: relative;
    align-items: center;
    padding: 12px 0;
  }

  .menu-toggle {
    display: inline-flex;
    width: 44px;
    height: 44px;
    margin-left: auto;
    padding: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.66);
    color: var(--text);
    cursor: pointer;
  }

  .menu-toggle span {
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition: transform 180ms ease, opacity 180ms ease;
  }

  .menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 1px);
    left: -12px;
    right: -12px;
    z-index: 30;
    width: 100%;
    display: none;
    padding: 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    border-bottom: 1px solid var(--line);
    background: rgba(250, 250, 246, 0.97);
    box-shadow: 0 18px 34px rgba(17, 19, 24, 0.1);
    backdrop-filter: blur(20px);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 12px 14px;
    border-radius: 10px;
    text-align: center;
  }

  .github-metrics {
    grid-template-columns: 1fr;
  }

  .hero-stage {
    display: contents;
  }

  .hero-visual {
    min-height: 50vh;
    height: 50vh;
    border-left: 0;
    border-right: 0;
  }

  .hero-copy {
    position: static;
    max-width: none;
    margin-top: 0;
  }

  .card-grid[data-grid="portfolio"] {
    grid-template-columns: 1fr;
    grid-auto-flow: row;
    overflow-x: visible;
    scroll-snap-type: none;
    padding-bottom: 0;
  }

  .music-card {
    grid-template-columns: 1fr;
  }

  .music-cover {
    padding: 10px;
    border-right: 0;
    min-height: 92px;
  }
}

@keyframes float-bg {
  from {
    transform: translate3d(0, 0, 0) scale(1.06);
  }

  to {
    transform: translate3d(0, -8px, 0) scale(1.09);
  }
}

@keyframes grid-shift {
  from {
    background-position: 0 0;
  }

  to {
    background-position: 120px 80px;
  }
}
