/* 卒業論文ページのスタイルを定義するCSSスクリプトです。
  【修正点】
  - 図2-2の高さを右カラムに合わせるためのクラス (.stretch-col, .h-100, .match-height-img) を追加。
*/
:root {
  --accent: #F48FB1;
  --deep: rgba(225, 245, 254, 0.5);
  --highlight: #FFFFFF;
  --earth: #B39DDB;
  --glass: rgba(240, 248, 255, 0.45);
  --surface: rgba(225, 235, 255, 0.35);
  --fg: #546E7A;
  --muted: #90A4AE;
  --border: rgba(255, 255, 255, 0.6);
  --border-soft: rgba(255, 255, 255, 0.3);
  --r-xl: 28px;
  --r-lg: 20px;
  --container: 1120px;
}

body {
  margin: 0;
  font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  color: var(--fg);
  line-height: 1.8;
  letter-spacing: 0.03em;
}

body::before {
  content: ""; position: fixed; inset: 0; z-index: -99;
  background: linear-gradient(180deg, #E1F5FE 0%, #E3F2FD 40%, #FCE4EC 100%);
}
#bg-clouds, #bg-particles { position: fixed; inset: -10vh -10vw; pointer-events: none; }
#bg-clouds { 
  z-index: -3; 
  opacity: 0.7; 
  background: radial-gradient(closest-side at 25% 30%, rgba(255,255,255,0.5), transparent 80%); 
}

/* ユーティリティクラス */
.m-0 { margin: 0 !important; }
.clearfix::after { content: ""; clear: both; display: table; }
.clear-both { clear: both; }
.h-100 { height: 100%; display: flex; flex-direction: column; }

/* タイトル周り (追従しない部分) */
.title-wrapper {
  text-align: center;
  padding: 10px 20px;
}
.pre-header { padding-top: 30px; padding-bottom: 0; }
.post-header { padding-top: 0; padding-bottom: 20px; }

.thesis-year {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: bold;
}
.thesis-author {
  font-size: 1.1rem;
  color: var(--fg);
  font-weight: bold;
}

/* 追従するヘッダー (タイトル＋ナビ) */
.sticky-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(15px);
  border-bottom: 1px solid var(--border-soft);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  padding: 10px 0;
}

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.main-title {
  font-size: 1.4rem;
  color: var(--accent);
  line-height: 1.2;
}

/* ナビゲーション用のリストスタイル */
nav ul {
  list-style: none;
  display: flex;
  gap: 15px;
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  flex-wrap: wrap; 
}
nav a {
  display: inline-block;
  text-decoration: none;
  color: var(--fg);
  font-weight: bold;
  padding: 10px 24px; 
  line-height: 1.2; 
  text-align: center; 
  box-sizing: border-box; 
  white-space: nowrap; 
  background: rgba(225, 235, 255, 0.5); 
  border-radius: 30px; 
  transition: all 0.3s ease;
}
nav a:hover {
  background: var(--accent);
  color: #fff;
}

/* メインコンテナ */
.container { max-width: var(--container); margin: 20px auto 40px; padding: 0 20px; }

/* カードデザイン */
.card {
  background: var(--glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 40px;
  margin-bottom: 40px;
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
}
.card h2 { color: var(--accent); border-bottom: 2px solid var(--earth); padding-bottom: 10px; margin-top: 0; }
.card h3 { color: var(--earth); margin-top: 30px; margin-bottom: 0; }

/* 段落とリスト */
p {
  margin: 0; 
  text-indent: 1em; 
}
.card ul { background: var(--surface); border-radius: var(--r-lg); padding: 20px 20px 20px 40px; border: 1px solid var(--border-soft); margin: 15px 0; }
li { margin-bottom: 10px; }

/* 画像・図形の基本レイアウト (枠なし) */
figure { margin: 20px 0; text-align: center; }
img { 
  max-width: 100%; 
  height: auto; 
  border: none; 
  background: transparent; 
  box-shadow: none; 
  border-radius: 0; 
}
figcaption { margin-top: 5px; font-size: 0.9rem; color: var(--muted); font-weight: bold; line-height: 1.4; }

/* 指定サイズのクラス */
.float-right { float: right; margin: 0 0 15px 20px; }
.quarter-size { width: 25%; min-width: 150px; }
.third-size { width: 33.333%; min-width: 180px; }
.half-size { width: 50%; min-width: 250px; }
.half-size-center { width: 50%; margin: 20px auto; clear: both; }

.size-0-5x { width: 50%; }
.size-0-7x { width: 70%; } 
.size-1-5x { width: 37.5%; min-width: 200px; } 

.width-50 { width: 50%; margin: 20px auto; }
.width-60 { width: 60%; margin: 20px auto; } 
.full-size { width: 100%; margin: 20px 0; clear: both; }

/* 中央揃えを強制するクラス (画面中央) */
.center-flex {
  justify-content: center !important;
  align-items: center;
  margin-left: auto !important;
  margin-right: auto !important;
}
.center-figure {
  display: block;
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: center;
}

/* 縦並びの制御 */
.stack-vertical {
  display: flex;
  flex-direction: column;
  gap: 15px; 
}

/* 横並びレイアウト */
.flex-row {
  display: flex;
  gap: 20px;
  justify-content: center;
  /* align-itemsをデフォルト(stretch)にして高さを揃える */
  margin: 20px 0;
  clear: both;
}
.flex-row figure {
  flex: 1;
  margin: 0;
}

/* カラムレイアウト */
.left-col { flex: 1; }
.right-col { flex: 1; }

/* 親の高さに合わせて画像を引き伸ばすクラス */
.stretch-col {
  display: flex;
  flex-direction: column;
}
.match-height-img {
  flex: 1;
  object-fit: cover; /* 縦横比を保ちつつ、指定エリアを埋める */
  height: 100%;
}

/* 図の間隔を広げるクラス */
.gap-wide {
  gap: 80px !important;
}

/* コラムエリアのレイアウト */
.column-box {
  border: 2px solid var(--earth);
  border-radius: var(--r-lg);
  padding: 20px;
  margin: 30px 0;
  background: rgba(255, 255, 255, 0.45);
  clear: both;
}
.column-title {
  font-weight: bold;
  color: var(--earth);
  margin-bottom: 10px;
  text-indent: 0;
  font-size: 1.1rem;
}

/* アニメーション */
.fade-in { opacity: 0; transform: translateY(20px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* フッター */
footer { text-align: center; padding: 20px; color: var(--muted); font-size: 0.9rem; }

/* レスポンシブ対応 (スマホ向け) */
@media (max-width: 768px) {
  .header-inner { flex-direction: column; align-items: flex-start; }
  .main-title { font-size: 1.2rem; }
  .card { padding: 20px; border-radius: var(--r-lg); }
  .flex-row { flex-direction: column; display: flex; }
  .quarter-size, .third-size, .half-size, .size-1-5x, .half-size-center, .width-50, .width-60 { width: 100%; min-width: auto; float: none; margin: 20px 0; }
  nav a { width: 100%; padding: 10px; }
  .match-height-img { height: auto; } /* スマホ縦並び時は通常の高さに戻す */
}