/* ════════════════════════════════════════
   SHARED STYLES — Character Profile Site
════════════════════════════════════════ */

:root {
  --ink-950: #05060d;
  --ink-900: #090b15;
  --ink-850: #0e1220;
  --surface: rgba(13, 16, 31, 0.72);
  --surface-strong: rgba(18, 22, 40, 0.92);
  --surface-soft: rgba(20, 24, 43, 0.58);
  --border-soft: rgba(220, 197, 150, 0.16);
  --border-strong: rgba(220, 197, 150, 0.28);
  --text-body: #ebe4d7;
  --text-muted: #b6af9d;
  --white-star: #fff8ea;
  --star-gold: #d7b56d;
  --star-amber: #e6a85d;
  --star-coral: #df8e83;
  --star-teal: #7dd7d0;
  --star-mint: #a6f0d1;
  --star-slate: #91a0c0;
  --star-purple: #b78dff;
  --violet: #9f73da;
  --lavender: #d8c8ff;
  --astro-teal: #7dd7d0;
  --seafoam: #a6f0d1;
  --emerald: #6bda96;
  --sage: #89c59b;
  --periwinkle: #9eb8e9;
  --gold: #d7b56d;
  --card-bg: var(--surface);
  --card-border: var(--border-soft);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}

body {
  background:
    radial-gradient(
      ellipse 72% 50% at 16% 18%,
      rgba(214, 181, 109, 0.18) 0%,
      transparent 60%
    ),
    radial-gradient(
      ellipse 58% 52% at 84% 22%,
      rgba(125, 215, 208, 0.14) 0%,
      transparent 58%
    ),
    radial-gradient(
      ellipse 56% 46% at 80% 78%,
      rgba(223, 142, 131, 0.12) 0%,
      transparent 62%
    ),
    radial-gradient(
      ellipse 42% 34% at 12% 76%,
      rgba(145, 160, 192, 0.12) 0%,
      transparent 62%
    ),
    linear-gradient(
      165deg,
      var(--ink-850) 0%,
      var(--ink-900) 42%,
      var(--ink-950) 100%
    );
  background-attachment: fixed;
  color: var(--text-body);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 400;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

body::before {
  background-image: radial-gradient(
    rgba(255, 248, 234, 0.08) 1px,
    transparent 1px
  );
  background-size: 30px 30px;
  opacity: 0.08;
  mix-blend-mode: screen;
}

body::after {
  background: linear-gradient(
    180deg,
    rgba(5, 6, 13, 0.1) 0%,
    rgba(5, 6, 13, 0.56) 100%
  );
  box-shadow: inset 0 0 220px rgba(5, 6, 13, 0.55);
}

/* ── Canvas sits above body bg ── */
#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* ── Slow-drift shimmer ── */
.nebula-layer {
  position: fixed;
  inset: -25%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(
      ellipse 38% 30% at 60% 40%,
      rgba(214, 181, 109, 0.12) 0%,
      transparent 70%
    ),
    radial-gradient(
      ellipse 32% 46% at 32% 68%,
      rgba(125, 215, 208, 0.12) 0%,
      transparent 70%
    ),
    radial-gradient(
      ellipse 30% 30% at 15% 35%,
      rgba(223, 142, 131, 0.1) 0%,
      transparent 70%
    );
  animation: nebulaFloat 22s ease-in-out infinite alternate;
}

@keyframes nebulaFloat {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 0.7;
  }
  50% {
    transform: translate(3%, 2%) scale(1.06);
    opacity: 1;
  }
  100% {
    transform: translate(-2%, 4%) scale(0.96);
    opacity: 0.6;
  }
}

/* ── Page wrapper ── */
.page-wrapper {
  position: relative;
  z-index: 2;
  max-width: 1220px;
  margin: 0 auto;
  padding: clamp(2rem, 4vw, 4.5rem) clamp(1rem, 3vw, 2rem) 6rem;
  display: flex;
  flex-direction: column;
  gap: clamp(1.5rem, 3vw, 2.75rem);
}

/* ── Section title ── */
.section-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--star-gold);
  text-align: center;
  margin-bottom: 1.6rem;
  position: relative;
  padding-bottom: 1rem;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(215, 181, 109, 0.15),
    var(--star-gold),
    rgba(125, 215, 208, 0.15),
    transparent
  );
}

/* ── Card base ── */
.card {
  background: linear-gradient(
    180deg,
    rgba(24, 28, 48, 0.82) 0%,
    rgba(10, 12, 24, 0.74) 100%
  );
  border: 1px solid var(--border-soft);
  border-radius: 1.4rem;
  backdrop-filter: blur(24px) saturate(120%);
  box-shadow:
    0 24px 90px rgba(0, 0, 0, 0.38),
    0 0 42px rgba(125, 215, 208, 0.05),
    inset 0 1px 0 rgba(255, 248, 234, 0.04);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 8%;
  right: 8%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(215, 181, 109, 0.12),
    var(--star-gold),
    rgba(125, 215, 208, 0.36),
    rgba(215, 181, 109, 0.12),
    transparent
  );
}

/* ── Pills ── */
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.pill {
  padding: 0.28rem 0.85rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid;
  transition: all 0.3s;
  cursor: default;
}

.pill:hover {
  transform: translateY(-1px);
}
.pill-purple {
  background: rgba(215, 181, 109, 0.09);
  border-color: rgba(215, 181, 109, 0.34);
  color: var(--star-gold);
}
.pill-teal {
  background: rgba(125, 215, 208, 0.08);
  border-color: rgba(125, 215, 208, 0.34);
  color: var(--star-teal);
}
.pill-blue {
  background: rgba(145, 160, 192, 0.09);
  border-color: rgba(145, 160, 192, 0.34);
  color: var(--star-slate);
}
.pill-gold {
  background: rgba(230, 168, 93, 0.09);
  border-color: rgba(230, 168, 93, 0.35);
  color: var(--star-amber);
}
.pill-green {
  background: rgba(166, 240, 209, 0.08);
  border-color: rgba(166, 240, 209, 0.3);
  color: var(--star-mint);
}

/* ── Divider ── */
.info-divider {
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(215, 181, 109, 0.38),
    rgba(125, 215, 208, 0.16),
    transparent
  );
}

/* ── Fade-up scroll animation ── */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.65s ease,
    transform 0.65s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Footer ── */
footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  font-family: "Space Grotesk", sans-serif;
  text-transform: uppercase;
}
footer span {
  color: var(--star-gold);
}

/* ── Back link ── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  text-decoration: none;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition:
    color 0.3s,
    transform 0.3s;
  margin-bottom: 0.5rem;
}
.back-link:hover {
  color: var(--star-gold);
  transform: translateX(-2px);
}

/* ── View-all button ── */
.view-all-btn {
  display: block;
  margin: 1.75rem auto 0;
  width: fit-content;
  padding: 0.75rem 2.5rem;
  background: transparent;
  border: 1px solid rgba(215, 181, 109, 0.35);
  border-radius: 999px;
  color: var(--white-star);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  transition: all 0.3s;
}
.view-all-btn:hover {
  background: rgba(215, 181, 109, 0.09);
  border-color: rgba(215, 181, 109, 0.7);
  color: var(--white-star);
  box-shadow: 0 0 24px rgba(215, 181, 109, 0.18);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
