/* ============================================================
   Galaxy Power — styles.css
   Deep-space theme. Complements Tailwind CDN utilities.
   ============================================================ */

:root {
  --gp-bg-deep: #050b18;
  --gp-bg-mid: #0a1628;
  --gp-bg-card: #111d33;
  --gp-border: rgba(120, 160, 220, 0.15);
  --gp-accent: #4a9eff;
  --gp-accent-soft: #7b6cff;
  --gp-gold: #c9a962;
  --gp-text: #e8edf5;
  --gp-text-muted: #8b9bb4;
  --gp-text-dark: #0f1729;
  --gp-surface-light: #f7f9fc;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", "Noto Sans TC", system-ui, sans-serif;
  background: var(--gp-bg-deep);
  color: var(--gp-text);
  -webkit-font-smoothing: antialiased;
}

/* ---------- Typography ---------- */
.font-wordmark {
  font-family: "Playfair Display", "Noto Serif TC", Georgia, serif;
  letter-spacing: 0.02em;
}

.font-mono-label {
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ---------- Navigation ---------- */
.nav-glass {
  background: rgba(5, 11, 24, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.nav-glass.is-scrolled {
  border-bottom-color: var(--gp-border);
  background: rgba(5, 11, 24, 0.92);
}

.nav-link {
  color: var(--gp-text-muted);
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--gp-text);
}

/* Language toggle */
.lang-btn {
  border: 1px solid var(--gp-border);
  background: rgba(17, 29, 51, 0.6);
  color: var(--gp-text-muted);
  transition: all 0.2s ease;
}

.lang-btn:hover {
  border-color: rgba(74, 158, 255, 0.4);
  color: var(--gp-text);
}

.lang-btn.is-active {
  background: rgba(74, 158, 255, 0.15);
  border-color: var(--gp-accent);
  color: var(--gp-accent);
}

/* ---------- Hero ---------- */
.hero-section {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

#particles-js {
  position: absolute;
  inset: 0;
  z-index: 1;
}

#particles-js canvas {
  display: block;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    180deg,
    rgba(5, 11, 24, 0.05) 0%,
    rgba(5, 11, 24, 0.22) 50%,
    rgba(5, 11, 24, 0.5) 100%
  );
  pointer-events: none;
}

.hero-glow {
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: 60vw;
  height: 40vh;
  background: radial-gradient(ellipse, rgba(74, 158, 255, 0.12) 0%, transparent 70%);
  z-index: 1;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 3;
}

/* AOS safety: never leave content invisible if JS fails */
[data-aos] {
  pointer-events: auto;
}

body:not(.aos-init) [data-aos] {
  opacity: 1;
  transform: none;
}

.tilt-card {
  will-change: transform;
}

/* ---------- Buttons ---------- */
.btn-primary {
  background: linear-gradient(135deg, var(--gp-accent) 0%, var(--gp-accent-soft) 100%);
  color: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(74, 158, 255, 0.3);
}

.btn-ghost {
  border: 1px solid var(--gp-border);
  color: var(--gp-text);
  background: rgba(17, 29, 51, 0.4);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.btn-ghost:hover {
  border-color: rgba(74, 158, 255, 0.45);
  background: rgba(74, 158, 255, 0.08);
}

/* ---------- Cards (3D Tilt) ---------- */
.tilt-card {
  background: var(--gp-bg-card);
  border: 1px solid var(--gp-border);
  border-radius: 1rem;
  transform-style: preserve-3d;
  transition: border-color 0.3s ease;
}

.tilt-card:hover {
  border-color: rgba(74, 158, 255, 0.35);
}

.tilt-card__icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, rgba(74, 158, 255, 0.2), rgba(123, 108, 255, 0.15));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--gp-accent);
}

/* ---------- Light sections ---------- */
.section-light {
  background: var(--gp-surface-light);
  color: var(--gp-text-dark);
}

.section-light .text-muted {
  color: #5a6b82;
}

/* ---------- Contact email ---------- */
.email-btn {
  background: var(--gp-bg-card);
  border: 1px solid var(--gp-border);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.email-btn:hover {
  border-color: var(--gp-accent);
  background: rgba(74, 158, 255, 0.08);
}

.email-btn.is-copied {
  border-color: #34d399;
  color: #34d399;
}

/* ---------- Footer ---------- */
.footer-glow {
  border-top: 1px solid var(--gp-border);
  background: linear-gradient(180deg, var(--gp-bg-mid) 0%, var(--gp-bg-deep) 100%);
}

/* ---------- Mobile nav ---------- */
.nav-mobile {
  display: none;
}

@media (max-width: 768px) {
  .nav-links-desktop {
    display: none;
  }

  .nav-mobile {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem 0;
    border-top: 1px solid var(--gp-border);
  }

  .nav-mobile.is-open {
    display: flex;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn-primary:hover {
    transform: none;
  }
}