/* === 基本設定・CSS変数定義 === */
:root {
    --color-text: #333;
    --color-background-main: #fff;
    --color-background-sub: #F2F3ED; /* Worksセクションの背景色 */

    --font-primary: 'League Spartan', 'Noto Sans JP', sans-serif;
    --font-secondary: 'Noto Sans JP', sans-serif;
    --font-accent: 'Inter', 'Noto Sans JP', sans-serif;

    --transition-fast: 0.3s ease;
}

body {
    margin: 0;
    font-family: var(--font-primary);
    color: var(--color-text);
    background-color: #f4f4f4; /* サイト外側の背景色 */
}
a {
    color: inherit;
    text-decoration: none;
}
.container {
    background-color: var(--color-background-main);
    box-shadow: 0 0 15px rgba(0,0,0,0.05);
}

/* スクロールアニメーション用のクラス */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.fade-in.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.slide-in-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 1.0s ease-out, transform 1.0s ease-out;
}
.slide-in-left.is-visible {
    opacity: 1;
    transform: translateX(0);
}
.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }
.delay-3 { transition-delay: 0.6s; }


/* =================================
   PC版のスタイル
   ================================= */

/* --- ヘッダーの個別設定 --- */
.page-header {
    background-color: transparent;
    border-bottom: none;
}

/* --- ヒーローセクション (PC版) --- */
.hero-section {
    position: relative;
    height: 848px;
    padding: 40px clamp(40px, 8vw, 80px);
    display: flex;
    align-items: center;
    overflow: hidden;
    /* ▼▼▼ 変更: 背景画像をWebP対応に ▼▼▼ */
    background-image:
        linear-gradient(rgba(242, 243, 237, 0.5), rgba(242, 243, 237, 0.5)),
        url('../images/common/WALL.jpg'); /* フォールバック用のJPG */
    background-image:
        linear-gradient(rgba(242, 243, 237, 0.5), rgba(242, 243, 237, 0.5)),
        -webkit-image-set(url('../images/common/WALL.webp') 1x); /* Safari用 */
    background-image:
        linear-gradient(rgba(242, 243, 237, 0.5), rgba(242, 243, 237, 0.5)),
        image-set(url('../images/common/WALL.webp') 1x); /* 標準 */
    /* ▲▲▲ 変更ここまで ▲▲▲ */
    background-size: cover;
    background-position: center;
    margin-top: -49px; 
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}
.hero-section.is-loaded {
    opacity: 1;
}

.portfolio-title {
    position: absolute;
    left: clamp(80px, 10vw, 160px);
    right: auto;
    top: 50%;
    transform: translateY(-50%) rotate(180deg);
    transform-origin: center;
    margin: 0;
    writing-mode: vertical-rl;
    font-size: clamp(100px, 9vw, 128px);
    font-weight: 200;
    color: var(--color-text);
    user-select: none;
    opacity: 0;
    transform: translateY(-70%) rotate(180deg);
    transition: opacity 1.2s ease-out 0.5s, transform 1.2s ease-out 0.5s;
}
.hero-section.is-loaded .portfolio-title {
    opacity: 1;
    transform: translateY(-50%) rotate(180deg);
}


/* --- Aboutセクション --- */
.about-section {
    padding: 120px 40px;
    display: flex;
    justify-content: center;
    text-align: center;
    background-color: var(--color-background-main);
}
.content-wrapper {
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.profile-picture {
    width: 187px;
    height: 259px;
    object-fit: cover;
    margin-bottom: 18px;
}
.name {
    font-size: 32px;
    font-weight: 300;
    margin: 0 0 25px 0;
}
.bio {
    font-size: 20px;
    font-weight: 400;
    line-height: 1.7;
    text-align: left;
    margin: 0 0 40px 0;
    width: 100%;
}
.btn {
    display: inline-block;
    border: 1px solid var(--color-text);
    padding: 8px 32px;
    font-size: 20px;
    font-weight: 400;
    line-height: 1.5;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}
.btn:hover {
    background-color: var(--color-text);
    color: var(--color-background-main);
}

/* --- 共通セクションタイトル --- */
.section-title {
    font-size: 60px;
    font-weight: 500;
    margin: 0 0 80px 0;
    font-family: var(--font-primary);
    color: var(--color-text);
}

/* --- Worksセクション --- */
.works-section {
    background-color: var(--color-background-sub);
    padding: 120px 40px;
}
.works-container {
    max-width: 1056px;
    margin: 0 auto;
}
.works-grid {
    display: flex;
    flex-direction: column;
    gap: 80px;
}
.work-item {
    display: flex;
    align-items: flex-start;
    gap: 60px;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
}
.work-item:hover {
    opacity: 0.8;
    transform: translateY(-8px);
}
.work-image-container {
    width: 592px;
    aspect-ratio: 16 / 9;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.work-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.work-item:hover .work-image-container img {
    transform: scale(1.05);
}

.work-description {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding-top: 10px;
}
.work-category {
    font-family: var(--font-accent);
    font-weight: 600;
    font-size: 32px;
    line-height: 1.5;
    margin: 0;
}
.work-detail {
    font-family: var(--font-secondary);
    font-size: 25px;
    font-weight: 400;
    line-height: 1.5;
    margin: 0;
}


/* ===============================================
   タブレット用のスタイル (画面幅が1056px以下の場合)
   =============================================== */
@media (max-width: 1056px) {
    .works-section .work-item {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    .works-section .work-item:hover {
        transform: translateY(-5px);
    }
    .works-section .work-image-container {
        width: 100%;
        max-width: 592px;
    }
    .works-section .work-description {
        width: 100%;
        max-width: 592px;
        text-align: left;
        gap: 0;
        padding-top: 0;
    }
    .works-section .work-category {
        font-weight: 600;
        font-size: 20px;
        line-height: 1.5;
    }
    .works-section .work-detail {
        font-weight: 400;
        font-size: 14px;
        line-height: 1.2;
    }
}


/* ===============================================
   スマートフォン用のスタイル (画面幅が768px以下の場合)
   =============================================== */
@media (max-width: 768px) {
    .hero-section {
        margin-top: -37px;
        height: 85vh; 
        min-height: 600px;
        padding: 20px;
        box-sizing: border-box;
    }

    .portfolio-title {
        left: 20px;
        font-size: clamp(80px, 20vw, 100px);
    }

    .about-section {
        padding: 80px 20px;
    }
    .profile-picture {
        width: 150px;
        height: 208px;
    }
    .name {
        font-size: 24px;
    }
    .bio {
        font-size: 16px;
        text-align: left;
    }
    .btn {
        font-size: 18px;
        padding: 8px 28px;
    }
    .section-title {
        font-size: 40px;
        margin-bottom: 40px;
    }
    .works-section {
        padding: 80px 20px;
    }
    .works-grid {
        gap: 50px;
    }
    .works-section .work-category {
        font-size: 22px;
    }
    .works-section .work-detail {
        font-size: 18px;
    }
}


/* ===============================================
   さらに狭いスマートフォン用のスタイル (画面幅が390px以下の場合)
   =============================================== */
@media (max-width: 390px) {
    .bio br {
        display: none;
    }
}