@charset "utf-8";

:root {
    --bg-color: #f9f9f9;
    --text-main: #111;
    --text-sub: #444;
    --yolk-color: #fecf02;
    --white-egg: rgba(255, 255, 255, 0.93);
}

body {
    margin: 0;
    overflow: hidden; 
    background-color: var(--bg-color);
    font-family: "Helvetica Neue", Arial, sans-serif;
    transition: background-color 0.8s ease;
    
    /* ★追加: オーバーレイ位置ズレ防止 */
    transform: none !important;
    filter: none !important;
    perspective: none !important;
}

/* ★追加: オーバーレイ固定設定 */
body .overlay-section {
    position: fixed !important;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: 2500;
}

/* =========================================
   3D Canvas Area
   ========================================= */
#canvas-container {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100vh; z-index: 1;
    transition: transform 1.0s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 1.0s ease, filter 1.0s ease;
}

#webgl-canvas { 
    display: block; width: 100%; height: 100%; 
    outline: none; cursor: grab; 
}
#webgl-canvas:active { cursor: grabbing; }

#ui-guide {
    position: absolute; bottom: 40px; width: 100%; text-align: center;
    color: var(--text-main); pointer-events: none; font-size: 14px;
    font-weight: 700; letter-spacing: 0.15em; opacity: 1;
    transition: opacity 0.5s ease; z-index: 5;
}

/* =========================================
   Stage Navigation
   ========================================= */
#stage-nav {
    position: fixed; bottom: 60px; right: 60px; z-index: 100;
    display: flex; flex-direction: column; align-items: flex-end; gap: 30px;
}
.stage-btn {
    background: none; border: none; padding: 5px 0;
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 0.05em;
    color: #ccc; cursor: pointer; 
    transition: all 0.3s;
    text-transform: uppercase;
    position: relative;
    text-shadow: 0 2px 10px rgba(255,255,255,0.8);
}
.stage-btn:hover { color: #666; }
.stage-btn.active { 
    color: #1a1a1a; 
    transform: translateX(-20px) scale(1.1); 
    border-right: 6px solid #1a1a1a;
    padding-right: 25px;
}


/* =========================================
   Stage 2: Profile Section
   ========================================= */
#profile-section {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh; z-index: 10;
    pointer-events: none; 
    display: flex; justify-content: center; align-items: center;
    opacity: 0; transition: opacity 0.8s ease, transform 0.8s ease;
    transform: translateY(30px);
}

.profile-inner {
    width: 90%; max-width: 800px; max-height: 80vh;
    overflow-y: auto; 
    padding: 80px; 
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
    border-radius: 4px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.05);
    scrollbar-width: none; -ms-overflow-style: none;
    overscroll-behavior: contain; 
}
.profile-inner::-webkit-scrollbar { display: none; }

.prof-header { border-bottom: 2px solid #1a1a1a; padding-bottom: 30px; margin-bottom: 50px; }
.prof-name-ja { font-size: 40px; font-weight: 800; margin: 0 0 10px 0; letter-spacing: 0.05em; }
.prof-name-en { font-size: 20px; font-weight: 700; color: #666; margin: 0 0 20px 0; font-family: "Helvetica Neue", Arial, sans-serif; }
/* .prof-job { font-family: monospace; font-size: 14px; color: #1a1a1a; background: #eee; display: inline-block; padding: 4px 10px; border-radius: 4px;} */
.prof-desc { margin-top: 30px; font-size: 16px; line-height: 2.2; color: #333; text-align: justify; font-feature-settings: "palt"; }

.prof-block { margin-bottom: 50px; }
.prof-label { font-size: 13px; font-weight: 800; color: #1a1a1a; letter-spacing: 0.15em; margin-bottom: 20px; display: block; border-left: 4px solid #1a1a1a; padding-left: 10px; }
.prof-list { list-style: none; padding: 0; }
.prof-item { display: grid; grid-template-columns: 120px 1fr; gap: 20px; margin-bottom: 15px; font-size: 15px; line-height: 1.6; border-bottom: 1px solid #eee; padding-bottom: 15px;}
.prof-item:last-child { border-bottom: none; }
.prof-date { font-family: monospace; color: #666; font-weight: normal; }
.prof-text { color: #1a1a1a; }

.prof-link {
    color: #1a1a1a; text-decoration: none; border-bottom: 1px solid #999;
    transition: all 0.2s;
}
.prof-link:hover {
    background: #1a1a1a; color: #fff; border-bottom-color: #1a1a1a;
}

/* =========================================
   Stage 3: Concept Section
   ========================================= */
#concept-section {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh; z-index: 10;
    pointer-events: none;
    display: flex; justify-content: center; align-items: center;
    opacity: 0; transition: opacity 0.8s ease;
}

.concept-inner {
    position: relative; overflow: hidden;
    text-align: center; max-width: 620px; padding: 70px 50px;
    pointer-events: none;
    background: var(--white-egg);
    border-radius: 60% 40% 70% 30% / 50% 60% 40% 50%;
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.05),
        inset 0 -10px 20px rgba(255, 255, 255, 1),
        inset 0 5px 15px rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    transform: translateY(50px) scale(0.9); opacity: 0;
    transition: all 1.0s cubic-bezier(0.16, 1, 0.3, 1);
}

.concept-inner::before {
    content: ''; position: absolute;
    top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 30vmin; height: 30vmin;
    max-width: 400px; max-height: 400px;
    background-color: var(--yolk-color);
    border-radius: 50%; z-index: 0;
}

#concept-section h2 { 
    position: relative; z-index: 1; font-size: 32px; font-weight: 800; margin-bottom: 30px; letter-spacing: 0.05em; color: var(--text-main); text-align: center; width: 100%;
}
#concept-section h3 { position: relative; z-index: 1; font-size: 18px; margin-bottom: 20px; color: var(--text-sub); letter-spacing: 0.1em; }
#concept-body { position: relative; z-index: 1; font-size: 15px; line-height: 2.2; margin-bottom: 40px; color: #333; text-align: center; display: inline-block; }

.concept-footer { position: relative; z-index: 1; margin-top: 30px; }
.back-btn { display: inline-block; padding: 12px 30px; border: 1px solid var(--text-main); color: var(--text-main); text-decoration: none; font-weight: 700; font-size: 12px; letter-spacing: 0.1em; transition: all 0.3s ease; pointer-events: auto; }
.back-btn:hover { background: var(--text-main); color: #fff; }


/* =========================================
   STATE MANAGEMENT
   ========================================= */
body.mode-profile #canvas-container { transform: scale(0.95); opacity: 0.4; filter: blur(8px); }
body.mode-profile #profile-section { opacity: 1; pointer-events: auto; transform: translateY(0); }
body.mode-profile #ui-guide { opacity: 0; }

body.mode-concept #canvas-container { transform: scale(0.6); opacity: 0.15; filter: blur(0px); }
body.mode-concept #concept-section { opacity: 1; }
body.mode-concept .concept-inner { opacity: 1; transform: translateY(0) scale(1.0); pointer-events: auto; }
body.mode-concept #ui-guide { opacity: 0; }


/* =========================================
   Mobile
   ========================================= */
@media (max-width: 768px) {
    #ui-guide { display: none; }
    #stage-nav { bottom: 20px; right: 20px; gap: 15px; }
    .stage-btn { font-size: 16px; }
    
    .profile-inner { width: 85%; padding: 40px 25px; max-height: 70vh; }
    .prof-name-ja { font-size: 28px; }
    .prof-item { grid-template-columns: 1fr; gap: 5px; margin-bottom: 20px; }
    .prof-date { font-size: 12px; opacity: 0.7; }
    
    .concept-inner { width: 90%; padding: 60px 30px; }
    .concept-inner::before { width: 220px; height: 220px; opacity: 0.9; }
    #concept-section h2 { font-size: 24px; margin-bottom: 20px; }
}