/* =========================================================
   個人紹介（s5-studios.com/about/shogo-tabuchi/ と同じ並び）
   写真＋名前（カタカナと英字を重ねて立体的に傾ける）→ 肩書き → 紹介文 → 年表 → 資格 → English → Back to Index
   見出し（History など）と「English」ボタンは about.css の部品をそのまま使う
   ========================================================= */
main.-profile { position: relative; z-index: 1; }
.profile-inner { position: relative; padding-bottom: 300px; }

/* About のカードから飛んできたとき（html.is-from-card。profile.html の頭で付ける）：
   動きのファイルが動く前の最初の1コマから、読み込み画面を出さず、頭の部分・写真・背景の星を「もう出ている」状態で描く */
html.is-from-card .p-loading { display: none; }
html.is-from-card .p-header { visibility: visible; }
html.is-from-card .p-header .c-wipe__body { visibility: visible; }
html.is-from-card .p-header__nav li a { visibility: visible; }
html.is-from-card .p-header__nav li .bar { transform: none; }
html.is-from-card .p-header__sound { transform: scale(1); }
html.is-from-card .p-bg canvas { opacity: 1; transition: none; }
html.is-from-card .profile-kv__photo { clip-path: none; }
html.is-from-card .profile-kv__photo img { transform: none; }
@media (max-width: 899px) {
  html.is-from-card .p-header__toggle { pointer-events: auto; }
  html.is-from-card .p-header__toggle .line span { transform: none; }
}

/* 改行の出し分け（パソコンだけ／スマホだけ） */
br.u-show-sp { display: none; }
@media (max-width: 899px) {
  br.u-show-sp { display: inline; }
  br.u-show-pc { display: none; }
}

/* 画面に入ったら、奥に倒れた状態から手前へ起き上がる（元サイトの個人紹介と同じ出方） */
.profile-role, .profile-intro, .profile-history__list li, .profile-awards__list li, .profile-back {
  opacity: 0; transform: perspective(900px) rotateX(-50deg) translate3d(0, 80px, 0); transform-origin: 50% 100%;
}
.profile-role.-inview, .profile-intro.-inview, .profile-history__list li.-inview, .profile-awards__list li.-inview, .profile-back.-inview {
  opacity: 1; transform: none;
  transition: opacity 1.5s var(--e-quart-out), transform 1.5s var(--e-quart-out);
}

/* 日本語と英語を同じ場所に重ねておき、選んだ方だけ出す（高さは長い方に合う） */
.p-lang { display: grid; }
.p-lang > .lang-ja, .p-lang > .lang-en { grid-area: 1 / 1; transition: opacity .8s var(--e-quint-out), transform .8s var(--e-quint-out), visibility 0s linear 0s; }
.p-lang > .lang-en { opacity: 0; visibility: hidden; transform: translate3d(0, 14px, 0); transition-delay: 0s, 0s, .8s; }
.js-profile.-en .p-lang > .lang-ja { opacity: 0; visibility: hidden; transform: translate3d(0, -14px, 0); transition-delay: 0s, 0s, .8s; }
.js-profile.-en .p-lang > .lang-en { opacity: 1; visibility: visible; transform: none; transition-delay: .15s, .15s, 0s; }
.p-lang > .lang-ja { font-family: "Senobi Gothic", "Noto Sans JP", sans-serif; font-weight: 400; }

/* =========================================================
   ① 写真＋名前
   ========================================================= */
.profile-kv { position: relative; padding-top: 170px; }
.profile-kv__stage { position: relative; width: 86%; max-width: 1100px; height: 720px; margin: 0 auto; perspective: 1400px; }

/* 写真：About のカードの写真（幅 約231）の 1.4倍＝ 約330。傾きは profile.js がマウスに合わせて入れる */
.profile-kv__photo {
  position: absolute; top: 40px; left: 50%; width: 330px; margin-left: -165px; aspect-ratio: 462 / 688;
  overflow: hidden; will-change: transform;
  clip-path: inset(100% 0 0 0);
}
.profile-kv__photo img { display: block; width: 100%; height: 100%; object-fit: cover; transform: scale(1.3); }
.profile-kv.-show .profile-kv__photo { clip-path: inset(0 0 0 0); transition: clip-path 1.5s var(--e-quart-inout); }
.profile-kv.-show .profile-kv__photo img { transform: scale(1); transition: transform 2s var(--e-quart-out); }
/* About のカードが飛んできたとき：写真は最初から出ている（飛んできたカードと入れ替わる） */
.profile-kv.-from-card .profile-kv__photo { clip-path: none; transition: none; }
.profile-kv.-from-card .profile-kv__photo img { transform: none; transition: none; }

/* 名前の板：いつも少し傾けておき、マウスに合わせてさらに傾く（--mx / --my は profile.js が入れる） */
.profile-kv__name {
  position: absolute; inset: 0; transform-style: preserve-3d; pointer-events: none;
  transform: rotateX(calc(18deg + var(--my, 0) * 1deg)) rotateY(calc(-14deg + var(--mx, 0) * 1deg)) rotateZ(-6deg);
}
.profile-kv__name .line { display: block; overflow: hidden; padding: .04em .06em; margin: -.04em -.06em; }
.profile-kv__name .line > span { display: inline-block; transform: translate3d(0, 105%, 0); }
.profile-kv.-show .profile-kv__name .line > span { transform: none; transition: transform 1.2s var(--e-quart-inout); }
.profile-kv.-show .profile-kv__ja .line:nth-child(2) > span { transition-delay: .1s; }
.profile-kv.-show .profile-kv__en .line:nth-child(1) > span { transition-delay: .25s; }
.profile-kv.-show .profile-kv__en .line:nth-child(2) > span { transition-delay: .35s; }

/* カタカナ：明朝で中を塗る（左上寄り）。英字：輪郭線だけ（右下寄り）。写真の上で重なる */
.profile-kv__ja {
  position: absolute; top: 150px; left: 2%; transform: translateZ(60px);
  font-family: "Shippori Mincho", serif; font-weight: 500; font-size: 7.5rem; line-height: 1.05; letter-spacing: .02em;
  color: var(--cream);
}
.profile-kv__en {
  position: absolute; top: 330px; right: 0; text-align: right; transform: translateZ(120px);
  font-family: var(--font-display); font-weight: 500; font-size: 10rem; line-height: .92; letter-spacing: -.02em;
  color: transparent; -webkit-text-stroke: 1px var(--cream);
}

/* =========================================================
   ② 肩書き
   ========================================================= */
.profile-role { margin-top: 60px; text-align: center; font-family: "Shippori Mincho", serif; font-weight: 400; font-size: 2.25rem; line-height: 1.6; }
.profile-role p[lang="en"] { font-family: var(--font-display); font-size: 2.75rem; line-height: 1.4; margin-top: .2em; }

/* =========================================================
   ③ 紹介文
   ========================================================= */
.profile-intro { width: 90%; max-width: 915px; margin: 200px auto 0; text-align: center; font-size: 1.625rem; line-height: 1.7; }
.profile-intro .lang-en { font-weight: 300; }

/* =========================================================
   ④ 年表（年＋出来事を中央そろえで縦に並べる）
   ========================================================= */
.profile-history__list, .profile-awards__list { width: 90%; max-width: 760px; margin: 0 auto; text-align: center; list-style: none; }
.profile-history__list li { margin-top: 72px; }
.profile-history__list li:first-child { margin-top: 0; }
.profile-history__list .year { display: block; font-family: var(--font-display); font-weight: 500; font-size: 3.5rem; line-height: 1; letter-spacing: -.01em; }
.profile-history__list .p-lang { margin-top: 18px; font-size: 1.25rem; line-height: 1.7; }

/* =========================================================
   ⑤ 資格（名前＋小さな添え書き）
   ========================================================= */
.profile-awards__list li { margin-top: 56px; }
.profile-awards__list li:first-child { margin-top: 0; }
.profile-awards__list li > .p-lang:first-child { font-size: 1.625rem; line-height: 1.5; }
.profile-awards__list .note { margin-top: 10px; font-size: .9375rem; letter-spacing: .06em; opacity: .7; }

/* =========================================================
   English ボタン・Back to Index
   ========================================================= */
.profile-btn-en { margin-top: 200px; }
.profile-back { margin-top: 100px; text-align: center; }
.profile-back a { position: relative; display: inline-block; padding-bottom: 24px; font-size: 1.1875rem; letter-spacing: 0; }
.profile-back .underbar { height: 24px; }
.profile-back a:hover .underbar::after { transform: translate3d(0, calc(-100% + 1px), 0); transition: transform .4s var(--e-expo-out); }

/* =========================================================
   スマホ（899 以下）：文字は画面幅の割合で
   ========================================================= */
@media (max-width: 899px) {
  .profile-inner { padding-bottom: 45.33vw; }
  .profile-kv { padding-top: 30vw; }
  .profile-kv__stage { width: 100%; height: 112vw; perspective: 900px; }
  .profile-kv__photo { top: 2vw; width: 54vw; margin-left: -27vw; }
  .profile-kv__ja { top: 23vw; left: 9vw; font-size: 11.2vw; }
  .profile-kv__en { top: 57vw; right: 8vw; font-size: 13.6vw; }

  .profile-role { margin-top: 0; font-size: 6.4vw; line-height: 1.55; }
  .profile-role p[lang="en"] { font-size: 8vw; }

  .profile-intro { width: auto; max-width: 82.67vw; margin-top: 21.33vw; font-size: 4.27vw; line-height: 1.75; }

  .profile-history__list, .profile-awards__list { width: auto; max-width: 82.67vw; }
  .profile-history__list li { margin-top: 12vw; }
  .profile-history__list .year { font-size: 10.67vw; }
  .profile-history__list .p-lang { margin-top: 3.2vw; font-size: 4vw; }

  .profile-awards__list li { margin-top: 10vw; }
  .profile-awards__list li > .p-lang:first-child { font-size: 5.33vw; }
  .profile-awards__list .note { margin-top: 2vw; font-size: 3.47vw; }

  .profile-btn-en { margin-top: 26.67vw; }
  .profile-back { margin-top: 16vw; }
  .profile-back a { font-size: 4.27vw; padding-bottom: 4.4vw; }
  .profile-back .underbar { height: 4.93vw; }
}
