/* 正式版样式调整：标题排版、研究方向可读性与多入口链接。 */
.hero-grid {
  grid-template-columns: minmax(0, 1.7fr) minmax(230px, .55fr);
  gap: 40px;
}

.hero h1 {
  font-size: clamp(32px, 3.1vw, 40px);
  letter-spacing: -.045em;
  white-space: nowrap;
}

.direction h3 {
  margin-bottom: 11px;
  font-size: 20px;
}

.direction p {
  font-size: 15px;
  line-height: 1.78;
}

.section-links,
.collaboration-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.section-links {
  justify-content: flex-end;
}

.collaboration {
  display: block;
}

.collaboration-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 25px;
}

.recruitment-details {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, .24);
}

.recruitment-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 16px;
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: 9px;
  background: rgba(255, 255, 255, .1);
  color: white;
  cursor: pointer;
  list-style: none;
  font-size: 14px;
  font-weight: 750;
}

.recruitment-details summary::-webkit-details-marker {
  display: none;
}

.recruitment-details summary small {
  color: #d1e2e9;
  font-size: 12px;
  font-weight: 650;
}

.recruitment-details summary small::after {
  content: " ＋";
}

.recruitment-details[open] summary small::after {
  content: " −";
}

.recruitment-panel {
  margin-top: 12px;
  padding: 22px 24px;
  border-radius: 10px;
  background: white;
  color: var(--ink);
}

.recruitment-panel > p:first-child {
  margin: 0 0 12px;
  color: #435966;
  font-size: 14px;
  line-height: 1.8;
}

.recruitment-panel ol {
  margin: 0;
  padding-left: 22px;
  color: #435966;
  font-size: 14px;
  line-height: 1.85;
}

.recruitment-panel li + li {
  margin-top: 4px;
}

.recruitment-contact {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 18px 0 0;
  padding-top: 15px;
  border-top: 1px solid var(--border);
  color: var(--ink) !important;
}

.recruitment-contact a {
  padding: 0;
  background: transparent;
  color: var(--brand);
  font-size: 14px;
}

.updates-details {
  margin-top: 16px;
}

.updates-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: white;
  color: var(--brand-dark);
  cursor: pointer;
  list-style: none;
  font-size: 14px;
  font-weight: 750;
}

.updates-details summary::-webkit-details-marker {
  display: none;
}

.updates-details summary small {
  color: var(--muted2);
  font-size: 12px;
  font-weight: 650;
}

.updates-details summary small::after {
  content: " ＋";
}

.updates-details[open] summary small::after {
  content: " −";
}

.updates-expanded {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.updates-expanded .news {
  background: #f8fafb;
}

@media (max-width: 1000px) {
  .hero h1 {
    white-space: normal;
  }
}

@media (max-width: 760px) {
  .direction h3 {
    font-size: 19px;
  }

  .direction p {
    font-size: 15px;
  }

  .section-links {
    justify-content: flex-start;
    gap: 8px 12px;
  }

  .collaboration-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .recruitment-panel {
    padding: 18px;
  }

  .updates-expanded {
    grid-template-columns: 1fr;
  }
}

.link-disabled {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--muted2);
  background: #f4f6f7;
  cursor: not-allowed;
}

.alt-section {
  background: #f1f6f8;
}

.resource-list {
  display: grid;
  gap: 12px;
}

.resource-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 18px;
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: white;
}

.resource-index {
  color: var(--brand);
  font-size: 13px;
  font-weight: 760;
  letter-spacing: .08em;
}

.resource-citation {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.85;
}

.resource-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 13px;
}

.resource-actions a {
  padding: 7px 11px;
  border: 1px solid #bfd0d8;
  border-radius: 7px;
  color: var(--brand-dark);
  background: var(--blue-soft);
  font-size: 12px;
  font-weight: 700;
}

.supervisor-card {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 30px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: white;
}

.supervisor-card > img {
  width: 190px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: 13px;
  background: var(--blue-soft);
  padding: 8px;
  box-sizing: border-box;
}

.supervisor-card h2 {
  margin: 0 0 14px;
  font-size: 27px;
}

.member-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}

.member-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: white;
}

.member-card > img {
  display: block;
  width: 100%;
  height: 250px;
  object-fit: contain;
  object-position: center;
  background: var(--blue-soft);
  padding: 12px;
  box-sizing: border-box;
}

.member-card-body {
  padding: 18px;
}

.member-card h3 {
  margin: 0 0 7px;
  font-size: 20px;
}

.member-destination {
  min-height: 24px;
  margin: 0 0 12px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 680;
}

.member-card details {
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.member-card summary {
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 720;
  cursor: pointer;
}

.profile-detail-list {
  margin: 12px 0 0;
  padding-left: 19px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

.profile-detail-list li + li {
  margin-top: 8px;
}

.profile-detail-list strong {
  display: block;
  color: var(--ink);
  font-weight: 720;
}

.profile-detail-list span {
  display: block;
}

.supervisor-details {
  margin-top: 0;
  font-size: 14px;
  line-height: 1.85;
}

@media (max-width: 1000px) {
  .member-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .resource-card {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 10px;
    padding: 18px 15px;
  }

  .supervisor-card {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
  }

  .supervisor-card > img {
    width: min(190px, 60vw);
  }

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

  .member-card > img {
    height: 300px;
  }
}

/* Cross-device hardening.
 * formal-overrides.css is loaded after style.css, so the responsive hero
 * layout must be restored here as well. These rules are integrated from the
 * mobile-fix reference instead of relying on a separate emergency stylesheet.
 */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

img,
svg {
  max-width: 100%;
}

@media (max-width: 1000px) {
  main#main .hero .shell.hero-grid,
  main .hero .shell.hero-grid,
  .hero .hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-auto-columns: minmax(0, 1fr);
    grid-auto-flow: row;
    gap: 22px;
    align-items: stretch;
  }

  main#main .hero .hero-grid > *,
  .hero .hero-grid > * {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .hero h1,
  .hero .hero-subtitle,
  .hero .lead {
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    writing-mode: horizontal-tb;
  }

  .hero h1 {
    word-break: keep-all;
    overflow-wrap: normal;
  }

  .hero .lead {
    overflow-wrap: break-word;
  }
}

@media (max-width: 760px) {
  .bar {
    gap: 8px;
  }

  .brand {
    flex: 1 1 auto;
    min-width: 0;
  }

  .brandtext {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .language-switch,
  .nav-toggle {
    flex: 0 0 auto;
  }

  .language-switch {
    margin-left: 0;
  }

  .nav-toggle {
    min-height: 40px;
    white-space: nowrap;
  }

  .hero-stat {
    width: 100%;
  }

  .hero-stat .stat-line {
    flex: 1 1 0;
    min-width: 0;
    padding-right: 8px;
    padding-left: 8px;
  }

  .hero-stat .stat-line span {
    overflow-wrap: anywhere;
  }

  .group-title {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .group-title::after {
    flex-basis: 100%;
  }

  .paper-footer,
  .result-info {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .tab,
  .resource-actions a,
  .pub-links a,
  .collaboration a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  .search-field,
  .field-select {
    min-height: 44px;
  }
}

@media (max-width: 560px) {
  .shell {
    width: min(calc(100% - 28px), var(--max));
  }

  .bar {
    gap: 6px;
  }

  .brandmark {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
  }

  .language-switch a {
    padding: 5px 6px;
  }

  .nav-toggle {
    padding-right: 8px;
    padding-left: 8px;
  }

  html[lang="en"] .brandtext {
    max-width: 120px;
    font-size: 11px;
    line-height: 1.15;
    white-space: normal;
  }

  body #main .hero h1 {
    font-size: clamp(30px, 8.5vw, 34px);
    line-height: 1.3;
  }

  .hero .hero-subtitle {
    font-size: 17px;
    line-height: 1.5;
  }

  .hero .lead {
    font-size: 14px;
    line-height: 1.85;
  }
}

@media (max-width: 480px) {
  .books {
    grid-template-columns: 1fr;
  }

  .profile-heading {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer .shell {
    flex-direction: column;
  }
}

@media (hover: none) {
  .paper:hover,
  .btn.primary:hover {
    transform: none;
  }
}
