/*
Theme Name: Portfolio Editorial Theme
Theme URI: https://example.com/
Author: Portfolio Student
Description: Vocational training graduation project portfolio theme.
Version: 1.0.0
Text Domain: portfolio-editorial

このテーマは「Design.MD」の仕様に合わせた、初心者でも編集しやすい
シンプルなオリジナルWordPressテーマです。
*/

/* =========================================================
   1. Google Fonts
========================================================= */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&family=Space+Mono&family=Syne:wght@400;600;700;800&display=swap');

/* =========================================================
   2. Design Tokens
========================================================= */
:root {
    /* ベース背景色：レトロイエロー（クリーム色） */
    --color-bg: #F4E8B0;

    /* メインカラー：ティールグリーン（深みのある青緑） */
    --color-teal: #2F8875;

    /* アクセント1：テラコッタレッド（レンガ調の赤） */
    --color-red: #C8462B;

    /* アクセント2：スモーキーブルー（くすみブルー） */
    --color-blue: #709CB5;

    /* カード・ボックス用背景：ホワイト */
    --color-white: #FFFFFF;

    /* メイン文字色・枠線色：ダークチャコール */
    --color-text: #1E232A;
    --color-line: #1E232A;
    --color-muted: #4A525D;

    /* 互換性維持のための変数マッピング */
    --color-pink: var(--color-blue);   /* ヒーロー枠などをスモーキーブルーへ */
    --color-sage: var(--color-teal);   /* 装飾要素をティールグリーンへ */

    --font-heading: 'Syne', 'Montserrat', sans-serif;
    --font-body: 'Noto Sans JP', sans-serif;
    --font-mono: 'Space Mono', monospace;

    --container: 1200px;
    --content-padding: clamp(20px, 4vw, 56px);

    --border: 3px solid var(--color-line); /* 枠線を少し太くしてコントラストを補強 */
    --shadow: 5px 5px 0 var(--color-line);

    --radius: 0px;
    --section-gap: clamp(72px, 10vw, 140px);
}

/* =========================================================
   3. Reset / Base
========================================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.8;
    overflow-x: hidden;
}

img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea,
select {
    font: inherit;
}

::selection {
    background: var(--color-pink);
    color: var(--color-text);
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* =========================================================
   4. Common Layout
========================================================= */
.site-header {
    padding-top: 12px !important;
    padding-bottom: 10px!important;
	margin-bottom: 40px;
}

.site-container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-left: clamp(16px, 4vw, 40px);
    padding-right: clamp(16px, 4vw, 40px);
}

.section {
    padding-block: var(--section-gap);
}

.section-header {
    display: flex;
    flex-wrap: wrap; /* 横幅が狭くなったら右の説明文を下に移動させる */
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px 24px;
    margin-bottom: 36px;
}

.section-label {
    margin: 0 0 8px;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.section-title {
    margin: 0;
    font-family: var(--font-heading);
    /* 16文字の「WORKS / FEATURED」が1行に綺麗に収まる計算サイズ */
    font-size: clamp(1.2rem, 5.2vw, 3.8rem);
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: -0.04em;
    white-space: nowrap; /* 単語途中での不自然な改行を絶対に禁止 */
	color: var(--color-red);
}

.section-description {
    max-width: 520px;
    margin: 0;
    color: var(--color-muted);
}

/* =========================================================
   5. Hero
========================================================= */
.hero {
    min-height: auto; /* 高さを内容に合わせ、下線への被りを防ぐ */
    display: grid;
    align-items: center;
    position: relative;
    overflow: hidden;
    width: 100%;
    padding-top: 20px; /* セミコロンを追加 */
    padding-bottom: 60px; /* 下部に適度な余白を確保 */
}

.hero-inner {
    position: relative;
    width: 100%;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    margin-top: 0;
    margin-bottom: 20px;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.08em;
}

.hero-title {
    position: relative;
    z-index: 2;
    width: 100%;
    margin: 0;
    font-family: var(--font-heading);
    font-weight: 800;
    line-height: 0.9;
    letter-spacing: -0.05em;
    text-transform: uppercase;
    color: var(--color-red);
}

.hero-title__main {
    display: block;
    font-size: clamp(1.2rem, 7.2vw, 5.5rem);
    white-space: nowrap;
}

.hero-title__sub {
    display: block;
    font-size: clamp(1.2rem, 8vw, 6rem);
    white-space: nowrap;
}

.hero-title .indent {
    margin-left: clamp(4px, 3vw, 60px);
}

.hero-copy {
    position: relative;
    z-index: 3;
    max-width: 520px;
    margin: 24px 0 0 clamp(0px, 5vw, 80px); /* 上のマージンを少し詰めて崩れを防止 */
    padding: 24px;
    border: var(--border);
    background: var(--color-blue);
    color: var(--color-white);
}

.hero-copy p {
    margin: 0;
}

.hero-decor {
    position: absolute;
    right: 2%;
    top: 12%;
    width: clamp(180px, 28vw, 360px);
    aspect-ratio: 1;
    background: var(--color-sage);
    border: var(--border);
    transform: rotate(7deg);
    z-index: 1;
}

.hero-decor::after {
    content: '';
    position: absolute;
    inset: 20px;
    border: var(--border);
    background: var(--color-bg);
    transform: rotate(-10deg);
}

/* =========================================================
   6. Works Grid
========================================================= */
.works-section {
    background: var(--color-bg);
}

.works-grid {
    width: 100%;
	display: grid;
    /* PC表示（広い画面）の時は横に4分割 */
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.work-card {
    grid-column: auto;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--color-white);
    border: var(--border);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.work-card:nth-child(even) {
    background: var(--color-blue);
    color: var(--color-white);
}

.work-card:nth-child(3n + 2) {
    transform: none;
}

/*.work-card:nth-child(3n + 2):hover {
    transform: translateY(44px);
}*/

.work-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.work-card__image {
    width: 100%;
	aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #ddd;
    border-bottom: var(--border);
}

.work-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
	object-position: top center;
    transition: transform 0.35s ease;
}

.work-card:hover .work-card__image img {
    transform: scale(1.03);
}

.work-card__body {
    padding: 16px;
}

.work-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.work-card__title {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    line-height: 1.2;
}

.work-card__excerpt {
    margin: 10px 0 0;
    color: var(--color-muted);
    font-size: 13px;
}

.work-card__link {
    display: inline-block;
    margin-top: 14px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.work-card__empty {
    padding: 40px 24px;
    border: var(--border);
    background: var(--color-white);
    grid-column: 1 / -1;
}

/* =========================================================
   7. Category Filter
========================================================= */
.category-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px;
}

.category-nav a {
    padding: 8px 16px;
    border: var(--border);
    background: var(--color-white);
    font-family: var(--font-mono);
    font-size: 12px;
    transition: background 0.2s ease, color 0.2s ease;
}

.category-nav a:hover,
.category-nav a:focus-visible {
    background: var(--color-text);
    color: var(--color-white);
}

/* =========================================================
   8. About
========================================================= */
.about-section {
    padding-bottom: var(--section-gap);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 0;
    width: 100%;
    border: var(--border);
}

.about-intro {
    padding: clamp(28px, 5vw, 64px);
    /*background: var(--color-pink);*/
    border-right: var(--border);
	background: var(--color-teal);
    color: var(--color-white);
}

.about-intro h3 {
    margin: 0 0 24px;
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 4vw, 3.4rem);
    line-height: 1;
	/*color: var(--color-red);*/
	color: var(--color-bg); /* 見出しをクリーム色に */
}

.about-intro p {
    margin: 0;
}

.about-detail {
    padding: clamp(28px, 5vw, 64px);
    background: var(--color-white);
}

.about-detail__title {
    margin: 0 0 12px;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    text-transform: uppercase;
}

.about-detail__text {
    margin: 0 0 28px;
    color: var(--color-muted);
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.skill-list li {
    padding: 5px 10px;
    border: 1px solid var(--color-line);
    font-family: var(--font-mono);
    font-size: 11px;
}

/* =========================================================
   9. Footer
========================================================= */
.site-footer {
    padding: 48px 0;
    border-top: var(--border);
    background: var(--color-text);
    color: var(--color-white);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.footer-title {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1.5rem;
}

.footer-copy {
    margin: 0;
    font-family: var(--font-mono);
    font-size: 11px;
}

/* =========================================================
   10. WordPress-specific
========================================================= */
.wp-caption {
    max-width: 100%;
}

.alignleft {
    float: left;
    margin: 0 24px 24px 0;
}

.alignright {
    float: right;
    margin: 0 0 24px 24px;
}

.aligncenter {
    display: block;
    margin-inline: auto;
}

/* =========================================================
   11. Responsive
========================================================= */
@media (max-width: 1024px) {
    .works-grid,
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr); /* タブレットは2列 */
    }
}

@media (max-width: 900px) {
    .hero {
        min-height: auto;
    }

    .hero-decor {
        opacity: 0.55;
        right: -80px;
        top: 8%;
    }

    .works-grid {
        grid-template-columns: 1fr;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .about-intro {
        border-right: 0;
        border-bottom: var(--border);
    }
}

@media (max-width: 600px) {
    .hero {
        padding-block: 60px;
    }

    .hero-copy {
        margin-left: 0;
    }

    .section-header {
        display: block;
    }

    .section-description {
        margin-top: 20px;
    }

    .work-card__body {
        padding: 16px;
    }

    .footer-inner {
        display: block;
    }

    .footer-copy {
        margin-top: 12px;
    }
	.works-grid {
        grid-template-columns: 1fr; /* スマホは1列 */
    }
}



/* =========================================================
   12. Reduced Motion
========================================================= */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}