/* === Alexandra Danek — moonlit fantasy === */

:root {
  /* Moonlit palette */
  --ink-0: #05080f;        /* deepest night */
  --ink-1: #0a1020;        /* base night */
  --ink-2: #111a32;        /* card night */
  --ink-3: #1a2548;        /* elevated */
  --moon: #e7f0ff;         /* moon white */
  --silver: #bcd0f0;       /* silver text */
  --silver-dim: #7d90b4;   /* secondary */
  --halo: #8ebcff;          /* accent halo */
  --halo-2: #b5a6ff;        /* violet accent */
  --glow: rgba(142, 188, 255, 0.55);

  --serif: "Cinzel", "Trajan Pro", serif;
  --italic: "EB Garamond", "Cormorant Garamond", Georgia, serif;
  --italic-style: italic;
  --body: "Cormorant Garamond", "EB Garamond", Georgia, serif;
  --ui: "Cormorant Garamond", serif;

  /* tweakable */
  --anim-strength: 1;
  --theme-accent: var(--halo);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--ink-0);
  color: var(--silver);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.6;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  background:
    radial-gradient(ellipse 1200px 600px at 50% -10%, rgba(142,188,255,0.15), transparent 60%),
    radial-gradient(ellipse 900px 700px at 80% 110%, rgba(181,166,255,0.10), transparent 60%),
    linear-gradient(180deg, #05080f 0%, #070c1c 40%, #05080f 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

::selection { background: rgba(142,188,255,0.35); color: var(--moon); }

/* ——————————————— Stardust canvas + cursor trail ——————————————— */

#stardust {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: calc(0.9 * var(--anim-strength));
}

.cursor-spark {
  position: fixed;
  width: 6px; height: 6px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  background: radial-gradient(circle, #fff 0%, var(--halo) 40%, transparent 70%);
  box-shadow: 0 0 12px var(--halo), 0 0 24px var(--halo-2);
  transform: translate(-50%, -50%);
  animation: sparkFade 900ms ease-out forwards;
}
@keyframes sparkFade {
  0%   { opacity: 0.95; transform: translate(-50%,-50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%,-150%) scale(0.3); }
}

/* ——————————————— Navigation ——————————————— */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 22px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: backdrop-filter 0.3s ease, background 0.3s ease, padding 0.3s ease;
}
.nav.scrolled {
  padding: 14px 48px;
  backdrop-filter: blur(14px) saturate(1.2);
  background: linear-gradient(180deg, rgba(5,8,15,0.85), rgba(5,8,15,0.4));
  border-bottom: 1px solid rgba(142,188,255,0.08);
}

.nav__brand {
  font-family: var(--italic);
  font-style: italic;
  font-size: 22px;
  letter-spacing: 0.08em;
  color: var(--moon);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav__brand::before {
  content: "";
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, var(--halo) 55%, transparent 75%);
  box-shadow: 0 0 14px var(--halo);
}

.nav__links {
  display: flex;
  gap: 34px;
  list-style: none;
  margin: 0; padding: 0;
}
.nav__links a {
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--silver);
  text-decoration: none;
  position: relative;
  transition: color 0.3s ease;
  padding: 6px 0;
}
.nav__links a::after {
  content: "";
  position: absolute;
  bottom: 0; left: 50%;
  width: 0; height: 1px;
  background: var(--halo);
  box-shadow: 0 0 8px var(--halo);
  transition: width 0.3s ease, left 0.3s ease;
}
.nav__links a:hover { color: var(--moon); }
.nav__links a:hover::after { width: 100%; left: 0; }

.nav__toggle { display: none; background: none; border: none; color: var(--silver); cursor: pointer; }

@media (max-width: 860px) {
  .nav { padding: 16px 22px; }
  .nav.scrolled { padding: 10px 22px; }
  .nav__links {
    position: fixed;
    inset: 64px 0 auto 0;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    padding: 28px 0 36px;
    background: rgba(5,8,15,0.97);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(142,188,255,0.12);
    transform: translateY(-120%);
    transition: transform 0.4s cubic-bezier(.7,0,.3,1);
  }
  .nav__links.open { transform: translateY(0); }
  .nav__toggle { display: block; font-size: 22px; }
}

/* ——————————————— Hero ——————————————— */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  isolation: isolate;
}

.hero__bg {
  position: absolute;
  inset: -5% -2% 0 -2%;
  background-image: url("assets/hero-moon-wide.webp");
  background-size: cover;
  background-position: center 50%;
  filter: brightness(0.82) saturate(1.1) contrast(1.02);
  will-change: transform;
  z-index: -2;
}
.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 25%, transparent 0%, rgba(5,8,15,0.0) 30%, rgba(5,8,15,0.55) 65%, var(--ink-0) 95%),
    linear-gradient(180deg, rgba(5,8,15,0.45) 0%, rgba(5,8,15,0.2) 40%, rgba(5,8,15,0.9) 100%);
}

.hero__halo {
  position: absolute;
  top: 8%;
  left: 50%;
  transform: translateX(-50%);
  width: 640px; height: 640px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(231,240,255,0.35) 0%, rgba(142,188,255,0.15) 30%, transparent 60%);
  pointer-events: none;
  z-index: -1;
  animation: haloPulse 8s ease-in-out infinite;
}
@keyframes haloPulse {
  0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.8; }
  50% { transform: translateX(-50%) scale(1.08); opacity: 1; }
}

.hero__content {
  position: relative;
  text-align: center;
  padding: 0 24px;
  max-width: 900px;
  z-index: 2;
  margin-top: 8vh;
}

.hero__eyebrow {
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: 0.55em;
  color: var(--halo);
  text-transform: uppercase;
  margin-bottom: 22px;
  opacity: 0;
  animation: fadeUp 1.4s 0.2s ease forwards;
}
.hero__eyebrow span {
  display: inline-block;
  padding: 0 14px;
  position: relative;
}
.hero__eyebrow span::before,
.hero__eyebrow span::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 60px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--halo), transparent);
}
.hero__eyebrow span::before { right: 100%; }
.hero__eyebrow span::after  { left: 100%; }

.hero__title {
  font-family: var(--italic);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(56px, 10vw, 150px);
  line-height: 0.95;
  color: var(--moon);
  margin: 0 0 8px;
  letter-spacing: 0.01em;
  text-shadow: 0 0 40px rgba(142,188,255,0.5), 0 0 80px rgba(142,188,255,0.25);
  opacity: 0;
  animation: fadeUp 1.6s 0.5s cubic-bezier(.2,.8,.2,1) forwards;
}

.hero__subtitle {
  font-family: var(--serif);
  font-size: clamp(14px, 1.6vw, 18px);
  letter-spacing: 0.45em;
  text-transform: uppercase;
  color: var(--silver);
  margin: 18px 0 0;
  opacity: 0;
  animation: fadeUp 1.6s 0.9s ease forwards;
}

.hero__author {
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.5em;
  color: var(--silver-dim);
  margin-top: 6px;
  opacity: 0;
  animation: fadeUp 1.6s 1.1s ease forwards;
}

.hero__tagline {
  font-family: var(--body);
  font-style: italic;
  font-size: clamp(18px, 2.1vw, 24px);
  color: var(--silver);
  max-width: 620px;
  margin: 24px auto 0;
  opacity: 0;
  animation: fadeUp 1.6s 1.4s ease forwards;
}

.hero__ctas {
  display: flex;
  gap: 18px;
  justify-content: center;
  margin-top: 28px;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 1.6s 1.7s ease forwards;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(26px); filter: blur(6px); }
  to   { opacity: 1; transform: translateY(0); filter: blur(0); }
}

/* ——————————————— Buttons ——————————————— */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 32px;
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  border: none;
  background: none;
  color: var(--moon);
  transition: all 0.4s cubic-bezier(.2,.8,.2,1);
  overflow: hidden;
}
.btn--primary {
  background: linear-gradient(135deg, rgba(142,188,255,0.22), rgba(181,166,255,0.18));
  border: 1px solid rgba(142,188,255,0.5);
  box-shadow: 0 0 20px rgba(142,188,255,0.18), inset 0 0 20px rgba(142,188,255,0.08);
}
.btn--primary:hover {
  background: linear-gradient(135deg, rgba(142,188,255,0.4), rgba(181,166,255,0.35));
  box-shadow: 0 0 30px rgba(142,188,255,0.45), inset 0 0 30px rgba(142,188,255,0.15);
  transform: translateY(-2px);
}
.btn--ghost {
  border: 1px solid rgba(188,208,240,0.35);
  color: var(--silver);
}
.btn--ghost:hover {
  color: var(--moon);
  border-color: var(--halo);
  box-shadow: 0 0 18px rgba(142,188,255,0.3);
  transform: translateY(-2px);
}
.btn__icon { display: inline-block; transition: transform 0.4s ease; }
.btn:hover .btn__icon { transform: translateX(4px); }

/* sparkle on button */
.btn--primary::before {
  content: "";
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  transition: left 0.8s;
}
.btn--primary:hover::before { left: 100%; }

/* ——————————————— Scroll cue ——————————————— */

.hero__scroll {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--silver-dim);
  font-family: var(--serif);
  font-size: 10px;
  letter-spacing: 0.4em;
  opacity: 0;
  animation: fadeUp 1.6s 2.2s ease forwards;
  z-index: 2;
}
.hero__scroll-line {
  width: 1px; height: 60px;
  background: linear-gradient(180deg, transparent, var(--halo));
  position: relative;
  overflow: hidden;
}
.hero__scroll-line::after {
  content: "";
  position: absolute;
  top: -30px; left: 0;
  width: 100%; height: 30px;
  background: linear-gradient(180deg, transparent, var(--moon));
  animation: scrollDown 2.2s ease-in-out infinite;
}
@keyframes scrollDown {
  0% { top: -30px; }
  100% { top: 100%; }
}

/* ——————————————— Sections base ——————————————— */

section { position: relative; z-index: 2; }

.section {
  padding: 140px 48px;
  max-width: 1280px;
  margin: 0 auto;
}
@media (max-width: 860px) { .section { padding: 90px 22px; } }

.section__eyebrow {
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: 0.5em;
  color: var(--halo);
  text-transform: uppercase;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.section__eyebrow::before {
  content: "";
  width: 36px; height: 1px;
  background: var(--halo);
  box-shadow: 0 0 6px var(--halo);
}

.section__title {
  font-family: var(--italic);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(44px, 6vw, 84px);
  line-height: 1.02;
  color: var(--moon);
  margin: 0 0 28px;
  font-weight: 400;
}

.section__lead {
  font-size: clamp(18px, 1.5vw, 21px);
  color: var(--silver);
  max-width: 640px;
  font-style: italic;
}

/* ——————————————— Slza temnoty feature ——————————————— */

.feature {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 80px;
  align-items: center;
  position: relative;
}
@media (max-width: 960px) { .feature { grid-template-columns: 1fr; gap: 50px; } }

.feature__cover {
  position: relative;
  perspective: 1400px;
}
.feature__cover-inner {
  position: relative;
  width: 100%;
  aspect-ratio: 680 / 970;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(.2,.8,.2,1);
  will-change: transform;
}
.feature__cover-img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  border-radius: 4px;
  box-shadow:
    0 30px 60px rgba(0,0,0,0.6),
    0 0 60px rgba(142,188,255,0.25),
    0 0 120px rgba(181,166,255,0.15);
  image-rendering: -webkit-optimize-contrast;
  backface-visibility: hidden;
}
.feature__cover::before {
  content: "";
  position: absolute;
  inset: -40px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(142,188,255,0.25), transparent 60%);
  filter: blur(30px);
  z-index: -1;
  animation: coverGlow 6s ease-in-out infinite;
}
@keyframes coverGlow {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.1); }
}

/* floating crystals around cover */
.feature__crystal {
  position: absolute;
  width: 14px; height: 14px;
  background: linear-gradient(135deg, var(--halo), var(--halo-2));
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  box-shadow: 0 0 18px var(--halo);
  animation: crystalFloat 7s ease-in-out infinite;
}
.feature__crystal--1 { top: 8%; right: -14px; animation-delay: 0s; }
.feature__crystal--2 { bottom: 18%; left: -20px; animation-delay: 1.5s; width: 10px; height: 10px; }
.feature__crystal--3 { top: 50%; right: -30px; animation-delay: 3s; width: 8px; height: 8px; }
@keyframes crystalFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.8; }
  50% { transform: translateY(-20px) rotate(180deg); opacity: 1; }
}

.feature__body p {
  margin: 0 0 20px;
  font-size: 19px;
  line-height: 1.75;
}
.feature__body p.drop::first-letter {
  font-family: var(--italic);
  font-style: italic;
  font-size: 64px;
  float: left;
  line-height: 0.9;
  padding: 8px 12px 0 0;
  color: var(--moon);
  text-shadow: 0 0 20px var(--halo);
}

.feature__quote {
  position: relative;
  margin: 32px 0;
  padding: 24px 0 24px 28px;
  border-left: 1px solid rgba(142,188,255,0.4);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: 28px;
  color: var(--moon);
  line-height: 1.45;
}
.feature__quote::before {
  content: "„";
  position: absolute;
  top: 8px;
  left: 14px;
  font-size: 64px;
  line-height: 1;
  color: var(--halo);
  opacity: 0.55;
  pointer-events: none;
}

.feature__ctas {
  display: flex;
  gap: 14px;
  margin-top: 32px;
  flex-wrap: wrap;
}

/* ——————————————— Series — Noxalora ——————————————— */

.series-intro {
  text-align: center;
  margin-bottom: 70px;
}
.series-intro .section__eyebrow { justify-content: center; }
.series-intro .section__eyebrow::before,
.series-intro .section__eyebrow::after {
  content: "";
  width: 36px; height: 1px;
  background: var(--halo);
  box-shadow: 0 0 6px var(--halo);
}

.books {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
@media (max-width: 960px) { .books { grid-template-columns: 1fr; gap: 60px; } }

.book {
  position: relative;
  text-align: center;
  transition: transform 0.5s cubic-bezier(.2,.8,.2,1);
}
.book:hover { transform: translateY(-10px); }

.book__frame {
  position: relative;
  aspect-ratio: 680/970;
  margin-bottom: 30px;
  border-radius: 4px;
  overflow: hidden;
  box-shadow:
    0 20px 40px rgba(0,0,0,0.55),
    0 0 40px rgba(142,188,255,0.15);
  transition: box-shadow 0.5s ease;
}
.book:hover .book__frame {
  box-shadow:
    0 30px 50px rgba(0,0,0,0.7),
    0 0 50px rgba(142,188,255,0.4),
    0 0 100px rgba(181,166,255,0.25);
}
.book__img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}
.book:hover .book__img { transform: scale(1.04); }

.book__status {
  position: absolute;
  top: 14px; left: 14px;
  font-family: var(--serif);
  font-size: 10px;
  letter-spacing: 0.35em;
  padding: 6px 12px;
  background: rgba(5,8,15,0.85);
  color: var(--moon);
  border: 1px solid rgba(142,188,255,0.35);
  backdrop-filter: blur(6px);
  z-index: 2;
}
.book__status--new   { color: var(--halo); border-color: var(--halo); box-shadow: 0 0 12px rgba(142,188,255,0.35); }
.book__status--soon  { color: var(--halo-2); border-color: var(--halo-2); }

.book__vol {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.42em;
  color: var(--moon);
  margin-bottom: 14px;
  text-transform: uppercase;
}
.book__title {
  font-family: var(--italic);
  font-style: italic;
  font-weight: 500;
  font-size: 34px;
  color: var(--moon);
  margin: 0 0 10px;
  line-height: 1;
}
.book__sub {
  font-family: var(--body);
  font-style: italic;
  font-size: 16px;
  color: var(--silver);
  margin: 0 0 22px;
}
.book__link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--moon);
  text-decoration: none;
  padding: 13px 26px;
  border: 1px solid rgba(178,210,255,0.55);
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(142,188,255,0.12), rgba(40,62,108,0.18));
  box-shadow: 0 0 0 1px rgba(142,188,255,0.08) inset, 0 10px 30px -18px rgba(142,188,255,0.6);
  transition: color 0.35s ease, border-color 0.35s ease, background 0.35s ease, box-shadow 0.35s ease, transform 0.35s ease;
}
.book__link:hover {
  color: #fff;
  border-color: rgba(210,230,255,0.9);
  background: linear-gradient(180deg, rgba(170,210,255,0.22), rgba(70,100,160,0.28));
  box-shadow: 0 0 0 1px rgba(210,230,255,0.22) inset, 0 14px 36px -16px rgba(180,215,255,0.75);
  transform: translateY(-1px);
}

/* ——————————————— World / characters band ——————————————— */

.world {
  position: relative;
  margin: 60px -48px 0;
  padding: 120px 48px;
  overflow: hidden;
}
.world__bg {
  position: absolute;
  inset: 0;
  background-image: url("assets/ihlice-scene.webp");
  background-size: cover;
  background-position: center 35%;
  filter: brightness(0.55) saturate(1.05);
  z-index: -1;
}
.world__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--ink-0) 0%, rgba(5,8,15,0.5) 40%, rgba(5,8,15,0.55) 60%, var(--ink-0) 100%),
              linear-gradient(180deg, var(--ink-0) 0%, transparent 20%, transparent 80%, var(--ink-0) 100%);
}
.world__inner {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}
.world__kicker {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: clamp(30px, 3.6vw, 48px);
  color: var(--moon);
  line-height: 1.25;
  margin: 0 0 18px;
}
.world__text {
  font-family: var(--body);
  font-style: italic;
  font-size: 20px;
  color: var(--silver);
  max-width: 580px;
  margin: 0 auto;
}
.world__glyphs {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin: 36px 0 0;
  font-family: var(--serif);
  font-size: 10px;
  letter-spacing: 0.45em;
  color: var(--silver-dim);
  flex-wrap: wrap;
}
.world__glyphs span {
  padding: 10px 18px;
  border: 1px solid rgba(142,188,255,0.25);
}

/* ——————————————— Author ——————————————— */

.author {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 80px;
  align-items: center;
}
@media (max-width: 960px) { .author { grid-template-columns: 1fr; gap: 50px; } }

.author__portrait {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: 4px;
  overflow: hidden;
  background: var(--ink-2);
  border: 1px solid rgba(142,188,255,0.3);
  box-shadow: 0 0 40px rgba(142,188,255,0.25), 0 0 80px rgba(179,163,255,0.15), 0 20px 60px rgba(0,0,0,0.55);
  isolation: isolate;
}
.author__portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  display: block;
  filter: saturate(1.0) brightness(0.98) contrast(1.02);
}
/* Soft vignette + subtle moonlit glow from above */
.author__portrait::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 45% at 50% 10%, rgba(230,236,255,0.18), transparent 65%),
    linear-gradient(180deg, transparent 55%, rgba(5,8,15,0.55) 100%);
  z-index: 1;
  pointer-events: none;
}
/* Soft halo around her head */
.author__portrait::after {
  content: "";
  position: absolute;
  top: -10%; left: 20%; right: 20%; height: 50%;
  background: radial-gradient(circle, rgba(142,188,255,0.25), transparent 60%);
  filter: blur(20px);
  z-index: 1;
  pointer-events: none;
  animation: portraitHalo 6s ease-in-out infinite alternate;
}
@keyframes portraitHalo {
  0%   { opacity: 0.55; transform: scale(1); }
  100% { opacity: 1;    transform: scale(1.06); }
}

/* Sparkle layer — uses extra wrappers */
.author__portrait-sparkles {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
}
.author__portrait-sparkles span {
  position: absolute;
  width: 4px; height: 4px; border-radius: 50%;
  background: #fff;
  box-shadow:
    0 0 8px rgba(230,236,255,0.95),
    0 0 18px rgba(142,188,255,0.8),
    0 0 28px rgba(179,163,255,0.5);
  opacity: 0;
  animation: portraitSparkleTwinkle var(--d, 4s) ease-in-out infinite;
  animation-delay: var(--del, 0s);
  top: var(--y, 30%); left: var(--x, 50%);
}
@keyframes portraitSparkleTwinkle {
  0%, 100% { opacity: 0; transform: scale(0.4); }
  50%      { opacity: 1; transform: scale(1.3); }
}

/* Rising moon-dust motes */
.author__portrait-motes {
  position: absolute; inset: 0; z-index: 3; pointer-events: none; overflow: hidden;
}
.author__portrait-motes span {
  position: absolute; bottom: -10px;
  width: 3px; height: 3px; border-radius: 50%;
  background: rgba(230,236,255,0.95);
  box-shadow: 0 0 8px rgba(230,236,255,0.85), 0 0 18px rgba(142,188,255,0.65);
  opacity: 0;
  animation: portraitMoteRise var(--d, 10s) linear infinite;
  animation-delay: var(--del, 0s);
  left: var(--x, 50%);
}
@keyframes portraitMoteRise {
  0%   { transform: translate(0,0); opacity: 0; }
  15%  { opacity: 0.9; }
  85%  { opacity: 0.7; }
  100% { transform: translate(var(--xt, 20px), -110%); opacity: 0; }
}

/* Shooting sparkle once in a while */
.author__portrait-shoot {
  position: absolute; top: 12%; left: -15%; z-index: 3;
  width: 80px; height: 1.5px;
  background: linear-gradient(90deg, transparent, rgba(230,236,255,0.95), rgba(142,188,255,0.6), transparent);
  filter: drop-shadow(0 0 5px rgba(142,188,255,0.8));
  opacity: 0; transform: rotate(20deg);
  animation: portraitShoot 9s ease-in-out infinite;
}
@keyframes portraitShoot {
  0%   { opacity: 0; transform: translateX(0) rotate(20deg); }
  8%   { opacity: 1; }
  18%  { opacity: 0.5; }
  28%  { opacity: 0; transform: translateX(140%) rotate(20deg); }
  100% { opacity: 0; transform: translateX(140%) rotate(20deg); }
}

.author__body p {
  font-size: 19px;
  line-height: 1.75;
  margin: 0 0 18px;
}
.author__signature {
  font-family: var(--italic);
  font-style: italic;
  font-size: 42px;
  color: var(--moon);
  margin-top: 22px;
  display: inline-block;
  position: relative;
}
.author__signature::after {
  content: "";
  position: absolute;
  bottom: -4px; left: 0;
  width: 60%; height: 1px;
  background: linear-gradient(90deg, var(--halo), transparent);
}

/* ——————————————— Contact ——————————————— */

.contact {
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}
.contact__moon {
  width: 120px; height: 120px;
  border-radius: 50%;
  margin: 0 auto 30px;
  background:
    radial-gradient(circle at 35% 35%, #fff 0%, #e7f0ff 30%, #bcd0f0 70%, #8ebcff 100%);
  box-shadow: 0 0 60px rgba(142,188,255,0.6), inset -20px -20px 40px rgba(10,16,32,0.3);
  position: relative;
}
.contact__moon::before,
.contact__moon::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(10,16,32,0.08);
}
.contact__moon::before { top: 25%; left: 40%; width: 14px; height: 14px; }
.contact__moon::after  { bottom: 30%; right: 28%; width: 10px; height: 10px; }

.contact__links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 60px;
  background: rgba(142,188,255,0.15);
  border: 1px solid rgba(142,188,255,0.15);
}
@media (max-width: 720px) { .contact__links { grid-template-columns: 1fr; } }

.contact__card {
  padding: 40px 24px;
  background: var(--ink-0);
  text-decoration: none;
  color: var(--silver);
  transition: background 0.4s ease, transform 0.4s ease;
  position: relative;
  overflow: hidden;
}
.contact__card:hover {
  background: linear-gradient(180deg, var(--ink-1), var(--ink-0));
  color: var(--moon);
}
.contact__card::before {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 0; height: 0;
  background: radial-gradient(circle, rgba(142,188,255,0.2), transparent 60%);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}
.contact__card:hover::before { width: 300px; height: 300px; }

.contact__card-label {
  position: relative;
  font-family: var(--serif);
  font-size: 10px;
  letter-spacing: 0.4em;
  color: var(--silver-dim);
  margin-bottom: 12px;
}
.contact__card-value {
  position: relative;
  font-family: var(--italic);
  font-style: italic;
  font-size: 22px;
  color: var(--moon);
}

/* ——————————————— Footer ——————————————— */

.footer {
  padding: 50px 48px 40px;
  border-top: 1px solid rgba(142,188,255,0.1);
  text-align: center;
  font-family: var(--serif);
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--silver-dim);
  margin-top: 80px;
  position: relative;
  z-index: 2;
}
.footer a { color: var(--silver); text-decoration: none; }
.footer a:hover { color: var(--moon); }
.footer__row { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; max-width: 1280px; margin: 0 auto; }

/* ——————————————— Reveal on scroll ——————————————— */

.reveal { opacity: 0; transform: translateY(40px); transition: opacity 1.1s ease, transform 1.1s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal--delay-1 { transition-delay: 0.15s; }
.reveal--delay-2 { transition-delay: 0.3s; }
.reveal--delay-3 { transition-delay: 0.45s; }

/* ——————————————— Tweaks panel ——————————————— */

.tweaks {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 280px;
  background: rgba(10,16,32,0.92);
  backdrop-filter: blur(18px) saturate(1.3);
  border: 1px solid rgba(142,188,255,0.3);
  border-radius: 6px;
  padding: 18px 20px 20px;
  z-index: 9999;
  color: var(--silver);
  font-family: var(--body);
  box-shadow: 0 20px 50px rgba(0,0,0,0.6), 0 0 40px rgba(142,188,255,0.15);
  display: none;
}
.tweaks.visible { display: block; }

.tweaks__title {
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: 0.4em;
  color: var(--moon);
  margin: 0 0 16px;
}
.tweaks__row { margin-bottom: 14px; }
.tweaks__label {
  display: block;
  font-family: var(--serif);
  font-size: 9px;
  letter-spacing: 0.3em;
  color: var(--silver-dim);
  margin-bottom: 8px;
}
.tweaks__options {
  display: flex;
  gap: 6px;
}
.tweaks__options button {
  flex: 1;
  padding: 8px 4px;
  background: rgba(142,188,255,0.05);
  border: 1px solid rgba(142,188,255,0.2);
  color: var(--silver);
  font-family: var(--body);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.25s ease;
}
.tweaks__options button:hover { border-color: var(--halo); color: var(--moon); }
.tweaks__options button.active {
  background: rgba(142,188,255,0.22);
  border-color: var(--halo);
  color: var(--moon);
  box-shadow: inset 0 0 10px rgba(142,188,255,0.25);
}

/* ——————————————— Theme variants ——————————————— */

body[data-theme="obsidian"] {
  --halo: #5d7eb8;
  --halo-2: #2d4b78;
  --silver: #9aa8c5;
  --silver-dim: #5d6a85;
  --ink-0: #020308;
}
body[data-theme="ember"] {
  --halo: #ff9472;
  --halo-2: #c75d4a;
  --silver: #e8cac0;
  --silver-dim: #9a7a6f;
  --moon: #ffe8dc;
}

body[data-anim="off"] * {
  animation: none !important;
  transition: none !important;
}
body[data-anim="off"] .cursor-spark,
body[data-anim="off"] #stardust { display: none !important; }

/* ——————————————— Slza chapter read — koniec kapitoly + navigácia ——————————————— */
body.chapter-read .ch-end {
  text-align: center;
  margin-top: 70px;
  padding-top: 40px;
  border-top: 1px solid rgba(200, 168, 120, 0.15);
  color: #98826e;
  font-family: "Cinzel", serif;
  font-size: 10px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
}
body.chapter-read .ch-end__ornament {
  font-size: 20px;
  color: #c8a878;
  margin-bottom: 20px;
  text-shadow: 0 0 14px #c8a878;
}
body.chapter-read .ch-continue {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 40px;
  padding: 18px 36px;
  font-family: "Cinzel", serif;
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(135deg, rgba(107, 31, 36, 0.4), rgba(20, 5, 30, 0.5));
  border: 1px solid rgba(200, 168, 120, 0.5);
  backdrop-filter: blur(8px);
  transition: all 0.4s ease;
  box-shadow: 0 0 20px rgba(200, 168, 120, 0.2);
}
body.chapter-read .ch-continue:hover {
  background: linear-gradient(135deg, rgba(107, 31, 36, 0.6), rgba(20, 5, 30, 0.7));
  border-color: rgba(200, 168, 120, 0.9);
  box-shadow: 0 0 30px rgba(200, 168, 120, 0.45);
  transform: translateY(-2px);
}
body.chapter-read .ch-end__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 16px;
  margin-top: 28px;
  width: 100%;
}
body.chapter-read .ch-end__nav .ch-continue {
  margin-top: 0 !important;
  flex: 1 1 280px;
  max-width: 420px;
  justify-content: center;
}
@media (max-width: 700px) {
  body.chapter-read .ch-end__nav {
    flex-direction: column;
    align-items: center;
  }
  body.chapter-read .ch-end__nav .ch-continue {
    flex: 1 1 auto;
    width: 100%;
    max-width: 360px;
  }
}
