/* ============================================
   デザインガイドライン: DESIGN_GUIDE.md を参照
   テーマ: ダークモード（青紫基調・落ち着いたトーン）
   ============================================ */

/* リセットとベーススタイル */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-y: scroll;
    scrollbar-gutter: stable;
}

body {
    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
    line-height: 1.7;
    color: #E8EAED; /* ライトグレー - メインテキスト */
    background: #0A0E14; /* ベース背景 */
    
    /* ===== パターンサンプル - 以下のいずれかをコメントアウトして試してください ===== */
    
    /* パターン1: 六角形グリッド（SVG） */
    background-image: 
        url("data:image/svg+xml,%3Csvg width='100' height='87' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M50 0L93.3 25v50L50 100 6.7 75V25z' fill='none' stroke='%236C7CE7' stroke-width='0.5' opacity='0.15'/%3E%3C/svg%3E"),
        radial-gradient(circle at 20% 30%, rgba(108, 124, 231, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(123, 138, 232, 0.06) 0%, transparent 50%),
        linear-gradient(180deg, #0A0E14 0%, #0F1419 100%);
    
    /* パターン2: 三角形タイリング */
    /* background-image: 
        repeating-linear-gradient(60deg, transparent, transparent 35px, rgba(108, 124, 231, 0.03) 35px, rgba(108, 124, 231, 0.03) 70px),
        repeating-linear-gradient(-60deg, transparent, transparent 35px, rgba(123, 138, 232, 0.02) 35px, rgba(123, 138, 232, 0.02) 70px),
        radial-gradient(circle at 20% 30%, rgba(108, 124, 231, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(123, 138, 232, 0.06) 0%, transparent 50%),
        linear-gradient(180deg, #0A0E14 0%, #0F1419 100%); */
    
    /* パターン3: ドットグリッド */
    /* background-image: 
        radial-gradient(circle at 2px 2px, rgba(108, 124, 231, 0.15) 1px, transparent 0),
        radial-gradient(circle at 2px 2px, rgba(108, 124, 231, 0.15) 1px, transparent 0);
    background-size: 40px 40px, 40px 40px;
    background-position: 0 0, 20px 20px; */
    
    /* パターン4: 菱形タイリング */
    /* background-image: 
        repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(108, 124, 231, 0.04) 10px, rgba(108, 124, 231, 0.04) 20px),
        repeating-linear-gradient(-45deg, transparent, transparent 10px, rgba(123, 138, 232, 0.03) 10px, rgba(123, 138, 232, 0.03) 20px),
        radial-gradient(circle at 20% 30%, rgba(108, 124, 231, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(123, 138, 232, 0.06) 0%, transparent 50%),
        linear-gradient(180deg, #0A0E14 0%, #0F1419 100%); */
    
    /* パターン5: 複合幾何学パターン（六角形+ドット） */
    /* background-image: 
        url("data:image/svg+xml,%3Csvg width='100' height='87' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M50 0L93.3 25v50L50 100 6.7 75V25z' fill='none' stroke='%236C7CE7' stroke-width='0.3' opacity='0.12'/%3E%3C/svg%3E"),
        radial-gradient(circle at 2px 2px, rgba(108, 124, 231, 0.1) 0.5px, transparent 0),
        radial-gradient(circle at 2px 2px, rgba(108, 124, 231, 0.1) 0.5px, transparent 0);
    background-size: 100px 87px, 30px 30px, 30px 30px;
    background-position: 0 0, 0 0, 15px 15px; */
    
    /* ===== 元のパターン（パターンを無効にする場合） ===== */
    /* background-image: 
        radial-gradient(circle at 20% 30%, rgba(108, 124, 231, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(123, 138, 232, 0.06) 0%, transparent 50%),
        linear-gradient(180deg, #0A0E14 0%, #0F1419 100%); */
    
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: geometricPrecision;
    overflow-x: hidden;
    width: 100%;
    min-height: 100vh;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ヘッダーとナビゲーション */
header {
    background: rgba(22, 33, 62, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    padding: 1.25rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(108, 124, 231, 0.15);
    transform: translateZ(0);
    backface-visibility: hidden;
    will-change: transform;
    contain: layout style paint;
}

main {
    margin-top: 0;
    padding-top: 80px; /* ヘッダーの高さ分のスペース */
    position: relative;
    z-index: 1;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    flex: 1;
}

nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
}

nav a:hover,
nav a.active {
    color: #7B8AE8;
    background-color: rgba(108, 124, 231, 0.1);
}

/* 言語切り替えボタン */
.language-switcher {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

.lang-btn {
    background-color: rgba(108, 124, 231, 0.2);
    color: #fff;
    border: 1px solid rgba(108, 124, 231, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    font-family: inherit;
}

.lang-btn:hover {
    background-color: rgba(108, 124, 231, 0.3);
    border-color: rgba(108, 124, 231, 0.5);
}

.lang-btn.active {
    background-color: #6C7CE7;
    border-color: #6C7CE7;
    color: #fff;
}

/* ヒーローセクション */
.hero {
    background: linear-gradient(135deg, #16213E 0%, #1A1B2E 50%, #0F1419 100%);
    color: #fff;
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 40%, rgba(108, 124, 231, 0.15) 0%, transparent 60%),
        radial-gradient(circle at 70% 60%, rgba(123, 138, 232, 0.1) 0%, transparent 60%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(108, 124, 231, 0.02) 2px, rgba(108, 124, 231, 0.02) 4px);
    pointer-events: none;
    opacity: 0.5;
}

.hero > .container {
    position: relative;
    z-index: 1;
}

.hero-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 3.5rem;
}

.profile-photo {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    overflow: hidden;
    border: 5px solid rgba(108, 124, 231, 0.4);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(108, 124, 231, 0.2);
    background-color: #1A1B2E;
    flex-shrink: 0;
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1;
}

.hero h1 {
    font-size: 2.75rem;
    margin-bottom: 1rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #FFFFFF 0%, #D1D5DB 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.researcher-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.profile-links {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.profile-link {
    color: #7B8AE8;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid rgba(108, 124, 231, 0.3);
    background-color: rgba(108, 124, 231, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.profile-link:hover {
    background-color: rgba(108, 124, 231, 0.25);
    border-color: rgba(108, 124, 231, 0.5);
    color: #8B9AF8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 124, 231, 0.2);
}


.affiliation {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    opacity: 0.95;
    line-height: 1.6;
}

.email {
    font-size: 1rem;
    opacity: 0.9;
    margin: 0;
}

/* タブコンテンツ */
.tab-content {
    display: none;
    animation: fadeIn 0.4s ease-in-out;
}

.tab-content.active {
    display: block;
}

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

/* セクション */
.section {
    padding: 5rem 0;
    position: relative;
    transform: translateZ(0);
    backface-visibility: hidden;
    will-change: transform;
    contain: layout style paint;
}

.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 50% 0%, rgba(108, 124, 231, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.section > .container {
    position: relative;
    z-index: 1;
}

/* カードスタイルのコンテンツ */
.content-card {
    background: rgba(15, 20, 25, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(108, 124, 231, 0.15);
    border-radius: 16px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.content-card:hover {
    border-color: rgba(108, 124, 231, 0.25);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.section h2 {
    font-size: 2.25rem;
    margin-bottom: 3rem;
    color: #FFFFFF;
    font-weight: 600;
    letter-spacing: -0.02em;
    position: relative;
    padding-bottom: 1rem;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #6C7CE7 0%, #7B8AE8 100%);
    border-radius: 2px;
}

.section h3 {
    font-size: 1.6rem;
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
    color: #D1D5DB;
    font-weight: 500;
    padding-left: 1rem;
    border-left: 4px solid rgba(108, 124, 231, 0.4);
    transform: translateZ(0);
    backface-visibility: hidden;
    letter-spacing: -0.01em;
}

.section h3:first-of-type {
    margin-top: 0;
}

.keywords-header {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.keywords-inline {
    font-weight: 400;
    color: #E8EAED;
    font-size: 1.1rem;
}

.content {
    line-height: 1.85;
    color: #E8EAED;
    transform: translateZ(0);
    will-change: transform;
    contain: layout style;
    font-size: 1.05rem;
}

.content ul,
.content ol {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
    padding-left: 0;
}

.content li {
    margin-bottom: 1rem;
    padding-left: 0.5rem;
    position: relative;
    transform: translateZ(0);
    line-height: 1.8;
}

.content ol li {
    padding-left: 0.25rem;
}

.content ul li::before {
    content: '▸';
    color: #6C7CE7;
    font-weight: bold;
    position: absolute;
    left: -1.25rem;
    font-size: 1.1em;
}

/* キーワードタグ */
.keywords-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.875rem;
    margin-bottom: 2rem;
}

.keyword-tag {
    display: inline-block;
    background: rgba(108, 124, 231, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #7B8AE8;
    padding: 0.6rem 1.4rem;
    border-radius: 24px;
    border: 1px solid rgba(108, 124, 231, 0.3);
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-decoration: none;
}

a.keyword-tag {
    color: #7B8AE8;
    text-decoration: none;
}

a.keyword-tag:hover {
    text-decoration: none;
    background: rgba(108, 124, 231, 0.25);
    border-color: rgba(108, 124, 231, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(108, 124, 231, 0.25);
}

.content a {
    color: #6C7CE7;
    text-decoration: none;
    transition: color 0.3s ease;
    border-bottom: 1px solid rgba(108, 124, 231, 0.3);
    padding-bottom: 1px;
}

.content a:hover {
    color: #7B8AE8;
    border-bottom-color: rgba(108, 124, 231, 0.6);
}

/* 論文リストの改善 */
.content ol li {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(108, 124, 231, 0.1);
    transition: background-color 0.2s ease;
    margin-left: 0;
    padding-left: 0;
    padding-right: 1rem;
}

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

.content ol li:hover {
    background-color: rgba(108, 124, 231, 0.05);
    border-radius: 8px;
    padding-left: 0.75rem;
    margin-left: -0.75rem;
}

/* セクション間の視覚的な区切り */
.section + .section {
    border-top: 1px solid rgba(108, 124, 231, 0.08);
}

/* フッター */
footer {
    background: rgba(22, 33, 62, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    text-align: center;
    padding: 2.5rem 0;
    border-top: 1px solid rgba(108, 124, 231, 0.15);
    margin-top: 4rem;
}

/* フォーカス表示（アクセシビリティ） */
a:focus,
button:focus {
    outline: 2px solid #6C7CE7;
    outline-offset: 2px;
    border-radius: 2px;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    .hero {
        padding: 3.5rem 0;
    }

    .hero h1 {
        font-size: 2rem;
    }

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

    nav {
        flex-direction: column;
        align-items: center;
    }

    nav ul {
        gap: 1rem;
        width: 100%;
        justify-content: center;
    }

    nav a {
        font-size: 0.9rem;
        padding: 0.4rem 0.6rem;
    }

    .language-switcher {
        margin-left: 0;
        margin-top: 0.5rem;
    }

    .lang-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }

    .section {
        padding: 3.5rem 0;
    }

    .content-card {
        padding: 1.75rem;
        border-radius: 12px;
    }
    
    .keywords-container {
        gap: 0.625rem;
    }
    
    .keyword-tag {
        font-size: 0.85rem;
        padding: 0.5rem 1.1rem;
    }

    .section h2 {
        font-size: 1.875rem;
        margin-bottom: 2rem;
    }

    .section h3 {
        font-size: 1.35rem;
        margin-top: 2rem;
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 2.5rem;
    }

    .hero-text {
        align-items: center;
    }

    .researcher-info {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .profile-links {
        justify-content: center;
    }

    .content {
        font-size: 1rem;
    }
}
