:root {
  --void: #030409;
  --surface: #090c15;
  --text: #eef3f8;
  --muted: #a8b1c2;
  --cyan: #58e5ff;
  --violet: #b57aff;
  --gold: #ffbb4d;
  --line: rgba(255, 255, 255, 0.12);
  --measure: 760px;
}

* { box-sizing: border-box; }

html {
  margin: 0;
  scroll-behavior: smooth;
  background: var(--void);
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 12%, rgba(46, 82, 156, 0.15), transparent 28rem),
    radial-gradient(circle at 82% 42%, rgba(170, 58, 118, 0.11), transparent 34rem),
    linear-gradient(180deg, #020308 0%, #070a12 45%, #020308 100%);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(1rem, 0.4vw + 0.9rem, 1.12rem);
  line-height: 1.8;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.36;
  background-image:
    radial-gradient(circle at 12% 22%, #fff 0 1px, transparent 1.5px),
    radial-gradient(circle at 74% 17%, #fff 0 1px, transparent 1.5px),
    radial-gradient(circle at 88% 69%, #fff 0 1px, transparent 1.5px),
    radial-gradient(circle at 33% 82%, #fff 0 1px, transparent 1.5px);
  background-size: 260px 260px, 340px 340px, 410px 410px, 500px 500px;
}

#progress {
  position: fixed;
  inset: 0 auto auto 0;
  z-index: 1000;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, #090b12, var(--violet), var(--cyan), #fff, var(--gold));
  box-shadow: 0 0 16px rgba(88, 229, 255, 0.7);
}

.nav {
  position: fixed;
  z-index: 100;
  top: 1rem;
  left: 1rem;
  right: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.72rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(3, 4, 9, 0.74);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(16px);
}

.nav a {
  color: var(--text);
  text-decoration: none;
}

.back {
  font-size: 0.86rem;
  color: var(--muted) !important;
}

.badge {
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
}

.languages {
  display: flex;
  gap: 0.25rem;
}

.languages a {
  padding: 0.2rem 0.48rem;
  border-radius: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.languages a.active {
  color: #061016;
  background: var(--cyan);
}

main { padding-bottom: 5rem; }

.hero {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 7.5rem 1.25rem 0;
}

.hero-copy {
  width: min(980px, 100%);
  margin: 0 auto 2.5rem;
  text-align: center;
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--cyan);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 9vw, 7.8rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.92;
  background: linear-gradient(100deg, #7c8597 0%, #fff 42%, #fff 58%, #ffb25b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  max-width: 720px;
  margin: 1.6rem auto 0;
  color: var(--muted);
  font-size: clamp(1.08rem, 2.1vw, 1.42rem);
  line-height: 1.55;
}

.hero-figure {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 22px;
  background: #000;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.72), 0 0 90px rgba(91, 121, 255, 0.1);
}

.hero-figure::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 70px rgba(0, 0, 0, 0.42);
}

.hero-figure img {
  display: block;
  width: 100%;
  height: auto;
}

.hero-figure figcaption {
  position: absolute;
  z-index: 1;
  left: 1rem;
  bottom: 1rem;
  max-width: calc(100% - 2rem);
  padding: 0.5rem 0.72rem;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 9px;
  color: rgba(255,255,255,0.76);
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(10px);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

.article {
  width: min(var(--measure), calc(100% - 2.5rem));
  margin: 0 auto;
  padding-top: 6rem;
}

.preface {
  margin: 0 0 5rem;
  color: #d9e0ea;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.35rem, 2.5vw, 1.9rem);
  line-height: 1.6;
}

.chapter {
  position: relative;
  margin: 0 0 5rem;
  padding-left: clamp(1rem, 3vw, 2rem);
  border-left: 1px solid var(--line);
}

.chapter::before {
  content: "";
  position: absolute;
  top: 0;
  left: -2px;
  width: 3px;
  height: 4.5rem;
  border-radius: 99px;
  background: var(--chapter-color, var(--cyan));
  box-shadow: 0 0 24px var(--chapter-glow, rgba(88, 229, 255, 0.55));
}

.chapter-number {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--chapter-color, var(--cyan));
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h2 {
  margin: 0 0 1.2rem;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.chapter p { margin: 0 0 1.25rem; }

.void { --chapter-color: #70788b; --chapter-glow: rgba(112, 120, 139, 0.45); }
.awakening { --chapter-color: var(--violet); --chapter-glow: rgba(181, 122, 255, 0.5); }
.expansion { --chapter-color: var(--cyan); --chapter-glow: rgba(88, 229, 255, 0.55); }
.threshold { --chapter-color: #fff; --chapter-glow: rgba(255, 255, 255, 0.65); }
.return { --chapter-color: var(--gold); --chapter-glow: rgba(255, 187, 77, 0.52); }
.observer { --chapter-color: #df7bc6; --chapter-glow: rgba(223, 123, 198, 0.5); }

blockquote {
  margin: 5rem 0;
  padding: 2.2rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.65rem, 4vw, 2.8rem);
  font-style: italic;
  line-height: 1.35;
  text-align: center;
}

.closing {
  margin-top: 6rem;
  padding: clamp(1.5rem, 4vw, 3rem);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(103, 62, 166, 0.12), rgba(255,255,255,0.03), rgba(209, 100, 43, 0.1));
  text-align: center;
}

.closing p {
  max-width: 620px;
  margin: 0 auto 1rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.22rem, 2.6vw, 1.68rem);
}

.closing p:last-child { margin-bottom: 0; }

.note {
  margin-top: 4rem;
  padding-top: 1.3rem;
  border-top: 1px solid var(--line);
  color: #7f899b;
  font-size: 0.82rem;
}

footer {
  padding: 2.5rem 1.25rem;
  border-top: 1px solid var(--line);
  color: #727c8e;
  font-size: 0.78rem;
  text-align: center;
}

@media (max-width: 700px) {
  .nav { top: 0.5rem; left: 0.5rem; right: 0.5rem; }
  .badge { display: none; }
  .hero { padding: 6rem 0.65rem 0; }
  .hero-copy { padding-inline: 0.6rem; }
  .hero-figure { border-radius: 13px; }
  .hero-figure figcaption { position: static; border: 0; border-top: 1px solid var(--line); border-radius: 0; }
  .article { width: min(var(--measure), calc(100% - 1.5rem)); padding-top: 4rem; }
  .chapter { margin-bottom: 3.8rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

a:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}
