/* リセットCSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* カスタムプロパティ（CSS変数） - ダークテーマ（デフォルト） */
:root {
    --primary-color: #00d2ff;
    --secondary-color: #3a0ca3;
    --accent-color: #ff006e;
    --dark-bg: #0a0a0a;
    --darker-bg: #000000;
    --light-bg: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-muted: #888888;
    --gradient-primary: linear-gradient(135deg, #00d2ff 0%, #3a0ca3 100%);
    --gradient-accent: linear-gradient(135deg, #ff006e 0%, #8338ec 100%);
    --gradient-bg: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    --border-radius: 12px;
    --shadow: 0 8px 32px rgba(0, 210, 255, 0.1);
    --shadow-hover: 0 12px 48px rgba(0, 210, 255, 0.2);
    --card-bg: rgba(255, 255, 255, 0.05);
    --border-color: rgba(255, 255, 255, 0.1);
    --form-bg: rgba(255, 255, 255, 0.1);
}

/* ライトテーマ */
[data-theme="light"] {
    --primary-color: #0066cc;
    --secondary-color: #2d1b69;
    --accent-color: #e91e63;
    --dark-bg: #ffffff;
    --darker-bg: #f8f9fa;
    --light-bg: #f0f2f5;
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --gradient-primary: linear-gradient(135deg, #0066cc 0%, #2d1b69 100%);
    --gradient-accent: linear-gradient(135deg, #e91e63 0%, #9c27b0 100%);
    --gradient-bg: linear-gradient(135deg, #ffffff 0%, #f0f2f5 100%);
    --shadow: 0 8px 32px rgba(0, 102, 204, 0.15);
    --shadow-hover: 0 12px 48px rgba(0, 102, 204, 0.25);
    --card-bg: rgba(0, 0, 0, 0.05);
    --border-color: rgba(0, 0, 0, 0.1);
    --form-bg: rgba(0, 0, 0, 0.08);
}

/* 基本スタイル */
body {
    font-family: 'Noto Sans JP', sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* スクロールバーのカスタマイズ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gradient-accent);
}

/* コンテナ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* セクションタイトル */
.section-title {
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 4rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

/* ナビゲーション */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 1rem 0;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* ライトテーマのナビゲーション */
[data-theme="light"] .navbar {
    background: rgba(248, 249, 250, 0.95);
    border-bottom: 1px solid var(--border-color);
}

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.ai-icon {
    font-size: 2rem;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: 0.3s;
}

/* テーマ切替スイッチ */
.theme-switch {
    position: relative;
}

.theme-toggle-input {
    display: none;
}

.theme-toggle-label {
    display: block;
    cursor: pointer;
}

.theme-toggle-track {
    display: block;
    width: 60px;
    height: 30px;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 15px;
    position: relative;
    transition: all 0.3s ease;
}

.theme-toggle-track:hover {
    border-color: var(--primary-color);
}

.theme-toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 22px;
    height: 22px;
    background: var(--gradient-primary);
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.theme-icon {
    position: absolute;
    font-size: 12px;
    transition: all 0.3s ease;
}

.theme-icon-dark {
    opacity: 1;
    transform: scale(1);
}

.theme-icon-light {
    opacity: 0;
    transform: scale(0.5);
}

/* ライトテーマ選択時 */
.theme-toggle-input:checked + .theme-toggle-label .theme-toggle-thumb {
    transform: translateX(30px);
}

.theme-toggle-input:checked + .theme-toggle-label .theme-icon-dark {
    opacity: 0;
    transform: scale(0.5);
}

.theme-toggle-input:checked + .theme-toggle-label .theme-icon-light {
    opacity: 1;
    transform: scale(1);
}

/* ヒーローセクション */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--gradient-bg);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 80%, rgba(0, 210, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(255, 0, 110, 0.1) 0%, transparent 50%);
}

.hero-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.typing-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cursor {
    color: var(--primary-color);
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.hero-profile {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.hero-profile p {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow);
}

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

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
}

/* AIビジュアル */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.ai-brain {
    position: relative;
    width: 400px;
    height: 400px;
}

.neural-network {
    width: 100%;
    height: 100%;
    position: relative;
}

.node {
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--gradient-primary);
    border-radius: 50%;
    animation: pulse 2s infinite alternate;
}

.node:nth-child(1) { top: 20%; left: 20%; animation-delay: 0s; }
.node:nth-child(2) { top: 30%; right: 20%; animation-delay: 0.4s; }
.node:nth-child(3) { bottom: 30%; left: 30%; animation-delay: 0.8s; }
.node:nth-child(4) { bottom: 20%; right: 30%; animation-delay: 1.2s; }
.node:nth-child(5) { top: 50%; left: 50%; animation-delay: 1.6s; transform: translate(-50%, -50%); }

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.7;
        box-shadow: 0 0 20px rgba(0, 210, 255, 0.3);
    }
    100% {
        transform: scale(1.2);
        opacity: 1;
        box-shadow: 0 0 40px rgba(0, 210, 255, 0.6);
    }
}

.connection {
    position: absolute;
    height: 2px;
    background: var(--gradient-primary);
    opacity: 0.6;
    animation: flow 3s infinite linear;
}

.connection:nth-child(6) {
    top: 25%;
    left: 25%;
    width: 50%;
    transform: rotate(20deg);
}

.connection:nth-child(7) {
    bottom: 35%;
    left: 35%;
    width: 30%;
    transform: rotate(-45deg);
}

.connection:nth-child(8) {
    top: 55%;
    right: 25%;
    width: 40%;
    transform: rotate(60deg);
}

@keyframes flow {
    0% { opacity: 0.3; }
    50% { opacity: 1; }
    100% { opacity: 0.3; }
}

/* スキルセクション */
.skills {
    padding: 8rem 0;
    background: var(--light-bg);
}

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

.skill-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    text-align: center;
    transition: all 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.skill-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.skill-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.skill-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ビジョンセクション */
.vision {
    padding: 8rem 0;
    background: var(--dark-bg);
}

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

.vision-card {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.vision-card:hover {
    transform: translateY(-5px);
    background: var(--card-bg);
    box-shadow: var(--shadow);
}

.vision-icon {
    font-size: 4rem;
    margin-bottom: 2rem;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.vision-card h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.vision-card p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* 活動記録セクション */
.activities {
    padding: 8rem 0;
    background: var(--light-bg);
}

.activity-filter {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 4rem;
}

.filter-btn {
    padding: 0.8rem 1.5rem;
    background: transparent;
    color: var(--text-secondary);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
}

.activity-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-bottom: 4rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gradient-primary);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    opacity: 0;
    animation: fadeInUp 0.6s forwards;
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-right: 50%;
    padding-right: 3rem;
    text-align: right;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: 50%;
    padding-left: 3rem;
    text-align: left;
}

.timeline-content {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    position: relative;
}

.timeline-dot {
    position: absolute;
    left: 50%;
    top: 2rem;
    width: 16px;
    height: 16px;
    background: var(--gradient-primary);
    border-radius: 50%;
    transform: translateX(-50%);
    border: 4px solid var(--light-bg);
}

.timeline-year {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.timeline-event {
    margin-bottom: 1rem;
}

.timeline-event h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.timeline-event p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

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

/* お問い合わせセクション */
.contact {
    padding: 8rem 0;
    background: var(--dark-bg);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.contact-info p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    line-height: 1.7;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.contact-method:hover {
    background: var(--card-bg);
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
}

.contact-method i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.contact-form {
    background: var(--card-bg);
    padding: 3rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: var(--form-bg);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--form-bg);
    box-shadow: 0 0 0 3px rgba(0, 210, 255, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

/* フッター */
.footer {
    padding: 3rem 0;
    background: var(--darker-bg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.footer p {
    color: var(--text-muted);
}

/* モバイルメニュー */
.nav-menu.active {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    height: calc(100vh - 80px);
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    z-index: 999;
    animation: slideDown 0.3s ease-out;
}

/* ライトテーマのモバイルメニュー */
[data-theme="light"] .nav-menu.active {
    background: rgba(248, 249, 250, 0.98);
}

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

.nav-toggle.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

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

.nav-toggle.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* パーティクル背景アニメーション */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(0, 210, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 0, 110, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(131, 56, 236, 0.1) 0%, transparent 50%);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

/* カードホバーアニメーション強化 */
.skill-card::before,
.vision-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
    border-radius: var(--border-radius);
}

.skill-card:hover::before,
.vision-card:hover::before {
    opacity: 0.1;
}

.skill-card,
.vision-card {
    position: relative;
    overflow: hidden;
}

/* タイムライン接続線アニメーション */
.timeline::before {
    animation: drawLine 2s ease-out;
}

@keyframes drawLine {
    from {
        height: 0;
    }
    to {
        height: 100%;
    }
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .theme-switch {
        margin-right: 1rem;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .vision-content {
        grid-template-columns: 1fr;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .activity-filter {
        flex-wrap: wrap;
    }
    
    .activity-stats {
        flex-direction: column;
        gap: 2rem;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        margin: 0;
        margin-left: 50px;
        padding: 2rem;
        text-align: left;
    }
    
    .timeline-dot {
        left: 20px;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .contact-form {
        padding: 2rem;
    }
    
    .ai-brain {
        width: 300px;
        height: 300px;
    }
}