/* ベース設定 */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Helvetica Neue", Arial, "Hiragino Sans", "Yu Gothic", sans-serif;
  line-height: 1.7;
  color: #222;
  background: #f7f7f9;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: 90%;
  max-width: 960px;
  margin: 0 auto;
}

/* ヘッダー */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #ffffffee;
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #e0e0e0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0;
}

.site-title a {
  display: flex;
  flex-direction: column;
}

.lab-name-ja {
  font-size: 1.05rem;
  font-weight: 600;
}

.lab-name-en {
  font-size: 0.8rem;
  color: #666;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.site-nav a {
  margin-left: 1rem;
  font-size: 0.95rem;
  color: #444;
}

.site-nav a:hover {
  text-decoration: none;
  opacity: 0.7;
}

/* 言語切り替え */

.lang-switch {
  font-size: 0.85rem;
  white-space: nowrap;
  color: #666;
}

.lang-switch a {
  color: #555;
}

.lang-switch .active-lang {
  font-weight: 600;
}

/* ヒーロー */

.hero {
  padding: 3.5rem 0 2.5rem;
  background: #f0f2f8;
}

.hero-subpage {
  padding: 3rem 0 1.5rem;
}

.hero h1 {
  margin: 0 0 0.5rem;
  font-size: 1.8rem;
}

.hero-subtitle {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  color: #555;
}

.hero-text {
  max-width: 40em;
  font-size: 0.98rem;
}

/* セクション */

.section {
  padding: 2.5rem 0;
  background: #f7f7f9;
}

.section-alt {
  background: #ffffff;
}

.section h2 {
  margin: 0 0 1rem;
  font-size: 1.4rem;
  border-left: 4px solid #444;
  padding-left: 0.6rem;
}

.section h3 {
  margin-top: 1.8rem;
  margin-bottom: 0.6rem;
  font-size: 1.1rem;
}

.section p {
  margin: 0.4rem 0 0.4rem;
}

/* Research トピック */

.topic-list {
  margin: 0.5rem 0 0.5rem 1.2rem;
  padding: 0;
}

.topic-list li {
  margin-bottom: 0.2rem;
}

/* News */

.news-list {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
}

.news-list li {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 0.25rem;
  font-size: 0.95rem;
}

.news-date {
  width: 6.5rem;
  color: #666;
}

.news-text {
  flex: 1;
}

/* Faculty */

.faculty-card {
  border-radius: 12px;
  background: #ffffff;
  padding: 1.2rem 1.4rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  border: 1px solid #e3e3e3;
}

.faculty-layout {
  display: flex;
  align-items: flex-start;
  gap: 1.2rem;
}

.faculty-photo img {
  display: block;
  width: 180px;
  max-width: 40vw;
  border-radius: 12px;
  object-fit: cover;
}

.faculty-info {
  flex: 1;
}

.faculty-title {
  font-size: 0.95rem;
  color: #555;
}

/* Contact */

.mono {
  font-family: "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  font-size: 0.95rem;
}

/* note */

.note {
  margin-top: 0.8rem;
  font-size: 0.9rem;
  color: #666;
}

/* フッター */

.site-footer {
  border-top: 1px solid #e0e0e0;
  padding: 1rem 0;
  background: #ffffff;
  font-size: 0.8rem;
  color: #777;
  text-align: center;
}

/* --- 折りたたみアコーディオン --- */

.accordion-btn {
  width: 100%;
  background: #f0f2f8;
  border: none;
  outline: none;
  text-align: left;
  padding: 0.8rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 1px solid #ddd;
  transition: background 0.2s;
}

.accordion-btn:hover {
  background: #e8ebf5;
}

.accordion-btn.active {
  background: #dfe4f0;
}

.accordion-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: #fff;
  border-left: 3px solid #ccc;
  padding-left: 1rem;
}

.accordion-panel ul {
  margin: 0.5rem 0;
  padding-left: 1.2rem;
}

/* レスポンシブ */

@media (max-width: 800px) {
  .header-inner {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .site-nav {
    order: 3;
    margin-top: 0.4rem;
  }

  .site-nav a {
    margin-left: 0;
    margin-right: 1rem;
  }

  .lang-switch {
    order: 2;
  }
}

@media (max-width: 640px) {
  .hero {
    padding-top: 3rem;
  }

  .faculty-layout {
    flex-direction: column;
    align-items: center;
  }

  .faculty-photo img {
    width: 220px;
    max-width: 70vw;
  }

  .faculty-info {
    width: 100%;
  }
}