/* ========================================
   style.css — けいし ポートフォリオサイト
   Apple風ミニマルデザイン
   ======================================== */


/* ----------------------------------------
   1. CSS カスタムプロパティ（変数）
   ---------------------------------------- */
:root {
  /* カラー */
  --color-bg:        #F5F5F7;   /* Apple風ライトグレー */
  --color-bg-dark:   #0A0A0A;   /* ヒーロー/Statsダーク背景 */
  --color-bg-white:  #FFFFFF;
  --color-text:      #1D1D1F;   /* メインテキスト */
  --color-text-sub:  #6E6E73;   /* サブテキスト */
  --color-accent:    #0071E3;   /* ブルーアクセント */
  --color-accent2:   #34C759;   /* グリーン（達成・ランニング） */
  --color-border:    #D2D2D7;

  /* カテゴリカラー */
  --cat-marathon:  #FF6B35;
  --cat-gear:      #0071E3;
  --cat-training:  #34C759;
  --cat-parenting: #FF9500;
  --cat-career:    #AF52DE;
  --cat-tech:      #5AC8FA;
  --cat-diary:     #8E8E93;

  /* タイポグラフィ */
  --font-base: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;

  /* スペーシング */
  --section-gap: 120px;
  --container-width: 1200px;
  --container-pad: 48px;

  /* アニメーション */
  --ease-apple: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-base: 0.3s var(--ease-apple);
}


/* ----------------------------------------
   2. リセット & ベーススタイル
   ---------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-base);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: opacity var(--transition-base);
}

a:hover { opacity: 0.75; }

ul { list-style: none; }

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

/* コンテナ */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

/* 改行ヘルパー（PC専用） */
.br-pc { display: block; }


/* ----------------------------------------
   3. ナビゲーション
   ---------------------------------------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 64px;
  transition: background var(--transition-base), backdrop-filter var(--transition-base),
              box-shadow var(--transition-base);
}

/* スクロール後：Apple風 blur ヘッダー */
.nav--scrolled {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}

.nav__inner {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--container-pad);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ロゴ */
.nav__logo {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-bg-white);
  transition: color var(--transition-base);
}

.nav--scrolled .nav__logo {
  color: var(--color-text);
}

/* PCナビリンク */
.nav__links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav__links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  transition: color var(--transition-base), opacity var(--transition-base);
}

.nav--scrolled .nav__links a {
  color: var(--color-text-sub);
}

.nav__links a:hover {
  opacity: 1;
  color: var(--color-accent);
}

/* CTAボタン（ナビ内） */
.nav__cta {
  background: var(--color-accent) !important;
  color: white !important;
  padding: 8px 20px;
  border-radius: 980px;
  font-weight: 700 !important;
  opacity: 1 !important;
}

.nav__cta:hover {
  background: #0077ED !important;
  transform: scale(1.02);
}

/* ハンバーガーボタン */
.nav__hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav__hamburger span {
  display: block;
  height: 2px;
  background: white;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s, background var(--transition-base);
}

.nav--scrolled .nav__hamburger span {
  background: var(--color-text);
}

/* ハンバーガー → × 変形 */
.nav__hamburger.is-open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.nav__hamburger.is-open span:nth-child(2) {
  opacity: 0;
}
.nav__hamburger.is-open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}


/* ----------------------------------------
   4. モバイルメニュー
   ---------------------------------------- */
.mobile-menu {
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 999;
  padding: 24px var(--container-pad);
  transform: translateY(-110%);
  transition: transform 0.35s var(--ease-apple);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.mobile-menu.is-open {
  transform: translateY(0);
}

.mobile-menu ul {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.mobile-link {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text);
  display: block;
  padding: 4px 0;
  border-bottom: 1px solid var(--color-border);
}


/* ----------------------------------------
   5. ヒーローセクション
   ---------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(160deg, #0A0A0A 0%, #0D1F35 50%, #0A0A0A 100%);
  overflow: hidden;
  padding: 120px 24px 80px;
}

/* ランニングトラック風 斜めライン装飾 */
.hero__track-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero__track-lines span {
  position: absolute;
  display: block;
  height: 100%;
  width: 1px;
  background: linear-gradient(to bottom, transparent 0%, rgba(0, 113, 227, 0.15) 40%, rgba(0, 113, 227, 0.15) 60%, transparent 100%);
  transform: skewX(-15deg);
}

.hero__track-lines span:nth-child(1) { left: 15%; }
.hero__track-lines span:nth-child(2) { left: 30%; }
.hero__track-lines span:nth-child(3) { left: 50%; background: linear-gradient(to bottom, transparent 0%, rgba(52, 199, 89, 0.2) 40%, rgba(52, 199, 89, 0.2) 60%, transparent 100%); }
.hero__track-lines span:nth-child(4) { left: 70%; }
.hero__track-lines span:nth-child(5) { left: 85%; }

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

/* キャッチフレーズ上のラベル */
.hero__eyebrow {
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

/* メインキャッチコピー */
.hero__title {
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 28px;
}

/* サブコピー */
.hero__desc {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.9;
  margin-bottom: 48px;
}

/* CTAボタン群 */
.hero__actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* スクロールインジケーター */
.hero__scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
}

.hero__scroll-arrow {
  width: 24px;
  height: 24px;
  border-right: 2px solid rgba(255, 255, 255, 0.4);
  border-bottom: 2px solid rgba(255, 255, 255, 0.4);
  transform: rotate(45deg);
  animation: scrollBounce 1.6s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: rotate(45deg) translateY(0); opacity: 1; }
  50%       { transform: rotate(45deg) translateY(8px); opacity: 0.4; }
}


/* ----------------------------------------
   6. ボタン共通スタイル
   ---------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-base);
  font-size: 1rem;
  font-weight: 700;
  padding: 14px 28px;
  border-radius: 980px;
  border: none;
  cursor: pointer;
  transition: transform var(--transition-base), background var(--transition-base),
              box-shadow var(--transition-base), opacity var(--transition-base);
  white-space: nowrap;
}

.btn:hover { opacity: 1; }

/* プライマリ（青塗り） */
.btn--primary {
  background: var(--color-accent);
  color: white;
}
.btn--primary:hover {
  background: #0077ED;
  transform: scale(1.03);
  box-shadow: 0 8px 24px rgba(0, 113, 227, 0.35);
}

/* ゴースト（白縁） ヒーロー用 */
.btn--ghost {
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
}
.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.7);
  transform: scale(1.02);
}

/* アウトライン（青縁） */
.btn--outline {
  background: transparent;
  color: var(--color-accent);
  border: 1.5px solid var(--color-accent);
}
.btn--outline:hover {
  background: var(--color-accent);
  color: white;
  transform: scale(1.02);
}

/* ラージサイズ */
.btn--large {
  font-size: 1.05rem;
  padding: 16px 36px;
}


/* ----------------------------------------
   7. セクション共通スタイル
   ---------------------------------------- */
section {
  padding: var(--section-gap) 0;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--color-text);
  margin-bottom: 16px;
}

.section-desc {
  font-size: 1rem;
  color: var(--color-text-sub);
}


/* ----------------------------------------
   8. Stats（数字ハイライト）
   ---------------------------------------- */
.stats {
  background: var(--color-bg-dark);
  padding: 80px 0;
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.stat {
  text-align: center;
  padding: 40px 24px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.stat:last-child { border-right: none; }

.stat__number {
  display: block;
  font-size: clamp(2rem, 3.5vw, 3.2rem);
  font-weight: 700;
  color: var(--color-accent);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 8px;
}

.stat__label {
  display: block;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.04em;
}


/* ----------------------------------------
   9. 実績・記事一覧（Works）
   ---------------------------------------- */
.works {
  background: var(--color-bg-white);
}

/* フィルターボタン群 */
.filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 48px;
}

.filter__btn {
  font-family: var(--font-base);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 8px 20px;
  border-radius: 980px;
  border: 1.5px solid var(--color-border);
  background: transparent;
  color: var(--color-text-sub);
  cursor: pointer;
  transition: all var(--transition-base);
}

.filter__btn:hover,
.filter__btn.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: white;
}

/* カードグリッド */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* 記事カード */
.card {
  background: var(--color-bg);
  border-radius: 18px;
  overflow: hidden;
  transition: transform 0.35s var(--ease-apple), box-shadow 0.35s var(--ease-apple);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.1);
}

/* カード上部カラー帯 */
.card__color-bar {
  height: 4px;
  background: var(--cat-color, var(--color-accent));
  flex-shrink: 0;
}

.card__body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* カテゴリタグ */
.card__category {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cat-color, var(--color-accent));
  margin-bottom: 10px;
}

/* 記事タイトル */
.card__title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.55;
  color: var(--color-text);
  margin-bottom: 10px;
  /* 2行に制限 */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 本文抜粋 */
.card__excerpt {
  font-size: 0.82rem;
  color: var(--color-text-sub);
  line-height: 1.7;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* カードフッター（日付 + 矢印） */
.card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
}

.card__date {
  font-size: 0.78rem;
  color: var(--color-text-sub);
  font-weight: 500;
}

.card__arrow {
  font-size: 1rem;
  color: var(--color-accent);
  transition: transform var(--transition-base);
}

.card:hover .card__arrow {
  transform: translateX(4px);
}

/* フィルター非表示 */
.card--hidden {
  display: none;
}


/* ----------------------------------------
   10. スキル・強み（Skills）
   ---------------------------------------- */
.skills {
  background: var(--color-bg);
}

.skills__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* スキルカード */
.skill-card {
  background: var(--color-bg-white);
  border-radius: 18px;
  padding: 36px 32px;
  border-left: 4px solid var(--accent, var(--color-accent));
  transition: transform 0.35s var(--ease-apple), box-shadow 0.35s var(--ease-apple);
}

.skill-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
}

.skill-card__icon {
  font-size: 2.5rem;
  margin-bottom: 20px;
  line-height: 1;
}

.skill-card__title {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--color-text);
  margin-bottom: 12px;
}

.skill-card__desc {
  font-size: 0.9rem;
  color: var(--color-text-sub);
  line-height: 1.8;
  margin-bottom: 20px;
}

.skill-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-card__tags span {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent, var(--color-accent));
  background: color-mix(in srgb, var(--accent, var(--color-accent)) 10%, transparent);
  padding: 4px 12px;
  border-radius: 980px;
  border: 1px solid color-mix(in srgb, var(--accent, var(--color-accent)) 25%, transparent);
}


/* ----------------------------------------
   11. プロフィール
   ---------------------------------------- */
.profile {
  background: var(--color-bg-white);
}

.profile__inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 80px;
  align-items: center;
}

/* アバター */
.profile__visual {
  position: relative;
  flex-shrink: 0;
}

.profile__avatar {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0071E3 0%, #34C759 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  position: relative;
  z-index: 1;
}

/* アバターの輪っか装飾 */
.profile__avatar-ring {
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 2px solid rgba(0, 113, 227, 0.2);
  animation: ringPulse 3s ease-in-out infinite;
}

@keyframes ringPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.06); opacity: 0.5; }
}

/* プロフィールテキスト */
.profile__name {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
  color: var(--color-text);
}

.profile__role {
  font-size: 1rem;
  color: var(--color-accent);
  font-weight: 500;
  margin-bottom: 24px;
}

.profile__bio {
  font-size: 0.95rem;
  color: var(--color-text-sub);
  line-height: 1.9;
  margin-bottom: 28px;
}

.profile__bio strong {
  color: var(--color-text);
  font-weight: 700;
}

/* 経歴リスト */
.profile__history {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.profile__history li {
  display: flex;
  align-items: baseline;
  gap: 16px;
  font-size: 0.9rem;
  color: var(--color-text-sub);
}

.profile__history-year {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-accent);
  white-space: nowrap;
  background: rgba(0, 113, 227, 0.08);
  padding: 2px 10px;
  border-radius: 980px;
}

/* プロフィールリンクボタン */
.profile__links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}


/* ----------------------------------------
   12. お問い合わせ
   ---------------------------------------- */
.contact {
  background: var(--color-bg-dark);
  text-align: center;
}

.contact__inner { max-width: 600px; margin: 0 auto; }

.contact .section-label { color: rgba(255, 255, 255, 0.5); }

.contact .section-title { color: white; }

.contact__desc {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.9;
  margin-bottom: 40px;
}

.contact__actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* コンタクト内のアウトラインボタンは白対応 */
.contact .btn--outline {
  color: rgba(255, 255, 255, 0.85);
  border-color: rgba(255, 255, 255, 0.4);
}

.contact .btn--outline:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border-color: white;
}


/* ----------------------------------------
   13. フッター
   ---------------------------------------- */
.footer {
  background: #000000;
  padding: 48px 0;
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.footer__logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: white;
  letter-spacing: -0.02em;
}

.footer__links {
  display: flex;
  gap: 24px;
}

.footer__links a {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 500;
  transition: color var(--transition-base);
}

.footer__links a:hover {
  color: white;
  opacity: 1;
}

.footer__copy {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.3);
}


/* ----------------------------------------
   14. スクロールアニメーション
   ---------------------------------------- */
.fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s var(--ease-apple), transform 0.7s var(--ease-apple);
  transition-delay: var(--delay, 0s);
}

.fade-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}


/* ----------------------------------------
   15. レスポンシブ対応
   ---------------------------------------- */

/* タブレット（〜1024px） */
@media (max-width: 1024px) {
  :root {
    --container-pad: 32px;
    --section-gap: 96px;
  }

  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .skills__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .stat:nth-child(odd)  { border-right: 1px solid rgba(255, 255, 255, 0.08); }
  .stat:nth-child(3),
  .stat:nth-child(4)    { border-bottom: none; }

  .profile__inner {
    gap: 48px;
  }
}

/* スマートフォン（〜768px） */
@media (max-width: 768px) {
  :root {
    --container-pad: 20px;
    --section-gap: 80px;
  }

  /* ナビ */
  .nav__links { display: none; }
  .nav__hamburger { display: flex; }

  /* ヒーロー */
  .hero { padding: 100px 20px 80px; }
  .hero__actions { flex-direction: column; align-items: center; }
  .hero__actions .btn { width: 100%; max-width: 320px; }
  .br-pc { display: inline; }

  /* Stats */
  .stats__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .stat { padding: 28px 16px; }

  /* カードグリッド */
  .cards-grid { grid-template-columns: 1fr; }

  /* スキル */
  .skills__grid { grid-template-columns: 1fr; }

  /* プロフィール */
  .profile__inner {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .profile__visual {
    display: flex;
    justify-content: center;
  }

  .profile__avatar {
    width: 160px;
    height: 160px;
    font-size: 4rem;
  }

  .profile__history li {
    flex-direction: column;
    gap: 4px;
    align-items: center;
  }

  .profile__links {
    justify-content: center;
  }

  /* コンタクト */
  .contact__actions { flex-direction: column; align-items: center; }
  .contact__actions .btn { width: 100%; max-width: 320px; }

  /* フィルター */
  .filter { gap: 8px; }
  .filter__btn { font-size: 0.78rem; padding: 6px 14px; }
}

/* 極小スマートフォン（〜375px） */
@media (max-width: 375px) {
  .stats__grid { grid-template-columns: 1fr; }
  .stat { border-right: none !important; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
  .stat:last-child { border-bottom: none; }
}
