body {
    font-family: "zen-kaku-gothic-new", sans-serif;
    font-weight: 700;
    font-style: normal;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 40px 20px;
    border-bottom: 3px solid #000;
}

h2 {
    font-size: xx-large;
}

.logo {
    font-size: larger;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 40px;
    padding: 0;
    margin: 0;
}

nav li {
    font-size: larger;
}

nav a {
    text-decoration: none;
    color: black;
}

nav a:hover {
    color: #ff6347; /* ホバー時にオレンジ色に変わる */
}

section {
    padding: 20px;
    gap: 100px;
    font-size: larger;
}

#top {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    border-bottom: 3px solid #000;
}

#top .text {
    display: flex;
    flex-direction: column;
}

#top p {
    font-size: xx-large;
    margin: 0;
    margin-left: 19px;
}

.top-img {
    width: 70%;
    height: auto;
    border: 3px solid #333;
}

#work, #profile, #skill {
    margin-bottom: 40px;
}

.works {
    display: flex;
    justify-content: center;
    gap: 10%; /* 画像間のスペース */
    width: 100%;
    flex-wrap: wrap; /* 画面が狭いときに自動で折り返す */
}

.works-img {
    border-radius: 15px; /* 画像の角を丸くする */
    width: 250px;
    height: auto;
    border: 3px solid #333;
}

.works a {
    text-decoration: none; /* リンクの下線を削除 */
    color: inherit; /* 文字の色を親要素から継承 */
    transition: opacity 0.3s ease;
}

.works a:hover {
    opacity: 0.7; /* ホバー時に少し透明にする */
}

.profile {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.profile-img {
    width: 350px;
    height: 350px;
    border-radius: 50%;
    border: 3px solid #333;
}

.profile-text h1 {
    font-size: 4.5rem;
    margin: 0;
    text-align: center;
}

.profile-text p {
    font-size: 1.2rem;
    margin-top: 10px;
    text-align: center;
}

.profile-description {
    margin-top: 40px;
    font-size: 1.1rem;
    line-height: 1.6;
    text-align: justify;
    color: #333;
    max-width: 850px;
    margin-left: auto;
    margin-right: auto;
}

#skill ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

#skill ul li {
    flex: 1 1 200px;
    background-color: #f0f0f0;
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 10px; 
    text-align: center; 
}

@media (max-width: 768px) {
    #top {
        flex-direction: column;
        align-items: center;
    }

    .top-img {
        width: 90%;
        max-width: none;
    }

    .profile {
        flex-direction: column;
        align-items: center;
    }

    .profile-img {
        width: 300px;
        height: auto;
    }

    .profile-text {
        text-align: center;
    }

    .profile-description {
        margin-left: auto;
        margin-right: auto;
        max-width: 90%;
    }

    .works {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .works-img {
        width: 80%;
    }
}