:root {
    --primary-color: #7c3aed;
    --secondary-color: #a855f7;
    --accent-color: #c084fc;
    --dark-color: #1e1b4b;
    --light-color: #faf5ff;
    --gradient: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

body {
    font-family: 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Yu Gothic', 'Meiryo', sans-serif;
    line-height: 1.7;
    color: #334155;
    background-color: #fafafa;
}

/* ナビゲーション */
.navbar {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(124, 58, 237, 0.1);
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: bold;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* メインコンテンツ */
.hero-section {
    background: var(--gradient);
    color: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(124, 58, 237, 0.3);
    padding: 4rem 3rem;
    margin-bottom: 3rem;
}

.hero-section h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-section h2 {
    font-size: 1.8rem;
    opacity: 0.9;
    font-weight: 300;
}

.hero-section .lead {
    font-size: 1.3rem;
    opacity: 0.95;
}

.hero-section a {
    color: white;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: bold;
    transition: all 0.3s ease;
    display: inline-block;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.hero-section a:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* 暗い背景のセクション用の汎用クラス */
.dark-bg {
    background: var(--gradient) !important;
    color: white !important;
}

.dark-bg h1,
.dark-bg h2,
.dark-bg h3,
.dark-bg h4,
.dark-bg h5,
.dark-bg h6,
.dark-bg p,
.dark-bg span,
.dark-bg .lead {
    color: white !important;
}

.dark-bg .text-primary {
    color: rgba(255, 255, 255, 0.9) !important;
}

.dark-bg .text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* プライマリカラーの背景を持つ要素 */
.bg-primary,
.btn-primary {
    color: white !important;
}

.bg-primary h1,
.bg-primary h2,
.bg-primary h3,
.bg-primary h4,
.bg-primary h5,
.bg-primary h6,
.bg-primary p,
.bg-primary span {
    color: white !important;
}

/* バッジの文字色調整 */
.badge.bg-primary,
.badge.bg-secondary,
.badge.bg-danger,
.badge.bg-dark {
    color: white !important;
}

/* フッターの文字色 */
footer {
    background: var(--dark-color) !important;
    color: white !important;
}

footer span,
footer p,
footer a {
    color: white !important;
}

/* ナビゲーションブランドのグラデーション文字対策 */
.navbar-brand {
    font-size: 1.8rem;
    font-weight: bold;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Safari対応 */
@supports not (-webkit-background-clip: text) {
    .navbar-brand {
        color: var(--primary-color) !important;
    }
}

/* プロジェクトリンクボタンの文字色 */
.btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white !important;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white !important;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: white !important;
}

.btn-primary i {
    color: white !important;
}

/* 暗い色のバッジの文字色を白に統一 */
.badge.bg-success,
.badge.bg-warning,
.badge.bg-info {
    color: white !important;
}

/* コントラストが低い場合の対処 */
.badge.bg-warning {
    background-color: #d97d00 !important; /* より濃いオレンジに */
    color: white !important;
}

.badge.bg-info {
    background-color: #0891b2 !important; /* より濃い青に */
    color: white !important;
}

/* コンタクトセクション */
.contact-section {
    background: white;
    border-radius: 15px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(124, 58, 237, 0.1);
}

.contact-section h2 {
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 1.5rem;
}

.contact-section a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

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

/* フッター */
footer {
    background: var(--dark-color) !important;
    color: white;
    position: relative;
    margin-top: 5rem;
}

/* アニメーション */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-section, .contact-section {
    animation: fadeInUp 0.8s ease;
}

/* レスポンシブ */
@media (max-width: 768px) {
    .hero-section {
        padding: 2.5rem 2rem;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .hero-section h2 {
        font-size: 1.5rem;
    }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* スクロールバー */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-color);
}

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

/* Fonts */
/* 英語フォント重視 */
.en-title {
    font-family: 'Inter', 'Poppins', 'Roboto', 'Arial', 'Helvetica Neue', sans-serif;
    font-weight: bold;
    font-style: normal; /* イタリックを解除 */
}

/* 日本語フォント重視 */
.jp-title {
    font-family: '游ゴシック', 'Yu Gothic', 'Hiragino Kaku Gothic ProN', sans-serif;
    font-weight: 900;
    letter-spacing: 0.1em;
}

/* ブログ用スタイル */
.blog-container {
    margin-bottom: 3rem;
}

.blog-post {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-post:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(124, 58, 237, 0.15) !important;
}

.blog-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-image:hover {
    transform: scale(1.05);
}

.blog-content {
    padding: 1rem 0;
}

.blog-meta {
    font-size: 0.9rem;
}

.blog-title {
    font-size: 1.5rem;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.blog-title a:hover {
    color: var(--secondary-color) !important;
}

.blog-excerpt {
    font-size: 1rem;
    line-height: 1.6;
}

.category-tags .badge {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.category-tags .badge:hover {
    transform: scale(1.1);
}

/* ブログのレスポンシブ対応 */
@media (max-width: 991px) {
    .blog-image {
        height: 250px;
        margin-bottom: 1rem;
    }
    
    .blog-content {
        padding: 0;
    }
}

/* ブログ記事詳細ページ用スタイル */
.blog-header {
    padding: 2rem 1rem;
}

.blog-article {
    font-size: 1.1rem;
    line-height: 1.8;
}

.blog-article h2 {
    font-size: 1.8rem;
    margin-top: 2rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.blog-article h4 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.exhibition-item {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background: #fafafa;
    border: 1px solid #e0e0e0 !important;
}

.exhibition-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.15) !important;
}

.tech-tags .badge {
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
}

.feedback-card {
    transition: transform 0.2s ease;
}

.feedback-card:hover {
    transform: translateX(10px);
}

.learning-points h4 {
    color: #6c757d;
}

.article-footer {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.05), rgba(168, 85, 247, 0.05));
    border-top: 3px solid var(--primary-color);
}

/* 記事詳細のレスポンシブ対応 */
@media (max-width: 768px) {
    .blog-header {
        padding: 1.5rem 0.5rem;
    }
    
    .blog-article {
        font-size: 1rem;
    }
    
    .blog-article h2 {
        font-size: 1.5rem;
    }
    
    .exhibition-item {
        margin-bottom: 1rem;
    }
}