@charset "UTF-8";

/* =========================================================================
   Starrydata Modern Theme
   Typography & spacing scale revised for visual balance
   ========================================================================= */

:root {
  /* color — Materials Project 風の紫系パレット */
  --bg:        #1e1b4b;   /* indigo-950 */
  --bg-2:      #312e81;   /* indigo-900 */
  --surface:   #ffffff;
  --text:      #1f1f3a;
  --text-2:    #4b5573;
  --text-3:    #9ca3b8;
  --text-on:   #f8fafc;
  --line:      #e6e6f1;
  --accent:    #a78bfa;   /* violet-400 */
  --accent-2:  #7c3aed;   /* violet-600 */
  --accent-3:  #6366f1;   /* indigo-500 */
  --bg-subtle: #f7f7fb;
  --grad-hero: linear-gradient(135deg, #1e1b4b 0%, #4c1d95 55%, #6d28d9 100%);
  --grad-cta:  linear-gradient(135deg, #7c3aed 0%, #6366f1 100%);
  --grad-accent: linear-gradient(120deg, #a78bfa 0%, #818cf8 100%);
  --shadow-sm: 0 1px 2px rgba(31,31,58,0.04), 0 1px 6px rgba(31,31,58,0.04);
  --shadow-md: 0 4px 8px rgba(31,31,58,0.05), 0 12px 28px rgba(76,29,149,0.08);
  --shadow-lg: 0 16px 36px rgba(76,29,149,0.16);

  /* shape */
  --radius:    16px;
  --radius-sm: 8px;
  --container: 1200px;
  --container-narrow: 920px;

  /* typography scale */
  --fs-h1:     clamp(2.6rem, 5.6vw, 4.4rem);
  --fs-h2:     clamp(1.95rem, 3.4vw, 2.7rem);
  --fs-h3:     1.2rem;
  --fs-lead:   1.13rem;
  --fs-base:   1rem;
  --fs-small:  0.92rem;
  --fs-tiny:   0.82rem;

  /* spacing */
  --gap-section: clamp(72px, 9vw, 120px);
  --gap-card:    28px;
}

/* Reset & base */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  margin: 0;
  font-family: "Inter", "Helvetica Neue", Arial, "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", sans-serif;
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background: var(--bg-subtle);
  font-size: var(--fs-base);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-2); text-decoration: none; transition: color .15s; }
a:hover { color: var(--accent-3); }
ul, ol { padding-left: 1.25em; }
h1, h2, h3, h4 {
  line-height: 1.22;
  font-weight: 700;
  letter-spacing: -0.012em;
  margin: 0;
}
p { margin: 0 0 1em; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 28px; }

/* ---- Header ---- */
.site-header {
  position: sticky; top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.86);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex; align-items: center;
  gap: 32px;
  height: 72px;
}
.site-logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  height: 44px;
}
.site-logo img {
  height: 100%;
  width: auto;
  display: block;
}
.site-logo:hover { opacity: 0.78; }
.site-nav { display: flex; gap: 4px; align-items: center; }
.site-nav a {
  padding: 9px 16px;
  border-radius: 8px;
  color: var(--text-2);
  font-size: 0.95rem;
  font-weight: 500;
}
.site-nav a:hover { background: #f3eefe; color: var(--accent-2); }
.lang-switch {
  margin-left: auto;
  display: inline-flex;
  background: var(--line);
  border-radius: 999px;
  padding: 3px;
}
.lang-switch a {
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-2);
}
.lang-switch a.is-active { background: var(--text); color: #fff; }

/* ---- Hero ---- */
.hero {
  background:
    linear-gradient(rgba(30,27,75,0.25), rgba(30,27,75,0.25)),
    url('../../assets/images/hero/milky_way_katsura.jpg') center 30%/cover no-repeat,
    var(--grad-hero);
  color: var(--text-on);
  padding: clamp(96px, 11vw, 144px) 0 clamp(112px, 12vw, 160px);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 460px at 80% -10%, rgba(167,139,250,0.22), transparent 60%),
    radial-gradient(680px 340px at 0% 110%, rgba(99,102,241,0.16), transparent 60%),
    radial-gradient(1100px 540px at 20% 50%, rgba(30,27,75,0.46), transparent 70%);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; max-width: var(--container-narrow); }
.hero-eyebrow {
  display: inline-block;
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(167,139,250,0.16);
  border: 1px solid rgba(167,139,250,0.45);
  color: #ddd6fe;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  margin-bottom: 28px;
  text-shadow: 0 1px 6px rgba(0,0,0,0.7);
}
.hero h1 {
  font-size: var(--fs-h1);
  line-height: 1.12;
  margin: 0 0 28px;
  font-weight: 800;
  text-shadow: 0 2px 20px rgba(0,0,0,0.55);
}
.hero h1 .accent {
  background: linear-gradient(120deg, #c4b5fd 0%, #a78bfa 50%, #ffffff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.nowrap-grp {
  display: inline-block;
  white-space: nowrap;
}
@media (max-width: 600px) {
  .nowrap-grp { white-space: normal; }
}
.hero .lead {
  font-size: 1.22rem;
  line-height: 1.6;
  max-width: 720px;
  color: rgba(248,250,252,0.88);
  margin: 0 0 40px;
  text-shadow: 0 1px 8px rgba(0,0,0,0.7);
}
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .12s, box-shadow .15s, background .15s;
  line-height: 1;
}
.btn-primary { background: var(--grad-cta); color: #fff; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(124,58,237,.40); color: #fff; }
.btn-ghost {
  background: rgba(255,255,255,0.08);
  color: #fff;
  border-color: rgba(255,255,255,0.28);
}
.btn-ghost:hover { background: rgba(255,255,255,0.15); color: #fff; }
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--text);
}
.btn-outline:hover { background: var(--text); color: #fff; }

/* ---- Sections (rhythm) ---- */
.section { padding: var(--gap-section) 0; }
.section-narrow { padding: clamp(56px, 7vw, 88px) 0; }
.section h2 {
  font-size: var(--fs-h2);
  margin: 0 0 16px;
  letter-spacing: -0.018em;
}
.section .eyebrow,
.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-2);
  font-weight: 700;
  margin-bottom: 14px;
}
.section .lead {
  font-size: var(--fs-lead);
  line-height: 1.6;
  color: var(--text-2);
  max-width: 720px;
  margin: 0 0 56px;
}
/* 折り返さず1行に収めたい lead 用（広い画面では1行、狭い画面では自然折り返し） */
.lead.lead-wide,
.section .lead.lead-wide,
.page-head .lead.lead-wide {
  max-width: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 900px) {
  .lead.lead-wide,
  .section .lead.lead-wide,
  .page-head .lead.lead-wide {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }
}

/* ---- Stats ---- */
.stats {
  background:
    linear-gradient(rgba(30,27,75,0.55), rgba(30,27,75,0.55)),
    url('../../assets/images/hero/milky_way_katsura.jpg') center 65%/cover no-repeat,
    var(--bg);
  color: var(--text-on);
  padding: 96px 0;
  position: relative;
}
.stats::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(900px 260px at 50% 50%, rgba(30,27,75,0.30), transparent 75%);
  pointer-events: none;
}
.stats .container {
  position: relative;
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.stat { text-align: left; }
.stat .num {
  font-size: clamp(2.8rem, 4.6vw, 3.8rem);
  font-weight: 800;
  background: linear-gradient(135deg, #c4b5fd 0%, #a78bfa 50%, #ffffff 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  letter-spacing: -0.025em;
  line-height: 1;
  text-shadow: 0 2px 12px rgba(0,0,0,0.55);
}
.stat .label {
  margin-top: 12px;
  color: rgba(248,250,252,0.78);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-shadow: 0 1px 6px rgba(0,0,0,0.7);
}

/* ---- Feature grid (3 cards) ---- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap-card);
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px 32px;
  transition: transform .15s, box-shadow .2s, border-color .2s;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #d1c4ff;
}
.feature-card .icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: var(--grad-cta);
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  margin-bottom: 22px;
}
.feature-card h3 {
  margin: 0 0 10px;
  font-size: var(--fs-h3);
  letter-spacing: -0.005em;
}
.feature-card p {
  margin: 0;
  color: var(--text-2);
  font-size: 0.98rem;
  line-height: 1.7;
}

/* ---- Research fields ---- */
.fields-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.field-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px;
  display: block;
  color: inherit;
  position: relative;
  overflow: hidden;
  transition: transform .15s, box-shadow .2s, border-color .2s;
}
.field-card::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--grad-cta);
  opacity: 0;
  transition: opacity .2s;
}
.field-card:hover::before { opacity: 1; }
.field-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #d1c4ff;
  color: inherit;
}
.field-card .field-num {
  font-size: 0.78rem;
  color: var(--text-3);
  font-weight: 700;
  letter-spacing: 0.18em;
}
.field-card h3 {
  font-size: 1.15rem;
  margin: 8px 0 4px;
  color: var(--text);
  letter-spacing: -0.005em;
}
.field-card .en {
  font-size: 0.85rem;
  color: var(--text-2);
  letter-spacing: 0.02em;
}

/* ---- Publication / News cards ---- */
.card-grid {
  display: grid; gap: 24px;
  grid-template-columns: repeat(3, 1fr);
}
.mini-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  transition: box-shadow .2s, transform .15s, border-color .2s;
}
.mini-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: #d1c4ff;
}
.mini-card .meta {
  font-size: 0.78rem;
  color: var(--text-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.mini-card .meta .tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 4px;
  background: #f3eefe;
  color: var(--accent-2);
  margin-right: 8px;
  font-weight: 700;
}
.mini-card h3 {
  font-size: 1.1rem;
  margin: 0 0 10px;
  line-height: 1.45;
  letter-spacing: -0.005em;
}
.mini-card h3 a { color: var(--text); }
.mini-card h3 a:hover { color: var(--accent-2); }
.mini-card p {
  margin: 0;
  color: var(--text-2);
  font-size: 0.95rem;
  line-height: 1.65;
  /* clip long text */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.section-foot {
  display: flex; justify-content: center;
  margin-top: 48px;
}

/* ---- News list (top page) ---- */
.news-list-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 4px 28px;
  box-shadow: var(--shadow-sm);
}
.news-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.news-item {
  border-bottom: 1px solid var(--line);
}
.news-item:last-child { border-bottom: none; }
.news-item a {
  display: flex;
  gap: 28px;
  padding: 18px 0;
  color: inherit;
  align-items: baseline;
  transition: background 0.15s;
  margin: 0 -8px;
  padding-left: 8px;
  padding-right: 8px;
  border-radius: 8px;
}
.news-item a:hover { background: var(--bg-subtle); }
.news-date {
  flex: 0 0 92px;
  font-size: 0.88rem;
  color: var(--text-3);
  font-family: "Inter", sans-serif;
  letter-spacing: 0.02em;
  font-weight: 600;
}
.news-text { flex: 1; min-width: 0; }
.news-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}
.news-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  line-height: 1.5;
}
.news-tag-cat {
  background: var(--accent-2);
  color: #fff;
}
.news-tag-sub {
  background: #f3eefe;
  color: var(--accent-2);
  border: 1px solid #e7defb;
}
.news-title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--text);
  line-height: 1.45;
}
.news-item a:hover .news-title { color: var(--accent-2); }
.news-summary {
  margin: 4px 0 0;
  font-size: 0.85rem;
  color: var(--text-2);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
@media (max-width: 600px) {
  .news-item a { flex-direction: column; gap: 6px; padding: 14px 0; }
  .news-date { flex: 0; }
}

/* News ページ専用（一覧ページでは概要を 2 行まで） */
.news-list-page .news-summary {
  -webkit-line-clamp: 2;
}
.news-list-page .news-item a { padding: 22px 8px; }

.news-ext-icon {
  display: inline-block;
  margin-left: 4px;
  color: var(--text-3);
  font-size: 0.85em;
  font-weight: 500;
  transform: translateY(-1px);
}
.news-item a:hover .news-ext-icon { color: var(--accent-2); }

/* ---- News modal ---- */
.news-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 5vh 16px;
}
.news-modal[hidden] { display: none; }
.news-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 12, 41, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  cursor: pointer;
}
.news-modal-panel {
  position: relative;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.35);
  max-width: 760px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 44px 48px 40px;
  animation: news-modal-in 0.18s ease-out;
}
@keyframes news-modal-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.news-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--text-3);
  cursor: pointer;
  border-radius: 8px;
}
.news-modal-close:hover { background: var(--bg-subtle); color: var(--text); }
.news-modal-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-3);
  margin-bottom: 10px;
}
.news-modal-meta time {
  font-family: "Inter", sans-serif;
  letter-spacing: 0.02em;
  font-weight: 600;
}
.news-modal-panel h2 {
  font-size: 1.55rem;
  line-height: 1.35;
  margin: 0 0 22px;
  letter-spacing: -0.01em;
}
.news-modal-panel .article-body { max-width: none; margin: 0; }
.news-modal-panel .article-refs { max-width: none; margin: 0 0 22px; }
@media (max-width: 600px) {
  .news-modal-panel { padding: 36px 22px 26px; }
  .news-modal-panel h2 { font-size: 1.25rem; }
}

/* ---- About prose ---- */
.container-narrow-prose { max-width: 820px; }
.lead-large,
.prose {
  /* 日本語：禁則処理を厳密化 + 末尾バランス改行 */
  line-break: strict;
  overflow-wrap: break-word;
  text-wrap: pretty;
}
.lead-large {
  font-size: clamp(1.12rem, 1.8vw, 1.28rem);
  line-height: 1.7;
  color: var(--text);
  margin: 0 0 22px;
  max-width: 64ch;
}
.lead-large strong {
  color: var(--accent-2);
  font-weight: 700;
  background: linear-gradient(120deg, transparent 0%, transparent 50%, rgba(167,139,250,0.22) 50%, rgba(167,139,250,0.22) 100%);
  padding: 0 2px;
}
.prose {
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--text-2);
  max-width: 68ch;
  margin: 0;
}

/* セクション lead 全般の日本語改行を改善 */
.section .lead,
.cta-band p,
.feature-card p,
.mini-card p,
.app-desc,
.involve-card p,
.hero .lead {
  line-break: strict;
  overflow-wrap: break-word;
  text-wrap: pretty;
}

/* ---- Apps grid ---- */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.app-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: inherit;
  position: relative;
  overflow: hidden;
  height: 340px;
  display: block;
  transition: transform .15s, box-shadow .2s, border-color .2s;
  text-decoration: none;
}
.app-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #c4b5fd;
  color: inherit;
}
.app-card .app-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-subtle);
  z-index: 0;
}
.app-card .app-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: transform 0.4s ease;
  background: #fff;
}
.app-card:hover .app-thumb img { transform: scale(1.03); }
.app-card .app-thumb-placeholder {
  display: grid;
  place-items: center;
  background: var(--grad-cta);
  color: #fff;
  font-size: 3rem;
  font-weight: 700;
}
.app-card .app-body {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 140px;                       /* 全カード統一 (説明文 2 行が収まる高さ) */
  padding: 14px 22px 16px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  border-top: 1px solid rgba(167, 139, 250, 0.18);
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  transition: background 0.2s;
  box-sizing: border-box;
  overflow: hidden;
}
.app-card:hover .app-body {
  background: rgba(255, 255, 255, 0.94);
}

/* === image_layout="top": 横長画像用、画像上 / テキスト下 分離 === */
.app-card[data-image-layout="top"] .app-thumb {
  position: absolute;
  inset: 0 0 140px 0;                   /* テキスト 140px ぶん残す */
  height: auto;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.app-card[data-image-layout="top"] .app-thumb img {
  object-fit: contain;
  object-position: center top;
  padding: 14px;
}
.app-card[data-image-layout="top"] .app-body {
  background: #fff;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-top: 1px solid var(--line);
}
.app-card[data-image-layout="top"]:hover .app-body {
  background: var(--bg-subtle);
}
.app-card .app-icon { display: none; }
.app-card .app-open {
  position: absolute;
  top: 14px; right: 16px;
  font-size: 0.78rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--accent-2);
  font-weight: 600;
  z-index: 2;
}
.app-card h3 {
  font-size: 1.08rem;
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.005em;
  color: var(--text);
}
.app-sub {
  margin: 0;
  font-size: 0.78rem;
  color: var(--accent-2);
  letter-spacing: 0.04em;
  font-weight: 600;
}
.app-desc {
  margin: 4px 0 0;
  color: var(--text-2);
  font-size: 0.84rem;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---- Get involved ---- */
.involve-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.involve-card {
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
}
.involve-card.highlight {
  background: linear-gradient(160deg, #1e1b4b 0%, #312e81 60%, #4c1d95 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-lg);
}
.involve-card.highlight h3 { color: #fff; }
.involve-card.highlight p  { color: rgba(255,255,255,0.82); }
.involve-card h3 {
  font-size: 1.2rem;
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.005em;
}
.involve-card p {
  margin: 0;
  color: var(--text-2);
  font-size: 0.96rem;
  line-height: 1.7;
  flex-grow: 1;
}
.involve-card .tag {
  align-self: flex-start;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  background: #fff;
  color: var(--accent-2);
  border: 1px solid var(--line);
}
.involve-card.highlight .tag {
  background: rgba(255,255,255,0.14);
  color: #ddd6fe;
  border-color: transparent;
}
.involve-card .btn { align-self: flex-start; margin-top: 6px; }
.involve-card.highlight .btn-primary { color: #fff; }

/* ---- Two-column showcase (text + chart) ---- */
.grid-2col {
  display: grid;
  grid-template-columns: 0.95fr 1.25fr;
  gap: 64px;
  align-items: center;
}
.grid-2col .text-col h2 { margin-bottom: 18px; }
.grid-2col .text-col .lead { max-width: none; margin-bottom: 28px; color: var(--text); }
.grid-2col .text-col .lead strong {
  color: var(--accent-2);
  font-weight: 700;
  background: linear-gradient(120deg, transparent 0%, transparent 60%, rgba(167,139,250,0.18) 60%, rgba(167,139,250,0.18) 100%);
  padding: 0 2px;
}

.kv-list {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 24px;
}
.kv-list li {
  display: flex; flex-direction: column;
  padding: 14px 18px;
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.kv-list .k {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  font-weight: 700;
}
.kv-list .v {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  margin-top: 4px;
}

.chart-col {
  background: linear-gradient(180deg, #0f0c29 0%, #1e1b4b 60%, #302b63 100%);
  border-radius: var(--radius);
  padding: 18px 16px 14px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.chart-col::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(500px 240px at 100% 0%, rgba(167,139,250,0.22), transparent 60%),
    radial-gradient(400px 180px at 0% 100%, rgba(99,102,241,0.18), transparent 60%);
  pointer-events: none;
}
.chart-meta {
  margin: 10px 4px 0;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.55);
  text-align: right;
  letter-spacing: 0.02em;
  position: relative;
}

/* ---- Article body (news / topics 個別記事) ---- */
.article-meta {
  font-size: 0.95rem;
  color: var(--text-2);
  margin: 0;
  display: flex;
  gap: 18px;
  align-items: center;
}
.article-meta time {
  font-family: "Inter", sans-serif;
  font-weight: 600;
  color: var(--accent-2);
  letter-spacing: 0.02em;
}
.article-meta .author { color: var(--text-3); font-size: 0.88rem; }

/* ---- Contact page ---- */
.contact-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 32px;
  box-shadow: var(--shadow-sm);
  margin: 0 auto 40px;
  text-align: center;
}
.contact-card-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-2);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.contact-email {
  display: block;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.01em;
  margin-bottom: 18px;
  word-break: break-all;
}
.contact-email:hover { color: var(--accent-2); }
.contact-block { margin: 36px 0; }
.contact-block h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 14px;
  letter-spacing: -0.005em;
}
.contact-topics {
  margin: 0;
  padding-left: 1.4em;
  color: var(--text-2);
}
.contact-topics li { margin: 6px 0; line-height: 1.7; }
.contact-org {
  margin: 0;
  color: var(--text-2);
  line-height: 1.8;
}

.article-refs {
  max-width: 70ch;
  margin: 0 auto 32px;
  padding: 18px 22px;
  background: var(--bg-subtle);
  border-left: 3px solid var(--accent-2);
  border-radius: 6px;
  font-size: 0.94rem;
}
.article-ref + .article-ref { margin-top: 10px; }
.article-ref-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--accent-2);
  background: #fff;
  padding: 2px 9px;
  border-radius: 999px;
  margin-right: 10px;
  vertical-align: middle;
}
.article-ref a {
  color: var(--accent-2);
  text-decoration: underline;
  text-underline-offset: 3px;
  word-break: break-all;
}
.article-ref-doi {
  display: block;
  margin: 4px 0 0 calc(0.72rem * 2 + 10px);
  font-size: 0.78rem;
  color: var(--text-3);
  font-family: "Menlo", monospace;
}

.article-body {
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--text);
  max-width: 70ch;
  margin: 0 auto;
}
.article-body p { margin: 0 0 1.2em; }
.article-body p:last-child { margin-bottom: 0; }
.article-body h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 2em 0 0.6em;
  padding-bottom: 0.4em;
  border-bottom: 2px solid var(--accent-2);
  color: var(--text);
}
.article-body h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 1.8em 0 0.5em;
  color: var(--text);
}
.article-body h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 1.5em 0 0.4em;
  color: var(--text);
}
.article-body a {
  color: var(--accent-2);
  border-bottom: 1px solid transparent;
  transition: border-color .15s;
}
.article-body a:hover { border-bottom-color: var(--accent-2); }
.article-body ul, .article-body ol { margin: 0 0 1.2em; padding-left: 1.5em; }
.article-body li { margin: 0.3em 0; }
.article-body strong, .article-body b { font-weight: 700; }
.article-body em, .article-body i { font-style: italic; }
.article-body img {
  max-width: 100%; height: auto;
  border-radius: 8px;
  margin: 1em 0;
  display: block;
}
.article-body blockquote {
  border-left: 3px solid var(--accent-2);
  margin: 1em 0;
  padding: 0.4em 1em;
  background: var(--bg-subtle);
  color: var(--text-2);
}
.article-body code {
  font-family: "Menlo", "Consolas", monospace;
  background: var(--bg-subtle);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.92em;
}
.article-body table {
  border-collapse: collapse;
  margin: 1em 0;
  width: 100%;
}
.article-body th, .article-body td {
  padding: 8px 12px;
  border: 1px solid var(--line);
}
.article-body th { background: var(--bg-subtle); font-weight: 700; }
.article-foot {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: center;
}

/* ---- Page head (sub-page hero, lightweight) ---- */
.page-head {
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--line);
  padding: clamp(56px, 7vw, 96px) 0 clamp(40px, 5vw, 64px);
}
.page-head h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 0 0 16px;
  letter-spacing: -0.018em;
}
.page-head .lead {
  font-size: var(--fs-lead);
  color: var(--text-2);
  max-width: 720px;
  margin: 0;
  line-break: strict;
  text-wrap: pretty;
}
.section-top-tight { padding-top: clamp(48px, 6vw, 72px); }

/* ---- Team page ---- */
.team-group { margin: 0 0 64px; }
.team-group:last-child { margin-bottom: 0; }
.team-group-title {
  font-size: 1.35rem;
  letter-spacing: -0.005em;
  margin: 0 0 28px;
  padding: 0 0 12px;
  border-bottom: 2px solid var(--accent-2);
  display: flex;
  align-items: baseline;
  gap: 14px;
  color: var(--text);
}
.team-group-title .en {
  font-size: 0.85rem;
  color: var(--text-3);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
}
.team-group-title .count {
  margin-left: auto;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-2);
  background: #f3eefe;
  padding: 3px 12px;
  border-radius: 999px;
  letter-spacing: 0.04em;
}

.team-page-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px 56px;
}
.team-page-card {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  display: flex;
  gap: 22px;
  align-items: flex-start;
  transition: none;
}
.team-page-card:hover {
  box-shadow: none;
  border-color: transparent;
  transform: none;
}
.team-page-card .photo {
  flex-shrink: 0;
  width: 120px;
  height: 160px;
  border-radius: 0;
  overflow: hidden;
  background: linear-gradient(135deg, #c4b5fd, #818cf8);
  position: relative;
}
.team-page-card .photo img {
  object-position: center top;
}
.team-page-card .photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.team-page-card .photo .photo-placeholder {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 2rem;
  font-family: "Inter", sans-serif;
}
.team-page-card .info { flex: 1; min-width: 0; }
.team-page-card .name {
  font-size: 1.15rem;
  margin: 0 0 6px;
  font-weight: 700;
  letter-spacing: -0.005em;
  color: var(--text);
}
.team-page-card .name .en {
  display: block;
  font-size: 0.82rem;
  color: var(--text-3);
  font-weight: 500;
  letter-spacing: 0.04em;
  margin-top: 2px;
}
.team-page-card .role {
  font-size: 0.92rem;
  color: var(--accent-2);
  font-weight: 600;
  margin: 0 0 10px;
}
.team-page-card .aff {
  font-size: 0.88rem;
  color: var(--text-2);
  line-height: 1.6;
  margin: 0;
}
.team-page-card .links {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.team-page-card .links a {
  display: inline-block;
  font-size: 0.78rem;
  padding: 3px 10px;
  border-radius: 4px;
  background: #f3eefe;
  color: var(--accent-2);
  border: 1px solid #e2d5fc;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.team-page-card .links a:hover {
  background: var(--accent-2);
  color: #fff;
  border-color: var(--accent-2);
}

/* Alumni はやや控えめに */
.team-group[data-group="alumni"] .team-page-card { opacity: 0.85; }
.team-group[data-group="alumni"] .team-group-title { border-bottom-color: var(--text-3); }
.team-group[data-group="alumni"] .team-group-title .count { background: #f0f0f5; color: var(--text-2); }

/* Alumni リスト（写真なし、名前のみ） */
.alumni-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 40px;
}
.alumni-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: baseline;
  gap: 14px;
  color: var(--text-2);
}
.alumni-list .name-ja {
  font-size: 1.05rem;
  color: var(--text);
  font-weight: 600;
}
.alumni-list .name-en {
  font-size: 0.85rem;
  color: var(--text-3);
  letter-spacing: 0.04em;
}
@media (max-width: 600px) {
  .alumni-list { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .team-page-grid { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 480px) {
  .team-page-card { flex-direction: column; gap: 14px; }
  .team-page-card .photo { width: 140px; height: 186px; }
  .team-page-card .name { font-size: 1.2rem; }
}

/* ---- Papers page ---- */
.papers-source {
  font-size: 0.85rem;
  color: var(--text-3);
  margin: 16px 0 0;
}
.papers-source a {
  color: var(--accent-2);
  font-weight: 500;
}
.papers-h2 {
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  margin: 0 0 14px;
  letter-spacing: -0.015em;
  color: var(--text);
  display: flex;
  align-items: baseline;
  gap: 16px;
}
.papers-h2 .count {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-2);
  background: #f3eefe;
  padding: 4px 14px;
  border-radius: 999px;
  letter-spacing: 0.04em;
}
.papers-note {
  font-size: 0.95rem;
  color: var(--text-2);
  line-height: 1.7;
  margin: 0 0 32px;
  max-width: 760px;
}

.paper-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.paper-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 28px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.paper-item:last-child { border-bottom: none; }
.paper-item-compact {
  grid-template-columns: 1fr;
  padding: 18px 0;
}
.paper-year-col {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent-2);
  font-family: "Inter", sans-serif;
  letter-spacing: -0.01em;
  line-height: 1;
  text-align: right;
}
.paper-body { min-width: 0; }
.paper-title {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text);
}
.paper-title a {
  color: var(--text);
  border-bottom: 1px solid transparent;
  transition: color .15s, border-color .15s;
}
.paper-title a:hover {
  color: var(--accent-2);
  border-bottom-color: var(--accent-2);
}
.paper-authors {
  margin: 0 0 4px;
  font-size: 0.9rem;
  color: var(--text-2);
  line-height: 1.55;
}
.paper-meta {
  margin: 0 0 4px;
  font-size: 0.88rem;
  color: var(--text-2);
}
.paper-meta .journal { font-style: italic; color: var(--text); }
.paper-meta strong { color: var(--text); font-weight: 700; }
.paper-doi {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-3);
  font-family: "Menlo", "Consolas", monospace;
}
.paper-doi a { color: var(--text-3); }
.paper-doi a:hover { color: var(--accent-2); }
.paper-citations { margin: 6px 0 0; }
.citation-pill {
  display: inline-block;
  padding: 2px 12px;
  background: #f3eefe;
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--accent-2);
}
.citation-pill strong { color: var(--accent-2); font-weight: 700; }

/* ---- Year group (details/summary for citing papers) ---- */
.year-group {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 0 0 14px;
  background: var(--bg-subtle);
  transition: border-color .2s;
}
.year-group[open] {
  border-color: var(--accent-2);
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.year-summary {
  cursor: pointer;
  padding: 16px 22px;
  font-weight: 700;
  color: var(--text);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  transition: background .15s;
}
.year-summary::-webkit-details-marker { display: none; }
.year-summary::before {
  content: "▶";
  display: inline-block;
  margin-right: 12px;
  font-size: 0.7em;
  transition: transform 0.2s;
  color: var(--accent-2);
}
.year-group[open] .year-summary::before { transform: rotate(90deg); }
.year-summary:hover { background: #f3eefe; }
.year-group[open] .year-summary:hover { background: transparent; }
.year-label {
  font-size: 1.18rem;
  letter-spacing: 0.04em;
  color: var(--text);
}
.year-count {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-2);
  background: var(--line);
  padding: 3px 12px;
  border-radius: 999px;
}
.year-group[open] .year-count {
  background: #f3eefe;
  color: var(--accent-2);
  font-weight: 600;
}
.year-group .paper-list { padding: 0 22px 12px; }
.year-group .paper-item-compact:first-child { border-top: 1px solid var(--line); }

@media (max-width: 600px) {
  .paper-item { grid-template-columns: 1fr; gap: 8px; }
  .paper-year-col { text-align: left; font-size: 1.1rem; }
}

/* ---- Research page ---- */
.research-list {
  display: flex;
  flex-direction: column;
  gap: 48px;
}
.research-item {
  border-bottom: 1px solid var(--line);
  padding: 0 0 44px;
}
.research-item:last-child { border-bottom: none; padding-bottom: 0; }
.research-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin: 0 0 18px;
  padding: 0 0 12px;
  border-bottom: 2px solid var(--accent-2);
}
.research-name {
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
  margin: 0;
  letter-spacing: -0.015em;
  color: var(--text);
}
.research-name .en {
  display: block;
  font-size: 0.85rem;
  color: var(--text-3);
  font-weight: 500;
  letter-spacing: 0.06em;
  margin-top: 4px;
  text-transform: uppercase;
}
.research-stats {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  gap: 18px;
}
.research-stats li {
  text-align: right;
}
.research-stats .k {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  font-weight: 700;
}
.research-stats .v {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-2);
  letter-spacing: -0.01em;
}
.research-desc {
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--text);
  max-width: 70ch;
  margin: 0 0 22px;
  line-break: strict;
  text-wrap: pretty;
}
/* テンプレで余分な <br> が出る場合の末尾を消す */
.research-desc br:last-child,
.research-desc br + br { display: none; }
.research-data {
  background: var(--bg-subtle);
  border-left: 3px solid var(--accent-2);
  padding: 18px 22px;
  border-radius: 0 8px 8px 0;
}
.research-data-title {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin: 0 0 12px;
}
.research-data-list {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.research-data-list li {
  background: #fff;
  border: 1px solid var(--line);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.86rem;
  color: var(--text-2);
}
@media (max-width: 640px) {
  .research-head { flex-direction: column; align-items: flex-start; }
  .research-stats { width: 100%; justify-content: flex-start; gap: 20px; }
  .research-stats li { text-align: left; }
}

/* ---- Collaborate CTA ---- */
.cta-band {
  background: var(--grad-hero);
  color: var(--text-on);
  border-radius: var(--radius);
  padding: clamp(56px, 8vw, 80px) clamp(36px, 6vw, 64px);
  margin: 0 auto;
  max-width: var(--container);
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(700px 300px at 100% 0%, rgba(167,139,250,.24), transparent 60%),
    radial-gradient(500px 200px at 0% 100%, rgba(99,102,241,.18), transparent 60%);
}
.cta-band > * { position: relative; }
.cta-band .eyebrow { color: #ddd6fe; }
.cta-band h2 {
  font-size: clamp(2rem, 3.6vw, 2.8rem);
  margin: 0 0 18px;
  max-width: 22ch;
}
.cta-band p {
  max-width: 60ch;
  color: rgba(248,250,252,0.85);
  font-size: 1.13rem;
  line-height: 1.75;
  margin: 0 0 32px;
}

/* ---- Team preview ---- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 28px;
}
.member-card {
  text-align: center;
}
.member-card .photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 0;
  background: linear-gradient(135deg, #cbd5e1, #94a3b8);
  margin: 0 0 16px;
  object-fit: cover;
  object-position: center top;
  overflow: hidden;
}
.member-card h4 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: -0.005em;
}
.member-card .role {
  color: var(--text-2);
  font-size: 0.88rem;
  margin-top: 6px;
  line-height: 1.4;
}

/* ---- Partners / Funding ---- */
.partner-row {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: center; gap: 36px 64px;
  filter: grayscale(0.3);
}
.partner-row .partner {
  height: 38px;
  display: grid; place-items: center;
  color: var(--text-3); font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.02em;
}

/* ---- Footer ---- */
.site-footer {
  background: var(--bg);
  color: rgba(248,250,252,.7);
  padding: 72px 0 40px;
}
.site-footer .container {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 48px;
}
.site-footer h5 {
  color: #fff;
  font-size: 0.95rem;
  margin: 0 0 16px;
  letter-spacing: 0.04em;
  font-weight: 600;
}
.site-footer ul {
  list-style: none;
  margin: 0; padding: 0;
}
.site-footer li { margin: 8px 0; font-size: 0.95rem; }
.site-footer a { color: rgba(248,250,252,.7); }
.site-footer a:hover { color: #fff; }
.site-footer .brand { font-weight: 800; color: #fff; font-size: 1.15rem; }
.site-footer .small { font-size: 0.88rem; color: rgba(248,250,252,.5); line-height: 1.7; }
.footer-bottom {
  border-top: 1px solid rgba(248,250,252,.08);
  margin-top: 44px; padding-top: 22px;
  display: flex; justify-content: space-between;
  font-size: 0.85rem;
  color: rgba(248,250,252,.5);
}

/* ---- Responsive ---- */
@media (max-width: 980px) {
  html { font-size: 15.5px; }
  .site-nav { display: none; }
  .stats .container { grid-template-columns: repeat(2, 1fr); gap: 32px 24px; }
  .feature-grid { grid-template-columns: 1fr; gap: 20px; }
  .fields-grid  { grid-template-columns: repeat(2, 1fr); }
  .card-grid    { grid-template-columns: 1fr; }
  .team-grid    { grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .site-footer .container { grid-template-columns: 1fr 1fr; gap: 36px; }
  .cta-band { padding: 56px 28px; margin: 0 16px; }
  .hero .lead { font-size: 1.1rem; }
  .grid-2col { grid-template-columns: 1fr; gap: 36px; }
  .apps-grid { grid-template-columns: repeat(2, 1fr); }
  .involve-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .apps-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  html { font-size: 15px; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .fields-grid { grid-template-columns: 1fr; }
  .site-footer .container { grid-template-columns: 1fr; }
  .feature-card { padding: 28px 24px; }
  .mini-card { padding: 24px; }
  .stats { padding: 72px 0; }
}
