:root {
  --bg: #0f1226;
  --bg-soft: #171a35;
  --card: #1d2142;
  --card-hover: #242a55;
  --line: #2c3260;
  --text: #eef0ff;
  --muted: #a3a9d4;
  --accent: #6c8cff;
  --accent-2: #b07bff;
  --team: #4fd1c5;
  --indiv: #f6ad55;
  --radius: 18px;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Noto Sans KR", system-ui, -apple-system, sans-serif;
  background: radial-gradient(1200px 600px at 80% -10%, #2a2f63 0%, transparent 55%),
              radial-gradient(900px 500px at 0% 0%, #3a2a63 0%, transparent 50%),
              var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Hero ---------- */
.hero {
  padding: 84px 24px 56px;
  text-align: center;
}
.hero-inner { max-width: 880px; margin: 0 auto; }
.hero-eyebrow {
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0 0 18px;
  font-weight: 700;
}
.hero-title {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 900;
  line-height: 1.18;
  margin: 0;
}
.hero-title span {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  color: var(--muted);
  max-width: 620px;
  margin: 22px auto 0;
  font-size: 1.02rem;
}
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 40px;
}
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong {
  font-size: 2rem;
  font-weight: 900;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-stats span { color: var(--muted); font-size: 0.85rem; }

/* ---------- Filters ---------- */
.filters {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  background: rgba(15, 18, 38, 0.78);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.filter-btn {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  padding: 9px 20px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
}
.filter-btn:hover { color: var(--text); border-color: var(--accent); }
.filter-btn.active {
  color: #fff;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-color: transparent;
}

/* ---------- Grid ---------- */
.grid {
  max-width: 1240px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 24px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px 22px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  opacity: 0.85;
}
.card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  background: var(--card-hover);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.card-num {
  font-size: 0.8rem;
  font-weight: 900;
  color: var(--muted);
  letter-spacing: 0.05em;
}
.badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid;
}
.badge.team { color: var(--team); border-color: rgba(79, 209, 197, 0.5); background: rgba(79, 209, 197, 0.1); }
.badge.individual { color: var(--indiv); border-color: rgba(246, 173, 85, 0.5); background: rgba(246, 173, 85, 0.1); }

.card-title { font-size: 1.32rem; font-weight: 900; margin: 0 0 4px; }
.card-subtitle { color: var(--accent); font-size: 0.9rem; font-weight: 700; margin: 0 0 12px; }
.card-team {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 10px;
}
.card-desc {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0 0 18px;
  flex-grow: 1;
}

.members { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 20px; }
.chip {
  font-size: 0.78rem;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--text);
}
.chip .sid { color: var(--muted); font-size: 0.7rem; margin-left: 4px; }

.card-actions { display: flex; flex-direction: column; gap: 9px; margin-top: auto; }
.row { display: flex; gap: 9px; }
.btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 14px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--text);
  text-decoration: none;
  transition: all 0.16s ease;
}
.btn:hover { border-color: var(--accent); background: #20264f; }
.btn.primary {
  background: linear-gradient(90deg, #ff7a59, #ffb14a);
  border-color: transparent;
  color: #2a1500;
}
.btn.primary:hover { filter: brightness(1.07); }
.btn.full { width: 100%; }

.spaces-extra {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.spaces-extra a {
  font-size: 0.74rem;
  color: var(--muted);
  text-decoration: none;
  border: 1px dashed var(--line);
  padding: 3px 9px;
  border-radius: 999px;
}
.spaces-extra a:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.84rem;
  padding: 30px 24px 50px;
  border-top: 1px solid var(--line);
}

/* ---------- Viewer ---------- */
.viewer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.viewer.open { display: flex; }
.viewer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 6, 18, 0.78);
  backdrop-filter: blur(4px);
}
.viewer-panel {
  position: relative;
  width: min(1100px, 100%);
  height: min(92vh, 100%);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.viewer-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.viewer-title { font-size: 1.02rem; font-weight: 900; margin: 0; flex: 1; min-width: 140px; }
.viewer-tabs { display: flex; gap: 6px; }
.vtab {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  padding: 7px 16px;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}
.vtab.active { color: #fff; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-color: transparent; }
.viewer-actions { display: flex; gap: 8px; align-items: center; }
.vbtn {
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.84rem;
  cursor: pointer;
  text-decoration: none;
}
.vbtn:hover { border-color: var(--accent); }
.vbtn.close { padding: 8px 12px; }
.viewer-body { flex: 1; background: #525659; }
#viewer-frame { width: 100%; height: 100%; border: 0; }

/* ---------- 수강 경험 카드 ---------- */
.hero-sub-page { padding: 70px 24px 40px; }
.hero-link {
  display: inline-block;
  margin-top: 26px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
  border: 1px solid var(--line);
  padding: 9px 18px;
  border-radius: 999px;
  transition: all 0.16s ease;
}
.hero-link:hover { border-color: var(--accent); background: rgba(108, 140, 255, 0.12); }

/* index 상단 경험 페이지로 가는 버튼 */
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 30px;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: var(--shadow);
  transition: filter 0.16s ease, transform 0.16s ease;
}
.nav-cta:hover { filter: brightness(1.08); transform: translateY(-2px); }

.exp-grid { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); align-items: start; }

.exp-card { padding-bottom: 18px; }
.exp-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.05rem;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.exp-name { font-size: 1.18rem; margin-bottom: 14px; }
.exp-text {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.72;
  overflow: hidden;
  max-height: 13.5em;
  position: relative;
  transition: max-height 0.35s ease;
}
.exp-text::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3.2em;
  background: linear-gradient(to bottom, rgba(29, 33, 66, 0), var(--card));
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.card:hover .exp-text::after { background: linear-gradient(to bottom, rgba(36, 42, 85, 0), var(--card-hover)); }
.exp-card.open .exp-text { max-height: 400em; }
.exp-card.open .exp-text::after { opacity: 0; }
.exp-card.exp-short .exp-text { max-height: none; }
.exp-card.exp-short .exp-text::after { display: none; }
.exp-text p { margin: 0 0 12px; }
.exp-text p:last-child { margin-bottom: 0; }
.exp-toggle { margin-top: 16px; width: 100%; }

@media (max-width: 560px) {
  .hero { padding: 56px 18px 40px; }
  .exp-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 28px; }
  .grid { padding: 28px 16px 60px; grid-template-columns: 1fr; }
  .viewer { padding: 0; }
  .viewer-panel { height: 100%; border-radius: 0; }
}
