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

:root {
    --primary-color: #212121;
    --secondary-color: #616161;
    --accent-color: #424242;
    --bg-color: #fafafa;
    --card-bg: #ffffff;
    --border-color: #e0e0e0;
    --text-light: #757575;
    --shadow: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 8px rgba(0,0,0,0.15);
}

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

body {
    font-family: 'Noto Sans JP', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--primary-color);
    background-color: var(--bg-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 日本語用のフォント設定 */
body:lang(ja), 
[lang="ja"] {
    font-family: 'Noto Sans JP', sans-serif;
}

/* 英語用のフォント設定 */
body:lang(en), 
[lang="en"] {
    font-family: 'Roboto', sans-serif;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Header Styles */
header {
    background-color: var(--card-bg);
    box-shadow: var(--shadow);
    margin-bottom: 40px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 60px;
    padding: 60px;
}

.profile-photo {
    flex-shrink: 0;
    width: 240px;
    height: 240px;
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-photo img:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-hover);
}

.profile-info {
    flex: 1;
}

.name {
    font-size: 3em;
    font-weight: 300;
    letter-spacing: 0.05em;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.name-en {
    font-size: 1.2em;
    color: var(--text-light);
    margin-bottom: 20px;
}

.title-degree {
    font-size: 1.1em;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.affiliation {
    font-size: 1em;
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.external-links-info {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-top: 15px;
    flex-wrap: wrap;
}

.external-links-info a {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 0.9em;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.external-links-info a:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.language-switch {
    position: static;
    text-align: right;
    margin-top: 20px;
    margin-bottom: 15px;
    padding: 0 5px;
    width: 100%;
    box-sizing: border-box;
}

.language-switch a {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 0.9em;
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    transition: all 0.3s ease;
}

.language-switch a:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Section Styles */
section {
    background-color: var(--card-bg);
    margin-bottom: 30px;
    padding: 40px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

h2 {
    font-size: 1.8em;
    font-weight: 300;
    color: var(--primary-color);
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
    letter-spacing: 0.05em;
}

h3 {
    font-size: 1.4em;
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 20px;
    margin-top: 0;
    text-align: center;
}

/* Research Area */
.research-area {
    background-color: var(--bg-color);
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.research-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.research-section {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.research-section:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.research-images {
    margin-bottom: 20px;
}

.research-item img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.research-item img:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.research-area p {
    color: var(--secondary-color);
    line-height: 1.8;
    margin-bottom: 0;
    text-align: justify;
}

/* Timeline */
.timeline {
    list-style: none;
}

.timeline li {
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.3s ease;
}

.timeline li:last-child {
    border-bottom: none;
}

.timeline li:hover {
    background-color: var(--bg-color);
    margin: 0 -20px;
    padding: 15px 20px;
}

.year {
    font-weight: 600;
    color: var(--accent-color);
    display: block;
    margin-bottom: 5px;
}

/* Publication Styles */
.publication, .conference-item, .award {
    margin-bottom: 20px;
    padding: 20px;
    background-color: var(--bg-color);
    border-radius: 8px;
    position: relative;
    transition: all 0.3s ease;
}

.publication:hover, .conference-item:hover, .award:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.publication-number, .award-number {
    position: absolute;
    left: -30px;
    top: 20px;
    width: 25px;
    height: 25px;
    background-color: #4D5358;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8em;
    font-weight: 600;
}

.publication-content, .conference-content {
    line-height: 1.6;
    text-decoration: none;
    color: inherit;
    display: block;
}

.publication-content:hover, .conference-content:hover {
    text-decoration: none;
    color: inherit;
}

.publication-content .authors, .conference-content .authors {
    color: var(--primary-color);
    margin-bottom: 5px;
}

.publication-content .title, .conference-content .title {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.publication-content .venue, .conference-content .venue {
    color: var(--secondary-color);
    font-style: italic;
}

.publication-content .doi, .conference-content .doi {
    color: var(--text-light);
    font-size: 0.9em;
    margin-top: 5px;
}

/* Awards */
.award {
    background-color: var(--bg-color);
    padding: 15px 20px;
    margin-bottom: 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.award:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.award-name {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.award-date {
    color: var(--text-light);
    font-size: 0.9em;
}

/* Funding */
.funding {
    background-color: var(--bg-color);
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.funding:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.funding .period {
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 8px;
    font-size: 0.95em;
}

.funding-title {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
}

.funding .source {
    color: var(--secondary-color);
    font-size: 0.95em;
    margin-bottom: 8px;
    line-height: 1.4;
}

.funding .role {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.funding .amount {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.95em;
    margin-top: 5px;
}

/* Academic Societies */
.societies-list {
    list-style: none;
}

.societies-list li {
    padding: 10px 0;
    color: var(--secondary-color);
    border-bottom: 1px solid var(--border-color);
}

.societies-list li:last-child {
    border-bottom: none;
}

.societies-list li:hover {
    color: var(--primary-color);
    background-color: var(--bg-color);
    margin: 0 -20px;
    padding: 10px 20px;
}

/* Contact & Links */
.contact-info p {
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.contact-info a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-info a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 60px;
    padding: 30px 0;
    color: var(--text-light);
    font-size: 0.9em;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .header-content {
        padding: 40px;
        gap: 40px;
    }

    .profile-photo {
        width: 180px;
        height: 180px;
    }

    .name {
        font-size: 2.5em;
    }

    .research-container {
        gap: 30px;
    }

    .external-links-info {
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px 5px;
    }

    /* モバイル版でもナビゲーションバーを表示するが、stickyにしない */
    .section-nav {
        position: static !important;
        margin-bottom: 20px;
        box-shadow: none;
        top: auto;
        z-index: auto;
    }

    .nav-container {
        padding: 0 10px;
        flex-direction: row;
        gap: 5px;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .nav-items {
        justify-content: center;
        flex-wrap: wrap;
        gap: 2px;
        flex: 1;
        order: 1;
    }

    .nav-item {
        font-size: 0.75em;
        padding: 8px 10px;
    }

    .language-nav {
        margin-left: 0 !important;
        margin-top: 0;
        order: 2;
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .header-content {
        flex-direction: column;
        text-align: center;
        padding: 20px 10px;
        gap: 20px;
    }

    .profile-photo {
        width: 150px;
        height: 150px;
    }

    .name {
        font-size: 1.9em;
    }

    section {
        padding: 20px 10px;
        margin-bottom: 20px;
    }

    .research-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .timeline li:hover {
        margin: 0;
        padding: 15px 0;
    }

    .external-links-info {
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 15px;
    }

    .external-links-info a {
        font-size: 0.75em;
        padding: 8px 12px;
        margin: 2px;
    }

    .publication-number, .award-number {
        position: static;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-right: 10px;
        margin-bottom: 10px;
        width: 25px;
        height: 25px;
        background-color: #4D5358;
        color: white;
        border-radius: 50%;
        font-size: 0.8em;
        font-weight: 600;
        flex-shrink: 0;
    }

    /* ヘッダーとの間隔調整 */
    header {
        margin-bottom: 20px;
    }

    /* プロフィール情報の調整 */
    .profile-info {
        padding: 0 10px;
    }

    .affiliation {
        font-size: 0.9em;
        line-height: 1.4;
    }

    .name-en {
        font-size: 1.1em;
    }
}

@media (max-width: 480px) {
    .name {
        font-size: 1.8em;
    }

    h2 {
        font-size: 1.5em;
    }

    .publication, .conference-item, .award {
        padding: 15px;
    }

    .research-section {
        padding: 20px;
    }

    .external-links-info a {
        font-size: 0.8em;
        padding: 6px 10px;
    }

    .profile-photo {
        width: 120px;
        height: 120px;
    }
}

/* Print Styles */
@media print {
    body {
        background-color: white;
    }

    section {
        box-shadow: none;
        border: 1px solid var(--border-color);
        margin-bottom: 20px;
    }

    .profile-photo img {
        filter: none;
    }
}

/* 全体的なスムーズスクロール */
html {
    scroll-behavior: smooth;
}

/* Section Navigation */
.section-nav {
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 30px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.nav-items {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
    flex: 1;
}

.nav-item {
    color: var(--secondary-color);
    text-decoration: none;
    padding: 15px 20px;
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 6px;
    white-space: nowrap;
}

.nav-item:hover {
    background-color: var(--bg-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.nav-item.active {
    background-color: var(--primary-color);
    color: white;
}

.language-nav {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 8px 16px !important;
    margin-left: 20px;
}

.language-nav:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

