/*
Theme Name: Kiato Portfolio
Theme URI: https://2nd-star.co.jp/creator/kiato/
Author: 2nd STAR PRODUCTION
Description: きあと（Kiato）ポートフォリオ専用カスタムテーマ
Version: 1.0.6
Text Domain: kiato
*/

/* ============================================
   Kiato Portfolio — style.css
   ============================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Base */
  --bg: #FAF7FF;
  --bg-section: #F5F0FA;
  --text: #2D2240;
  --text-light: #6B5E7B;
  --text-muted: #9B8EAD;

  /* Pastels */
  --lavender: #C8A2D0;
  --pink: #F2B8D0;
  --mint: #B8E8D0;
  --blue: #A8D8EA;
  --accent-strong: #7A4D8A;
  --accent-strong-hover: #6B3F7B;

  /* Neon accents */
  --neon-pink: #FF6B9D;
  --neon-cyan: #00E5FF;
  --neon-yellow: #E8FF00;

  /* UI */
  --card-bg: #FFFFFF;
  --card-shadow: 0 4px 20px rgba(45, 34, 64, 0.08);
  --card-shadow-hover: 0 8px 32px rgba(45, 34, 64, 0.14);
  --border: #E8DFF0;
  --radius: 16px;
  --radius-sm: 8px;
  --nav-bg: rgba(250, 247, 255, 0.85);
  --nav-shadow: 0 1px 12px rgba(45, 34, 64, 0.06);

  /* Typography */
  --font-body: 'Inter', 'Noto Sans JP', sans-serif;
  --font-display: 'Dancing Script', cursive;

  /* Spacing */
  --section-py: 100px;
  --container-px: 24px;
  --container-max: 1200px;

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Dark Mode ---------- */
[data-theme="dark"] {
  --bg: #1A0A2E;
  --bg-section: #1F1035;
  --text: #F0E8FF;
  --text-light: #C0B0D8;
  --text-muted: #8A78A0;
  --card-bg: #261640;
  --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  --card-shadow-hover: 0 8px 32px rgba(255, 107, 157, 0.15);
  --border: #3A2855;
  --nav-bg: rgba(26, 10, 46, 0.9);
  --nav-shadow: 0 1px 12px rgba(0, 0, 0, 0.3);
  --accent-strong: #7A4D8A;
  --accent-strong-hover: #6B3F7B;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
  overflow-x: hidden;
}

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

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

ul { list-style: none; }

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

a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible {
  outline: 3px solid var(--accent-strong);
  outline-offset: 4px;
}

/* ---------- Container ---------- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-px);
}

/* ---------- Section ---------- */
.section {
  padding: var(--section-py) 0;
}

.section:nth-child(even) {
  background: var(--bg-section);
}

.section__title {
  text-align: center;
  margin-bottom: 48px;
}

.section__title-en {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 600;
  background: linear-gradient(135deg, var(--lavender), var(--pink), var(--neon-pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section__desc {
  text-align: center;
  color: var(--text-light);
  margin-top: -32px;
  margin-bottom: 40px;
  font-size: 0.95rem;
}

.section__more {
  text-align: center;
  margin-top: 48px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 12px 32px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: all 0.3s var(--ease);
  cursor: pointer;
}

.btn--outline {
  border: 2px solid var(--accent-strong);
  color: var(--accent-strong);
}

.btn--outline:hover {
  background: var(--accent-strong);
  color: #fff;
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--nav-shadow);
  transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.nav__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav__logo {
  display: flex;
  align-items: center;
}

.nav__logo-img {
  height: 28px;
  width: auto;
}

.nav__links {
  display: flex;
  gap: 28px;
}

.nav__links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-light);
  transition: color 0.3s var(--ease);
  position: relative;
}

.nav__links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--neon-pink);
  transition: width 0.3s var(--ease);
}

.nav__links a:hover { color: var(--text); }
.nav__links a:hover::after { width: 100%; }

.nav__links a.is-active { color: var(--neon-pink); opacity: 1; }
.nav__links a.is-active::after { width: 100%; }

/* Dark mode toggle */
.nav__darkmode {
  background: none;
  border: 2px solid var(--border);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-light);
  transition: all 0.3s var(--ease);
}

.nav__darkmode:hover {
  border-color: var(--accent-strong);
  color: var(--accent-strong);
}

.icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: block; }

.floating--hero-1 { top: 15%; left: 8%; }
.floating--hero-2 { top: 25%; right: 12%; }
.floating--hero-3 { bottom: 20%; left: 15%; }
.floating--hero-4 { bottom: 30%; right: 8%; }

/* Mobile hamburger */
.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 32px;
  height: 24px;
  position: relative;
  z-index: 1001;
}

.nav__toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  position: absolute;
  left: 0;
  transition: all 0.3s var(--ease);
}

.nav__toggle span:nth-child(1) { top: 0; }
.nav__toggle span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.nav__toggle span:nth-child(3) { bottom: 0; }

.nav__toggle.is-active span:nth-child(1) { top: 50%; transform: translateY(-50%) rotate(45deg); }
.nav__toggle.is-active span:nth-child(2) { opacity: 0; }
.nav__toggle.is-active span:nth-child(3) { bottom: 50%; transform: translateY(50%) rotate(-45deg); }

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
}

.hero__bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(250, 247, 255, 0.3) 0%,
    rgba(250, 247, 255, 0.6) 50%,
    rgba(250, 247, 255, 0.85) 100%
  );
}

[data-theme="dark"] .hero__overlay {
  background: linear-gradient(
    180deg,
    rgba(26, 10, 46, 0.4) 0%,
    rgba(26, 10, 46, 0.65) 50%,
    rgba(26, 10, 46, 0.9) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
}

.hero__name {
  font-family: var(--font-display);
  font-size: clamp(4rem, 12vw, 8rem);
  font-weight: 700;
  line-height: 1;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--lavender), var(--pink), var(--neon-pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-theme="dark"] .hero__name {
  background: linear-gradient(135deg, var(--neon-pink), var(--neon-cyan));
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 0 30px rgba(255, 107, 157, 0.4));
}

.hero__subtitle {
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  color: var(--text-light);
  margin-bottom: 12px;
}

.about__intro {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-bottom: 20px;
}

.about__intro .about__name-row {
  margin-bottom: 0;
}

.about__logo {
  display: block;
  width: min(240px, 42vw);
  height: auto;
  flex-shrink: 0;
}

.hero__tagline {
  font-size: 1rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Scroll indicator */
.hero__scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 2;
}

.hero__scroll span {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.hero__scroll-line {
  width: 1px;
  height: 40px;
  background: var(--text-muted);
  animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: scaleY(0.5); opacity: 0.3; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* Floating elements */
.floating {
  position: absolute;
  font-size: 1.5rem;
  opacity: 0.3;
  animation: float 6s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

.floating--star { color: var(--lavender); animation-delay: 0s; }
.floating--heart { color: var(--pink); animation-delay: 1s; }
.floating--sparkle { color: var(--mint); animation-delay: 2s; }

[data-theme="dark"] .floating--star { color: var(--neon-pink); opacity: 0.5; }
[data-theme="dark"] .floating--heart { color: var(--neon-cyan); opacity: 0.5; }
[data-theme="dark"] .floating--sparkle { color: var(--neon-yellow); opacity: 0.5; }

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-15px) rotate(5deg); }
}

/* ============================================
   ABOUT
   ============================================ */
.about__grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 64px;
}

.about__avatar-frame {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--lavender);
  box-shadow: 0 0 0 8px rgba(200, 162, 208, 0.15);
  position: relative;
}

.about__avatar-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about__name-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
}

.about__name {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--lavender), var(--pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0;
}

.about__name--large {
  font-size: 2.2rem;
}

.about__role {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lavender);
  margin-bottom: 0;
}

.about__bio p {
  margin-bottom: 12px;
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.8;
}

/* Style Modes */
.modes__heading {
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--lavender);
  margin-bottom: 24px;
}

.modes__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.mode-card {
  text-align: center;
}

.mode-card__img {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: var(--radius);
}

.mode-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease);
}


.mode-card__name {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  padding: 10px 0 2px;
}

.mode-card__jp {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin: 0;
  padding: 2px 0 0;
}

/* ============================================
   GALLERY (shared: Original Art & Works)
   ============================================ */
.gallery--scroll-rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-left: calc(-1 * var(--container-px));
  margin-right: calc(-1 * var(--container-px));
  width: calc(100% + 2 * var(--container-px));
}

.gallery__row {
  overflow: hidden;
}

.gallery__row .gallery__scroll {
  display: flex;
  gap: 12px;
}

.gallery__row--left .gallery__scroll {
  animation: scrollLeft 80s linear infinite;
}

.gallery__row--right .gallery__scroll {
  animation: scrollRight 80s linear infinite;
}

.gallery__row:hover .gallery__scroll {
  animation-play-state: paused;
}

.gallery--scroll-rows .gallery__item {
  flex: 0 0 280px;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius);
  overflow: hidden;
}

.gallery--scroll-rows .gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@keyframes scrollLeft {
  0% { transform: translateX(0); }
  100% { transform: translateX(calc(-50% - 6px)); }
}

@keyframes scrollRight {
  0% { transform: translateX(calc(-50% - 6px)); }
  100% { transform: translateX(0); }
}

.gallery--masonry {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.gallery--masonry .gallery__item {
  aspect-ratio: 1 / 1;
}

/* KV画像は16:9横長で2列分の幅を使う
   3列グリッドでspan 2のため、KVが奇数個の場合は最後の1列分が空く */
.gallery--masonry .gallery__item[data-category="kv"] {
  aspect-ratio: 16 / 9;
  grid-column: span 2;
}

.gallery__item {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  transition: transform 0.3s var(--ease);
}

.gallery__item:hover {
  transform: scale(1.02);
}

.gallery__item[role="button"] {
  cursor: pointer;
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s var(--ease), filter 0.4s var(--ease);
}

.gallery__item:hover img {
  transform: scale(1.03);
  filter: brightness(1.05);
}

.gallery__caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 16px 16px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  color: #fff;
  font-size: 0.85rem;
  font-weight: 500;
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.3s var(--ease);
}

.gallery__item:hover .gallery__caption {
  opacity: 1;
  transform: translateY(0);
}

.gallery__date {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  opacity: 0.7;
  margin-top: 2px;
}

/* Natural ratio masonry layout (category filters) */
.gallery--masonry.gallery--natural {
  display: block;
  column-count: 3;
  column-gap: 16px;
}

.gallery--masonry.gallery--natural .gallery__item {
  aspect-ratio: auto;
  break-inside: avoid;
  margin-bottom: 16px;
}

.gallery--masonry.gallery--natural .gallery__item img {
  height: auto;
}

.gallery--masonry.gallery--natural .gallery__item.is-hidden {
  display: none !important;
}

@media (max-width: 768px) {
  .gallery--masonry.gallery--natural {
    column-count: 2;
  }
}

/* Filter */
.filter {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filter__btn {
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 8px 20px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.3s var(--ease);
}

.filter__btn:hover,
.filter__btn.is-active {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: #fff;
}

/* Gallery item hide/show for filter */
.gallery__item[data-category] {
  transition: opacity 0.4s var(--ease), transform 0.3s var(--ease);
}

.gallery__item.is-hidden {
  display: none;
}

/* ============================================
   MV SECTION
   ============================================ */
.mv__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.mv__card {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card-bg);
  box-shadow: var(--card-shadow);
  transition: all 0.3s var(--ease);
}

.mv__card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
}

.mv__thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.mv__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease);
}

.mv__card:hover .mv__thumb img {
  transform: scale(1.05);
}

.mv__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  background: rgba(255, 107, 157, 0.85);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.2rem;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

.mv__card:hover .mv__play {
  opacity: 1;
}

.mv__title {
  padding: 12px 16px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* ============================================
   FEATURED PROJECTS
   ============================================ */
.featured__list {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.featured__card {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 0;
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: all 0.3s var(--ease);
}

.featured__card:hover {
  box-shadow: var(--card-shadow-hover);
}

.featured__card:nth-child(even) {
  direction: rtl;
}

.featured__card:nth-child(even) > * {
  direction: ltr;
}

.featured__img {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.featured__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease);
}

.featured__card:hover .featured__img img {
  transform: scale(1.05);
}

.featured__info {
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured__client {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lavender);
  margin-bottom: 8px;
}

.featured__title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.featured__type {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.featured__desc {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.7;
}

/* ============================================
   SKILLS
   ============================================ */
.skills__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.skill-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 32px 20px;
  text-align: center;
  box-shadow: var(--card-shadow);
  transition: all 0.3s var(--ease);
}

.skill-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
}

.skill-card__icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.skill-card__title {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.skill-card__count {
  font-size: 0.75rem;
  color: var(--lavender);
  font-weight: 500;
}

/* ============================================
   CLIENTS
   ============================================ */
.clients__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.clients__name {
  display: inline-block;
  padding: 10px 24px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-light);
  transition: all 0.3s var(--ease);
}

.clients__name:hover {
  border-color: var(--lavender);
  color: var(--lavender);
}

/* ============================================
   CONTACT
   ============================================ */
.contact {
  text-align: center;
}

.contact__heading {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 24px;
}

.contact__links {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.contact__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 160px;
  padding: 14px 28px;
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  transition: all 0.3s var(--ease);
}

.contact__btn:hover {
  border-color: var(--accent-strong);
  color: var(--accent-strong);
  transform: translateY(-2px);
  box-shadow: var(--card-shadow);
}

.contact__btn--primary {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: #fff;
}

.contact__btn--primary:hover {
  background: var(--accent-strong-hover);
  border-color: var(--accent-strong-hover);
  color: #fff;
}

.contact__btn svg {
  flex-shrink: 0;
}

.contact__divider {
  margin: 40px auto 0;
  width: 48px;
  height: 1px;
  background: var(--border);
}

.contact__sub-title {
  margin-top: 32px;
  font-family: 'Dancing Script', cursive;
  font-size: 2rem;
  font-weight: 600;
  color: var(--pink);
  letter-spacing: 0.02em;
}

.contact__label {
  margin-top: 32px;
  margin-bottom: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

.contact__mgmt-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 12px;
}

.contact__mgmt-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 24px;
  border: 1px solid var(--border);
  border-radius: 999px;
  text-decoration: none;
  transition: all 0.3s var(--ease);
  background: var(--card-bg);
}

.contact__mgmt-btn:hover {
  border-color: var(--lavender);
  transform: translateY(-2px);
  box-shadow: var(--card-shadow);
}

.contact__mgmt-icon {
  display: block;
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.contact__mgmt-logo {
  display: block;
  height: 18px;
  width: auto;
  object-fit: contain;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  text-align: center;
  padding: 40px var(--container-px) 32px;
  position: relative;
}

.footer__rights {
  margin: 20px auto 0;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.footer__mgmt-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer__logo-link {
  display: inline-flex;
  text-decoration: none;
}

.footer__logo-link:hover .footer__mgmt-logo {
  opacity: 1;
}

.footer__momonga {
  position: relative;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  flex-shrink: 0;
}

.footer__momonga-img {
  position: absolute;
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.footer__momonga-text {
  position: absolute;
  width: 72px;
  height: 72px;
  color: var(--text-muted);
  animation: spin 12s linear infinite;
}

.footer__momonga:hover .footer__momonga-text {
  color: var(--accent-strong);
}

.footer__mgmt {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-muted);
  transition: color 0.3s ease;
}

.footer__mgmt:hover {
  color: var(--text);
}

.footer__mgmt-label {
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

.footer__mgmt-logo {
  height: 16px;
  width: auto;
  object-fit: contain;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.footer__mgmt:hover .footer__mgmt-logo {
  opacity: 1;
}

/* ============================================
   RESPONSIVE — Tablet (768px)
   ============================================ */
@media (max-width: 1024px) {
  :root {
    --section-py: 80px;
  }

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

  .featured__card:nth-child(even) {
    direction: ltr;
  }

  .featured__img {
    aspect-ratio: 16 / 9;
  }

  .featured__info {
    padding: 24px;
  }
}

@media (max-width: 768px) {
  :root {
    --section-py: 64px;
    --container-px: 16px;
  }

  /* About intro — stack logo above name on mobile */
  .about__intro {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  /* About name — stack on mobile */
  .about__name-row {
    flex-direction: column;
    gap: 4px;
  }

  /* Original Art scroll — smaller on mobile */
  .gallery--scroll-rows .gallery__item {
    flex: 0 0 180px;
  }

  /* Nav — mobile */
  .nav__toggle {
    display: block;
  }

  .nav__links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--bg);
    flex-direction: column;
    padding: 80px 32px 32px;
    gap: 20px;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    transition: right 0.4s var(--ease);
    z-index: 999;
  }

  .nav__links.is-open {
    right: 0;
  }

  .nav__links a {
    font-size: 1rem;
  }

  /* Hero */
  .hero__name {
    font-size: clamp(3rem, 14vw, 5rem);
  }

  /* About */
  .about__grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 24px;
  }

  .about__avatar {
    display: flex;
    justify-content: center;
  }

  .about__avatar-frame {
    width: 160px;
    height: 160px;
  }

  /* Modes */
  .modes__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .modes__grid .mode-card:last-child {
    grid-column: 1 / -1;
    max-width: 50%;
    margin: 0 auto;
  }

  /* Gallery */
  .gallery--grid-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .gallery--masonry {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  /* KV画像: 2列時は横幅いっぱいに表示 */
  .gallery--masonry .gallery__item[data-category="kv"] {
    grid-column: span 2;
  }

  /* MV */
  .mv__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  /* Skills */
  .skills__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  /* Section title */
  .section__title-en {
    font-size: 2rem;
  }
}

/* ============================================
   RESPONSIVE — Mobile (375px)
   ============================================ */
@media (max-width: 480px) {
  .gallery--masonry {
    grid-template-columns: repeat(2, 1fr);
  }

  /* KV画像: 2列のままなのでspan 2で横幅いっぱい */
  .gallery--masonry .gallery__item[data-category="kv"] {
    grid-column: span 2;
  }

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

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

  .contact__links {
    flex-direction: column;
    align-items: center;
  }

  .contact__btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

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

  .featured__info {
    padding: 20px 16px;
  }
}

/* ============================================
   ANIMATIONS (scroll reveal)
   ============================================ */
/* Reduced motion: disable GSAP transforms */
@media (prefers-reduced-motion: reduce) {
  .gallery__item,
  .mode-card,
  .skill-card,
  .mv__card,
  .featured__card,
  .section__title-en {
    opacity: 1 !important;
    transform: none !important;
  }

  .gallery__row .gallery__scroll,
  .footer__momonga-text {
    animation: none !important;
    transform: none !important;
  }
}

.subpage-header {
  padding-top: 120px;
}

.section--flush-top {
  padding-top: 0;
}

.section__more--spaced {
  margin-top: 64px;
}

/* Back button (subpages) */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 1rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--text-muted);
  border-radius: 2rem;
  color: var(--text-light);
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.2s;
}
.back-btn:hover {
  color: var(--neon-pink);
  border-color: var(--neon-pink);
}

/* ---------- Lightbox ---------- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.9);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  cursor: pointer;
}

.lightbox[aria-hidden="true"] {
  display: none;
}

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

.lightbox__img {
  width: auto;
  height: auto;
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
}

.lightbox__close {
  position: absolute;
  top: 20px;
  right: 28px;
  font-size: 2.5rem;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
}

.lightbox__close:focus-visible {
  outline-color: #fff;
}

.lightbox__caption {
  color: #ccc;
  font-size: 0.85rem;
  margin-top: 12px;
  text-align: center;
}

/* Placeholder for missing images */
.gallery__item img[src=""],
.gallery__item img:not([src]),
img[src=""] {
  background: linear-gradient(135deg, var(--lavender), var(--pink));
  min-height: 200px;
}
