/* ============================================
   KRISTI IVEY WRITER — Cosmic Futuristic Theme
   ============================================ */

/* --- CSS Variables --- */
:root {
  --bg-void: #040410;
  --bg-deep: #070718;
  --bg-surface: rgba(8, 12, 35, 0.75);
  --bg-elevated: rgba(12, 18, 50, 0.85);
  --bg-glass: rgba(10, 15, 40, 0.65);

  --cyan: #00e5ff;
  --cyan-dim: #00a5b8;
  --cyan-glow: rgba(0, 229, 255, 0.4);
  --purple: #b388ff;
  --purple-dim: #7c4dff;
  --gold: #ffd740;
  --gold-dim: #c6a700;
  --rose: #ff6b9d;

  --text: #e0e6ff;
  --text-bright: #f4f6ff;
  --text-muted: #9aa5cc;
  --text-dim: #6872a0;

  --border-subtle: rgba(0, 229, 255, 0.15);
  --border-glow: rgba(0, 229, 255, 0.25);
  --border-gold: rgba(255, 215, 64, 0.3);

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --font-display: 'Audiowide', sans-serif;
  --font-heading: 'Chakra Petch', sans-serif;
  --font-body: 'Nunito Sans', sans-serif;

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg-void);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
}

/* --- Starfield Canvas --- */
#starfield {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* Nebula overlay gradients */
.nebula-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 20% 30%, rgba(0, 229, 255, 0.03) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 80% 70%, rgba(179, 136, 255, 0.03) 0%, transparent 70%),
    radial-gradient(ellipse 90% 60% at 50% 100%, rgba(4, 4, 16, 0.9) 0%, transparent 50%);
}

/* Grain texture overlay */
.grain-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 2;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* --- Main Content Layer --- */
.content-layer {
  position: relative;
  z-index: 10;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 0 2rem;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(4, 4, 16, 0.65);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.4s var(--ease-out-expo),
              border-color 0.4s var(--ease-out-expo);
}

.nav.scrolled {
  background: rgba(4, 4, 16, 0.85);
  border-bottom-color: var(--border-glow);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-bright);
}

.nav-logo img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-glow);
  box-shadow: 0 0 12px var(--cyan-glow);
  transition: box-shadow 0.3s;
}

.nav-logo:hover img {
  box-shadow: 0 0 20px var(--cyan-glow), 0 0 40px rgba(0, 229, 255, 0.15);
}

.nav-logo-text {
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  position: relative;
  padding: 4px 0;
  transition: color 0.3s;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  border-radius: 1px;
  transition: width 0.3s var(--ease-out-expo);
  box-shadow: 0 0 8px var(--cyan-glow);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-bright);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-links a:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 4px;
  border-radius: 2px;
}

/* Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 160px;
  background: rgba(8, 12, 35, 0.9);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-sm);
  padding: 8px 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s var(--ease-out-expo);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 12px var(--cyan-glow);
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown-menu a {
  display: block;
  padding: 8px 20px;
  font-size: 0.85rem;
  white-space: nowrap;
}

.nav-dropdown-menu a::after { display: none; }

.nav-dropdown-menu a:hover {
  background: rgba(0, 229, 255, 0.08);
}

/* Mobile Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.3s var(--ease-out-expo), opacity 0.3s;
}

.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- Hero Section (Scroll-Expansion) --- */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

/* Hero Background Video — starts as centered card, expands on scroll */
.hero-video-wrap {
  position: absolute;
  z-index: 0;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 400px;
  height: 450px;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.5), 0 0 30px var(--cyan-glow);
  transition: box-shadow 0.3s;
}

.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-video-overlay {
  position: absolute;
  inset: 0;
  opacity: 0.6;
  background:
    radial-gradient(ellipse 80% 80% at 50% 50%, rgba(4, 4, 16, 0.25) 0%, rgba(4, 4, 16, 0.55) 70%),
    linear-gradient(to bottom, rgba(4, 4, 16, 0.1) 0%, rgba(4, 4, 16, 0.05) 40%, rgba(4, 4, 16, 0.7) 100%);
  border-radius: inherit;
}

.hero-emblem {
  position: relative;
  z-index: 1;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 2px solid var(--border-glow);
  box-shadow: 0 0 30px var(--cyan-glow), 0 0 60px rgba(0, 229, 255, 0.1);
  animation: float 6s ease-in-out infinite, emblemGlow 4s ease-in-out infinite alternate;
  margin-bottom: 2rem;
  will-change: transform, opacity;
}

/* Split title lines for scroll-expansion animation */
.hero-title-top,
.hero-title-bottom {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 7vw, 5.5rem);
  letter-spacing: 0.04em;
  line-height: 1.1;
  color: var(--text-bright);
  text-shadow: 0 0 40px var(--cyan-glow), 0 0 80px rgba(0, 229, 255, 0.15);
  will-change: transform;
  white-space: nowrap;
  animation: fadeInUp 1s var(--ease-out-expo) 0.3s both;
}

.hero-title-bottom {
  margin-bottom: 1rem;
  animation-delay: 0.45s;
}

.hero-title-bottom .highlight {
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-name {
  position: relative;
  z-index: 1;
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-weight: 300;
  color: var(--text-muted);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  animation: fadeInUp 1s var(--ease-out-expo) 0.6s both;
  will-change: opacity;
}

.hero-subtitle {
  position: relative;
  z-index: 1;
  font-family: var(--font-body);
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 500px;
  margin-top: 1.5rem;
  animation: fadeInUp 1s var(--ease-out-expo) 0.9s both;
  will-change: opacity;
}

.hero-scroll {
  position: absolute;
  z-index: 1;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
  will-change: opacity;
}

.hero-scroll svg {
  width: 24px;
  height: 24px;
  stroke: var(--cyan-dim);
  stroke-width: 2;
  fill: none;
}

/* Expand hint text */
.hero-expand-hint {
  position: absolute;
  z-index: 1;
  bottom: 5rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-heading);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cyan-dim);
  animation: fadeIn 1s var(--ease-out-expo) 1.5s both, pulseGlow 3s ease-in-out infinite;
}

/* Scroll lock only while hero expansion is active (JS adds .hero-expanding to body) */
body.hero-expanding {
  overflow: hidden;
}

/* --- Section Styles --- */
.section {
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-label {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-label::before {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--cyan);
  box-shadow: 0 0 6px var(--cyan-glow);
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  color: var(--text-bright);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 600px;
  line-height: 1.8;
  margin-bottom: 3rem;
}

/* --- Glass Cards --- */
.glass-card {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: transform 0.4s var(--ease-out-expo),
              border-color 0.4s,
              box-shadow 0.4s;
}

.glass-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-glow);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3),
              0 0 20px rgba(0, 229, 255, 0.08);
}

.glass-card-lg {
  padding: 3rem;
  border-radius: var(--radius-lg);
}

/* Card with image */
.glass-card-image {
  overflow: hidden;
  padding: 0;
}

.glass-card-image .card-img-wrap {
  position: relative;
  overflow: hidden;
}

.glass-card-image .card-img-wrap img {
  width: 100%;
  display: block;
  transition: transform 0.6s var(--ease-out-expo);
}

.glass-card-image:hover .card-img-wrap img {
  transform: scale(1.05);
}

.glass-card-image .card-img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(4, 4, 16, 0.8) 0%, transparent 60%);
}

.glass-card-image .card-body {
  padding: 1.5rem 2rem 2rem;
}

/* --- Book Card (Featured) --- */
.book-feature {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3rem;
  align-items: center;
}

.book-cover {
  width: 220px;
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5),
              0 0 20px rgba(0, 229, 255, 0.1);
  transition: transform 0.4s var(--ease-out-expo),
              box-shadow 0.4s;
}

.book-cover:hover {
  transform: translateY(-8px) rotate(-1deg);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6),
              0 0 30px var(--cyan-glow);
}

.book-info h3 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 0.75rem;
}

.book-info p {
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.3s var(--ease-spring),
              box-shadow 0.3s,
              background 0.3s;
}

.btn:active { transform: scale(0.97); }

.btn:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--cyan), var(--purple-dim));
  color: #fff;
  box-shadow: 0 4px 16px rgba(0, 229, 255, 0.25);
}

.btn-primary:hover {
  box-shadow: 0 6px 24px rgba(0, 229, 255, 0.4), 0 0 40px rgba(0, 229, 255, 0.15);
  transform: translateY(-2px);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-dim));
  color: #1a1a2e;
  box-shadow: 0 4px 16px rgba(255, 215, 64, 0.2);
}

.btn-gold:hover {
  box-shadow: 0 6px 24px rgba(255, 215, 64, 0.35), 0 0 30px rgba(255, 215, 64, 0.1);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--cyan);
  border: 1px solid var(--border-glow);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.05);
}

.btn-outline:hover {
  background: rgba(0, 229, 255, 0.08);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.12);
  transform: translateY(-2px);
}

/* --- Magnetize Button Particles --- */
.btn.magnetize {
  overflow: visible;
  z-index: 1;
}

.magnetize-particle {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  margin-top: -2.5px;
  margin-left: -2.5px;
  opacity: 0.35;
  pointer-events: none;
  z-index: -1;
  will-change: transform, opacity;
}

.btn.magnetize.magnetize-active {
  z-index: 2;
}

/* --- Divider --- */
.section-divider {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-glow), transparent);
}

/* --- Grid Layouts --- */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

/* --- Category Tag --- */
.tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 100px;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.tag-cyan {
  background: rgba(0, 229, 255, 0.12);
  color: var(--cyan);
  border: 1px solid rgba(0, 229, 255, 0.2);
}

.tag-purple {
  background: rgba(179, 136, 255, 0.12);
  color: var(--purple);
  border: 1px solid rgba(179, 136, 255, 0.2);
}

.tag-gold {
  background: rgba(255, 215, 64, 0.12);
  color: var(--gold);
  border: 1px solid rgba(255, 215, 64, 0.2);
}

/* --- Date Display --- */
.date-text {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}

/* --- Poem Display --- */
.poem-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  font-style: italic;
  line-height: 2;
  color: var(--text);
  max-width: 700px;
}

.poem-text p {
  margin-bottom: 0.5rem;
}

/* --- Blog Post Content --- */
.post-content {
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--text);
  max-width: 750px;
}

.post-content p {
  margin-bottom: 1.5rem;
}

.post-content a {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.post-content a:hover {
  color: var(--purple);
}

/* --- Footer --- */
.footer {
  position: relative;
  padding: 4rem 2rem 2rem;
  text-align: center;
  border-top: 1px solid var(--border-subtle);
  background: rgba(4, 4, 16, 0.5);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--cyan); }

.footer-social {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.footer-social a {
  color: var(--text-dim);
  transition: color 0.2s, transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
}

.footer-social a:hover {
  color: var(--cyan);
  border-color: var(--border-glow);
  transform: translateY(-2px);
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.footer-copy a {
  color: var(--cyan-dim);
  text-decoration: none;
}

/* --- About Section --- */
.about-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 3rem;
  align-items: start;
}

.about-photo {
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-glow);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4),
              0 0 20px rgba(0, 229, 255, 0.08);
}

/* --- Press Item --- */
.press-item {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.2s;
}

.press-item:last-child { border-bottom: none; }

.press-date {
  flex-shrink: 0;
  width: 80px;
  text-align: center;
}

.press-date .month {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cyan);
}

.press-date .day {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--text-bright);
  line-height: 1.2;
}

.press-date .year {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.press-body h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 0.5rem;
}

.press-body p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.press-body a {
  color: var(--cyan);
  text-decoration: none;
  font-size: 0.85rem;
}

.press-body a:hover { text-decoration: underline; }

/* --- Contact Info --- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.contact-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid var(--border-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan);
}

.contact-item h4 {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 4px;
}

.contact-item p,
.contact-item a {
  color: var(--text-muted);
  font-size: 0.95rem;
  text-decoration: none;
}

.contact-item a:hover { color: var(--cyan); }

/* --- Page Header (for subpages) --- */
.page-header {
  padding: 8rem 2rem 4rem;
  text-align: center;
}

.page-header h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--text-bright);
  text-shadow: 0 0 30px var(--cyan-glow);
  margin-bottom: 1rem;
}

.page-header p {
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.05rem;
}

/* --- Coming Soon Banner --- */
.coming-soon {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-gold);
}

.coming-soon::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg, transparent, rgba(255, 215, 64, 0.03), transparent, rgba(179, 136, 255, 0.03), transparent);
  animation: rotate 20s linear infinite;
}

.coming-soon-badge {
  display: inline-block;
  padding: 6px 16px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dim));
  color: #1a1a2e;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border-radius: 100px;
  margin-bottom: 1rem;
}

/* --- Scan Lines Effect (optional) --- */
.scanlines::after {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 3;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.015) 2px,
    rgba(0, 0, 0, 0.015) 4px
  );
}

/* --- Blog Card (for listings) --- */
.blog-card {
  text-decoration: none;
  color: inherit;
  display: block;
}

.blog-card .card-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 0.5rem;
  transition: color 0.2s;
}

.blog-card:hover .card-title { color: var(--cyan); }

.blog-card .card-excerpt {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- What's New (Homepage) --- */
.whats-new-text {
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--text-muted);
}

/* --- Animations --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@keyframes emblemGlow {
  0% { box-shadow: 0 0 30px var(--cyan-glow), 0 0 60px rgba(0, 229, 255, 0.1); }
  100% { box-shadow: 0 0 40px var(--cyan-glow), 0 0 80px rgba(0, 229, 255, 0.18), 0 0 120px rgba(179, 136, 255, 0.06); }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40% { transform: translateX(-50%) translateY(-8px); }
  60% { transform: translateX(-50%) translateY(-4px); }
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* Scroll-triggered fade-in: JS adds .reveal-ready to <html> before observing */
.reveal-ready .reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

.reveal-ready .reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children: only animate when JS is ready */
.reveal-ready .stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease-out-expo), transform 0.6s var(--ease-out-expo);
}

.stagger.visible > *:nth-child(1) { transition-delay: 0s; }
.stagger.visible > *:nth-child(2) { transition-delay: 0.1s; }
.stagger.visible > *:nth-child(3) { transition-delay: 0.2s; }
.stagger.visible > *:nth-child(4) { transition-delay: 0.3s; }
.stagger.visible > *:nth-child(5) { transition-delay: 0.4s; }
.stagger.visible > *:nth-child(6) { transition-delay: 0.5s; }

.stagger.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* --- Admin Panel Styles --- */
.admin-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.admin-form {
  width: 100%;
  max-width: 400px;
}

.admin-form input,
.admin-form textarea,
.admin-form select {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.admin-form input:focus,
.admin-form textarea:focus,
.admin-form select:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.15);
}

.admin-form label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.admin-form .form-group {
  margin-bottom: 1.5rem;
}

.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 100;
}

.admin-post-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.admin-post-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: var(--bg-surface);
  cursor: pointer;
  transition: background 0.2s;
}

.admin-post-item:hover {
  background: var(--bg-elevated);
}

.admin-post-item .post-title-text {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--text-bright);
}

.admin-post-item .post-meta {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.admin-editor textarea {
  min-height: 400px;
  resize: vertical;
  line-height: 1.8;
}

.status-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-published {
  background: rgba(0, 229, 255, 0.12);
  color: var(--cyan);
}

.status-draft {
  background: rgba(255, 215, 64, 0.12);
  color: var(--gold);
}

/* --- Rich Text Toolbar --- */
.editor-toolbar {
  display: flex;
  gap: 4px;
  padding: 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-bottom: none;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  flex-wrap: wrap;
}

.editor-toolbar button {
  padding: 6px 10px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  transition: background 0.2s, color 0.2s;
}

.editor-toolbar button:hover {
  background: rgba(0, 229, 255, 0.08);
  color: var(--text-bright);
  border-color: var(--border-subtle);
}

.editor-toolbar button.active {
  background: rgba(0, 229, 255, 0.15);
  color: var(--cyan);
}

.editor-content {
  min-height: 400px;
  padding: 1.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.8;
  outline: none;
  overflow-y: auto;
}

.editor-content:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.1);
}

.editor-content h1, .editor-content h2, .editor-content h3 {
  font-family: var(--font-heading);
  color: var(--text-bright);
  margin: 1rem 0 0.5rem;
}

.editor-content p { margin-bottom: 1rem; }

.editor-content a { color: var(--cyan); }

/* --- Notification Toast --- */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  padding: 1rem 1.5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-sm);
  color: var(--text-bright);
  font-size: 0.9rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 16px var(--cyan-glow);
  transform: translateY(100px);
  opacity: 0;
  transition: transform 0.4s var(--ease-out-expo), opacity 0.4s;
  z-index: 9999;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-success { border-color: rgba(0, 229, 255, 0.4); }
.toast-error { border-color: rgba(255, 107, 157, 0.4); }

/* --- Loading Spinner --- */
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border-subtle);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .book-feature { gap: 2rem; }
  .about-grid { grid-template-columns: 240px 1fr; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }

  .nav-links.mobile-open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 72px;
    left: 0; right: 0;
    background: rgba(4, 4, 16, 0.95);
    backdrop-filter: blur(24px);
    padding: 2rem;
    gap: 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
    animation: fadeIn 0.3s;
  }

  .nav-dropdown-menu {
    position: static;
    transform: none;
    background: rgba(0, 229, 255, 0.04);
    border: none;
    border-left: 2px solid var(--border-glow);
    box-shadow: none;
    backdrop-filter: none;
    padding: 0.5rem 0 0.5rem 1.25rem;
    margin-top: 0.75rem;
    margin-left: 0;
    opacity: 1;
    pointer-events: auto;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .nav-dropdown-menu a {
    padding: 6px 12px;
    font-size: 0.85rem;
    border-radius: 4px;
  }

  .nav-dropdown-menu a:hover {
    background: rgba(0, 229, 255, 0.1);
  }

  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .book-feature { grid-template-columns: 1fr; text-align: center; }
  .book-cover { margin: 0 auto; max-width: 180px; width: 100%; }
  .about-grid { grid-template-columns: 1fr; text-align: center; }
  .about-photo { max-width: 250px; margin: 0 auto; }

  /* Force inline grids to stack on mobile (Coming Soon section, etc.) */
  .glass-card-lg[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    text-align: center;
    gap: 1.5rem !important;
  }

  .glass-card-lg[style*="grid-template-columns"] img {
    max-width: 180px;
    width: 100%;
    margin: 0 auto;
  }

  .section { padding: 4rem 1.25rem; }
  .page-header { padding: 7rem 1.25rem 3rem; }
}

@media (max-width: 480px) {
  .hero-title-top, .hero-title-bottom { font-size: 2rem; }
  .hero-emblem { width: 80px; height: 80px; }
  .footer-links { flex-direction: column; gap: 1rem; }
  .book-cover { max-width: 150px; }
  .book-info h3 { font-size: 1.4rem; }
  .glass-card-lg { padding: 1.5rem; }
  .press-item { flex-direction: column; gap: 0.75rem; }
  .press-date { width: auto; text-align: left; display: flex; gap: 0.5rem; align-items: baseline; }
  .press-date .day { font-size: 1.2rem; }
  .btn { padding: 10px 20px; font-size: 0.85rem; }
  .contact-grid { gap: 1rem; }
}
