/* ========================================
   基本設定
   ======================================== */

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

:root {
    /* カラーパレット - 和風の色彩 */
    --primary-color: #8B4513; /* 褐色（茶色系） */
    --secondary-color: #C41E3A; /* 緋色（赤系） */
    --accent-color: #DAA520; /* 金色 */
    --dark-bg: #2C1810; /* 濃い茶色 */
    --light-bg: #F5F5DC; /* ベージュ */
    --text-dark: #1a1a1a;
    --text-light: #f5f5f5;
    --border-color: #8B7355;
    --overlay: rgba(44, 24, 16, 0.85);
    
    /* タイポグラフィ */
    --font-serif: 'Noto Serif JP', serif;
    --font-sans: 'Noto Sans JP', sans-serif;
}

body {
    font-family: var(--font-sans);
    color: var(--text-dark);
    line-height: 1.8;
    background-color: #fff;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

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

/* ========================================
   ヘッダー
   ======================================== */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(44, 24, 16, 1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(44, 24, 16, 1);
    pointer-events: none;
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    position: relative;
}

.site-title {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--accent-color);
    letter-spacing: 0.2em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

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

.nav-menu li a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav-menu li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

.nav-menu li a:hover {
    color: var(--accent-color);
}

.nav-menu li a:hover::after {
    width: 100%;
}

/* 外部リンクアイコン */
.nav-menu li a .fa-external-link-alt {
    font-size: 0.75rem;
    margin-left: 5px;
    opacity: 0.8;
}

.footer-links li a .fa-external-link-alt {
    font-size: 0.75rem;
    margin-left: 5px;
    opacity: 0.7;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
}

/* ========================================
   ヒーローセクション
   ======================================== */

.hero-section {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, var(--dark-bg) 0%, #4a2810 100%);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 50px,
            rgba(218, 165, 32, 0.03) 50px,
            rgba(218, 165, 32, 0.03) 51px
        ),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 50px,
            rgba(218, 165, 32, 0.03) 50px,
            rgba(218, 165, 32, 0.03) 51px
        );
    pointer-events: none;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.7) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    animation: fadeInUp 1s ease-out;
}

.hero-title {
    font-family: var(--font-serif);
    font-size: 5rem;
    font-weight: 900;
    color: var(--accent-color);
    margin-bottom: 1rem;
    letter-spacing: 0.3em;
    text-shadow: 4px 4px 8px rgba(0, 0, 0, 0.7);
}

.hero-title-image {
    max-width: 600px;
    width: 90%;
    height: auto;
    margin-top: 50px;
    margin-bottom: 1.5rem;
    filter: drop-shadow(4px 4px 8px rgba(0, 0, 0, 0.9));
    animation: fadeInScale 1.2s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.hero-subtitle {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    letter-spacing: 0.2em;
}

.hero-years {
    font-size: 1.2rem;
    color: var(--accent-color);
    margin-bottom: 2rem;
    letter-spacing: 0.1em;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 3rem;
    line-height: 2;
}

.hero-cta {
    display: inline-block;
    padding: 1rem 3rem;
    background: var(--accent-color);
    color: var(--dark-bg);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(218, 165, 32, 0.4);
}

.hero-cta:hover {
    background: #FFD700;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(218, 165, 32, 0.6);
}

/* ========================================
   セクション共通スタイル
   ======================================== */

section {
    padding: 5rem 0;
}

.section-title {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary-color);
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(to right, transparent, var(--accent-color), transparent);
}

.section-description {
    text-align: center;
    font-size: 1.1rem;
    line-height: 2;
    max-width: 800px;
    margin: 0 auto 3rem;
    color: var(--text-dark);
}

.section-intro {
    margin-bottom: 4rem;
}

/* ========================================
   概要セクション
   ======================================== */

.overview-section {
    background: var(--light-bg);
}

.portrait-container {
    text-align: center;
    margin: 2rem auto 3rem;
    max-width: 400px;
}

.portrait-image {
    width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 5px solid var(--accent-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portrait-image:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

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

.overview-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border-top: 4px solid var(--accent-color);
}

.overview-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.card-icon {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

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

.overview-card p {
    color: var(--text-dark);
    line-height: 1.8;
}

/* ========================================
   生涯セクション
   ======================================== */

.biography-section {
    background: white;
}

.biography-content {
    max-width: 900px;
    margin: 0 auto;
}

.bio-item {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
    position: relative;
}

.bio-item::before {
    content: '';
    position: absolute;
    left: 75px;
    top: 60px;
    bottom: -30px;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent-color), transparent);
}

.bio-item:last-child::before {
    display: none;
}

.bio-year {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent-color);
    background: var(--dark-bg);
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    height: fit-content;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.bio-details {
    background: var(--light-bg);
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 4px solid var(--accent-color);
}

.bio-details h3 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.bio-details p {
    line-height: 1.9;
    color: var(--text-dark);
}

/* ========================================
   業績セクション
   ======================================== */

.achievements-section {
    background: linear-gradient(135deg, rgba(100, 100, 100, 0.7) 0%, rgba(120, 120, 120, 0.7) 100%);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-blend-mode: overlay;
    color: var(--text-light);
    position: relative;
}

.achievements-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(80, 80, 80, 0.65);
    pointer-events: none;
    z-index: 0;
}

.achievements-section .section-title {
    color: var(--accent-color);
    position: relative;
    z-index: 1;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.achievement-card {
    background: rgba(15, 8, 3, 0.92);
    padding: 2rem;
    border-radius: 10px;
    border: 1px solid rgba(218, 165, 32, 0.5);
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
}

.achievement-card:hover {
    background: rgba(20, 10, 5, 0.96);
    border-color: var(--accent-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
}

.achievement-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.achievement-header i {
    font-size: 2rem;
    color: var(--accent-color);
}

.achievement-header h3 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: var(--accent-color);
}

.achievement-card p {
    margin-bottom: 1rem;
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.95);
}

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

.achievement-details li {
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
}

.achievement-details li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--accent-color);
}

/* ========================================
   歴史的背景セクション
   ======================================== */

.context-section {
    background: var(--light-bg);
}

.context-image-container {
    text-align: center;
    margin: 0 auto 3rem;
    max-width: 100%;
}

.context-image {
    width: 100%;
    max-width: 1000px;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 1rem;
}

.image-caption {
    font-size: 0.9rem;
    color: var(--primary-color);
    font-style: italic;
    margin-top: 0.5rem;
}

.context-content {
    max-width: 900px;
    margin: 0 auto;
}

.context-block {
    background: white;
    padding: 2.5rem;
    margin-bottom: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-left: 5px solid var(--accent-color);
}

.context-block h3 {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.context-block h3 i {
    color: var(--accent-color);
}

.context-block p {
    margin-bottom: 1.2rem;
    line-height: 2;
    color: var(--text-dark);
}

.context-block p:last-child {
    margin-bottom: 0;
}

.culture-image-container {
    margin: 1.5rem 0;
    text-align: center;
}

.culture-image {
    width: 100%;
    max-width: 800px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    margin-bottom: 1rem;
}

/* ========================================
   後世への影響セクション
   ======================================== */

.legacy-section {
    background: linear-gradient(135deg, rgba(100, 100, 100, 0.7) 0%, rgba(120, 120, 120, 0.7) 100%);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-blend-mode: overlay;
    position: relative;
}

.legacy-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(80, 80, 80, 0.65);
    pointer-events: none;
    z-index: 0;
}

.legacy-section .section-title {
    position: relative;
    z-index: 1;
    color: var(--accent-color);
}

.legacy-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.legacy-item {
    background: rgba(15, 8, 3, 0.92);
    padding: 2rem;
    border-radius: 10px;
    border: 1px solid rgba(218, 165, 32, 0.5);
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
}

.legacy-item:hover {
    background: rgba(20, 10, 5, 0.96);
    border-color: var(--accent-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
}

.legacy-icon {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.legacy-item h3 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.legacy-item p {
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.95);
}

/* ========================================
   年表セクション
   ======================================== */

.timeline-section {
    background: linear-gradient(to bottom, var(--dark-bg), #2a1810);
    color: var(--text-light);
}

.timeline-section .section-title {
    color: var(--accent-color);
}

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

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--accent-color), transparent);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    padding-left: 50px;
}

.timeline-marker {
    position: absolute;
    left: -30px;
    top: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent-color);
    border: 3px solid var(--dark-bg);
    box-shadow: 0 0 0 3px var(--accent-color);
}

.timeline-content {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid rgba(218, 165, 32, 0.3);
}

.timeline-year {
    display: inline-block;
    background: var(--accent-color);
    color: var(--dark-bg);
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
}

.timeline-content h3 {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
    color: var(--accent-color);
}

.timeline-content p {
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.9);
}

/* ========================================
   FAQセクション - GEO対応
   ======================================== */

.faq-section {
    background: white;
}

.faq-content {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: var(--light-bg);
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
    border-radius: 10px;
    border-left: 4px solid var(--accent-color);
    transition: all 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transform: translateX(5px);
}

.faq-question {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.faq-question i {
    color: var(--accent-color);
    font-size: 1.2rem;
}

.faq-answer p {
    line-height: 2;
    color: var(--text-dark);
    font-size: 1rem;
}

/* ========================================
   関連情報セクション
   ======================================== */

.related-section {
    background: var(--light-bg);
}

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

.related-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.related-card h3 {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.related-card h3 i {
    color: var(--accent-color);
}

.related-card p {
    line-height: 1.9;
    color: var(--text-dark);
}

/* ========================================
   フッター
   ======================================== */

.site-footer {
    background: var(--dark-bg);
    color: var(--text-light);
    padding: 3rem 0 1rem;
}

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

.footer-info h3 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.footer-info p {
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.8);
}

.footer-links h4 {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

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

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

.footer-links ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(218, 165, 32, 0.3);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* ========================================
   アニメーション
   ======================================== */

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

/* ========================================
   レスポンシブデザイン
   ======================================== */

@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--dark-bg);
        flex-direction: column;
        padding: 1rem;
        gap: 0;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid rgba(218, 165, 32, 0.2);
    }

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

    .nav-menu li a {
        display: block;
        padding: 1rem;
    }

    .menu-toggle {
        display: block;
    }

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

    .hero-title-image {
        max-width: 400px;
        width: 85%;
    }

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

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

    .bio-item {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .bio-item::before {
        display: none;
    }

    .bio-year {
        width: 100%;
    }

    .overview-cards,
    .achievements-grid,
    .legacy-content,
    .related-cards {
        grid-template-columns: 1fr;
    }

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

    .timeline {
        padding-left: 30px;
    }

    .timeline::before {
        left: 10px;
    }

    .timeline-marker {
        left: -20px;
    }

    .timeline-item {
        padding-left: 30px;
    }
}

@media (max-width: 480px) {
    .site-title {
        font-size: 1.3rem;
    }

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

    .hero-title-image {
        max-width: 280px;
        width: 80%;
    }

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

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

    section {
        padding: 3rem 0;
    }

    .container {
        padding: 0 15px;
    }
    
    .portrait-container {
        max-width: 300px;
    }
    
    .context-image,
    .culture-image {
        border-radius: 10px;
    }
}