/* =========================================================
 * Miura Urban Design Lab - Custom styles
 * Override sur le thème Ollie (Devcrud / Bootstrap 4.3)
 * Pour modifier la palette, éditer les variables --mudl-* ci-dessous.
 * ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;500;700;900&family=Noto+Serif+JP:wght@400;500;700&display=swap');

:root {
  /* Palette du laboratoire (modifiable) */
  --mudl-primary: #1f4e5f;
  --mudl-primary-dark: #163942;
  --mudl-accent: #d97757;
  --mudl-text: #1a1a1a;
  --mudl-text-muted: #6c757d;
  --mudl-text-en: #8a8a8a;
  --mudl-bg: #ffffff;
  --mudl-bg-soft: #f7f5f2;
  --mudl-border: #e6e6e6;

  --mudl-font-jp: 'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic', 'Meiryo', sans-serif;
  --mudl-font-en: 'Raleway', 'Helvetica Neue', Arial, sans-serif;
}

body {
  font-family: var(--mudl-font-jp);
  color: var(--mudl-text);
  background-color: var(--mudl-bg);
}

a, .btn-link { color: var(--mudl-primary); }
a:hover, .btn-link:hover { color: var(--mudl-primary-dark); }

.btn-primary, .bg-primary {
  background-color: var(--mudl-primary) !important;
  border-color: var(--mudl-primary) !important;
}
.btn-primary:hover, .btn-primary:focus {
  background-color: var(--mudl-primary-dark) !important;
  border-color: var(--mudl-primary-dark) !important;
}
.text-primary { color: var(--mudl-primary) !important; }

.section-title {
  font-family: var(--mudl-font-jp);
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* Neutralise le soulignement rouge du thème Ollie d'origine */
.boder_bottom_red {
  text-decoration: none !important;
  border-bottom: none !important;
}
/* Titres de sous-groupes (Faculty / M2 / M1 / B4 / etc.) */
.team-group-title {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  margin-bottom: 1.5rem;
  padding-left: 0.85rem;
  border-left: 3px solid var(--mudl-primary);
}
.team-group-title small {
  font-size: 0.6em;
  color: var(--mudl-text-en);
  letter-spacing: 0.15em;
  font-weight: 400;
  margin-left: 0.5em;
}

/* Titres de blocs Contact (Adresse / Liens) */
.contact-block-title {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
}
.contact-block-title small {
  font-size: 0.65em;
  color: var(--mudl-text-en);
  letter-spacing: 0.15em;
  font-weight: 400;
  margin-left: 0.4em;
}

/* ---------- Navigation ---------- */
.navbar {
  background-color: rgba(255,255,255,0.97) !important;
  border-bottom: 1px solid var(--mudl-border);
  padding: 0.5rem 0;
}
.navbar-brand {
  font-family: var(--mudl-font-jp);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--mudl-text) !important;
  line-height: 1.1;
  margin-left: 10px;
}
.navbar-brand small {
  display: block;
  font-size: 0.65rem;
  color: var(--mudl-text-en);
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.navbar-nav .nav-link {
  font-family: var(--mudl-font-jp);
  font-weight: 500;
  color: var(--mudl-text) !important;
  text-align: center;
  padding: 0.25rem 0.85rem !important;
  line-height: 1.2;
}
.navbar-nav .nav-link small {
  display: block;
  font-size: 0.6rem;
  color: var(--mudl-text-en);
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 2px;
}
.navbar-nav .nav-link:hover, .navbar-nav .nav-link.active {
  color: var(--mudl-primary) !important;
}

/* ---------- Pattern bilingue ---------- */
.bilingual { margin-bottom: 1.5rem; }
.bilingual .jp {
  display: block;
  font-family: var(--mudl-font-jp);
  color: var(--mudl-text);
  line-height: 1.7;
}
.bilingual .en {
  display: block;
  font-family: var(--mudl-font-en);
  color: var(--mudl-text-en);
  font-size: 0.9em;
  line-height: 1.55;
  margin-top: 0.4em;
  font-style: italic;
}
h1.bilingual .jp, h2.bilingual .jp, h3.bilingual .jp, h4.bilingual .jp {
  font-weight: 700;
  letter-spacing: 0.04em;
}
h1.bilingual .en, h2.bilingual .en, h3.bilingual .en, h4.bilingual .en {
  font-size: 0.55em;
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-top: 0.2em;
  color: var(--mudl-text-en);
}

/* ---------- Hero (avec carrousel d'images en fond) / Hero (with image background carousel) ----------
   日本語: ヒーローセクションは3層構造:
           1. .hero-carousel  → 背景画像（5枚がクロスフェード）
           2. .hero-overlay   → 研究室カラー（ティール）の半透明オーバーレイ
           3. .container      → 前面のテキスト
   ENGLISH: The hero is built in 3 layers:
            1. .hero-carousel  → background images (5 slides cross-fading)
            2. .hero-overlay   → semi-transparent teal overlay (lab color)
            3. .container      → foreground text
*/
.lab-hero {
  position: relative;
  color: #fff;
  padding: 7rem 0 5rem;
  margin-top: -70px;
  overflow: hidden;
  /* 背景フォールバック（画像が読み込めない場合）/ Background fallback if images fail to load */
  background: linear-gradient(135deg, var(--mudl-primary) 0%, var(--mudl-primary-dark) 100%);
}

/* 背景カルーセル / Background carousel */
.hero-carousel {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;  /* クロスフェード時間 / Cross-fade duration */
}
.hero-slide.is-active {
  opacity: 1;
}

/* カラーオーバーレイ / Color overlay
   日本語: 研究室のティールカラーで画像を覆い、文字を読みやすくします。
           濃度を調整するには alpha 値 (0.55) を変更してください (0=透明, 1=不透明)。
   ENGLISH: Covers the images with the lab teal to keep text readable.
            Adjust intensity by changing the alpha value (0.55 below; 0=transparent, 1=opaque).
*/
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    135deg,
    rgba(31, 78, 95, 0.50) 0%,    /* --mudl-primary at 78% */
    rgba(22, 57, 66, 0.60) 100%   /* --mudl-primary-dark at 85% */
  );
}

/* 前面のテキスト / Foreground text */
.lab-hero .container {
  position: relative;
  z-index: 2;
}
.lab-hero::before {
  /* 既存の装飾的なラジアルグラデーション（オーバーレイの上に重ねる）/ Existing decorative radial gradient (kept on top of overlay) */
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.06) 0, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(255,255,255,0.04) 0, transparent 50%);
}

.lab-hero h1 {
  font-family: var(--mudl-font-jp);
  font-weight: 900;
  font-size: 3.5rem;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  /* テキストに微かな影をつけて、画像の明るい部分でも読みやすく
     Subtle text shadow for readability against brighter image areas */
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.lab-hero h1 small {
  display: block;
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.4em;
  margin-bottom: 1rem;
  opacity: 0.75;
}
.lab-hero .tagline-jp {
  font-size: 1.4rem;
  font-weight: 300;
  margin-top: 1.5rem;
  margin-bottom: 0.4rem;
  color: #fff;                        /* 白色テキスト / White text */
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}
.lab-hero .tagline-en {
  font-size: 0.95rem;
  color: #fff;                        /* 白色テキスト / White text */
  opacity: 1;                          /* 透過なし。完全な白で表示 / No transparency, fully white */
  font-style: italic;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}
.lab-hero .institution {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.25);
  font-size: 0.85rem;
  opacity: 0.9;
}
.lab-hero .institution strong { display: block; font-size: 1rem; margin-bottom: 0.2rem; }

@media (max-width: 767px) {
  .lab-hero h1 { font-size: 2.2rem; }
  .lab-hero .tagline-jp { font-size: 1.1rem; }
}

/* ---------- Sections ---------- */
.section { padding: 4rem 0; }
.section-alt { background-color: var(--mudl-bg-soft); }
.section-title-block {
  margin-bottom: 3rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--mudl-border);
}

/* ---------- Themes recherche ---------- */
.research-theme {
  padding: 1.75rem 1.5rem;
  background: #fff;
  border: 1px solid var(--mudl-border);
  border-top: 3px solid var(--mudl-primary);
  height: 100%;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.research-theme:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.06);
}
.research-theme h4 { font-size: 0.85rem; margin-bottom: 0.6rem; }
.research-theme h4 small {
  display: block;
  font-size: 0.8rem;
  color: var(--mudl-text-en);
/*  letter-spacing: 0.15em;*/
  text-transform: uppercase;
  font-weight: 400;
  margin-top: 0.2em;
}

/* ---------- Research-theme card with image ----------
   日本語: テキストの代わりに画像を表示するカード。
           画像は枠いっぱいに広がり、縦横比を保ったままトリミング (object-fit: cover)。
           カードの高さは他の .research-theme と揃うよう、aspect-ratio で制御。
   ENGLISH: A research-theme card variant that shows an image instead of text.
            The image fills the card and is cropped to keep its proportions (object-fit: cover).
            The card height matches the others via aspect-ratio. */
.research-theme--image {
  display: flex;
  flex-direction: column;
  height: 100%;  
}
.research-theme--image .research-theme-img {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 2;     /* 画像の縦横比 / Image aspect ratio. 4 / 3 や 16 / 9 にも変更可 */
  object-fit: cover;        /* はみ出した部分は自動でトリミング / Crop overflow automatically */
  margin-top: auto;       /* pousse l'image vers le bas */
  display: block;
  height: auto;
}


/* ---------- Cartes membres / Member cards ---------- */
/* 日本語: 教員と学生のカードのスタイル。写真サイズの調整はここで行う。
   ENGLISH: Faculty and student card styles. Adjust photo sizes here. */

.member-card {
  background: #fff;
  border: 1px solid var(--mudl-border);
  margin-bottom: 1.25rem;
  display: flex;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.member-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

/* ---- 教員カード / FACULTY CARD ----
   日本語: 教員カードは横並び（写真左、本文右）。写真の高さ・幅は下記で調整。
           現在: 300x300px (1:1 正方形)
   ENGLISH: Faculty cards are horizontal (photo left, body right).
            Adjust photo width/height below. Current: 300x300px (1:1 square).
*/
.member-card.faculty {
  flex-direction: row;
  flex-wrap: wrap;
}
.member-card.faculty .photo {
  width: 300px;          /* 写真の幅 / Photo width */
  height: 300px;         /* 写真の高さ / Photo height */
  object-fit: cover;

  flex-shrink: 0;
}
.member-card.faculty .body {
  flex: 1;
  min-width: 250px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}
.member-card.faculty .name-jp { font-size: 1.4rem; font-weight: 700; margin-bottom: 0.1rem; color: var(--mudl-text); }
.member-card.faculty .name-en { font-size: 0.95rem; color: var(--mudl-text-en); letter-spacing: 0.05em; margin-bottom: 0.7rem;}
.member-card.faculty .role { font-size: 0.95rem; color: var(--mudl-primary); margin-bottom: 0.8rem; font-weight: 500; }
.member-card.faculty .role small { color: var(--mudl-text-en); font-weight: 400; font-style: italic; margin-left: 0.3em; }
.member-card.faculty .email {
  font-family: monospace;
  font-size: 0.85rem;
  color: var(--mudl-primary);
  margin-bottom: 0.8rem;
}
.member-card.faculty a.profile-link {
  display: inline-block;
  margin-top: 0.7rem;
  font-size: 0.75rem;
  color: var(--mudl-primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
}
.member-card.faculty a.profile-link::after { content: " →"; }

/* スマホ表示: 教員カードを縦並びに切り替え / Mobile: stack faculty card vertically */
@media (max-width: 575px) {
  .member-card.faculty { flex-direction: column; }
  .member-card.faculty .photo { width: 100%; height: auto; aspect-ratio: 1 / 1; }
}

/* ---- 学生カード（リスト型）/ STUDENT CARD (LIST STYLE) ----
   日本語: 学生は横並びリスト表示（写真左 150x150px、本文右）。
           グリッドではなく縦に並ぶリスト。
   ENGLISH: Students are displayed as a horizontal list (150x150px photo left, body right).
            One row per student, stacked vertically (not a grid).
*/
.member-card.student {
  flex-direction: row;
  align-items: stretch;
}
.member-card.student .photo {
  width: 110px;          /* 写真の幅 / Photo width */
  height: 110px;         /* 写真の高さ / Photo height */
  object-fit: cover;
  background: #eee;
  flex-shrink: 0;
}
.member-card.student .body {
  flex: 1;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.member-card.student .name-jp { font-weight: 700; font-size: 1rem; margin-bottom: 0.1rem; color: var(--mudl-text); }
.member-card.student .name-en { font-size: 0.78rem; color: var(--mudl-text-en); letter-spacing: 0.05em; margin-bottom: 0.4rem; margin-left: 10px;}
.member-card.student .role { font-size: 0.8rem; color: var(--mudl-primary); margin-bottom: 0.3rem; font-weight: 500; }
.member-card.student .role small { color: var(--mudl-text-en); font-weight: 400; font-style: italic; margin-left: 0.3em; }
.member-card.student .topic { font-size: 0.8rem; color: var(--mudl-text-muted); line-height: 1.5; margin-bottom: 0.4rem; }
.member-card.student a.profile-link {
  font-size: 0.72rem;
  color: var(--mudl-primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
  align-self: flex-start;
}
.member-card.student a.profile-link::after { content: " →"; }

/* スマホ表示: 学生カードは横並びを維持し、写真を少し小さく / Mobile: keep horizontal, shrink photo */
@media (max-width: 575px) {
  .member-card.student .photo { width: 110px; height: 110px; }
  .member-card.student .body { padding: 0.75rem 0.9rem; }
  .member-card.student .topic { font-size: 0.7rem; line-height: 1.3; }
}

/* ---------- Projets ---------- */
.project-card { position: relative; overflow: hidden; margin-bottom: 1.5rem; }
.project-card img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  display: block; transition: transform 0.4s ease;
}
.project-card:hover img { transform: scale(1.05); }
.project-card .caption {
  position: absolute; inset: auto 0 0 0;
  padding: 1rem;
  background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
  color: #fff;
}
.project-card .caption .title-jp { font-weight: 700; font-size: 1rem; margin-bottom: 0.1rem; }
.project-card .caption .title-en { font-size: 0.75rem; opacity: 0.85; letter-spacing: 0.05em; }

/* ---------- Publications ---------- */
.publication-list { list-style: none; padding-left: 0; }
.publication-list > li {
  padding: 0.9rem 0;
  border-bottom: 1px dotted var(--mudl-border);
  font-size: 0.92rem;
  line-height: 1.6;
}
.publication-list .year {
  font-family: var(--mudl-font-en);
  font-weight: 700;
  color: var(--mudl-primary);
  letter-spacing: 0.1em;
  display: block;
  margin: 1.5rem 0 0.5rem;
  font-size: 0.9rem;
  border-bottom: none;
}

/* ---------- News ---------- */
.news-item { display: flex; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--mudl-border); }
.news-item .date {
  flex: 0 0 110px;
  font-family: var(--mudl-font-en);
  color: var(--mudl-primary);
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}
.news-item .content { flex: 1; }
.news-item .content .jp { font-weight: 500; margin-bottom: 0.15rem; display: block; }
.news-item .content .en { font-size: 0.85rem; color: var(--mudl-text-en); font-style: italic; display: block; }

/* ---------- Contact: formulaire et carte / Contact: form and map ---------- */
/* 日本語: 連絡先セクションの問い合わせフォームと Google マップのスタイル。
   ENGLISH: Styles for the contact form and Google Maps embed in the contact section. */

.contact-form .form-group { margin-bottom: 1rem; }
.contact-form label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
  color: var(--mudl-text);
}
.contact-form label small {
  color: var(--mudl-text-en);
  font-weight: 400;
  font-style: italic;
  margin-left: 0.3em;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--mudl-border);
  background: #fff;
  font-family: var(--mudl-font-jp);
  font-size: 0.9rem;
  color: var(--mudl-text);
  transition: border-color 0.2s ease;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--mudl-primary);
}
.contact-form textarea { min-height: 130px; resize: vertical; }
.contact-form .btn-send {
  background: var(--mudl-primary);
  color: #fff;
  border: none;
  padding: 0.7rem 1.5rem;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.contact-form .btn-send:hover { background: var(--mudl-primary-dark); }
.contact-form .form-note {
  font-size: 0.75rem;
  color: var(--mudl-text-en);
  font-style: italic;
  margin-top: 0.8rem;
  line-height: 1.5;
}

.contact-map {
  width: 100%;
  margin-top: 1.5rem;
  border: 1px solid var(--mudl-border);
}
.contact-map iframe {
  display: block;
  width: 100%;
  height: 320px;
  border: 0;
}

/* ---------- Footer ---------- */
.lab-footer {
  background: var(--mudl-primary-dark);
  color: rgba(255,255,255,0.85);
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}
.lab-footer h5 {
  color: #fff;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  font-weight: 600;
}
.lab-footer a { color: rgba(255,255,255,0.85); }
.lab-footer a:hover { color: #fff; }
.lab-footer .credit {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 1.2rem;
  margin-top: 2rem;
  font-size: 0.8rem;
  opacity: 0.7;
}

/* ---------- Pages internes (blog & étudiants) ---------- */
.inner-page { padding: 5rem 0 4rem; }
.inner-page-header {
  background: var(--mudl-bg-soft);
  padding: 4rem 0 2.5rem;
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--mudl-border);
}
.inner-page-header h1 { font-weight: 700; margin-bottom: 0.3rem; }
.inner-page-header .breadcrumb-trail {
  font-size: 0.8rem;
  color: var(--mudl-text-en);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.inner-page-header .breadcrumb-trail a { color: var(--mudl-primary); }

/* Blog : liste */
.blog-post-card { display: flex; gap: 1.5rem; padding: 1.5rem 0; border-bottom: 1px solid var(--mudl-border); }
.blog-post-card .thumb {
  flex: 0 0 200px;
  aspect-ratio: 4 / 3;
  background: var(--mudl-bg-soft);
  overflow: hidden;
}
.blog-post-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.blog-post-card .meta {
  font-size: 0.75rem;
  color: var(--mudl-text-en);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}
.blog-post-card h3 { font-size: 1.3rem; margin-bottom: 0.4rem; font-weight: 700; }
.blog-post-card h3 a { color: var(--mudl-text); }
.blog-post-card h3 a:hover { color: var(--mudl-primary); }
.blog-post-card .excerpt { font-size: 0.9rem; color: var(--mudl-text-muted); line-height: 1.6; }
.blog-post-card .excerpt-en {
  font-size: 0.82rem; color: var(--mudl-text-en); font-style: italic; margin-top: 0.4rem;
}
@media (max-width: 575px) {
  .blog-post-card { flex-direction: column; }
  .blog-post-card .thumb { flex: 0 0 auto; width: 100%; }
}

/* Article */
.blog-article { max-width: 760px; margin: 0 auto; font-size: 1.02rem; line-height: 1.8; }
.blog-article h2 { margin-top: 2.5rem; font-size: 1.5rem; font-weight: 700; color: var(--mudl-primary-dark); }
.blog-article h3 { margin-top: 2rem; font-size: 1.2rem; font-weight: 700; }
.blog-article p { margin-bottom: 1.2rem; }
.blog-article .lead-image { width: 100%; margin: 1.5rem 0 2rem; }
.blog-article blockquote {
  border-left: 3px solid var(--mudl-primary);
  padding: 0.5rem 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--mudl-text-muted);
}
.blog-article .article-en {
  color: var(--mudl-text-en);
  font-size: 0.92em;
  font-style: italic;
  border-left: 2px solid var(--mudl-border);
  padding-left: 1rem;
  margin: 0.8rem 0 1.5rem;
}

/* Page étudiant */
.student-profile { max-width: 900px; margin: 0 auto; }
.student-profile .header-block {
  display: flex; gap: 2rem; margin-bottom: 3rem; align-items: flex-start;
}
.student-profile .header-block .photo {
  flex: 0 0 220px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--mudl-bg-soft);
}
.student-profile .header-block .info { flex: 1; }
.student-profile .name-jp { font-size: 2rem; font-weight: 700; margin-bottom: 0.2rem; }
.student-profile .name-en { font-size: 1.1rem; color: var(--mudl-text-en); letter-spacing: 0.05em; margin-bottom: 1rem; }
.student-profile .role-line {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--mudl-primary);
  color: #fff;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.student-profile .contact-line { font-size: 0.85rem; color: var(--mudl-text-muted); margin-bottom: 0.4rem; }
.student-profile h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--mudl-primary);
}
.student-profile h2 small {
  display: block;
  font-size: 0.7rem;
  color: var(--mudl-text-en);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 400;
  margin-top: 0.2em;
}
.student-profile .doc-list { list-style: none; padding: 0; }
.student-profile .doc-list li {
  padding: 0.7rem 0;
  border-bottom: 1px dotted var(--mudl-border);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}
.student-profile .doc-list .doc-icon {
  color: var(--mudl-primary);
  font-size: 1.1rem;
  flex: 0 0 auto;
  margin-top: 0.15rem;
}
.student-profile .doc-list .doc-meta { font-size: 0.8rem; color: var(--mudl-text-en); font-style: italic; margin-top: 0.15rem; }

@media (max-width: 575px) {
  .student-profile .header-block { flex-direction: column; }
  .student-profile .header-block .photo { width: 100%; max-width: 280px; }
}


/* =========================================================
 * TOP SLIDER (Slick.js, identique à udcx.k.u-tokyo.ac.jp)
 * 日本語: Slick.js を使用したトップスライダー。3枚同時表示・自動再生。
 *         desktop: PC画像 (.is-pc) を表示、 mobile: SP画像 (.is-sp) を表示。
 * ENGLISH: Top slider using Slick.js. 3 slides visible with autoplay.
 *          Desktop shows PC images (.is-pc), mobile shows SP images (.is-sp).
 * ========================================================= */
.mv {
  position: relative;
  width: 100%;
  margin: 0;
  padding: 0;
  background-color: #000;
  overflow: hidden;
}

.mv .top-slider {
  list-style: none;
  margin: 0;
  padding: 0;
  /* Slickが初期化前にちらつかないようにする / Hide before Slick init to avoid flicker */
  opacity: 0;
  transition: opacity 0.3s ease;
}
.mv .top-slider.slick-initialized {
  opacity: 1;
}

.mv .top-slider > li {
  list-style: none;
  margin: 0;
  padding: 0;
  /* Slickでは li の幅は JS で制御されます / li widths controlled by Slick */
}

/* Slick slides container reset */
.mv .top-slider .slick-slide {
  margin: 0;
}
.mv .top-slider .slick-slide > div {
  line-height: 0; /* gap removal under img */
}

/* 画像 / Images
   日本語: PC画像とSP画像を切り替えます。
           デスクトップ（≥960px）では .is-pc を、 モバイル（<960px）では .is-sp を表示。
   ENGLISH: Toggle between PC and SP images based on viewport.
            Desktop (≥960px) shows .is-pc, mobile (<960px) shows .is-sp. */
.mv .top-slider img {
  display: block;
  width: 100%;
  height: 400px;
  object-fit: cover;
}
.mv .top-slider img.is-sp { display: none; }
.mv .top-slider img.is-pc { display: block; }

@media (max-width: 959px) {
  .mv .top-slider img.is-pc { display: none; }
  .mv .top-slider img.is-sp { display: block; }
}

/* 念のためSlick標準のドラッグカーソル / Slick default drag cursor */
.mv .top-slider .slick-list { cursor: grab; }
.mv .top-slider .slick-list:active { cursor: grabbing; }


/* =========================================================
 * PROJECT CARD LINK
 * カードを <a> でラップしたときの装飾
 * Decoration when the card is wrapped by an <a> tag
 * ========================================================= */
.project-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}
.project-card-link:hover,
.project-card-link:focus {
  text-decoration: none;
  color: inherit;
}
.project-card-link:hover .project-card img {
  transform: scale(1.04);
}
.project-card-link:hover .project-card .caption .title-jp {
  color: var(--mudl-primary);
}


/* =========================================================
 * PUBLICATIONS PAGE - filter by year
 * publications.html 用：年でのフィルタリング
 * ========================================================= */
.pub-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  padding: 1.2rem 1.4rem;
  background-color: var(--mudl-bg-soft);
  border: 1px solid var(--mudl-border);
  border-radius: 6px;
  margin-bottom: 2.5rem;
}
.pub-filters__label {
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mudl-primary);
  margin-right: 0.4rem;
}
.pub-filter-btn {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--mudl-text);
  background-color: #fff;
  border: 1px solid var(--mudl-border);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.pub-filter-btn:hover {
  border-color: var(--mudl-primary);
  color: var(--mudl-primary);
}
.pub-filter-btn.is-active {
  background-color: var(--mudl-primary);
  border-color: var(--mudl-primary);
  color: #fff;
}

/* 著者の強調 / Highlighted author (used to highlight the student in their own publications) */
.pub-author-highlight {
  color: var(--mudl-primary);
  font-weight: 700;
}

/* 出版物の各ブロック / Publication block per year */
.pub-year-block {
  margin-bottom: 2.5rem;
}
.pub-year-block.is-hidden {
  display: none;
}
.pub-year-heading {
  font-family: var(--mudl-font-en);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--mudl-primary);
  letter-spacing: 0.08em;
  padding-bottom: 0.4rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--mudl-primary);
}

.pub-student-block {
  margin-bottom: 1.5rem;
}
.pub-student-name {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.4rem;
  padding-left: 0.7rem;
  border-left: 3px solid var(--mudl-accent);
}
.pub-student-name small {
  font-size: 0.75em;
  color: var(--mudl-text-en);
  letter-spacing: 0.1em;
  font-weight: 400;
  margin-left: 0.5em;
}

.pub-item-list {
  list-style: none;
  padding-left: 1rem;
  margin: 0;
}
.pub-item-list li {
  position: relative;
  padding: 0.55rem 0;
  border-bottom: 1px dotted var(--mudl-border);
  font-size: 0.9rem;
  line-height: 1.55;
}
.pub-item-list li:last-child {
  border-bottom: none;
}
.pub-item-list .pub-cat {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--mudl-text-en);
  padding: 0.05rem 0.5rem;
  border: 1px solid var(--mudl-border);
  border-radius: 3px;
  margin-right: 0.5em;
  background-color: #fff;
  vertical-align: middle;
}

/* Pas de résultat / Empty state */
.pub-empty {
  padding: 2rem;
  text-align: center;
  color: var(--mudl-text-muted);
  font-style: italic;
  display: none;
}
.pub-empty.is-visible {
  display: block;
}


/* =========================================================
 * PROJECT DETAIL PAGE
 * projects/_template.html のスタイル
 * ========================================================= */
.project-detail__hero {
  position: relative;
  width: 100%;
  height: 50vh;
  min-height: 320px;
  max-height: 520px;
  background-color: var(--mudl-bg-soft);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  overflow: hidden;
}
.project-detail__hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.0) 50%, rgba(0,0,0,0.55) 100%);
}
.project-detail__hero-text {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2rem;
  color: #fff;
  z-index: 2;
}
.project-detail__hero-text .container {
  position: relative;
}
.project-detail__hero-text h1 {
  font-weight: 900;
  font-size: 2.4rem;
  margin: 0 0 0.4rem 0;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.project-detail__hero-text h1 small {
  display: block;
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  opacity: 0.85;
  margin-bottom: 0.3rem;
}
.project-detail__hero-text .project-date {
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  opacity: 0.9;
}

@media (max-width: 767px) {
  .project-detail__hero {
    height: 38vh;
    min-height: 220px;
  }
  .project-detail__hero-text h1 { font-size: 1.5rem; }
  .project-detail__hero-text h1 small { font-size: 0.8rem; }
}

/* Meta block (date, période, membres) */
.project-meta {
  background-color: var(--mudl-bg-soft);
  border: 1px solid var(--mudl-border);
  border-radius: 6px;
  padding: 1.5rem;
  margin-bottom: 2.5rem;
}
.project-meta__row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px dotted var(--mudl-border);
}
.project-meta__row:last-child {
  border-bottom: none;
}
.project-meta__label {
  flex: 0 0 140px;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mudl-primary);
}
.project-meta__value {
  flex: 1 1 auto;
  font-size: 0.95rem;
  line-height: 1.55;
}
.project-meta__members {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.6rem;
}
.project-meta__members li {
  display: inline-block;
  padding: 0.25rem 0.7rem;
  background-color: #fff;
  border: 1px solid var(--mudl-border);
  border-radius: 999px;
  font-size: 0.85rem;
}
.project-meta__members li.is-lead {
  border-color: var(--mudl-primary);
  background-color: var(--mudl-primary);
  color: #fff;
}

@media (max-width: 575px) {
  .project-meta__row { flex-direction: column; gap: 0.25rem; }
  .project-meta__label { flex-basis: auto; }
}

/* Texte du projet / Project body */
.project-body {
  font-size: 1rem;
  line-height: 1.75;
}
.project-body h2 {
  font-weight: 700;
  font-size: 1.35rem;
  margin: 2rem 0 0.8rem 0;
  padding-left: 0.85rem;
  border-left: 3px solid var(--mudl-primary);
}
.project-body h2 small {
  font-size: 0.6em;
  color: var(--mudl-text-en);
  letter-spacing: 0.15em;
  font-weight: 400;
  margin-left: 0.5em;
  display: inline;
}

/* Galerie photos / Photo gallery */
.project-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 2.5rem;
}
.project-gallery__item {
  position: relative;
  background-color: var(--mudl-bg-soft);
  border: 1px solid var(--mudl-border);
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.project-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.project-gallery__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--mudl-text-muted);
  font-size: 0.85rem;
  font-style: italic;
  letter-spacing: 0.05em;
}

.project-nav-back {
  margin: 2rem 0 1rem;
  font-size: 0.9rem;
}
.project-nav-back a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--mudl-primary);
  font-weight: 500;
  text-decoration: none;
}
.project-nav-back a:hover {
  color: var(--mudl-primary-dark);
  text-decoration: underline;
}
