:root {
    --bg-color: #faf8f5;
    --card-bg: #ffffff;
    --text-color: #4a4543;
    --accent-color: #E78198;
    --border-color: #f0eae1;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Montserrat', 'Noto Sans JP', sans-serif;
    background: linear-gradient(rgba(250, 248, 245, 0.5), rgba(250, 248, 245, 0)), 
                url('./img/bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-color);
    line-height: 1.6;
    padding: 40px 15px;
}

.wrapper {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.block {
    background-color: var(--card-bg);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    padding: 35px 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

/* --- ヘッダー共通 --- */
.block-header {
    text-align: center;
}

.header-title {
    font-size: 1.6rem;
    color: var(--accent-color);
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 20px;
    text-align: center;
}

.page-title {
    font-size: 1.4rem;
    color: var(--accent-color);
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 20px;
    text-align: center;
}

/* --- セクションタイトル（すべて強制的に中央寄せ） --- */
.block .section-title,
.section-title,
.profile-card-custom .section-title {
    font-size: 1.1rem !important;
    margin-bottom: 15px !important;
    color: var(--accent-color) !important;
    font-weight: 700 !important;
    letter-spacing: 1px !important;
    text-align: center !important;
}

/* --- バナー画像（index用とその他で切り分け） --- */
.index-banner {
    width: 100%;
    height: 522px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
}

.index-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-wrap {
    width: 100%;
    height: 120px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
}

.banner-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-common {
    width: 100%;
    height: 120px;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    margin-bottom: 20px;
}

.banner-about {
    background-image: url('./img/about_header.jpg');
}

.banner-works {
    background-image: url('./img/works_header.jpg');
}

/* --- ナビゲーションメニュー --- */
.nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-bottom: 20px;
}

.nav-btn {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 8px 12px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    transition: 0.3s;
    white-space: nowrap;
}

.nav-btn:hover, .nav-btn.active {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

/* --- SNSアイコン --- */
.sns-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.sns-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-color);
    font-size: 1rem;
    text-decoration: none;
    transition: 0.3s;
}

.sns-icon:hover {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

/* --- プロフィール（背景重ね用） --- */
.split-block {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px;
    position: relative; 
    overflow: hidden; 
    display: block; 
}

.profile-card-custom {
    position: relative;
    overflow: hidden;
    padding: 35px 30px; /* 他のblockと余感を統一 */
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.profile-card-custom .profile-text-wrap,
.split-block .profile-text-wrap {
    position: relative;
    z-index: 2;
    width: 100%;
}

/* --- プロフィールの背景画像を大きく表示する --- */
.term-card.profile-card-custom img.profile-bg-img {
    width: 650px !important; /* 思い切ってかなり大きめのサイズに指定 */
    max-width: none !important;
    height: auto !important;
    right: -20px !important; /* 少し右にはみ出させることで大きく見せることも可能 */
    bottom: -10px !important;
}

.split-content {
    flex: 1;
}

.vertical-img-wrap {
    width: 240px;
    min-width: 240px;
    height: 330px;
    margin-top: 40px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
}

.vertical-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- YouTubeオートスクロール（index用） --- */
.yt-slider-wrap {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 10px 0;
}

.yt-slider {
    display: flex;
    gap: 15px;
    width: max-content;
    animation: scroll 40s linear infinite;
}

.yt-slider-wrap:hover .yt-slider {
    animation-play-state: paused;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.yt-thumb {
    min-width: 220px;
    height: 124px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    display: block;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.yt-thumb:hover {
    transform: scale(1.03);
}

.yt-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- プロフィール表（幅を少し内側に収めて区切り線が右端までいかないように調整） --- */
.concept-text, .about-text {
    font-size: 0.95rem;
    color: #5c5552;
}

/* --- プロフィール表（ラッパーで幅を制限して線を美しく収める） --- */
.profile-table-wrap {
    max-width: 600px; /* ここでお好みの横幅に調整できます */
    margin: 0 auto;   /* 中央寄せ */
}

.profile-table {
    width: 100%;
    border-collapse: collapse;
}

.profile-table th, .profile-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.85rem;
}

.profile-table th {
    width: 35%;
    color: var(--accent-color);
    text-align: left;
    font-weight: 600;
}

.profile-table td {
    color: #5c5552;
}

.profile-en {
    display: block;
    font-size: 0.8rem;
    color: #8c847f;
    margin-top: 2px;
}

/* --- 資料画像 --- */
.gallery-stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 15px;
}

.gallery-item {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: var(--bg-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    text-align: center;
}

.gallery-item img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    display: block;
    background: #fff;
    cursor: pointer;
    transition: opacity 0.3s;
}

.gallery-item img:hover {
    opacity: 0.9;
}

.gallery-caption {
    padding: 12px;
    font-size: 0.9rem;
    color: #5c5552;
    font-weight: 500;
    border-top: 1px solid var(--border-color);
}

.image-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}

.image-modal img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.5);
    object-fit: contain;
}

.credit-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.credit-item {
    display: flex;
    flex-direction: column;
    padding: 12px 15px;
    background: var(--bg-color);
    border-radius: 10px;
    font-size: 0.85rem;
    border: 1px solid var(--border-color);
}

.credit-role {
    font-weight: 600;
    color: var(--accent-color);
    font-size: 0.8rem;
    margin-bottom: 4px;
}

.credit-name a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
}

.credit-name a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* --- タイムライン・お仕事依頼（works用） --- */
.work-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.work-item {
    display: flex;
    gap: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.work-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.work-date {
    font-weight: 600;
    color: var(--accent-color);
    min-width: 75px;
}

.work-desc {
    color: #5c5552;
    flex: 1;
}

.work-desc a {
    color: var(--text-color);
    text-decoration: none;
}

.work-desc a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

.contact-box {
    font-size: 0.95rem;
    color: #5c5552;
    line-height: 1.8;
}

.contact-box p {
    margin-bottom: 15px;
}

.contact-box ul {
    margin-left: 20px;
    margin-bottom: 20px;
}

.contact-english-section {
    margin-top: 35px;
    padding-top: 30px;
    border-top: 1px dashed var(--border-color);
}

.contact-english-title {
    font-size: 1.1rem;
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

/* --- CONTACTブロック --- */
.contact-block {
    text-align: center;
    background-color: #fffcfc;
}

.contact-block p {
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.contact-btn-wrap {
    text-align: center;
    margin-top: 25px;
}

.contact-link-btn, .contact-btn {
    display: inline-block;
    background: var(--accent-color);
    color: white;
    padding: 12px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: 0.3s;
    box-shadow: 0 4px 15px rgba(224, 159, 158, 0.3);
}

.contact-link-btn:hover, .contact-btn:hover {
    opacity: 0.85;
    transform: translateY(-2px);
}


/* --- スマホ対応レスポンシブ --- */
@media (max-width: 768px) {
    .split-block {
        flex-direction: column;
    }
    .vertical-img-wrap {
        width: 100%;
        min-width: 100%;
        height: 250px;
    }
    .credit-grid {
        grid-template-columns: 1fr;
    }
    .work-item {
        flex-direction: column;
        gap: 5px;
    }
}

/* --- 用語・あいさつ欄 --- */
.terms-section {
    margin-top: 40px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 25px;
}

.terms-section .section-title {
    font-size: 1.2rem !important;
    color: var(--text-color, #333) !important;
    border-left: 4px solid var(--accent-color);
    padding-left: 10px;
    margin-bottom: 15px !important;
    letter-spacing: 0.05em;
    font-weight: bold;
    text-align: left !important;
}

.terms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.term-card {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.term-title {
    font-size: 0.85rem;
    color: var(--accent-color);
    font-weight: bold;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.term-content {
    font-size: 1rem;
    color: #333;
    font-weight: 500;
}

.term-sub {
    font-size: 0.8rem;
    color: #8c847f;
    margin-top: 3px;
}

h1 {
    font-size: 1.8rem;
    letter-spacing: 2px;
    margin-bottom: 24px;
    color: #332e2c;
}
/* --- プロフィールカード（左寄せレイアウト ＋ 背景画像重ね） --- */
.profile-card-custom {
    position: relative;
    overflow: hidden;
    text-align: left !important;
}

/* テキストエリア（左側に配置） */
.profile-card-custom .profile-text-wrap {
    position: relative;
    z-index: 2;
    width: 100%;
    text-align: left !important;
}

/* プロフィール表の幅を制限して区切り線を右端まで伸ばさない */
.profile-table-wrap {
    width: 100%;
    max-width: 520px; /* ここでお好みの表の長さに調整できます */
    text-align: left;
}

.profile-table {
    width: 100%;
    border-collapse: collapse;
}

.profile-table th, 
.profile-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.85rem;
    text-align: left;
}

.profile-table th {
    width: 38%;
    color: var(--accent-color);
    font-weight: 600;
}

.profile-table td {
    color: #5c5552;
}

/* 右下に配置する背景画像（絶対配置でカードの右下に固定） */
.profile-bg-img {
    position: absolute;
    z-index: 1;
    right: 15px;
    bottom: 15px;
    width: 260px; /* 画像の大きさに合わせて調整してください */
    height: auto;
    object-fit: contain;
    pointer-events: none; /* 画像がクリックの邪魔にならないようにする */
}
/* --- 強制：プロファイルカードのレイアウト修正 --- */
.term-card.profile-card-custom {
    position: relative !important;
    overflow: hidden !important;
    text-align: left !important;
}

.term-card.profile-card-custom .profile-text-wrap {
    position: relative !important;
    z-index: 2 !important;
    width: 100% !important;
    text-align: left !important;
}

/* 表の幅を強制的に制限して区切り線を右端まで伸ばさない */
.term-card.profile-card-custom .profile-table-wrap {
    width: 100% !important;
    max-width: 500px !important; /* ここで表の長さを調整できます */
    margin: 0 !important;
    text-align: left !important;
}

.term-card.profile-card-custom .profile-table {
    width: 100% !important;
    border-collapse: collapse !important;
}

.term-card.profile-card-custom .profile-table th, 
.term-card.profile-card-custom .profile-table td {
    text-align: left !important;
    border-bottom: 1px solid var(--border-color) !important;
}

/* 画像を強制的に右下に配置 */
.term-card.profile-card-custom .profile-bg-img {
    position: absolute !important;
    z-index: 1 !important;
    right: 15px !important;
    bottom: 15px !important;
    width: 260px !important;
    height: auto !important;
    object-fit: contain !important;
    pointer-events: none !important;
    display: block !important;
}/* --- プロフィールの背景色を他の用語カードと完全に同じにする --- */
.term-card.profile-card-custom {
    background-color: var(--bg-color) !important; /* または他のカードで使っている背景色の変数やカラーコード */
}
/* --- プロフィールの背景色を強制的に正しい色（白など）にする --- */
.term-card.profile-card-custom {
    background-color: #ffffff !important; /* 他のカードが白なら #ffffff、またはお好みのカラーコードに書き換えてください */
}

/* --- しずくの形とアニメーション --- */
.raindrop {
    position: absolute;
    /* 上が尖って下が丸い「しずく型」を作る */
    width: 8px;
    height: 12px;
    background: rgba(255, 255, 255, 0.4); /* 半透明の白（水色っぽくしたい場合は rgba(200, 220, 255, 0.6) などもおすすめ） */
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.4); /* 柔らかい光沢感 */
    animation: fall linear infinite;
}

@keyframes fall {
    0% {
        transform: translateY(-20px) scale(0.8);
        opacity: 0;
    }
    10% {
        opacity: 0.7;
    }
    90% {
        opacity: 0.7;
    }
    100% {
        transform: translateY(105vh) scale(1);
        opacity: 0;
    }
}
/* --- 横スクロールバーの発生を完全に防ぐ --- */
html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* 雨のコンテナも画面幅を超えないように固定 */
.rain-container {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100vw !important;
    overflow: hidden !important;
    pointer-events: none !important;
    z-index: 9999 !important;
}

/* プロフィールの背景画像がカードからはみ出てスクロールを作らないようにする */
.term-card.profile-card-custom {
    overflow: hidden !important; /* カードの外に出た部分を隠す */
}
/* --- worksと同じような並びにするためのカスタム経歴欄スタイル --- */
.history-section {
    margin-top: 40px;
    margin-bottom: 40px;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 15px; /* 項目と項目の間の隙間 */
}

.history-item {
    background: #ffffff; /* 必要に応じて背景色（他のカードと同じ色）に調整してください */
    border-radius: 8px;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.history-date {
    font-weight: 600;
    color: #666;
    min-width: 120px;
}

.history-content {
    flex-grow: 1;
    text-align: left;
}

/* 画面が狭いスマホなどのときの縦並び調整 */
@media (max-width: 768px) {
    .history-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}
/* --- 経歴欄をコンパクトにするスクロール設定 --- */
.history-list {
    max-height: 350px;       /* 表示する高さを制限（お好みで 300px〜400px に調整可能） */
    overflow-y: auto;        /* はみ出た分を縦スクロールできるようにする */
    padding-right: 8px;      /* スクロールバーと内容の隙間 */
    border: 1px solid rgba(0, 0, 0, 0.08); /* 枠線をつけてすっきり見せる */
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.5); /* ほんのり背景を入れる */
}

/* スクロールバーのデザインを少しスマートに（対応ブラウザ用） */
.history-list::-webkit-scrollbar {
    width: 6px;
}
.history-list::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}
/* --- 経歴を書くブロックの背景を透かす設定 --- */
.block {
    /* 例：白ベースで 80% の不透明度（背景を20%透かす）にする場合 */
    background-color: rgba(255, 255, 255, 0.3) !important;
    
    /* または、サイト全体の背景色を活かして完全に透明にする場合は以下のみにします */
    /* background-color: transparent !important; */
    
    /* お好みでガラスモフィズム（すりガラス風のぼかし）を入れたい場合 */
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}