html {
    background-color: #010E1C;
    height: 100%;
}

body {
    font-family: 'Helvetica Neue', Arial, "M PLUS Rounded 1c", sans-serif;
    line-height: 1.6;
    color: #e0e0e0;

    background-color: transparent;
    max-width: 980px;
    margin: 40px auto;
    padding: 20px;

    /* 背景の設定 */
    background-size: auto;
    background-repeat: repeat;
    background-position: top left;
    background-attachment: fixed;
}


#bg-overlay {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.95) 100%);
pointer-events: none;
z-index: -100;
}

.menu-toggle {
    position: fixed;
    top: 20px;
    left: 25px;
    font-size: 28px;
    color: #F4B002;
    cursor: pointer;
    z-index: 2000;
    user-select: none;
    background: rgba(1, 14, 28, 0.8);
    padding: 10px 15px;
    border-radius: 6px;
}

.side-menu {
    position: fixed;
    top: 0;
    left: -360px;
    width: 360px;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    padding-top: 100px;
    transition: all 0.3s ease;
    z-index: 1500;
}

.side-menu.open {
    left: 0;
}

.side-menu ul {
    list-style: none;
    padding: 0;
}

.side-menu li {
    padding: 15px 20px;
}

.side-menu a {
    text-decoration: none;
    color: #F4B002;
    font-size: 20px;
}

.side-menu a.active-page {
    background-color: #B30404;
    color: #ffffff !important;
    font-weight: bold;
    display: block;
    padding: 10px 15px;
    border-radius: 5px;
}

/* ヘッダー・見出し */
.header-img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    margin-bottom: 20px;
}

<h1> {
    color: #F4B002;
    border-bottom: 2px solid #F4B002;
    padding-bottom: 10px;
    text-align: center;
}

<h2> {
    color: #F4B002;
    border-left: 4px solid #F4B002;
    padding-left: 10px;
    margin-top: 30px;
}

.avatar-section {
    margin-top: 30px;
}

.avatar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.avatar-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 14px;
    border: 1.3px solid rgba(244, 176, 2, 0.5);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.avatar-card:hover {
    transform: translateY(-5px);
    box-shadow: 0px 6px 8px rgba(244, 176, 2, 0.5);
}

.avatar-name {
    font-size: 18px;
    font-weight: bold;
    color: #F4B002;
    margin-bottom: 10px;
}

.avatar-card img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-radius: 10px;
}

.sns-icons-row img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    padding: 6px;
    border: 1px solid rgba(244, 176, 2, 0.2);
    transition: transform 0.2s ease;
}

.sns-icons-row img:hover {
    transform: scale(1.12);
}

/* ==========================================
 * フォトギャラリー グリッド＆カードデザイン
 * ========================================== */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.photo-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(244, 176, 2, 0.2);
    padding: 10px;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), border-color 0.3s ease;
}

.photo-card:hover {
    transform: translateY(-6px) scale(1.02);
    border-color: rgba(244, 176, 2, 0.6);
}

.photo-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

/* ==========================================
 * モーダルライトボックス 3Dフリップアニメーション
 * ========================================== */
.photo-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(1, 14, 28, 0.9);
    z-index: 3000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.photo-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* 3D空間の定義 */
.overlay-card-container {
    width: 90%;
    max-width: 800px;
    height: 80vh;
    perspective: 1500px;
}

/* 回転するカード本体 */
.overlay-card {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform: rotateY(0deg);
}

/* トリガーが引かれたら180度反転 */
.overlay-card.flipped {
    transform: rotateY(180deg);
}

.overlay-front, .overlay-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 表面（最初に見えている透明な側） */
.overlay-front {
    background: transparent;
    z-index: 2;
    transform: rotateY(0deg);
}

/* 裏面（ひっくり返って現れる写真） */
.overlay-back {
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(244, 176, 2, 0.4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    padding: 10px;
    transform: rotateY(180deg);
}

.overlay-back img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 10px;
}

/* ==========================================
 * プロフィールの使用ソフト表示
 * ========================================== */
.software-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
}

.software-icon {
    width: 90px;
    height: 90px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px;
    border-radius: 12px;
    border: 1px solid rgba(244, 176, 2, 0.2);
    transition: transform 0.2s ease;
}

.software-icon:hover {
    transform: scale(1.08);
}

/* スマホ向け（小さめ） */
@media (max-width: 820px) {
    .software-icon {
        width: 70px;
        height: 70px;
    }
}

/* ==========================================
 * スマホ向けレスポンシブ設定 (820px以下)
 * ========================================== */
@media (max-width: 820px) {
    .menu-toggle {
        left: 50%;
        transform: translateX(-50%);
        font-size: 30px;
    }

    .side-menu {
        width: 100%;
        left: 0;
        top: -100%;
        height: auto;
        padding-bottom: 40px;
        transition: top 0.3s ease;
    }

    .side-menu.open {
        top: 0;
        left: 0;
    }

    body {
        padding-top: 80px;
    }

    .avatar-grid {
        grid-template-columns: 1fr;
    }

    .sns-icons-row img {
        width: 50px;
        height: 50px;
    }

    /* スマホ用ギャラリー調整 */
    .photo-grid {
        grid-template-columns: 1fr;
        padding: 0 10px;
    }

    .overlay-card-container {
        height: 60vh; /* スマホでは高さをやや控えめにして見やすく */
    }
}
