/* ============================================================
   大城一輝 ポートフォリオ — ダーク × 発光粒子テーマ
   ============================================================ */

:root {
  --bg: #04070f;
  --bg-elevated: rgba(14, 22, 40, 0.62);
  --bg-card: rgba(16, 26, 46, 0.55);
  --line: rgba(110, 168, 220, 0.16);
  --text: #e8eef8;
  --text-muted: #9db0c9;
  --accent: #5eead4;
  --accent-2: #38bdf8;
  --accent-3: #818cf8;
  --glow: rgba(94, 234, 212, 0.35);
  --font-jp: "Noto Sans JP", "Hiragino Kaku Gothic ProN", sans-serif;
  --font-en: "Outfit", "Noto Sans JP", sans-serif;
  --radius: 18px;
  --header-h: 64px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-jp);
  font-feature-settings: "palt";
  line-height: 1.85;
  letter-spacing: 0.02em;
  overflow-x: hidden;
}

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

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

::selection { background: rgba(94, 234, 212, 0.3); }

/* ---------- 粒子キャンバス ---------- */
#particle-field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* コンテンツは粒子の上に重ねる */
.site-header, main, .site-footer { position: relative; z-index: 1; }

/* ---------- ヘッダー ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 clamp(16px, 4vw, 40px);
  background: rgba(4, 7, 15, 0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
}

.brand-mark {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--glow), 0 0 28px var(--glow);
  flex: none;
}

.site-nav {
  display: flex;
  gap: clamp(12px, 2.5vw, 28px);
  margin-left: auto;
}

.site-nav a {
  font-size: 0.92rem;
  color: var(--text-muted);
  transition: color 0.25s;
  padding: 6px 2px;
}

.site-nav a:hover, .site-nav a:focus-visible { color: var(--accent); }

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: 0.05em;
  transition: transform 0.25s, box-shadow 0.25s, background 0.25s, color 0.25s;
}

.btn-primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #04121a;
  box-shadow: 0 4px 24px rgba(94, 234, 212, 0.28);
}

.btn-primary:hover, .btn-primary:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(94, 234, 212, 0.45);
}

.btn-ghost {
  border: 1px solid rgba(94, 234, 212, 0.45);
  color: var(--accent);
}

.btn-ghost:hover, .btn-ghost:focus-visible {
  background: rgba(94, 234, 212, 0.1);
  transform: translateY(-2px);
}

.btn-small { padding: 9px 22px; font-size: 0.88rem; }

a:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- ヒーロー ---------- */
.hero {
  min-height: 100vh; /* 100svh 非対応ブラウザ向けフォールバック */
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--header-h) + 48px) clamp(20px, 5vw, 64px) 48px;
  position: relative;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
  width: 100%;
}

.eyebrow {
  font-family: var(--font-en);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.32em;
  color: var(--accent);
  margin-bottom: 18px;
}

.hero-name {
  font-size: clamp(2.8rem, 7vw, 4.6rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: 0.06em;
}

.hero-name .accent {
  background: linear-gradient(120deg, var(--accent), var(--accent-2), var(--accent-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-romaji {
  font-family: var(--font-en);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  color: var(--text-muted);
  margin: 10px 0 26px;
}

.hero-lead {
  font-size: clamp(1rem, 1.6vw, 1.13rem);
  color: var(--text-muted);
  margin-bottom: 34px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, auto);
  gap: clamp(16px, 3vw, 40px);
  justify-content: start;
  margin-bottom: 40px;
}

.stat { display: flex; flex-direction: column; }

.stat-value {
  font-family: var(--font-en);
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
  text-shadow: 0 0 24px rgba(94, 234, 212, 0.4);
}

.stat-value small {
  font-family: var(--font-jp);
  font-size: 0.55em;
  font-weight: 700;
  margin-left: 2px;
  color: var(--text);
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-visual { display: flex; justify-content: center; }

.portrait-frame {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 460px;
  border: 1px solid rgba(94, 234, 212, 0.3);
  box-shadow:
    0 0 0 1px rgba(4, 7, 15, 0.8),
    0 18px 60px rgba(0, 0, 0, 0.55),
    0 0 80px rgba(56, 189, 248, 0.12);
}

.portrait-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(200deg, rgba(94, 234, 212, 0.12), transparent 38%, rgba(4, 7, 15, 0.35));
  pointer-events: none;
}

.portrait-frame img { aspect-ratio: 3 / 2; object-fit: cover; }

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  width: 26px; height: 44px;
  border: 1.5px solid rgba(157, 176, 201, 0.5);
  border-radius: 14px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
}

.scroll-cue span {
  width: 4px; height: 9px;
  border-radius: 3px;
  background: var(--accent);
  animation: cue 1.8s ease-in-out infinite;
}

@keyframes cue {
  0%, 100% { transform: translateY(0); opacity: 1; }
  60% { transform: translateY(12px); opacity: 0.2; }
}

/* ---------- セクション共通 ---------- */
.section { padding: clamp(72px, 10vw, 120px) clamp(20px, 5vw, 64px); }

.section-inner { max-width: 1080px; margin: 0 auto; }

.section-eyebrow {
  font-family: var(--font-en);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.32em;
  color: var(--accent);
  margin-bottom: 10px;
}

.section-title {
  font-size: clamp(1.7rem, 3.6vw, 2.4rem);
  font-weight: 900;
  letter-spacing: 0.05em;
  margin-bottom: 18px;
  position: relative;
  padding-bottom: 18px;
}

.section-title::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 56px; height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 16px var(--glow);
}

.section-lead { color: var(--text-muted); margin-bottom: 40px; max-width: 720px; }

.text-link {
  display: inline-block;
  color: var(--accent);
  font-weight: 500;
  font-size: 0.92rem;
  border-bottom: 1px solid rgba(94, 234, 212, 0.4);
  transition: border-color 0.25s, color 0.25s;
  margin-top: 8px;
}

.text-link:hover, .text-link:focus-visible {
  color: var(--accent-2);
  border-color: var(--accent-2);
}

/* ---------- 強みカード ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 22px;
  margin-top: 36px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgba(94, 234, 212, 0.45);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.4), 0 0 36px rgba(94, 234, 212, 0.1);
}

.card-icon {
  width: 48px; height: 48px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(94, 234, 212, 0.16), rgba(56, 189, 248, 0.16));
  border: 1px solid rgba(94, 234, 212, 0.3);
  margin-bottom: 18px;
}

.card-icon svg { width: 24px; height: 24px; fill: var(--accent); }

.card h3 { font-size: 1.12rem; font-weight: 700; margin-bottom: 10px; }

.card p { font-size: 0.93rem; color: var(--text-muted); }

.tag-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tag-list li {
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--accent);
  border: 1px solid rgba(94, 234, 212, 0.3);
  border-radius: 999px;
  padding: 3px 12px;
  background: rgba(94, 234, 212, 0.06);
}

/* ---------- 経歴タイムライン ---------- */
.timeline {
  list-style: none;
  margin-top: 40px;
  position: relative;
  padding-left: 34px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 8px; top: 8px; bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2), var(--accent-3));
  opacity: 0.45;
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  padding-bottom: 38px;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-item::before {
  content: "";
  position: absolute;
  left: -33px; top: 9px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 2.5px solid var(--accent);
  box-shadow: 0 0 14px var(--glow);
}

.timeline-item h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 6px; }

.timeline-item p { color: var(--text-muted); font-size: 0.95rem; max-width: 640px; }

/* ---------- 著書 ---------- */
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px;
  margin-top: 40px;
  max-width: 720px;
}

.book-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.book-card:hover {
  transform: translateY(-6px);
  border-color: rgba(94, 234, 212, 0.45);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.4), 0 0 36px rgba(94, 234, 212, 0.1);
}

.book-card img {
  width: min(200px, 70%);
  margin: 0 auto 20px;
  border-radius: 6px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s;
}

.book-card:hover img { transform: scale(1.03); }

.book-card h3 { font-size: 1.02rem; font-weight: 700; line-height: 1.5; margin-bottom: 6px; }

.book-card p { font-size: 0.85rem; color: var(--text-muted); }

/* ---------- 登壇 ---------- */
.talk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.talk-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
}

.talk-card:hover {
  transform: translateY(-6px);
  border-color: rgba(94, 234, 212, 0.45);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.4), 0 0 36px rgba(94, 234, 212, 0.1);
}

.talk-card > img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  width: 100%;
  border-bottom: 1px solid var(--line);
}

.talk-body { padding: 22px 24px 26px; }

.talk-body h3 { font-size: 1.02rem; font-weight: 700; line-height: 1.55; margin-bottom: 8px; }

.talk-body p { font-size: 0.88rem; color: var(--text-muted); }

/* ---------- 資格 ---------- */
.cert-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.cert-list li {
  font-size: 0.92rem;
  font-weight: 500;
  padding: 10px 22px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color 0.3s, color 0.3s;
}

.cert-list li:hover { border-color: rgba(94, 234, 212, 0.5); color: var(--accent); }

/* ---------- 連絡 ---------- */
.section-contact {
  padding-bottom: clamp(96px, 12vw, 150px);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
  max-width: 880px;
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.contact-card:hover, .contact-card:focus-visible {
  transform: translateY(-6px);
  border-color: rgba(94, 234, 212, 0.55);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.4), 0 0 36px rgba(94, 234, 212, 0.14);
}

.contact-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(94, 234, 212, 0.16), rgba(129, 140, 248, 0.16));
  border: 1px solid rgba(94, 234, 212, 0.3);
  margin-bottom: 8px;
}

.contact-icon svg { width: 22px; height: 22px; fill: var(--accent); }

.contact-label { font-weight: 700; font-size: 1.02rem; }

.contact-detail { font-size: 0.86rem; color: var(--text-muted); word-break: break-all; }

/* ---------- フッター ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px clamp(20px, 5vw, 64px);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-family: var(--font-en);
  letter-spacing: 0.08em;
  background: rgba(4, 7, 15, 0.6);
}

/* ---------- スクロールリビール ----------
   JS が有効なとき（html.js）だけ初期非表示にする。
   JS が無効・失敗した環境でもコンテンツは見える。 */
html.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

html.js .reveal.visible { opacity: 1; transform: none; }

/* ---------- レスポンシブ ---------- */
@media (max-width: 880px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .portrait-frame { max-width: 380px; }
  .hero { padding-top: calc(var(--header-h) + 28px); }
  .hero-stats { grid-template-columns: repeat(2, auto); row-gap: 18px; }
}

@media (max-width: 720px) {
  .site-nav { display: none; }
  .pc-only { display: none; }
  .scroll-cue { display: none; }
}

/* ---------- モーション配慮 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-cue span { animation: none; }
  .btn, .card, .book-card, .talk-card, .contact-card { transition: none; }
}
