/* ==========================================
   1. 基本設定 & 変数
   ========================================== */
:root {
    --bg-color: #050a14;
    --accent-color: #00d4ff;
    --text-color: #e0e0e0;
    --header-bg: rgba(10, 25, 47, 0.9);
}

/* フォント指定の集約 */
h2, .logo, .member-role-tag, .contact-label, .detail-block h3 {
    font-family: 'Orbitron', sans-serif;
}

html, body {
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
    min-height: 100dvh;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
}

main { flex: 1 0 auto; }

/* ==========================================
   2. ヘッダー & ナビゲーション
   ========================================== */
header {
    background-color: var(--header-bg);
    border-bottom: 1px solid var(--accent-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
}

.logo-group { display: flex; align-items: center; gap: 15px; }

.logo {
    font-size: 1.5rem;
    color: var(--accent-color);
    text-decoration: none;
    transition: 0.3s;
}
.logo:hover { text-shadow: 0 0 10px var(--accent-color); opacity: 0.8; }

.separator { width: 1px; height: 25px; background-color: rgba(255, 255, 255, 0.3); }

.univ-name {
    font-size: 0.9rem;
    color: #ffffff;
    text-decoration: none;
    font-weight: 300;
    line-height: 1.2;
}
.univ-name:hover { color: var(--accent-color); }

.nav-list { list-style: none; display: flex; margin: 0; padding: 0; }
.nav-list li { margin-left: 25px; }

.nav-list a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    padding-bottom: 5px; /* 下線用の余白 */
}

/* 現在地表示の修正版：詳細度を上げて確実に適用 */
.nav-list a.active {
    color: var(--accent-color) !important;
    border-bottom: 2px solid var(--accent-color);
}

.nav-list a:hover { color: var(--accent-color); }

/* ドロップダウン */
.dropdown { position: relative; }
.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: linear-gradient(180deg, rgba(12, 28, 52, 0.98), rgba(8, 18, 34, 0.98));
    border: 1px solid rgba(0, 212, 255, 0.35);
    list-style: none;
    padding: 10px 0;
    margin: 0;
    min-width: 220px;
    display: block;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px) scaleY(0.9);
    transform-origin: top;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(0, 212, 255, 0.15), 0 18px 40px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(10px);
}
.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scaleY(1);
}
.dropdown-menu::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.8), transparent);
}
.dropdown-menu li { margin: 0 !important; }
.dropdown-menu a {
    padding: 11px 22px;
    display: block;
    font-size: 0.85rem;
    color: var(--text-color);
}
.dropdown-menu a:hover {
    background: linear-gradient(90deg, rgba(0, 212, 255, 0.14), rgba(0, 212, 255, 0.03));
    color: var(--accent-color) !important;
}
/* ドロップダウン表示の際に色を保持 */
.dropdown:hover > a { color: var(--accent-color); }

/* ==========================================
   3. 共通コンポーネント
   ========================================== */
.container { padding: 15px 10%; }

.page-title { font-size: 2.2rem; }

.section-title {
    border-left: 4px solid var(--accent-color);
    padding-left: 15px;
    font-size: 1.5rem;
    margin-top: 0;
    margin-bottom: 30px;
}

.research-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 20px 0 35px;
    font-size: 0.95rem;
}

.research-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid rgba(0, 212, 255, 0.4);
    border-radius: 999px;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    background: rgba(0, 212, 255, 0.08);
    transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
}

.research-nav-link:hover {
    background: rgba(0, 212, 255, 0.18);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 212, 255, 0.2);
}

.card {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ==========================================
   4. 各セクション詳細 (News, Research, Members)
   ========================================== */
.hero {
    position: relative;
    overflow: hidden;
    height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, #050a14 0%, #0a192f 100%);
    border-bottom: 1px solid rgba(0, 212, 255, 0.2);
}
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(5, 10, 20, 0.2), rgba(10, 25, 47, 0.12));
    z-index: 1;
}
.hero-content {
    position: relative;
    z-index: 2;
    display: inline-block;
    max-width: min(90vw, 760px);
    background: rgba(0, 0, 0, 0.6); /*TOPのHeroコンテンツの背景 0.6は透明度*/
    padding: 0px 28px;
    border-radius: 12px;
    backdrop-filter: blur(2px);
}
.hero h2 { font-size: 3rem; letter-spacing: 2px; margin: 1rem 0; }
.hero p { margin-top: 8px; }

.date { color: var(--accent-color); margin-right: 15px; font-weight: bold; }

.news-item {
    display: flex;
    text-decoration: none;
    color: inherit;
    transition: background 0.3s;
    border-left: 2px solid transparent;
}
.news-item:hover { background: rgba(0, 212, 255, 0.1); border-left: 2px solid var(--accent-color); }

.more-link { text-align: right; margin-top: 20px; margin-bottom: 20px;}
.more-link a { color: var(--accent-color); text-decoration: none; font-weight: bold; }

/* トップページ: 最新イベントスライドショー */
.top-slideshow--hero {
    position: absolute;
}

.top-slideshow--hero .top-slide-image {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    object-fit: contain;
    object-position: center center;
    filter: none;
    max-width: 1180px;
    width: min(60vw, 1180px);
    height: auto;
}

/* 研究リスト */
.res-category { scroll-margin-top: 90px; }

/* ==========================================
   研究業績リスト（全体・個人 共通）
   ========================================== */

/* 1. カウンターをリセットする親要素（どちらのクラス名でも動くようにする） */
.res-list, 
.res-ordered-list {
    list-style: none;
    counter-reset: research-number; /* カウンター名を統一 */
    padding-left: 0;
    margin: 0;
}

/* 2. 各項目（[1]を表示するエリアを確保） */
.res-item {
    position: relative;
    padding-left: 4.5rem; /* [1] の幅をしっかり固定 */
    margin-bottom: 25px;
    line-height: 1.6;
}

.res-item--detail {
    padding-right: 0;
    cursor: pointer;
}

.res-item--detail::after {
    content: "";
    position: absolute;
    inset: -6px 0;
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.35);
    border-radius: 10px;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 0;
}

/* 3. 番号 [1] の見た目とカウントアップ */
.res-item::before {
    counter-increment: research-number; /* 項目ごとに+1する */
    content: "[" counter(research-number) "]"; /* [数字] を表示 */
    
    position: absolute;
    left: 0;
    top: 0;
    width: 3.5rem; /* 幅を固定して縦ラインを揃える */
    text-align: center;
    
    /* スタイリッシュな設定 */
    color: #ffffff;
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 200; /* さらに細くして洗練させる */
    font-variant-numeric: tabular-nums; /* 数字の幅を一定にする（重要！） */
    letter-spacing: 0.05em;
    opacity: 0.8; /* 少し透かして背景に馴染ませる */
}

/* --- テキスト要素のスタイル --- */
.res-item-title {
    display: block;
    font-size: 1.05rem;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 4px;
}

.res-item-link {
    display: block;
    color: inherit;
    text-decoration: none;
    border-radius: 10px;
    padding: 8px 5.5rem 8px 0;
    border: 1px solid transparent;
    transition: background 0.2s ease, border-color 0.2s ease;
    position: relative;
    z-index: 1;
}

.res-item--detail:hover::after,
.res-item--detail:focus-within::after {
    opacity: 1;
}

.res-item-badge {
    position: absolute;
    right: 6px;
    top: 0;
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid rgba(0, 212, 255, 0.5);
    color: var(--accent-color);
    font-size: 0.7rem;
    font-weight: 500;
    background: rgba(0, 212, 255, 0.12);
}

.res-item-author {
    display: block;
    font-size: 0.85rem;
    font-weight: 300;
    color: #cccccc;
    margin-bottom: 3px;
}

.res-item-info {
    font-size: 0.8rem;
    font-weight: 300;
    color: #999999;
    font-style: normal; /* 斜体をやめてスッキリさせる */
}

.res-item-date {
    display: inline-block;
    color: var(--accent-color);
    font-variant-numeric: tabular-nums; /* 日付の幅も揃える */
    font-weight: 400;
    margin-left: 5px;
}

/* 「該当なし」の場合のメッセージ */
.no-item {
    padding-left: 1rem;
    color: #666;
    font-style: italic;
}
.res-date { 
    color: var(--accent-color); min-width: 100px;
    font-family: 'Noto Sans JP', sans-serif;
}

/* 研究成果詳細ページ */
.research-detail-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 16px;
    padding: 28px;
}

.detail-meta {
    font-size: 0.9rem;
    color: var(--accent-color);
    margin-bottom: 12px;
    opacity: 0.9;
}

.detail-description {
    margin: 0 0 18px;
    color: #d5d9e3;
}

.detail-people h4,
.detail-related h4 {
    margin: 18px 0 8px;
    font-size: 1rem;
    color: #ffffff;
}

.detail-people p {
    margin: 0 0 12px;
    color: #c7cbd6;
}

.detail-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.detail-figure {
    margin: 0;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.detail-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.detail-figure figcaption {
    padding: 10px 12px;
    font-size: 0.8rem;
    color: #c7cbd6;
}

/* メンバー */
.member-grid { display: grid; grid-template-columns: repeat(2, minmax(280px, 1fr)); gap: 30px; margin-bottom: 50px; }
.member-card {
    position: relative;
    display: block;
    background: linear-gradient(135deg, rgba(0, 18, 218, 0.852) 0%, transparent 100%);
    max-width: 560px;
    margin: 0;
    padding: 22px 22px;
    color: var(--text-color);
    text-decoration: none;
    overflow: visible;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.member-card__content { position: relative; z-index: 2; }
.member-role-tag { font-size: 0.7rem; color: var(--accent-color); text-transform: uppercase; letter-spacing: 1px; }
.member-name { font-size: 1.3rem; margin: 8px 0 4px; font-weight: 700; }
.member-title { font-size: 0.9rem; color: #cfd8ff; margin-bottom: 10px; }
.member-interest { font-size: 0.85rem; border-top: 1px solid rgba(255, 255, 255, 0.12); padding-top: 10px; }
.member-more { display: inline-block; margin-top: 12px; font-size: 0.85rem; color: var(--accent-color); }
.member-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.member-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border: 1px solid rgba(0, 212, 255, 0.45);
    border-radius: 999px;
    color: var(--accent-color);
    text-decoration: none;
    font-size: 0.8rem;
    background: rgba(0, 212, 255, 0.08);
}
.member-link:hover { background: rgba(0, 212, 255, 0.18); }
.member-update-info {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    color: var(--accent-color);
    text-align: right; /* 右寄せ */
    margin-bottom: 20px;
    opacity: 0.7;
}

/* ==========================================
   個人ページ
   ========================================== */
.member-detail { padding-bottom: 40px; }
.member-detail > section { margin-bottom: 2rem; } 
.back-link { display: inline-block; margin-bottom: 20px; color: var(--accent-color); text-decoration: none; }

/* プロフィールヘッダー全体のレイアウト */
.profile-header-card {
    display: flex;
    justify-content: space-between; /* 左右に分ける */
    align-items: flex-start;        /* 上端に揃える */
    gap: 30px; /* テキストと写真の間に隙間を作る */
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, rgba(10, 25, 47, 0.9) 100%);
    border: 1px solid rgba(0, 212, 255, 0.3);
    padding: 40px;
    border-radius: 20px;
    margin-bottom: 40px;
}

.profile-header-info { flex: 1; } /* 画像がないときに、テキストが右端まで広がるようにする */

.profile-header-info h2 {
    font-size: 2.3rem; /* 名前を大きく */
    margin: 10px 0;
    color: #fff;
    text-shadow: 0 0 15px rgba(0, 212, 255, 0.5);
    line-height: 1.2;
}

/* 写真を右上に小さく */
.profile-header-photo {
    width: 180px;
    height: 180px;
    flex-shrink: 0;    /* 写真が潰れないように固定 */
}
.profile-header-card {
    align-items: center;
}
.profile-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
    margin-top: 30px;
}

/* 経歴リストのスタイル */
.bio-list {
    padding-left: 1rem;
    font-size: 0.95rem;
}

.bio-list li {
    margin-bottom: 5px;
    display: flex;
}

.bio-year {
    font-weight: 600;
    width: 120px;
    color: #999999;
    font-style: normal;
}

/* 研究業績のカテゴリー見出し */
.res-cat-title {
    font-size: 1.1rem;
    color: var(--accent-color);
    margin: 30px 0 15px;
    border-bottom: 1px solid rgba(0, 212, 255, 0.2);
    padding-bottom: 5px;
    font-family: 'Orbitron', sans-serif;
}

/* ==========================================
    Aboutページ
   ========================================== */
.about-hero { padding: 60px 0; text-align: center; border-bottom: 1px solid rgba(0, 212, 255, 0.2); margin-bottom: 50px; }
.lead-text { font-size: 1.4rem; color: var(--accent-color); margin-top: 10px; }

/* 6Gコンセプトセクション */
.concept-section {
    max-width: 1200px;
    margin: 0 auto 80px;
    padding: 0;
    width: 100%;
    box-sizing: border-box;
}

.concept-content {
    text-align: center;
}

.concept-content .section-title {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 40px;
    font-family: 'Orbitron', sans-serif;
    border-left: none;
    padding-left: 0;
}

.concept-hero-image {
    width: 100%;
    max-width: 900px;
    margin: 0 auto 30px;
    border-radius: 20px;
    overflow: hidden;
    background: #ffffff;
    padding: 30px;
    box-sizing: border-box;
}

.concept-hero-image img {
    width: 100%;
    height: auto;
    display: block;
}

.concept-description {
    max-width: 900px;
    margin: 0 auto;
    text-align: left;
}

.concept-description p {
    font-size: 1.1rem;
    line-height: 1.9;
    color: #e0e0e0;
}

/* 研究テーマ */
.research-themes {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    width: 100%;
    box-sizing: border-box;
}

.theme-block {
    display: grid;
    gap: 50px;
    align-items: center;
    margin-bottom: 100px;
    padding: 40px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.03) 0%, rgba(10, 25, 47, 0.5) 100%);
    border: 1px solid rgba(0, 212, 255, 0.15);
    border-radius: 20px;
    transition: border-color 0.3s ease;
}

.theme-block:hover { border-color: rgba(0, 212, 255, 0.4); }

/* 左図・右文 */
.theme-left { 
    grid-template-areas: "image content";
    grid-template-columns: minmax(260px, 2fr) minmax(260px, 480px);
}

.theme-left .theme-images { grid-area: image; }

.theme-left .theme-content { grid-area: content; }

/* 左文・右図 */
.theme-right { 
    grid-template-areas: "content image";
    grid-template-columns: minmax(260px, 480px) minmax(260px, 2fr);
}

.theme-right .theme-content { grid-area: content; }

.theme-right .theme-images { grid-area: image; }

/* 画像コンテナ */
.theme-images {
    width: 100%;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    align-items: center;
}

/* 横並び配置 */
.theme-images-horizontal {
    flex-direction: row;
    flex-wrap: wrap;
}

/* 縦並び配置 */
.theme-images-vertical {
    flex-direction: row;
    flex-wrap: wrap;
}

/* 個別の画像アイテム */
.theme-image-item {
    flex: 0 1 auto;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    border-radius: 15px;
    overflow: hidden;
    border: none;
    background: rgba(10, 25, 47, 0.4);
}

.theme-image-item img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 250px;
    display: inline-block;
    object-fit: contain;
    object-position: center;
    background: #ffffff;
    padding: 16px;
    box-sizing: border-box;
    border-radius: 15px 15px 0 0;
}

/* キャプション幅に合わせて背景を伸ばす */
.theme-block.theme-right .theme-images-vertical .theme-image-item:last-child picture {
    width: 100%;
    display: block;
    background: #ffffff;
    padding: 16px;
    box-sizing: border-box;
    border-radius: 15px 15px 0 0;
}

.theme-block.theme-right .theme-images-vertical .theme-image-item:last-child picture img {
    display: block;
    margin: 0 auto;
    background: transparent;
    padding: 0;
}

/* 画像キャプション */
.image-caption {
    width: 100%;
    padding: 12px 20px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    background: rgba(0, 212, 255, 0.05);
    margin: 0;
    line-height: 1.4;
    box-sizing: border-box;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* 横並び時の画像サイズ調整 */
.theme-images-horizontal .theme-image-item {
    flex: 1 1 320px;
    min-width: 250px;
    width: min(100%, 520px);
}

.theme-images-horizontal .theme-image-item img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 250px;
    padding: clamp(10px, 2.2vw, 16px);
}

.theme-content {
    padding: 20px;
    width: 100%;
    max-width: 520px;
}

.theme-title {
    font-size: 1.6rem;
    color: var(--accent-color);
    margin-bottom: 15px;
    font-family: 'Orbitron', sans-serif;
}

.theme-description {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 20px;
    line-height: 1.8;
    font-weight: 500;
}

.theme-details p {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.8;
}

/* 旧スタイル（互換性のため残す） */
.detail-section { max-width: 900px; margin: 0 auto; }
.detail-block { margin-bottom: 80px; }
.detail-block h3 { font-size: 1.7rem; border-bottom: 2px solid var(--accent-color); display: inline-block; margin-bottom: 20px; }
.detail-block p { font-size: 1.1rem; color: #e0e0e0; }

/* ==========================================
   5. Access / Contactページ
   ========================================== */
.access-wrapper { display: grid; grid-template-columns: 1.2fr 1fr; gap: 50px; margin-top: 30px; }

.address-card { padding: 25px; border-radius: 4px; margin-bottom: 20px; }
.address-card h4 { margin-top: 0; font-size: 1.2rem; }
.transport { font-size: 0.9rem; color: var(--accent-color); margin-top: 15px; }

.map-container { padding: 5px; background: #000; }

.contact-card {
    background: linear-gradient(135deg, rgba(0, 18, 218, 0.852) 0%, transparent 100%);
    padding: 25px;
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
}
.contact-label { font-size: 0.7rem; color: var(--accent-color); margin-bottom: 10px; letter-spacing: 1px; }

.contact-link {
    display: inline-block;
    margin-top: 10px;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: bold;
    border-bottom: 1px dashed var(--accent-color);
}
.contact-link:hover { opacity: 0.7; }

/* Research: back-to-top button */
.back-to-top {
    position: fixed;
    right: 50px;
    bottom: 40px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(0, 212, 255, 0.15);
    border: 1px solid rgba(0, 212, 255, 0.45);
    color: var(--accent-color);
    text-decoration: none;
    font-size: 0.9rem;
    box-shadow: 0 8px 20px rgba(0, 212, 255, 0.2);
    transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
    z-index: 1200;
    -webkit-tap-highlight-color: transparent;
}

.back-to-top:hover {
    transform: translateY(-2px);
    background: rgba(0, 212, 255, 0.25);
    box-shadow: 0 12px 26px rgba(0, 212, 255, 0.3);
}


/* ==========================================
   イベントページ
   ========================================== */
.page-description {
    text-align: left;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 40px;
    font-size: 1.05rem;
}

.events-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-top: 30px;
}

.event-card {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.05) 0%, rgba(10, 25, 47, 0.8) 100%);
    border: 1px solid rgba(0, 212, 255, 0.15);
    border-radius: 20px;
    overflow: hidden;
    transition: border-color 0.3s ease;
    position: relative;
    padding-bottom: 10px;
}

.event-card:hover {
    border-color: rgba(0, 212, 255, 0.3);
}

.event-content {
    padding: 30px;
}

.event-date {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    color: var(--accent-color);
    margin-bottom: 10px;
}

.event-title {
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: 15px;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.event-description {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
    margin-bottom: 20px;
}

.event-gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-evenly;
    gap: 40px;
    margin-top: 25px;
}

.gallery-img {
    width: auto;
    height: 350px;
    max-height: 350px;
    object-fit: contain;
    object-position: center;
    border-radius: 12px;
    display: block;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4) 0%, rgba(10, 25, 47, 0.6) 100%);
    cursor: zoom-in;
}

.no-event-images {
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    padding: 20px;
    font-size: 0.9rem;
}

.no-events {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    padding: 60px 20px;
    font-size: 1.1rem;
}

.event-update-info {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    color: var(--accent-color);
    text-align: right;
    margin-bottom: 20px;
    margin-top: -20px;
    opacity: 0.7;
}

/* ==========================================
   研究/イベント共通 ライトボックス
   ========================================== */
.image-lightbox {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 2000;
}

.image-lightbox.is-open {
    display: block;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(3, 8, 16, 0.8);
    backdrop-filter: blur(4px);
}

.lightbox-content {
    position: absolute;
    inset: 80px 10vw;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: rgba(5, 10, 20, 0.9);
    border: 1px solid rgba(0, 212, 255, 0.25);
    border-radius: 16px;
    padding: 18px 18px 24px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-image {
    max-width: 75vw;
    max-height: 65vh;
    object-fit: contain;
    border-radius: 12px;
    display: block;
}

.lightbox-caption {
    margin-top: 12px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
}

.lightbox-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(0, 212, 255, 0.4);
    background: rgba(0, 212, 255, 0.1);
    color: var(--accent-color);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}

.lightbox-close:hover {
    background: rgba(0, 212, 255, 0.2);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(0, 212, 255, 0.4);
    background: rgba(0, 212, 255, 0.1);
    color: var(--accent-color);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}

.lightbox-prev { left: 18px; }
.lightbox-next { right: 18px; }

.lightbox-nav:hover {
    background: rgba(0, 212, 255, 0.2);
}

/* ==========================================
   Contact ページ
   ========================================== */
.contact-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.contact-form {
    background: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input[type="email"],
.form-group input[type="text"],
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(0, 212, 255, 0.4);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s, background 0.3s;
    box-sizing: border-box;
}

.form-group input[type="email"]:focus,
.form-group input[type="text"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(0, 212, 255, 0.08);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-submit {
    background: linear-gradient(135deg, var(--accent-color), #0099cc);
    color: var(--bg-color);
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.form-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 212, 255, 0.3);
}

.form-submit:active {
    transform: translateY(0);
}


/* ==========================================
   6. フッター
   ========================================== */
footer {
    background-color: #02050a;
    padding: 30px 0;
    text-align: center;
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
}
.footer-mail a { color: var(--accent-color); text-decoration: none; }

/* ==========================================
   7. レスポンシブデザイン
   ========================================== */

/* --- モバイル用ハンバーガーボタンの基本スタイル（PCでは隠す） --- */
.menu-toggle { display: none; }

@media (max-width: 1500px) and (min-width: 1201px) {
    .theme-left,
    .theme-right {
        grid-template-columns: 1fr 1fr;
    }

    .theme-content {
        max-width: none;
    }
}

@media (max-width: 1120px) {/* ヘッターがきれいに表示できるサイズ感 */
    /* ==========================================
         全体的な調整
   ========================================== */
    /* header関連 */
    .header-container { padding: 10px 5%; }
    .logo { font-size: 1.2em; }
    .univ-name { font-size: 0.8rem; }

    /* footer関連 */
    footer { font-size: 0.8rem; padding: 20px 0; }
    
    /* メインコンテンツ関連 */
    /* 特にindexページ */
    .hero h2 { font-size: 2rem; margin: 1rem 0; }
    .hero-content { padding: 14px 18px; border-radius: 10px; }
    .hero { height: 35vh; }
    .top-slideshow--hero { padding: 0; }
    .top-slideshow--hero .top-slide-link { width: 96vw; }
    .top-slideshow--hero .top-slide-image { width: 100vw; }
    .section-title { font-size: 1.3rem; margin-top: 20px; margin-bottom: 20px; }
    .container { padding: 0px 4%; }
    .news-item { font-size: 0.9rem;}
    .more-link a { font-size: 0.9rem; }
    
    /* 特にaboutページ */
    .about-hero { padding: 50px 0; }
    .page-title { font-size: 1.8rem; }
    .lead-text { font-size: 1.05rem; }
    
    /* 6Gコンセプトセクション */
    .concept-content .section-title { font-size: 1.5rem; margin-bottom: 25px; }
    .concept-hero-image { margin-bottom: 20px; padding: 15px; }
    .concept-description p { font-size: 0.95rem; line-height: 1.7; }
    
    /* 研究テーマ */
    .theme-block {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 25px;
        margin-bottom: 50px;
    }
    
    .theme-left,.theme-right { grid-template-areas: "content" "image"; }
    
    .theme-images {
        flex-direction: column;
        gap: 15px;
    }
    
    .theme-images-horizontal,
    .theme-images-vertical {
        flex-direction: column;
    }
    
    .theme-image-item {
        width: fit-content;
        max-width: 100%;
        min-width: unset;
        margin: 0 auto;
    }
    
    .theme-image-item img {
        height: auto;
        max-height: 220px;
        max-width: 100%;
        width: auto;
        padding: 12px;
    }
    
    .image-caption {
        font-size: 0.8rem;
        padding: 10px 12px;
    }

    /* 画像拡大　ライトボックス */
    .lightbox-content {
        inset: 90px 5vw 50px;
        padding: 14px 14px 18px;
    }

    .lightbox-image {
        width: 100%;
        max-width: 100%;
        height: auto;
        max-height: 60vh;
    }

    .lightbox-nav { display: none; }
    body.lightbox-open { overflow: hidden; }
    
    .theme-title { font-size: 1.3rem; }
    .theme-description { font-size: 0.9rem; }
    .theme-details p { font-size: 0.95rem; }
    .theme-content {
        padding: 10px 0;
        width: 100%;
        max-width: none;
    }
    
    /* 旧スタイル */
    .detail-block { margin-bottom: 40px; }
    .detail-block h3 { font-size: 1.3rem; }
    .detail-block p { font-size: 1rem; }

    /* 研究業績関連 */
    .research-nav-link { font-size: 0.7rem; padding: 8px 14px; }
    .res-category .section-title { font-size: 1.15rem; margin-top: 30px; margin-bottom: 20px;}
    .res-item-title { font-size: 0.88rem; }
    .res-item-author { font-size: 0.8rem; }
    .res-item-info { font-size: 0.75rem; }
    .res-item-date { font-size: 0.7rem; }
    .res-item { padding-left: 3.5rem; margin-bottom: 20px; }
    .res-item::before { width: 2.5rem; font-size: 0.85rem; }

    /* メンバー関連 */
    .member-group .section-title { font-size: 1.15rem; margin-top: 20px; margin-bottom: 20px; }
    .member-grid { grid-template-columns: 1fr; }
    .member-card { max-width: 100%; padding: 18px 18px; }
    .member-role-tag { font-size: 0.65rem; }
    .member-name { font-size: 1.1rem; }
    .member-title { font-size: 0.8rem; }
    .member-interest { font-size: 0.8rem; padding-top: 3px; }
    .member-more { font-size: 0.8rem; margin-top: 8px; }

    /* プロフィールページ関連 */
    .back-link { font-size: 0.9rem; margin-top: 15px; }
    .profile-header-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 26px;
    }
    .profile-header-info { order: 2; }
    .profile-header-photo {
        order: 1;
        width: 130px;
        height: 130px;
        margin-bottom: 12px;
    }
    .profile-header-info h2 { font-size: 1.7rem; }

    /* イベントページ関連 */
    .event-card { margin-bottom: 10px; }
    .event-content { padding: 20px; }
    .event-title { font-size: 1.4rem; }
    .event-gallery { gap: 25px; }
    .gallery-img { 
        max-width: 100%;
        height: auto;
        max-height: 300px;
        background: transparent;
    }
    .member-links { justify-content: center; }
    .member-profile .section-title { font-size: 1.15rem; margin-top: 20px; margin-bottom: 15px; }
    .res-cat-title { font-size: 1rem; margin-top: 25px; margin-bottom: 10px; }
    .bio-list { padding-left: 0.4rem; font-size: 0.85rem;}
    .bio-list li { margin-bottom: 5px; }
    .bio-year { width: 90px; }
    .bio-text { flex: 1; }

    /* Accessページ関連 */
    .access-wrapper { grid-template-columns: 1fr; }
    .address-card { padding: 15px; margin-bottom: 10px; }
    .address-card h4 { font-size: 0.95rem; }
    .transport { font-size: 0.85rem; }
    .contact-card { padding: 18px; }
    .contact-label { font-size: 0.65rem; }
    .contact-card h4 { font-size: 0.9rem; margin-bottom: 0px;}
    .contact-card p { font-size: 0.85rem; }
    .contact-link { font-size: 0.85rem; }



    /* ==========================================
         ナビゲーションのモバイル対応
   ========================================== */
    body.nav-open { overflow: hidden; } /* メニュー表示中はスクロール禁止 */

    .menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        width: 30px;
        height: 25px;
        background: transparent;
        border: none;
        cursor: pointer;
        z-index: 2000;
        padding: 0;
    }
    
    .menu-toggle span {
        width: 100%;
        height: 2px;
        background-color: var(--accent-color);
        transition: 0.3s;
    }

    /* 2. メニューを画面外へ飛ばす */
    .nav-wrapper {
        position: fixed;
        top: 0;
        right: 0;
        width: 260px;
        height: 100dvh;
        background: #050a14;
        z-index: 1500;
        transform: translateX(100%);
        transition: 0.3s ease-in-out;
    }

    .nav-list {
        display: flex;
        flex-direction: column; /* 縦に並べる */
        align-items: flex-start; /* 左寄せにする */
        padding: 80px 0;
        margin: 0;
        list-style: none;
    }

    .nav-list li {
        width: 100%; /* 横幅いっぱい使わせる */
        margin: 0; /* 間隔は下の a タグで調整 */
        list-style: none;
    }

    .nav-list a {
        display: block;
        width: 100%;
        padding: 15px 0;
        font-size: 1rem;
    }

    .nav-list a.active {
        background: rgba(0, 212, 255, 0.2);
        color: var(--accent-color);
    }

    .nav-list > li > a {
        display: block;
        padding: 15px 20px; /* 全体の間隔をここで確保 */
        font-size: 0.9rem; /* 章に対するフォントサイズ */
        color: #eee;
        text-decoration: none;
        /* 左側にシアンの縦線を配置 */
        border-left: 3px solid var(--accent-color);
        margin-left: 15px;
        margin-bottom: 10px; /* 項目ごとの隙間 */
        background: rgba(255, 255, 255, 0.05); /* 軽く背景色をつけて視認性アップ */
    }

    /* 3. JSで 'active' がついたら画面内に戻す */
    .nav-wrapper.active {
        transform: translateX(0);
    }

    /* 木構造（常に表示） */
    .dropdown-menu {
        display: block !important;
        position: static !important;   /* 浮かさずに縦に並べる */
        opacity: 1 !important;         /* 透明にしない */
        visibility: visible !important; /* 隠さない */
        max-height: none !important;   /* 高さを制限しない */
        transform: none !important;    /* 移動させない */

        /* 外枠の線を消す */
        border: none !important; 
        background: transparent !important;
        box-shadow: none !important;
        
        /* 木構造の見た目調整 */
        padding: 3px 0 3px 28px !important;
        margin: 15px 0 20px 40px !important;
        border-left: none !important;
        position: relative;
    }

    /* PC用の上部ハイライト線を無効化 */
    .dropdown-menu::before { display: none !important; }

    /* 縦ラインを正しい位置で描画 */
    .dropdown-menu::after {
        content: "";
        position: absolute;
        left: 12px;
        top: 8px;
        bottom: 8px;
        width: 1px;
        background: #eee !important;
    }

    /* ツリーの「枝」を作る */
    .dropdown-menu li {
        position: relative;
        margin: 10px 0 !important;
        padding: 0 !important;
        border: none !important;
    }

    /* 横の短い線（枝） */
    .dropdown-menu li::before {
        content: "";
        position: absolute;
        top: 50%;
        left: -16px;
        width: 16px;
        height: 1px;
        background: #eee !important;
    }

    /* メニュー項目（リンク）の調整 */
    .dropdown-menu a {
        padding: 7px 0 !important;
        font-size: 0.75rem !important; /* 節に対するフォントサイズ */
        color: #eee !important; /* 明るいグレー〜白 */
        background: none !important;
        border: none !important;
    }

    /* ホバー時やタップ時 */
    .dropdown-menu a:active {
        color: var(--accent-color) !important;
    }

    .back-to-top {
        position: fixed;
        right: 16px;
        bottom: 16px;
        width: 40px;
        height: 40px;
    }

}