/* 全体の設定 */
* { box-sizing: border-box; margin: 0; padding: 0; }
/* =========================================
   修正1：背景色を少し濃くして両端を際立たせる
========================================= */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.8;
  color: #222;
  background-color: #eef0f2;
  overflow-x: hidden; /* 横スクロールバーが誤って出るのを防ぐ */
}

/* ヒーロー（クロスフェードアニメーション対応版） */
.hero { position: relative; width: 100%; height: 350px; display: flex; flex-direction: column; justify-content: flex-end; background-color: #2c3e50; overflow: hidden; }

/* クロスフェード用背景レイヤー */
#hero-bg-1,
#hero-bg-2 {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}

#hero-bg-1.active,
#hero-bg-2.active { 
  opacity: 1; 
}
/* オーバーレイ（画像を少し暗くして文字を読みやすくする） */
.hero::after { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.15); z-index: 1; }

/* コンテンツ */
.hero-content { position: relative; z-index: 2; padding: 2rem 4rem; display: flex; justify-content: space-between; align-items: flex-end; }

/* 修正：ヘッダーの文字を元の太さ（bold）に戻し、力強い印象に */
.hero h1 { color: white; font-size: 3.5rem; font-weight: bold; letter-spacing: 0.05em; text-shadow: 0 2px 4px rgba(0,0,0,0.5); }

/* ヒーロー内のテキストコンテナ */
.hero-text { display: flex; flex-direction: column; gap: 0.5rem; }

/* 一言コメントのスタイル */
.hero-comment { color: white; font-size: 1.1rem; font-weight: 500; text-shadow: 0 1px 3px rgba(0,0,0,0.8); }

/* ナビゲーション */
.navbar { background-color: white; border-bottom: 2px solid #333; display: flex; justify-content: space-between; align-items: center; padding: 0 4rem; position: sticky; top: 0; z-index: 100; }
.nav-links { display: flex; list-style: none; }
.nav-links li a { display: block; padding: 1rem 1.5rem; color: #333; text-decoration: none; font-weight: 500; font-size: 0.95rem; }
.nav-links li.active a { border-bottom: 3px solid #333; }
.lang-menu { position: relative; display: inline-block; }
.lang-btn { background-color: #2c3e50; color: white; padding: 0.4rem 1.2rem; border-radius: 20px; font-size: 0.85rem; cursor: pointer; }
.lang-dropdown { display: none; position: absolute; top: 100%; right: 0; background-color: white; box-shadow: 0 4px 12px rgba(0,0,0,0.15); border-radius: 8px; z-index: 9999; min-width: 120px; }
.show-dropdown { display: block; }
.lang-dropdown a { padding: 0.8rem 1.2rem; text-decoration: none; display: block; color: #333; transition: background-color 0.2s; }
.lang-dropdown a:hover { background-color: #f0f0f0; border-radius: 8px; }

/* コンテンツのラッパー（フル幅対応） */
main { 
  max-width: 100%; 
  margin: 3rem 0; 
  padding: 0; 
}

/* 各セクションの余白設定 */
section {
  margin-bottom: 4rem;
}

/* ▼ 重要：箱（.content-card）以外の見出しやテキストを、中央の1000px幅にピッタリ揃える ▼ */
section > * {
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 2rem;
  padding-right: 2rem;
}

/* =========================================
   修正2：画面いっぱいに広がる「箱」のデザイン
========================================= */
section > .content-card {
  background: white;
  border-radius: 0; /* 直角にする */
  width: 100%;
  max-width: 100%;
  
  /* ▼魔法の計算式：箱は画面いっぱいに広げつつ、中の文章は見出しと縦のラインがピッタリ揃うようにする▼ */
  padding: 3rem max(2rem, calc(50vw - 500px + 2rem));
  
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  border-top: 5px solid #222222;
  margin-top: 1.5rem;
  margin-bottom: 3rem;
}

/* =========================================
   追加：基本情報など、箱の中の通常の箇条書きから「・」を消す
========================================= */
.content-card ul {
  list-style-type: none; /* 「・」を非表示にする */
  padding-left: 0; /* 左側の字下げ（余白）をなくす */
}

/* =========================================
   修正3：箱の中の見出し（経歴の年など）
========================================= */
.year-header {
  font-size: 1.4rem;
  color: #1a1a1a;
  border-bottom: 2px solid #cccccc;
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}
.talk-list { list-style-type: decimal; padding-left: 1.5rem; }
.talk-item { padding: 1.5rem 0; border-bottom: 1px dashed #e1e4e8; }
.talk-date { color: #333333; font-weight: bold; margin-right: 0.5rem; } /* 月と日付の色を黒に変更 */
.talk-title { font-weight: bold; color: #1a1a1a; }
.talk-details { margin-top: 0.3rem; font-size: 0.95rem; }

/* 論文リスト用のスタイル */
.paper-list { list-style-type: decimal; padding-left: 1.5rem; }
.paper-item { padding: 1rem 0; border-bottom: 1px dashed #e1e4e8; line-height: 1.6; }
/* 経歴テーブル用のスタイル */
.history-table { width: 100%; border-collapse: collapse; }
.history-table th, .history-table td { padding: 1.2rem 0; border-bottom: 1px solid #eee; text-align: left; vertical-align: top; }
.history-table th { width: 25%; color: #555; font-weight: normal; }

/* ＝＝＝ ブログ・地図・ギャラリー用スタイル ＝＝＝ */
.map-container-inner { display: flex; justify-content: center; margin-bottom: 1.5rem; }
.geolonia-svg-map { width: 100%; max-width: 800px; height: auto; }
.prefecture { fill: #ffeaea !important; stroke: #ffffff !important; stroke-width: 1.5 !important; cursor: not-allowed; transition: fill 0.3s ease; }
.prefecture.has-photo { fill: #e0f0ff !important; cursor: pointer; }
.prefecture.has-photo:hover { fill: #0366d6 !important; }
.prefecture.selected { fill: #004d99 !important; }
.mobile-controls { display: none; margin-bottom: 1.5rem; }
.pref-select { width: 100%; padding: 0.8rem; font-size: 1rem; border: 1px solid #ddd; border-radius: 8px; }
.pref-boxes-wrapper { margin: 2rem 0; }
.pref-boxes-title { font-size: 1rem; color: #555; margin-bottom: 0.8rem; font-weight: bold; }
.pref-boxes { display: flex; overflow-x: auto; gap: 12px; padding-bottom: 12px; }
.pref-boxes::-webkit-scrollbar { height: 8px; }
.pref-boxes::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }
.pref-boxes::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 4px; }
.pref-box { flex: 0 0 auto; padding: 10px 24px; background-color: #fff; border: 2px solid #e1e4e8; border-radius: 8px; cursor: pointer; font-weight: 500; color: #333; transition: all 0.2s ease; user-select: none; }
.pref-box:hover { background-color: #f4f6f9; border-color: #0366d6; color: #0366d6; }
.pref-box.selected { background-color: #0366d6; border-color: #0366d6; color: #fff; }
.gallery-display { display: none; animation: fadeIn 0.4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.gallery-title { font-size: 1.4rem; border-bottom: 2px solid #eee; padding-bottom: 0.5rem; margin-bottom: 1.5rem; }
.photo-card { display: flex; gap: 2rem; align-items: flex-start; margin-bottom: 2rem; }
.slider-container { width: 50%; flex: 0 0 50%; position: relative; background: #eee; display: flex; flex-direction: column; align-items: center; border-radius: 8px; overflow: hidden; }
.slider-image { width: 100%; height: 350px; object-fit: contain; background-color: #eee; display: block; cursor: zoom-in; }
.tips-area { width: 50%; flex: 0 0 50%; padding: 0 1rem; }
.tips-area h4 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.tips-area p { font-size: 0.95rem; color: #555; }
.slider-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: none; border-radius: 50%; background: rgba(0,0,0,0.5); color: white; font-size: 1.5rem; cursor: pointer; z-index: 10; }
.slider-btn:hover { background: rgba(0,0,0,0.9); }
.slider-prev { left: 10px; }
.slider-next { right: 10px; }
.slide-counter { width: 100%; text-align: center; padding: 0.5rem 0; color: #666; font-size: 0.9rem; background: #fff; }
.gallery-divider { display: none; margin: 2rem 0; border: none; border-top: 2px dashed #e1e4e8; }
.blog-list { list-style: none; }
.blog-item { padding: 1.5rem 0; border-bottom: 1px dashed #e1e4e8; }
.blog-item:first-child { padding-top: 0; }
.blog-item:last-child { padding-bottom: 0; border-bottom: none; }
.blog-header { display: flex; align-items: baseline; margin-bottom: 0.5rem; }
.blog-date { color: #333333; font-weight: bold; font-size: 0.95rem; margin-right: 1rem; flex-shrink: 0; } /* 資料PDFの日付も黒に変更 */
.blog-title { font-size: 1.15rem; font-weight: bold; color: #1a1a1a; text-decoration: none; line-height: 1.4; }
.blog-title:hover { text-decoration: underline; color: #0366d6; }
.blog-description { font-size: 0.95rem; color: #555; margin-bottom: 0.8rem; }
.blog-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag { background-color: #f1f3f5; color: #495057; padding: 0.2rem 0.8rem; border-radius: 20px; font-size: 0.8rem; }
#lightbox { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.9); z-index: 1000; justify-content: center; align-items: center; flex-direction: column; }
#lightbox img { max-width: 90%; max-height: 80vh; border-radius: 4px; box-shadow: 0 4px 20px rgba(0,0,0,0.5); }
.close-btn { color: white; font-size: 3rem; position: absolute; top: 20px; right: 40px; cursor: pointer; }

/* =========================================
   修正：リンク集用のスタイル（・を消す）
========================================= */
.link-list { list-style-type: none; padding-left: 0; } /* disc から none に変更し、余白を0に */
.link-item { padding: 0.8rem 0; border-bottom: 1px dashed #e1e4e8; line-height: 1.6; }
.link-item:last-child { border-bottom: none; }
.link-item a { font-weight: bold; color: #0366d6; text-decoration: none; font-size: 1.1rem; }
.link-item a:hover { text-decoration: underline; }
.link-description { font-size: 0.95rem; color: #555; }

/* 追加：黒背景のフッター＆SNSアイコンのスタイル */
.site-footer {
  background-color: #1a1a1a;
  color: #ffffff;
  padding: 50px 20px 30px;
  margin-top: 60px;
}

.footer-content {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.sns-links {
  display: flex;
  gap: 1.5rem;
  list-style: none; /* ここも・が出ないように設定済みです */
  padding-left: 0;
}

.sns-links li a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: #333333;
  color: #ffffff;
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.sns-links li a svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

/* アイコンにホバーした時の色変化と浮き上がりアニメーション */
.sns-links li a:hover {
  transform: translateY(-4px);
}
.sns-links li a.twitter:hover { background-color: #000000; }
.sns-links li a.github:hover { background-color: #6e5494; }

.footer-copy {
  font-size: 0.9rem;
  color: #888888;
}

/* スマホ対応（一番最後に配置） */
@media (max-width: 768px) {
  .hero-content { padding: 1.5rem 1rem; }
  .hero h1 { font-size: 2.5rem; }
  
  .navbar { padding: 0 1rem; justify-content: space-between; overflow: visible; white-space: nowrap; }
  .nav-links { overflow-x: auto; -webkit-overflow-scrolling: touch; flex-grow: 1; padding-right: 1rem; display: flex; list-style: none; }
  .nav-links li a { padding: 1rem 0.8rem; font-size: 0.9rem; }
  
  .lang-menu { margin-left: 10px; position: relative; }
  
  /* mainの余白を完全に排除 */
  main { padding: 0; margin: 2rem 0; width: 100vw; overflow-x: hidden; }
  
  /* section内の要素も余白を調整 */
  section > * {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  /* カードを画面幅ピッタリにして、横スクロールを強制的にオフ */
  section > .content-card {
    padding: 1.5rem 1rem;
    width: 100vw;
    margin-left: 0;
    margin-right: 0;
    border-radius: 0;
  }

  .map-container-inner { display: none; }
  .mobile-controls { display: block; }
  .pref-boxes-wrapper:not(.country-wrapper) { display: none; }
  .country-wrapper { display: block !important; }
  
  .photo-card { flex-direction: column; }
  .slider-container, .tips-area { width: 100%; }
}
