/* =========================================
   Green Background Wrap (after video → contact)
   ========================================= */

#greenBgWrap {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: linear-gradient(
        to bottom,
        rgba(228, 245, 210, 0.97) 0%,
        rgba(208, 235, 186, 0.94) 42%,
        rgba(186, 222, 160, 0.91) 74%,
        rgba(166, 210, 138, 0.88) 100%
    );
}

/* canvas より前面にセクションを出す */
#greenBgWrap > section {
    position: relative;
    z-index: 1;
}

/* ラッパー内のセクション背景を透明にして canvas を透過させる */
#greenBgWrap .bg-light {
    background-color: transparent !important;
}

/* Canvas背景を hero-intro / skills / projects / career / blog / about まで見えるようにする */
#greenBgWrap .hero-intro-card {
    background: linear-gradient(140deg, rgba(248, 253, 244, 0.82) 0%, rgba(224, 241, 205, 0.78) 55%, rgba(191, 224, 159, 0.72) 100%);
    box-shadow: 0 20px 44px rgba(8, 72, 39, 0.2);
    backdrop-filter: blur(6px) saturate(1.04);
    -webkit-backdrop-filter: blur(6px) saturate(1.04);
}

#greenBgWrap .hero-intro-link {
    background-color: rgba(248, 253, 244, 0.62);
}

#greenBgWrap .hero-intro-link:hover {
    background-color: rgba(234, 247, 221, 0.78);
}

#greenBgWrap .front-card {
    background: linear-gradient(135deg, rgba(226, 243, 48, 0.76) 0%, rgba(0, 102, 0, 0.76) 100%);
}

#greenBgWrap .back-card {
    background: linear-gradient(135deg, rgba(205, 71, 34, 0.76) 0%, rgba(148, 25, 186, 0.76) 100%);
}

#greenBgWrap .database-card {
    background: linear-gradient(135deg, rgba(48, 178, 243, 0.76) 0%, rgba(183, 210, 46, 0.76) 100%);
}

#greenBgWrap .infra-card {
    background: linear-gradient(135deg, rgba(120, 25, 133, 0.76) 0%, rgba(0, 102, 0, 0.76) 100%);
}

#greenBgWrap .other-card {
    background: linear-gradient(135deg, rgba(151, 201, 14, 0.76) 0%, rgba(170, 13, 79, 0.76) 100%);
}

#greenBgWrap .os-card {
    background: linear-gradient(135deg, rgba(55, 4, 66, 0.76) 0%, rgba(151, 136, 7, 0.76) 100%);
}

#greenBgWrap .libraries-card {
    background: linear-gradient(135deg, rgba(63, 12, 202, 0.76) 0%, rgba(202, 219, 43, 0.76) 100%);
}

#greenBgWrap .aws-card {
    background: linear-gradient(135deg, rgba(19, 201, 89, 0.76) 0%, rgba(25, 43, 204, 0.76) 100%);
}

#greenBgWrap .skill-item {
    background: rgba(248, 252, 246, 0.72);
}

#greenBgWrap #projects .card {
    background: linear-gradient(180deg, rgba(247, 252, 243, 0.84) 0%, rgba(233, 246, 224, 0.82) 100%);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

#greenBgWrap .career-card {
    background: linear-gradient(170deg, rgba(248, 253, 244, 0.84) 0%, rgba(224, 241, 205, 0.78) 100%);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

#greenBgWrap #blog .card {
    background: rgba(242, 252, 239, 0.74);
    backdrop-filter: blur(5px) saturate(1.03);
    -webkit-backdrop-filter: blur(5px) saturate(1.03);
}

#greenBgWrap #projects {
    background: transparent !important;
    isolation: auto;
}

#greenBgWrap #projects::before,
#greenBgWrap #projects::after {
    display: none;
}

/* =========================================
   Contact Section
   ========================================= */

#greenBgWrap > .contact-komorebi-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.98;
    filter: saturate(1.08) contrast(1.03) brightness(1.02);
}

#contact {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

#contact .container {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

#contact h2 {
    margin: 0 auto 3rem auto;
    color: #1a4a28;
    font-weight: 800;
    letter-spacing: 1px;
    position: relative;
    display: table;
    text-shadow: 0 4px 16px rgba(255, 255, 255, 0.5);
}

/* アンダーライン装飾 */
#contact h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 72px;
    height: 4px;
    background: linear-gradient(to right, #9bf7dd, #4fd7ff, #8effc2);
    border-radius: 2px;
    box-shadow: 0 0 20px rgba(143, 255, 227, 0.55);
}

#contactForm {
    background: linear-gradient(180deg, rgba(243, 255, 250, 0.9) 0%, rgba(225, 248, 236, 0.84) 100%);
    padding: 3rem;
    border-radius: 24px;
    box-shadow: 0 30px 85px rgba(2, 28, 38, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(135, 237, 211, 0.5);
    backdrop-filter: blur(10px) saturate(1.22);
    -webkit-backdrop-filter: blur(10px) saturate(1.22);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

#contactForm:hover {
    transform: translateY(-6px);
    box-shadow: 0 34px 90px rgba(2, 28, 38, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.form-label {
    font-weight: 600;
    color: #235f4f;
    margin-bottom: 0.6rem;
    font-size: 0.95rem;
    display: block;
    transition: color 0.3s ease;
}

/* 入力フィールドフォーカス時にラベルの色も変える */
.mb-3:focus-within .form-label {
    color: #0da678;
}

.form-control {
    background-color: rgba(246, 255, 250, 0.92);
    border: 2px solid rgba(34, 164, 126, 0.24);
    border-radius: 12px;
    padding: 0.9rem 1.2rem;
    font-size: 1rem;
    color: #2d3748;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-control:focus {
    background-color: #f4fffa;
    border-color: #0da678;
    box-shadow: 0 0 0 4px rgba(13, 166, 120, 0.16);
    outline: none;
}

.form-control::placeholder {
    color: #a0aec0;
    font-size: 0.95rem;
}

/* テキストエリアのリサイズ制御 */
textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.btn-send {
    width: 100%;
    padding: 1.1rem;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 12px;
    letter-spacing: 1.5px;
    margin-top: 1.5rem;
    text-transform: uppercase;
    color: white;
    background: linear-gradient(130deg, #17b582, #16a34a, #1f9fc5, #17b582);
    background-size: 200% auto;
    border: none;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 8px 20px rgba(8, 83, 79, 0.34);
}

.btn-send:hover {
    background-position: right center;
    transform: translateY(-2px);
    box-shadow: 0 11px 28px rgba(8, 83, 79, 0.46);
}

.btn-send:active {
    transform: translateY(1px);
    box-shadow: 0 3px 12px rgba(8, 83, 79, 0.32);
}

/* レスポンシブ調整 */
@media (max-width: 768px) {
    #contact {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    #greenBgWrap > .contact-komorebi-canvas {
        opacity: 0.94;
    }

    #contactForm {
        padding: 2rem 1.5rem;
    }

    .btn-send {
        padding: 0.9rem;
        font-size: 1.1rem;
    }
}

/* Custom Menu Modal Styles */
body.modal-open {
    padding-right: 0 !important;
}

#customMenuModal .modal-dialog {
    max-width: 400px;
    margin: 3rem auto;
    width: 90%;
}

#customMenuModal .modal-content {
    background: linear-gradient(180deg, rgba(80, 200, 100, 0.4) 0%, rgba(22, 163, 74, 0.4) 100%);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

#customMenuModal .modal-body {
    padding: 3rem 2rem;
}

#customMenuModal .nav-link {
    color: white !important;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding: 0.5rem 0;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, text-shadow 0.2s ease;
    white-space: nowrap;
}

#customMenuModal .nav-link:last-child {
    margin-bottom: 0;
}

#customMenuModal .nav-link:hover {
    transform: scale(1.05);
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#customMenuModal .nav-link i {
    font-size: 1.2em;
    vertical-align: -0.15em;
    margin-right: 10px !important;
}

/* Language switch specific */
#customMenuModal .form-check-label {
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 0.5px;
}

#customMenuModal .form-check-input {
    width: 3em;
    height: 1.5em;
    margin-right: 0.5em;
}
