/* hero.css — Hero + About セクション専用 (#2)
   ダーク基調のステートメント・ヒーロー: 巨大な Syne タイポ + 発光アバター + 段階入場 */

/* ---------- Hero ---------- */
#hero {
  padding-top: var(--space-8);
  padding-bottom: var(--space-8);
}
#hero .hero__inner {
  display: flex;
  align-items: center;
  gap: clamp(var(--space-5), 5vw, var(--space-8));
}

/* 円形アバター。発光リングで浮かせる。画像欠落時はイニシャル "RM" を表示 */
#hero .hero__avatar {
  position: relative;
  flex: 0 0 auto;
  width: clamp(108px, 18vw, 150px);
  height: clamp(108px, 18vw, 150px);
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-subtle);
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 1px var(--border), 0 0 0 6px var(--accent-weak),
    0 18px 50px -18px var(--glow);
}
#hero .hero__avatar::before {
  content: attr(data-initials);
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
#hero .hero__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.25) contrast(1.05);
  transition: filter 0.4s ease, transform 0.4s ease;
}
#hero .hero__avatar:hover .hero__photo {
  filter: grayscale(0) contrast(1.05);
  transform: scale(1.04);
}
/* 画像読み込み失敗時はプレースホルダのイニシャルを見せる（alt は残す） */
#hero .hero__photo.is-hidden {
  opacity: 0;
}

#hero .hero__body {
  min-width: 0;
}

/* 等幅キッカー + パルスドット */
#hero .hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
}
#hero .hero__pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--ring);
  animation: hero-pulse 2.4s ease-out infinite;
}
@keyframes hero-pulse {
  0% {
    box-shadow: 0 0 0 0 var(--ring);
  }
  70% {
    box-shadow: 0 0 0 8px transparent;
  }
  100% {
    box-shadow: 0 0 0 0 transparent;
  }
}

#hero .hero__name {
  margin-top: var(--space-3);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-3xl);
  line-height: 1.05;
  letter-spacing: -0.02em;
  white-space: nowrap; /* 常に1行で表示する */
  color: var(--text); /* background-clip:text 未対応時のフォールバック（名前が消えない） */
}
/* ごく控えめな光沢のみ（可読性優先で本文色をほぼ維持）。
   background-clip:text と color-mix() の両対応時のみ適用し、
   どちらか未対応なら color:var(--text) のフォールバックを維持する。 */
@supports (
  ((-webkit-background-clip: text) or (background-clip: text)) and
    (color: color-mix(in srgb, red, blue))
) {
  #hero .hero__name {
    background: linear-gradient(
      180deg,
      var(--text),
      color-mix(in srgb, var(--text) 88%, var(--accent))
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}
#hero .hero__alias {
  margin-top: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
#hero .hero__alias::before {
  content: "// ";
  color: var(--accent);
}
#hero .hero__role {
  margin-top: var(--space-4);
  font-size: var(--fs-lg);
  font-weight: 600;
  color: var(--text);
}
#hero .hero__location {
  margin-top: var(--space-1);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
#hero .hero__location::before {
  content: "⌖ ";
  color: var(--accent);
}

@media (max-width: 560px) {
  #hero .hero__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-5);
  }
  /* 狭幅では1行固定を解除し、はみ出し・文字切れを防ぐ */
  #hero .hero__name {
    white-space: normal;
  }
}

/* ---------- 段階入場アニメーション (hero は読み込み時に is-visible になる) ---------- */
#hero .hero__avatar,
#hero .hero__eyebrow,
#hero .hero__name,
#hero .hero__alias,
#hero .hero__role,
#hero .hero__location {
  opacity: 0;
  transform: translateY(16px);
}
#hero.is-visible .hero__avatar,
#hero.is-visible .hero__eyebrow,
#hero.is-visible .hero__name,
#hero.is-visible .hero__alias,
#hero.is-visible .hero__role,
#hero.is-visible .hero__location {
  animation: hero-rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
#hero.is-visible .hero__avatar {
  animation-delay: 0.05s;
}
#hero.is-visible .hero__eyebrow {
  animation-delay: 0.12s;
}
#hero.is-visible .hero__name {
  animation-delay: 0.2s;
}
#hero.is-visible .hero__alias {
  animation-delay: 0.3s;
}
#hero.is-visible .hero__role {
  animation-delay: 0.38s;
}
#hero.is-visible .hero__location {
  animation-delay: 0.46s;
}
@keyframes hero-rise {
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- About ---------- */
/* 行はコンテナ幅いっぱいまで使う（max-width / フレーズ折返しによる早すぎる改行を避ける）。 */
#about .about__summary {
  max-width: 46em;
}
#about .about__summary p {
  color: var(--text);
  font-size: var(--fs-lg);
  line-height: 1.8;
}
#about .about__summary p + p {
  margin-top: var(--space-4);
}
/* 先頭段落を少し強調 */
#about .about__summary p:first-child {
  color: var(--text);
}

#about .about__meta {
  margin-top: var(--space-6);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
}
#about .about__group {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
#about .about__label {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}
#about .about__chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
#about .chip {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.02em;
  color: var(--text);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: border-color 0.18s ease, color 0.18s ease;
}
#about .chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

@media (prefers-reduced-motion: reduce) {
  #hero .hero__pulse {
    animation: none;
  }
  #hero .hero__avatar,
  #hero .hero__eyebrow,
  #hero .hero__name,
  #hero .hero__alias,
  #hero .hero__role,
  #hero .hero__location {
    opacity: 1;
    transform: none;
    animation: none;
  }
  #hero .hero__photo {
    transition: none;
  }
  #hero .hero__avatar:hover .hero__photo {
    transform: none;
  }
}
