@charset "UTF-8";

/* * =========================================
 * カスタマイズ設定 (Design Variables)
 * ここでサイト全体の色や基本設定を変更できます
 * =========================================
 */
:root {
    /* 背景色 */
    --bg-color: #fcfcfc;
    /* 文字色 */
    --text-color: #1a1a1a;
    /* アクセントカラー（必要に応じて使用） */
    --accent: #a3907a;
}

/* 基本スタイル設定 */
body {
    font-family: 'Lato', 'Noto Serif JP', serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    overflow-x: hidden; /* 横スクロール防止 */
}

h1, h2, h3 {
    font-family: 'Cinzel', serif;
    font-weight: 400;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

/* --- ヘッダーエリア --- */
header {
    min-height: 90vh;
    position: relative;
    display: grid;
    /* 画像の横幅を大きくするため、比率を 0.7fr 1.3fr に設定 */
    grid-template-columns: 0.7fr 1.3fr;
    align-items: center;
    gap: 2rem;
}

.header-text {
    z-index: 2;
    padding-right: 2rem;
}

.issue-no {
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    /* ボーダー色を変更 */
    border-bottom: 1px solid #5EA319;
    display: inline-block;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
}

.main-title {
    /* font-size: 5vw; から変更：最大サイズを6remに制限 */
    font-size: min(5vw, 6rem);
    line-height: 1.1;
    margin: 0 0 2rem 0;
    padding: 0;
    display: block;
    word-break: break-word;
}

/* ヒーロー画像（メインビジュアル） */
.hero-img-wrap {
    width: 100%;
    height: 70vh;
    overflow: hidden;
    position: relative;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: #eee;
    will-change: transform; /* アニメーション最適化 */
    transform: translateY(0);
}

.bio-text {
    font-size: 0.95rem;
    line-height: 2.2;
    color: #555;
    margin-top: 2rem;
    max-width: 400px;
}

/* --- テキストコンテンツエリア --- */
.text-section {
    padding: 8rem 0 2rem 0; /* 上下にゆったりとした余白 */
    max-width: 700px; /* 読みやすい幅に制限 */
    margin: 0 auto; /* 中央揃え */
}

.text-section h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 4rem;
    letter-spacing: 0.1em;
    position: relative;
}

/* タイトルの下に短い装飾線を入れる */
.text-section h2::after {
    content: '';
    display: block;
    width: 40px;
    height: 1px;
    /* 背景色を変更 */
    background-color: #5EA319;
    margin: 1.5rem auto 0;
}

.text-content {
    font-size: 1.05rem;
    line-height: 2.4; /* 読みやすい広めの行間 */
    color: #333;
    text-align: center; /* 中央揃えに変更 */
    font-feature-settings: "palt"; /* 文字詰め */
}

/* --- ギャラリーエリア --- */
.gallery-section {
    padding: 5rem 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 2rem;
    row-gap: 8rem;
}

/* 作品アイテムの基本スタイル */
.work-item {
    grid-column: span 6; /* PCでは2列表示 */
    position: relative;
    cursor: pointer;
    display: block;
    
    /* ふわっと表示されるアニメーションの初期状態 */
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s cubic-bezier(0.22, 1, 0.36, 1), transform 1s cubic-bezier(0.22, 1, 0.36, 1);
}

/* 画面に入った時に付与されるクラス */
.work-item.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.work-img-container {
    width: 100%;
    aspect-ratio: 1/1; /* 正方形 */
    overflow: hidden;
    position: relative;
    background-color: #f0f0f0;
}

.work-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s cubic-bezier(0.19, 1, 0.22, 1);
    display: block;
}

/* ホバー時の画像拡大効果 */
.work-item:hover .work-img {
    transform: scale(1.05);
}

.work-info {
    position: absolute;
    bottom: -3rem;
    left: 0;
    background: var(--bg-color);
    padding: 1rem 2rem 0 0;
    z-index: 1;
}

.work-title {
    font-size: 1.5rem;
    margin: 0;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s;
}

/* ホバー時の下線色を変更 */
.work-item:hover .work-title {
    border-bottom-color: #5EA319;
}

.work-cat {
    font-size: 0.8rem;
    color: #888;
    font-style: italic;
    margin-top: 0.5rem;
    display: block;
}

/* --- About Me セクション --- */
.about-section {
    padding: 8rem 0 4rem 0;
    background-color: #fafafa;
    margin-top: 5rem;
    /* 画面幅いっぱいにするための処理 */
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    width: 100vw;
}

.about-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-img-wrap {
    width: 100%;
    aspect-ratio: 3/4;
    overflow: hidden;
    background-color: #eee;
}

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

.about-info h2 {
    font-size: 2rem;
    margin-top: 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid #5EA319;
    display: inline-block;
    padding-bottom: 0.5rem;
}

/* About Meの名前を強調するために追加 */
.about-text strong {
    font-size: 1.5rem;
    display: block;
    margin-bottom: -4rem; /* マイナスマージンで調整 */
    letter-spacing: 0.05em;
}

.about-text {
    font-size: 0.95rem;
    line-height: 2.2;
    color: #444;
    text-align: justify;
}

.about-info .social-links {
    justify-content: flex-start;
    margin-top: 2rem;
}

/* --- フッターエリア --- */
footer {
    margin-top: 0;
    text-align: center;
    padding-bottom: 4rem;
}

.footer-logo {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    margin-bottom: 2rem;
    display: inline-block;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

.social-links a {
    text-decoration: none;
    color: #000;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* --- モーダル（拡大表示）エリア --- */
.modal {
    position: fixed;
    inset: 0;
    background: #fff;
    z-index: 100;
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    opacity: 0;
    visibility: hidden;
    transition: 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    transform: translateY(20px);
}

.modal.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.modal-img-area {
    height: 100%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-height: 100vh;
}

.modal-info-area {
    padding: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: 1.5rem;
    cursor: pointer;
    background: none;
    border: none;
}

/* * =========================================
 * レスポンシブ対応 (Media Queries)
 * common.cssのブレークポイントを適用
 * =========================================
 */

/* --- タブレット (769px 〜 1024px) --- */
/* 【修正】レイアウト崩れを防ぐため、PCレイアウトを無理に維持せず、
   スマホ版に近い「縦積み」レイアウトへ最適化します */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 4rem 3rem; /* 余白を調整して中央寄せを安定させる */
    }

    /* ヘッダー：縦積みに変更 */
    header {
        grid-template-columns: 1fr; /* 1カラムに変更 */
        gap: 3rem; /* 要素間の余白 */
        min-height: auto; /* 高さはコンテンツに合わせる */
        padding-bottom: 3rem;
        display: flex;
        flex-direction: column; /* 上から順に表示 */
    }

    .header-text {
        padding-right: 0;
        text-align: center; /* テキストは中央揃え */
        max-width: 600px;
        margin: 0 auto;
    }

    /* 画像の高さ制限：間延び防止 */
    .hero-img-wrap {
        width: 100%;
        height: 50vh; /* 画面半分くらいの高さに抑える */
        max-height: 600px;
        margin-top: 1rem;
    }

    .main-title {
        font-size: 4.5rem; /* 少し大きく */
    }

    /* テキストセクション：右寄り解消 */
    .text-section {
        padding: 6rem 0 4rem;
        max-width: 80%; /* 幅を確保しすぎない */
        margin: 0 auto; /* 確実に中央へ */
    }
    
    .gallery-grid {
        gap: 2rem;
        row-gap: 6rem;
    }
    
    /* 作品アイテム：タブレットでは2列表示（PCと同じ）でOK */
    .work-item {
        grid-column: span 6; 
    }

    .about-section {
        padding: 6rem 0 3rem;
    }

    .about-container {
        gap: 3rem;
    }
    
    .about-info h2 {
        font-size: 1.8rem;
    }

    /* モーダル調整 */
    .modal-info-area {
        padding: 2rem;
    }
}

/* --- スマホ (〜768px) --- */
@media (max-width: 768px) {
    header {
        grid-template-columns: 1fr;
        gap: 0;
        min-height: auto; /* 高さをコンテンツなりに */
        padding-bottom: 2rem;
    }
    
    .header-text {
        padding-right: 0;
        margin-bottom: 2rem;
        text-align: center; /* テキストを中央揃えに変更 */
    }

    /* 説明文も中央寄せになるように調整 */
    .bio-text {
        margin-left: auto;
        margin-right: auto;
    }

    .main-title {
        font-size: 3rem;
        margin: 0 0 1rem 0;
    }

    .hero-img-wrap {
        /* height: 50vh;  高さを画面依存から変更 */
        height: auto; /* 高さを自動調整 */
        aspect-ratio: 3 / 2; /* 横長の長方形（3:2）に設定 */
        margin-top: 0;
    }

    .gallery-grid {
        display: block; /* ★変更: スマホではGridを解除してブロック表示にする */
        gap: 0; /* ★変更: gapの影響を排除 */
    }

    /* 作品アイテムを1列表示に変更 */
    .work-item {
        width: 100%; /* ★追加: 幅を親要素に合わせる */
        margin: 0 auto 3rem auto; /* ★変更: 左右autoで中央揃え、下余白3rem */
    }
    
    /* Aboutセクションのスマホ対応 */
    /* ここから表示順序制御の変更 */
    .about-container {
        display: flex;
        flex-direction: column; /* 縦積み */
        padding: 0 1.5rem;
    }
    
    /* コンテナのラッパーを無視して子要素を並列に扱う */
    .about-info {
        display: contents; 
    }

    /* 以下、orderで表示順序を指定 */

    /* 1. タイトル */
    .about-info h2 {
        order: 1;
        margin-bottom: -2rem; /* -2remに変更 */
        text-align: center; /* タイトルを中央寄せ */
        width: 100%;
        border-bottom: 1px solid #5EA319; /* 線のスタイル維持 */
        display: block; /* inline-blockから変更して幅確保 */
    }

    /* 2. 画像 */
    .about-img-wrap {
        order: 2;
        margin-bottom: 1rem; /* 2remから1remへ短縮：画像から名前までの距離 */
    }

    /* 3. 名前（strongタグ） */
    .about-text strong {
        order: 3;
        margin-bottom: -3rem; /* ★変更: 0.5remから-3remへ短縮 */
        margin-top: 0;
        text-align: center; /* ★追加: 親のjustifyを解除し中央揃え */
        font-size: 1.3rem; /* ★追加: 狭い画面用に少し小さく調整 */
    }

    /* 4. テキスト本文 */
    .about-text {
        display: block; /* contentsをやめてblockに戻す */
        order: 4; /* 画像の次に来るグループとして設定 */
        margin-top: 0;
    }

    /* 5. SNSリンク */
    .social-links {
        order: 5;
        margin-top: 3rem;
    }

    /* --- スマホ・モーダルのスクロール対応 --- */
    .about-section {
        padding: 4rem 0;
    }

    .modal {
        display: block; 
        overflow-y: auto; 
        -webkit-overflow-scrolling: touch;
    }
    .modal-img-area {
        height: auto;
        padding: 2rem 0;
        min-height: 300px;
    }
    .modal-img {
        max-height: 60vh;
        width: auto;
        max-width: 100%;
    }
    .modal-info-area {
        height: auto;
        padding: 2rem;
        display: block;
    }
    .modal-close {
        top: 1rem;
        right: 1rem;
        background: rgba(255,255,255,0.8);
        padding: 0.5rem;
        border-radius: 4px;
    }

    .container {
        padding: 2rem 1.5rem;
    }
    
    .text-section {
        padding: 4rem 1rem;
    }
    .text-content {
        text-align: left;
    }

    /* フッターリンク */
    .social-links {
        flex-direction: column;
        gap: 1rem;
    }
}

/* * =========================================
 * 追加: タブレット・スマホ共通設定
 * =========================================
 */
@media (max-width: 1024px) {
    /* メインタイトルの改行タグを非表示にする */
    .u-pc-only {
        display: none;
    }
}

/* * =========================================
 * 追加: ローディング画面設定
 * =========================================
 */
/* 全画面オーバーレイ */
.loader {
    position: fixed;
    inset: 0;
    background: var(--bg-color); /* サイトの背景色に合わせる（白系） */
    z-index: 9999;
    /* フェードアウト用のアニメーション設定 */
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

/* JSで付与する非表示クラス */
.loader.loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* 画面中央 */
#load {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 600px;
    height: 36px;
    margin-left: -300px;
    margin-top: -18px;
    overflow: visible;
    user-select: none;
    cursor: default;
}

#load div {
    position: absolute;
    width: 20px;
    height: 36px;
    opacity: 0;
    /* サイトのフォントに合わせる */
    font-family: 'Cinzel', serif;
    animation: move 2s linear infinite;
    transform: rotate(180deg);
    /* サイトの文字色に合わせる（黒系）から変更 */
    color: #5EA319; /* ここを変更しました */
}

#load div:nth-child(2) { animation-delay: 0.2s; }
#load div:nth-child(3) { animation-delay: 0.4s; }
#load div:nth-child(4) { animation-delay: 0.6s; }
#load div:nth-child(5) { animation-delay: 0.8s; }
#load div:nth-child(6) { animation-delay: 1s; }
#load div:nth-child(7) { animation-delay: 1.2s; }

@keyframes move {
    0% { left: 0; opacity: 0; transform: rotate(180deg); }
    35% { left: 41%; opacity: 1; transform: rotate(0deg); }
    65% { left: 59%; opacity: 1; transform: rotate(0deg); }
    100% { left: 100%; opacity: 0; transform: rotate(-180deg); }
}

/* 読み上げ用（視覚的には隠す） */
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0);
    white-space: nowrap; border: 0;
}

/* 動きを減らす設定の人にはアニメ止める */
@media (prefers-reduced-motion: reduce) {
    #load div { animation: none; opacity: 1; left: 50%; transform: none; }
}