.skill-category {
    color: white;
    padding: 20px;
    border-radius: 10px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.front-card {
    background: linear-gradient(135deg, #e2f330 0%, #006600 100%);
}

.back-card {
    background: linear-gradient(135deg, #cd4722 0%, #9419ba 100%);
}

.database-card {
    background: linear-gradient(135deg, #30b2f3 0%, #b7d22e 100%);
}

.infra-card {
    background: linear-gradient(135deg, #781985 0%, #006600 100%);
}

.other-card {
    background: linear-gradient(135deg, #97c90e 0%, #aa0d4f 100%);
}

.os-card {
    background: linear-gradient(135deg, #370442 0%, #978807 100%);
}

.libraries-card {
    background: linear-gradient(135deg, #3f0cca 0%, #cadb2b 100%);
}

.aws-card {
    background: linear-gradient(135deg, #13c959 0%, #192bcc 100%);
}


.skill-title {
    font-size: 2rem;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 5px;
}

.skill-items {
    margin-top: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
}

.skill-item {
    width: 90%;
    margin-bottom: 14px;
    display: flex;
    align-items: flex-start;
    color: #183624;
    background: rgba(248, 252, 246, 0.9);
    border: 1px solid rgba(22, 94, 49, 0.22);
    border-radius: 12px;
    padding: 10px 12px;
    box-shadow: 0 8px 16px rgba(12, 61, 31, 0.08);
}

.skill-info {
    flex: 1;
    min-width: 0;
}

.skill-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.skill-exp-badge {
    display: inline-block;
    font-size: clamp(0.74rem, 0.1vw + 0.72rem, 0.8rem);
    background: rgba(21, 79, 42, 0.12);
    border: 1px solid rgba(21, 79, 42, 0.3);
    color: #143622;
    border-radius: 20px;
    padding: 1px 9px;
    white-space: nowrap;
    font-weight: 700;
    line-height: 1.4;
}

.skill-desc {
    font-size: clamp(0.8rem, 0.16vw + 0.76rem, 0.88rem);
    margin: 4px 0 0;
    opacity: 1;
    color: #244233;
    line-height: 1.48;
    min-height: calc(1.48em * 2);
}

.skill-item img {
    width: 32px;
    height: auto;
    margin-right: 10px;
}

.skill-item .skill-item-icon {
    width: 32px;
    margin-right: 10px;
    text-align: center;
    font-size: 1.16rem;
    color: #1e5f36;
    flex: 0 0 32px;
}

.skill-item h5 {
    margin: 0;
    font-size: clamp(0.95rem, 0.16vw + 0.92rem, 1.02rem);
    font-weight: 700;
    color: #173a24;
    line-height: 1.3;
}

img.rounded-circle {
    border-radius: 50%;
    width: 50%;
    height: auto;
}

.card-img-top {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.video-section {
    position: relative;
    text-align: center;
    color: white;
    margin-top: -1rem;
}

.video-section h2 {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    font-size: 3rem;
    white-space: nowrap;
    background:
        linear-gradient(to right, rgb(50, 214, 255), rgb(30, 52, 255)),
        linear-gradient(rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.65));
    -webkit-background-clip: text, padding-box;
    background-clip: text, padding-box;
    color: transparent;
    font-weight: bold;
    padding: 6px 14px;
    border-radius: 8px;
}

.video-container {
    position: relative;
    overflow: hidden;
    height: 90vh;
}

.video-container picture {
    display: block;
    width: 100%;
    height: 100%;
}

.video-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 15vh;
    background: linear-gradient(to bottom, transparent, #eaf3de);
    z-index: 1;
}

.video-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-intro-section {
    position: relative;
    padding: 2.5rem 0 3rem;
}

.hero-intro-container {
    max-width: 1100px;
}

@media (min-width: 992px) {
    .hero-intro-container {
        max-width: 920px;
    }
}

.hero-intro-card {
    position: relative;
    background: linear-gradient(140deg, rgba(248, 253, 244, 0.97) 0%, rgba(224, 241, 205, 0.96) 55%, rgba(191, 224, 159, 0.93) 100%);
    border: 1px solid rgba(22, 101, 52, 0.2);
    border-radius: 28px;
    box-shadow: 0 18px 42px rgba(9, 90, 45, 0.14);
    padding: 2.2rem 2.4rem;
    overflow: hidden;
}

.hero-intro-card::after {
    content: '';
    position: absolute;
    width: 260px;
    height: 260px;
    top: -130px;
    right: -80px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(31, 140, 72, 0.22) 0%, rgba(31, 140, 72, 0) 72%);
    pointer-events: none;
}

.hero-intro-kicker {
    margin: 0 0 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    font-size: 0.9rem;
    color: #2f6b3e;
    text-transform: uppercase;
}

.hero-intro-role {
    margin: 0 0 1rem;
    font-size: clamp(1.55rem, 3.4vw, 2.4rem);
    line-height: 1.25;
    font-weight: 800;
    color: #12462a;
}

.hero-intro-strength {
    margin: 0 0 1rem;
    font-size: clamp(1.05rem, 2.2vw, 1.3rem);
    font-weight: 700;
    color: #1f5f35;
}

.hero-intro-description {
    margin: 0;
    max-width: 920px;
    font-size: 1.03rem;
    line-height: 1.8;
    color: #2d4032;
}

.hero-intro-research-cta {
    margin-top: 1.2rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
}

.hero-intro-research-label {
    display: inline-flex;
    align-items: center;
    padding: 0.34rem 0.78rem;
    border-radius: 999px;
    background: rgba(18, 70, 42, 0.12);
    border: 1px solid rgba(18, 70, 42, 0.2);
    color: #1a5934;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.hero-intro-research-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.56rem 1.02rem;
    border-radius: 999px;
    border: 1px solid rgba(9, 70, 38, 0.22);
    background: linear-gradient(130deg, #1d8b49 0%, #126436 100%);
    color: #f7fff8;
    font-size: 0.95rem;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(14, 94, 49, 0.23);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.hero-intro-research-link:hover {
    color: #f7fff8;
    filter: brightness(1.03);
    transform: translateY(-1px);
    box-shadow: 0 11px 22px rgba(11, 82, 42, 0.3);
}

.hero-intro-links {
    margin-top: 1.3rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}

.hero-intro-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.95rem;
    border-radius: 999px;
    border: 1px solid rgba(18, 70, 42, 0.28);
    background-color: rgba(248, 253, 244, 0.78);
    color: #12462a;
    font-weight: 700;
    font-size: 0.95rem;
    overflow-wrap: anywhere;
    transition: all 0.2s ease;
}

.hero-intro-link:hover {
    color: #12462a;
    border-color: rgba(18, 70, 42, 0.45);
    background-color: rgba(234, 247, 221, 0.95);
    transform: translateY(-1px);
}

.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(10, 96, 30, 0.2);
}

#projects .col-md-4 {
    display: flex;
}

#projects .row {
    row-gap: 1.5rem;
}

#projects .card {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    background: linear-gradient(180deg, rgba(247, 252, 243, 0.98) 0%, rgba(233, 246, 224, 0.98) 100%);
    border: 1px solid rgba(22, 163, 74, 0.2);
    box-shadow: 0 10px 26px rgba(14, 95, 46, 0.12);
}

@media (min-width: 768px) {
    #projects .card {
        min-height: 320px; /* PC・タブレットで高さを統一 */
    }
}

#projects .card-img-top {
    height: 240px;
}

#projects .card-title {
    min-height: 3.5rem; /* タイトルの行数による高さの差を解消 */
    display: flex;
    align-items: center;
}

#projects h2 {
    color: #1f5f35;
}

#projects .card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
}

#projects .card-text {
    flex: 0 0 auto;
    line-height: 1.7;
    margin-bottom: 0;
    position: relative;
    --project-card-clamp-lines: 3;
}

#projects .card-text.is-collapsed {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: var(--project-card-clamp-lines);
    line-clamp: var(--project-card-clamp-lines);
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: calc((var(--project-card-clamp-lines) * 1.7em) + 0.08em);
    flex: 0 0 auto;
    padding-bottom: 0.08em;
}

#projects .card-text.is-expanded {
    display: block;
    max-height: none;
    overflow: visible;
}

#projects .card-more-toggle {
    align-self: flex-start;
    margin-top: 0.35rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: #0f7a45;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: underline;
    cursor: pointer;
}

#projects .card-more-toggle:hover {
    color: #0b5d34;
}

#projects .project-tech-stack {
    margin-top: 0.8rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

#projects .project-tech-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.22rem 0.62rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.2;
    color: #0d5a2f;
    background: linear-gradient(135deg, rgba(220, 245, 224, 0.95) 0%, rgba(201, 236, 208, 0.95) 100%);
    border: 1px solid rgba(15, 107, 52, 0.28);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

#projects .project-card-footer {
    margin-top: auto;
    display: flex;
    justify-content: flex-end;
}

#projects .project-github-btn {
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #0f6b34;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(15, 107, 52, 0.28);
    text-decoration: none;
    box-shadow: 0 6px 14px rgba(15, 107, 52, 0.14);
    transition: transform 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

#projects .project-github-btn:hover {
    color: #ffffff;
    background: #0f6b34;
    border-color: #0f6b34;
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(15, 107, 52, 0.2);
}

#projects .project-github-btn i {
    font-size: 1.05rem;
    line-height: 1;
}

#projects .projects-extra-collapse,
#skills .skills-extra-collapse {
    margin-top: 0.35rem;
    overflow-anchor: none;
}

#projects .projects-toggle-btn,
#skills .projects-toggle-btn {
    min-width: 220px;
    border: 0;
    border-radius: 999px;
    padding: 0.65rem 1.15rem;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, #1a8e43 0%, #0f6b34 100%);
    box-shadow: 0 10px 24px rgba(14, 95, 46, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

#projects .projects-toggle-btn:hover,
#skills .projects-toggle-btn:hover {
    transform: translateY(-1px);
    opacity: 0.95;
    box-shadow: 0 12px 30px rgba(14, 95, 46, 0.26);
}

#projects .projects-toggle-btn:active,
#skills .projects-toggle-btn:active {
    transform: translateY(0);
}

#career {
    position: relative;
    padding-top: 4.5rem;
    padding-bottom: 4.5rem;
}

#career h2 {
    color: #1f5f35;
}

#career .career-intro {
    max-width: 860px;
    margin: 0 auto 2rem;
    color: #2f4737;
    line-height: 1.75;
    font-weight: 600;
}

.career-card {
    height: 100%;
    background: linear-gradient(170deg, rgba(248, 253, 244, 0.96) 0%, rgba(224, 241, 205, 0.9) 100%);
    border: 1px solid rgba(18, 126, 62, 0.25);
    border-radius: 22px;
    padding: 1.35rem 1.2rem 1.15rem;
    box-shadow: 0 12px 28px rgba(12, 95, 45, 0.12);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.career-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 34px rgba(12, 95, 45, 0.17);
}

.career-card-title {
    margin: 0 0 0.9rem;
    font-size: 1.15rem;
    font-weight: 800;
    color: #12462a;
    display: inline-flex;
    align-items: center;
}

.career-list {
    margin: 0;
    padding-left: 1.2rem;
    color: #2d4032;
}

.career-list li {
    margin-bottom: 0.7rem;
    line-height: 1.65;
}

.career-list li:last-child {
    margin-bottom: 0;
}

.career-list a {
    color: #0f7a45;
    text-decoration: underline;
}

.career-list code {
    color: #12462a;
    font-size: 0.9em;
}


.card-body {
    flex-grow: 1;
}

/*blogのiframeの部分*/
#blog .card {
    border-radius: 10px;
    transition: box-shadow 0.3s ease;
}

#blog .card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transform: none;
}

/* スマホ表示用のスタイル調整 */
@media screen and (max-width: 768px) {
    #blog .card {
        margin: 0.5rem auto;
        padding: 0.5rem;
        max-width: 98%;
    }

    #blog .custom-ratio {
        padding-top: 120% !important;/* ここ */
    }

    .hero-intro-section {
        padding: 2rem 0 2.4rem;
    }

    .hero-intro-card {
        border-radius: 22px;
        padding: 1.6rem 1.2rem;
    }

    .hero-intro-kicker {
        font-size: 0.84rem;
    }

    .hero-intro-description {
        font-size: 0.96rem;
        line-height: 1.75;
    }

    .hero-intro-research-cta {
        gap: 0.5rem;
    }

    .hero-intro-research-label,
    .hero-intro-research-link {
        width: 100%;
        justify-content: center;
    }

    .hero-intro-links {
        gap: 0.55rem;
    }

    .hero-intro-link {
        width: 100%;
    }

    .skill-item {
        padding: 9px 11px;
    }

    .skill-item h5 {
        font-size: 0.95rem;
    }

    .skill-exp-badge {
        font-size: 0.7rem;
    }

    .skill-desc {
        font-size: 0.82rem;
        line-height: 1.45;
        min-height: calc(1.45em * 2);
    }

    #career {
        padding-top: 3.2rem;
        padding-bottom: 3.2rem;
    }

    .career-card {
        padding: 1.15rem 1rem 1rem;
    }
}




/* ヘッダーの背景色をグラデーションに変更 */
#blog .blog-header {
    background: linear-gradient(45deg, #2de333, #2b24e4); /* 45度のグラデーション */
    font-size: 1.2rem;
    font-weight: bold;
    color: white; /* テキスト色を白に設定 */
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3); /* テキストの視認性向上 */
}

/* テキストの視認性を保つためのスタイリング */
#blog .blog-header h5 {
    margin: 0;
}

/* 比率調整スタイル */
#blog .custom-ratio {
    position: relative;
    width: 100%;
    padding-top: 60%; /* 比率調整 */
    overflow: hidden;
}

#blog .custom-ratio iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 0 0 10px 10px;
}

