@charset "utf-8";
/*
共通
*/
:root {
    --main-color:#FFF; 
    --black: #24292e;
    scroll-behavior: smooth;
}
body{    
    font-family: "Times New Roman", "YuMincho", "Hiragino Mincho ProN", "Yu Mincho", "MS PMincho", serif;
    color: var(--black);
}

body,h1,h2,h3,p,ul,figure{
    margin: 0;
    padding: 0;
}

ul{
    list-style-type: none;
}

img{
    max-width: 100%;
    vertical-align: bottom;
}

a{
    text-decoration: none;
    color: var(--black);
}

/*
トップ
*/

#contents{
    max-width: 1440px;
    margin: 0 auto; 
    min-width: 320px;
}

header,main{
    max-width: 860px;
    padding: 0 50px;
    margin: 0 auto; 
}
header{
    height: 170px;  
    display: flex;
    justify-content:space-between;
    align-items: center;
}
.main-title{

    height: 35px;

}
nav{

    width: 400px;
    height: 35px;
}
nav ul{
    display: flex;
}
nav ul li{

    width: calc(100% / 3);
    line-height: 35px;
}
nav ul li a{
    display: block;
    text-align: center;
}
nav ul li a:hover{
    opacity: 0.8;
}


.navbtn {
	padding: 0;
	outline: none;
	border: none;
	background: transparent;
	cursor: pointer;
	color: #aaaaaa;
	font-size: 30px;
    display: none;
}

.mainvisual{
    text-align: center;
    margin-bottom: 80px;
}
.mainvisual img{
    object-fit: cover;
    min-height: 420px;
}
h2{
    font-size: 24px;
    height: 70px;
    text-align: center;
}
#apps{
        margin-top: 130px;
    padding-bottom: 20px;
}
.apps-wrapper{
    display: grid;
    grid-template-columns: repeat(2,1fr);
    column-gap: 25px;
    row-gap: 30px;
}

/* figureの修正 */
figure{

    /* 新規追加: 影と相対配置 */
    position: relative;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); /* 影の追加 */
    transition: box-shadow 0.3s ease; /* ホバー効果のためのトランジション */
}

figure:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25); /* ホバー時の影を濃くする */
}
/* figure img は a要素の子になったので、max-width: 100% を継承。a要素にdisplay: block;を設定し、画像が枠いっぱいに表示されるようにします。*/
figure a {
    display: block;
    width: 100%;
    height: 100%;
    position: relative; /* captionを重ねるための相対配置 */
}
/* アプリケーションの文字を画像に重ねるためのスタイル */
.app-caption {
    position: absolute;
    top: 2rem;
    left: 2rem;
    width: 100%;
    padding: 5px 0;
    /*background-color: rgba(0, 0, 0, 0.6); 
    color: var(--main-color); 
    text-align: center;
    font-size: 14px;
     opacity: 0; 最初は非表示
    transition: opacity 0.3s ease; */

}
.app-caption h3{
        width: 45%;
        padding-bottom: 0.4rem;
        margin-bottom: 0.8em;
    border-bottom: #999 2px solid;
}
.app-caption p{
    width: 45%;
    aspect-ratio: 1/1;
}
/* モーダルウィンドウのスタイル */
.modal-window {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* 背景のオーバーレイ */
    display: none; /* 初期状態では非表示 */
    justify-content: center;
    align-items: center;
    z-index: 200; /* ヘッダーより上に表示 */
    overflow-y: auto; /* コンテンツがはみ出た場合にスクロール可能にする */
}

/* モーダルコンテンツのスタイル */
.modal-content {
    background-color: var(--main-color);
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    /* 画面幅が小さいときのための調整 */
    margin: 20px auto; 
}
.modal-content section{
    width: 45%;
    z-index: 10;
    color: #24292e;
    position: absolute;
}
.modal-content dt{
    font-weight: bold;
    padding-top: 0.3em;
}
.modal-content a{
    color:#0693e3;
    
}

.modal-content h3 {
    margin-bottom: 20px;
    text-align: center;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.modal-content img {
    width: 100%;
    height: auto;
    display: block;
    margin: 20px 0;
    position: relative
}

/* 閉じるボタンのスタイル */
.modal-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    border: none;
    background: transparent;
    font-size: 24px;
    cursor: pointer;
    color: var(--black);
}

/* モーダルが表示されている状態 (JavaScriptでこのクラスを付与/削除します) */
.modal-open {
    display: flex;
}

.abouts-text{
    height: 350px;
}
.skills-title{
    margin-top: 130px;
}
.skills-text{
    height: 200px;
}
.abouts-text,.skills-text{
    padding: 30px;
    background-color: #eee;
    text-align: center;
    line-height: 2;
}
footer{
    margin-top: 130px;
    height: 35px;
    text-align: center;
    background-color: #999;
}
footer small{
    color: var(--main-color);
    line-height: 35px;
}


/* 画面幅が767px以下の時の設定
    (スマートフォンの時)
*/
@media (max-width: 767px) {
    header{
        padding: 0 8px;
        height: 120px;
        /* justify-content: space-evenly; */
    }
    main{
        padding: 0 8px;
    }
    .nav{
        position: fixed;
        top:0;
        left: 100%;
        width: 100%;
        height: 100%;
        z-index: 100;
        background-color: rgba(0,0,0,0.8);
        transition: transform 0.3s;
    }
    .open .nav{
        transform: translate(-100%,0);
    }
     .open body{
        position: fixed;
        overflow: hidden;
    } 
    .nav ul{
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        height: 100%;
        gap: 40px;
        
    }
    .nav ul li a{
        color: #FFF;
    }
    .navbtn {
        display: revert;
    }
    .open .navbtn {
        z-index: 110;
        color: #ffffff;
    }
    
    .navbtn .fa-bars {
        display: revert;
    }
    .open .navbtn .fa-bars {
        display: none;
    }
    
    .navbtn .fa-times {
        display: none;
    }
    .open .navbtn .fa-times {
        display: revert;
    }

    h2{
        height: 50px;
    }
    .mainvisual{
        margin-bottom: 50px;
    }
    #apps{
        padding-bottom: 0;
    }
    .apps-wrapper{  
        grid-template-columns: 1fr;
        gap:30px;
        justify-items: center;
    }
    .abouts-title,.skills-title{
        margin-top: 70px;
    }
    footer{
        margin-top: 70px;
    }
    .modal-content {
        padding: 15px;
    }
    .modal-content section{
        font-size: 0.8em;
    }
    .modal-content dd{
        margin-inline-start: 5px;
    }
}