/* ============================================================
   style.css  –  PortFolio スタイルシート
   ============================================================ */

/* ---------- リセット & ベース ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

:root {
  --bg:          #08080d;
  --surface:     #0d0d18;
  --border:      rgba(255, 255, 255, 0.07);
  --border-mid:  rgba(255, 255, 255, 0.13);
  --text-main:   #eaeaf4;
  --text-sub:    #64648c;
  --text-hint:   #35354e;
  --accent:      #7c6dff;
  --accent-glow: rgba(124, 109, 255, 0.22);
  --accent-bg:   rgba(124, 109, 255, 0.11);
  --accent-text: #a89fff;
  --tag-game-bg: rgba(124, 109, 255, 0.13);
  --tag-game-tx: #a89fff;
  --tag-tool-bg: rgba(255, 171, 55, 0.13);
  --tag-tool-tx: #ffb84d;
  --tag-other-bg:rgba(56, 214, 152, 0.13);
  --tag-other-tx:#38d698;
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --font: 'Inter', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Noto Sans JP', sans-serif;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-main);
  line-height: 1.7;
  min-height: 100vh;
}

/* ---------- レイアウト ---------- */
.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- Works 背景装飾（固定） ---------- */
.works-deco {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.works-deco-glow--tr {
  position: absolute;
  top: -40px; right: -80px;
  width: 520px; height: 420px;
  background: radial-gradient(ellipse at 65% 25%, rgba(124, 109, 255, 0.11) 0%, transparent 65%);
}
.works-deco-glow--bl {
  position: absolute;
  bottom: -60px; left: -80px;
  width: 420px; height: 340px;
  background: radial-gradient(ellipse at 30% 75%, rgba(124, 109, 255, 0.07) 0%, transparent 65%);
}
.works-deco-flower--tr {
  position: absolute;
  right: -60px; top: 60px;
  width: 340px;
  opacity: 0.09;
  user-select: none;
}
.works-deco-flower--bl {
  position: absolute;
  left: -40px; bottom: -20px;
  width: 170px;
  opacity: 0.05;
  transform: rotate(20deg) scaleX(-1);
  user-select: none;
}

/* ---------- ヘッダー ---------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 2.5rem 0 2rem;
  position: relative;
  overflow: hidden;
  z-index: 2;
}
/* グラデーション top ライン */
.site-header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--accent) 35%, var(--accent) 65%, transparent 100%);
}
/* 背景のアクセントグロー */
.site-header::after {
  content: '';
  position: absolute;
  top: -60px; left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 200px;
  background: radial-gradient(ellipse at 50% 0%, rgba(124, 109, 255, 0.08) 0%, transparent 70%);
  pointer-events: none;
}
/* 花装飾 */
.header-deco {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.deco-flower {
  position: absolute;
  user-select: none;
  opacity: 0.12;
}
.deco-flower--r {
  right: -100px;
  top: -40px;
  width: 420px;
}
.deco-flower--l {
  left: -50px;
  bottom: -50px;
  width: 200px;
  transform: rotate(20deg) scaleX(-1);
  opacity: 0.08;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  position: relative;
}
.site-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-main);
}
.site-sub {
  font-size: 10px;
  color: var(--text-hint);
  margin-top: 5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.header-profile {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 13px;
  flex-wrap: wrap;
  position: relative;
}
.profile-name {
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 0.05em;
}
.profile-dot { color: var(--text-hint); }
.profile-desc { color: var(--text-sub); }
.profile-realname {
  font-size: 11px;
  color: var(--text-hint);
  letter-spacing: 0.06em;
  font-weight: 500;
}
.profile-class {
  font-size: 12px;
  color: var(--text-hint);
}
.header-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex-shrink: 0;
}
.header-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 99px;
  border: 1px solid var(--border-mid);
  color: var(--text-hint);
  letter-spacing: 0.04em;
}
.header-badge.game  { background: var(--tag-game-bg);  color: var(--tag-game-tx);  border-color: transparent; }
.header-badge.tool  { background: var(--tag-tool-bg);  color: var(--tag-tool-tx);  border-color: transparent; }
.header-badge.other { background: var(--tag-other-bg); color: var(--tag-other-tx); border-color: transparent; }

/* ---------- About me ボタン ---------- */
.header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.about-btn {
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(124, 109, 255, 0.4);
  background: rgba(124, 109, 255, 0.1);
  color: var(--accent-text);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
  line-height: 1;
}
.about-btn:hover {
  background: rgba(124, 109, 255, 0.2);
  border-color: rgba(124, 109, 255, 0.65);
}

/* ---------- フィルターバー ---------- */
.filter-bar {
  background: rgba(13, 13, 24, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
  position: sticky;
  top: 0;
  z-index: 10;
}
.filter-bar .container {
  display: flex;
  gap: 6px;
}
.filter-btn {
  font-family: var(--font);
  font-size: 11px;
  font-weight: 500;
  padding: 5px 16px;
  border-radius: 99px;
  border: 1px solid var(--border-mid);
  background: transparent;
  color: var(--text-hint);
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.filter-btn:hover {
  background: var(--accent-bg);
  border-color: rgba(124, 109, 255, 0.3);
  color: var(--accent-text);
}
.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}

/* ---------- グリッド ---------- */
main.container { padding-top: 2rem; padding-bottom: 4rem; position: relative; z-index: 1; }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

/* ---------- アニメーション ---------- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- カード ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: border-color 0.22s, transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s;
  animation: fadeInUp 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
/* 上端のハイライトライン（ホバー時に accent に変化） */
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 15%; right: 15%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.07), transparent);
  transition: background 0.25s, left 0.25s, right 0.25s;
  z-index: 1;
}
.card:hover {
  border-color: rgba(124, 109, 255, 0.38);
  transform: translateY(-3px);
  box-shadow:
    0 0 0 1px rgba(124, 109, 255, 0.1),
    0 16px 48px rgba(0, 0, 0, 0.55),
    0 4px 20px var(--accent-glow);
}
.card:hover::before {
  left: 5%; right: 5%;
  background: linear-gradient(90deg, transparent, rgba(124, 109, 255, 0.35), transparent);
}

/* サムネイル */
.card-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0a0a14;
  overflow: hidden;
  flex-shrink: 0;
}
.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease, opacity 0.2s;
}
.card:hover .card-thumb img {
  transform: scale(1.04);
  opacity: 0.85;
}

/* カード本文 */
.card-body {
  padding: 1rem 1.125rem 1.125rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 99px;
  margin-bottom: 10px;
  align-self: flex-start;
}
.card-tag.game  { background: var(--tag-game-bg);  color: var(--tag-game-tx); }
.card-tag.tool  { background: var(--tag-tool-bg);  color: var(--tag-tool-tx); }
.card-tag.other { background: var(--tag-other-bg); color: var(--tag-other-tx); }

.card-body h2 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--text-main);
  line-height: 1.35;
  letter-spacing: 0.01em;
}
.card-body p {
  font-size: 12.5px;
  color: var(--text-sub);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.card-tech {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.card-tech-tag {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-mid);
  color: var(--text-sub);
  font-weight: 500;
  letter-spacing: 0.03em;
}
.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.card-period {
  font-size: 11px;
  color: var(--text-hint);
  letter-spacing: 0.03em;
}
.card-period strong {
  color: var(--text-sub);
  font-weight: 600;
}
.card-arrow {
  font-size: 13px;
  color: var(--text-hint);
  transition: transform 0.2s, color 0.2s;
  line-height: 1;
}
.card:hover .card-arrow {
  transform: translateX(4px);
  color: var(--accent-text);
}

.empty-msg {
  text-align: center;
  color: var(--text-hint);
  padding: 4rem 0;
  font-size: 14px;
}

/* ---------- オーバーレイ ---------- */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.overlay.open { display: flex; }

/* ---------- モーダル ---------- */
.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-mid);
  width: 100%;
  max-width: 720px;
  max-height: 88vh;
  overflow-y: auto;
  animation: slideUp 0.22s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow:
    0 0 0 1px rgba(124, 109, 255, 0.08),
    0 24px 80px rgba(0, 0, 0, 0.65);
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px) scale(0.99); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1.5rem 1.5rem 0;
  gap: 1rem;
}
.modal-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 99px;
  margin-bottom: 8px;
}
.modal-tag.game  { background: var(--tag-game-bg);  color: var(--tag-game-tx); }
.modal-tag.tool  { background: var(--tag-tool-bg);  color: var(--tag-tool-tx); }
.modal-tag.other { background: var(--tag-other-bg); color: var(--tag-other-tx); }

.modal-title {
  font-size: 21px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 0.02em;
  line-height: 1.3;
}
.close-btn {
  background: none;
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-md);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-hint);
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.close-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-sub);
}

/* ---------- ギャラリー ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 1.25rem 1.5rem;
}
.gallery-img {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  object-fit: cover;
  border: 1px solid var(--border);
  width: 100%;
  cursor: pointer;
  transition: opacity 0.15s, border-color 0.15s;
}
.gallery-img:hover { opacity: 0.8; border-color: var(--border-mid); }
.gallery-placeholder {
  aspect-ratio: 16 / 9;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--border-mid);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--text-hint);
  font-size: 11px;
}
.gallery-placeholder .ph-icon { font-size: 22px; }

/* ---------- モーダル詳細 ---------- */
.modal-body {
  padding: 0 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.detail-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1rem;
}
.detail-block {}

/* 担当箇所：brief ロール */
.detail-block .role-brief {
  font-size: 13px;
  color: var(--accent-text);
  font-weight: 600;
  margin-bottom: 10px;
}

/* 担当箇所：カード型セクションリスト */
.detail-role {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}
.role-section {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 14px 12px;
}
.role-heading {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent-text);
  background: var(--accent-bg);
  padding: 2px 9px;
  border-radius: 99px;
  margin-bottom: 8px;
}
.role-items {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.role-item {
  display: flex;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-main);
  line-height: 1.65;
}
.role-bullet {
  color: var(--accent-text);
  flex-shrink: 0;
  font-size: 11px;
  margin-top: 3px;
}
.role-item span:last-child { flex: 1; }
.role-text {
  font-size: 12.5px;
  color: var(--text-main);
  line-height: 1.65;
}

.detail-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-hint);
  margin-bottom: 6px;
}
.detail-block p {
  font-size: 14px;
  color: var(--text-main);
  line-height: 1.65;
}
.tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tech-tag {
  font-size: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm);
  padding: 4px 12px;
  color: var(--text-sub);
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* ---------- モーダル リンクボタン ---------- */
.modal-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  align-self: flex-start;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-text);
  background: var(--accent-bg);
  border: 1px solid rgba(124, 109, 255, 0.25);
  border-radius: var(--radius-md);
  padding: 7px 18px;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.modal-link-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 4px 16px var(--accent-glow);
}

/* ---------- ライトボックス ---------- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 200;
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: var(--radius-md);
  object-fit: contain;
}
.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #fff;
  font-size: 18px;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.15s;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.16); }

/* ---------- スクロールバー (モーダル) ---------- */
.modal::-webkit-scrollbar { width: 3px; }
.modal::-webkit-scrollbar-track { background: transparent; }
.modal::-webkit-scrollbar-thumb { background: var(--border-mid); border-radius: 99px; }

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

/* ---------- トースト ---------- */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--surface);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-md);
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(124, 109, 255, 0.12);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 300;
  white-space: nowrap;
}
.toast--show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- プロフィールモーダル ---------- */
.profile-modal {
  max-width: 560px;
}
.profile-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.profile-avatar-wrap { flex-shrink: 0; }
.profile-avatar {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
  display: block;
}
.profile-avatar--fallback {
  background: var(--accent-bg);
  border: 2px solid rgba(124, 109, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 700;
  color: var(--accent-text);
}
.profile-card-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.profile-card-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 0.03em;
}
.profile-card-handle {
  font-size: 12px;
  color: var(--text-hint);
  letter-spacing: 0.06em;
}
.profile-card-birthday {
  font-size: 12px;
  color: var(--text-hint);
  margin-top: 2px;
}

.profile-body {
  padding: 1rem 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.profile-intro {
  border-left: 3px solid var(--accent);
  padding: 10px 14px;
  background: var(--accent-bg);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--text-sub);
  font-size: 14px;
  line-height: 1.7;
}
.profile-section {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.section-desc {
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.7;
}
.section-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}
.section-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.section-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: opacity 0.15s, border-color 0.15s;
}
.section-grid img:hover {
  opacity: 0.8;
  border-color: var(--border-mid);
}

/* ---------- フッター ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  margin-top: 2rem;
  position: relative;
  z-index: 1;
}
.site-footer .container {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-hint);
  letter-spacing: 0.02em;
}
.footer-link {
  color: var(--text-sub);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
}
.footer-link:hover { color: var(--accent-text); }
.footer-sep { color: var(--border-mid); }
.footer-discord-copy {
  background: none;
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-hint);
  font-size: 13px;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  flex-shrink: 0;
}
.footer-discord-copy:hover {
  color: var(--text-sub);
  background: rgba(255, 255, 255, 0.04);
}
.footer-discord-copy[data-copied="1"] {
  color: var(--accent-text);
  border-color: rgba(124, 109, 255, 0.4);
}
