/* Language-based font switching */
body.lang-kr { font-family: "Gowun Dodum", sans-serif; }
body.lang-en { font-family: "Cause", sans-serif; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.scroll-arrow {
  animation: fadeInUp 0.6s ease-out 3s forwards, bounce 2s ease-in-out 3.6s infinite;
  opacity: 0;
}

/* ============================
   SINGLE BACKGROUND STRATEGY
   - one black canvas, content floats above
   ============================ */
html, body { height: 100%; }
body {
  background: #000;
  color: #fff;
}

/* 섹션은 배경/페이드 없이 투명 + 통일된 간격만 */
.section {
  position: relative;
  z-index: 10;
  background: transparent;
}

/* 옵션: 섹션 연결을 더 부드럽게(끊김 완화) */
.section + .section {
  margin-top: -40px; /* 살짝 겹치게 해서 단절감 제거 */
}

/* 카드들만 살리고, 섹션 배경은 없애는 방향 */
.glass-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

/* ============================
   STARFIELD (PAGE-WIDE)
   ============================ */
.starfield {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
  --px: 0px;
  --py: 0px;
}

/* subtle nebula haze */
.starfield::before {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(60% 40% at 20% 30%, rgba(255,255,255,0.06), transparent 60%),
    radial-gradient(40% 30% at 80% 20%, rgba(255,255,255,0.04), transparent 55%),
    radial-gradient(50% 40% at 70% 80%, rgba(255,255,255,0.05), transparent 60%),
    radial-gradient(40% 35% at 30% 85%, rgba(255,255,255,0.035), transparent 60%);
  filter: blur(24px);
  opacity: 0.9;
  transform: translateZ(0);
}

.star {
  position: absolute;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  will-change: transform, opacity;
  box-shadow:
    0 0 10px rgba(255, 255, 255, 0.35),
    0 0 22px rgba(255, 255, 255, 0.18);
  left: 0;
  top: 0;
  transform: translate3d(
    calc(var(--x) + var(--px) * var(--depth)),
    calc(var(--y) + var(--py) * var(--depth)),
    0
  );
}

@keyframes starTwinkle {
  0% { opacity: 0.15; transform: translate3d(var(--x), var(--y), 0) scale(0.85); }
  20% { opacity: 0.85; transform: translate3d(var(--x), var(--y), 0) scale(1.05); }
  45% { opacity: 0.25; transform: translate3d(var(--x), var(--y), 0) scale(0.92); }
  70% { opacity: 1; transform: translate3d(var(--x), var(--y), 0) scale(1.12); }
  100% { opacity: 0.18; transform: translate3d(var(--x), var(--y), 0) scale(0.88); }
}

@keyframes starDrift {
  0% { transform: translate3d(calc(var(--x) + 0px), calc(var(--y) + 0px), 0); }
  50% { transform: translate3d(calc(var(--x) + 22px), calc(var(--y) - 16px), 0); }
  100% { transform: translate3d(calc(var(--x) - 18px), calc(var(--y) + 20px), 0); }
}

.star[data-anim="1"] {
  animation:
    starTwinkle var(--tw) cubic-bezier(0.4, 0, 0.6, 1) infinite,
    starDrift var(--dr) ease-in-out infinite;
  animation-delay: var(--delay);
}

.shooting {
  position: absolute;
  width: 220px;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0.9),
    rgba(255, 255, 255, 0)
  );
  filter: blur(0.4px);
  opacity: 0;
  transform: rotate(-20deg);
  will-change: transform, opacity;
}

@keyframes shooting {
  0% { opacity: 0; transform: translate3d(-20vw, -10vh, 0) rotate(-20deg); }
  10% { opacity: 0.9; }
  100% { opacity: 0; transform: translate3d(120vw, 60vh, 0) rotate(-20deg); }
}
.shooting.run { animation: shooting 1.2s ease-out forwards; }

/* Light mode: keep single background concept, just invert text + soften stars */
html.light-mode body { background: #fff; color: #000; }
html.light-mode .starfield::before { opacity: 0.35; }
html.light-mode .star { opacity: 0.14 !important; }
html.light-mode .glass-card { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.08); }

/* Light mode: navbar styling */
html.light-mode #navbar {
  background: rgba(255, 255, 255, 0.9) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom-color: rgba(0, 0, 0, 0.1) !important;
}

/* Light mode: navbar text and links */
html.light-mode #navbar * {
  color: #000 !important;
}

html.light-mode #navbar a:hover,
html.light-mode #navbar button:hover {
  color: #000 !important;
  opacity: 0.7;
}

/* Light mode: force all text to black */
html.light-mode,
html.light-mode *,
html.light-mode h1,
html.light-mode h2,
html.light-mode h3,
html.light-mode h4,
html.light-mode p,
html.light-mode span,
html.light-mode a,
html.light-mode button,
html.light-mode label,
html.light-mode input,
html.light-mode textarea,
html.light-mode select,
html.light-mode li,
html.light-mode div {
  color: #000 !important;
}

/* Override Tailwind text color classes in light mode */
html.light-mode .text-white,
html.light-mode .text-gray-300,
html.light-mode .text-gray-400,
html.light-mode .text-neutral-200,
html.light-mode .text-neutral-300,
html.light-mode .text-neutral-400,
html.light-mode .text-neutral-500 {
  color: #000 !important;
}

/* Keep hover states but make them darker in light mode */
html.light-mode a:hover,
html.light-mode button:hover {
  color: #000 !important;
  opacity: 0.7;
}

/* Light mode: select and option styling */
html.light-mode select {
  background: rgba(0, 0, 0, 0.04) !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
  color: #000 !important;
}

html.light-mode select:focus {
  background: rgba(0, 0, 0, 0.08) !important;
  border-color: rgba(0, 0, 0, 0.2) !important;
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.06) !important;
}

html.light-mode select option {
  background: #fff !important;
  color: #000 !important;
}

html.light-mode select option:hover,
html.light-mode select option:checked {
  background: rgba(0, 0, 0, 0.1) !important;
  color: #000 !important;
}



