@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700;900&family=Zen+Old+Mincho:wght@400;500;700&display=swap');

:root {
  --bg-top: #050a16;
  --bg-bottom: #080d1c;
  --text: #e9eefb;
  --text-muted: #9dadc9;
  --accent: #8fb6ff;
  --accent-soft: rgba(143, 182, 255, 0.14);
  --card-bg: rgba(140, 175, 255, 0.07);
  --card-border: rgba(175, 200, 255, 0.16);
  --border: rgba(175, 200, 255, 0.12);
  --max-width: 960px;
}

* { box-sizing: border-box; }

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  background: var(--bg-bottom);
  color: var(--text);
  font-family: 'Noto Sans JP', sans-serif;
  line-height: 1.7;
}

/* ページ全体に貼りつく夜色のグラデーション背景。スクロールしても動かず、
   ガラスパネル（.section-panel・.work-card等）を通して透けて見える。
   光源を画面下に集めているのは、Heroの三日月が下から昇る構図に合わせるため。 */
body::before {
  content: "";
  position: fixed;
  inset: -10%;
  z-index: -1;
  background:
    radial-gradient(circle at 50% 104%, rgba(70, 140, 255, 0.6), transparent 46%),
    radial-gradient(circle at 14% 88%, rgba(150, 84, 255, 0.42), transparent 44%),
    radial-gradient(circle at 86% 96%, rgba(40, 196, 220, 0.3), transparent 42%),
    radial-gradient(circle at 80% 10%, rgba(90, 110, 255, 0.3), transparent 46%),
    radial-gradient(circle at 12% 22%, rgba(60, 120, 255, 0.22), transparent 44%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
  filter: blur(70px);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 7rem 1.5rem 5rem;
  text-align: center;
}

.hero-glow {
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 620px;
  z-index: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(60, 120, 255, 0.35), transparent 55%),
    radial-gradient(circle at 75% 15%, rgba(120, 90, 255, 0.28), transparent 50%);
  filter: blur(50px);
  opacity: 0.75;
}

/* 最初の1画面の下から昇る三日月。大きい円から少しずらした円を引いたSVGマスクで形を作る。
   スクロールで流れて消える（fixedにすると下のセクションまで光が乗って字が読めなくなる）。
   発光はマスクの外側（.moon-glow）に置く：マスクは filter より後に適用され、
   内側に置くと光が切り落とされるため。 */
.moon-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  /* html に背景が無いので body の background はキャンバスへ伝播する。
     負のz-indexはキャンバスより前に描かれるため月は隠れない（body::before と同じ理屈）。
     0以上にすると位置指定なしのカード類より前に出て本文を覆うので上げないこと。 */
  z-index: -1;
  pointer-events: none;
}

.moon-glow {
  position: absolute;
  width: 100vw;
  aspect-ratio: 1;
  left: 0;
  bottom: -72vw;
  rotate: 155deg;
  filter: drop-shadow(0 0 60px rgba(150, 190, 255, 0.55)) drop-shadow(0 0 170px rgba(90, 130, 255, 0.4));
}

.moon-glow .crescent {
  position: absolute;
  inset: 0;
  background: linear-gradient(200deg, #ffffff 0%, rgba(214, 231, 255, 0.92) 40%, rgba(150, 180, 255, 0.5) 74%, rgba(120, 150, 255, 0.12) 100%);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cmask id='m'%3E%3Ccircle cx='50' cy='50' r='49' fill='%23fff'/%3E%3Ccircle cx='58' cy='44' r='48.5' fill='%23000'/%3E%3C/mask%3E%3Ccircle cx='50' cy='50' r='49' fill='%23fff' mask='url(%23m)'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cmask id='m'%3E%3Ccircle cx='50' cy='50' r='49' fill='%23fff'/%3E%3Ccircle cx='58' cy='44' r='48.5' fill='%23000'/%3E%3C/mask%3E%3Ccircle cx='50' cy='50' r='49' fill='%23fff' mask='url(%23m)'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}

/* 縦画面では弧が寝すぎて画面を横切らないので、半径を詰めて立てる */
@media (max-width: 700px) {
  .moon-glow {
    width: 190vw;
    left: -45vw;
    bottom: -140vw;
  }
}


.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
}

.eyebrow {
  color: var(--accent);
  letter-spacing: 0.15em;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
}

.hero h1 {
  font-family: 'Zen Old Mincho', 'Yu Mincho', serif;
  font-size: clamp(2.2rem, 6vw, 3.2rem);
  font-weight: 400;
  letter-spacing: 0.22em;
  margin: 0.5rem 0 1rem;
}

.hero .lead {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 640px;
  margin: 0 auto;
}

.showreel-wrap {
  margin: 2.5rem auto 0;
  max-width: 760px;
}

.showreel-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  background: #000;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
}

.showreel-caption {
  color: #c7d5ee;
  font-size: 0.85rem;
  margin: 0.75rem 0 0;
  /* 月の明るい弧の上に重なる位置なので、地の色を敷いて読めるようにする */
  text-shadow: 0 1px 8px rgba(4, 8, 18, 0.6);
}

.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem 1.5rem;
  border-top: 1px solid var(--border);
}

.section h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.section-note {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0;
}

/* About・Skillsを背景から視覚的に切り離すガラスパネル */
.section-panel {
  background: var(--card-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--card-border);
  border-radius: 28px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  padding: 1.25rem 2rem;
  margin: 1.25rem auto;
}

.section-panel:first-of-type { margin-top: 2rem; }

#about.section-panel { padding: 5px 2rem; }

#skills.section-panel { padding-top: 5px; }

.work-group + .work-group {
  margin-top: 2.5rem;
}

.work-group-label {
  color: var(--accent);
  font-size: 1rem;
  margin: 2rem 0 0.75rem;
}

.work-group:first-child .work-group-label {
  margin-top: 0;
}

.work-subgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* Projectsのカードだけ白いすりガラスにする。中の文字・タグ・区切り線は
   すべてトークン参照なので、カード内でトークンを上書きすれば連動して暗色に戻る。 */
.work-card {
  --text: #16283f;
  --text-muted: #3f5064;
  --accent: #1f57cf;
  --accent-soft: rgba(47, 111, 237, 0.16);
  --border: rgba(22, 40, 63, 0.1);
  color: var(--text);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 22px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.work-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.9);
}

.work-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(circle at 25% 25%, rgba(120, 90, 255, 0.35), transparent 55%),
    radial-gradient(circle at 75% 75%, rgba(40, 90, 220, 0.4), transparent 55%),
    linear-gradient(135deg, rgba(30, 50, 110, 0.55), rgba(10, 16, 34, 0.7));
  display: flex;
  align-items: center;
  justify-content: center;
}

.work-thumb-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.play-icon {
  position: relative;
  font-size: 2rem;
  color: var(--accent);
}

.work-thumb-img ~ .play-icon {
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.work-body { padding: 1.25rem; }

.work-body h3 { margin: 0 0 0.25rem; font-size: 1.05rem; }

.work-meta {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin: 0 0 0.75rem;
}

.work-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
}

.tool-tag {
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
}

.skill-groups {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.skill-group {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 0.15rem 0.9rem 0.6rem;
}

.skill-group h3 {
  font-size: 0.95rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.skill-group ul { margin: 0; padding-left: 1.1rem; color: var(--text-muted); }

.contact-email { font-size: 1.1rem; font-weight: 700; color: var(--accent); }

footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(4, 8, 18, 0.72);
  backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1.5rem;
}

.modal.open { display: flex; }

.modal-inner {
  position: relative;
  width: 100%;
  max-width: 900px;
}

.modal-inner video,
.modal-inner iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  background: black;
}

.modal-inner .hidden {
  display: none;
}

.modal-close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}
