:root {
  --bg: #0a0b0f;
  --bg-soft: #12141c;
  --card: #14161f;
  --card-hover: #1a1d29;
  --border: #232634;
  --text: #e8eaf0;
  --muted: #8b90a3;
  --accent: #7c9cff;
  --accent-2: #b088ff;
  --radius: 16px;
  --wrap: 960px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* ambient glow */
.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(600px circle at 20% 0%, rgba(124,156,255,0.14), transparent 60%),
    radial-gradient(700px circle at 90% 20%, rgba(176,136,255,0.10), transparent 55%);
  pointer-events: none;
}

/* hero — centered worldview hub */
.hero { padding: 104px 0 64px; text-align: center; }

.avatar {
  width: 116px; height: 116px;
  margin: 0 auto 22px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 40px rgba(124,156,255,0.25);
}
.avatar img {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 3px solid var(--bg);
}

.handle-line {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  background: linear-gradient(180deg, #fff, #b9bed0);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 12px;
}

.lead {
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  color: var(--muted);
  max-width: 40ch;
  margin: 0 auto 30px;
}

/* 계정 링크 — 글자 그대로 쭉 연결, 점으로 구분 */
.links {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 0;
  font-size: 0.95rem;
}
.link {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  padding: 4px 14px;
  position: relative;
  transition: color .2s;
}
.link:hover { color: var(--text); }
/* 링크 사이 점 구분자 */
.link:not(:last-child)::after {
  content: "·";
  position: absolute;
  right: -2px;
  color: var(--border);
}

/* projects */
.projects { padding: 40px 0 80px; }
.section-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-bottom: 28px;
}

/* 프로젝트 = 화면 가로지르는 바 (한 줄에 하나, 클릭하면 펼쳐짐) */
.grid { display: flex; flex-direction: column; gap: 14px; }

.project {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
  position: relative;
  overflow: hidden;
}
.project::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(500px circle at var(--mx, 50%) var(--my, 50%), rgba(124,156,255,0.08), transparent 40%);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.project:not(.open):hover { transform: translateY(-2px); border-color: #33374a; background: var(--card-hover); }
.project:hover::before { opacity: 1; }
.project.open { border-color: #33374a; }

/* 헤더 바 (클릭 영역) */
.bar {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 22px 26px;
  cursor: pointer;
  user-select: none;
}

.bar-emoji {
  font-size: 1.7rem;
  line-height: 1;
  flex-shrink: 0;
  width: 40px;
  text-align: center;
  padding-top: 2px;
}

.bar-body { flex: 1; min-width: 0; }

.bar-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.bar-name {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: 1.2rem;
}

/* 상태 배지 */
.status {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
}
.status.concept  { color: #8b90a3; background: rgba(139,144,163,0.10); border-color: rgba(139,144,163,0.25); }
.status.building { color: var(--accent); background: rgba(124,156,255,0.10); border-color: rgba(124,156,255,0.28); }
.status.beta     { color: var(--accent-2); background: rgba(176,136,255,0.10); border-color: rgba(176,136,255,0.30); }
.status.released { color: #5ad19b; background: rgba(90,209,155,0.10); border-color: rgba(90,209,155,0.30); }
.status.sealed   { color: #6a6f82; background: rgba(106,111,130,0.10); border-color: rgba(106,111,130,0.28); }

.bar-desc { color: var(--muted); font-size: 0.96rem; }

.bar-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.tag {
  font-size: 0.72rem;
  color: var(--accent);
  background: rgba(124,156,255,0.10);
  border: 1px solid rgba(124,156,255,0.2);
  padding: 3px 10px;
  border-radius: 999px;
}

/* 오른쪽 끝: 펼침 화살표 */
.bar-toggle {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 0.9rem;
  padding-top: 4px;
  transition: transform .3s ease, color .2s;
}
.project.open .bar-toggle { transform: rotate(180deg); color: var(--text); }

/* 바 오른쪽: 토글 + 그 아래 링크 아이콘 (세로 스택) */
.bar-right { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; flex-shrink: 0; }
.bar-links { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.bar-link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  color: var(--muted);
  border: 1px solid var(--border);
  transition: color .2s, border-color .2s, background .2s, transform .2s;
}
.bar-link-icon:hover {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(124,156,255,0.08);
  transform: translateY(-1px);
}

/* ── 봉인(????) 프로젝트 ── */
.project.hidden .bar-name {
  color: #6a6f82;
  letter-spacing: 0.15em;
  font-weight: 500;
}
.project.hidden .bar-emoji { opacity: 0.5; }
.project.hidden .bar-desc { color: #565b6e; font-style: italic; }

/* ── 펼쳐지는 상세 페이지 ── */
.bar-detail {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .32s ease;
}
.project.open .bar-detail { grid-template-rows: 1fr; }
.bar-detail > .detail-inner { overflow: hidden; }
.detail-content {
  padding: 4px 26px 26px 86px;
  border-top: 1px solid transparent;
}
.project.open .detail-content { border-top-color: var(--border); padding-top: 22px; }
.detail-content p { color: #b8bccb; font-size: 0.97rem; margin-bottom: 14px; }
.detail-content p:last-child { margin-bottom: 0; }

/* 영역별 봉인 표시 (아직 안 채운 영역 = ????) */
.sealed-field {
  color: #565b6e;
  letter-spacing: 0.15em;
  font-weight: 500;
}
.bar-name .sealed-field { font-weight: 500; }
.tag.sealed-tag { color: #565b6e; background: rgba(106,111,130,0.08); border-color: rgba(106,111,130,0.22); letter-spacing: .12em; }

/* 상세 안 기능 블록 (기능마다 설명 + 사진/영상) */
.feature { margin-bottom: 24px; }
.feature:last-child { margin-bottom: 0; }
.feature-title {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--text);
  margin-bottom: 6px;
}
.feature-desc { color: #b8bccb; font-size: 0.95rem; margin-bottom: 12px; }
.feature-media img,
.feature-media video {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: block;
  background: #0d0e13;
}
.detail-sealed { color: #565b6e; font-style: italic; font-size: 0.95rem; }

/* 기능 탭 (책갈피) */
.tabs {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.tab {
  appearance: none;
  background: none;
  border: none;
  cursor: pointer;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  padding: 9px 16px;
  border-radius: 9px 9px 0 0;
  position: relative;
  transition: color .2s ease, background .2s ease;
}
.tab:hover { color: var(--text); background: rgba(255,255,255,0.03); }
.tab.active { color: var(--text); }
.tab.tab-sealed { color: #565b6e; letter-spacing: 0.12em; }
.tab::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .32s cubic-bezier(.2,.7,.2,1);
}
.tab.active::after { transform: scaleX(1); }

.tab-panel { display: none; }
.tab-panel.active { display: block; animation: tabIn .42s cubic-bezier(.2,.7,.2,1); }
@keyframes tabIn {
  from { opacity: 0; transform: translateY(10px); filter: blur(3px); }
  to   { opacity: 1; transform: none; filter: none; }
}

/* 상세 안의 액션 링크 (Site / Beta / Download / GitHub) */
.detail-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.detail-link {
  font-size: 0.85rem;
  color: var(--text);
  text-decoration: none;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: border-color .2s, background .2s;
}
.detail-link:hover { border-color: var(--accent); background: rgba(124,156,255,0.08); }
.detail-link .arrow { opacity: .55; }

/* 상세 안 이미지 자리 */
.detail-shot {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border);
  margin-top: 4px;
  display: block;
}

@media (max-width: 620px) {
  .bar { flex-wrap: nowrap; padding: 20px; gap: 14px; }
  .detail-content { padding: 22px 20px 24px; }
}

/* footer */
.foot { border-top: 1px solid var(--border); padding: 28px 0; }
.foot .wrap {
  display: flex; justify-content: space-between; align-items: center;
  color: var(--muted); font-size: 0.85rem; flex-wrap: wrap; gap: 8px;
}
.foot .muted { color: #565b6e; }

@media (max-width: 560px) {
  .hero { padding: 88px 0 56px; }
}

/* copy toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(12px);
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.88rem;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  z-index: 50;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast .ok { color: #5ad19b; margin-right: 6px; }
