/* Portfolio Studio — 公開サイト用スタイル */
:root {
  --bg: #0c0c0d;
  --bg-2: #141416;
  --fg: #f2f0ec;
  --muted: #8f8b85;
  --line: rgba(255, 255, 255, 0.09);
  --chip: rgba(255, 255, 255, 0.06);
  --card-bg: #1a1a1c;
  --shade: linear-gradient(180deg, rgba(12,12,13,.15) 0%, rgba(12,12,13,.25) 50%, rgba(12,12,13,.92) 100%);
  --gutter: clamp(16px, 4vw, 56px);
  --font: "Inter Tight", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
}
[data-theme="light"] {
  --bg: #f5f3ef;
  --bg-2: #ecE9e3;
  --fg: #171615;
  --muted: #74706a;
  --line: rgba(0, 0, 0, 0.1);
  --chip: rgba(0, 0, 0, 0.05);
  --card-bg: #e4e0d9;
  --shade: linear-gradient(180deg, rgba(245,243,239,0) 0%, rgba(245,243,239,.1) 50%, rgba(245,243,239,.95) 100%);
}

*, *::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);
  font-size: 15px;
  line-height: 1.8;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
::selection { background: var(--accent); color: #111; }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px var(--gutter);
  transition: background .3s, padding .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  padding-top: 12px; padding-bottom: 12px;
  border-bottom-color: var(--line);
}
.brand { font-weight: 600; letter-spacing: .04em; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav nav { display: flex; gap: clamp(14px, 3vw, 32px); font-size: 13px; letter-spacing: .08em; }
.nav nav a { opacity: .75; transition: opacity .2s; }
.nav nav a:hover { opacity: 1; }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: flex-end;
  padding: 120px var(--gutter) clamp(56px, 9vh, 110px);
  overflow: hidden;
  background: radial-gradient(1200px 600px at 80% 10%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 60%), var(--bg);
}
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-shade { position: absolute; inset: 0; background: var(--shade); pointer-events: none; }
.hero:not(.has-media) .hero-shade { display: none; }
.hero-inner { position: relative; max-width: 1100px; }
.hero-kicker {
  margin: 0 0 18px; color: var(--accent);
  font-size: 13px; letter-spacing: .24em; text-transform: uppercase; font-weight: 500;
}
.hero-name {
  margin: 0; font-weight: 500; line-height: .98; letter-spacing: -0.03em;
  font-size: clamp(48px, 10vw, 150px);
  word-break: keep-all; overflow-wrap: anywhere;
}
.hero-sub { margin: 14px 0 0; font-size: clamp(14px, 1.6vw, 18px); color: var(--muted); letter-spacing: .12em; }
.hero-tagline { margin: 28px 0 0; max-width: 560px; font-size: clamp(15px, 1.5vw, 18px); line-height: 1.9; }
.has-media .hero-sub, .has-media .hero-tagline { color: color-mix(in srgb, var(--fg) 82%, transparent); }
.scroll-cue {
  position: absolute; right: var(--gutter); bottom: clamp(56px, 9vh, 110px);
  width: 1px; height: 64px; background: color-mix(in srgb, var(--fg) 25%, transparent); overflow: hidden;
}
.scroll-cue span { position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--fg); animation: cue 2.2s ease-in-out infinite; }
@keyframes cue { to { top: 100%; } }

/* ---------- sections ---------- */
.section { max-width: 1520px; margin: 0 auto; padding: clamp(72px, 12vh, 140px) var(--gutter) 0; }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 20px 32px;
  margin-bottom: clamp(28px, 5vh, 48px);
}
.section-head h2 {
  margin: 0; font-weight: 400; letter-spacing: -0.02em; line-height: 1;
  font-size: clamp(34px, 5vw, 64px);
}
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line); background: transparent; border-radius: 999px;
  padding: 7px 16px; font-size: 13px; letter-spacing: .06em; color: var(--muted);
  transition: color .2s, border-color .2s, background .2s;
}
.chip:hover { color: var(--fg); border-color: color-mix(in srgb, var(--fg) 30%, transparent); }
.chip.is-active { color: var(--bg); background: var(--fg); border-color: var(--fg); }

/* ---------- grid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: clamp(12px, 1.6vw, 22px); }
.grid.is-masonry { display: flex; align-items: flex-start; }
.grid.is-masonry .col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: clamp(12px, 1.6vw, 22px); }
.card { display: block; position: relative; }
.card[hidden] { display: none; }
.card-media {
  position: relative; display: block; overflow: hidden; border-radius: 4px;
  padding-top: var(--r); background: var(--c, var(--card-bg));
}
.card-media img, .card-media video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform .8s cubic-bezier(.2,.7,.2,1), opacity .5s;
}
.card-media img { opacity: 0; }
.card-media img.is-loaded { opacity: 1; }
.card-media video { opacity: 0; }
.card-media video.is-playing { opacity: 1; }
.card:hover .card-media img, .card:hover .card-media video { transform: scale(1.035); }
.play {
  position: absolute; left: 14px; bottom: 14px; z-index: 2;
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(0,0,0,.38); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.25);
  transition: opacity .3s;
}
.play svg { width: 16px; height: 16px; fill: #fff; margin-left: 2px; }
.card:hover .play { opacity: 0; }
.badge {
  position: absolute; right: 12px; bottom: 14px; z-index: 2;
  font-size: 11px; letter-spacing: .08em; color: #fff;
  background: rgba(0,0,0,.45); padding: 2px 8px; border-radius: 3px;
}
.card-text { display: block; padding: 12px 2px 4px; }
.card-title { display: block; font-size: 14px; line-height: 1.5; }
.card-meta { display: block; font-size: 12px; color: var(--muted); letter-spacing: .06em; margin-top: 2px; }

/* ---------- about ---------- */
.about-body { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 6vw, 96px); align-items: start; }
.about-body:not(:has(.about-photo)) { grid-template-columns: minmax(0, 1fr); max-width: 860px; }
.about-photo .avatar { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 4px; }
.about-name { margin: 0; font-size: clamp(22px, 2.4vw, 30px); font-weight: 500; letter-spacing: .02em; }
.about-name span { margin-left: 14px; font-size: 14px; color: var(--muted); letter-spacing: .1em; font-weight: 400; }
.about-role { margin: 6px 0 28px; color: var(--accent); font-size: 13px; letter-spacing: .14em; }
.bio p { margin: 0 0 1.2em; font-size: 15px; line-height: 2; }
.career { margin: 36px 0 0; border-top: 1px solid var(--line); }
.career > div { display: grid; grid-template-columns: 9em minmax(0, 1fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.career dt { color: var(--muted); font-size: 13px; letter-spacing: .06em; font-variant-numeric: tabular-nums; padding-top: 1px; }
.career dd { margin: 0; font-size: 14px; line-height: 1.8; }

/* ---------- contact ---------- */
.contact-body { max-width: 860px; }
.contact-note { margin: 0 0 32px; font-size: clamp(17px, 2vw, 22px); line-height: 1.9; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px; border-radius: 999px; border: 1px solid var(--line);
  font-size: 14px; letter-spacing: .06em; transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn svg { width: 18px; height: 18px; }
.btn:hover { border-color: var(--fg); }
.btn-primary { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); color: #111; }
.mail-text { margin: 14px 0 0; color: var(--muted); font-size: 13px; user-select: all; min-height: 1em; }
.sns-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 44px; }
.sns {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px 9px 12px; border-radius: 999px; background: var(--chip);
  font-size: 13px; letter-spacing: .04em; transition: background .2s, color .2s;
}
.sns svg { width: 18px; height: 18px; }
.sns:hover { background: var(--fg); color: var(--bg); }

.footer { padding: clamp(80px, 14vh, 160px) var(--gutter) 36px; color: var(--muted); font-size: 12px; letter-spacing: .1em; text-align: center; }

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(6, 6, 7, .96);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 56px 72px 24px; color: #f2f0ec;
  animation: fade .25s ease;
}
.lightbox[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
.lb-stage { position: relative; display: flex; align-items: center; justify-content: center; flex: 0 1 auto; }
.lb-stage img, .lb-stage video, .lb-stage iframe { display: block; border: 0; background: #000; border-radius: 2px; }
.lb-caption { width: 100%; max-width: 880px; margin-top: 18px; text-align: center; font-size: 13px; line-height: 1.7; }
.lb-caption .t { font-size: 15px; }
.lb-caption .m { color: #9a958f; letter-spacing: .06em; font-size: 12px; margin-top: 2px; }
.lb-caption .d { color: #cfcac3; margin-top: 8px; white-space: pre-line; max-height: 22vh; overflow: auto; }
.lb-close, .lb-prev, .lb-next {
  position: absolute; border: 0; background: transparent; color: #f2f0ec;
  opacity: .7; transition: opacity .2s; line-height: 1; padding: 12px;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { opacity: 1; }
.lb-close { top: 8px; right: 12px; font-size: 34px; font-weight: 200; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); font-size: 56px; font-weight: 200; }
.lb-prev { left: 8px; }
.lb-next { right: 8px; }
.lb-spinner { position: absolute; inset: 0; margin: auto; width: 28px; height: 28px; border-radius: 50%; border: 2px solid rgba(255,255,255,.2); border-top-color: #fff; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
body.lb-open { overflow: hidden; }

@media (max-width: 760px) {
  body { font-size: 14px; }
  .about-body { grid-template-columns: minmax(0, 1fr); }
  .about-photo { max-width: 360px; }
  .career > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .lightbox { padding: 52px 0 16px; }
  .lb-prev, .lb-next { display: none; }
  .lb-caption { padding: 0 16px; }
  .card-text { padding-top: 8px; }
  .card-title { font-size: 13px; }
  .play { width: 30px; height: 30px; left: 10px; bottom: 10px; }
  .play svg { width: 13px; height: 13px; }
  .scroll-cue { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scroll-cue span { animation: none; }
}
