@charset "UTF-8";

/* ==========================================================================
   【設定エリア】 配色やフォント等の基本設定
   ========================================================================== */
:root {
    /* ▼ カーソルのサイズ */
    --cursor-size: 20px;
    --cursor-hover-size: 60px;
    
    /* ▼ 配色設定（ダークモード対応） */
    --text-main: #e0e0e0; /* 読みやすいライトグレー */
    --text-sub: #a0a0a0;  /* メインより少し暗め */
    --bg-body: #121212;   /* 濃いグレー */
    --bg-footer: #080808; /* さらに濃い黒 */
    --accent-color: #4dabf7; /* アクセント：彩度を落としたブルー */
    
    /* ▼ レイアウト設定 */
    --font-main: 'Montserrat', 'Noto Sans JP', sans-serif;
    --spacing-container: 24px;      /* スマホ用 */
    --spacing-container-tab: 48px;  /* タブレット用 */
    --spacing-container-pc: 96px;   /* PC用 */
}

/* ==========================================================================
   以下、スタイルの定義
   ========================================================================== */

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

html {
    background-color: var(--bg-body);
    /* スマホでのスクロールバウンド対策（黒い隙間防止） */
    overscroll-behavior-y: none;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-body);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    width: 100%;
    cursor: none; 
    overscroll-behavior-y: none;
}

a { text-decoration: none; color: inherit; transition: color 0.3s ease; }
a:hover { color: var(--accent-color); } /* リンクホバー時にアクセントカラー */
ul { list-style: none; }

@media (hover: none) and (pointer: coarse) {
    body { cursor: auto; }
    #custom-cursor { display: none; }
}

/* --- カスタムカーソル --- */
#custom-cursor {
    position: fixed;
    top: 0; left: 0;
    width: var(--cursor-size);
    height: var(--cursor-size);
    border: 1px solid var(--accent-color); /* 枠線をアクセントカラーに */
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    /* ダークモードではdifferenceが見にくい場合があるためnormalに変更し色指定 */
    mix-blend-mode: normal; 
    background-color: transparent;
    transition: width 0.3s cubic-bezier(0.19, 1, 0.22, 1), 
                height 0.3s cubic-bezier(0.19, 1, 0.22, 1), 
                background-color 0.3s ease;
}
#custom-cursor.hovered {
    width: var(--cursor-hover-size);
    height: var(--cursor-hover-size);
    background-color: rgba(77, 171, 247, 0.2); /* アクセントカラーの薄い背景 */
    border-color: var(--accent-color);
}

/* --- ローディング画面 --- */
#loader {
    position: fixed; inset: 0;
    background-color: #000; /* 完全な黒で没入感 */
    z-index: 10000;
    display: flex; justify-content: center; align-items: center;
    color: var(--accent-color); /* ローディング文字もアクセントに */
}
.loader-text-wrapper { overflow: hidden; }
.loader-text {
    font-size: 1.5rem; font-weight: 300; letter-spacing: 0.3em;
    transform: translateY(100%); opacity: 0;
}

/* --- 共通クラス（レスポンシブ調整） --- */
.container-padding {
    padding-left: var(--spacing-container);
    padding-right: var(--spacing-container);
}
/* タブレット (769px以上) */
@media (min-width: 769px) {
    .container-padding {
        padding-left: var(--spacing-container-tab);
        padding-right: var(--spacing-container-tab);
    }
}
/* PC (1025px以上) */
@media (min-width: 1025px) {
    .container-padding {
        padding-left: var(--spacing-container-pc);
        padding-right: var(--spacing-container-pc);
    }
}

/* セクションの上下余白設定 */
.section-py { 
    /* スマホ・タブレット用に大幅に短縮 (8rem -> 2rem) */
    padding-top: 2rem; 
    padding-bottom: 4rem; 
}

/* PC (1025px以上) では元の広い間隔に戻す */
@media (min-width: 1025px) {
    .section-py { 
        padding-top: 8rem; 
        padding-bottom: 8rem; 
    }
}

/* --- ヘッダー --- */
.header-section {
    /* スマホ・タブレット用に高さをさらに縮小 (60vh -> 50vh) */
    min-height: 50vh;
    min-height: 50svh; 
    /* コンテンツを中央(center)ではなく上寄せ(flex-start)に変更し大幅に上に上げる */
    display: flex; flex-direction: column; justify-content: flex-start;
    
    /* スマホでの上部パディングを3remに修正 */
    padding-top: 3rem; 
    padding-bottom: 2rem; 
    
    position: relative; width: 100%;
    overflow: hidden; 
}

/* タブレット (769px以上) */
@media (min-width: 769px) {
    .header-section {
        /* タブレット以上ではパディングを元の6remに戻す */
        padding-top: 6rem;
    }
}

/* PC (1025px以上) でも高さを抑える */
@media (min-width: 1025px) {
    .header-section {
        /* 全画面(100vh)から70vhへ縮小 */
        min-height: 70vh;
        min-height: 70svh;
        /* PCでも6remを維持（上のタブレット設定を継承するが明示的に書いてもOK） */
        padding-top: 6rem;
    }
}

/* モーション用キャンバス */
#header-canvas {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1; 
    pointer-events: none;
    opacity: 0.6; 
}

.parallax-bg {
    position: absolute; right: -5%; top: 10%;
    font-weight: bold; 
    color: #252525; 
    user-select: none; 
    opacity: 1; 
    mix-blend-mode: normal; 
    pointer-events: none; 
    z-index: 0; 
    white-space: nowrap;
    line-height: 0.8; font-size: 15vw;
    transform: translateY(0); will-change: transform;
}
@media (max-width: 768px) {
    .parallax-bg { font-size: 20vw; opacity: 1; top: 10%; right: -10%; }
}

.header-content { position: relative; z-index: 10; max-width: 1024px; width: 100%; }

.user-role {
    font-size: 0.75rem; margin-bottom: 2rem;
    letter-spacing: 0.4em; text-transform: uppercase;
    color: var(--accent-color); 
    font-weight: 500;
}
@media (min-width: 769px) { .user-role { font-size: 0.875rem; } }

.user-name {
    font-size: 2.5rem; 
    font-weight: 800; letter-spacing: 0rem;
    margin-bottom: 3rem; 
    mix-blend-mode: normal; 
    width: 100%; word-break: break-word; line-height: 1.1;
}

.user-name .reveal-text span {
    background: linear-gradient(90deg, 
        #12c2e9, #c471ed, #f64f59, #12c2e9);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: gradientMove 3s ease infinite;
    display: block;
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 文字サイズレスポンシブ設定 */
@media (min-width: 769px) { .user-name { font-size: 5rem; } } /* タブレット */
@media (min-width: 1025px) { .user-name { font-size: 6.5rem; } } /* PC */

.separator-line {
    width: 4rem; height: 2px; 
    background-color: var(--accent-color); 
    margin-bottom: 3rem; transform-origin: left; transform: scaleX(0);
}
@media (min-width: 769px) { .separator-line { width: 6rem; } }

.user-bio {
    font-size: 0.875rem; line-height: 2; font-weight: 500;
    color: #fdfdfd;
    letter-spacing: 0.025em; max-width: 42rem;
}
@media (min-width: 769px) { 
    /* タブレット・PC画面での自己紹介テキストサイズ調整 (20px相当) */
    .user-bio { font-size: 1.25rem; } 
}

.reveal-text {
    overflow: hidden; display: inline-block;
    vertical-align: bottom; 
    padding-right: 1.5em; margin-right: -1.5em; 
    padding-left: 0.5em; margin-left: -0.5em;
    padding-bottom: 0.5em; margin-bottom: -0.5em;
    padding-top: 0.2em; margin-top: -0.2em;
}
.reveal-text span { display: block; transform: translateY(100%); opacity: 0; }

/* スマホでも改行しないように display: none に変更 */
.br-mobile { display: none; }
@media (min-width: 769px) { .br-mobile { display: none; } }

/* --- ギャラリー --- */
.gallery-section { 
    background-color: var(--bg-body); 
    position: relative; 
    z-index: 20;
    padding-top: 2rem;
}

.section-header {
    display: flex; align-items: flex-end; justify-content: space-between;
    margin-bottom: 2rem; /* スマホ用に短縮 (6rem -> 2rem) */
    border-bottom: 1px solid #333; 
    padding-bottom: 1.5rem;
}
/* タブレット以上で元の間隔に戻す */
@media (min-width: 769px) {
    .section-header {
        margin-bottom: 6rem;
    }
}

.section-title { font-size: 1.875rem; font-weight: 700; letter-spacing: -0.025em; color: #e0e0e0; }
@media (min-width: 769px) { .section-title { font-size: 2.5rem; } } /* タブレット */
@media (min-width: 1025px) { .section-title { font-size: 3rem; } } /* PC */

.section-number {
    font-size: 10px; font-weight: 700; letter-spacing: 0.1em;
    text-transform: uppercase; color: var(--accent-color); 
    margin-bottom: 0.25rem;
}
@media (min-width: 769px) { .section-number { font-size: 0.75rem; } }

/* グリッドレイアウト（3画面対応） */
#gallery-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
/* タブレット (769px ~ 1024px) */
@media (min-width: 769px) { #gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem; } }
/* PC (1025px ~) */
@media (min-width: 1025px) { #gallery-grid { grid-template-columns: repeat(3, 1fr); } }

.gallery-item {
    position: relative; width: 100%; aspect-ratio: 1 / 1;
    overflow: hidden; 
    background-color: #1a1a1a; 
    opacity: 0; transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease; 
}
.gallery-item.is-visible { opacity: 1; transform: translateY(0); }

.gallery-item img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 1.5s cubic-bezier(0.19, 1, 0.22, 1);
    will-change: transform; display: block;
}
.gallery-item:hover img { transform: scale(1.05); }

.gallery-overlay {
    position: absolute; inset: 0; background-color: #000;
    opacity: 0; transition: opacity 0.5s ease;
}
.gallery-item:hover .gallery-overlay { opacity: 0.4; }
.gallery-caption {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.5s ease;
}
.gallery-item:hover .gallery-caption { opacity: 1; }

.view-btn {
    color: var(--accent-color); 
    font-size: 0.75rem; letter-spacing: 0.3em; font-weight: 600;
    border: 1px solid var(--accent-color); 
    background-color: rgba(0,0,0,0.6);
    padding: 0.5rem 1rem;
}

/* --- フリーテキストセクション --- */
.text-section { 
    background-color: var(--bg-body); 
    position: relative; 
    z-index: 20; 
    overflow: hidden; 
}

.text-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    /* 【CSSパス修正】cssフォルダから見て1つ上のassets -> imgフォルダへ */
    background-image: url('../../assets/img/image7.png'); 
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.15; 
    z-index: 0;
    pointer-events: none;
}

.text-section .section-header,
.text-content-wrapper {
    position: relative;
    z-index: 1;
}

.text-content-wrapper {
    max-width: 800px;
    margin: 0 auto; 
}

.text-body {
    font-size: 0.95rem;
    line-height: 2.2;
    color: #fdfdfd;
    white-space: pre-line;
    font-weight: 400;
}
@media (min-width: 769px) {
    .text-body { font-size: 1.05rem; }
}

/* --- Contact / Footer --- */
.contact-section {
    background-color: var(--bg-footer); color: #e0e0e0; 
    position: relative; padding-bottom: 3rem;
}
.contact-inner { max-width: 1280px; margin: 0 auto; }

/* コンタクトグリッド（レスポンシブ調整） */
.contact-grid { 
    display: grid; 
    grid-template-columns: 1fr; 
    gap: 2rem; /* スマホ用に短縮 (5rem -> 2rem) */
}
@media (min-width: 769px) { 
    .contact-grid { 
        grid-template-columns: 1fr 1fr; 
        gap: 5rem; /* タブレット以上は元の間隔に戻す */
    } 
}

.contact-label {
    display: block; font-size: 10px; font-weight: 700; letter-spacing: 0.1em;
    text-transform: uppercase; color: var(--text-sub); margin-bottom: 2rem;
}
.contact-heading {
    font-size: 2.25rem; font-weight: 700; letter-spacing: -0.025em;
    margin-bottom: 3rem; line-height: 1.2;
}
@media (min-width: 769px) { .contact-heading { font-size: 3rem; } }
@media (min-width: 1025px) { .contact-heading { font-size: 3.75rem; } }

.links-list { display: flex; flex-direction: column; gap: 1.5rem; }
.link-item { border-bottom: 1px solid #333; padding-bottom: 1rem; position: relative; }
.link-anchor {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 1.25rem; font-weight: 300; transition: all 0.3s ease; width: 100%;
    color: #e0e0e0; 
}
@media (min-width: 769px) { .link-anchor { font-size: 1.5rem; } }
.link-anchor:hover { padding-left: 1rem; color: var(--accent-color); }

.link-label { transition: color 0.3s; }
.link-anchor:hover .link-label { color: var(--accent-color); }
.link-arrow { font-size: 0.75rem; opacity: 0; transition: opacity 0.3s; color: var(--accent-color); }
.link-anchor:hover .link-arrow { opacity: 1; }

.footer-bottom {
    margin-top: 8rem; padding-top: 2rem; border-top: 1px solid #333;
    display: flex; flex-direction: column; justify-content: space-between;
    align-items: flex-start; font-size: 10px; color: var(--text-sub);
    text-transform: uppercase; letter-spacing: 0.1em; gap: 1rem;
}
@media (min-width: 769px) { .footer-bottom { flex-direction: row; align-items: flex-end; } }

/* --- モーダル（画像拡大） --- */
#image-modal {
    position: fixed; inset: 0; 
    z-index: 15000; 
    display: none; align-items: center; justify-content: center;
    background-color: rgba(0, 0, 0, 0.95); 
    opacity: 0;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    
    /* モーダル表示時は標準カーソルを表示 */
    cursor: auto; 
}
#modal-image {
    max-width: 100%; max-height: 100%; object-fit: contain;
    transform: scale(0.95); opacity: 0;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    
    /* 画像上でも標準カーソルを表示 */
    cursor: auto; 
}

.close-btn {
    position: fixed; 
    top: max(1.5rem, env(safe-area-inset-top)); 
    right: max(1.5rem, env(safe-area-inset-right));
    z-index: 20000; 
    cursor: pointer;
    width: 48px; height: 48px;
    background-color: rgba(30, 30, 30, 0.8); 
    backdrop-filter: blur(4px);
    border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, background-color 0.3s ease;
    border: 1px solid #444;
    
    /* 閉じるボタン上でもポインターを表示 */
    cursor: pointer; 
}
.close-btn:hover { background-color: var(--accent-color); border-color: var(--accent-color); }
.close-btn svg { transition: transform 0.5s ease; width: 24px; height: 24px; }
.close-btn path { stroke: #e0e0e0; } 
.close-btn:hover path { stroke: #fff; }
.close-btn:hover svg { transform: rotate(90deg); }

.modal-content-wrapper {
    width: 100%; height: 100%; padding: 1rem;
    display: flex; align-items: center; justify-content: center;
    position: relative;
    /* モーダルコンテンツラッパーでもカーソルを表示 */
    cursor: auto;
}
@media (min-width: 769px) { .modal-content-wrapper { padding: 4rem; } }