/* ========================================
  Profile Page Specific Styles
======================================== */

/* Main Visual オーバーレイテキスト */
.main_visual__image {
  position: relative;
}

.main_visual__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.main_visual__title {
  font-size: clamp(48px, 8vw, 120px); /* indexページと同じサイズ */
  font-weight: 700;
  color: #58E1F3;
  text-align: center;
  letter-spacing: 0.1em;
  margin: 0;
  line-height: 1.2;
  position: relative;
  display: inline-block;
  padding: 20px 40px;
  background: rgba(20, 20, 20, 0.7); /* 文字の後ろに濃いグレー背景 */
  border-radius: 20px;
  backdrop-filter: blur(4px); /* ぼかし効果でさらに見やすく */
}

/* スクランブル中の文字スタイル */
.main-visual-scramble {
  opacity: 0.9;
}

/* === 553px以下：main_visualの文字を折り返さないように縮小 === */
@media (max-width: 553px){
  .main_visual__title {
    font-size: clamp(28px, 6.5vw, 48px) !important; /* 最小値を28pxに、最大値を48pxに調整（6.5vwでより小さく） */
    padding: 16px 24px !important; /* paddingも少し縮小 */
    letter-spacing: 0.05em !important; /* 文字間隔も少し詰める */
  }
}

/* === 430px以下（iPhone 16 Pro Maxなど）：さらに縮小 === */
@media (max-width: 430px){
  .main_visual__title {
    font-size: clamp(24px, 5.5vw, 36px) !important; /* iPhone 16 Pro Max用にさらに縮小 */
    padding: 12px 20px !important;
  }
}

/* ========================================
  Profile Content Section Styles
======================================== */

.profile-content {
  width: min(100%, 1100px);
  margin: clamp(60px, 10vw, 120px) auto;
  padding: 0 clamp(20px, 4vw, 40px);
}

.profile-content__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Row: 画像（左） + h3と最初のp（右） */
.profile-content__row {
  display: flex;
  flex-direction: row;
  gap: clamp(20px, 4vw, 40px);
  width: 100%;
  max-width: 1100px;
  margin: 0 0 clamp(30px, 5vw, 50px);
  align-items: stretch; /* 画像の高さに合わせて右側も伸ばす */
}

.profile-content__image-wrapper {
  flex: 0 0 auto;
  width: clamp(200px, 30vw, 400px);
  display: flex;
  justify-content: center;
}

.profile-content__image {
  width: 100%;
  height: auto;
  border-radius: 12px;
  object-fit: cover;
}

/* 右側コンテナ */
.profile-content__right {
  flex: 1;
  display: flex;
  flex-direction: column;
  /* 画像の高さに合わせて右側も伸びる（align-items: stretchにより） */
}

/* Profile Title Animation Styles */
.profile-title-animation {
  margin: 0 0 clamp(20px, 3vw, 30px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.profile-title-animation__phrase-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  position: relative;
  text-align: center;
}

.profile-title-animation__phrase {
  font-family: "Share Tech Mono", "Orbitron", "Noto Sans JP", sans-serif;
  font-size: clamp(28px, 4vw, 48px);
  letter-spacing: 0.05em;
  color: #58E1F3;
  line-height: 1.3;
  white-space: pre-wrap;
  display: inline-block;
  min-width: 0;
  padding: 20px 0;
  margin: 0;
  font-weight: 700;
  transition: color 0.3s ease, transform 0.3s ease;
}

.profile-title-animation__glyph {
  opacity: 0.9;
}

.profile-title-animation__caret {
  display: inline-block;
  width: 0.6ch;
  height: 1.2em;
  border-bottom: 2px solid #58E1F3;
  animation: profileTitleCaretBlink 1.1s steps(1) infinite;
  transform: translateY(0.18em);
}

@keyframes profileTitleCaretBlink {
  50% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .profile-title-animation__caret {
    animation: none !important;
  }
}

.profile-content__subtitle {
  margin: 0 0 clamp(15px, 2.5vw, 25px);
  font-size: clamp(20px, 2.8vw, 28px);
  font-weight: 700;
  color: #0F9403;
  text-align: left;
  letter-spacing: 0.05em;
  line-height: 1.4; /* 折り返しを防ぐために行間を調整 */
  transition: color 0.3s ease, transform 0.3s ease;
}

.profile-content__subtitle:hover {
  color: #58E1F3;
}

.profile-content__text-first {
  margin: 0 0 clamp(15px, 2.5vw, 25px);
  font-size: clamp(16px, 2.2vw, 20px);
  line-height: 1.9;
  color: #0F9403;
  text-align: left;
  transition: color 0.3s ease 0.05s, transform 0.3s ease 0.05s; /* 少し遅延させて波のように */
}

.profile-content__text-first:hover {
  color: #58E1F3;
}

.profile-content__text-second {
  margin: 0;
  font-size: clamp(16px, 2.2vw, 20px);
  line-height: 1.9;
  color: #0F9403;
  text-align: left;
  flex: 1; /* 残りのスペースを埋めて画像の高さに合わせる */
  transition: color 0.3s ease 0.1s, transform 0.3s ease 0.1s; /* 少し遅延させて波のように */
}

.profile-content__text-second:hover {
  color: #58E1F3;
}

.profile-content__text {
  width: 100%;
  max-width: 1100px; /* rowと同じ幅に統一 */
  display: flex;
  flex-direction: column;
}

.profile-content__text p {
  margin: 0 0 clamp(20px, 3vw, 30px);
  font-size: clamp(16px, 2.2vw, 20px);
  line-height: 1.9;
  color: #0F9403;
  text-align: left;
  transition: color 0.3s ease 0.15s, transform 0.3s ease 0.15s; /* さらに遅延させて波のように */
}

.profile-content__text p:hover {
  color: #58E1F3;
}

/* Profile Content hover effect (work_resultsと同じ効果) */
.profile-content:hover .profile-title-animation__phrase,
.profile-content__inner:hover .profile-title-animation__phrase {
  color: #58E1F3;
  transform: scale(1.03);
  transition-delay: 0s; /* タイトルは即座に */
}

.profile-content:hover .profile-content__subtitle,
.profile-content__inner:hover .profile-content__subtitle {
  color: #58E1F3;
  transform: scale(1.03);
  transition-delay: 0.05s; /* サブタイトルは少し遅れて */
}

.profile-content:hover .profile-content__text-first,
.profile-content__inner:hover .profile-content__text-first {
  color: #58E1F3;
  transform: scale(1.03);
  transition-delay: 0.1s; /* 最初のテキストはさらに遅れて */
}

.profile-content:hover .profile-content__text-second,
.profile-content__inner:hover .profile-content__text-second {
  color: #58E1F3;
  transform: scale(1.03);
  transition-delay: 0.15s; /* 2段落目はさらに遅れて */
}

.profile-content:hover .profile-content__text p,
.profile-content__inner:hover .profile-content__text p {
  color: #58E1F3;
  transform: scale(1.03);
  transition-delay: 0.2s; /* 残りの段落は最後に */
}

.profile-content__text p:last-child {
  margin-bottom: 0;
}

/* お問い合わせフォームの上部に広めのmargin */
.profile-content + .contact-form {
  margin-top: clamp(80px, 12vw, 150px) !important;
}

/* レスポンシブ: 小さい画面ではrowをcolumnに変更 */
@media (max-width: 768px) {
  .profile-content__row {
    flex-direction: column;
    align-items: center;
  }
  
  .profile-content__image-wrapper {
    width: 100%;
    max-width: 400px;
    margin-bottom: clamp(20px, 4vw, 30px);
  }
  
  .profile-content__right {
    width: 100%;
  }
  
  .profile-content__subtitle {
    text-align: center;
  }
  
  .profile-content__text-first {
    text-align: left;
  }
  
  .profile-content + .contact-form {
    margin-top: clamp(60px, 10vw, 120px) !important;
  }
}

