/* ============================================================
   members.html — メンバーページ専用スタイル
   ============================================================ */

.members-page {
  position: relative;
  padding-top: 80px;
  padding-bottom: 120px;
  background: #ffffff;
}

/* blob背景 */
.members-blob {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.members-blob--1 {
  width: 700px;
  height: 700px;
  background: rgba(250, 68, 0, 0.08);
  filter: blur(120px);
  top: -60px;
  right: -120px;
}

.members-blob--2 {
  width: 480px;
  height: 480px;
  background: rgba(255, 150, 60, 0.07);
  filter: blur(100px);
  top: 40%;
  left: -80px;
}

.members-page .container {
  position: relative;
  z-index: 1;
}

/* ============================================================
   セクション共通
   ============================================================ */
.members-section {
  margin-bottom: 96px;
}

.members-section__label {
  font-size: 11px;
  font-weight: 600;
  color: #bbb;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding-bottom: 16px;
  margin-bottom: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

/* ============================================================
   教員プロフィール（横並び詳細レイアウト）
   ============================================================ */
.member-profile {
  display: grid;
  grid-template-columns: 256px 1fr;
  gap: 80px;
  align-items: start;
  padding: 64px 0;
}

/* 左：テキスト */
.member-profile__left {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* 名前行：漢字 + 英語を横並び */
.member-profile__name-row {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}

.member-profile__name {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #111;
  line-height: 1.2;
  margin: 0;
}

.member-profile__name-link {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s;
}

.member-profile__name-link:hover {
  opacity: 0.7;
}

.member-profile__name-en {
  font-size: 16px;
  font-weight: 400;
  color: var(--accent);
  letter-spacing: 0.06em;
}

.member-profile__role-label {
  font-size: 16px;
  font-weight: 400;
  color: #111;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}

.member-profile__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.member-profile__tags span {
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  background: #ffffff;
  border: 1.5px solid var(--accent);
  padding: 4px 14px;
  border-radius: 9999px;
}

.member-profile__certs {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.member-profile__certs p {
  font-size: 16px;
  font-weight: 500;
  color: #111;
  line-height: 1.4;
  padding-left: 14px;
  position: relative;
}

.member-profile__certs p::before {
  content: '–';
  position: absolute;
  left: 0;
  color: #999;
}

.member-profile__links {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  margin-bottom: 32px;
}

.member-profile__link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-primary);
}

.member-profile__link::before {
  content: '■';
  font-size: 8px;
  color: var(--accent);
  flex-shrink: 0;
}

.member-profile__link a {
  color: var(--text-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s;
}

.member-profile__link a:hover {
  color: var(--accent);
}

.member-profile__link-btn {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 500;
  color: #111;
  border: 1px solid #111;
  border-radius: 9999px;
  padding: 4px 14px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.member-profile__link-btn:hover {
  background: #111;
  color: #fff;
}

/* 右：写真 */
.member-profile__right {
  position: sticky;
  top: 120px;
}

.member-profile__photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #f0f0f0;
}

.member-profile__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* ============================================================
   研究員・大学院生グリッド
   ============================================================ */
.members-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px 24px;
  padding-top: 48px;
}

.member-card {
  display: flex;
  flex-direction: column;
}

.member-card__img {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  margin-bottom: 16px;
  background: #ebebeb;
}

.member-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform 0.5s ease;
}

.member-card:hover .member-card__img img {
  transform: scale(1.04);
}

.member-card__info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.member-card__name {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: 0.03em;
  line-height: 1.3;
}

.member-card__name-en {
  font-size: 11px;
  font-weight: 400;
  color: var(--accent);
  letter-spacing: 0.08em;
}

.member-card__role {
  font-size: 12px;
  font-weight: 400;
  color: #999;
  margin-top: 2px;
}

/* ============================================================
   レスポンシブ
   ============================================================ */
@media (max-width: 900px) {
  .member-profile {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .member-profile__right {
    position: static;
    max-width: 280px;
  }

  .member-profile__name {
    font-size: 32px;
  }

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

/* ============================================================
   写真クリックトリガー
   ============================================================ */
.member-profile__photo--clickable {
  cursor: pointer;
  position: relative;
}

.member-profile__photo-hint {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  padding: 10px 0;
  opacity: 0;
  transition: opacity 0.25s;
}

.member-profile__photo--clickable:hover .member-profile__photo-hint {
  opacity: 1;
}

/* ============================================================
   モーダル
   ============================================================ */
.member-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.member-modal.is-open {
  display: flex;
}

.member-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  cursor: pointer;
}

.member-modal__panel {
  position: relative;
  z-index: 1;
  background: #fff;
  width: 90%;
  max-width: 1080px;
  height: 90vh;
  display: grid;
  grid-template-columns: 400px 1fr;
  grid-template-rows: 1fr;
  overflow: hidden;
}

.member-modal__close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  font-size: 28px;
  color: #333;
  cursor: pointer;
  z-index: 2;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}

.member-modal__close:hover {
  opacity: 0.6;
}

.member-modal__photo {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #f0f0f0;
}

.member-modal__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  display: block;
}

.member-modal__body {
  overflow-y: auto;
  height: 100%;
  padding: 48px 40px 48px 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  box-sizing: border-box;
}

.member-modal__header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.member-modal__name {
  font-size: 32px;
  font-weight: 600;
  color: #111;
  letter-spacing: 0.06em;
  margin: 0;
}

.member-modal__name-en {
  font-size: 16px;
  font-weight: 400;
  color: var(--accent);
  letter-spacing: 0.06em;
}

.member-modal__role {
  font-size: 15px;
  color: #555;
  margin-top: 4px;
}

.member-modal__profile-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #f9f9f9;
  padding: 16px 20px;
  border-left: 3px solid var(--accent);
}

.member-modal__profile-box p {
  font-size: 13px;
  color: #444;
  line-height: 1.7;
  display: flex;
  gap: 16px;
}

.member-modal__profile-box span {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.1em;
  white-space: nowrap;
  padding-top: 2px;
}

.member-modal__qa {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.member-modal__q {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.member-modal__q-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.12em;
  margin: 0;
}

.member-modal__q-title {
  font-size: 16px;
  font-weight: 700;
  color: #111;
  margin: 0;
  line-height: 1.5;
}

.member-modal__q-body {
  font-size: 14px;
  color: #444;
  line-height: 1.8;
  margin: 0;
}

.member-modal__q-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.member-modal__q-list li {
  font-size: 14px;
  color: #444;
  line-height: 1.7;
  padding-left: 14px;
  position: relative;
}

.member-modal__q-list li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--accent);
}

.member-modal__q-catchcopy {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  margin: 8px 0 0;
}

@media (max-width: 700px) {
  .member-modal__panel {
    grid-template-columns: 1fr;
    max-height: 95vh;
  }

  .member-modal__photo {
    height: 240px;
  }
}

@media (max-width: 480px) {
  .members-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px 16px;
  }
}
