:root {
    --bg-image: url('galaxy.jpg');
    /* <<< REPLACE this with your uploaded image path (e.g. ./uploads/andromeda-bg.jpg) */
    --bg-color: #06070b;
    --primary-1: #4B9BFF;
    /* electric blue */
    --primary-2: #8A2BE2;
    /* violet */
    --accent: linear-gradient(90deg, var(--primary-1), var(--primary-2));
    --glass-bg: rgba(12, 14, 20, 0.55);
    --muted: rgba(255, 255, 255, 0.72);
    --white: #ffffff;
    --radius: 12px;
    --max-width: 1200px;
}

/* Base */
* {
    box-sizing: border-box
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    background: var(--bg-color);
    color: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.modal-open {
  overflow: hidden;
}


/* container */
.container {
    width: calc(100% - 48px);
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}


.container.story-hero-content {
    margin-top: 50px !important;
}

/* Header / Nav */
.site-header {
    position: fixed;
    width: 100%;
    height: 80px;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(6px);
    background: rgba(5, 6, 10, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--white);
}

.logo-text {
    font-weight: 700;
    letter-spacing: 0.4px;
    font-size: 20px;
}

.logo-img {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    object-fit: cover;
}

/* Nav */
.nav {
    display: flex;
    gap: 32px;
    align-items: center
}

.nav-link {
    color: var(--muted);
    text-decoration: none;
    font-weight: 600;
    padding: 10px 8px;
    border-radius: 6px
}

.nav-link:hover {
    color: var(--white);
    box-shadow: inset 0 -3px 0 rgba(139, 43, 226, 0.12)
}

.nav-toggle {
    display: none;
    background: none;
    border: 0;
    cursor: pointer;
    z-index: 1002;
    position: relative;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    margin: 4px 0
}


/* Hamburger animation */
.nav-toggle.open span:nth-child(1){
  transform: translateY(6px) rotate(45deg);
}
.nav-toggle.open span:nth-child(2){
  opacity: 0;
}
.nav-toggle.open span:nth-child(3){
  transform: translateY(-6px) rotate(-45deg);
}
.nav-toggle span{
  transition: .3s ease;
}


/* HERO */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: var(--white);
    text-align: center;
    background-image: var(--bg-image);
    background-size: cover;
    background-position: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(4, 6, 10, 0.75) 0%, rgba(4, 6, 10, 0.45) 45%, rgba(4, 6, 10, 0.75) 100%);
    z-index: 3;
}

/* stars canvas sits above bg but below content */
.stars-canvas {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

/* hero content */
.hero-content {
    position: relative;
    z-index: 4;
    max-width: 960px;
    padding: 40px 16px;
}

.hero-title {
    font-family: "Orbitron", sans-serif;
    font-weight: 700;
    font-size: 72px;
    line-height: 0.95;
    margin: 0 0 18px 0;
    color: #bfa0ff;
    text-shadow: 0 8px 40px rgba(70, 0, 120, 0.45);
}

.hero-sub {
    font-size: 20px;
    margin: 0 0 28px;
    color: var(--muted);
}

/* buttons */
.btn {
    display: inline-block;
    padding: 12px 20px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: all .2s ease;
    color: #fff;
}

.btn.primary {
    background: var(--accent);
    box-shadow: 0 6px 30px rgba(35, 72, 236, 0.15), 0 2px 12px rgba(131, 40, 216, 0.12);
}

.btn.primary:hover {
    box-shadow: 0 8px 40px rgba(35, 72, 236, 0.25), 0 4px 16px rgba(131, 40, 216, 0.2);
    transform: translateY(-2px);
}

.btn.ghost {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--muted);
    margin-left: 12px;
}

.btn.ghost:hover {
    background: rgba(255, 255, 255, 0.02);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.12);
}

.btn.small {
    padding: 9px 14px;
    font-size: 13px;
    border-radius: 8px
}

/* SECTIONS */
.section {
    padding: 80px 0;
}

/* About */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 36px;
    align-items: center;
}

.about-card {
    padding: 28px;
    border-radius: 16px;
}

.glass {
    background: var(--glass-bg);
    border: 1px solid rgba(255, 255, 255, 0.04);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
}

.section-title {
    font-family: "Orbitron", sans-serif;
    color: #fff;
    font-size: 30px;
    margin: 0 0 12px 0;
    letter-spacing: 1px;
}

.section-title.small {
    font-size: 14px;
    color: var(--primary-2)
}

.about-title {
    font-family: "Orbitron", sans-serif;
    font-size: 36px;
    color: var(--primary-2);
    margin: 6px 0 8px;
}

.about-text {
    color: var(--muted);
    line-height: 1.6;
    margin: 12px 0;
    text-align: justify;
}

.about-art img {
    width: 100%;
    border-radius: 12px;
    object-fit: cover
    padding-left: 200px;
}

/* Stories grid */
.stories .section-sub {
    color: var(--muted);
    margin-bottom: 18px;
    text-align: center
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 28px;
}

.story-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0.01) 100%);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .18s ease, box-shadow .18s ease;
}

.story-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 14px 40px rgba(197, 196, 196, 0.6)
}

.card-media {
    height: 160px;
    background-size: cover;
    background-position: center;
}

.card-body {
    padding: 18px
}

.card-title {
    font-family: "Orbitron", sans-serif;
    margin: 0 0 8px;
    font-size: 18px;
    color: var(--primary-2)
}

.card-excerpt {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.5;
    margin: 0 0 14px;
    text-align: justify;
  }




/* ===============================
   CHAPTER LIST SIDEBAR
   =============================== */

.chapter-list {
  position: fixed;
  right: 20px;
  top: 140px;
  width: 220px;
  background: rgba(10,12,18,0.9);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: none;
  backdrop-filter: blur(10px);
  z-index: 1000;
}

.chapter-list h3 {
  font-size: 16px;
  margin-bottom: 10px;
  color: rgba(255,255,255,0.8);
}

.chapter-list ul {
  list-style: none;
  padding: 0;
  margin: 0;
}


.chapter-list li {
  padding: 8px 10px;
  margin-bottom: 6px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  transition: 0.2s;
}

.chapter-list li:hover {
  background: rgba(255,255,255,0.06);
  color: white;
}

.chapter-list li.active {
  background: linear-gradient(45deg,#4b9bff,#9b5cff);
  color: white;
}

/* Hide on mobile */
@media (max-width: 900px) {
  .chapter-list {
    display: none;
  }
}



/* ===============================
   MOBILE CHAPTER SELECTOR
   =============================== */

.mobile-only {
  display: none;
}

/* Show button only on mobile */
@media (max-width: 900px) {
  .mobile-only {
    display: inline-block;
  }
}

/* Modal background */
.chapter-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: none;
  align-items: flex-end;
  z-index: 9999;
}

/* Visible state */
.chapter-modal.show .chapter-modal-content {
  animation: slideUp 0.35s ease-out;
}
.chapter-modal.show {
  display: flex;
}

/* Bottom sheet container */
.chapter-modal-content {
  position: relative;
  background: #0b0e16;
  width: 100%;
  max-height: 75%;
  border-radius: 20px 20px 0 0;
  padding: 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;


  /* CRITICAL FIX */
  pointer-events: auto;
  z-index: 10000;
}

/* Prevent overlay from blocking content */
.chapter-modal * {
  pointer-events: auto;
}

/* Close button */
#close-chapters {
  margin-top: 15px;
  width: 100%;
  z-index: 10001;
}
.chapter-modal-content h3 {
  margin-top: 0;
  color: #fff;
}
.chapter-modal-content ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.chapter-modal-content li {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.8);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.chapter-modal-content li:hover {
  background: rgba(255,255,255,0.05);
  color: #fff;
}
.chapter-modal-content li.active {
  background: linear-gradient(45deg,#4b9bff,#9b5cff);
  color: white;
}

/* Close button full width */
.btn.full {
  width: 100%;
  margin-top: 15px;
}




/* ===============================
   CHAPTER NAV BUTTONS
   =============================== */





.chapter-nav {
    text-align: center;
    margin-top: 40px;
}

.chapter-nav .btn {
    padding: 14px 32px;
    background: linear-gradient(45deg, #4b9bff, #b04bff);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: 0.2s;
}

.chapter-nav .btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px #9b5cff;
}




/* Contact */
.contact-wrap {
    display: flex;
    justify-content: center
}

.contact-panel {
    max-width: 720px;
    padding: 28px
}

.form-row {
    display: block;
    margin-bottom: 18px
}

.label-text {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--white)
}

input[type="text"],
input[type="email"],
textarea {
    width: 100%;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    color: var(--white);
    font-size: 15px;
    outline: none;
}

input:focus,
textarea:focus {
    box-shadow: 0 0 16px rgba(138, 43, 226, 0.12);
    border-color: rgba(138, 43, 226, 0.22)
}

.form-actions {
    text-align: left
}

.form-result {
    margin-top: 10px;
    color: var(--primary-1)
}

/* Footer */
.site-footer {
    background: #04040a;
    padding: 36px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.03)
}

.footer-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px
}

.footer-links a {
    color: var(--muted);
    text-decoration: none;
    display: block;
    margin: 4px 0
}

.footer-social .social {
    display: inline-block;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: linear-gradient(90deg, #ffb26b, #ff7ba1);
    color: #fff;
    text-align: center;
    line-height: 36px;
    margin-left: 8px;
    text-decoration: none
}

.footer-logo {
    font-weight: 700;
    font-size: 18px
}

.muted {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px
}

/* Responsive */
@media (max-width:1000px) { 
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 54px;
    }

}

@media (max-width:640px) {    
    .nav {
        position: absolute;
        top: 72px;              /* below navbar */
        left: 0;
        width: 100%;
        background: rgba(5,6,10,0.98);
        backdrop-filter: blur(8px);
        display: none;
        flex-direction: column;
        gap: 0;
        padding: 12px 0;
        border-bottom: 1px solid rgba(255,255,255,0.05);
        z-index: 999;
    }

    .nav.open {
        display: flex;
    }

    .nav a {
        padding: 14px 24px;
        width: 100%;
        text-align: left;
        font-size: 16px;
        border-top: 1px solid rgba(255,255,255,0.04);
    }

    .nav-toggle {
        display: block;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 38px;
    }

    /* .header-inner {
        height: 72px;
    } */

    .site-header {
        height: 72px;
    }


    .hero {
        min-height: 70vh;
    }

    .logo-text {
        font-size: 16px;
    }

    .about-art img {
        display: none;
    }

    .footer-grid {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* 
