/* ============================================
   個人ホームページ 共通スタイル
   参考: https://noneq.c.u-tokyo.ac.jp/s_index/
   ============================================ */

:root {
  --color-text: #333;
  --color-text-light: #767676;
  --color-accent: #222;
  --color-border: #eee;
  --color-topbar: #1a1a1a;
  --max-width: 1000px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN",
    "Hiragino Sans", Meiryo, sans-serif;
  color: var(--color-text);
  line-height: 1.8;
  background: #fff;
}

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

/* ---------- 最上部の検索バー ---------- */
.topbar {
  position: relative;
  background: var(--color-topbar);
  color: #ccc;
  font-size: 0.8rem;
  padding: 0.35em 1.5em;
  display: flex;
  align-items: center;
  gap: 1em;
}

.search-toggle {
  background: none;
  border: none;
  color: #ccc;
  font-size: inherit;
  font-family: inherit;
  cursor: pointer;
  padding: 0.25em 0;
}

.search-toggle:hover {
  color: #fff;
}

.search-form input {
  background: #333;
  border: 1px solid #555;
  border-radius: 3px;
  color: #eee;
  font-size: inherit;
  padding: 0.3em 0.8em;
  width: 220px;
}

.search-form input:focus {
  outline: none;
  border-color: #999;
}

.search-results {
  position: absolute;
  top: 100%;
  left: 1.5em;
  z-index: 10;
  list-style: none;
  background: #fff;
  color: var(--color-text);
  border: 1px solid var(--color-border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  max-width: 500px;
  width: calc(100% - 3em);
}

.search-results li + li {
  border-top: 1px solid var(--color-border);
}

.search-results a {
  display: block;
  padding: 0.8em 1em;
  line-height: 1.5;
}

.search-results a:hover {
  background: #f5f5f5;
}

.search-results .search-note {
  padding: 0.8em 1em;
  color: var(--color-text-light);
}

mark {
  background: #ffe9a8;
  padding: 0 0.15em;
}

[hidden] {
  display: none !important;
}

/* ---------- ヘッダー(サイトタイトル) ---------- */
.site-header {
  text-align: center;
  padding: 3.5em 1em 2.5em;
}

.site-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.site-subtitle {
  margin-top: 0.8em;
  font-size: 0.85rem;
  color: var(--color-text-light);
  letter-spacing: 0.15em;
}

/* ---------- ナビゲーション ---------- */
.global-nav {
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.global-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5em;
}

.global-nav a {
  display: block;
  padding: 1em 1.2em;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
}

.global-nav a:hover,
.global-nav .current a {
  color: #000;
  font-weight: 700;
}

.global-nav .lang-switch a {
  color: var(--color-text-light);
}

/* ---------- ページタイトル ---------- */
.page-title {
  text-align: center;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.6rem;
  font-weight: 400;
  padding: 2em 1em;
}

/* ---------- ヒーロー図版エリア ---------- */
.hero {
  background: #fff;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: 2.5em 1.5em;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2.5em;
}

/* 図の左に置く研究紹介文 */
.hero-lead {
  flex: 1 1 320px;
  max-width: 480px;
  font-size: 0.95rem;
}

.hero-lead p + p {
  margin-top: 1em;
}

/* ラベル付きの図なので切り抜かず全体を表示する */
.hero img {
  flex: 0 1 auto;
  min-width: 0;
  max-height: 560px;
  max-width: 100%;
  width: auto;
}

.hero-caption {
  max-width: var(--max-width);
  margin: 0.8em auto 0;
  padding: 0 1.5em;
  text-align: right;
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--color-text-light);
}

/* ---------- メインコンテンツ ---------- */
.content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3em 1.5em 4em;
}

.content section + section {
  margin-top: 3em;
}

.content h2 {
  font-size: 1.2rem;
  border-bottom: 2px solid var(--color-accent);
  padding-bottom: 0.4em;
  margin-bottom: 1em;
}

.content ul {
  padding-left: 1.5em;
}

.text-link {
  color: #1a5276;
  text-decoration: underline;
}

.text-link:hover {
  color: #2e86c1;
}

.map-embed {
  margin-top: 1em;
  border: 1px solid var(--color-border);
}

.map-embed iframe {
  display: block;
}

/* 好きな曲リスト(曲名+コメント) */
.song-list {
  list-style: none;
  padding-left: 0 !important;
}

.song-list li + li {
  margin-top: 1.5em;
  border-top: 1px solid var(--color-border);
  padding-top: 1.5em;
}

.song-title {
  font-weight: 700;
}

.song-comment {
  margin-top: 0.3em;
  padding-left: 1em;
  border-left: 3px solid var(--color-border);
  color: var(--color-text-light);
  font-size: 0.9rem;
}

.placeholder {
  color: var(--color-text-light);
  background: #fafafa;
  border: 1px dashed #ccc;
  padding: 1.5em;
  text-align: center;
}

/* ---------- フッター ---------- */
.site-footer {
  border-top: 1px solid var(--color-border);
  text-align: center;
  padding: 2.5em 1em;
  font-size: 0.8rem;
  color: var(--color-text-light);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5em;
  margin-bottom: 1em;
}

.footer-links a:hover {
  text-decoration: underline;
}

/* ---------- レスポンシブ ---------- */
@media (max-width: 600px) {
  .site-title {
    font-size: 1.5rem;
  }
  .hero img {
    max-height: 380px;
  }
}
