/* =========================================================
   style.css (整理版)
   目的: 重複排除 / 追記の一元化 / セクション別コメント整備
   ========================================================= */

/* ========== Base ========== */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: var(--accent); }
.container { max-width: 1080px; margin: 0 auto; padding: 1.5rem; }

h1, h2, h3, h4, h5, h6, p { margin: 0 0 1em; }

/* フォント/本文基調 */
body{
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  font-family: "Zen Kaku Gothic New", "Noto Sans JP", "Hiragino Sans",
               "Helvetica Neue", system-ui, -apple-system, sans-serif;
  font-weight: 400;
  line-height: 1.8;
}
h1, h2, .site-title, .name-ja { font-weight: 700; }
h3, h4, .section h2, .name-en { font-weight: 500; }
p, li, span, .field, .title, .lead { font-weight: 400; }

/* ===== THEME（色定義） ===== */
:root{
  --bg:#FFF9F5; --surface:#FFFFFF; --text:#2D2A26; --muted:#5F5B55; --border:#EDE5DE;
  --accent:#C81E6E; --accent-weak:#FDEAF2; --accent-contrast:#FFFFFF; --accent-ink:#631236;
}

/* ========== Header ========== */
.site-header{
  position: sticky; top: 0; z-index: 1000;
  background: transparent;
  transition: background .25s, backdrop-filter .25s, box-shadow .25s;
}
.site-header.is-solid{
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  box-shadow: 0 6px 20px rgba(0,0,0,.06);
}
.header-inner{ display:flex; align-items:center; justify-content:space-between; }

/* Logo */
.site-header .logo,.site-header .brand{ display:flex; align-items:center; min-height:56px; }
.site-header .logo img,.site-header .brand img,
.site-header .logo svg,.site-header .brand svg{
  display:block; width:clamp(150px,12vw,260px) !important; height:auto !important; max-height:none !important;
}
.site-header.is-solid .logo img,.site-header.is-solid .brand img,
.site-header.is-solid .logo svg,.site-header.is-solid .brand svg{
  width:clamp(140px,10vw,220px) !important;
}

/* Global Nav / Drawer */
.menu-trigger{
  display:none; border:0; background:transparent; cursor:pointer;
  width:44px; height:44px; border-radius:10px; position:relative; color:#111; z-index:2001;
}
.menu-trigger span{
  position:absolute; left:10px; right:10px; height:2px; border-radius:1px;
  background:currentColor; transition:transform .2s, opacity .2s; box-shadow:0 0 .5px rgba(0,0,0,.15);
}
.menu-trigger span:nth-child(1){ top:14px; }
.menu-trigger span:nth-child(2){ top:21px; }
.menu-trigger span:nth-child(3){ top:28px; }
.menu-trigger[aria-expanded="true"] span:nth-child(1){ transform:translateY(7px) rotate(45deg); }
.menu-trigger[aria-expanded="true"] span:nth-child(2){ opacity:0; }
.menu-trigger[aria-expanded="true"] span:nth-child(3){ transform:translateY(-7px) rotate(-45deg); }

.global-nav ul{ display:flex; gap:1rem; padding:0; margin:0; list-style:none; }
.global-nav a{ padding:.5rem .75rem; border-radius:8px; }
.global-nav a:hover{ background: color-mix(in srgb, var(--accent) 12%, transparent); }

@media (max-width: 768px){
  .menu-trigger{ display:inline-flex; align-items:center; justify-content:center; }
  .global-nav{
    position:fixed; inset:0 0 0 auto; width:min(80vw, 320px);
    background:#fff; padding:1rem; box-shadow:-8px 0 24px rgba(0,0,0,.08);
    transform:translateX(100%); transition:transform .25s; z-index:2000;
  }
  .global-nav.is-open{ transform:translateX(0); }
  .global-nav ul{ flex-direction:column; gap:.25rem; }
  html.no-scroll, body.no-scroll{ overflow:hidden; }
}
@media (min-width: 769px){
  .menu-trigger{ display:none !important; }
  #global-nav[hidden]{ display:block !important; }
  .global-nav{ position:static; inset:auto; width:auto; transform:none !important; box-shadow:none; padding:0; }
}

/* ========== Hero ========== */
.hero{
  position: relative; overflow:hidden;
  min-height:44vh; display:grid; place-items:center;
  background:linear-gradient(180deg, var(--accent-weak), var(--surface));
}
.hero--detail.hero--bg{
  position:relative; min-height:clamp(220px,26vw,360px);
  display:grid; place-items:center; color:#fff;
  background-image:
    linear-gradient(to bottom, rgba(255,255,255,.28), rgba(9,47,86,.50)),
    url("../assets/hero/index-hero.jpg");
  background-size:cover; background-position:center;
}
.hero .hero-inner{ position:relative; z-index:2; }
.hero__bg{ position:absolute; inset:0; z-index:0; }
.hero__bg img{ width:100%; height:100%; object-fit:cover; display:block; }
.hero__overlay{ position:absolute; inset:0; z-index:1; pointer-events:none; }
.hero__overlay--light{ background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,.15)); }

.hero--index .hero-inner{
  display:flex; flex-direction:column; align-items:flex-start; justify-content:flex-end;
  min-height: clamp(240px, 40vw, 460px);
  padding: clamp(20px, 4vw, 40px);
  text-align:left;
}
.hero--index h1{ font-size: clamp(2rem, 1.4rem + 2vw, 3rem); margin-bottom:.6em; }
.hero--index .lead{ font-size: clamp(1rem, .9rem + 1vw, 1.4rem); max-width: 40em; }

.hero__lead{
  max-width:min(980px, 90vw); margin:0 auto; padding:clamp(12px,2vw,20px);
  font-weight:700; line-height:1.65; font-size:clamp(1.1rem, .9rem + 1.2vw, 1.8rem);
  text-shadow:0 1px 2px rgba(0,0,0,.25);
}
@media (min-width:1024px){
  .hero__lead{ font-size:clamp(2rem, 1.2rem + 2vw, 3rem); line-height:1.5; }
}
/* ヒーローのタイプライタ演出 */
.hero--index .lead.typewriter{ position:relative; white-space:pre-wrap; }
.hero--index .lead.typewriter::after{ content:"│"; margin-left:.08em; animation: tw-blink 1s step-end infinite; }
@keyframes tw-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce){ .hero--index .lead.typewriter::after{ display:none; } }

/* ========== Filters & Tags（トップ） ========== */
.filters{ display:grid; gap:.75rem; }
.active-tags{ min-height:28px; display:flex; flex-wrap:wrap; gap:.5rem; }
.tag-cloud{ display:flex; flex-wrap:wrap; gap:.5rem; }

.chip,.chip-active{
  display:inline-flex; align-items:center; gap:.35rem; padding:.35rem .65rem; border-radius:999px; font-size:.9rem;
  border:1px solid color-mix(in srgb, var(--accent) 35%, white);
  background:color-mix(in srgb, var(--accent) 10%, white);
  color:var(--accent-ink); transition: transform .12s, box-shadow .12s, background .12s;
}
.chip:hover{ transform:translateY(-1px); box-shadow:0 4px 12px rgba(2,6,23,.08); background:color-mix(in srgb, var(--accent) 18%, white); }
.chip-active{ background:var(--accent); border-color:var(--accent); color:var(--accent-contrast); }
.chip-active button{ color:var(--accent-contrast); }

/* ラベル */
.labels{ display:flex; flex-wrap:wrap; gap:.35rem; margin:.25rem 0 .4rem; }
.label{
  display:inline-flex; align-items:center; line-height:1; padding:.22rem .55rem; border-radius:999px; font-size:.8rem;
  background: color-mix(in srgb, var(--accent) 10%, white);
  border:1px solid color-mix(in srgb, var(--accent) 25%, white);
  color: var(--accent-ink);
}
.label--ok{    background:#E7F7F1; border-color:#BDE7DB; color:#0B3A2E; }
.label--women{ background:#FDEAF2; border-color:#F6C6DA; color:#6B1840; }
.label-chip{ cursor:pointer; user-select:none; }
.label-chip[aria-pressed="true"]{ background:var(--accent); border-color:var(--accent); color:var(--accent-contrast); }
/* 凡例は非表示 */
#labels-legend,.legend--labels,.labels-legend{ display:none !important; }

/* ========== Cards (一覧) ========== */
.card-grid{ display:grid; grid-template-columns: repeat(12,1fr); gap:1.25rem; }
.card{ grid-column: span 4; background:#fff; border-radius:16px; overflow:hidden; box-shadow:0 6px 18px rgba(0,0,0,.06); transition: transform .18s, box-shadow .18s; cursor:pointer; }
.card:hover{ transform:translateY(-4px); box-shadow:0 12px 28px rgba(0,0,0,.1); }
.card img{ aspect-ratio:16 / 9; object-fit:cover; border-radius:16px; }
.card-body{ padding:1rem 1rem 1.1rem; background:var(--surface); border-radius:16px; box-shadow:0 6px 18px rgba(0,0,0,.08); margin-top:-18px; position:relative; z-index:1; }
.card h3{ margin:.2rem 0; font-size:1.15rem; }
.card .meta{ color:#667085; font-size:.92rem; margin:.15rem 0 .35rem; }
.card .tags{ display:flex; gap:.35rem; padding:0; margin:.35rem 0; list-style:none; flex-wrap:wrap; }
.card .tag{ padding:.25rem .55rem; border-radius:999px; border:1px solid #e5e7eb; background:#f8fafc; cursor:pointer; }
.card .lead{ color:var(--muted); 
  font-size: 1.3rem;      /* ひとつ前で見やすかったサイズ */
  font-weight: 500;
  line-height: 1.6;
  color: #7c7a6f;
  margin-bottom: 0.5rem; }
#cards .card:hover img{ transform:scale(1.03); transition:transform .45s cubic-bezier(.2,.6,.2,1); }
@media (max-width:1024px){ .card{ grid-column: span 6; } }
@media (max-width:640px){ .card{ grid-column: span 12; } }

/* カードの“浮き”演出 */
#cards .card{ background: transparent !important; box-shadow: none !important; overflow: visible; position: relative; }
#cards .card-body{
  background:#fff; border-radius:16px; box-shadow:0 10px 24px rgba(0,0,0,.10);
  margin:-18px 0 0; padding:1rem 1rem 1.1rem; z-index:2; transition: transform .18s ease, box-shadow .18s ease;
}
#cards .card:hover .card-body{ transform: translateY(-2px); box-shadow:0 16px 32px rgba(0,0,0,.14); }
#cards .card img{ filter: drop-shadow(0 8px 16px rgba(0,0,0,.06)); transition: transform .45s cubic-bezier(.2,.6,.2,1); }
#cards .card:hover img{ transform: scale(1.02); }

/* ========== Pager ========== */
.pager{ display:flex; align-items:center; justify-content:center; gap:.5rem; padding:1rem 0 2rem; }
.btn{ padding:.5rem .9rem; border-radius:10px; border:1px solid #d1d5db; background:#fff; cursor:pointer; }
.btn-ghost{ background:transparent; }
.pages button{ margin:0 .1rem; padding:.45rem .7rem; border-radius:8px; border:1px solid #d1d5db; background:#fff; cursor:pointer; }
.pages button[aria-current="page"]{ background:var(--accent); color:var(--accent-contrast); border-color:var(--accent); }

/* ========== Detail（画像・プロフィール・本文） ========== */
/* main.jpg */
.main-figure{ margin: clamp(12px, 2.2vw, 22px) auto clamp(8px, 2vw, 20px); max-width:min(1100px, 94vw); }
.main-figure img{ width:100%; height:auto; display:block; border-radius:12px; }

/* 基本情報 */
.profile{
  max-width:min(960px, 92vw); margin:0 auto clamp(48px, 6vw, 72px);
  font-size: clamp(1rem, .95rem + .35vw, 1.125rem); line-height:1.8;
}
.profile .name-ja{ font-size:clamp(1.4rem, 1.1rem + 1.2vw, 2rem); line-height:1.3; margin:.2rem 0; font-weight:800; }
.profile .name-en{ opacity:.9; font-size:clamp(1.05rem, .95rem + .6vw, 1.25rem); margin:.2rem 0 .6rem; }
.profile .title{ font-weight:600; margin:0 0 .6rem; }
.profile .field{ margin:.2rem 0 .9rem; }
.tags.faculty{ display:flex; flex-wrap:wrap; gap:.45rem .55rem; padding:0; list-style:none; margin:0 0 1.2rem; }
.tags.faculty .tag{ display:inline-block; padding:.5rem .7rem; border-radius:999px; background:#eef3ff; border:1px solid #d6e2ff; font-size:.95em; line-height:1; }

/* 本文ブロック */
.section{ max-width:min(960px,92vw); margin:0 auto clamp(28px, 4vw, 40px); font-size:clamp(1rem, .95rem + .35vw, 1.125rem); line-height:1.9; }
.section h2{ font-size:clamp(1.15rem, 1rem + .9vw, 1.6rem); margin:0 0 .6rem; }
.section p + p{ margin-top:.9em; }
.section p{ font-size: 1.125rem; line-height: 1.8; margin-bottom: 1.25em; }

/* 見出し装飾（記事側） */
#detail #content .section{ margin:2.4rem 0; }
#detail #content h2{
  position:relative; font-size:1.8rem; font-weight:600; margin:2em 0 1.2em; padding-bottom:.3em; color:#333;
}
#detail #content h2::after{ content:""; position:absolute; left:0; bottom:0; width:100%; height:4px; background:#eee; z-index:1; }
#detail #content h2::before{ content:""; position:absolute; left:0; bottom:0; width:30%; height:4px; background:#7bb3a6; z-index:2; }

/* 画像ブロック */
#detail #content .subimg{
  overflow:hidden; border-radius:10px; box-shadow:0 4px 10px rgba(0,0,0,.06); background:#f8f8f8; margin:1rem 0 2rem;
}
#detail #content .subimg img{ width:100%; height:100%; aspect-ratio:4 / 3; object-fit:cover; display:block; }
#detail #content .subimg figcaption{ font-size:.9rem; color:#666; padding:.5rem .75rem .7rem; }
#detail #content .subimg[data-ratio="16/9"] img{ aspect-ratio:16 / 9; }
#detail #content .subimg[data-ratio="1/1"]  img{ aspect-ratio:1 / 1; }
#detail #content .subimg[data-ratio="3/4"]  img{ aspect-ratio:3 / 4; }

/* レイアウト（左右画像） */
@media (min-width:1000px){
  #detail #content .section.img-right{ display:grid; grid-template-columns:1.1fr .9fr; gap:24px; align-items:start; }
  #detail #content .section.img-right p{ grid-column:1; }
  #detail #content .section.img-right .subimg{ grid-column:2; }

  #detail #content .section.img-left{ display:grid; grid-template-columns:.9fr 1.1fr; gap:24px; align-items:start; }
  #detail #content .section.img-left .subimg{ grid-column:1; }
  #detail #content .section.img-left p{ grid-column:2; }

  #detail #content .img-wide .subimg{ max-width:900px; margin:14px auto 2rem; }
  #detail #content .img-wide .subimg img{ aspect-ratio:16 / 9; }
}
@media (max-width:999.98px){
  #detail #content .section.img-right,
  #detail #content .section.img-left{ display:block; }
}

/* 本文系タイポ拡大（PC） */
@media (min-width:1024px){
  .profile{ font-size:1.15rem; line-height:1.9; }
  .profile .name-ja{ font-size:2.2rem; }
  .profile .name-en,.profile .title,.profile .field{ font-size:1.15rem; }
  .section{ font-size:1.15rem; line-height:1.9; }
  .section h2{ font-size:1.6rem; }
}

/* ========== CTA / Pager ========== */
.detail-cta{ margin-top:3rem; padding:1.5rem; background:#f7f9fc; border-radius:16px; border:1px solid #e6eefc; }
.detail-cta h3{ margin:0 0 .8rem; font-size:1.1rem; }
.link-list{ display:grid; grid-template-columns:1fr; gap:.6rem; margin-bottom:1rem; }
.link-list a{ display:inline-flex; align-items:center; gap:.5rem; padding:.5rem .75rem; border:1px solid #dbe7ff; border-radius:10px; }
.link-list a:hover{ background:#eef5ff; }
.lab-link{ margin:.3rem 0 1rem; display:inline-block; border-bottom:1px dashed #254c90; padding-bottom:2px; }
.contact-button{ display:inline-block; padding:.9rem 1.2rem; border-radius:9999px; font-weight:700; border:1px solid #2b5db3; }
.contact-banner{ display:block; border-radius:16px; overflow:hidden; border:1px solid #dbe7ff; }
.contact-banner img{ width:100%; height:auto; }

.detail-pager{ margin-top:2rem; display:flex; justify-content:space-between; align-items:stretch; gap:.75rem; }
.detail-pager a{
  flex:1 1 0; display:inline-flex; align-items:center; justify-content:center;
  padding:.9rem 1rem; border:1px solid #dbe7ff; border-radius:12px; font-weight:600;
}
.detail-pager a:hover{ background:#eef5ff; }
.detail-pager .prev::before{ content:"← "; }
.detail-pager .next::after{ content:" →"; }
.detail-pager .spacer{ flex:1 1 0; visibility:hidden; }

/* ========== Footer ========== */
.site-footer{ margin-top:3rem; background:var(--surface); border-top:1px solid var(--border); }
.site-footer .container{ padding:1.25rem; color:#6b7280; }

/* ========== Reveal Animation ========== */
.reveal{ opacity:0; transform:translateY(16px); transition: opacity .4s ease, transform .4s ease; }
.reveal.in{ opacity:1; transform:none; }

/* ========== トップ：About/Filter 微調整 ========== */
/* 共通セクション余白（トップページ用） */
section.container{ margin-top:2rem; margin-bottom:2rem; padding-top:1rem; padding-bottom:1rem; }
section.container.reveal{ margin-top:1.5rem; margin-bottom:1.5rem; }

/* About 下の余白を軽減、次セクションを詰める */
#about{ margin-bottom: .75rem; }
#about + section.container{ margin-top: .75rem; }
#about .lead-title{ margin-bottom:.5rem; }
#about .lead-text{ margin-top:0; margin-bottom:.75rem; line-height:1.8; }

/* フィルタブロック（薄グレー背景＋説明） */
.filter-section{
  max-width:1200px; margin:2rem 0; padding:1.5rem; background:#f7f7f7; border-radius:8px;
}
.filter-title{ color:#2C3E50; font-size:1.25rem; font-weight:600; margin-bottom:.5rem; }
.filter-desc{ font-size:.95rem; color:#555; margin-bottom:1rem; }

/* アクティブタグ（空時のプレースホルダ） */
.active-tags{
  min-height:2rem; display:flex; align-items:center; gap:.5rem;
  margin-bottom:1rem; color:#888; font-size:.9rem;
}
.active-tags:empty::before{ content:"現在、選択されているラベルはありません"; }

/* タグ（カード/プロフィール共通） */
.tag{
  background:#e0f0ff; color:#005a9c; border:1px solid #aad2f5;
  border-radius:4px; padding:.25em .6em; font-size:.85em; display:inline-block; margin:.2em; line-height:1.4;
}

/* ========== Detail：余白の“すき間”解消（profile直下） ========== */
#detail .profile{ margin-bottom:0 !important; }
#detail article#content.container{ padding-top:0 !important; }
#detail #content .section:first-of-type{ margin-top:0 !important; }

/* ========== Responsive 微調整 ========== */
/* スマホ：詳細ヒーローのリードを大きめに */
@media (max-width:600px){
  .hero--detail .hero__lead{
    font-size: clamp(1.25rem, 5.2vw, 1.5rem);
    line-height: 1.85;
    letter-spacing: .02em;
  }
  /* CTA/関連リンク/戻るボタンの左右余白を少し詰める */
  .footer-cta-block, .researcher-links, .back-to-index{
    padding-left:1rem !important;
    padding-right:1rem !important;
  }
}
/* =========================================================
   Patch: 1140px 幅のセクション調整
   --------------------------------------------------------- */

/* フィルターセクション */
.filter-section {
  max-width: 1140px;   /* ←本文より少し広め */
  margin: 2rem auto;
  padding: 1.5rem;
  background: #f7f7f7;
  border-radius: 8px;
}

/* 詳細ページのCTA */
.detail-cta {
  max-width: 1140px;   /* ←本文より少し広め */
  margin: 3rem auto;
  padding: 1.5rem;
  background: #f7f9fc;
  border-radius: 16px;
  border: 1px solid #e6eefc;
}

/* =========================================================
   Detail: JSONの layout / ratio に対応したスタイル(2025.09.25)
   ========================================================= */

/* --- layout: img-wide --- */
#detail #content .section.img-wide .subimg {
  max-width: 900px;
  margin: 14px auto 2rem;
}
#detail #content .section.img-wide .subimg img {
  aspect-ratio: 16 / 9;
}

/* --- layout: img-left --- */
@media (min-width:1000px) {
  #detail #content .section.img-left {
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    gap: 24px;
    align-items: start;
  }
  #detail #content .section.img-left .subimg { grid-column: 1; }
  #detail #content .section.img-left p { grid-column: 2; }
}

/* --- layout: img-right --- */
@media (min-width:1000px) {
  #detail #content .section.img-right {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 24px;
    align-items: start;
  }
  #detail #content .section.img-right p { grid-column: 1; }
  #detail #content .section.img-right .subimg { grid-column: 2; }
}

/* --- ratio: data-ratio 属性で切り替え --- */
#detail #content .subimg[data-ratio="16/9"] img { aspect-ratio: 16 / 9; }
#detail #content .subimg[data-ratio="4/3"]  img { aspect-ratio: 4 / 3; }
#detail #content .subimg[data-ratio="1/1"]  img { aspect-ratio: 1 / 1; }
#detail #content .subimg[data-ratio="3/4"]  img { aspect-ratio: 3 / 4; }


.hero-inner h1{
  color: #223344; /* 黒ではなく濃紺 */
  font-size: 2rem;
  font-weight: bold;
}

h2 .lead-title {
  color: #136fb3; /* 補足の鮮やかブルー */
  font-size: 1.2rem;
  line-height: 1.6;
}
/*20251031-----------*/
.researcher-links .pub-list{
  margin: .5rem 0 0 1.4rem; /* 箇条書きの字下げ */
  padding: 0;
  line-height: 1.7;
}
.researcher-links .pub-list li{
  margin: .2rem 0;
}
/* 2025-11-19 本番：静止画HERO版 --------------------- */

/* 全体ラッパー */
.hero {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

/* picture / img 共通 */
.hero-picture,
.hero-picture img {
  display: block;
  width: 100%;
  height: auto;   /* 基本は縦横比そのまま */
}

/* PC（821px以上） → 画像の比率そのまま表示 */
@media (min-width: 821px) {
  .hero {
    height: auto;              /* ★ 固定高さをやめる */
  }

  .hero-picture img {
    width: 100%;
    height: auto;              /* ★ 画像本来の縦横比で */
    object-fit: contain;       /* もしくは これ自体なくてもOK */
    /* object-position は不要（contain なら効かない） */
  }
}

/* SP（820px以下）は画像の比率優先で高さオート */
@media (max-width: 820px) {
  .hero {
    height: auto;   /* 縦長画像をそのまま見せる */
  }

  .hero-picture img {
    width: 100%;
    height: auto;
    object-fit: contain; /* ここは今のままでOK */
    object-position: center top; /* ← 切る位置を微調整 */
  }
}
/*add 20251117 ------------------*/
.sp-br {
  display: none;
}

@media screen and (max-width: 600px) {
  .sp-br {
    display: block;
  }
}
