/* CSS for Takahashi Lab replication */
:root {
    --primary: #6120F6;
    /* New Purple */
    --primary-light: #7c4dff;
    --text-main: #2c2c2c;
    --text-sub: #666666;
    --bg-light: #f9f9f9;
    --white: #ffffff;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.8;
    color: var(--text-main);
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
}



a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.2rem 4%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
    background: transparent;
}

header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    padding: 0.8rem 4%;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    /* ロゴとの間隔を調整 */
}

/* 非スクロール時の視認性向上用ボックス */
header:not(.scrolled) .header-left {
    background: rgba(0, 0, 0, 0.2);
    padding: 0.5rem 1.5rem;
    border-radius: 12px;
    backdrop-filter: blur(8px);
}

.header-right {
    display: flex;
    align-items: center;
}

.logo {
    font-family: 'Outfit', sans-serif;
    font-weight: 300;
    font-size: 1.5rem;
    /* 少し大きく */
    letter-spacing: 0.1em;
    color: var(--white);
    white-space: nowrap;
    text-decoration: none;
}

header.scrolled .logo {
    color: var(--text-main);
}

nav ul {
    display: flex;
    gap: 2.2rem;
    list-style: none;
    align-items: center;
}

/* 右側ボタンの間隔を個別に設定 */
.header-right nav ul {
    gap: 0.8rem;
}

nav a {
    font-size: 1.0rem;
    /* 大幅に拡大（0.85rem -> 1.0rem） */
    font-weight: 500;
    color: var(--white);
    letter-spacing: 0.05em;
}

header.scrolled nav a {
    color: var(--text-main);
}

/* Mobile Toggle - Hidden by Default (Desktop) */
.menu-toggle {
    display: none !important;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
    padding: 0.5rem;
}

.menu-toggle span {
    display: block;
    width: 28px;
    height: 2px;
    background-color: var(--white);
    transition: var(--transition);
}

header.scrolled .menu-toggle span {
    background-color: var(--text-main);
}

/* Mobile Nav Elements - Hidden by Default (Desktop) */
.mobile-nav,
.nav-overlay {
    display: none !important;
}

/* Toggle Animation */
.menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 992px) {
    .menu-toggle {
        display: flex !important;
    }

    .header-left nav,
    .header-right nav {
        display: none !important;
    }

    header {
        padding: 1rem 5%;
    }

    .header-left {
        gap: 0;
        width: 100%;
        justify-content: space-between;
    }

    /* Mobile Nav Drawer */
    .mobile-nav {
        display: flex !important;
        flex-direction: column;
        gap: 2rem;
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: var(--white);
        z-index: 1000;
        padding: 80px 40px;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    }

    .mobile-nav.active {
        right: 0;
    }

    .mobile-nav ul {
        list-style: none;
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }

    .mobile-nav a {
        font-size: 1.1rem;
        font-weight: 500;
        color: var(--text-main);
    }

    .mobile-nav .nav-btn {
        display: inline-block;
        text-align: center;
        width: fit-content;
        font-size: 0.85rem;
        padding: 0.5rem 1.2rem;
    }

    /* Close Button inside Mobile Nav */
    .close-btn {
        position: absolute;
        top: 20px;
        right: 20px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 10px;
        z-index: 1002;
    }

    .close-btn span {
        display: block;
        width: 24px;
        height: 2px;
        background-color: var(--text-main);
    }

    .close-btn span:nth-child(1) {
        transform: rotate(45deg) translateY(1px);
    }

    .close-btn span:nth-child(2) {
        transform: rotate(-45deg) translateY(-1px);
        margin-top: -2px;
    }

    /* Overlay */
    .nav-overlay {
        display: block !important;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
        backdrop-filter: blur(4px);
    }

    .nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }
}

/* Specific Button Styles */
.nav-btn {
    background-color: var(--primary);
    color: var(--white) !important;
    padding: 0.4rem 1.0rem;
    /* 小さく（0.6rem 1.4rem -> 0.4rem 1.0rem） */
    border-radius: 50px;
    font-size: 0.75rem;
    /* 少し小さく */
    font-weight: 600;
    transition: var(--transition);
    border: 1px solid var(--primary);
    white-space: nowrap;
}

.nav-btn:hover {
    background-color: transparent;
    color: var(--primary) !important;
    opacity: 1;
}

header:not(.scrolled) .nav-btn:hover {
    color: var(--white) !important;
    background-color: var(--primary-light);
    border-color: var(--primary-light);
}

nav a:hover {
    color: var(--primary);
    opacity: 1;
}

header:not(.scrolled) nav a:hover {
    color: var(--primary-light);
}

/* Hero Section */
.hero {
    height: 100vh;
    width: 100%;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    /* オーバーレイ(z-index:1)より上にする */
    text-align: center;
    color: var(--white);
    max-width: 800px;
    padding: 0 2rem;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    color: #E8E8E8;
    opacity: 1;
    animation: fadeInUp 1s ease-out;
}

.hero-content p {
    font-size: 1.8rem;
    /* さらに大きく */
    font-weight: 400;
    color: #E8E8E8;
    opacity: 1;
    animation: fadeInUp 1s ease-out 0.3s backwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Section Common */
section {
    padding: 4rem 10%;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--primary);
}

/* Page Header (for subpages) */
.page-header {
    position: relative;
    height: 300px;
    padding: 0;
    background-color: var(--bg-light);
    border-bottom: none;
    /* 下の白い線を削除 */
    overflow: hidden;
}

.page-kv {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.page-kv img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
    opacity: 0.5;
    /* 背景色(var(--bg-light))が透けて白みがかった感じに */
}

.page-title-banner {
    background-color: #000000;
    /* 黒い背景 */
    padding: 1.0rem 0;
    text-align: center;
    margin-bottom: 1rem;
}

.page-title {
    font-size: 2.0rem;
    font-weight: 400;
    /* 細めのフォントに変更 */
    margin-bottom: 0;
    color: #ffffff;
    /* 白色に変更 */
    letter-spacing: 0.05em;
}

/* Content Layouts */
.container-small {
    max-width: 1040px;
    margin: 0 auto;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    /* 4remから縮小 */
    align-items: center;
}

/* Publications List */
.pub-section {
    margin-bottom: 5rem;
}

.sub-title {
    font-size: 1.9rem;
    margin-bottom: 2rem;
    font-weight: 700;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.funding-subsection {
    margin-bottom: 2rem;
}

.funding-h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--text-main);
    font-weight: 700;
}

.funding-title {
    font-size: 1.1rem;
    font-weight: 500;
}

.funding-detail {
    font-size: 0.9rem;
    color: var(--text-sub);
    margin-top: 0.2rem;
}



.pub-list {
    list-style: none;
    padding: 0;
}

/* Peer-reviewedセクションのみ自動採番を適用 */
#peer-reviewed-section {
    counter-reset: pub-counter;
}

#peer-reviewed-list .pub-item {
    counter-increment: pub-counter;
}

#peer-reviewed-list .pub-item::before {
    content: counter(pub-counter) ". ";
    font-weight: 700;
    margin-right: 0.3rem;
}

.pub-item {
    margin-bottom: 1.8rem;
    /* 2.5remから縮小 */
    font-size: 1.2rem;
    line-height: 1.6;
}

.pub-item a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
    display: inline;
    /* 文章全体としての挙動を優先 */
}

.pub-item a u {
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    /* 1.5pxから1pxに細く調整 */
}

.pub-item a:hover {
    color: var(--primary);
}

.pub-item i {
    font-style: italic;
}

.pub-note {
    color: var(--text-sub);
    font-size: 0.9em;
    display: block;
    margin-top: 0.3rem;
}

/* Profile Section */
.profile-image {
    width: 80%;
    /* 100%から縮小 */
    max-width: 320px;
    display: block;
    margin: 0 auto;
    border-radius: 4px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.profile-details h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.profile-details .title {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: block;
}

.affiliation-list {
    list-style: none;
    padding: 0;
    margin-top: 1.5rem;
    font-size: 1.0rem;
    color: var(--text-main);
}

.affiliation-list li {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.affiliation-list li span:first-child {
    min-width: 90px;
    color: var(--text-sub);
    font-weight: 500;
}

@media (max-width: 768px) {
    .affiliation-list li {
        flex-direction: column;
        gap: 0.2rem;
        margin-bottom: 1rem;
    }
}

/* News List */
.news-item {
    padding: 1.5rem 0;
    border-bottom: 1px solid #eeeeee;
    display: flex;
    gap: 2rem;
}

.news-date {
    color: var(--text-sub);
    min-width: 100px;
    font-size: 0.9rem;
}

/* Footer */
footer {
    background: #ffffff;
    padding: 6rem 0 0 0;
    /* 左右下のパディングを0にしてボックスを密着させる */
    border-top: none;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    /* 左右に分散 */
    align-items: flex-end;
    /* 下に揃える */
    width: 100%;
}

.footer-contact-box {
    background-color: #000000;
    color: #ffffff;
    padding: 1.5rem 2rem;
    /* パディングを縮小 */
    border-radius: 0;
    /* 真四角に */
    max-width: 500px;
    /* 最大幅を縮小 */
    margin: 0;
    /* 余白なし */
}

.footer-contact-box .footer-logo {
    font-size: 1.3rem;
    /* サイズを縮小 */
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: #ffffff;
}

.footer-contact-box .contact-info p {
    margin-bottom: 0.3rem;
    color: #ffffff;
    font-size: 0.85rem;
    /* サイズを縮小 */
    line-height: 1.5;
}

.footer-copyright {
    text-align: right;
    /* 右揃え */
    margin-bottom: 2rem;
    /* 下端からの適切な距離 */
    margin-right: 5%;
    /* 右端からの適切な距離 */
    font-size: 0.85rem;
    color: var(--text-sub);
    padding: 0;
    border-top: none;
}

/* Utils */
.scroll-btn {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    color: var(--white);
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0) translateX(-50%);
    }

    40% {
        transform: translateY(-10px) translateX(-50%);
    }

    60% {
        transform: translateY(-5px) translateX(-50%);
    }
}

@media (max-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    section {
        padding: 5rem 6%;
    }
}