/*
Theme Name: Kou's Portfolio Theme
Author: Kou Harada
Description: ポートフォリオサイト用のオリジナルテーマです。
Version: 1.0
*/

/* スムーズスクロールを有効にする */
html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    color: #333;
    background-color: #f9f9f9;
    /* サイト全体の背景色を少しグレーに */
}

.container {
    max-width: 1100px;
    /* サイトの最大幅 */
    margin: 0 auto;
    /* 中央寄せ */
    padding: 0 20px;
    /* 左右に余白 */
}

/* --- ヘッダー --- */
.site-header {
    background-color: #00bfff;
    padding: 20px 0;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    text-decoration: none;
    font-size: 24px;
    font-weight: bold;
    color: #ffffff;
}

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px;
}

.main-navigation ul li a {
    text-decoration: none;
    color: #ffffff;
    font-weight: bold;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.main-navigation ul li a:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* --- ヒーローセクション --- */
.hero {
    background-image: url('images/hero-image.jpg');
    /* kou-theme/images/ にヒーロー画像を入れる */
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 150px 0;
}

.hero h1 {
    font-size: 68px;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.text-rainbow {
    position: relative;
    display: inline-block;
    color: #ffe98a;
    /* ベースは明るい黄色 */
    overflow: hidden;
}

.text-rainbow::after {
    content: "";
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(120deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.6) 50%,
            rgba(255, 255, 255, 0) 100%);
    animation: flash 2.5s ease-in-out infinite;
}

@keyframes flash {
    0% {
        left: -75%;
    }

    20% {
        left: 125%;
    }

    100% {
        left: 125%;
    }
}

.hero p {
    font-size: 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* --- 制作実績セクション --- */
.works {
    padding: 80px 0;
    /* 上下の余白 */
}

.works h2 {
    text-align: center;
    font-size: 32px;
    margin-bottom: 40px;
}

.works-grid {
    display: grid;
    /* 画面幅に応じて列数を変えるレスポンシブグリッド */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    /* カード間の隙間 */
}

.work-item {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    /* 画像の角丸を効かせるため */
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s, box-shadow 0.3s;
}

.work-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.work-item__image img {
    width: 100%;
    height: 200px;
    /* 画像の高さを統一 */
    object-fit: cover;
    /* アスペクト比を保ったまま要素を覆う */
    display: block;
    /* 画像下の余分な隙間を消す */
}

.work-item__content {
    padding: 20px;
}

.work-item__title {
    font-size: 18px;
    font-weight: bold;
    margin-top: 0;
    margin-bottom: 10px;
}

.work-item__excerpt {
    font-size: 14px;
    line-height: 1.6;
}

.work-item__tags {
    margin-bottom: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.tag-item {
    background-color: #eee;
    color: #555;
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-block;
}

/* --- 自己紹介・スキルセクション --- */
.about-skills {
    padding: 80px 0;
    background-color: #ffffff;
}

/* プロフィールカード */
.profile-card {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-bottom: 80px;
}

.profile-card__image {
    flex-shrink: 0;
}

.profile-card__image img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.profile-card__content h2 {
    margin-top: 0;
    font-size: 28px;
}

.profile-card__content p {
    font-size: 16px;
    line-height: 1.8;
}

/* スキルセクション */
.skills-section h2 {
    text-align: center;
    font-size: 32px;
    margin-bottom: 40px;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 30px;
    justify-items: center;
}

.skill-item {
    text-align: center;
    transition: transform 0.3s ease;
}

.skill-item:hover {
    transform: scale(1.1);
}

.skill-item__icon {
    height: 60px;
    width: auto;
    margin-bottom: 10px;
}

.skill-item__name {
    font-weight: bold;
    font-size: 14px;
    margin: 0;
}

/* --- レスポンシブ対応 (スマホ用) --- */
@media (max-width: 768px) {
    .profile-card {
        flex-direction: column;
        text-align: center;
    }

    .skills-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* --- フッター --- */
.site-footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 30px 0;
    margin-top: 50px;
}

/* --- 制作実績 詳細ページ --- */
.portfolio-detail {
    background-color: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    margin: 50px 0;
}

.portfolio-header {
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.portfolio-title {
    font-size: 32px;
    margin: 0 0 15px 0;
}

.portfolio-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.portfolio-thumbnail {
    margin-bottom: 30px;
}

.portfolio-thumbnail img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.portfolio-content {
    font-size: 16px;
    line-height: 1.8;
}

.portfolio-content h2 {
    font-size: 24px;
    margin-top: 40px;
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 2px solid #00bfff;
}

.portfolio-content p {
    margin-bottom: 20px;
}

.portfolio-content a {
    color: #00bfff;
    text-decoration: none;
    font-weight: bold;
}

.portfolio-content a:hover {
    text-decoration: underline;
}

.back-to-list {
    text-align: center;
    margin-bottom: 50px;
}

.back-to-list a {
    display: inline-block;
    background-color: #333;
    color: #fff;
    padding: 12px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s;
}

.back-to-list a:hover {
    background-color: #555;
}