/* ===========================
   CSS変数・リセット
   =========================== */
:root {
  --color-accent: #4f46e5;
  --color-accent-light: #6366f1;
  --color-text: #1f2937;
  --color-text-sub: #6b7280;
  --color-bg: #ffffff;
  --color-bg-section: #f9fafb;
  --color-border: #e5e7eb;
  --color-tag-bg: #ede9fe;
  --color-tag-text: #4f46e5;
  --header-height: 64px;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 6px 24px rgba(0, 0, 0, 0.14);
  --transition: 0.25s ease;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Yu Gothic", "游ゴシック", YuGothic, "Hiragino Kaku Gothic Pro", sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  font-size: 16px;
}

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

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

ul {
  list-style: none;
}

/* ===========================
   レイアウト共通
   =========================== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

.section:nth-child(even) {
  background: var(--color-bg-section);
}

.section__title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 48px;
  position: relative;
  display: inline-block;
}

.section__title::after {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  background: var(--color-accent);
  margin-top: 8px;
  border-radius: 2px;
}

/* ===========================
   フェードイン
   =========================== */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ===========================
   ヘッダー
   =========================== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.header__logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-accent);
  letter-spacing: 0.05em;
}

.header__nav-list {
  display: flex;
  gap: 32px;
}

.header__nav-list a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text-sub);
  transition: color var(--transition);
}

.header__nav-list a:hover {
  color: var(--color-accent);
}

/* ハンバーガーボタン（スマートフォン用） */
.header__menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.header__menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.header__menu-btn.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.header__menu-btn.is-open span:nth-child(2) {
  opacity: 0;
}

.header__menu-btn.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===========================
   ヒーロー
   =========================== */
.hero {
  padding: 120px 0 96px;
  text-align: center;
  background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
}

.hero__title {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--color-text);
  margin-bottom: 16px;
}

.hero__subtitle {
  font-size: 1.1rem;
  color: var(--color-text-sub);
  letter-spacing: 0.06em;
}

/* ===========================
   About
   =========================== */
.about__content {
  display: flex;
  gap: 48px;
  align-items: flex-start;
}

.about__image {
  flex-shrink: 0;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--color-bg-section);
  border: 2px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

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

.about__image-placeholder {
  display: none;
}

.about__image img[style*="display: none"] ~ .about__image-placeholder,
.about__image:not(:has(img)) .about__image-placeholder {
  display: block;
}

.about__name {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.about__bio {
  color: var(--color-text-sub);
  line-height: 1.9;
}

/* ===========================
   Works グリッド
   =========================== */
.works__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* ===========================
   カード
   =========================== */
.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition), transform var(--transition);
}

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

.card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card__thumb {
  aspect-ratio: 16 / 9;
  background: var(--color-bg-section);
  overflow: hidden;
  position: relative;
}

.card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

.card:hover .card__thumb img {
  transform: scale(1.04);
}

.card__thumb--no-img {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-sub);
  font-size: 0.85rem;
}

.card__thumb--no-img::after {
  content: "No Image";
}

.card__body {
  padding: 16px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.card__title {
  font-size: 1rem;
  font-weight: 700;
}

.card__desc {
  font-size: 0.875rem;
  color: var(--color-text-sub);
  line-height: 1.7;
  flex: 1;
}

.card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 99px;
  background: var(--color-tag-bg);
  color: var(--color-tag-text);
}

/* ===========================
   Contact
   =========================== */
.contact__list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact__link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  color: var(--color-text);
  transition: color var(--transition);
}

.contact__link:hover {
  color: var(--color-accent);
}

.contact__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--color-tag-bg);
  color: var(--color-accent);
  font-size: 0.85rem;
  font-weight: 700;
}

/* ===========================
   フッター
   =========================== */
.footer {
  padding: 28px 0;
  text-align: center;
  background: var(--color-text);
  color: #9ca3af;
  font-size: 0.85rem;
}

/* ===========================
   レスポンシブ
   =========================== */
@media (max-width: 900px) {
  .works__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .header__menu-btn {
    display: flex;
  }

  .header__nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--color-border);
    padding: 16px 24px 24px;
  }

  .header__nav.is-open {
    display: block;
  }

  .header__nav-list {
    flex-direction: column;
    gap: 20px;
  }

  .hero {
    padding: 80px 0 64px;
  }

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

  .about__content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .section__title {
    font-size: 1.6rem;
  }
}
