/*  フォントの種類とベースとなる文字サイズの設定 */
body { 
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Meiryo", sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: #2d3748;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased; /* MacやiPhoneで文字をクッキリ滑らかに見せる */
    -moz-osx-font-smoothing: grayscale;
}


h2, h3 {
    color: #1a252f; 
    letter-spacing: 0.03em; 
}

/*---------------紹介文-------------------*/
.explanation {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 1.2s ease, transform 1.2s ease;

    /*文字の設定*/
    font-size: 1rem;
    line-height: 1.8;
    color: #4a5568; 
    max-width: 700px;
    margin: 0 auto 30px auto; 
}

.explanation.is-show {
    /*JavaScript*/
    opacity: 1;
    transform: translateY(0);
}






/*-------------------背景--------------------*/
.gallery-section {
    width: 100%;
    min-height: 100vh;

    /*背景*/
    background-image: url('../img/profile2.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;

    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 10px;
    box-sizing: border-box;
}

/*中央の白いプロフィールカード*/
.gallery-card {
    width: 100%;
    max-width: 1000px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);/*後ろのレモンをぼかす*/
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 24px;
    padding: 50px 35px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.03);
    text-align: center;
    color: #1a252f;
    box-sizing: border-box;
}


/*------------------------ギャラリー一覧--------------------------*/

.gallery-stack {
    display: flex;
    flex-direction: column;/*縦に積み重ねる*/
    gap: 40px;
    margin-top: 40px;
    width: 100%;
    align-items: center;
}

.project-card {
    display: flex;
    gap: 40px;
    background: rgba(255, 255, 255, 0.55);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
    text-align: left;
    transition: transform 0.3s ease;

    /*JavaScript*/
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 1.0s ease, transform 1.0s ease;


    width: 100%;
    max-width: 900px;
    box-sizing: border-box;
}

.project-card.is-show {
    opacity: 1;
    transform: translateY(0);
}
.project-card.is-show:hover {
    transform: translateY(-3px);
}




.project-card:hover {
    transform: translateY(-3px);
}

/*泡のように動く画像エリア*/
.bubble-thumb {
    width: 350px;
    height: 250px;
    flex-shrink: 0;
    overflow: hidden;
    border: 1px solid rgb(225, 225, 225);
    /*泡の形に変形させアニメーションを追加*/
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    animation: bubble-move 5s ease-in-out infinite;
    box-shadow: 0 10px 25px rgba(0,  0, 0, 0.08);
}

.bubble-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

/*右側テキストエリア*/
.project-info {
    flex-grow: 1;
}

.project-info h3 {
    margin: 0 0 12px 0;
    font-size: 1.4rem;
    color: #1a252f;
}

.project-info .desc {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #4a5568;
    margin-bottom: 15px
}

/*-----------------------------------------使用言語--------------------------------------------*/
.project-info .languages {
    font-size: 0;
    margin: 20px 0 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.project-info .languages span {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #4a5568;
    background: rgba(0, 0, 0, 0.05);
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.03);
    transition: all 0.2s ease;
}

/*------------------------------------------ボタン--------------------------------------------------------*/
.btn-area {
    margin-top: 25px;
    display: flex;
    justify-content: flex-start;
}

/* ボタン本体のデザイン */
.view-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
    text-decoration: none;
    
    /* 背景：爽やかなブルー〜エメラルドのグラデーション（少し透け感あり） */
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.85), rgba(46, 204, 113, 0.85));
    border-radius: 50px; /* 丸みのあるボタン */
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.2);
    transition: all 0.3s ease;
}

/* ボタンにマウスを乗せた時（ホバー）の演出 */
.view-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
    background: linear-gradient(135deg, rgba(52, 152, 219, 1), rgba(46, 204, 113, 1)); /* 透け感をなくしてくっきり */
}

/* 矢印アニメーション */
.view-btn:hover .arrow {
    transform: translateX(4px);
    transition: transform 0.3s ease;
}

.view-btn .arrow {
    transition: transform 0.3s ease;
    display: inline-block;
}


/*------------------------------------偶数番目のカードだけ左右反転にするCSS------------------------------*/
/*画像とテキストの並びを逆にする*/
.project-card:nth-child(even) {
    flex-direction: row-reverse;
}
/*偶数番目の泡だけ違うアニメーション*/
.project-card:nth-child(even) .bubble-thumb {
    animation: bubble-move-even 6s ease-in-out infinite;
}
/*偶数番目のカードの時、タグも右詰め*/
.project-card:nth-child(even) .project-info .languages {
    justify-content: flex-end;
}
/* 偶数番目のカードの時は、ボタンを右寄せにする */
.project-card:nth-child(even) .btn-area {
    justify-content: flex-end;
}




/* --------------------------------泡がウネウネと形を変えるアニメーション（Keyframes） ------------------------------*/
/* 奇数番目の動き */
@keyframes bubble-move {
    0% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
    50% {
        border-radius: 40% 60% 60% 40% / 50% 40% 60% 50%;
    }
    100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
}

/* 偶数番目の動き（歪み方の数値を完全に逆にしています） */
@keyframes bubble-move-even {
    0% {
        border-radius: 40% 60% 70% 30% / 50% 60% 40% 50%;
    }
    50% {
        border-radius: 65% 35% 40% 60% / 60% 45% 55% 40%;
    }
    100% {
        border-radius: 40% 60% 70% 30% / 50% 60% 40% 50%;
    }
}

/*----------------------------------------戻るボタン---------------------------------*/
.return {
    margin-top: 20px;
    margin-bottom: 20px;
    display: block;
}

.return a {
    display: flex;
    justify-content: center;
    align-items: center;

    width: 80px;
    height: 32px;
    margin: 0 auto;
    border: 1px solid #7f8c8d;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.85rem;
    letter-spacing: 0.05em;

    transition: all 0.3s ease;
}

.return a:hover {
    background-color: #7f8c8d;
    color: #ffffff
}



/*-------------------------------- スマホ対応（画面幅が狭いときは縦並びにする） -------------------------------*/
@media (max-width: 650px) {
    .project-card,
    .project-card:nth-child(even) {
        flex-direction: column; /* スマホでは上画像、下テキストにする */
        gap: 20px;
        padding: 20px;
        text-align: center;    /* スマホ時は中央寄せが綺麗 */
    }
    .bubble-thumb{
        width: 200px;
        height: 200px;
        margin: 0 auto;
    }
    .project-info h3 {
        font-size: 1.2rem;
    }
    .project-info .languages,
    .project-card:nth-child(even) .project-info .languages {
        justify-content: center;
    }
    .btn-area,
    .project-card:nth-child(even) .btn-area {
        justify-content: center;
        margin-top: 15px;
    }
    .btn-area:first-of-type{
        margin-top: 25px;
    }
    .view-btn {
        width: 100%;           
        max-width: 280px;  
        justify-content: center;
        padding: 12px 20px;
        font-size: 0.85rem;
    }
}


/*バナー調整*/
img, 
iframe, 
ins {
    max-width: 100% !important;
    height: auto !important;
}