﻿/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans JP', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.7;
    color: #2c2c2c;
    background: var(--animated-bg);
    font-weight: 400;
    letter-spacing: 0.01em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Color Variables - Modern Warm Orange Palette with Ambient Background */
:root {
    --primary-gradient: linear-gradient(135deg, #ff9f7a 0%, #ffbf9b 100%);
    --secondary-gradient: linear-gradient(135deg, #ffa885 0%, #ffcaa6 100%);
    --accent-gradient: linear-gradient(135deg, #ffe4d1 0%, #fff0e6 100%);
    --warm-gradient: linear-gradient(135deg, #ff8f65 0%, #ffa885 100%);
    --primary-color: #ff9f7a;
    --secondary-color: #ffbf9b;
    --accent-color: #ffe4d1;
    --warm-white: #ffffff;
    --warm-gray: #6b7280;
    --light-gray: #f8fafc;
    --dark-gray: #1f2937;
    --text-primary: #2c2c2c;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;
    --hover-color: #ff8f65;
    --shadow: rgba(255, 159, 122, 0.08);
    --gradient-shadow: 0 10px 40px rgba(255, 159, 122, 0.12);
    --border-light: rgba(255, 159, 122, 0.1);
    --surface: rgba(255, 255, 255, 0.1);
    --surface-hover: rgba(255, 255, 255, 0.2);
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.2);
    --blur-backdrop: blur(20px);
    --animated-bg: radial-gradient(circle at 20% 50%, rgba(255, 159, 122, 0.3) 0%, transparent 50%),
                   radial-gradient(circle at 80% 20%, rgba(255, 191, 155, 0.3) 0%, transparent 50%),
                   radial-gradient(circle at 40% 80%, rgba(255, 168, 133, 0.2) 0%, transparent 50%),
                   linear-gradient(135deg, #ffffff 0%, #f8f9fa 50%, #fff5f0 100%);
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --primary-gradient: linear-gradient(135deg, #ff8f65 0%, #ffa885 100%);
    --secondary-gradient: linear-gradient(135deg, #ff7a50 0%, #ff9f7a 100%);
    --accent-gradient: linear-gradient(135deg, rgba(255, 228, 209, 0.2) 0%, rgba(255, 240, 230, 0.3) 100%);
    --warm-gradient: linear-gradient(135deg, #ff6b35 0%, #ff8f65 100%);
    --primary-color: #ff8f65;
    --secondary-color: #ffa885;
    --accent-color: #ffe4d1;
    --warm-white: #0f172a;
    --warm-gray: #94a3b8;
    --light-gray: #1e293b;
    --dark-gray: #f1f5f9;
    --text-primary: #f8fafc;
    --text-secondary: #e2e8f0;
    --text-muted: #94a3b8;
    --hover-color: #ff7a50;
    --shadow: rgba(0, 0, 0, 0.4);
    --gradient-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    --border-light: rgba(255, 143, 101, 0.1);
    --surface: rgba(30, 41, 59, 0.3);
    --surface-hover: rgba(51, 65, 85, 0.4);
    --glass-bg: rgba(30, 41, 59, 0.2);
    --glass-border: rgba(248, 250, 252, 0.1);
    --blur-backdrop: blur(20px);
}

[data-theme="dark"] body {
    background: radial-gradient(circle at 20% 50%, rgba(255, 143, 101, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(255, 122, 89, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 40% 80%, rgba(255, 107, 53, 0.1) 0%, transparent 50%),
                linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0a0f1c 100%);
    color: var(--text-primary);
}

[data-theme="dark"] .content-card,
[data-theme="dark"] .research-card,
[data-theme="dark"] .news-item,
[data-theme="dark"] .activity-card {
    background: rgba(45, 45, 45, 0.3);
    backdrop-filter: var(--blur-backdrop);
    border: 1px solid rgba(255, 143, 101, 0.1);
}

[data-theme="dark"] .footer {
    background: #0f0f0f;
}

[data-theme="dark"] .page-loader {
    background: #1a1a1a;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--dark-gray);
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; font-weight: 700; }
h2 { font-size: 2rem; font-weight: 600; }
h3 { font-size: 1.5rem; font-weight: 500; }
h4 { font-size: 1.25rem; font-weight: 500; }

p {
    margin-bottom: 1rem;
    color: #555;
}

[data-theme="dark"] p {
    color: var(--text-secondary);
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--hover-color);
}

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

/* Header Styles */
.header {
    background: var(--glass-bg);
    backdrop-filter: var(--blur-backdrop);
    box-shadow: var(--gradient-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--glass-border);
    border: 1px solid var(--glass-border);
}

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

.header-top {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.logo {
    display: flex;
    align-items: center;
}

.logo h4 {
    margin: 0;
}

.logo h4 a {
    color: var(--primary-color);
    font-size: 1.4rem;
    font-weight: 600;
    white-space: nowrap;
}

.logo p {
    color: var(--warm-gray);
    font-size: 0.9rem;
    margin: 0;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.2rem;
    flex-wrap: wrap;
}

.nav-link {
    color: var(--dark-gray);
    font-weight: 400;
    padding: 0.5rem 0.8rem;
    border-radius: 20px;
    transition: all 0.3s ease;
    position: relative;
    font-size: 0.95rem;
    white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
    background: var(--glass-bg);
    backdrop-filter: var(--blur-backdrop);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--gradient-shadow);
    border: 1px solid var(--glass-border);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    gap: 4px;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    transition: all 0.3s ease;
}

/* Theme Toggle Switch */
.theme-toggle-container {
    margin-left: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.theme-status-icon {
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.theme-toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
    cursor: pointer;
}

.theme-toggle-checkbox {
    opacity: 0;
    width: 0;
    height: 0;
}

.theme-toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--glass-bg);
    backdrop-filter: var(--blur-backdrop);
    border: 2px solid var(--glass-border);
    border-radius: 30px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 2px;
}

.theme-toggle-slider:before {
    content: "";
    position: absolute;
    height: 22px;
    width: 22px;
    left: 2px;
    bottom: 2px;
    background: var(--primary-gradient);
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 159, 122, 0.3);
    z-index: 1;
}

.theme-toggle-checkbox:checked + .theme-toggle-slider:before {
    transform: translateX(28px);
    background: var(--secondary-gradient);
}

.theme-toggle-checkbox:checked + .theme-toggle-slider {
    background: var(--surface);
    border-color: var(--primary-color);
}

.theme-toggle-slider:hover {
    box-shadow: var(--gradient-shadow);
    transform: scale(1.05);
}


[data-theme="dark"] .theme-toggle-icon::before {
    content: '笘・・;
}

[data-theme="dark"] .theme-toggle-icon {
    font-size: 0;
}

[data-theme="dark"] .theme-toggle-icon::before {
    font-size: 1.2rem;
}

/* Hero Section */
.hero {
    background: var(--primary-gradient);
    color: white;
    padding: 40px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 107, 53, 0.1) 0%, rgba(247, 147, 30, 0.1) 100%);
    pointer-events: none;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 70%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.cta-button {
    display: inline-block;
    background: var(--glass-bg);
    backdrop-filter: var(--blur-backdrop);
    color: white;
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: var(--gradient-shadow);
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-3px);
    background: var(--surface-hover);
    backdrop-filter: blur(25px);
    box-shadow: 0 10px 30px rgba(255, 159, 122, 0.25);
    color: var(--hover-color);
    border-color: var(--primary-color);
}

/* Section Styles */
section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--dark-gray);
    letter-spacing: -0.02em;
    z-index: 2;
}

.section-title::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--primary-color) 20%, var(--secondary-color) 80%, transparent 100%);
    z-index: -1;
    opacity: 0.3;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary-gradient);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

.section-title span {
    background: var(--warm-white);
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

/* Enhanced section titles for different pages */
.page-title {
    font-size: 3.2rem;
    font-weight: 800;
    color: #1a1a1a;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
}

[data-theme="dark"] .page-title {
    color: #f8fafc;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-subtitle {
    font-size: 1.3rem;
    font-weight: 400;
    opacity: 0.95;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* Welcome Section */
.welcome {
    background: var(--light-gray);
}

.welcome-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.welcome-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

/* News Section */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.news-item {
    background: var(--glass-bg);
    backdrop-filter: var(--blur-backdrop);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--gradient-shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--glass-border);
}

.news-item:hover {
    transform: translateY(-5px);
    background: var(--surface-hover);
    backdrop-filter: blur(25px);
    box-shadow: 0 15px 50px rgba(255, 159, 122, 0.15);
    border-color: var(--primary-color);
}

.news-date {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.news-item h3 {
    color: var(--dark-gray);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

/* Research Areas Section */
.research-areas {
    background: var(--light-gray);
}

.research-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.research-card {
    background: var(--glass-bg);
    backdrop-filter: var(--blur-backdrop);
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: var(--gradient-shadow);
    transition: all 0.3s ease;
    border: 2px solid var(--glass-border);
}

.research-card:hover {
    transform: translateY(-10px);
    background: var(--surface-hover);
    backdrop-filter: blur(30px);
    border-color: var(--primary-color);
    box-shadow: 0 20px 60px rgba(255, 159, 122, 0.2);
}

.research-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.research-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

/* Activities Section */
.activities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.activity-card {
    background: var(--glass-bg);
    backdrop-filter: var(--blur-backdrop);
    color: var(--text-primary);
    padding: 2.5rem;
    border-radius: 20px;
    transition: all 0.3s ease;
    box-shadow: var(--gradient-shadow);
    border: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
}

.activity-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--primary-gradient);
    opacity: 0.1;
    z-index: -1;
}

.activity-card:hover {
    transform: translateY(-8px);
    backdrop-filter: blur(30px);
    box-shadow: 0 25px 70px rgba(255, 143, 101, 0.25);
}

.activity-card:hover::before {
    opacity: 0.2;
}

.activity-card h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 600;
}

.activity-card p {
    color: var(--text-secondary);
}

/* Footer */
.footer {
    background: var(--secondary-gradient);
    color: white;
    padding: 3rem 0 1rem;
    position: relative;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-info h3 {
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.footer-info p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
}

.footer-links h4 {
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 2rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

/* Page Content Styles */
.page-header {
    background: var(--primary-gradient);
    color: white;
    padding: 24px 0 16px;
    text-align: center;
    box-shadow: var(--gradient-shadow);
}

.page-header .page-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

.content-section {
    padding: 60px 0;
}

.content-card {
    background: var(--glass-bg);
    backdrop-filter: var(--blur-backdrop);
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 15px;
    box-shadow: var(--gradient-shadow);
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.content-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(255, 159, 122, 0.15);
    background: var(--surface-hover);
    backdrop-filter: blur(25px);
}

.content-card h3 {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--border-light);
    padding-bottom: 0.5rem;
    font-weight: 600;
}

.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

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

.achievement-list li {
    padding: 1rem;
    margin-bottom: 1rem;
    background: var(--glass-bg);
    backdrop-filter: var(--blur-backdrop);
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px var(--shadow);
}

.achievement-list li:hover {
    background: var(--surface-hover);
    backdrop-filter: blur(25px);
    transform: translateX(5px);
}

.achievement-list .year {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

/* Ambient Background Animation */
@keyframes ambientFloat {
    0% {
        transform: translate(0px, 0px) scale(1);
        opacity: 0.8;
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
        opacity: 0.9;
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
        opacity: 0.7;
    }
    100% {
        transform: translate(0px, 0px) scale(1);
        opacity: 0.8;
    }
}

@keyframes ambientPulse {
    0%, 100% {
        opacity: 0.4;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 10% 20%, rgba(255, 159, 122, 0.4) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(255, 191, 155, 0.3) 0%, transparent 40%),
        radial-gradient(circle at 40% 40%, rgba(255, 168, 133, 0.2) 0%, transparent 40%);
    animation: ambientFloat 20s ease-in-out infinite;
    pointer-events: none;
    z-index: -2;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 70% 10%, rgba(255, 143, 101, 0.2) 0%, transparent 35%),
        radial-gradient(circle at 20% 90%, rgba(255, 202, 166, 0.3) 0%, transparent 35%);
    animation: ambientPulse 15s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: -1;
}

[data-theme="dark"] body::before {
    background: 
        radial-gradient(circle at 10% 20%, rgba(255, 143, 101, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(255, 122, 89, 0.12) 0%, transparent 40%),
        radial-gradient(circle at 40% 40%, rgba(255, 107, 53, 0.1) 0%, transparent 40%);
}

[data-theme="dark"] body::after {
    background: 
        radial-gradient(circle at 70% 10%, rgba(255, 91, 65, 0.1) 0%, transparent 35%),
        radial-gradient(circle at 20% 90%, rgba(255, 168, 133, 0.12) 0%, transparent 35%);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 0.8rem;
        padding: 15px;
        min-height: auto;
    }

    .mobile-menu-btn {
        display: none;
    }

    /* 上段：ロゴとテーマ切替 */
    .header-top {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .logo {
        flex-shrink: 0;
        display: flex;
        align-items: center;
    }

    .logo h4 a {
        font-size: 1.2rem;
    }

    /* 下段：ナビゲーションメニュー */
    .nav-menu {
        width: 100%;
        justify-content: center;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 0.5rem;
        padding: 0.5rem 0;
        background: none;
        border: none;
        box-shadow: none;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .nav-menu::-webkit-scrollbar {
        display: none;
    }

    .nav-menu li {
        flex-shrink: 0;
        margin-bottom: 0;
    }

    .nav-link {
        display: block;
        white-space: nowrap;
        padding: 0.5rem 0.8rem;
        font-size: 0.9rem;
        border-radius: 20px;
        background: var(--glass-bg);
        backdrop-filter: var(--blur-backdrop);
        border: 1px solid var(--glass-border);
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .research-grid, .news-grid, .activities-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .two-column {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .container {
        padding: 0 15px;
    }

    section {
        padding: 60px 0;
    }

    .profile-image, .profile-placeholder {
        max-width: 90%;
        width: auto;
        height: auto;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 12px;
        gap: 0.6rem;
    }

    .logo h4 a {
        font-size: 1rem;
    }

    .nav-menu {
        gap: 0.3rem;
        padding: 0.3rem 0;
    }

    .nav-link {
        padding: 0.4rem 0.6rem;
        font-size: 0.85rem;
        border-radius: 15px;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-content {
        padding: 0 15px;
    }

    .research-card, .news-item, .activity-card {
        padding: 1.5rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .profile-image, .profile-placeholder {
        max-width: 85%;
        width: auto;
        height: auto;
    }

    .profile-placeholder {
        font-size: 2.5rem;
    }
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Page Transition Animations */
main {
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

body.page-transition .page-content {
    opacity: 0;
    transform: translateY(20px);
}

.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--warm-white);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 1;
    transition: opacity 0.4s ease-in-out;
}

.page-loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-content {
    text-align: center;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--light-gray);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loader-text {
    color: var(--primary-color);
    font-weight: 500;
}

/* Page Enter/Exit Animations */
.page-content.page-enter {
    animation: pageEnter 0.5s ease-out;
}

.page-content.page-exit {
    animation: pageExit 0.3s ease-in;
}

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

@keyframes pageExit {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* Smooth Navigation Transitions */
.nav-transition {
    transition: all 0.3s ease;
}

.nav-transition.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Scroll to Top Button */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary-color);
    color: white;
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
}

/* Profile Image Styles */
.profile-image-section {
    text-align: center;
    margin-bottom: 2rem;
}

.profile-image {
    width: 450px;
    height: 300px;
    border-radius: 20px;
    object-fit: cover;
    box-shadow: 0 8px 30px var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-image:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 40px var(--shadow);
}

.profile-placeholder {
    width: 450px;
    height: 300px;
    border-radius: 20px;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: white;
    font-size: 4rem;
    box-shadow: 0 8px 30px var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-placeholder:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 40px var(--shadow);
}

/* Profile Page Specific Styles */
.research-themes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.theme-item {
    background: var(--light-gray);
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.theme-item:hover {
    transform: translateY(-3px);
    background: var(--glass-bg);
    backdrop-filter: var(--blur-backdrop);
    box-shadow: 0 8px 25px rgba(255, 159, 122, 0.12);
    border-color: var(--primary-color);
}

.theme-item h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

/* Research Page Specific Styles */
.model-section {
    margin: 2rem 0;
    padding: 2rem;
    background: var(--light-gray);
    border-radius: 15px;
    border-left: 5px solid var(--primary-color);
}

.model-content h5 {
    color: var(--secondary-color);
    margin: 1.5rem 0 1rem 0;
    font-size: 1.1rem;
}

.environment-types, .system-states {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.env-type, .state-item {
    background: var(--glass-bg);
    backdrop-filter: var(--blur-backdrop);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--gradient-shadow);
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.env-type:hover, .state-item:hover {
    background: var(--surface-hover);
    backdrop-filter: blur(25px);
    transform: translateY(-2px);
}

.env-type h5, .state-item h5 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.strategy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.strategy-item {
    background: var(--glass-bg);
    backdrop-filter: var(--blur-backdrop);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: var(--gradient-shadow);
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.strategy-item:hover {
    background: var(--surface-hover);
    backdrop-filter: blur(25px);
    transform: translateY(-2px) scale(1.02);
}

.strategy-item strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 0.5rem;
}

.application-example, .future-work {
    margin-top: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px var(--shadow);
}

.grant-section {
    margin: 2rem 0;
}

.grant-section h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--light-gray);
    padding-bottom: 0.5rem;
}

.grant-list, .patent-list, .research-topics {
    list-style: none;
    padding: 0;
}

.grant-list li, .patent-list li, .research-topics li {
    padding: 0.8rem;
    margin-bottom: 0.5rem;
    background: var(--light-gray);
    border-radius: 8px;
    border-left: 3px solid var(--accent-color);
    transition: all 0.3s ease;
}

.grant-list li:hover, .patent-list li:hover, .research-topics li:hover {
    background: var(--surface-hover);
    backdrop-filter: blur(25px);
    box-shadow: 0 2px 8px var(--shadow);
    transform: translateX(5px);
}

.research-examples {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.research-category h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--light-gray);
    padding-bottom: 0.5rem;
}

/* Publications Page Specific Styles */
.publication-list {
    list-style: none;
    padding: 0;
}

.publication-list li {
    padding: 1.5rem;
    margin-bottom: 1rem;
    background: var(--glass-bg);
    backdrop-filter: var(--blur-backdrop);
    border-radius: 10px;
    box-shadow: var(--gradient-shadow);
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.publication-list li:hover {
    background: var(--surface-hover);
    backdrop-filter: blur(25px);
    box-shadow: 0 15px 40px rgba(255, 159, 122, 0.15);
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

.pub-year {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: block;
}

.pub-title {
    font-weight: 600;
    color: var(--dark-gray);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.pub-journal {
    color: var(--secondary-color);
    font-weight: 500;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    display: block;
}

.pub-details {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.6;
}

.award-section {
    background: var(--light-gray);
    padding: 2rem;
    border-radius: 15px;
    margin-top: 1.5rem;
}

.award-list li {
    border-left: 4px solid var(--accent-color);
    background: var(--glass-bg);
    backdrop-filter: var(--blur-backdrop);
    border: 1px solid var(--glass-border);
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.award-list li:hover {
    background: var(--surface-hover);
    backdrop-filter: blur(25px);
    transform: translateX(5px);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.stat-item {
    text-align: center;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 2rem;
    border-radius: 15px;
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: block;
}

.stat-label {
    font-size: 0.95rem;
    opacity: 0.9;
}

/* Teaching Page Specific Styles */
.course-section {
    margin: 2rem 0;
}

.course-section h4 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--light-gray);
    padding-bottom: 0.5rem;
}

.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin: 1.5rem 0;
}

.course-item {
    background: var(--glass-bg);
    backdrop-filter: var(--blur-backdrop);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--gradient-shadow);
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.course-item:hover {
    transform: translateY(-5px);
    background: var(--surface-hover);
    backdrop-filter: blur(25px);
}

.course-item h5 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.course-type {
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: block;
}

.note-section {
    text-align: center;
    margin: 2rem 0;
}

.course-note {
    color: var(--warm-gray);
    font-style: italic;
    background: var(--light-gray);
    padding: 1rem;
    border-radius: 8px;
    margin: 0;
}

.research-guidance {
    display: grid;
    gap: 2rem;
}

.guidance-item {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 15px var(--shadow);
}

.guidance-item h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--light-gray);
    padding-bottom: 0.5rem;
}

.student-achievements {
    display: grid;
    gap: 2rem;
}

.achievement-category {
    background: var(--glass-bg);
    backdrop-filter: var(--blur-backdrop);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--gradient-shadow);
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.achievement-category:hover {
    background: var(--surface-hover);
    backdrop-filter: blur(25px);
    transform: translateY(-2px);
}

.achievement-category h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--light-gray);
    padding-bottom: 0.5rem;
}

.message-to-students blockquote {
    background: var(--light-gray);
    padding: 2rem;
    border-radius: 15px;
    border-left: 5px solid var(--primary-color);
    font-style: italic;
    margin: 0;
}

.message-to-students footer {
    text-align: right;
    margin-top: 1rem;
    color: var(--secondary-color);
    font-weight: 600;
}

/* Social Page Specific Styles */
.major-activities {
    display: grid;
    gap: 2rem;
    margin: 2rem 0;
}

.activity-highlight {
    display: flex;
    gap: 2rem;
    background: var(--glass-bg);
    backdrop-filter: var(--blur-backdrop);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--gradient-shadow);
    border: 1px solid var(--glass-border);
    align-items: flex-start;
    transition: all 0.3s ease;
}

.activity-highlight:hover {
    transform: translateY(-5px);
    background: var(--surface-hover);
    backdrop-filter: blur(25px);
}

.activity-icon {
    font-size: 3rem;
    flex-shrink: 0;
}

.activity-content h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.academic-activities {
    display: grid;
    gap: 2rem;
}

.activity-section {
    background: var(--glass-bg);
    backdrop-filter: var(--blur-backdrop);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--gradient-shadow);
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.activity-section:hover {
    background: var(--surface-hover);
    backdrop-filter: blur(25px);
    transform: translateY(-2px);
}

.activity-section h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--light-gray);
    padding-bottom: 0.5rem;
}

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

.activity-list li {
    padding: 0.8rem;
    margin-bottom: 0.5rem;
    background: var(--light-gray);
    border-radius: 8px;
    border-left: 3px solid var(--accent-color);
    transition: all 0.3s ease;
}

.activity-list li:hover {
    background: var(--surface-hover);
    backdrop-filter: blur(25px);
    transform: translateX(5px);
    box-shadow: 0 2px 10px var(--shadow);
}

.media-coverage {
    display: grid;
    gap: 2rem;
}

.media-item {
    background: var(--glass-bg);
    backdrop-filter: var(--blur-backdrop);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--gradient-shadow);
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.media-item:hover {
    transform: translateY(-5px);
    background: var(--surface-hover);
    backdrop-filter: blur(25px);
    border-color: var(--primary-color);
}

.media-source {
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: block;
}

.media-item h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.lectures-section {
    display: grid;
    gap: 2rem;
}

.lecture-category {
    background: var(--glass-bg);
    backdrop-filter: var(--blur-backdrop);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--gradient-shadow);
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.lecture-category:hover {
    background: var(--surface-hover);
    backdrop-filter: blur(25px);
    transform: translateY(-2px);
}

.lecture-category h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--light-gray);
    padding-bottom: 0.5rem;
}

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

.lecture-list li {
    padding: 1rem;
    margin-bottom: 1rem;
    background: var(--light-gray);
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
    transition: all 0.3s ease;
}

.lecture-list li:hover {
    background: var(--surface-hover);
    backdrop-filter: blur(25px);
    transform: translateX(5px);
    box-shadow: 0 2px 10px var(--shadow);
}

.lecture-title {
    font-weight: 600;
    color: var(--dark-gray);
    margin-bottom: 0.5rem;
}

.lecture-venue {
    color: var(--warm-gray);
    font-size: 0.9rem;
}

.contribution-philosophy blockquote {
    background: var(--light-gray);
    padding: 2rem;
    border-radius: 15px;
    border-left: 5px solid var(--primary-color);
    font-style: italic;
    margin: 0;
    transition: all 0.3s ease;
}

.contribution-philosophy blockquote:hover {
    background: var(--surface-hover);
    backdrop-filter: blur(25px);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 159, 122, 0.12);
    border-color: var(--primary-color);
}

.contribution-philosophy footer {
    text-align: right;
    margin-top: 1rem;
    color: var(--secondary-color);
    font-weight: 600;
}

/* Contact Page Specific Styles */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: start;
}

.address-info h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.address {
    font-size: 1.1rem;
    color: var(--dark-gray);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.contact-details {
    margin-top: 16px;
    display: grid;
    gap: 1rem;
}

.contact-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.contact-label {
    color: var(--secondary-color);
    font-weight: 600;
}

.contact-value {
    color: var(--dark-gray);
    font-family: monospace;
    background: var(--light-gray);
    padding: 0.5rem;
    border-radius: 5px;
}

.contact-note {
    color: var(--warm-gray);
    font-size: 0.85rem;
}

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

.affiliation-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    margin-bottom: 0.5rem;
    background: var(--light-gray);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.affiliation-list li:hover {
    background: var(--surface-hover);
    backdrop-filter: blur(25px);
    transform: translateX(5px);
    box-shadow: 0 2px 10px var(--shadow);
}

.position {
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 0.9rem;
}

.access-info h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    margin-top: 2rem;
}

.access-info h4:first-child {
    margin-top: 0;
}

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

.access-list li {
    padding: 1rem;
    margin-bottom: 1rem;
    background: var(--light-gray);
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
}

.access-list strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 0.5rem;
}

.map-container {
    background: var(--light-gray);
    padding: 1.5rem;
    border-radius: 15px;
    overflow: hidden;
}

.map-container iframe {
    box-shadow: 0 4px 15px var(--shadow);
    margin-bottom: 1rem;
}

.map-info {
    text-align: center;
    padding-top: 1rem;
    color: var(--warm-gray);
}

.map-link {
    color: var(--primary-color);
    text-decoration: underline;
    margin-top: 1rem;
    display: inline-block;
}

.visit-guidelines ul, .office-hours {
    background: var(--light-gray);
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.office-hours strong {
    color: var(--primary-color);
}

.inquiry-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.inquiry-item {
    background: var(--glass-bg);
    backdrop-filter: var(--blur-backdrop);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--gradient-shadow);
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.inquiry-item:hover {
    transform: translateY(-3px);
    background: var(--surface-hover);
    backdrop-filter: blur(25px);
    border-color: var(--primary-color);
}

.inquiry-item h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.lab-application-info {
    background: var(--light-gray);
    padding: 2rem;
    border-radius: 15px;
}

.application-guidelines h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    margin-top: 2rem;
}

.application-guidelines h4:first-child {
    margin-top: 0;
}

/* 研究テーマリストの長い語や英数字連続に備え折返しを強制 */
.research-topics li {
    word-break: break-word;
    overflow-wrap: anywhere;
}

@media (max-width: 768px) {
    /* 研究テーマカードはモバイルで1カラム固定 */
    .research-examples {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
}

@media (max-width: 480px) {
    /* さらに狭い端末向けの微調整 */
    .research-examples {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Theme Status Icon */

@media (max-width: 768px) {
    .theme-toggle-container {
        margin-left: 0.5rem;
    }
    
    .theme-toggle-switch {
        width: 50px;
        height: 26px;
    }
    
    .theme-toggle-slider:before {
        height: 18px;
        width: 18px;
    }
    
    .theme-toggle-checkbox:checked + .theme-toggle-slider:before {
        transform: translateX(22px);
    }
    
    .theme-status-icon {
        font-size: 1rem;
    }
}
