/* =================================================
   基本設定・テーマカラー
   ================================================= */
:root {
  --main-color: #003366;
  --sub-color: #e6f0fa;
  --border-color: #c0d6eb;
  --header-height: 70px;
}

/* =================================================
   ページ全体（Sticky Footer 用）
   ================================================= */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;            /* ← ここが超重要 */
}

body {
  display: flex;
  flex-direction: column;
  font-family: sans-serif;
  line-height: 1.6;
}

/* 画像の安全装置 */
img {
  max-width: 100%;
  height: auto;
}

/* =================================================
   ヘッダ
   ================================================= */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--main-color);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  z-index: 1000;
}

.header-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 10px 20px;

  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.lab-name {
  font-size: 1.2em;
  font-weight: bold;
  line-height: 1.3;
  text-align: center;

  display: flex;
  flex-direction: column;
  align-items: center;
}

/* =================================================
   ナビ（PC）
   ================================================= */
header nav {
  display: flex;
  gap: 5px;
}

header nav a {
  padding: 8px 16px;
  color: #ffffff;
  text-decoration: none;
}

header nav a.active {
  font-weight: bold;
  border-bottom: 3px solid #ffffff;
}

header nav a:hover {
  text-decoration: underline;
}

/* ハンバーガー */
.menu-toggle {
  display: none;
  font-size: 1.5em;
  background: none;
  border: none;
  color: #ffffff;
  cursor: pointer;
}

/* =================================================
   メインコンテンツ
   ================================================= */
main {
  flex: 1; /* ← footer を画面下に押し下げる */

  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  margin-top: calc(var(--header-height) + 30px);

}

/* =================================================
   見出し
   ================================================= */
h1 {
  font-size: 1.8em;
  margin: 30px 0 20px;
  color: var(--main-color);
}

h2 {
  margin: 30px 0 20px;
  padding: 8px 12px;
  background-color: var(--sub-color);
  color: var(--main-color);
  border-left: 6px solid var(--main-color);
  border-radius: 4px;
  font-weight: bold;
}

.welcome {
  font-size: 1.8em;
  margin-top: 30px;
  margin-bottom: 0px;
  color: var(--main-color);
  text-align: center;
  font-weight: bold;
}

/* =================================================
   Staff / Research 共通レイアウト
   ================================================= */
.theme-content {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.staff-member {
  margin-bottom: 30px;
  padding: 15px;
  background-color: #f8fbff;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  align-items: top;
}

.staff-header {
  margin-bottom: 0px;
}

.staff-name {
  margin: 0 0 5px;
  padding: 4px 8px;
  font-size: 1.2em;
  font-weight: bold;
  color: #ffffff;
  background-color: var(--main-color);
  padding: 4px 8px;
  display: inline-block;
  border-radius: 4px;
}

.staff-affiliation {
  margin: 4px 0 0;
  padding-left: 18px;
  line-height: 1.4;
}

.staff-affiliation li {
  margin-bottom: 2px;
}

.staff-body {
  display: flex;
  gap: 20px;
  align-items: center;
}

.staff-body img {
  width: 150px;
  height: auto; /* 画像縦伸び防止 */
}


.staff-line {
  display: flex;
  gap: 15px;
  align-items: center;
  margin-bottom: 0px;
}

.staff-text {
    margin-bottom: 0px;
}

.staff-link {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-top: 0px;
}


/* Research */
.research-theme {
  margin-bottom: 40px;
}

.theme-content {
    align-items: center;
}

.theme-content img {
  width: 350px;
  border-radius: 6px;
}

.students h4 {
  margin-top: 0px;
  margin-bottom: 0px;
  font-weight: bold;
  color: var(--main-color);
}

.student-list {
  padding-left: 20px;
  margin-top: 0px;
  margin-bottom: 20px;
}

/* =================================================
   Publications
   ================================================= */
.pub-list li {
  margin-bottom: 8px;         /* li間の余白 */
}

/* =================================================
   Access
   ================================================= */
.building {
  margin-bottom: 0px;
}

.rooms {
  padding-left: 20px;
  margin-top: 0px;
}

/* =================================================
   フッター
   ================================================= */
footer {
  background-color: var(--main-color);
  color: #ffffff;
  width: 100%;
}

.footer-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 15px 20px;
  text-align: center;
  font-size: 0.8em;
}

/* =================================================
   スマホ対応
   ================================================= */
@media (max-width: 768px) {
  main {
    padding: 0 15px;
  }

  .menu-toggle {
    display: block;
  }

  header nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background-color: var(--main-color);
  }

  header nav.show {
    display: flex;
  }

  header nav a {
    padding: 10px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.3);
  }

  .welcome {
    font-size: 1.5em;
  }

  .staff-member,
  .theme-content {
    flex-direction: column;
  }

  .staff-body {
    display: block;
  }

  .staff-body img {
    margin-top: 20px;
  }

  .staff-link {
    display: block;
    line-height: 0.8;
    align-items: center;
    margin-top: 0px;
  }
}


