/* folio.ai generated stylesheet */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --main: #1A1A18;
  --accent: #F97316;
  --sub: #FAFAF8;
  --text: #6B6B68;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: #fff;
  color: var(--main);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ── */
header {
  padding: 18px 36px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 0.5px solid rgba(0,0,0,0.07);
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 10;
}
.logo-text { font-family: 'DM Serif Display', serif; font-size: 16px; color: var(--main); letter-spacing: -0.3px; }
.logo-img { height: 28px; width: auto; display: block; object-fit: contain; }
nav { display: flex; gap: 20px; }
nav a {
  font-size: 10px;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  transition: color 0.2s;
}
nav a:hover { color: var(--main); }
nav a.nav-active { color: var(--main); font-weight: 600; }

/* ── Key Visual ── */
.key-visual { position: relative; line-height: 0; }
.key-visual img { width: 100%; aspect-ratio: 16/7; object-fit: cover; display: block; }
.key-visual--gradient {
  aspect-ratio: 16/7;
  display: flex;
  align-items: flex-end;
  line-height: normal;
}
.kv-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.12) 0%, rgba(0,0,0,0.48) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 40px 48px;
  line-height: normal;
}
.key-visual--gradient .kv-overlay { position: relative; inset: auto; background: none; width: 100%; }
.kv-role { font-size: 10px; letter-spacing: 2.5px; text-transform: uppercase; color: rgba(255,255,255,0.75); margin-bottom: 8px; }
.kv-title { font-family: 'DM Serif Display', serif; font-size: 38px; line-height: 1.1; letter-spacing: -1px; color: #fff; margin-bottom: 10px; }
.kv-catch { font-size: 13px; color: rgba(255,255,255,0.75); line-height: 1.7; }

/* ── About ── */
.about { padding: 56px 48px; background: var(--sub); border-top: 1px solid rgba(0,0,0,0.05); }
.section-label { font-size: 9.5px; letter-spacing: 2.5px; text-transform: uppercase; color: #9D9D9A; margin-bottom: 28px; }
.about-inner { display: flex; gap: 48px; align-items: flex-start; flex-wrap: wrap; }
.about-photo img { width: 140px; height: 140px; border-radius: 50%; object-fit: cover; display: block; border: 3px solid rgba(0,0,0,0.06); flex-shrink: 0; }
.about-text { flex: 1 1 240px; min-width: 0; }
.about-text-only { max-width: 720px; }
.creator-name { font-family: 'DM Serif Display', serif; font-size: 22px; margin-bottom: 4px; }
.creator-role { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: var(--text); margin-bottom: 16px; }
.about p { font-size: 13px; color: var(--text); line-height: 1.9; }

/* ── SNS Icons ── */
.sns-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.sns-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.12);
  color: var(--text); text-decoration: none; font-size: 14px;
  transition: all 0.2s;
}
.sns-icon:hover { border-color: var(--accent); color: var(--accent); }

/* ── Gallery ── */
.works { padding: 24px 32px 80px; }

.masonry-container { container-type: inline-size; }
.masonry-grid { position: relative; }

/* 5列  gutter=24px  calc(20% - 24*(5-1)/5) ≈ calc(20% - 19.2px) */
.grid-sizer, .masonry-item { width: calc(20% - 20px); margin-bottom: 24px; }

.masonry-item {
  position: relative;
  border-radius: 3px;
  overflow: hidden;
  background: #F2F2F0;
  cursor: pointer;
}
.masonry-img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.35s ease;
}
.masonry-item:hover .masonry-img {
  transform: scale(1.04);
  opacity: 0.84;
}
/* カテゴリーバッジ — 画像左上オーバーレイ、カード高さに影響しない */
.masonry-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 9px;
  border-radius: 9999px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  background: rgba(17, 17, 17, 0.68);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  max-width: calc(100% - 20px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
  z-index: 1;
  opacity: 0.82;
  transition: opacity 0.2s;
}
.masonry-item:hover .masonry-badge { opacity: 1; }
/* キャプション — 画像下に表示（存在する場合のみ） */
.masonry-caption { padding: 7px 10px 9px; }
.masonry-desc {
  font-size: 11px;
  color: var(--text);
  line-height: 1.4;
  opacity: 0.72;
}
.no-works { color: rgba(0,0,0,0.3); text-align: center; padding: 40px 0; }

/* コンテナ幅基準で列数切替（ビューポート幅ではなく） */
@container (max-width: 1280px) {
  .grid-sizer, .masonry-item { width: calc(25% - 18px); }
}
@container (max-width: 900px) {
  .grid-sizer, .masonry-item { width: calc(33.33% - 16px); }
}
@container (max-width: 600px) {
  .grid-sizer, .masonry-item { width: calc(50% - 12px); margin-bottom: 16px; }
}
@container (max-width: 400px) {
  .grid-sizer, .masonry-item { width: 100%; }
}

/* ── Category Filter ── */
.category-filter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.filter-btn {
  padding: 5px 16px; border-radius: 999px; font-size: 11px;
  font-family: 'DM Sans', sans-serif;
  border: 1px solid rgba(0,0,0,0.12); background: transparent;
  color: var(--text); cursor: pointer; transition: all 0.15s; letter-spacing: 0.3px;
}
.filter-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }

/* ── Career / Equipment ── */
.career-section, .equipment-section { padding: 48px; border-top: 1px solid rgba(0,0,0,0.05); }
.equipment-section { background: var(--sub); }
.career-text, .equipment-text { font-size: 13px; color: var(--text); line-height: 2.0; white-space: pre-wrap; max-width: 720px; }

/* ── Footer ── */
footer {
  padding: 28px 48px;
  background: var(--sub);
  border-top: 1px solid rgba(0,0,0,0.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: auto;
}
.footer-logo { height: 20px; width: auto; display: block; object-fit: contain; max-width: 120px; opacity: 0.7; }
.footer-brand { font-family: 'DM Serif Display', serif; font-size: 13px; color: var(--text); letter-spacing: -0.2px; opacity: 0.7; }
.footer-copy { font-size: 11px; color: var(--text); opacity: 0.45; letter-spacing: 0.3px; }

/* ── Responsive ── */
@media (max-width: 900px) {
  header { padding: 16px 28px; }
  .kv-overlay { padding: 36px 32px; }
  .kv-title { font-size: 32px; }
  .about { padding: 40px 28px; }
  .works { padding: 20px 20px 64px; }
  .about-photo img { width: 110px; height: 110px; }
  footer { padding: 24px 28px; }
}
@media (max-width: 600px) {
  header { padding: 14px 20px; flex-direction: column; gap: 14px; }
  .key-visual img, .key-visual--gradient { aspect-ratio: 4/3; }
  .kv-overlay { padding: 28px 20px; }
  .kv-title { font-size: 26px; }
  .about { padding: 32px 20px; }
  .works { padding: 16px 16px 56px; }
  .about-inner { flex-direction: column; align-items: center; text-align: center; }
  .sns-links { justify-content: center; }
  .about-photo img { width: 90px; height: 90px; }
  footer { padding: 20px 20px; }
}

/* ── Load More ── */
#load-more-wrap { text-align: center; margin-top: 40px; padding-bottom: 24px; }
#load-more-btn {
  padding: 12px 36px; border-radius: 999px;
  border: 1.5px solid rgba(0,0,0,0.15); background: transparent;
  color: var(--text); font-size: 13px; font-family: 'DM Sans', sans-serif;
  cursor: pointer; letter-spacing: 0.3px; transition: background 0.2s, border-color 0.2s;
}
#load-more-btn:hover { background: rgba(0,0,0,0.05); border-color: rgba(0,0,0,0.3); }

/* ── Back to Top ── */
#back-to-top {
  position: fixed; bottom: 28px; right: 28px;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(17,17,17,0.60);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255,255,255,0.14);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.2s;
  z-index: 100;
}
#back-to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
#back-to-top:hover { background: rgba(17,17,17,0.85); }