/* ===== Base Styles ===== */
:root {
  color-scheme: dark;
  font-family: 'Orbitron', sans-serif;
  color: #e6e6ff;
  background-color: #050505;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top, rgba(0,255,255,0.14), transparent 28%),
              radial-gradient(circle at bottom left, rgba(176,119,255,0.16), transparent 22%),
              #050505;
  color: #ddd;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.container {
  width: min(1120px, 100% - 40px);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 60px 0;
}

.btn {
  display: inline-block;
  padding: 0.95rem 1.8rem;
  border: 2px solid cyan;
  border-radius: 999px;
  background: rgba(0, 255, 255, 0.08);
  color: #fff;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover,
.btn:focus {
  transform: translateY(-2px);
  box-shadow: 0 0 18px cyan;
  background: rgba(0, 255, 255, 0.18);
}

/* ===== Navbar ===== */
.navbar {
  background-color: #111;
  box-shadow: none;
  padding: 10px 40px;
  font-family: 'Orbitron', sans-serif;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-inner {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  color: cyan;
  font-size: 1.8rem;
  text-shadow: 0 0 10px cyan, 0 0 20px cyan;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 30px;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.nav-links a:hover {
  color: cyan;
  text-shadow: 0 0 10px cyan;
}

/* ===== Glowing underline ===== */
.nav-underline {
  height: 2px;
  background: cyan;
  box-shadow: 0 0 15px cyan;
}

/* === Character + Speech Bubble Section === */
.character-bubble-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin: 4rem auto;
  max-width: 800px;
  position: relative;
}

.character {
  width: 120px;
  height: auto;
  image-rendering: pixelated;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.speech-bubble {
  font-family: 'Orbitron', sans-serif;
  color: #00ffff;
  border: 2px solid #00ffff;
  padding: 1.5rem 2rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.6);
  box-shadow: 0 0 20px #00ffff, inset 0 0 10px #00ffff;
  text-align: center;
  line-height: 1.5;
}

/* ===== Hero Section ===== */
.hero {
  text-align: center;
  padding: 100px 20px;
}

.hero h2 {
  color: #b077ff;
  text-shadow: 0 0 20px #b077ff, 0 0 40px #b077ff;
  font-family: 'Orbitron', sans-serif;
  font-size: 2.5rem;
}

.hero p {
  color: #ddd;
  font-family: 'Orbitron', sans-serif;
  margin-top: 15px;
}

/* ===== Poem Section ===== */
.poem {
  text-align: center;
  max-width: 700px;
  margin: 60px auto;
  border: 2px solid #b077ff;
  border-radius: 12px;
  padding: 30px;
  color: #ccc;
  box-shadow: 0 0 20px #b077ff;
}

.poem h3 {
  color: cyan;
  text-shadow: 0 0 10px cyan;
  font-family: 'Orbitron', sans-serif;
}

.section-title {
  margin-bottom: 1rem;
}

.footer {
  text-align: center;
  padding: 30px 20px;
  color: #9bbbd4;
  font-size: 0.95rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.3);
}

@media (max-width: 780px) {
  .navbar {
    flex-wrap: wrap;
    padding: 18px 20px;
  }

  .nav-inner {
    flex-direction: column;
    gap: 18px;
  }

  .nav-links {
    flex-direction: column;
    gap: 14px;
    width: 100%;
    align-items: center;
  }

  .character-bubble-container {
    flex-direction: column;
    gap: 1.5rem;
    padding: 0 10px;
  }

  .hero {
    padding: 70px 16px;
  }

  .archer-container {
    position: static;
    margin: 2rem auto 0;
    top: auto;
    left: auto;
    width: fit-content;
  }
}

/* Glitch Hover Effect */
.nav-glitch {
  position: relative;
  color: #b3b3b3;
  transition: color 0.3s ease;
  text-shadow: none;
}

.nav-glitch::before,
.nav-glitch::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  width: 100%;
  overflow: hidden;
  color: cyan;
  clip: rect(0, 0, 0, 0);
}

.nav-glitch:hover {
  color: #00ffff;
  text-shadow: 0 0 5px #00ffff, 0 0 10px #00ffff;
}

.nav-glitch:hover::before {
  animation: glitchTop 0.5s infinite linear alternate-reverse;
  clip: rect(0, 9999px, 2px, 0);
}

.nav-glitch:hover::after {
  animation: glitchBottom 0.5s infinite linear alternate-reverse;
  clip: rect(12px, 9999px, 14px, 0);
}

@keyframes glitchTop {
  0% { transform: translate(0); }
  20% { transform: translate(-2px, -2px); }
  40% { transform: translate(-3px, 2px); }
  60% { transform: translate(2px, -1px); }
  80% { transform: translate(1px, 1px); }
  100% { transform: translate(0); }
}

@keyframes glitchBottom {
  0% { transform: translate(0); }
  20% { transform: translate(2px, 1px); }
  40% { transform: translate(3px, -2px); }
  60% { transform: translate(-2px, 1px); }
  80% { transform: translate(-1px, -1px); }
  100% { transform: translate(0); }
}

/* Apply same glitch effect to Library of Dreams link(s) by common selectors
   Softened the cyan to a gentler tone and reduced the glow for a cleaner look. */


/* Position Archer in the top-left corner */
.archer-container {
  position: absolute;
  top: 120px;  /* adjust if needed */
  left: 40px;  /* adjust if needed */
  display: flex;
  align-items: center;
  gap: 0; /* keep zero gap — bubble will be positioned absolutely */
  opacity: 0;
  animation: fadeIn 1.5s ease forwards;
}

/* Archer sprite */
.archer-sprite {
  width: 160px;
  image-rendering: pixelated;
}

/* Speech bubble */
.archer-bubble {
  position: absolute; /* position relative to .archer-container */
  left: 88px; /* pulled in closer to the sprite and the lamp/book grouping */
  top: 42%;
  transform: translateY(-50%);
  font-family: 'Orbitron', sans-serif;
  font-size: 11px;
  padding: 6px 10px; /* even smaller bubble for compact callout */
  border: 2px solid #00eaff;
  border-radius: 12px;
  color: #fff;
  text-shadow: 0 0 8px #00eaff;
  box-shadow: 0 0 20px #00eaff inset, 0 0 20px #00eaff;
  background: rgba(0,0,0,0.5);
  margin-left: 0;
  transition: transform 160ms ease, left 160ms ease;
  max-width: 150px;
  line-height: 1.2;
}

/* Fade-in animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.hero-title {
    font-size: 3rem !important;
    line-height: 1.1;
    color: #b077ff;
    text-shadow: 0 0 5px #b077ff, 0 0 10px #b077ff;
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 1.4s ease-out forwards;
}

.fade-up {
    animation: fadeInUp 1.4s ease-out forwards;
}


