/* 【デザイン設定エリア】 */
:root {
    /* 背景色設定：全体を #fcfcfc に統一 */
    --bg-color: #fcfcfc;
    
    --text-main: #555;
    --text-sub: #888;
    
    /* アクセントカラー */
    --accent: #8ec5fc; 
    --accent-sub: #e0c3fc; /* 2つ目のカード用 */
    
    --section-title: #e0e0e0; /* セクションタイトルの色をさらに薄く */
}

/* --- ローカルフォント読み込み設定 --- */
/* 指定されたフォントファイル: assets/font/851MkPOP_101.ttf */
/* CSSファイルは assets/css/ にあるため、一つ上の階層(../)の font/ を参照します */
@font-face {
    font-family: '851MkPOP';
    src: url('../font/851MkPOP_101.ttf') format('truetype');
    font-display: swap;
}

/* 全称セレクタで余白をリセットし、固定化を確実に */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Quicksand', 'M PLUS Rounded 1c', sans-serif;
    margin: 0;
    padding: 0;
    
    /* 背景色を単色に設定 */
    background-color: var(--bg-color);
    
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    scroll-behavior: smooth; /* スムーズスクロール */
}

body.modal-open {
    overflow: hidden;
}

/* ふわっと表示されるアニメーション */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- 追加: テキスト用のリッチなアニメーション --- */

/* ぼかしながらゆっくり浮かび上がる (テキスト用) */
@keyframes blurFadeIn {
    0% {
        opacity: 0;
        filter: blur(15px);
        transform: translateY(15px) scale(0.98);
    }
    100% {
        opacity: 1;
        filter: blur(0);
        transform: translateY(0) scale(1);
    }
}

/* 横からスッと現れる (サブタイトル用) */
@keyframes slideFadeIn {
    0% {
        opacity: 0;
        transform: translateX(-15px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 画像がふわっと浮き上がる (画像コンテナ用) */
@keyframes imageReveal {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}
/* ------------------------------------------ */

/* 背景の動くボール (極小・散布) */
.blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(5px); /* ぼかしを小さく */
    z-index: -1;
    opacity: 0.5; /* 透明度 */
    animation: float 25s infinite alternate ease-in-out;
}

/* 色の定義 */
.color-1 { background: #e0c3fc; } /* ラベンダー */
.color-2 { background: #8ec5fc; } /* ブルー */
.color-3 { background: #ffdee9; } /* ピンク */
.color-4 { background: #f6d365; } /* イエロー */
.color-5 { background: #b9fbc0; } /* グリーン */

/* 各ボールの配置とサイズ（ランダムに散りばめる） */
.blob-1  { top: 5%;   left: 5%;   width: 20px; height: 20px; animation-duration: 20s; }
.blob-2  { top: 15%;  left: 25%;  width: 12px; height: 12px; animation-duration: 25s; animation-delay: -2s; }
.blob-3  { top: 8%;   right: 10%; width: 25px; height: 25px; animation-duration: 30s; animation-delay: -5s; }
.blob-4  { top: 40%;  left: 8%;   width: 15px; height: 15px; animation-duration: 22s; animation-delay: -8s; }
.blob-5  { top: 35%;  right: 25%; width: 18px; height: 18px; animation-duration: 28s; animation-delay: -10s; }
.blob-6  { bottom: 30%; left: 15%; width: 22px; height: 22px; animation-duration: 24s; animation-delay: -12s; }
.blob-7  { bottom: 10%; left: 5%;  width: 10px; height: 10px; animation-duration: 26s; animation-delay: -15s; }
.blob-8  { bottom: 20%; right: 5%; width: 28px; height: 28px; animation-duration: 32s; animation-delay: -3s; }
.blob-9  { top: 50%;  left: 50%;  width: 14px; height: 14px; animation-duration: 29s; animation-delay: -7s; }
.blob-10 { bottom: 45%; right: 15%; width: 16px; height: 16px; animation-duration: 23s; animation-delay: -1s; }
.blob-11 { top: 20%;  left: 80%;  width: 12px; height: 12px; animation-duration: 27s; animation-delay: -9s; }
.blob-12 { bottom: 5%;  right: 40%; width: 20px; height: 20px; animation-duration: 31s; animation-delay: -4s; }
.blob-13 { top: 10%;  left: 40%;  width: 8px;  height: 8px;  animation-duration: 21s; animation-delay: -11s; }
.blob-14 { bottom: 60%; left: 5%; width: 18px; height: 18px; animation-duration: 25s; animation-delay: -6s; }
.blob-15 { top: 80%;  right: 50%; width: 10px; height: 10px; animation-duration: 28s; animation-delay: -13s; }

@keyframes float {
    0% { transform: translate(0, 0); }
    100% { transform: translate(20px, 20px); }
}

/* --- メインビジュアルセクション --- */
.main-visual-wrapper {
    width: 100%;
    display: flex;
    justify-content: center; /* 中央寄せ */
    margin: 0 0 10rem 0; /* 5rem -> 10rem に変更して間隔を広げる */
    padding: 0;
    /* 画面上部に固定配置するための設定 */
    position: relative; 
    top: 0;
    opacity: 0;
    animation: fadeInUp 1s ease-out forwards;
    z-index: 10; /* 他の要素より手前に */
}

/* 画像とメニューを横並びにするラッパー */
.mv-content-flex {
    display: flex;
    align-items: center; /* 垂直方向中央 */
    justify-content: center;
    gap: 4rem; /* 画像とメニューの間隔 */
}

.main-visual {
    position: relative;
    /* サイズ固定を解除し、画像の大きさに合わせる */
    width: auto;
    height: auto;
    max-width: 100%; 
    
    /* ガラス効果と枠線を削除 */
    background-color: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0; 
    
    /* 画像からはみ出す表現のために hidden を解除 */
    overflow: visible;
    display: inline-block; 
    
    /* 画像コンテナにアニメーションを適用 */
    opacity: 0;
    /* 画像は2秒かけて比較的早めに表示完了 */
    animation: imageReveal 2.0s cubic-bezier(0.2, 0.8, 0.2, 1) 0.2s forwards;
}

.main-visual-img {
    display: block; 
    width: auto;    
    height: auto;   
    max-width: 100%; 
    transition: transform 10s ease;
    border-radius: 0 0 24px 24px; 
}

.main-visual:hover .main-visual-img {
    transform: scale(1.02); /* 拡大率を少し抑えめに */
}

.main-visual-overlay {
    position: absolute;
    /* テキストを左にはみ出させ、かつ中央（縦方向）に配置 */
    top: 35%; /* 42%からさらに上げて35%へ */
    transform: translateY(-50%); /* 自身の高さの半分だけ上にずらして完全な中央へ */
    left: -18rem; /* -26remから-18remに変更して少し右（画像寄り）へ */
    
    background: transparent; 
    display: flex;
    flex-direction: column;
    justify-content: center; /* コンテンツ自体も中央寄せ */
    align-items: flex-start;
    text-align: left;
    padding: 0;
    
    z-index: 20; /* 画像の上に重ねる */
    pointer-events: none; /* マウス操作を画像に通す */
}

.mv-title {
    /* 手書きフォント '851MkPOP' を適用 */
    font-family: '851MkPOP', 'M PLUS Rounded 1c', sans-serif;
    font-size: 4.5rem; /* サイズ調整 */
    color: #444;     /* 背景（白）に馴染む濃いグレー */
    
    /* 画像と重なる部分の可読性を確保するための白い縁取り風シャドウ */
    text-shadow: 3px 3px 0 #fff, -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff, 1px 1px 0 #fff;
    
    letter-spacing: 0.05em;
    font-weight: 400; 
    font-style: normal;
    margin: 0;
    opacity: 0;
    
    /* テキストは3.5秒かけてゆっくり表示 (画像より遅い) */
    animation: blurFadeIn 3.5s cubic-bezier(0.2, 0.8, 0.2, 1) 0.5s forwards;
    
    line-height: 1.4; /* 行間をゆったりと */
    white-space: nowrap; /* 改行させない */
}

.mv-subtitle {
    /* 英語は読みやすい 'Quicksand' に戻す */
    font-family: 'Quicksand', sans-serif;
    font-size: 1.1rem;
    color: var(--accent); /* 淡い青色（アクセントカラー）に変更 */
    
    /* 背景を削除 */
    background: transparent;
    backdrop-filter: none;
    
    padding: 0.5rem 1.2rem;
    margin-top: 1rem; /* 2remから1remに短縮 */
    margin-left: 0.5rem;
    letter-spacing: 0.2em;
    text-transform: uppercase; /* 大文字に */
    opacity: 0;
    
    /* サブタイトルはさらに遅れてゆっくり表示 */
    animation: slideFadeIn 3.0s cubic-bezier(0.2, 0.8, 0.2, 1) 1.5s forwards;
}

/* --- グローバルメニュー (修正版：画像横に固定配置) --- */
.global-nav {
    /* PCでは画像の中央基準で配置するため absolute に戻す */
    position: absolute;
    /* 画面中央を基準点とする */
    left: 50%;
    top: 50%;
    /* 縦方向中央揃え */
    transform: translateY(-50%);
    /* 画像の幅の半分 + 余白分だけ右にずらす (画像幅約540pxの半分270px + 余白) */
    margin-left: 20rem; 
    
    display: flex;
    flex-direction: column;
    gap: 2rem;
    /* メニューもふわっと表示 */
    opacity: 0;
    animation: fadeInUp 1s ease-out 1s forwards; /* 少し遅れて表示 */
    z-index: 100; /* 最前面に表示 */
}

.menu-btn {
    padding: 15px 30px;
    background: none;
    border: none;
    position: relative;
    text-transform: uppercase;
    font-weight: 600; /* boldより少し細く */
    letter-spacing: 0.1em;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-main);
    font-family: 'Quicksand', 'M PLUS Rounded 1c', sans-serif;
    font-size: 1rem;
    display: inline-block;
    transition: all 0.2s;
    text-align: center;
    white-space: nowrap;
}

/* 枠線アニメーション */
.menu-btn::after, .menu-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    border: 2px solid var(--accent); /* アクセントカラー */
    transition: transform 0.2s;
}

.menu-btn::after {
    transform: translate(3px, 3px);
}
.menu-btn::before {
    transform: translate(-3px, -3px);
}

.menu-btn:hover::after, .menu-btn:hover::before {
    transform: translate(0);
}

/* --------------------------- */

.container {
    max-width: 1200px; /* 3カラムにするため、さらに少し広げる */
    margin: 0 auto;
    padding: 0 2rem 1rem; /* 下の余白を5remから1remへ大幅に削減 */
}

/* セクション共通設定 */
section {
    margin-bottom: 8rem; /* セクション間の余白を広げる */
    position: relative;
}

/* セクションタイトル（背景の大きな文字） */
.section-header {
    position: relative;
    /* 回転サークルが収まる高さをさらに縮小 (160px -> 120px) */
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6rem; /* 【変更】PC画面での間隔を6remに統一 */
}

/* ★プロフィールセクション専用の設定 */
#profile-section {
    margin-bottom: 2rem; /* セクション自体のマージンを8remから2remに短縮 */
}

/* 回転するエンブレムのスタイル */
.emblem {
    position: absolute;
    left: 50%;
    top: 50%;
    /* translateで中央配置 */
    transform: translate(-50%, -50%);
    width: 120px;  /* サークルの直径をさらに縮小 */
    height: 120px;
    border-radius: 50%;
    font-weight: 600;
    
    /* アクセントカラーを適用して統一感を出す */
    color: var(--accent); 
    
    animation: spinZ 40s linear infinite; /* ゆっくり回転 */
    text-align: center;
    pointer-events: none; /* マウスイベントを無効化 */
    z-index: 0;
    font-family: 'Cormorant Garamond', serif;
    opacity: 0.5; /* 薄く表示 */
}

.emblem span {
    position: absolute;
    display: inline-block;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    text-transform: uppercase;
    font-size: 1.5rem; /* 文字サイズを大きく */
    transition: all .5s cubic-bezier(0,0,0,1);
}

@keyframes spinZ {
    0% {
        transform: translate(-50%, -50%) rotateZ(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotateZ(360deg);
    }
}

/* スマホ用エンブレムアニメーション (スケール縮小) */
@keyframes spinZMobile {
    0% {
        transform: translate(-50%, -50%) scale(0.7) rotateZ(0deg);
    }
    100% {
        transform: translate(-50%, -50%) scale(0.7) rotateZ(360deg);
    }
}

/* 日本語タイトルは手前に表示 */
.section-title-jp {
    font-size: 2.2rem;
    font-weight: 600;
    color: #444;
    position: relative;
    z-index: 1;
    display: inline-block;
    letter-spacing: 0.1em;
    background: rgba(255,255,255,0.8); /* 背景を入れて文字を見やすく */
    padding: 0.5rem 1rem;
    backdrop-filter: blur(2px);
}

/* カードのスタイル（グラス効果を削除してフラットに） */
.glass-card {
    background: transparent; 
    backdrop-filter: none;   
    -webkit-backdrop-filter: none;
    border: none;            
    border-radius: 0;        
    box-shadow: none;        
    padding: 0;              
    margin-bottom: 0; /* プロフィールカード下の余白を削除 */
    opacity: 0;
    animation: fadeInUp 1s ease-out forwards;
}

/* --- プロフィールセクション (3カラムレイアウト) --- */
.profile-container {
    display: flex;
    align-items: flex-start; /* 上揃え */
    gap: 3rem; 
    text-align: left;
    padding: 2rem 0; 
}

/* 1列目：画像 */
.profile-col-img {
    flex-shrink: 0;
    text-align: center;
    width: 220px; /* 固定幅 */
}

/* 2列目：プロフィール詳細 */
.profile-col-content {
    flex: 1;
    min-width: 0; /* flexアイテムの縮小対策 */
}

/* 3列目：Philosophy */
.profile-col-philosophy {
    flex: 1;
    min-width: 0;
    padding-left: 2rem;
    border-left: 1px solid #eee; /* 区切り線 */
}

.profile-img {
    width: 200px;
    height: 200px;
    border-radius: 50%; 
    object-fit: cover;
    border: none; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.05); 
}

h1 {
    font-size: 2rem;
    margin: 0 0 1rem 0;
    color: #333;
    font-weight: 400; 
    letter-spacing: 0.1em;
}

.role {
    font-weight: 500;
    color: var(--accent); /* アクセントカラーに変更 */
    margin-bottom: 2rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-size: 0.8rem;
    display: block; 
    background: transparent; 
    padding: 0;
    border-radius: 0;
}

.bio-text {
    line-height: 2;
    color: #666;
    margin-bottom: 2.5rem;
    font-size: 0.95rem;
}

/* Philosophyテキストのスタイル */
.philosophy-text {
    margin-top: 0; /* 3列目になったので上余白削除 */
    padding-top: 0;
    border-top: none; 
    line-height: 2.2;
    color: #555;
    font-size: 0.95rem;
}
.philosophy-title {
    font-size: 1.1rem;
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: #444;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.links-row {
    display: flex;
    justify-content: flex-start;
    gap: 1.5rem;
    flex-wrap: wrap;
}

/* ボタンもフラットに */
.glass-btn {
    background: transparent;
    padding: 10px 30px; /* パディングを追加して枠内を広げる */
    border-radius: 50px; /* 丸みをつけて親しみやすく */
    text-decoration: none;
    color: #333; 
    font-size: 1.1rem; /* 文字サイズを大きく */
    font-weight: 600;
    transition: all 0.3s;
    border: 1px solid #333333; /* 指示通りの枠線 */
    box-shadow: none;
    letter-spacing: 0.1em;
    display: inline-block;
}
.glass-btn:hover {
    transform: translateY(-2px);
    background-color: #333; /* ホバーで反転 */
    color: #fff;
}

/* --- Works (ジグザグレイアウト) --- */
.works-list {
    display: flex;
    flex-direction: column;
    gap: 8rem; /* アイテム間の余白 */
}

/* スクロールアニメーション用のスタイル */
.work-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8rem; 
    opacity: 0; /* 初期状態は非表示 */
    transform: translateY(60px); /* 少し下から */
    transition: opacity 1s ease-out, transform 1s ease-out; /* トランジションで制御 */
}

/* JavaScriptでクラスが付与されたら表示 */
.work-item.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 偶数番目のアイテムは左右反転（画像右、テキスト左） */
.work-item:nth-child(even) {
    flex-direction: row-reverse;
}

.work-img-wrapper {
    flex: 1;
    position: relative;
}

.work-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
    /* 強いシャドウで浮き出し効果 */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 10px 20px -5px rgba(0,0,0,0.1);
    transition: transform 0.4s ease;
}

.work-item:hover .work-img {
    transform: translateY(-5px);
}

.work-content {
    flex: 1;
    padding: 1rem;
}

.work-title {
    font-size: 1.5rem;
    margin: 0 0 1.5rem 0;
    color: #333;
    letter-spacing: 0.05em;
    position: relative;
    display: inline-block;
}

.work-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 40px;
    height: 1px;
    background-color: var(--accent); /* アクセントカラーに変更 */
}

.work-cat {
    font-size: 0.8rem;
    color: var(--accent); /* アクセントカラーに変更 */
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 0.5rem;
    display: block;
}

.work-desc {
    line-height: 2;
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.view-more-btn {
    display: inline-block;
    font-size: 0.9rem;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #333;
    padding-bottom: 5px;
    transition: 0.3s;
}
.view-more-btn:hover {
    color: var(--accent); /* アクセントカラーに変更 */
    border-color: var(--accent); /* アクセントカラーに変更 */
}

/* --- 無限スライダー --- */
.slider-section {
    width: 100vw;
    margin-left: calc(50% - 50vw); /* コンテナからはみ出して画面幅いっぱいにする */
    margin-top: 4rem; /* 8rem -> 4rem に短縮 */
    margin-bottom: 4rem;
    overflow: hidden;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.5s forwards;
    
    /* 2段のスライダーを縦に並べる */
    display: flex;
    flex-direction: column;
    gap: 2rem; /* 上下のスライダーの間隔 */
    padding: 2rem 0; /* 上下に余白を追加してシャドウの切れを防ぐ */
}

.slider-track {
    display: flex;
    width: max-content;
    animation: scroll 60s linear infinite;
}

/* 逆方向のアニメーション */
.slider-reverse {
    animation: scroll-reverse 60s linear infinite;
}

.slider-item {
    width: 200px;
    height: 200px;
    margin-right: 40px; /* 画像間の余白 */
    flex-shrink: 0;
    display: flex; 
    align-items: center; 
    justify-content: center; 
}

.slider-item img {
    width: 100%; /* 親要素に合わせる */
    height: 100%; /* 親要素に合わせる */
    object-fit: cover; /* 正方形にトリミングして埋める */
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

/* ホバーで少し拡大 */
.slider-item:hover img {
    transform: scale(1.05);
}

@keyframes scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

@keyframes scroll-reverse {
    from { transform: translateX(-50%); }
    to { transform: translateX(0); }
}

/* --- New Contact Section Decoration & Cards --- */

/* セクション自体に奥行きを持たせる設定 */
#contact-section {
    position: relative;
    overflow: hidden; /* はみ出しを隠す */
    padding: 4rem 0 0; /* 下のパディングを削除 */
}

/* コンテナ（グリッドレイアウト） */
.contact-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); /* 最小幅を拡大 */
    gap: 5rem; /* 間隔を広げる */
    width: 100%;
    max-width: 1100px; /* コンテナの最大幅を拡大 */
    margin: 0 auto;
    /* margin-top: 2rem; を削除してタイトルのすぐ下に配置 */
}

/* カード共通スタイル */
.c-card {
    display: flex;
    flex-direction: column;
}

/* カードアイコン背景色の個別設定 */
.c-card:nth-child(1) .c-box .c-icon .c-iconBox {
    background: var(--accent); /* Mail: Blue */
}
.c-card:nth-child(2) .c-box .c-icon .c-iconBox {
    background: var(--accent-sub); /* Instagram: Purple */
}

/* カード内リスト (タグ) */
.c-card ul {
    margin: 0;
    padding: 0;
    list-style-type: none;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.625rem;
}

.c-card ul li {
    text-transform: uppercase;
    background: var(--clr-tag); /* 変数で色指定 */
    color: #282828;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 0.375rem 0.625rem;
    border-radius: 0.188rem;
}

/* コンテンツエリア */
.c-card .c-content {
    padding: 0.938rem 0.625rem;
}

.c-card .c-content h3 {
    text-transform: capitalize;
    font-size: 1.5rem;
    margin: 0;
    color: #333;
    font-family: 'Quicksand', sans-serif;
}

.c-card .c-content p {
    margin: 0.625rem 0 1.25rem;
    color: #565656;
    line-height: 1.5;
    font-size: 0.95rem;
}

/* 画像ボックスの外枠 (角丸マスク用) */
.c-card-inner {
    position: relative;
    width: 100%;
    height: 20rem; /* 高さを少し大きく */
    background: var(--clr); /* #fff */
    border-radius: 1.25rem;
    border-bottom-right-radius: 0; /* 右下だけ角丸なし（アイコンとの結合部） */
    overflow: hidden;
}

/* 画像ボックス本体 */
.c-box {
    width: 100%;
    height: 100%;
    background: #fff;
    border-radius: 1.25rem;
    overflow: hidden;
    position: relative; 
}

.c-imgBox {
    position: absolute;
    inset: 0;
}

.c-imgBox img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.c-card:hover .c-imgBox img {
    transform: scale(1.05);
}

/* 右下のアイコンエリアコンテナ（白い切り欠きを作る部分） */
.c-icon {
    position: absolute;
    bottom: -0.375rem;
    right: -0.375rem;
    width: 6rem;
    height: 6rem;
    background: var(--clr); /* カード背景と同じ白 */
    border-top-left-radius: 50%;
    z-index: 2;
}

/* 逆アールの装飾 (左側) */
.c-icon::before {
    position: absolute;
    content: "";
    bottom: 0.375rem;
    left: -1.25rem;
    background: transparent;
    width: 1.25rem;
    height: 1.25rem;
    border-bottom-right-radius: 1.25rem;
    box-shadow: 0.313rem 0.313rem 0 0.313rem #fff; 
}

/* 逆アールの装飾 (上側) */
.c-icon::after {
    position: absolute;
    content: "";
    top: -1.25rem;
    right: 0.375rem;
    background: transparent;
    width: 1.25rem;
    height: 1.25rem;
    border-bottom-right-radius: 1.25rem;
    box-shadow: 0.313rem 0.313rem 0 0.313rem var(--clr);
}

/* アイコンの丸いボタン */
.c-iconBox {
    position: absolute;
    inset: 0.625rem;
    background: #282828; /* デフォルト色（CSSで上書きされる） */
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: 0.3s;
    text-decoration: none;
}

.c-iconBox span {
    color: #fff;
    font-size: 1.8rem;
}

.c-icon:hover .c-iconBox {
    transform: scale(1.1);
}


/* モーダル */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(252, 252, 252, 0.95); 
    backdrop-filter: none;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
}
.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}
.modal-content {
    width: 90%;
    max-width: 900px;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    text-align: center;
}
.modal-img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 0;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05); 
    object-fit: contain;
}
.modal-body {
    color: #555;
    margin-top: 1.5rem;
}

/* タブレット対応 (1024px以下) */
@media (max-width: 1024px) {
    .container {
        padding: 0 2rem 3rem; /* PCより少し狭く */
    }
    
    /* メインビジュアル: 縦積みに変更 */
    .mv-content-flex {
        flex-direction: column;
        gap: 3rem;
    }

    .main-visual-wrapper {
        margin-bottom: 8rem; /* 下の余白を広げる */
    }

    /* 画像左のはみ出し配置を解除し、上部に配置 */
    .main-visual-overlay {
        left: 0;
        right: 0;
        top: 0; /* 上部に配置 */
        transform: none; /* 中央揃え解除 */
        padding: 5rem 2rem 2rem; /* 上部にパディング追加 */
        justify-content: flex-start; /* 上寄せ */
        align-items: center; /* 水平方向は中央揃え */
        text-align: center;
    }

    .mv-title {
        font-size: 3.5rem; /* PCより少し小さく */
        color: #444; 
        text-shadow: 2px 2px 0 #fff, -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff, 1px 1px 0 #fff;
    }

    /* グローバルナビ: 右固定を解除して下部に横並び */
    .global-nav {
        position: static;
        left: auto; /* 修正: 絶対配置の解除 */
        margin-left: 0; /* 修正: マージンのリセット */
        transform: none;
        flex-direction: row;
        justify-content: center;
        width: 100%;
        margin-top: 2rem;
        opacity: 0;
        animation: fadeInUp 1s ease-out 1s forwards;
    }

    /* コンタクトカードのグリッド調整 */
    .contact-cards-grid {
        gap: 2rem; /* 少し狭める */
    }
}

/* スマホ対応 */
@media (max-width: 768px) {
    /* ... (既存のスマホスタイル) ... */
    
    /* メインビジュアルのレイアウト変更：縦積みへ */
    .main-visual-wrapper {
        flex-direction: column; /* 縦並び */
        align-items: center;
        margin-bottom: 2rem; /* 4rem -> 2rem にさらに短縮 (メニューとセクションの距離) */
    }
    
    /* メニューはスマホで横並びにしてみる（あるいは縦のまま） */
    .global-nav {
        position: static;
        transform: none;
        flex-direction: row; 
        gap: 1rem;
        margin-top: 2rem;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
        padding: 0 1rem;
    }
    .menu-btn {
        padding: 12px 24px;
        font-size: 0.9rem;
    }

    .profile-container {
        flex-direction: column; /* 縦積みに変更 */
        text-align: center;
        gap: 2rem;
    }
    .links-row {
        justify-content: center;
    }
    .section-title-en {
        font-size: 3rem;
    }
    .container { padding: 4rem 1.5rem 2rem; } /* 下の余白を調整 */

    /* 最後のセクションの下マージンをリセット */
    #contact-section {
        margin-bottom: 0;
    }
    
    /* スマホ用3カラム調整 */
    .profile-col-img {
        width: 100%; /* 幅いっぱい */
        position: static; /* sticky解除 */
        margin-bottom: 1rem;
    }
    .profile-col-content {
        width: 100%;
    }
    .profile-col-philosophy {
        width: 100%;
        padding-left: 0;
        border-left: none;
        border-top: 1px solid #eee; /* 上線に変更 */
        padding-top: 2rem;
        margin-top: 1rem;
    }
    
    /* スマホでのメインビジュアル調整 */
    .main-visual {
        width: 100%; 
        height: auto;
        aspect-ratio: auto; 
        border-radius: 0 0 24px 24px; 
        overflow: hidden; 
    }
    
    .main-visual-overlay {
        position: absolute;
        inset: 0;
        top: 0; left: 0;
        padding: 4rem 1.5rem;
        justify-content: flex-start; /* 上寄せ */
        align-items: center; /* 水平方向は中央揃え */
        text-align: center; /* テキストの中央揃え */
        transform: none; 
    }
    .mv-title {
        font-size: 2.2rem; /* スマホで文字サイズ調整 */
        color: #444; /* 色を黒っぽく変更 */
        text-shadow: 2px 2px 0 #fff, -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff, 1px 1px 0 #fff; /* 白い縁取りで視認性確保 */
        white-space: normal;
    }
    .mv-subtitle {
        color: var(--accent); /* スマホ表示でもアクセントカラー */
        background: transparent;
        backdrop-filter: none;
        margin-left: 0;
        text-shadow: 0 2px 5px rgba(0,0,0,0.3);
    }
    
    /* スマホでのWorks調整 */
    .works-list {
        gap: 5rem;
    }
    .work-item, .work-item:nth-child(even) {
        flex-direction: column;
        gap: 2rem;
    }
    .work-content {
        padding: 0;
        text-align: left;
    }
    
    /* スマホでのスライダー調整 */
    .slider-item {
        margin-right: 20px;
    }
    .slider-item img {
        max-height: 250px; /* スマホでは高さを抑える */
    }
    
    /* スマホでのセクションヘッダー調整 */
    .section-header {
        height: 100px; /* 高さを少し小さく */
    }
    .section-title-jp {
        font-size: 1.5rem; /* 日本語タイトルを小さく */
    }
    .emblem {
        width: 100px;
        height: 100px;
        animation: spinZMobile 40s linear infinite; /* スマホ用アニメーション */
    }
    .emblem span {
        font-size: 1.2rem; /* エンブレム文字サイズも少し小さく */
    }

    /* 各セクションのタイトル下余白を統一 */
    #works-section .section-header,
    #profile-section .section-header,
    #contact-section .section-header {
        margin-bottom: 3rem;
    }

    /* Contact Cards スマホ調整 */
    .contact-cards-grid {
        grid-template-columns: 1fr; /* スマホは1列 */
        max-width: 100%;
        gap: 3rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html:focus-within {
        scroll-behavior: auto;
    }
    body {
        scroll-behavior: auto;
    }
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .blob,
    .slider-track {
        animation: none !important;
    }
    .main-visual-wrapper,
    .main-visual,
    .mv-title,
    .mv-subtitle,
    .global-nav,
    .glass-card,
    .slider-section,
    .work-item {
        opacity: 1 !important;
        transform: none !important;
    }
}