/* ========================================
   Materials Modeling Group
   Black / White / Gray / Vermillion / Dark Yellow-Green
   ======================================== */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Noto+Sans+JP:wght@300;400;500;600;700&display=swap');

/* Reset & Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background-color: #e8e8e8;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: 'Noto Sans JP', 'Inter', sans-serif;
  line-height: 1.8;
  color: #333;
  background-color: #fff;
  min-height: 100vh;
  font-weight: 400;
  max-width: 1600px;
  margin: 0 auto;
  box-shadow: 0 0 20px rgba(0,0,0,0.08);
  overflow-x: hidden;
}

a {
  color: #c83c2d;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #a02e22;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
}

/* ========================================
   Top Navbar
   ======================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1600px;
  z-index: 1000;
  background-color: #fff;
  transition: box-shadow 0.4s ease;
  height: 80px;
}

.navbar.scrolled {
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.1);
}

.navbar-inner {
  width: 85%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: #1a1a1a;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.navbar-brand:hover {
  color: #1a1a1a;
}

.navbar-logos {
  display: flex;
  align-items: center;
  gap: 0;
}

.navbar-logos img {
  height: 60px;
  width: auto;
  /* NIMS logo guideline: 保護エリア = 短辺(height) x 20% = 12px min */
  padding: 12px;
}

.navbar-logos img:last-child {
  height: 72px;
  padding: 12px;
}

.navbar-brand-text {
  white-space: nowrap;
}

.navbar-brand-text span {
  color: #c83c2d;
  font-weight: 700;
}

.group-short {
  display: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav-links a {
  color: #555;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
  transition: color 0.3s ease;
  letter-spacing: 0.04em;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background-color: #c83c2d;
  transition: width 0.3s ease;
}

.nav-links a:hover {
  color: #c83c2d;
  text-decoration: none;
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links a.active {
  color: #c83c2d;
}

.nav-links a.active::after {
  width: 100%;
}

/* Language Switcher */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 500;
  margin-left: 1.5rem;
  white-space: nowrap;
}

.lang-switcher a {
  color: #999;
  text-decoration: none;
  transition: color 0.3s ease;
}

.lang-switcher a:hover {
  color: #c83c2d;
}

.lang-active {
  color: #c83c2d;
  font-weight: 600;
}

.lang-separator {
  color: #ccc;
}

/* Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 28px;
  height: 28px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 1.5px;
  background-color: #1a1a1a;
  transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
  width: 100%;
  margin-top: 80px;
  position: relative;
}

.hero-image {
  width: 100%;
  position: relative;
  height: 75vh;
  max-height: 650px;
  min-height: 420px;
  background-color: #e0e0e0;
  overflow: hidden;
}

.hero-image > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.55) 0%,
    rgba(0, 0, 0, 0.25) 40%,
    rgba(0, 0, 0, 0.05) 70%,
    transparent 100%
  );
  pointer-events: none;
  padding: 4rem 5rem 11rem;
}

.hero-title {
  color: #fff;
  font-family: 'Inter', 'Noto Sans JP', sans-serif;
  font-size: 3.5rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.3);
  margin-bottom: 1.25rem;
}

.hero-title .accent {
  color: #c83c2d;
}

.hero-catchphrase {
  border-left: 3px solid rgba(255, 255, 255, 0.6);
  padding-left: 1.5rem;
}

.hero-catchphrase p {
  color: rgba(255, 255, 255, 0.95);
  font-size: 1.1rem;
  font-weight: 400;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.25);
  line-height: 1.8;
  letter-spacing: 0.04em;
}

/* Hero wave — overlaps onto the hero */
.hero .wave-divider {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  z-index: 2;
  line-height: 0;
}

/* ========================================
   Container
   ======================================== */
.container {
  width: 90%;
  max-width: 1300px;
  margin: 0 auto;
}

/* ========================================
   Sections
   ======================================== */
.section {
  padding: 1.5rem 0 14rem;
  position: relative;
  overflow: hidden;
}

.section-alt {
  background-color: #f0f0f0;
}

.section-accent {
  background-color: #c83c2d;
}

.section-accent .section-header h2 {
  color: #fff;
}

.section-accent .section-header h2::after {
  background-color: #fff;
}

.section-accent .more-link {
  color: rgba(255,255,255,0.85);
}

.section-accent .more-link:hover {
  color: #fff;
}

.section-white {
  background-color: #fff;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2.5rem;
}

.section-header h2 {
  color: #1a1a1a;
  font-size: 1.6rem;
  font-weight: 600;
  position: relative;
  padding-bottom: 0.75rem;
  letter-spacing: 0.03em;
}

.section-header h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 32px;
  height: 3px;
  background-color: #c83c2d;
}

.more-link {
  color: #c83c2d;
  font-size: 0.85rem;
  font-weight: 500;
  transition: opacity 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  letter-spacing: 0.02em;
}

.more-link:hover {
  opacity: 0.7;
}

/* ========================================
   Wave Dividers — large dramatic curves
   ======================================== */
.wave-divider {
  position: relative;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  background-color: transparent;
}

.wave-divider svg {
  display: block;
  width: 100%;
  height: 220px;
}

.wave-divider.wave-alt svg path {
  fill: #f0f0f0;
}

.wave-divider.wave-white svg path {
  fill: #fff;
}

/* Section bottom waves */
.section .wave-divider-bottom {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  z-index: 2;
  line-height: 0;
}

.section .wave-divider-bottom svg {
  display: block;
  width: 100%;
  height: 220px;
}

/* Footer top wave */
.footer-wave {
  position: relative;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  margin-bottom: -1px;
  background-color: #fff;
}

.footer-wave svg {
  display: block;
  width: 100%;
  height: 220px;
}

.footer-wave svg path {
  fill: #c83c2d;
}

/* ========================================
   Intro Section
   ======================================== */
.intro-section {
  max-width: min(860px, 100%);
  margin: 0 auto;
}

.intro-keywords {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 3rem;
}

.keyword-card {
  background-color: #fff;
  border-radius: 4px;
  padding: 2rem 1rem;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  border: 1px solid #e0e0e0;
}

.section-alt .keyword-card {
  background-color: #fff;
}

.section-white .keyword-card {
  background-color: #f0f0f0;
  border-color: transparent;
}

.keyword-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

.keyword-icon {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
  display: block;
  color: #4a7a2e;
}

.keyword-card h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1a1a1a;
  letter-spacing: 0.04em;
}

.intro-heading {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.intro-text {
  line-height: 2;
  text-align: left;
}

.intro-text p {
  margin-bottom: 1.5rem;
  color: #555;
  font-size: 0.78rem;
}

.intro-text p:last-child {
  margin-bottom: 0;
}

/* ========================================
   News - Timeline Style
   ======================================== */
.news-timeline {
  padding-left: 0.5rem;
}

.news-timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  padding: 1rem 0;
  border-bottom: 1px solid #ddd;
  position: relative;
  padding-left: 1.5rem;
  transition: background-color 0.3s ease;
}

.news-timeline-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background-color: #c83c2d;
  border-radius: 50%;
}

.news-timeline-item:last-child {
  border-bottom: none;
}

.news-timeline-item:hover {
  background-color: #f5f5f5;
}

.news-timeline-item .date {
  color: #999;
  font-size: 0.78rem;
  min-width: 100px;
  font-weight: 400;
}

.news-timeline-item .news-title {
  color: #333;
  font-size: 0.78rem;
  line-height: 1.7;
}

.news-timeline-item:hover .news-title {
  color: #c83c2d;
}

/* ========================================
   Top Page Members - square photos, cards
   ======================================== */
.top-member-leader {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

.top-member-leader .top-member-card {
  width: calc(100% / 3 - 1.34rem);
}

.top-member-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.top-member-grid:last-child {
  margin-bottom: 0;
}

.top-member-card {
  background-color: #fff;
  border-radius: 4px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.25rem 1rem 1rem;
  text-align: center;
  border: 1px solid #e0e0e0;
}

.section-alt .top-member-card {
  background-color: #fff;
}

.top-member-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.1);
}

.top-member-photo {
  width: 120px;
  height: 160px;
  border-radius: 4px;
  object-fit: cover;
  object-position: top;
  display: block;
  border: 2px solid #e0e0e0;
  margin-bottom: 0.75rem;
  transition: border-color 0.4s ease;
}

.top-member-card:hover .top-member-photo {
  border-color: #4a7a2e;
}

.top-member-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  width: 100%;
}

.top-member-name {
  font-size: 1rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 0.1rem;
}

.top-member-title {
  font-size: 0.75rem;
  color: #999;
  margin-bottom: 0.5rem;
  font-weight: 400;
  letter-spacing: 0.03em;
}

.top-member-email {
  font-size: 0.72rem;
  color: #888;
  margin-bottom: 0.5rem;
}

.top-member-research {
  font-size: 0.78rem;
  color: #555;
  line-height: 1.6;
  margin-bottom: 0.75rem;
  flex: 1;
}

.top-member-buttons {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.personal-page-btn {
  display: inline-block;
  background-color: transparent;
  color: #4a7a2e;
  padding: 0.35rem 1.2rem;
  border-radius: 2px;
  font-size: 0.75rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 1px solid #4a7a2e;
}

.personal-page-btn:hover {
  background-color: #4a7a2e;
  color: #fff;
  text-decoration: none;
}

/* ========================================
   Page Header (subpages)
   ======================================== */
.page-header {
  padding-top: calc(80px + 3.5rem);
  padding-bottom: 2.5rem;
}

.page-header h1 {
  color: #1a1a1a;
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  position: relative;
  padding-bottom: 0.75rem;
  letter-spacing: 0.03em;
}

.page-header h1::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background-color: #c83c2d;
}

.page-header p {
  color: #888;
  font-size: 0.9rem;
  margin-top: 0.75rem;
  font-weight: 400;
}

/* ========================================
   News List (news.html)
   ======================================== */
.news-year-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid #e0e0e0;
  flex-wrap: wrap;
}

.news-year-tab {
  padding: 0.6rem 1.4rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #888;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.2s, border-color 0.2s;
}

.news-year-tab:hover {
  color: #333;
}

.news-year-tab.active {
  color: #c83c2d;
  border-bottom-color: #c83c2d;
  font-weight: 600;
}

.news-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.news-card {
  background-color: #fff;
  border-radius: 4px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  padding: 1.75rem 2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #e0e0e0;
}

.news-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

.news-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.news-card h2 {
  color: #1a1a1a;
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0.5rem 0;
  line-height: 1.6;
}

.category {
  display: inline-block;
  background-color: #c83c2d;
  color: white;
  padding: 0.2rem 0.85rem;
  border-radius: 2px;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.03em;
}

.date {
  color: #999;
  font-size: 0.78rem;
  font-weight: 400;
}

.preview {
  color: #666;
  font-size: 0.78rem;
  line-height: 1.7;
  margin-top: 0.5rem;
}

/* ========================================
   Members Page (members.html)
   ======================================== */
.member-section {
  margin-bottom: 3rem;
}

.member-section-title {
  color: #1a1a1a;
  font-size: 1.05rem;
  font-weight: 600;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid #ddd;
  margin-bottom: 1.5rem;
  position: relative;
  letter-spacing: 0.03em;
}

.member-section-title::before {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 28px;
  height: 3px;
  background-color: #c83c2d;
}

.member-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.member-entry {
  display: flex;
  gap: 2rem;
  padding: 1.75rem;
  background-color: transparent;
  border-radius: 4px;
  border: none;
  box-shadow: none;
}

.member-entry:hover {
  box-shadow: none;
}

.member-photo {
  width: 120px;
  height: 160px;
  object-fit: cover;
  object-position: top;
  border-radius: 4px;
  flex-shrink: 0;
  transition: transform 0.4s ease;
}

.member-entry:hover .member-photo {
  transform: scale(1.02);
}

.member-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.member-name {
  color: #1a1a1a;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.1rem;
}

.member-photo-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.member-photo-area .email {
  font-size: 0.68rem;
  color: #888;
  text-align: center;
  margin-top: 0.4rem;
  word-break: break-all;
  line-height: 1.3;
}

.member-photo-area .email::before {
  content: '';
  display: inline-block;
  width: 0.72rem;
  height: 0.72rem;
  margin-right: 0.2rem;
  vertical-align: middle;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Crect x='2' y='4' width='20' height='16' rx='2'/%3E%3Cpath d='M22 4L12 13 2 4'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

.member-info .samurai-btn {
  display: inline-block;
  background-color: transparent;
  color: #4a7a2e;
  padding: 0.3rem 1.2rem;
  border-radius: 2px;
  font-size: 0.75rem;
  font-weight: 500;
  text-decoration: none;
  margin-bottom: 0.75rem;
  margin-right: 0.5rem;
  transition: all 0.3s ease;
  border: 1px solid #4a7a2e;
}

.member-info .samurai-btn:hover {
  background-color: #4a7a2e;
  color: #fff;
  text-decoration: none;
}

.member-info .personal-page-btn {
  margin-bottom: 0.75rem;
}

.member-info .research-title {
  color: #333;
  font-size: 0.78rem;
  font-weight: 500;
  margin-bottom: 0;
  line-height: 1.4;
}

.member-info .keywords {
  color: #999;
  font-size: 0.78rem;
  line-height: 1.4;
}


.member-additional-roles {
  font-size: 0.78rem;
  color: #888;
  font-weight: 400;
  margin-bottom: 0.6rem;
  line-height: 1.4;
}

.member-additional-roles:empty {
  display: none;
}

.member-buttons {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
  align-self: flex-end;
  padding-top: 0.75rem;
  align-items: center;
}

.member-buttons .samurai-btn,
.member-buttons .researchmap-btn,
.member-buttons .personal-page-btn {
  margin: 0;
}

.member-info .researchmap-btn {
  display: inline-block;
  background-color: transparent;
  color: #4a7a2e;
  padding: 0.3rem 1.2rem;
  border-radius: 2px;
  font-size: 0.75rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 1px solid #4a7a2e;
}

.member-info .researchmap-btn:hover {
  background-color: #4a7a2e;
  color: #fff;
  text-decoration: none;
}

/* Compact Member Grid */
.compact-member-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.compact-member-item {
  text-align: center;
  background-color: #fff;
  border-radius: 4px;
  padding: 1.75rem 1rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  border: 1px solid #e0e0e0;
}

.compact-member-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

.compact-member-photo {
  width: 90px;
  height: 110px;
  border-radius: 4px;
  object-fit: cover;
  object-position: top;
  border: 2px solid #e0e0e0;
  display: block;
  margin: 0 auto 0.75rem;
  transition: border-color 0.4s ease;
}

.compact-member-item:hover .compact-member-photo {
  border-color: #4a7a2e;
}

.compact-member-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.4;
}

.compact-member-name span {
  font-size: 0.75rem;
  font-weight: 400;
  color: #999;
}

.inline-title-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.inline-title-span2 {
  grid-column: span 2;
}

.member-grid-2col,
.member-grid-researcher {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.member-grid-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.member-grid-3col .member-entry {
  flex-direction: row;
  align-items: flex-start;
  text-align: left;
  padding: 0.75rem;
  gap: 0.75rem;
}

.member-grid-3col .member-photo {
  width: 80px;
  height: 107px;
}

.member-grid-3col .member-info {
  align-items: flex-start;
}

.member-grid-3col .member-name {
  font-size: 0.85rem;
}

.member-grid-3col .member-title-label {
  margin-bottom: 0.2rem;
}

.member-grid-3col .member-additional-roles {
  font-size: 0.72rem;
  margin-bottom: 0.2rem;
}

.member-grid-3col .member-buttons {
  align-self: center;
  margin-top: 0.3rem;
}

.member-title-label {
  font-size: 0.78rem;
  color: #999;
  font-weight: 400;
  letter-spacing: 0.03em;
  margin-bottom: 0.6rem;
  line-height: 1.4;
}

.member-subsection-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  padding-left: 0.5rem;
  border-left: 3px solid #c83c2d;
}

.member-bullet-list {
  list-style: disc;
  padding-left: 1.5rem;
  margin-top: 0.75rem;
  line-height: 2.2;
  color: #555;
  font-size: 0.78rem;
}

/* ========================================
   Members2 - Researcher Block
   ======================================== */
.researcher-block {
  margin-bottom: 3.5rem;
  border-left: 3px solid #c83c2d;
  padding-left: 1.5rem;
}

.researcher-lead {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 0.75rem;
}

.researcher-lead-photo {
  width: 120px;
  height: 155px;
  object-fit: cover;
  object-position: top;
  border-radius: 4px;
  border: 2px solid #e0e0e0;
  flex-shrink: 0;
  transition: border-color 0.4s ease;
}

.researcher-block:hover .researcher-lead-photo {
  border-color: #4a7a2e;
}

.researcher-lead-info {
  flex: 1;
}

.researcher-lead-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 0.15rem;
}

.researcher-lead-title {
  font-size: 0.78rem;
  color: #999;
  margin-bottom: 0.4rem;
  font-weight: 400;
  letter-spacing: 0.03em;
}

.researcher-lead-email {
  font-size: 0.78rem;
  color: #888;
  margin-bottom: 0.3rem;
}

.researcher-lead-info .samurai-btn {
  display: inline-block;
  background-color: transparent;
  color: #4a7a2e;
  padding: 0.3rem 1.2rem;
  border-radius: 2px;
  font-size: 0.75rem;
  font-weight: 500;
  text-decoration: none;
  margin-bottom: 0.75rem;
  margin-right: 0.5rem;
  transition: all 0.3s ease;
  border: 1px solid #4a7a2e;
}

.researcher-lead-info .samurai-btn:hover {
  background-color: #4a7a2e;
  color: #fff;
  text-decoration: none;
}

.researcher-lead-info .personal-page-btn {
  margin-bottom: 0.75rem;
}

.researcher-lead-research {
  font-size: 0.78rem;
  font-weight: 500;
  color: #333;
  margin-bottom: 0.15rem;
}

.researcher-lead-keywords {
  font-size: 0.78rem;
  color: #999;
  line-height: 1.6;
}

.team-members {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.team-member-entry {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.5rem;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  transition: box-shadow 0.3s ease;
}

.team-member-entry:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.team-member-photo {
  width: 80px;
  height: 100px;
  object-fit: cover;
  object-position: top;
  border-radius: 4px;
  border: 1px solid #e0e0e0;
  flex-shrink: 0;
}

.team-member-info {
  flex: 1;
}

.team-member-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.4;
}

.team-member-name span {
  font-weight: 400;
  color: #999;
}

.team-member-title {
  font-size: 0.78rem;
  color: #999;
  margin-top: 0.1rem;
}

/* ========================================
   Research Page
   ======================================== */
.research-intro {
  max-width: min(860px, 100%);
  margin: 0 auto;
  line-height: 2;
}

.research-intro p {
  margin-bottom: 1.5rem;
  color: #555;
  font-size: 0.78rem;
}

.research-intro p:last-child {
  margin-bottom: 0;
}

/* ========================================
   Contact Form
   ======================================== */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

.form-card {
  background-color: #fff;
  padding: 2.5rem;
  border-radius: 4px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  border: 1px solid #e0e0e0;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: #1a1a1a;
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid #ccc;
  border-radius: 2px;
  font-size: 0.92rem;
  font-family: inherit;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  background-color: #fafafa;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #4a7a2e;
  box-shadow: 0 0 0 3px rgba(74, 122, 46, 0.12);
  background-color: #fff;
}

.form-group textarea {
  resize: vertical;
  min-height: 140px;
}

.form-group input.error,
.form-group textarea.error {
  border-color: #c83c2d;
}

.error-message {
  color: #c83c2d;
  font-size: 0.78rem;
  margin-top: 0.5rem;
}

.btn-primary {
  width: 100%;
  padding: 0.9rem;
  background-color: #c83c2d;
  color: white;
  border: none;
  border-radius: 2px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  font-family: inherit;
  letter-spacing: 0.04em;
}

.btn-primary:hover {
  background-color: #a02e22;
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.success-message {
  text-align: center;
  padding: 3rem 2rem;
}

.success-message h2 {
  color: #4a7a2e;
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.success-message p {
  color: #888;
  margin-bottom: 2rem;
}

/* ========================================
   Modal
   ======================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  padding: 1rem;
}

.modal {
  background-color: white;
  padding: 2.5rem;
  border-radius: 4px;
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #999;
  transition: color 0.3s ease;
}

.modal-close:hover {
  color: #1a1a1a;
}

.modal h2 {
  color: #1a1a1a;
  margin: 1rem 0;
}

.modal .content {
  color: #555;
  line-height: 1.8;
}

.hidden {
  display: none !important;
}

/* ========================================
   Footer - dark black
   ======================================== */
.footer {
  background-color: #fff;
  color: #555;
  padding: 3.5rem 0 0;
  font-size: 0.78rem;
}

.footer-inner {
  width: 85%;
  max-width: 1100px;
  margin: 0 auto;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2rem;
}

.footer-access {
  color: #555;
  line-height: 1.8;
}

.footer-access-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 0.5rem;
  letter-spacing: 0.03em;
}

.footer-logos {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.footer-logos img {
  height: 60px;
  width: auto;
  transition: opacity 0.3s ease;
  padding: 12px;
}

.footer-logos img:last-child {
  height: 72px;
  padding: 12px;
}

.footer-logos img:hover {
  opacity: 1;
}

.footer-bottom {
  background-color: #c83c2d;
  margin-top: 2rem;
  padding: 1rem 0;
}

.footer-copy {
  text-align: center;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.02em;
}

/* ========================================
   Scroll Animation
   ======================================== */
.fade-in-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 1200px) {
  .top-member-grid {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .intro-text p {
    font-size: 0.78rem;
  }

  /* Hero — fluid title for tablet */
  .hero-title {
    font-size: clamp(2rem, 4.5vw, 3.5rem);
    white-space: nowrap;
  }

  /* Navbar — shrink for tablet width */
  .navbar-inner {
    width: 95%;
  }

  .navbar-brand {
    gap: 0.5rem;
    font-size: 0.8rem;
  }

  .navbar-logos {
    flex-shrink: 0;
  }

  .navbar-logos img {
    height: 45px;
    padding: 9px;
  }

  .navbar-logos img:last-child {
    height: 55px;
    padding: 9px;
  }

  .group-full {
    display: none;
  }

  .group-short {
    display: inline;
  }

  /* Hamburger menu activation */
  .hamburger {
    display: flex;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    background-color: #fff;
    flex-direction: column;
    padding: 1.5rem 2.5rem 2rem;
    gap: 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
    font-size: 0.95rem;
  }

  .nav-links a::after {
    display: none;
  }

  .nav-links > :last-child {
    border-bottom: none;
  }

  .lang-switcher {
    margin-left: 0;
    padding: 1rem 0;
    justify-content: center;
    font-size: 0.95rem;
    border-bottom: none;
  }

  /* Members — researchers only: 1 column for readable layout */
  .member-grid-researcher {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  /* Navbar — compact for mobile */
  .navbar {
    height: auto;
    padding: 0.3rem 0;
  }

  .navbar-inner {
    padding: 0 0.75rem;
    width: 100%;
  }

  .navbar-brand {
    gap: 0.3rem;
    font-size: 0.85rem;
  }

  .navbar-logos img {
    height: 38px;
    padding: 7px;
  }

  .navbar-logos img:last-child {
    height: 46px;
    padding: 7px;
  }

  .navbar-brand-text {
    font-size: 0.75rem;
  }

  .nav-links {
    top: 50px;
  }

  /* Hero */
  .hero {
    margin-top: 50px;
  }

  .hero-image {
    height: 50vh;
    min-height: 300px;
  }

  .hero-overlay {
    padding: 2rem 2rem 7rem;
  }

  .hero-title {
    font-size: clamp(1rem, 4.5vw, 2.25rem);
    white-space: nowrap;
  }

  .hero-catchphrase p {
    font-size: 0.92rem;
  }

  /* Sections */
  .section {
    padding: 1rem 0 9rem;
  }

  /* Waves — smaller on tablet */
  .wave-divider svg,
  .section .wave-divider-bottom svg,
  .footer-wave svg {
    height: 120px;
  }

  .container {
    width: 90%;
  }

  .intro-text p {
    font-size: 0.78rem;
  }

  /* Members */
  .top-member-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
  }

  .member-grid-2col,
  .member-grid-researcher {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
  }

  .member-grid-3col {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
  }

  .member-grid-3col .member-entry {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .member-grid-3col .member-info {
    align-items: center;
  }

  .member-grid-3col .member-photo {
    width: 100px;
    height: 133px;
  }

  .member-entry {
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.3rem;
    align-items: center;
    text-align: center;
    overflow: hidden;
  }

  .member-photo {
    width: 100px;
    height: 133px;
  }

  .member-name {
    font-size: 0.7rem;
    line-height: 1.2;
    margin-bottom: 0;
    overflow-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
  }

  .member-title-label {
    font-size: 0.6rem;
    margin-bottom: 0.1rem;
  }

  .member-photo-area .email,
  .member-info .research-title,
  .member-info .keywords {
    display: none;
  }

  .member-photo-area {
    align-items: center;
  }

  .member-info .samurai-btn,
  .member-info .personal-page-btn,
  .member-info .researchmap-btn {
    font-size: 0.45rem;
    padding: 0.1rem 0.4rem;
    margin-bottom: 0;
    margin-right: 0;
  }

  .member-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
  }

  .member-buttons {
    align-self: center;
    margin-top: auto;
    padding-top: 0.1rem;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.2rem;
  }

  .member-additional-roles {
    display: none;
  }

  .lang-switcher {
    margin-left: 0;
    padding: 1rem 0;
    justify-content: center;
    font-size: 0.95rem;
    border-bottom: none;
  }

  .member-section {
    margin-bottom: 1.5rem;
  }

  .member-section-title {
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
  }

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

  .inline-title-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .inline-title-span2 {
    grid-column: span 1;
  }

  /* News */
  .news-timeline-item {
    flex-direction: column;
    gap: 0.25rem;
  }

  .news-timeline-item .date {
    min-width: auto;
  }

  /* Footer */
  .footer-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }

  .footer-logos {
    align-self: flex-end;
  }

  /* Page header */
  .page-header {
    padding-top: calc(86px + 2rem);
  }

  .page-header p {
    font-size: 0.8rem;
  }

  /* Section header */
  .section-header {
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .top-member-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.3rem;
    margin-bottom: 0.3rem;
  }

  .top-member-leader {
    margin-bottom: 0.3rem;
  }

  .top-member-leader .top-member-card {
    width: calc(100% / 3 - 0.2rem);
  }

  .top-member-card {
    padding: 0.3rem 0.2rem 0.3rem;
  }

  .top-member-photo {
    width: 50px;
    height: 65px;
    margin-bottom: 0.15rem;
  }

  .top-member-name {
    font-size: 0.6rem;
    white-space: nowrap;
    margin-bottom: 0;
  }

  .top-member-title {
    font-size: 0.5rem;
    margin-bottom: 0.1rem;
  }

  .top-member-email {
    display: none;
  }

  .top-member-research {
    font-size: 0.5rem;
    line-height: 1.3;
    margin-bottom: 0.1rem;
  }

  .personal-page-btn {
    font-size: 0.45rem;
    padding: 0.1rem 0.4rem;
  }

  .top-member-buttons {
    flex-direction: column;
    gap: 0.1rem;
  }

  .intro-keywords {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

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

  .intro-text p {
    font-size: 0.78rem;
  }

  /* Waves — smaller on mobile */
  .wave-divider svg,
  .section .wave-divider-bottom svg,
  .footer-wave svg {
    height: 70px;
  }

  .form-card {
    padding: 1.5rem;
  }

  /* Navbar — fine-tune for small screens */
  .navbar-inner {
    padding: 0 0.5rem;
  }

  .navbar-logos img {
    height: 34px;
    padding: 6px;
  }

  .navbar-logos img:last-child {
    height: 42px;
    padding: 6px;
  }

  .navbar-brand-text {
    font-size: 0.7rem;
  }

  .hero-image {
    height: auto;
    min-height: 0;
    max-height: none;
  }

  .hero-image > img {
    object-fit: contain;
    height: auto;
  }

  .hero-overlay {
    padding: 1.5rem calc(1rem + 12px) 3rem;
  }

  .intro-heading {
    font-size: 0.85rem;
  }

  .page-header {
    padding-top: calc(90px + 2rem);
  }

  .footer {
    font-size: 0.78rem;
    padding: 1.5rem 0 0;
  }

  .footer-access {
    line-height: 1.4;
  }

  .footer-access-title {
    font-size: 0.78rem;
    margin-bottom: 0.2rem;
  }

  .footer-content {
    margin-bottom: 1rem;
  }

  .footer-bottom {
    margin-top: 1rem;
    padding: 0.5rem 0;
  }
}

/* Landscape phones (wide but short) */
@media (max-height: 650px) and (orientation: landscape) {
  .navbar {
    height: auto;
    padding: 0.3rem 0;
  }

  .navbar-inner {
    padding: 0 0.75rem;
    width: 100%;
  }

  .navbar-brand {
    flex-direction: row;
    align-items: center;
    gap: 0.4rem;
  }

  .navbar-logos {
    gap: 0;
  }

  .navbar-logos img {
    height: 36px;
    padding: 7px;
  }

  .navbar-logos img:last-child {
    height: 44px;
    padding: 7px;
  }


  .navbar-brand-text {
    font-size: 0.65rem;
    margin-left: 0;
    line-height: 1.2;
  }

  .hamburger {
    display: flex;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: 50px;
    left: 0;
    right: 0;
    background-color: #fff;
    flex-direction: column;
    padding: 1rem 2rem;
    gap: 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  }

  .nav-links.open {
    display: flex;
  }

  .hero {
    margin-top: 50px;
  }

  .hero-image {
    height: auto;
    min-height: 0;
    max-height: none;
  }

  .hero-image > img {
    object-fit: contain;
    height: auto;
  }

  .hero-overlay {
    padding: 1rem 5% 2rem;
  }

  .hero-title {
    font-size: clamp(1rem, 5vw, 1.5rem);
    white-space: nowrap;
  }

  .section {
    padding: 1rem 0 5rem;
  }

  .wave-divider svg,
  .section .wave-divider-bottom svg {
    height: 70px;
  }

  .top-member-wrapper {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
  }

  .top-member-leader,
  .top-member-grid {
    display: contents;
  }

  .top-member-leader .top-member-card {
    width: auto;
  }

  .top-member-card {
    padding: 0.75rem 0.4rem 0.5rem;
  }

  .top-member-photo {
    width: 50px;
    height: 65px;
  }

  .top-member-name {
    font-size: 0.6rem;
    white-space: nowrap;
  }

  .top-member-title {
    font-size: 0.5rem;
  }

  .top-member-email {
    display: none;
  }

  .top-member-research {
    font-size: 0.5rem;
    line-height: 1.3;
  }

  .personal-page-btn {
    font-size: 0.5rem;
    padding: 0.15rem 0.5rem;
  }

  .top-member-buttons {
    flex-direction: column;
    gap: 0.2rem;
  }

  .page-header {
    padding-top: calc(50px + 1.5rem);
  }

  .page-header p {
    font-size: 0.72rem;
  }

  .section-header h2 {
    font-size: 1rem;
  }

  .intro-heading {
    font-size: 0.82rem;
  }

  .intro-text p {
    font-size: 0.78rem !important;
  }

  .news-timeline-item .news-title {
    font-size: 0.78rem;
  }

  .member-grid-2col,
  .member-grid-researcher {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.3rem;
  }

  .member-grid-3col {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.3rem;
  }

  .member-grid-3col .member-entry {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .member-grid-3col .member-info {
    align-items: center;
  }

  .member-grid-3col .member-photo {
    width: 80px;
    height: 107px;
  }

  .member-entry {
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.3rem;
    align-items: center;
    text-align: center;
    overflow: hidden;
  }

  .member-photo {
    width: 80px;
    height: 107px;
  }

  .member-name {
    font-size: 0.6rem;
    line-height: 1.2;
    margin-bottom: 0;
    overflow-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
  }

  .member-title-label {
    font-size: 0.5rem;
    margin-bottom: 0.1rem;
  }

  .member-photo-area .email,
  .member-info .research-title,
  .member-info .keywords {
    display: none;
  }

  .member-photo-area {
    align-items: center;
  }

  .member-info .samurai-btn,
  .member-info .personal-page-btn,
  .member-info .researchmap-btn {
    font-size: 0.4rem;
    padding: 0.1rem 0.3rem;
    margin-bottom: 0;
    margin-right: 0;
  }

  .member-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
  }

  .member-buttons {
    align-self: center;
    margin-top: auto;
    padding-top: 0.1rem;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.2rem;
  }

  .member-additional-roles {
    display: none;
  }

  .lang-switcher {
    margin-left: 0;
    padding: 0.5rem 0;
    justify-content: center;
    font-size: 0.85rem;
  }

  .footer {
    font-size: 0.78rem;
    padding: 1.5rem 0 0;
  }

  .footer-access {
    line-height: 1.4;
  }

  .footer-access-title {
    font-size: 0.78rem;
    margin-bottom: 0.2rem;
  }

  .footer-content {
    margin-bottom: 1rem;
  }

  .footer-bottom {
    margin-top: 1rem;
    padding: 0.5rem 0;
  }
}
