/* ベーススタイル */
* {
  margin:0;
  padding: 0;
  box-sizing: border-box;
  
}

body {
  margin-top: 0; /* グローバルの --header-height + luxury-band に委譲 */
  background-color: #f5f7fa;
}

/* 非トップページ（greeting.html）: ヘッダー高さを流動的に保つ */
header {
  padding: 1.5vh 0 !important; /* %管理で自動調整 */
  min-height: 9vh !important;
}
header .container { padding: 0 20px !important; }

/* スマートフォン（480px以下）：固定ヘッダー分の二重オフセットを解消 */
@media (max-width: 480px) {
  body { margin-top: 0; }
}



/* プロフィールセクション */
.profile {
  background-color: rgba(255, 255, 255);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    max-width: var(--content-max);
    margin: 0 auto;
    margin-top:50px;
    padding: var(--section-pad-y) var(--section-pad-x);
}

.profile-header {
  text-align: center;
  margin-left:0;
  margin-bottom: 20px;
  position: relative;
}

.profile-header h2 {
  font-size: var(--fs-h2);
  color: #1438c8;
  margin-bottom: 5px;
}

.profile-header h3 {
  font-size: var(--fs-h3);
  color: #333;
}

/* プロフィール内容 */
.profile-content {
  margin-left:0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 40px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.profile-image-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.profile-image {
  margin-top: 25px;
  border-radius: 50%;
  width: 300px;
  height: 300px;
  object-fit: cover;
  border: 5px solid rgba(5, 22, 154, 0.69);
  overflow: hidden;
  transform: scale(1);
}

.profile-image img {
  width: 100%;
  transform: scale(2.2);
  transform-origin:60% 50%;
  filter: contrast(120%);
  filter: brightness(120%);
}


.profile-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.profile-details p {
  display: flex;           /* 追加：flexで横並びに */
  align-items: center;     /* 追加：縦中央寄せ */
  position: relative;
  font-size: var(--fs-body);
  margin: 0;
  padding: 12px 16px;
  padding-left: 1.5em;
  border-left: 3px solid #0077cc;
  background-color: rgba(0, 119, 204, 0.05);
  border-radius: 6px;
  line-height: 1.6;
}

.profile-details p::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  background-color: #0077cc;
  border-radius: 50%;
  z-index: 1;
}

.profile-details strong {
  color: #1438c8;
  font-weight: bold;
  display: inline-block;
  min-width: 5em;         /* 最小は従来相当を確保 */
  width: fit-content(40%);/* 内容に応じて広がる（最大40%まで） */
  max-width: 40%;
  flex-shrink: 0;         /* ラベル自体は縮ませず、フォントで調整 */
  margin-right: 12px;     /* テキストとの間に余白 */
  white-space: nowrap;    /* ラベルは改行しない */
  overflow: visible;      /* 見切れ防止 */
  text-overflow: clip;    /* 省略記号は使わない */
  font-size: clamp(0.95rem, 1.2vw, 1.05rem); /* 画面に応じて微縮小 */
}

/* strongラベルのコロンはCSSで生成し、狭幅では消す */
.profile-details strong::after {
  content: "：";
  margin-left: 0.1em;
}




/* 代表挨拶 */
.greeting {
    background-color:rgb(60, 60, 60);
    color: #fff;
  padding: var(--section-pad-y) var(--section-pad-x);
    border-radius: 8px;
    background-image: 
        linear-gradient(45deg, rgba(255,255,255,0.05) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(255,255,255,0.05) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(255,255,255,0.05) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(255,255,255,0.05) 75%);
    background-size: 40px 40px;
    background-attachment: fixed;
}

.greeting h4 {
  font-size: var(--fs-h4);
  margin-bottom: 10px;
}

.greeting p {
  font-size: var(--fs-body);
  line-height: 1.8;
}

[data-section] {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.6s ease-out;
}

[data-section].visible {
  opacity: 1;
  transform: translateY(0);
}

.profile-header .roman-name {
  font-size: 0.9rem;
  color: #666;
  letter-spacing: 0.08em;
  margin-top: 4px;
  font-family: 'Roboto Serif', 'Noto Serif JP', serif;
  text-transform: uppercase;
  opacity: 0.8;
}

.profile-header-badge {
  position: absolute;
  right: 0;
  top: 0;
  width:100px;
  height: auto;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.profile-header-badge-wrapper {
  margin-top: 0.2rem;
  position: static;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  z-index: 10;
}

.profile-header-badge-wrapper .profile-header-badge {
  position: static;
  width: 40px;
  height: 40px;
  object-fit: contain;
  opacity: 0.75;
  transition: opacity 0.3s ease;
}

.profile-header-badge-wrapper .profile-header-badge:hover {
  opacity: 1;
}

.badge-text {
  font-size: 1.2rem;
  color: #555;
  margin: 0;
  font-weight: 700;
  text-align: left;
  letter-spacing: 0.05em;
  white-space: nowrap;
  line-height: 1;
}

/* ========================================
   レスポンシブ対応
   ======================================== */

/* タブレット（768px以下） */
@media (max-width: 768px) {
  body {
    margin-top: 0;
    background-color: #f9fafb;
  }

  .profile {
    max-width: 95%;
    margin: 30px auto;
    padding: 30px 20px;
    border-radius: 12px;
  }

  .profile-header h2 {
    font-size: 1.6rem;
  }

  .profile-header h3 {
    font-size: 1.3rem;
  }

  .profile-header .roman-name {
    font-size: 0.8rem;
  }

  .profile-content {
    gap: 20px;
    flex-direction: column;
    align-items: center;
  }

  .profile-image-wrapper {
    gap: 10px;
  }

  .profile-image {
    width: 250px;
    height: 250px;
    margin-top: 15px;
  }

  .profile-details {
    gap: 10px;
    width: 100%;
  }

  .profile-details p {
    font-size: 0.95rem;
    padding: 10px 12px;
    padding-left: 1.2em;
  }

  .profile-details strong {
    min-width: 4.5em;         /* 幅は最小値のみ調整 */
    width: fit-content(45%);
    max-width: 45%;
    margin-right: 10px;
  }

  .profile-header-badge-wrapper {
    gap: 8px;
  }

  .profile-header-badge-wrapper .profile-header-badge {
    width: 35px;
    height: 35px;
  }

  .badge-text {
    font-size: 1rem;
    white-space: normal;
  }

  .greeting {
    padding: 40px 20px;
    margin-top: 20px;
  }

  .greeting h4 {
    font-size: 1.1rem;
    margin-bottom: 12px;
  }

  .greeting p {
    font-size: 0.95rem;
    line-height: 1.7;
  }
}

/* スマートフォン（480px以下） */
@media (max-width: 480px) {
  .profile {
    max-width: 100%;
    margin: 20px auto;
    padding: 20px 15px;
    border-radius: 8px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.08);
  }

  .profile-header {
    margin-bottom: 15px;
  }

  .profile-header h2 {
    font-size: 1.4rem;
    margin-bottom: 3px;
  }

  .profile-header h3 {
    font-size: 1.1rem;
  }

  .profile-header .roman-name {
    font-size: 0.75rem;
    margin-top: 2px;
  }

  .profile-content {
    gap: 15px;
    flex-direction: column;
    align-items: center;
    margin-bottom: 15px;
  }

  .profile-image-wrapper {
    gap: 8px;
  }

  .profile-image {
    width: 200px;
    height: 200px;
    border: 4px solid rgba(5, 22, 154, 0.69);
    margin-top: 10px;
  }

  .profile-image img {
    transform: scale(2);
  }

  .profile-details {
    gap: 8px;
    width: 100%;
  }

  .profile-details p {
    font-size: 0.9rem;
    padding: 10px 12px;
    padding-left: 1.2em;
    border-left: 2px solid #0077cc;
    line-height: 1.5;
  }

  .profile-details p::before {
    width: 6px;
    height: 6px;
    left: 6px;
  }

  .profile-details strong {
    font-size: clamp(0.9rem, 2.5vw, 1rem); /* モバイルで更に柔軟に */
    min-width: 4em;
    width: fit-content(55%);
    max-width: 55%;
    margin-right: 8px;
  }

  .profile-header-badge-wrapper {
    flex-direction: column;
    gap: 6px;
  }

  .profile-header-badge-wrapper .profile-header-badge {
    width: 32px;
    height: 32px;
  }

  .badge-text {
    font-size: 0.85rem;
    text-align: center;
    white-space: normal;
    color: #666;
  }

  .greeting {
    padding: 30px 15px;
    margin-top: 15px;
    border-radius: 8px;
    background-size: 30px 30px;
  }

  .greeting h4 {
    font-size: 1rem;
    margin-bottom: 10px;
  }

  .greeting p {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
  }

  .greeting p:last-child {
    margin-bottom: 0;
  }

  [data-section] {
    transform: translateY(30px);
  }
}

/* 狭幅帯で箇条書きドットを非表示（タイトルとの重なり防止） */
@media (max-width: 640px) {
  .profile-details p::before {
    content: none !important;
  }
  .profile-details p {
    padding-left: 0.9em; /* ドット分の余白を詰める */
  }
}

/* 狭幅帯（640px以下）ではコロンを非表示にし、見出しの重なりを防止 */
@media (max-width: 640px) {
  .profile-details strong::after { content: none; }
}

/* 超小型デバイス（320px以下） */
@media (max-width: 320px) {
  .profile {
    padding: 15px 12px;
  }

  .profile-header h2 {
    font-size: 1.2rem;
  }

  .profile-header h3 {
    font-size: 1rem;
  }

  .profile-image {
    width: 160px;
    height: 160px;
  }

  .profile-details p {
    font-size: 0.85rem;
    padding: 8px 10px;
  }

  .profile-details strong {
    min-width: 3.75em;
    width: fit-content(60%);
    max-width: 60%;
  }

  .profile-details strong {
    width: 3.5em;
    font-size: 0.85rem;
  }

  .greeting h4 {
    font-size: 0.95rem;
  }

  .greeting p {
    font-size: 0.85rem;
  }
}

/* ==============================
   追加のフレキシブル調整
   - 文字サイズを画面に追従
   - 専門分野/モットーの改行抑止
   - greeting幅の統一
   ============================== */
/* 見出しと本文のスケールを抑制 */
.greeting h4 { font-size: clamp(1.05rem, 1.2vw, var(--fs-h4)); }
.greeting p  { font-size: clamp(0.95rem, 1.1vw, var(--fs-body)); }

/* 行項目（出身/学歴/経歴/専門分野/モットー）も過拡大を抑制 */
.profile-details p { font-size: clamp(0.95rem, 1.05vw, var(--fs-body)); }

/* 専門分野・モットーはフレキシブルに改行を許可（読みやすさ優先） */
.profile-details p:nth-child(4),
.profile-details p:nth-child(5) {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
  font-size: clamp(0.9rem, 1.0vw, 1.05rem);
}

/* greeting セクションの横幅を本文と揃えて見切れを防止 */
.greeting { max-width: var(--content-max); margin: 0 auto; }
