/* 変数の定義 */
:root {
    --text-color: #333333;
    --primary-blue: #0890ff;
    /* 背景グラデーションの上に浮く要素には、半透明の白を使用 */
    --card-bg: rgba(255, 255, 255, 0.5);
}

body {
    margin: 0;
    padding: 0;
    /* 球体の発光に合わせて、中央から広がり全体に明るさを出す放射状グラデーション */
    background: radial-gradient(circle at 50% 50%, #4dd0e1 0%, #00838f 50%, #004d61 100%);
    background-attachment: fixed;
    /* スクロールしても背景を固定 */
    color: var(--text-color);
    font-family: 'Helvetica Neue', Arial, sans-serif;
    overflow-x: hidden;
}

/* ヘッダー */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    box-sizing: border-box;
    z-index: 100;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    /* すりガラス効果 */
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

header ul {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

header a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: bold;
}

/* ヘッダーロゴのサイズ調整 */
.header-logo {
    max-height: 40px;
    /* PC・スマホ共通でバランスの良い高さ */
    width: auto;
    /* 縦横比を維持 */
    display: block;
    /* 余分な隙間ができるのを防ぐ */
}

/* ヒーローセクション */
#hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

#webgl-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    filter: brightness(1.4);
}

/* 全体を覆う半透明の黒い幕 */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.0);
    /* 0, 0, 0, 0.4の一番右の数値が暗さを調整（0が透明、1が真っ黒） */
    z-index: 0;
    /* 球体(-1)と文字(1)の間に配置 */
    pointer-events: none;
    /* クリックやスクロールを邪魔しないようにする */
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    pointer-events: none;
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 10px;
    text-shadow: 0 4px 15px rgba(255, 255, 255, 0.9);
    /* 文字が見やすいように白の光彩 */
}

/* 汎用セクション設定 */
section {
    padding: 100px 20px;
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* ガラス調の半透明パネル（About, Skillsなどで共通使用） */
.glass-panel {
    background-color: var(--card-bg);
    backdrop-filter: blur(12px);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.6);
    /* スマホなどで文字が端に寄らないようにするための調整 */
    max-width: 800px;
    margin: 0 auto;
}

/* Skillsリストの箇条書きの見た目を調整 */
.skills-list {
    list-style-type: none;
    padding-left: 1.9rem;
    /* 0から1.2remに変更し、左側に美しい余白を作ります */
    line-height: 2;
}

/* 疑似要素を使って「・」を自動付与する仕組み */
.skills-list li::before {
    content: "・";
    color: #000000;
    /* 黒色に変更いただいた設定をキープ */
    font-weight: bold;
    margin-right: 8px;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 40px;
    text-align: center;
}

/* プロジェクトカード */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background-color: var(--card-bg);
    backdrop-filter: blur(12px);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.8);
    /* 境界線をうっすら白く */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 102, 255, 0.15);
}

.card-image {
    width: 100%;
    height: 200px;
    border-radius: 8px;
    margin-bottom: 20px;
    object-fit: cover;
    display: block;
}

.tech-stack {
    display: block;
    font-size: 0.9rem;
    color: var(--primary-blue);
    margin-bottom: 20px;
    font-weight: bold;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--text-color);
    color: #ffffff;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #555555;
}

/* ソーシャルリンクのコンテナ */
.social-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 20px;
}

/* 丸いガラス調ボタンの共通スタイル */
.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

/* ホバー（カーソルを合わせた時）のフワッと浮く動き */
.social-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 102, 255, 0.2);
}

/* noteボタン専用スタイル */
.note-btn {
    color: #000000;
}

.note-logo-text {
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", Arial, sans-serif;
    font-weight: 900;
    font-size: 1.3rem;
    letter-spacing: -0.5px;
}

/* Xボタン専用スタイル */
.x-btn {
    color: var(--text-color);
}

footer {
    text-align: center;
    padding: 40px;
    margin-top: 50px;
}

/* ==========================================
   レスポンシブ対応（スマホ表示用設定）
   ========================================== */
/* 通常時（PC）はハンバーガーボタンを隠す */
.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 24px;
    z-index: 101;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
}

/* 画面幅が768px以下の時の設定 */
@media screen and (max-width: 768px) {

    /* 1. トップの文字サイズをスマホに合わせて縮小 */
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1rem;
        padding: 0 15px;
    }

    /* 2. ヘッダーの余白を調整 */
    header {
        padding: 15px 20px;
    }

    /* 3. ハンバーガーボタンを表示 */
    .hamburger {
        display: flex;
    }

    /* 4. ナビゲーションメニューをスマホ用に変更（最初は隠す） */
    nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);

        /* 縦方向の並びにする */
        display: flex;
        flex-direction: column;

        /* アニメーションの準備（最初は高さゼロで隠す） */
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
    }

    /* メニューが開いた時の状態 */
    nav.active {
        max-height: 300px;
    }

    nav ul {
        flex-direction: column;
        padding: 20px 0;
        align-items: center;
        gap: 15px;
    }

    /* ハンバーガーボタンが押された時の「×」のアニメーション */
    .hamburger.active span:nth-child(1) {
        transform: translateY(10.5px) rotate(45deg);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-10.5px) rotate(-45deg);
    }
}

/* ==========================================
   プロジェクト詳細ページ (PromptDash等) 用スタイル
   ========================================== */
.project-detail-page {
    padding-top: 100px;
    /* ヘッダーの裏に隠れないように余白を取る */
}

.back-btn {
    background-color: transparent;
    border: 1px solid var(--text-color);
    color: var(--text-color);
}

.back-btn:hover {
    background-color: var(--text-color);
    color: #fff;
}

.project-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.project-hero {
    text-align: center;
    margin-bottom: 30px;
    padding: 60px 40px;
}

.project-hero h1 {
    font-size: 3rem;
    margin: 10px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    /* ロゴと文字の間の隙間 */
}

/* ロゴ画像のサイズ設定 */
.project-logo {
    height: 1em;
    /* h1の文字サイズ（3rem）と同じ高さに自動調整されます */
    width: auto;
}

.project-hero .subtitle {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-blue);
}

.project-body {
    padding: 50px;
}

.project-body h2 {
    font-size: 1.8rem;
    margin-top: 50px;
    margin-bottom: 25px;
    text-align: left;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 10px;
}

.intro-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 15px;
}

/* 4つの特長グリッド */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.feature-card {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.feature-card h3 {
    margin-top: 0;
    color: var(--primary-blue);
    font-size: 1.2rem;
}

.story-box {
    background: rgba(255, 255, 255, 0.2);
    padding: 25px;
    border-radius: 8px;
    font-style: italic;
}

.download-info {
    margin-top: 60px;
    text-align: center;
}

.specs {
    text-align: left;
    background: rgba(0, 0, 0, 0.1);
    padding: 20px;
    border-radius: 8px;
    margin: 20px auto;
    max-width: 500px;
}

.specs ul {
    margin-top: 10px;
    padding-left: 20px;
}

.download-btn-wrapper {
    margin-top: 30px;
}

.download-btn {
    font-size: 1.2rem;
    padding: 15px 40px;
    background-color: var(--primary-blue);
    border: none;
}

.download-btn:hover {
    background-color: #0044cc;
}

/* 詳細ページのスマホ対応 */
@media screen and (max-width: 768px) {
    .project-hero {
        padding: 40px 20px;
    }

    .project-hero h1 {
        font-size: 2rem;
    }

    .project-body {
        padding: 30px 20px;
    }
}

/* プロジェクト詳細ページのメイン画像 */
.project-main-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    /* うっすら影をつけて画面に浮かせる */
}