/* =====================================================================
   ポートフォリオ雛形 スタイルシート
   ---------------------------------------------------------------------
   配色は下の :root にある変数を書き換えるだけで全体が変わります。
   フォントは Zen Maru Gothic（丸ゴシック）。各HTMLの <head> で読み込み。
   ===================================================================== */

/* ---------- 1. カラートークン（ライト = 既定） ---------- */
:root {
  --bg:            #fffdfb;   /* ほんのり暖かい白 */
  --bg-sub:        #eef5f4;   /* 青緑を薄めたセクション背景 */
  --bg-elev:       #ffffff;
  --fg:            #2f3a3a;   /* 線画の黒に寄せた、青緑がかった濃色 */
  --fg-muted:      #57615f;
  --fg-faint:      #656e6c;
  --border:        #dfeae8;
  --sticker:       #ffffff;   /* 白フチ。作品のステッカー表現に合わせた縁取り */

  /* ★ 差し色。--accent は X のヘッダーから取った実際のブランドカラー。
     用途ごとに濃度を分けている。変えるときは必ずセットで変更すること。
     淡い色をそのまま文字に使うと読めなくなるため（白地で約1.9:1）分離している。 */
  --accent:        #90c0c0;   /* くすんだ青緑：ボタンの塗り、枠線 */
  --accent-text:   #367170;   /* 同系の濃色：リンク・見出しの文字 */
  --accent-fg:     #123030;   /* --accent の上に乗る文字 */
  --accent-2:      #f7bf94;   /* 差し色2：温かいオレンジ（塗り用） */
  --accent-2-text: #7e3d12;   /* 同系の濃色：オレンジの上に乗る文字 */

  --shadow:      0 2px 6px rgba(47,58,58,.06), 0 10px 26px rgba(47,58,58,.08);
  --shadow-lift: 0 6px 14px rgba(47,58,58,.11), 0 20px 40px rgba(47,58,58,.15);

  --font-sans: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "ヒラギノ丸ゴ ProN",
               "M PLUS Rounded 1c", "Hiragino Kaku Gothic ProN", "Hiragino Sans",
               "Noto Sans JP", Meiryo, sans-serif;

  --max:  1180px;
  --gap:  clamp(18px, 3vw, 34px);
  --radius:      18px;   /* カード・パネル */
  --radius-sm:   12px;   /* 小さめの箱 */
  --radius-pill: 999px;  /* ボタン・タグ */
}

/* ---------- 2. カラートークン（ダーク） ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:            #1d2323;
    --bg-sub:        #252d2d;
    --bg-elev:       #2a3333;
    --fg:            #eef4f3;
    --fg-muted:      #b3c0be;
    --fg-faint:      #93a09e;
    --border:        #3a4544;
    --sticker:       #ffffff;
    --accent:        #7fb2b2;
    --accent-text:   #9ed0cf;
    --accent-fg:     #123030;
    --accent-2:      #f0b787;
    --accent-2-text: #3d1c05;
    --shadow:      0 2px 6px rgba(0,0,0,.32), 0 10px 26px rgba(0,0,0,.40);
    --shadow-lift: 0 6px 14px rgba(0,0,0,.38), 0 20px 40px rgba(0,0,0,.48);
  }
}
:root[data-theme="dark"] {
  --bg:            #1d2323;
  --bg-sub:        #252d2d;
  --bg-elev:       #2a3333;
  --fg:            #eef4f3;
  --fg-muted:      #b3c0be;
  --fg-faint:      #93a09e;
  --border:        #3a4544;
  --sticker:       #ffffff;
  --accent:        #7fb2b2;
  --accent-text:   #9ed0cf;
  --accent-fg:     #123030;
  --accent-2:      #f0b787;
  --accent-2-text: #3d1c05;
  --shadow:      0 2px 6px rgba(0,0,0,.32), 0 10px 26px rgba(0,0,0,.40);
  --shadow-lift: 0 6px 14px rgba(0,0,0,.38), 0 20px 40px rgba(0,0,0,.48);
}

/* ---------- 3. ベース ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.9;
  letter-spacing: .03em;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main { flex: 1; }
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { line-height: 1.45; letter-spacing: .04em; margin: 0; font-weight: 700; }
p { margin: 0 0 1.3em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2.5px solid var(--accent-text); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: 16px; }
.section { padding-block: clamp(60px, 9vw, 108px); }
/* 淡水色のセクションは上の角を丸めて、紙を重ねたような見え方にする */
.section--sub { background: var(--bg-sub); border-radius: 40px 40px 0 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--fg-faint); margin: 0 0 12px; font-weight: 700;
}
.eyebrow::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-2); flex: none;
}
.section-title { font-size: clamp(23px, 3.4vw, 33px); margin: 0 0 10px; }
.section-lead { color: var(--fg-muted); max-width: 60ch; margin: 0 0 clamp(28px,4vw,44px); }

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 30px; border-radius: var(--radius-pill);
  border: 2px solid var(--accent); background: var(--accent); color: var(--accent-fg);
  font-family: inherit; font-size: 15px; font-weight: 700; letter-spacing: .06em;
  box-shadow: var(--shadow);
  cursor: pointer; transition: transform .22s cubic-bezier(.34,1.3,.5,1), box-shadow .22s;
}
.btn:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.btn:active { transform: translateY(-1px); }
.btn--ghost {
  background: var(--bg-elev); color: var(--fg); border-color: var(--border);
  box-shadow: 0 1px 3px rgba(47,58,58,.06);
}
.btn--ghost:hover { border-color: var(--accent); box-shadow: var(--shadow); }

/* ---------- 4. ヘッダー ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
@supports (backdrop-filter: blur(1px)) {
  .site-header {
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: saturate(170%) blur(14px);
  }
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; height: 66px;
}
.logo { font-size: 16px; font-weight: 700; letter-spacing: .08em; }
.logo small { display: block; font-size: 10px; letter-spacing: .1em; color: var(--fg-faint); font-weight: 500; }
.header-tools { display: flex; align-items: center; gap: 8px; }
.nav { display: flex; align-items: center; gap: 2px; }
.nav a {
  padding: 8px 14px; font-size: 13px; font-weight: 500; letter-spacing: .08em;
  color: var(--fg-muted); border-radius: var(--radius-pill); transition: color .18s, background .18s;
}
.nav a:hover { color: var(--accent-text); background: var(--bg-sub); }
.nav a[aria-current="page"] { color: var(--accent-fg); background: var(--accent); font-weight: 700; }
.icon-btn {
  display: grid; place-items: center; width: 38px; height: 38px; flex: none;
  border: 2px solid var(--border); border-radius: 50%;
  background: var(--bg-elev); color: var(--fg); cursor: pointer; font-size: 15px; line-height: 1;
  transition: border-color .18s, transform .18s;
}
.icon-btn:hover { border-color: var(--accent); transform: rotate(-12deg); }
.nav-toggle { display: none; }
.nav-toggle:hover { transform: none; }

@media (max-width: 720px) {
  .nav-toggle { display: grid; }
  .nav {
    position: fixed; inset: 66px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: var(--bg); border-bottom: 1px solid var(--border);
    border-radius: 0 0 26px 26px;
    padding: 14px 16px 22px; box-shadow: var(--shadow-lift);
    transform: translateY(-10px); opacity: 0; pointer-events: none; transition: .22s;
  }
  .nav[data-open="true"] { transform: none; opacity: 1; pointer-events: auto; }
  .nav a { padding: 14px 18px; font-size: 15px; border-radius: var(--radius-sm); }
}

/* ---------- 5. ヒーロー ---------- */
.hero {
  position: relative; overflow: hidden;
  padding-block: clamp(56px, 11vw, 124px) clamp(48px, 8vw, 88px);
}
/* 背景のふんわりした光。水色とピンクを1つずつ置く */
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%;
  filter: blur(70px); opacity: .55; pointer-events: none;
}
.hero::before { width: 440px; height: 440px; background: var(--accent);   top: -170px; right: -90px; }
.hero::after  { width: 340px; height: 340px; background: var(--accent-2); bottom: -180px; left: -110px; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hero::before,
  :root:not([data-theme="light"]) .hero::after { opacity: .26; }
}
:root[data-theme="dark"] .hero::before,
:root[data-theme="dark"] .hero::after { opacity: .26; }
.hero > .wrap { position: relative; z-index: 1; }

.hero__name { font-size: clamp(36px, 8.5vw, 78px); line-height: 1.2; letter-spacing: .02em; margin: 0 0 16px; font-weight: 900; }
.hero__name small {
  display: block; font-size: clamp(12px, 1.7vw, 15px); letter-spacing: .22em;
  color: var(--fg-faint); font-weight: 500; margin-top: 12px;
}
.hero__role {
  font-size: 13px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--accent-text); font-weight: 700; margin: 0 0 20px;
}
.hero__tagline { font-size: clamp(17px, 2.3vw, 21px); color: var(--fg-muted); max-width: 46ch; margin: 0 0 34px; font-weight: 500; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 500; letter-spacing: .06em; color: var(--fg-muted);
  background: var(--bg-elev); border: 2px solid var(--border);
  border-radius: var(--radius-pill); padding: 7px 17px; margin-bottom: 22px;
  box-shadow: 0 1px 3px rgba(47,58,58,.06);
}
.badge::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: #35a06f; flex: none;
  box-shadow: 0 0 0 3px rgba(53,160,111,.18);
}
.badge[data-available="false"]::before { background: var(--fg-faint); box-shadow: none; }

/* ---------- 6. 作品グリッド ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 30px; }
.filter {
  padding: 9px 21px; font-size: 13.5px; font-weight: 700; letter-spacing: .06em; font-family: inherit;
  border: 2px solid var(--border); border-radius: var(--radius-pill);
  background: var(--bg-elev); color: var(--fg-muted); cursor: pointer;
  transition: transform .2s cubic-bezier(.34,1.3,.5,1), border-color .2s, color .2s;
}
.filter:hover { color: var(--accent-text); border-color: var(--accent); transform: translateY(-2px); }
.filter[aria-pressed="true"] {
  background: var(--accent); color: var(--accent-fg); border-color: var(--accent);
  box-shadow: var(--shadow);
}

.grid { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }

.card { display: block; transition: transform .28s cubic-bezier(.34,1.25,.5,1); }
.card:hover { transform: translateY(-6px); }
.card__media {
  position: relative; overflow: hidden; border-radius: var(--radius);
  background: var(--bg-sub); aspect-ratio: 16 / 9;
  border: 5px solid var(--sticker);
  box-shadow: var(--shadow);
  transition: border-color .25s, box-shadow .25s;
}
.card:hover .card__media { border-color: var(--accent); box-shadow: var(--shadow-lift); }
.card[data-category="illustration"] .card__media { aspect-ratio: 4 / 3; }
.card__media img, .card__media video {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .55s cubic-bezier(.2,.7,.3,1);
}
/* イラストは縦長の全身絵が多く、中央切り抜きだと顔が切れるため上寄せにする */
.card[data-category="illustration"] .card__media img { object-position: top; }
.card__media video { position: absolute; inset: 0; opacity: 0; transition: opacity .3s; }
.card:hover .card__media img, .card:focus-visible .card__media img { transform: scale(1.05); }
.card:hover .card__media video[data-ready="true"] { opacity: 1; }
.card__type {
  position: absolute; left: 12px; top: 12px; z-index: 2;
  font-size: 10.5px; letter-spacing: .12em; font-weight: 700; text-transform: uppercase;
  background: var(--accent); color: var(--accent-fg);
  padding: 5px 12px; border-radius: var(--radius-pill);
  box-shadow: 0 2px 6px rgba(0,0,0,.10);
}
.card[data-category="illustration"] .card__type { background: var(--accent-2); color: var(--accent-2-text); }
.card__body { padding: 16px 6px 0; }
.card__meta { font-size: 11.5px; letter-spacing: .08em; color: var(--fg-faint); margin: 0 0 6px; font-weight: 500; }
.card__title { font-size: 16.5px; margin: 0 0 7px; transition: color .18s; }
.card:hover .card__title { color: var(--accent-text); }
.card__summary { font-size: 13.5px; color: var(--fg-muted); line-height: 1.8; margin: 0; }

.empty { color: var(--fg-muted); padding: 40px 0; }

/* ---------- 7. 作品詳細 ---------- */
.detail__head { padding-block: clamp(32px, 6vw, 60px) 28px; }
.back {
  display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .08em;
  color: var(--fg-muted); margin-bottom: 22px;
  padding: 7px 18px; border-radius: var(--radius-pill);
  background: var(--bg-sub); transition: color .18s, transform .18s;
}
.back:hover { color: var(--accent-text); transform: translateX(-3px); }
.detail__title { font-size: clamp(26px, 4.6vw, 44px); margin: 0 0 16px; font-weight: 900; }
.detail__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.tag {
  font-size: 11.5px; font-weight: 500; letter-spacing: .06em; color: var(--fg-muted);
  background: var(--bg-sub); border-radius: var(--radius-pill); padding: 5px 14px;
}

.player {
  position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000;
  border-radius: var(--radius); overflow: hidden;
  border: 5px solid var(--sticker); box-shadow: var(--shadow);
}
.player iframe, .player video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player--empty {
  display: grid; place-items: center; background: var(--bg-sub);
  color: var(--fg-faint); font-size: 13px; text-align: center; padding: 20px;
}

.detail__layout { display: grid; gap: clamp(28px, 5vw, 56px); grid-template-columns: minmax(0,1fr); align-items: start; }
@media (min-width: 900px) { .detail__layout { grid-template-columns: minmax(0,1fr) 290px; } }

.spec {
  margin: 0; background: var(--bg-sub);
  border-radius: var(--radius); padding: 8px 22px;
}
.spec > div {
  display: grid; grid-template-columns: 92px 1fr; gap: 12px;
  padding: 14px 0; border-bottom: 1px solid var(--border); font-size: 14px;
}
.spec > div:last-child { border-bottom: 0; }
.spec dt { color: var(--fg-faint); font-size: 12px; letter-spacing: .08em; margin: 0; font-weight: 700; }
.spec dd { margin: 0; }

.stills { display: grid; gap: 16px; margin-top: 30px; }
.stills img { width: 100%; border-radius: var(--radius); border: 5px solid var(--sticker); box-shadow: var(--shadow); }

.credit { font-size: 11.5px; color: var(--fg-faint); margin-top: 30px; }

.pager {
  display: flex; justify-content: space-between; gap: 16px;
  border-top: 1px solid var(--border); padding-top: 26px;
  margin-top: clamp(40px, 6vw, 72px); font-size: 13.5px; font-weight: 500;
}
.pager a { color: var(--fg-muted); transition: color .18s; }
.pager a:hover { color: var(--accent-text); }

/* ---------- 8. プロフィール / 連絡 ---------- */
.two-col { display: grid; gap: clamp(28px, 5vw, 64px); grid-template-columns: minmax(0,1fr); align-items: start; }
@media (min-width: 860px) { .two-col { grid-template-columns: 300px minmax(0,1fr); } }

/* 丸いプロフィール画像。四角より柔らかく見える */
.portrait {
  width: 100%; max-width: 280px; aspect-ratio: 1; object-fit: cover;
  border-radius: 50%; border: 6px solid var(--sticker);
  background: var(--bg-sub); box-shadow: var(--shadow-lift);
}

.skill-group { margin-bottom: 28px; }
.skill-group h3 {
  font-size: 12px; letter-spacing: .12em; color: var(--fg-faint);
  margin: 0 0 12px; text-transform: uppercase; font-weight: 700;
}
.chips { display: flex; flex-wrap: wrap; gap: 9px; }
.chip {
  font-size: 13.5px; font-weight: 500;
  border: 2px solid var(--border); border-radius: var(--radius-pill);
  padding: 7px 17px; background: var(--bg-elev);
  transition: border-color .18s, transform .18s;
}
.chip:hover { border-color: var(--accent); transform: translateY(-2px); }

.timeline li {
  display: grid; grid-template-columns: 92px 1fr; gap: 16px;
  padding: 16px 0; border-bottom: 1px solid var(--border); font-size: 14px;
}
.timeline li:last-child { border-bottom: 0; }
.timeline b { color: var(--accent-text); font-weight: 700; font-size: 13px; letter-spacing: .06em; }

.contact-card {
  border: 2px solid var(--border); border-radius: 26px;
  background: var(--bg-elev); padding: clamp(26px, 4vw, 44px); box-shadow: var(--shadow);
}
.mail {
  display: inline-block;
  font-size: clamp(16px, 2.8vw, 25px); font-weight: 700; word-break: break-all;
  color: var(--accent-text); transition: transform .2s;
}
.mail:hover { transform: translateY(-2px); }
.steps { counter-reset: s; margin-top: 10px; }
.steps li { counter-increment: s; position: relative; padding-left: 46px; margin-bottom: 20px; color: var(--fg-muted); font-size: 14px; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 2px;
  width: 30px; height: 30px; display: grid; place-items: center;
  border-radius: 50%; background: var(--accent-2); color: var(--accent-2-text);
  font-size: 13px; font-weight: 700;
}
.steps li b { color: var(--fg); display: block; font-size: 15px; }

.note {
  font-size: 13.5px; color: var(--fg-muted);
  background: var(--bg-sub); border-radius: var(--radius-sm);
  padding: 14px 18px;
}

/* ---------- 9. フッター ---------- */
.site-footer { border-top: 1px solid var(--border); padding-block: 44px; }
.site-footer__inner { display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between; align-items: center; }
.socials { display: flex; flex-wrap: wrap; gap: 8px; }
.socials a {
  font-size: 12.5px; font-weight: 700; letter-spacing: .06em; color: var(--fg-muted);
  border: 2px solid var(--border); border-radius: var(--radius-pill); padding: 7px 17px;
  background: var(--bg-elev);
  transition: color .18s, border-color .18s, transform .18s;
}
.socials a:hover { color: var(--accent-text); border-color: var(--accent); transform: translateY(-2px); }
.copyright { font-size: 11.5px; color: var(--fg-faint); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
