:root {
    --bg-color: #F2F2F7;
    /* Apple風のライトグレー背景 */
    --card-bg: #FFFFFF;
    --text-primary: #1D1D1F;
    --text-secondary: #86868B;
    --accent-color: #FF5500;
    /* 画像からのオレンジ */
    --accent-hover: #E04800;
    --border-radius: 24px;
    --spacing-md: 20px;
    --spacing-lg: 32px;
    --font-main: 'Inter', 'Noto Sans JP', sans-serif;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    /* グリッドパターン背景 */
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
    height: 100vh;
    overflow: hidden;
    /* アプリのような操作感 */
}

/* アプリコンテナ */
.app-container {
    display: flex;
    height: 100vh;
    padding: var(--spacing-md);
    gap: var(--spacing-md);
    max-width: 1600px;
    margin: 0 auto;
}

/* サイドバー */
.sidebar {
    width: 280px;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-shrink: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.sidebar-header {
    margin-bottom: 40px;
}

.profile-icon {
    width: 48px;
    height: 48px;
    background: #007AFF;
    /* ブルーのプリセット */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 20px;
    margin-bottom: 12px;
}

.profile-info .role {
    font-size: 12px;
    color: #FF4500;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-info .name {
    font-size: 18px;
    font-weight: 700;
    margin-top: 4px;
}

/* ナビゲーション */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-group {
    display: flex;
    flex-direction: column;
}

.nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* キャレット用のスペース */
    padding: 12px 16px;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.nav-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-item:hover,
.nav-item.active {
    background-color: rgba(0, 0, 0, 0.04);
    color: var(--accent-color);
    /* 即座に色変更 */
}

.nav-item.active {
    background-color: rgba(255, 85, 0, 0.08);
    /* アクティブ時の柔らかいオレンジ背景 */
}

.nav-item i {
    font-size: 20px;
    color: #FF4500;
}

/* サブメニュー */
.nav-submenu {
    display: none;
    /* デフォルトで非表示 */
    flex-direction: column;
    padding-left: 48px;
    /* インデント */
    gap: 8px;
    margin-top: 4px;
    animation: slideDown 0.3s ease forwards;
}

.nav-plus.open .nav-submenu {
    display: flex;
}

.submenu-item {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    padding: 8px 0;
    transition: color 0.2s;
}

.submenu-item:hover,
.submenu-item.active {
    color: var(--accent-color);
}

.caret-icon {
    transition: transform 0.3s ease;
    font-size: 16px !important;
}

.nav-group.open .nav-submenu {
    display: flex;
}

.nav-group.open .caret-icon {
    transform: rotate(45deg);
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* サイドバーフッター */
.sidebar-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 20px;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.social-link {
    font-size: 12px;
    text-decoration: none;
    color: var(--text-secondary);
    transition: color 0.2s;
}

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

.ticker-container {
    background: #F5F5F7;
    border-radius: 8px;
    padding: 8px;
    overflow: hidden;
    font-size: 10px;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* メインコンテンツエリア */
.main-content {
    flex-grow: 1;
    overflow-y: auto;
    border-radius: var(--border-radius);
    /* 必要に応じてフルブリードセクションを許可するためここのパディングを削除し、内部セクションにパディングを追加 */
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);

    /* スクロールバーのスタイル */
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}

.main-content::-webkit-scrollbar {
    width: 0px;
}

/* カード */
.card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

/* ヒーローカード */
.hero-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 0;
    /* 内部でフルブリードレイアウトが可能 */
    display: flex;
    overflow: hidden;
    min-height: 600px;
    position: relative;
    align-items: stretch;
}

.hero-content {
    flex: 1;
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 2;
}

.hero-text-content {
    max-width: 500px;
}

.role-pill {
    display: inline-block;
    background: rgba(0, 0, 0, 0.05);
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    color: #FF4500;
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hero-card h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 24px;
    line-height: 1.1;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #1D1D1F 0%, #48484A 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-description {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.button-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #0033FF;
    color: white;
    padding: 14px 28px;
    border-radius: 100px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s, background 0.2s;
}

.button-primary:hover {
    background: black;
}

/* ヒーロービジュアル（右側） */
.hero-visual {
    flex: 1;
    position: relative;
    background: #F2F2F7;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.image-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
}

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

/* レスポンシブ・ヒーロー */
@media (max-width: 1100px) {
    .hero-card {
        flex-direction: column-reverse;
        /* 画像（2番目の子要素）が視覚的に上、テキスト（1番目の子要素）が視覚的に下
           実際にはcolumn-reverseは下から上に積み上げます。
           テキスト（1番目） -> 下。
           画像（2番目） -> 上。
           正しいです。 */
        height: auto;
        min-height: auto;
    }

    .hero-visual {
        height: 300px;
        flex: none;
    }

    /* Aboutカード（テキスト + 音声） */
    .about-card {
        background: var(--card-bg);
        border-radius: var(--border-radius);
        padding: 40px;
        margin-top: 20px;
        /* HeroとAboutの間のスペース */
    }

    .card-header-simple {
        display: flex;
        padding-bottom: 20px;
        margin-bottom: 60px;
        /* プッシュを確保 */
        justify-content: space-between;
        align-items: center;
        margin-bottom: 30px;
        flex-wrap: wrap;
        gap: 20px;
    }

    .card-header-simple h2 {
        font-size: 28px;
        font-weight: 700;
    }


    @keyframes pulse {
        0% {
            box-shadow: 0 0 0 0 rgba(51, 51, 51, 0.4);
        }

        70% {
            box-shadow: 0 0 0 10px rgba(51, 51, 51, 0);
        }

        100% {
            box-shadow: 0 0 0 0 rgba(51, 51, 51, 0);
        }
    }

    .hero-content {
        padding: 40px 24px;
    }

    .hero-card h1 {
        font-size: 32px;
    }
}

/* Worksグリッド */
.section-title {
    font-size: 32px;
    margin-bottom: 20px;
    font-style: italic;
    /* 画像を模倣 */
    font-family: 'Times New Roman', serif;
    /* または類似のセリフ体 */
}

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

/* Worksグリッドの改善 */
.work-card {
    padding: 0;
    overflow: hidden;
    /* 要望によりカードスタイルを削除 */
    background: transparent;
    box-shadow: none !important;
    border-radius: 0;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.work-card:hover {
    transform: none;
    /* 浮遊エフェクトを削除 */
}

/* 更新された画像コンテナ */
.work-image {
    height: 240px;
    /* 高さを増やす */
    background-color: transparent;
    /* プレースホルダー背景を削除 */
    border-radius: 0;
    /* 要望：角丸を削除 */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 16px;
}

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

.work-card:hover .work-image {
    /* transform: scale(1.02);  オプションの微細なズーム */
}

/* グリッド内ではサムネイル（2枚目以降）を非表示にする */
.work-image .hidden-thumb {
    display: none;
}

/* モーダル内では表示する */
.modal-image-container .hidden-thumb {
    display: block;
}

.work-info {
    padding: 0 4px;
    /* 最低限のパディング */
}

.work-info h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.work-info p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 8px;
    /* グリッド内で説明を隠す場合...（要望ではダブルタップのため要約は残す） */
}

/* モーダルスタイル */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 900px;
    height: 85vh;
    /* 大型モーダル */
    border-radius: 32px;
    padding: 40px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    background: #F5F5F7;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    transition: background 0.2s;
}

.modal-close:hover {
    background: #E5E5EA;
}

.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    height: 100%;
}

.modal-image-container {
    background: #F2F2F7;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    height: auto;
    gap: 16px;
    padding: 0;
}

.modal-image-container img {
    height: auto;
    width: 100%;
    flex-shrink: 0;
    object-fit: cover;
    display: block;
}

.modal-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.modal-info h2 {
    font-size: 32px;
    margin-bottom: 24px;
}

.modal-info .tags {
    margin-bottom: 32px;
}

.modal-info p {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    margin-bottom: 40px;
}

.modal-meta .label {
    font-size: 12px;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 4px;
}

.modal-meta .value {
    font-weight: 600;
    font-size: 16px;
}

@media (max-width: 800px) {
    .modal-grid {
        grid-template-columns: 1fr;
        height: auto;
    }

    .modal-content {
        height: auto;
        max-height: 90vh;
    }

    .modal-image-container {
        height: 300px;
    }
}


/* Contact - 再設計 */
.contact-card {
    background-image: url('assets/img/myMonkey.jpg');
    background-size: cover;
    background-position: center;
    background-color: #0055FF;
    /* フォールバック */
    color: white;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    /* 下部にテキスト */
    position: relative;
    overflow: hidden;
}

.contact-card h2.section-title {
    color: black;
    margin-top: auto;
    background-color: white;
    /* コンテンツが少ない場合は下に押しやる */
}

.contact-links {
    margin-top: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.contact-item {
    background: white;
    color: #0055FF;
    padding: 12px 24px;
    border-radius: 100px;
    font-weight: 600;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.contact-item:hover {
    transform: scale(1.05);
}

.contact-item i {
    font-size: 18px;
}

/* サイドバーフッターに明るい色を強制... */


/* モバイルヘッダー */
.mobile-header {
    display: none;
    /* デスクトップでは非表示 */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    padding: 0 20px;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.mobile-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-brand .profile-icon.small {
    width: 32px;
    height: 32px;
    font-size: 14px;
    margin: 0;
}

.mobile-name {
    font-weight: 700;
    font-size: 16px;
    color: var(--text-primary);
}

.menu-toggle {
    background: transparent;
    border: none;
    font-size: 24px;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* サイドバーオーバーレイ */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(4px);
}

.sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* レスポンシブ */
@media (max-width: 1100px) {
    .mobile-header {
        display: flex;
    }

    .app-container {
        flex-direction: column;
        padding: 80px 16px 20px 16px;
        /* ヘッダー用のトップパディング */
        height: auto;
        overflow: auto;
        gap: 24px;
    }

    body {
        overflow-x: hidden;
        overflow-y: auto;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 280px;
        z-index: 2000;
        transform: translateX(-110%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.1);
        height: 100vh;
        max-height: 100vh;
        border-radius: 0 20px 20px 0;
        padding-top: 40px;
        /* 必要に応じて閉じるボタンのスペース、または視覚的な余裕 */
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-nav {
        flex-direction: column;
        overflow-y: auto;
        padding-bottom: 20px;
    }

    .sidebar-footer {
        display: block;
        /* ドロワー内にフッターを表示 */
    }

    .main-content {
        overflow: visible;
    }

    .card {
        padding: 24px;
    }

    /* モバイル用のモーダルレイアウト並べ替え */
    .modal-grid {
        display: flex;
        flex-direction: column-reverse;
        /* テキスト上（情報）、画像下（コンテナ）... */
        gap: 24px;
        height: auto;
    }

    .modal-image-container {
        height: 250px;
        /* モバイル/タブレットのモーダル画像用の低い高さ */
        width: 100%;
    }

    /* モバイル用の2列Worksグリッド */
    .grid-layout {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .work-image {
        height: 140px;
        /* モバイルのバランスのために240pxから縮小 */
        margin-bottom: 12px;
    }

    .work-info h3 {
        font-size: 14px;
    }

    .work-info p {
        font-size: 11px;
    }

    .work-info .tag {
        font-size: 10px;
        padding: 2px 8px;
    }
}

/* 履歴タイムライン */
.history-scroller {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    padding-top: 50px;
    /* スペーシングを追加 */
    padding-bottom: 20px;
    /* スクロールバーまたは影用のスペース */
    margin-right: -40px;
    /* 右端まで広げる */
    padding-right: 40px;
    /* ブリードに合わせる */
    scrollbar-width: none;
    /* Firefox用 */
    -ms-overflow-style: none;
    /* IE 10以上 */
    cursor: grab;
}

.history-scroller::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari用 */
}

.history-item {
    min-width: 220px;
    flex-shrink: 0;
    position: relative;
    padding-top: 24px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.history-item::before {
    content: '';
    position: absolute;
    top: -3px;
    left: 0;
    width: 6px;
    height: 6px;
    background: var(--accent-color);
    border-radius: 50%;
}

.history-item .year {
    font-size: 24px;
    font-weight: 800;
    color: var(--accent-color);
    margin-bottom: 8px;
    font-family: 'Inter', sans-serif;
}

.history-item .desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* 履歴のモバイル調整 */
@media (max-width: 1000px) {
    .history-scroller {
        margin-right: -40px;
        padding-right: 40px;
    }
}

@media (max-width: 900px) {
    .history-scroller {
        margin-right: -24px;
        /* カードのパディングに合わせる */
        padding-right: 24px;
    }
}

.hidden {
    display: none !important;
}

/* Load Moreボタン */
.load-more-container {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.button-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: var(--text-primary);
    padding: 12px 24px;
    border-radius: 100px;
    text-decoration: none;
    font-weight: 600;
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
    cursor: pointer;
}

.button-outline:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.2);
}

/* News Section Styles */
.news-card {
    padding: 0 !important;
    /* カード自体の余白は消して、リストアイテムで制御 */
    background: transparent !important;
    box-shadow: none !important;
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.news-item {
    background: #F5F7FA;
    /* 画像に近い少し青みがかった薄いグレー */
    border-radius: 20px;
    padding: 24px 32px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    overflow: hidden;
}

.news-item:hover {
    background: #EEF1F5;
}

.news-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.news-date {
    font-family: var(--font-main);
    color: #4A90E2;
    /* 画像の日付の色 */
    font-size: 13px;
    font-weight: 600;
}

.news-tags {
    display: flex;
    gap: 8px;
}

.news-tag {
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 100px;
    font-weight: 600;
}

.news-tag.highlight {
    background-color: #0055FF;
    /* 鮮やかな青 */
    color: white;
}

.news-tag.secondary {
    background-color: #DDEAFE;
    /* 薄い青 */
    color: #0055FF;
}

.news-toggle-icon {
    color: #0055FF;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.news-item.open .news-toggle-icon {
    transform: rotate(180deg);
}

.news-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.6;
    color: var(--text-primary);
    margin: 0;
}

.news-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, margin-top 0.3s ease;
    opacity: 0;
}

.news-item.open .news-content {
    max-height: 200px;
    /* 十分な高さ */
    margin-top: 16px;
    opacity: 1;
}

.news-content p {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin: 0;
}

/* レスポンシブ調整 */
@media (max-width: 600px) {
    .news-item {
        padding: 20px;
    }

    .news-meta {
        gap: 12px;
    }

    .news-title {
        font-size: 15px;
    }
}