/* css styles */
/* =============================
   Global variables
   （必要ならここに色変数を追加）
============================= */
:root {
  --text-strong: #ffffff;
}

/* ==========
   Reset (軽め)
=========== */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* =============================
   ページ単位の制御
============================= */
/* index だけ Quarto のタイトルブロックを消す */
body.page-index #title-block-header,
body.page-index .quarto-title-block,
body.page-index .quarto-title {
  display: none !important;
}

/* ============ ダーク用 ============ */
/* 以降は .site-dark スコープの中だけに適用される */
.site-dark {
  font-family: 'Georgia', 'Times New Roman', serif;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 100%);
  color: #ffffff;
  min-height: 100vh;
}

/* ヘッダー（固定） */
.site-dark header {
  position: fixed; top: 0; left: 0; right: 0;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 215, 0, 0.1);
  z-index: 1000;
  transition: all 0.3s ease;
}
.site-dark header.scrolled {
  background: rgba(10, 10, 10, 0.98);
  box-shadow: 0 2px 20px rgba(255, 20, 147, 0.1);
}

.site-dark .header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

/* ロゴ */
.site-dark .logo-wrapper {
  display: flex;
  align-items: center;
  gap: 20px;
  text-decoration: none;
  transition: transform 0.3s ease;
}
.site-dark .logo-wrapper:hover { transform: translateX(5px); }

.site-dark .logo-svg { width: 180px; height: auto; transition: opacity 0.3s ease; }
.site-dark .logo-wrapper:hover .logo-svg { opacity: 0.8; }

/* ナビゲーション */
.site-dark nav { display: flex; gap: 40px; align-items: center; }

.site-dark nav a {
  color: #cccccc;
  text-decoration: none;
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  position: relative;
  padding: 5px 0;
}
.site-dark nav a::after {
  content: '';
  position: absolute; bottom: 0; left: 0;
  width: 0; height: 1px;
  background: linear-gradient(90deg, #00D9FF, #FF1493);
  transition: width 0.3s ease;
}
.site-dark nav a:hover { color: #ffffff; }
.site-dark nav a:hover::after { width: 100%; }

/* メイン */
.site-dark main { padding-top: 80px; }

.site-dark .hero {
  min-height: calc(100vh - 80px);
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  text-align: center; padding: 60px 40px;
  position: relative; overflow: hidden;
}
.site-dark .hero::before {
  content: '';
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.1) 0%, transparent 70%);
  animation: pulse 4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
  50% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.8; }
}
.site-dark .hero-content { position: relative; z-index: 1; }

/* グラデ見出し（h1のグローバル指定はしない） */
.hero .hero-title {
  font-size: 4rem;
  font-weight: 300;
  margin-bottom: 20px;

  background: linear-gradient(135deg, #00D9FF 0%, #FF1493 50%, #FFD700 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;

  text-shadow: 0 0 0.01px rgba(255,255,255,0.001); /* 極小フォールバック */
}

.site-dark .subtitle {
  font-size: 1.2rem; color: #999999; font-weight: 300; letter-spacing: 2px; margin-bottom: 40px;
}
.site-dark .tagline {
  max-width: 700px; font-size: 1rem; line-height: 1.8; color: #cccccc; margin-bottom: 50px;
}

/* CTA ボタン */
.site-dark .cta-buttons { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }
.site-dark .btn {
  padding: 15px 40px; border: 1px solid; text-decoration: none;
  font-size: 14px; letter-spacing: 1px; transition: all 0.3s ease;
  position: relative; overflow: hidden;
}
.site-dark .btn-primary { background: transparent; border-color: #00D9FF; color: #00D9FF; }
.site-dark .btn-primary:hover { background: rgba(0, 217, 255, 0.1); box-shadow: 0 0 20px rgba(0, 217, 255, 0.3); }
.site-dark .btn-secondary { background: transparent; border-color: #FF1493; color: #FF1493; }
.site-dark .btn-secondary:hover { background: rgba(255, 20, 147, 0.1); box-shadow: 0 0 20px rgba(255, 20, 147, 0.3); }

/* レスポンシブ */
@media (max-width: 768px) {
  .site-dark .header-container { padding: 0 20px; height: 70px; }
  .site-dark .logo-svg { width: 140px; }
  .site-dark nav { gap: 20px; }
  .site-dark nav a { font-size: 12px; }
  .hero .hero-title { font-size: 2.6rem; } /* .site-dark ではなく .hero で OK */
  .site-dark .subtitle { font-size: 1rem; }
  .site-dark .tagline { font-size: 0.9rem; }
  .site-dark .cta-buttons { flex-direction: column; width: 100%; max-width: 300px; }
  .site-dark .btn { width: 100%; }
}

/* フェードイン */
.fade-in { opacity: 0; transform: translateY(30px); animation: fadeInUp 1s ease forwards; }
@keyframes fadeInUp { to { opacity: 1; transform: translateY(0); } }
.fade-in:nth-child(2) { animation-delay: 0.2s; }
.fade-in:nth-child(3) { animation-delay: 0.4s; }
.fade-in:nth-child(4) { animation-delay: 0.6s; }

/* =========================
   Contact page components
   (.contact-*)
   ========================= */
.contact-container {
  max-width: 900px;
  margin: 4rem auto;
  text-align: center;
  padding: 1rem;
}

.contact-container h2 {
  font-size: 2.4rem;
  font-weight: 300;
  margin-bottom: 0.5rem;
}

.contact-desc {
  color: #cccccc;
  font-size: 1.1rem;
  margin-bottom: 2.5rem;
}

.icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.icon-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  transition: 0.3s ease;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
}

.icon-card div {
  margin-top: 0.6rem;
  color: #ffffff;
  font-size: 0.95rem;
}

.icon-card:hover {
  background: rgba(255,255,255,0.07);
  transform: translateY(-4px);
}

/* ライトモード用の微調整（必要なら） */
@media (prefers-color-scheme: light) {
  .icon-card {
    border: 1px solid rgba(0,0,0,0.08);
    background: rgba(0,0,0,0.02);
  }
  .icon-card:hover {
    background: rgba(0,0,0,0.05);
  }
  .icon-card div { color: #111; }
}

/* =========================
   About page mini icons
   (.mini-contact-icons / .micon)
   ========================= */
.mini-contact-icons {
  margin-top: 1rem;
  margin-bottom: 2.5rem;
  display: flex;
  gap: 1.2rem;
  align-items: center;
  flex-wrap: wrap;
}

.micon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  text-decoration: none;
  transition: 0.25s ease;
  background: rgba(255,255,255,0.08);
}

.micon:hover {
  background: rgba(255,255,255,0.18);
  transform: translateY(-3px);
}

.micon svg {
  width: 20px;
  height: 20px;
}

/* ライトモードの馴染ませ */
@media (prefers-color-scheme: light) {
  .micon { background: rgba(0,0,0,0.06); }
  .micon:hover { background: rgba(0,0,0,0.12); }
}

/* =========================
   Research listing (grid)
   ========================= */
.research-page .quarto-grid {
  /* 横幅の広いカードを自動で並べる：最小520px、あとは等分 */
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(520px, 1fr));
  gap: 1.6rem;
}

/* カード本体を横長の長方形に（高さを揃えたい場合は min-height を調整） */
.research-page .quarto-grid .quarto-grid-item.card {
  max-width: 100%;
  min-height: 300px;          /* 好みで 220–300px 程度に */
  padding: 1.0rem 1.2rem;
  border-radius: 10px;
}

/* サムネ：上部に横長で表示（トリミングは cover） */
.research-page .quarto-grid .card-img-top {
  height: 220px;              /* 横長に見せたいなら 160–220px くらい */
  width: 100%;
  object-fit: cover;
  border-radius: 8px;         /* 角丸（不要なら削除） */
  margin-bottom: 0.75rem;
}

/* タイトルや本文を整える（必要なら） */
.research-page .quarto-grid .card-title {
  font-size: 1.05rem;
  line-height: 1.3;
  margin-bottom: 0.25rem;
}
.research-page .quarto-grid .card-text {
  color: #cfcfcf;
  display: -webkit-box;
  -webkit-line-clamp: 3;      /* 抜粋は3行で省略 */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ホバー時の軽い演出（任意） */
.research-page .quarto-grid .quarto-grid-item.card:hover {
  transform: translateY(-3px);
  transition: transform .2s ease;
}
