body {
    margin: 0;
    padding: 0;
    background: linear-gradient(to bottom, #ffffff, #4D798D);
    height: 100vh;
    background-attachment: fixed;
}

/* ヘッダー */
.header {
    width: 100%;
    text-align: center;
}

.header img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease; /* なめらかに拡大 */
}


/* タイトル */
h1, h2, h3, h4, p {
    text-align: center;
}

h1 img, h3 img {
    max-width: 800px;
    height: auto;
}

h2 img {
    width: 400px;
}

h2 {
    font-family: 'Arial', sans-serif;
    font-size: 3em;
    font-weight: bold;
    text-align: center;
    color: #4D798D;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(to right, #4D798D, #b0c4de);
    -webkit-background-clip: text;
    color: transparent;
    padding: 20px 0;
    position: relative; /* 下線を配置するために必要 */
}

h2:after {
    content: '';
    display: block;
    width: 80px; /* 下線の長さ */
    height: 4px; /* 下線の高さ */
    margin: 10px auto 0;
    background-color: #4D798D;
    border-radius: 5px; /* 丸みを帯びた下線 */
}
h3 {
    font-family: 'Arial', sans-serif;
    font-size: 2em;
    font-weight: bold;
    text-align: center;
    color: #4D798D;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    margin-bottom: 20px;
}

h4 {
    font-size: 1.2em;
    text-align: center;
    line-height: 2.5; /* 2.5倍の行間 */
    color: #4D798D;
    padding-bottom: 200px; 
}


/* 役職部分の下線 */
h3:after {
    content: '';
    display: block;
    width: 60%; /* 下線の長さ */
    height: 3px; /* 下線の高さ */
    margin: 10px auto 0;
    background-color: #4D798D;
    border-radius: 5px;
}


.character_title {
    background-color: #b0c4de;
}

.character_title_caption {
    background-color: #CFE1E4;
    text-align: left;
    padding: 15px; /* 内側の余白 */
    border-radius: 5px; /* 角を少し丸くする（任意） */
}

.character_title_caption,
.character_title_caption b {
    line-height: 1.8;
    font-size: 0.9em !important; /* フォントサイズを確実に適用 */
}


/* ナビゲーション */
#nav {
    display: flex;
    flex-wrap: nowrap; /* PCでは横一列 */
    gap: 10px;
    justify-content: center;
    align-items: center;
    padding: 10px 0;
    list-style: none;
    margin-top: 10px;
    overflow-x: auto; /* もし横幅が超えてもスクロールできるように */
}

#nav li {
    display: inline-block;
    text-align: center;
}

#nav img {
    width: 100%;
    height: auto;
    max-width: 150px; /* 画像サイズの最大値 */
}

#nav li:hover {
    opacity: 0.6;
}

/* トップページ用ナビゲーション */
.top-page #nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(12vw, 1fr));
    gap: 1.5vw;
    width: min(90vw, 650px);
    margin: 20px auto 0;
}

.top-page #nav li {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0em;
    aspect-ratio: 1 / 1;
}

.top-page #nav img {
    width: 80%;
    height: auto;
    display: block;
}

/* フッター */
#footer {
    background-color: #CFE1E4;
    margin-top: 100px;
    padding: 10px 10px;
    font-weight: bold;
    color: #4D798D;
    text-align: center;
    font-size: large;
}

/* iPad縦向き（スマホ風） */
@media (max-width: 834px) and (orientation: portrait) {
    .top-page #nav {
        grid-template-columns: repeat(auto-fit, minmax(35vw, 1fr));
        gap: 1vw; /* 間隔を少し狭める */
        width: 90vw;
        margin: 10px auto;
    }

    .top-page #nav img {
        width: 85%;
    }

    body:not(.top-page) #nav {
        flex-wrap: wrap; /* 折り返し */
    }
    body:not(.top-page) #nav li {
        width: calc(100% / 4 - 10px); /* 4列レイアウト */
    }

    .photo-top-page img {
        width: 90%;
        padding: 5px;
    }

    .conference-list {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 10px; /* 余白を減らす */
    }

    .conference-item {
        width: 100%; /* 画面幅いっぱい */
        max-width: 90vw; /* 画面幅の90%以内に収める */
        margin: 10px 0; /* 上下の余白を調整 */
        padding: 10px; /* 余白を調整 */
        box-sizing: border-box; /* 幅を超えないように調整 */
    }

    /* フッター */
    #footer {
        font-size: medium; /* フッターのフォントサイズを中くらいに */
    }
}

/* スマホ（狭い画面） */
@media (max-width: 768px) {
    .top-page #nav {
        grid-template-columns: repeat(auto-fit, minmax(35vw, 1fr));
        gap: 1vw; /* 間隔を少し狭める */
        width: 90vw;
    }

    .top-page #nav img {
        width: 90%;
    }

    body:not(.top-page) #nav {
        flex-wrap: wrap; /* スマホでは折り返し */
    }
    body:not(.top-page) #nav li {
        width: calc(100% / 4 - 10px); /* 4列レイアウト */
    }

    .photo-top-page img {
        width: 90%;
        padding: 5px;
    }

    .conference-list {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 10px; /* 余白を減らす */
    }

    .conference-item {
        width: 100%; /* 画面幅いっぱい */
        max-width: 90vw; /* 画面幅の90%以内に収める */
        margin: 10px 0; /* 上下の余白を調整 */
        padding: 10px; /* 余白を調整 */
        box-sizing: border-box; /* 幅を超えないように調整 */
    }

    /* フッター */
    #footer {
	
        font-size: small; /* スマホではさらに小さく */
    }
}

/* iPad・PC（横向き） */
@media (orientation: landscape) {
    .top-page #nav {
        grid-template-columns: repeat(auto-fit, minmax(15vw, 1fr));
        gap: 2vw;
        width: 85vw;
        max-width: 1200px;
        margin: 0 auto;
    }

    .top-page #nav img {
        max-width: 20vw;
    }

    .photo-top-page img {
        width: 80%;  /* 幅を小さくしてポラロイドのサイズを調整 */
        padding: 10px;
    }

    /* フッター */
    #footer {
        font-size: large; /* iPad横向きでは大きめ */
    }
}

/* 写真の配置 */
.photo-top-page {
    text-align: center;
    margin-top: 20px;
}

/* 写真のスタイル */
.photo-top-page img {
    background: white;  
    border-radius: 5px;
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.2);
    text-align: center;
    font-family: "Comic Sans MS", cursive, sans-serif;
    transition: transform 0.3s;
    text-decoration: none;
    color: black;
    margin: 30px 10px;  /* 上下の間隔を増やすため、上と下を20px、左右を10pxに設定 */
    position: relative;
    transform: rotate(-3deg);
}

/* ホバー時のエフェクト */
.photo-top-page img:hover {
    transform: scale(1.03);
    box-shadow: 0px 10px 40px rgba(0, 0, 0, 0.2);
}

/* 見出しの統一スタイル */
.section-title {
    text-align: center;
    font-size: 1.8em;
    color: #4D798D;
    margin-bottom: 30px;
    border-bottom: 3px solid #4D798D;
    padding-bottom: 5px;
    width: 50%;
    margin-left: auto;
    margin-right: auto;
}

/* メンバー紹介カード */
.member-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin: 20px;
    padding: 15px;
    text-align: center;
    transition: transform 0.3s ease;
}

.member-card:hover {
    transform: scale(1.05);
}

.member-card img {
    border-radius: 50%;
    width: 70%;
    height: auto;
    object-fit: cover;
    margin-bottom: 10px;
}

.member-card h3 {
    font-size: 1.2em;
    color: #333;
    margin-bottom: 10px;
}

.member-card p {
    font-size: 1em;
    color: #333;
}

/* 教員カードのサイズ */
.professor-card {
    width: 300px;  /* 教員のカードを少し大きく */
}

/* 学生カードのサイズ */
.student-card {
    width: 160px;  /* 学生のカードを少し小さく */
}

/* メンバーカード内情報を整理 */
.member-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.95em;
    color: #555;
}

/* メンバーのリンクスタイル */
.member-info a {
    text-decoration: none;
    color: #4D798D;
    transition: color 0.3s ease;
}

.member-info a:hover {
    color: #2A4C59;
}

.member-info p {
    margin: 0;
}

/* メンバーコンテナ */
.member-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

/* キーワードコンテナ */
.keyword-container {
    width: 80%;
    max-width: 600px;
    margin: 40px auto 100px;
    padding: 20px;
    color: #4D798D;
    border-radius: 12px;
    font-weight: 500;
    text-align: center;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(15px);
    animation: fadeInUp 1s ease forwards;
}

.keyword-container p {
    font-size: 1.5em;
    line-height: 3.0;
}


@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .keyword-container {
        width: 90%;
        font-size: 1em;
        padding: 15px;
    }
    .keyword-container p {
        font-size: 1.2em;
    }
}

.news-timeline {
    width: 90%;
    max-width: 800px;
    margin: 30px auto 100px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    padding-bottom: 60px;
}

.news-timeline h2 {
    @extend .section-title;
}

.news-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    border-bottom: 1px solid #ddd;
}

.news-date {
    font-weight: bold;
    color: #4D798D;
    min-width: 120px;
}

.news-content h3 {
    margin: 0;
    font-size: 1.2em;
    color: #333;
}

.news-content p {
    margin: 5px 0 0;
    font-size: 1em;
    color: #666;
}

/* 外部リンク */
.external-links {
    text-align: center;
    margin: 40px auto 100px;
    padding-bottom: 60px;
}

.external-links h2 {
    @extend .section-title;
}

.external-links ul {
    list-style: none;
    padding: 0;
    font-size: 1.2em;
    line-height: 4;
}

.external-links li {
    margin: 5px 0;
}

.external-links a {
    text-decoration: none;
    color: #2B5561;
    font-weight: bold;
}

.external-links a:hover {
    color: #4D798D;
}

.research-page {
    padding: 30px;
}

.research-section {
    background-color: white;
    padding: 30px;
    margin-bottom: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.research-section h3 {
    font-size: 1.5em;
    color: #4D798D;
    margin-bottom: 10px;
    font-weight: bold;
}

.research-section p {
    font-size: 1em;
    text-align: left;
    color: #333;
    line-height: 2; /* 2倍の行間 */
}

.research-section img {
    display: block;
    margin: auto;
    width: 80%;
}

/* 研究概要カード */
.research-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin: 20px;
    padding: 15px;
    text-align: center;
    transition: transform 0.3s ease;
}

.research-card:hover {
    transform: scale(1.05);
}

.research-card img {
    width: 70%;
    height: auto;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 10px;
}

.research-card h3 {
    font-size: 1.2em;
    color: #333;
    margin-bottom: 10px;
}

.research-card p {
    font-size: 1em;
    color: #777;
}

/* 研究メンバーを配置 */
.research-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

/* 装置写真キャプション */
.equipment-gallery {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.device-card {
    background: white;
    border-radius: 12px;
    box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.15);
    padding: 10px;
    text-align: center;
    width: 300px; /* カードの幅 */
        margin: 20px;
        transition: transform 0.2s ease-in-out;
}

.device-card:hover {
    transform: scale(1.05);
}

.device-card img {
    width: 100%;
    border-radius: 8px;
}

.device-description {
    display: block;
    font-size: 14px;
    font-weight: bold;
    margin-top: 8px;
}

.conference-item {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 20px;
}

.conference-item:hover {
    transform: scale(1.05);
    box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15);
}

.conference-participants {
    font-size: 1.2em;
    color: #333;
    font-weight: bold;
    margin-top: 50px;
}

.conference-title {
    font-size: 1.2em;
    color: #333;
    margin-top: 5px;
}

.conference-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(800px, 1fr)); /* PCでは800pxを維持 */
    gap: 50px;
    padding: 20px;
    text-align: center;
}

.conference-section-title {
    background: linear-gradient(to right, #4D798D, #b0c4de);
    -webkit-background-clip: text;
    color: transparent;
    padding: 10px 0;
}

.conference-item a {
    color: #4D798D;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.conference-item a:hover {
    color: #2A4C59;
}

.conference-date {
    font-weight: normal;
    color: #4D798D;
    min-width: 120px;
    text-align: center;
    display: inline-block;
}


/* 全体のレイアウト */
.papers-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 40px;
    max-width: 900px;
    margin: auto;
    font-family: 'Arial', sans-serif;
}

/* 各論文のボックス */
.paper-card {
    background: #ffffff; 
    backdrop-filter: blur(8px); /* ぼかし効果でスタイリッシュに */
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ホバー時のアニメーション */
.paper-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

/* 名前のヘッダー */
.paper-header {
    font-size: 1.5em;
    font-weight: bold;
    padding-bottom: 6px;
    margin-bottom: 16px;
    color: #333;
    border-bottom: 2px solid #4D798D; /* シンプルな青ライン */
}

/* コンテンツ */
.paper-content {
    font-size: 1rem;
    line-height: 1.6;
    color: #444;
}

.paper-content p {
    text-align: left; /* .paper-content 内の <p> だけ左揃え */
}

.paper-content p .paper-link {
    display: block;   /* インライン要素のままだと右寄せできないのでブロック要素に */
}

/* 論文リンク */
.paper-link {
    display: inline-block;
    color: #4D798D;
    font-weight: bold;
    text-decoration: none;
    transition: color 0.3s ease-in-out;
}

/* ホバー時のエフェクト */
.paper-link:hover {
    color: #191970;
    text-decoration: underline;
}

/* スマホ対応 */
@media screen and (max-width: 600px) {
    .papers-container {
        padding: 20px;
    }

    .paper-card {
        padding: 18px;
    }

    .paper-header {
        font-size: 1.3em;
    }

    .paper-content {
        font-size: 0.95rem;
    }
}

.album-container {
    display: flex;
    justify-content: center;  /* 中央配置 */
    flex-wrap: wrap;  /* 画面幅が狭いとき折り返す */
    gap: 20px;  /* カード同士の間隔 */
    padding: 20px 10%;  /* 上下 20px、左右 10% の余白 */
}

.album-section {
    width: 100%;
    clear: both; /* フロートの影響を防ぐ */
    margin-bottom: 40px; /* 各年ごとに余白を作る */
}


.polaroid {
    display: inline-block;
    width: 200px;
    padding: 10px;
    background: white;
    border-radius: 5px;
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.2);
    text-align: center;
    font-family: "Comic Sans MS", cursive, sans-serif;
    transform: rotate(-3deg);
    transition: transform 0.3s;
    text-decoration: none;
    color: black;
    margin: 10px;  /* カード単体の余白も追加 */
}

.polaroid:hover {
    transform: rotate(0deg) scale(1.05);
}

.polaroid img {
    width: 100%;
    height: auto;
    border-bottom: 5px solid white;
}

.polaroid p {
    margin: 5px 0 0;
    font-size: 16px;
}

.polaroid-date {
    font-weight: normal;
    color: #4D798D;
    min-width: 120px;
}


.album-page {
    padding: 20px;
    display: flex;
    flex-direction: column;  /* 縦に並べる */
    align-items: center;  /* 中央揃え */
    gap: 20px;  /* ポラロイド間の余白 */
}

.polaroidL {
    width: 50%;  /* 幅を小さくしてポラロイドのサイズを調整 */
    padding: 10px;
    background: white;  
    border-radius: 5px;
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.2);
    text-align: center;
    font-family: "Comic Sans MS", cursive, sans-serif;
    transition: transform 0.3s;
    text-decoration: none;
    color: black;
    margin: 30px 10px;  /* 上下の間隔を増やすため、上と下を20px、左右を10pxに設定 */
    position: relative;
    transform: rotate(-3deg); 
}

.polaroidL img {
    width: 100%;  /* 画像がポラロイドの幅に合わせて表示 */
    display: block;
}

.comment {
    position: absolute;
    top: 100%;
    left: 10px;
    background: rgba(255, 255, 200, 0.8); /* 付箋っぽい色 */
    padding: 5px 10px;
    font-size: 14px;
    border-radius: 5px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
}

