/* ================================
   Our Team — refined light design
   ================================ */
.team-page {
  position: relative;
  overflow: hidden;
  background: #f7f5f1;
  color: #2f3436;
}

/* ---------- hero ---------- */
.team-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  height: 300px;
  padding: 54px 24px 50px;
  text-align: center;
  background:
    radial-gradient(circle at 18% 30%, rgba(220, 188, 158, .42) 0, rgba(220, 188, 158, .18) 18%, transparent 38%),
    radial-gradient(circle at 84% 18%, rgba(168, 194, 201, .50) 0, rgba(168, 194, 201, .18) 22%, transparent 42%),
    linear-gradient(135deg, #edf3f4 0%, #f3eee8 55%, #e7eff1 100%);
  color: #40545a;
}

.team-hero::before,
.team-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 50%;
  pointer-events: none;
}

.team-hero::before {
  width: 230px;
  height: 230px;
  left: -74px;
  top: -118px;
}

.team-hero::after {
  width: 170px;
  height: 170px;
  right: -42px;
  bottom: -95px;
}

.team-kicker {
  margin: 0 0 8px;
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-size: 34px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: .13em;
  color: #8b7264;
}

.team-title {
  position: relative;
  display: inline-block;
  margin: 0;
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-size: clamp(48px, 5.5vw, 72px);
  line-height: 1;
  font-weight: 400;
  letter-spacing: .035em;
}

.team-title::after {
  content: "";
  display: block;
  width: 54px;
  height: 2px;
  margin: 18px auto 0;
  background: #b79884;
  border-radius: 999px;
}

/* ---------- main wrap ---------- */
.team-wrap {
  width: min(calc(100% - 120px), 1020px);
  margin-inline: auto;
  padding: 42px 0 76px;
}

.member-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 72px;
  row-gap: 30px;
  align-items: start;
}

.member-card {
  position: relative;
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  min-width: 0;
  padding: 16px 12px 20px 0;
  border-bottom: 1px solid rgba(76, 94, 98, .15);
  transition: transform .25s ease, border-color .25s ease;
}

.member-card::after {
  content: "";
  position: absolute;
  left: 160px;
  bottom: -1px;
  width: 0;
  height: 1px;
  background: #b78f78;
  transition: width .28s ease;
}

.member-card:hover {
  transform: translateY(-2px);
  border-color: rgba(76, 94, 98, .08);
}

.member-card:hover::after {
  width: 72px;
}

.member-photo {
  width: 140px;
  height: 150px;
  object-fit: cover;
  border-radius: 10px 10px 10px 2px;
  background: #ebe8e2;
  box-shadow: 0 7px 20px rgba(63, 77, 81, .10);
  outline: 1px solid rgba(255,255,255,.76);
  outline-offset: -4px;
}

/* 村松さん：顔が切れないよう、写真の上側を優先して表示 */
.member-photo--muramatsu {
  object-position: center 25%;
}

.member-role {
  margin: 2px 0 4px;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: .07em;
  color: #8a7569;
}

.member-name {
  margin: 0 0 7px;
  font-size: 26px;
  line-height: 1.14;
  font-weight: 700;
  color: #344449;
}

.member-name--latin {
  font-size: 22px;
  line-height: 1.2;
}

.member-profile {
  margin: 0;
  font-size: 15px;
  line-height: 1.75;
  color: #5d6263;
}

.profile-link {
  display: inline-flex;
  align-items: center;
  margin: 1px 0 9px;
  line-height: 0;
  transition: transform .2s ease, opacity .2s ease;
}

/* researchmap logo */
.profile-link:not(.profile-link--scholar) {
  width: 108px;
}

/* Google Scholar logo: original is visually much slimmer, so it is shown a little wider */
.profile-link--scholar {
  width: 132px;
  min-height: 24px;
}

.profile-link img {
  height: auto;
}

.profile-link:hover,
.profile-link:focus-visible {
  transform: translateY(-2px);
  opacity: .78;
}

.profile-link:focus-visible {
  outline: 2px solid #8a7569;
  outline-offset: 3px;
}

/* ---------- lower sections ---------- */
.team-lower {
  position: relative;
  margin-top: 64px;
  padding-top: 8px;
}

.team-lower::before {
  content: "";
  display: block;
  width: 100%;
  height: 1px;
  margin-bottom: 36px;
  background: linear-gradient(90deg, transparent, rgba(75, 94, 99, .28), transparent);
}

.team-subsection {
  position: relative;
  margin-top: 40px;
  padding: 26px 30px 28px;
  border: 1px solid rgba(78, 96, 100, .10);
  border-radius: 16px;
  background: rgba(255,255,255,.42);
  box-shadow: 0 10px 30px rgba(70, 82, 86, .045);
}

.team-subsection::before {
  content: "";
  position: absolute;
  top: 0;
  left: 30px;
  width: 46px;
  height: 3px;
  background: #a9c0c5;
  border-radius: 0 0 999px 999px;
}

.team-subsection-title {
  margin: 0 0 18px;
  font-size: 23px;
  font-weight: 700;
  letter-spacing: .01em;
  color: #40545a;
}

.team-text {
  font-size: 15px;
  line-height: 1.8;
  color: #535b5d;
}

.team-text p {
  margin: 0 0 16px;
}

.team-text strong {
  display: inline-block;
  margin-bottom: 3px;
  font-size: 16px;
  color: #80695d;
}

.former-year {
  display: inline-block;
  margin: 22px 0 6px;
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(183, 143, 120, .35);
  font-size: 16px;
  color: #40545a;
}

.team-site-footer {
  background: #dce8eb;
  color: #202a2d;
}

/* ---------- back to top ---------- */
.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 50%;
  background: #40545a;
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(63, 77, 81, .22);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .3s ease, visibility .3s ease, transform .3s ease, background .2s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: #8a7569;
}

.back-to-top:focus-visible {
  outline: 2px solid #8a7569;
  outline-offset: 3px;
}

@media (max-width: 640px) {
  .back-to-top {
    right: 16px;
    bottom: 16px;
    width: 44px;
    height: 44px;
    font-size: 18px;
  }
}

/* Tablet */
@media (max-width: 900px) {
  .team-wrap {
    width: min(calc(100% - 72px), 760px);
  }

  .member-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

/* Mobile */
@media (max-width: 640px) {
  .team-hero {
    padding: 42px 18px 38px;
  }

  .team-kicker {
    font-size: 27px;
    letter-spacing: .12em;
  }

  .team-title {
    font-size: 48px;
  }

  .team-wrap {
    width: calc(100% - 40px);
    padding: 30px 0 58px;
  }

  .member-grid {
    gap: 16px;
  }

  .member-card {
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 13px;
    padding: 12px 0 14px;
  }

  .member-card::after {
    left: 117px;
  }

  .member-photo {
    width: 104px;
    height: 112px;
    border-radius: 9px 9px 9px 2px;
  }

  .member-name {
    font-size: 22px;
  }

  .member-name--latin {
    font-size: 19px;
  }

  .member-profile {
    font-size: 14px;
    line-height: 1.7;
  }

  .profile-link:not(.profile-link--scholar) {
    width: 100px;
  }

  .profile-link--scholar {
    width: 120px;
    min-height: 22px;
  }

  .team-lower {
    margin-top: 48px;
  }

  .team-subsection {
    padding: 24px 20px;
    border-radius: 13px;
  }

  .team-subsection::before {
    left: 20px;
  }

  .team-subsection-title {
    font-size: 21px;
  }

  .team-text {
    font-size: 14px;
  }
}
