:root {
  --bg: #050714;
  --ink: #f5f7ff;
  --muted: #aeb8c9;
  --panel: rgba(10, 17, 34, 0.78);
  --panel-strong: #090b18;
  --line: rgba(156, 106, 255, 0.24);
  --gold: #f6d47d;
  --violet: #8f39ff;
  --violet-soft: #c985ff;
  --cyan: #7fdbe6;
  --leaf: #8aaa2f;
  --rose: #d655ff;
  --paper: #f4eed8;
  --paper-ink: #111722;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-main);
  background:
    radial-gradient(circle at 18% 10%, rgba(127, 219, 230, 0.18), transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(143, 57, 255, 0.2), transparent 32%),
    linear-gradient(135deg, rgba(138, 170, 47, 0.12), transparent 34%),
    var(--bg);
  color: var(--ink);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(6, 7, 17, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.nav {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.language-toggle {
  min-width: 48px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(143, 57, 255, 0.12);
  color: var(--gold);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.language-toggle:hover {
  border-color: rgba(246, 212, 125, 0.58);
  background: rgba(143, 57, 255, 0.2);
}

.brand {
  font-family: var(--font-brand);
  color: var(--gold);
  text-shadow: 0 0 18px rgba(246, 212, 125, 0.18);
  font-size: 34px;
  line-height: 1;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 14px;
}

.nav-links a {
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--ink);
  border-color: var(--line);
  background: rgba(143, 57, 255, 0.12);
}

.hero {
  padding: 58px 0 76px;
}

.hero-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  gap: 44px;
  align-items: stretch;
}

.hero-copy {
  min-height: 620px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 5vw, 56px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(9, 11, 24, 0.94), rgba(23, 18, 48, 0.76)),
    radial-gradient(circle at 18% 18%, rgba(127, 219, 230, 0.15), transparent 36%),
    radial-gradient(circle at 85% 72%, rgba(143, 57, 255, 0.2), transparent 38%);
  box-shadow: var(--shadow);
}

.eyebrow,
.chapter-number,
.status,
.meta-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-title);
  color: var(--ink);
}

h1 {
  max-width: 760px;
  margin: 14px 0 22px;
  font-size: clamp(42px, 6.8vw, 82px);
  line-height: 0.9;
}

h2 {
  font-size: clamp(34px, 5vw, 62px);
  line-height: 0.98;
}

h3 {
  font-size: 24px;
  line-height: 1.1;
}

.title-link {
  color: inherit;
}

.title-link:hover {
  color: var(--violet-soft);
}

.lead {
  max-width: 720px;
  margin: 0 0 28px;
  color: var(--muted);
  font-size: clamp(19px, 2vw, 24px);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 6px;
  font-weight: 800;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: linear-gradient(135deg, var(--gold), #fff0b6);
  color: #111722;
}

.button-secondary {
  border: 1px solid var(--line);
  color: var(--ink);
  background: rgba(143, 57, 255, 0.12);
}

.cover-panel {
  min-height: auto;
  aspect-ratio: 2 / 3;
  border-radius: 8px;
  border: 1px solid var(--line);
  background:
    url("../public/image/face.png") center/contain no-repeat,
    linear-gradient(180deg, #050714, #10162a);
  box-shadow: var(--shadow);
}

html[data-language="en"] .cover-panel {
  background:
    url("../public/image/face-en.png") center/contain no-repeat,
    linear-gradient(180deg, #050714, #10162a);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.stat {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(127, 219, 230, 0.055);
}

.stat strong {
  display: block;
  font-size: 20px;
  color: var(--ink);
}

.section {
  padding: 72px 0;
  border-top: 1px solid var(--line);
}

.section-head {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 44px;
  margin-bottom: 30px;
}

.section-text {
  margin: 0;
  color: var(--muted);
  font-size: 19px;
}

.prose {
  max-width: 900px;
  color: var(--ink);
  font-size: 20px;
}

.prose p {
  margin: 0 0 18px;
}

.chapter-grid,
.world-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.chapter-card,
.world-card,
.cta-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.2);
}

.chapter-card,
.world-card {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.chapter-card:hover,
.world-card:hover {
  transform: translateY(-4px);
  border-color: rgba(246, 212, 125, 0.58);
  background: rgba(13, 22, 45, 0.9);
}

.chapter-card-more {
  border-color: rgba(127, 219, 230, 0.42);
  background:
    linear-gradient(135deg, rgba(143, 57, 255, 0.2), rgba(127, 219, 230, 0.08)),
    var(--panel);
}

.chapter-title {
  display: block;
  margin: 12px 0 8px;
  font-family: var(--font-title);
  font-size: 28px;
  line-height: 1.08;
}

.chapter-meta,
.world-card p {
  color: var(--muted);
}

.world-card h3 a {
  color: var(--violet-soft);
}

.world-card h3 {
  color: var(--violet-soft);
}

.cta-panel {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: center;
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(127, 219, 230, 0.12), rgba(143, 57, 255, 0.18)),
    var(--panel);
}

.link-list {
  display: grid;
  gap: 10px;
}

.link-list a {
  padding: 14px 16px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: rgba(143, 57, 255, 0.1);
  font-weight: 800;
}

.reader {
  padding: 54px 0 76px;
}

.reader-layout {
  display: grid;
  grid-template-columns: minmax(0, 780px) 280px;
  gap: 44px;
  align-items: start;
}

.paper {
  padding: clamp(30px, 5vw, 60px);
  border-radius: 8px;
  background: var(--paper);
  color: var(--paper-ink);
  box-shadow: var(--shadow);
}

.paper h1 {
  color: var(--paper-ink);
  font-size: clamp(38px, 6vw, 68px);
}

.paper .chapter-lead {
  color: #516070;
  font-size: 20px;
  margin: 0 0 30px;
}

.paper p {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  line-height: 1.85;
}

.reader-aside {
  position: sticky;
  top: 100px;
  display: grid;
  gap: 10px;
}

.reader-aside a,
.reader-aside span {
  display: block;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(10, 17, 34, 0.78);
  color: var(--muted);
}

.site-footer {
  padding: 34px 0 50px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

@media (max-width: 1120px) {
  .container {
    width: min(100% - 32px, 1180px);
  }

  .hero-shell {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    gap: 28px;
  }

  .chapter-grid,
  .world-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .nav {
    gap: 14px;
  }

  .nav-links {
    justify-content: flex-end;
    gap: 6px;
  }

  .nav-links a {
    padding: 8px 10px;
  }
}

@media (max-width: 920px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px 0;
  }

  .hero-shell,
  .section-head,
  .cta-panel,
  .reader-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 34px 0 54px;
  }

  .hero-copy {
    min-height: auto;
  }

  .cover-panel {
    width: min(100%, 420px);
    min-height: auto;
    justify-self: center;
  }

  .reader-aside {
    position: static;
    order: -1;
  }

  .paper {
    border-radius: 8px;
  }
}

@media (max-width: 720px) {
  .nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    padding: 14px 0;
  }

  .brand {
    font-size: 28px;
  }

  .language-toggle {
    justify-self: end;
  }

  .nav-links {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .nav-links a {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
    text-align: center;
  }

  h1 {
    font-size: clamp(38px, 11vw, 58px);
    line-height: 0.95;
  }

  h2 {
    font-size: clamp(32px, 10vw, 46px);
  }

  .lead,
  .section-text,
  .prose {
    font-size: 18px;
  }

  .chapter-grid,
  .world-grid {
    grid-template-columns: 1fr;
  }

  .chapter-card,
  .world-card {
    min-height: 180px;
  }

  .reader {
    padding: 24px 0 44px;
  }

  .paper p {
    font-size: 18px;
    line-height: 1.75;
  }
}

@media (max-width: 520px) {
  .container {
    width: min(100% - 28px, 1180px);
  }

  .site-header {
    position: static;
  }

  .hero {
    padding: 24px 0 42px;
  }

  .hero-copy {
    padding: 22px;
  }

  .cover-panel {
    width: min(100%, 340px);
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .actions,
  .button {
    width: 100%;
  }

  .button {
    padding: 0 14px;
  }

  .section {
    padding: 44px 0;
  }

  .section-head {
    gap: 14px;
    margin-bottom: 22px;
  }

  .chapter-title {
    font-size: 25px;
  }

  .paper {
    margin-left: -14px;
    margin-right: -14px;
    padding: 24px;
    border-radius: 0;
  }

  .reader-aside {
    gap: 8px;
  }

  .cta-panel {
    padding: 22px;
  }
}

@media (max-width: 380px) {
  .brand {
    font-size: 24px;
  }

  .nav-links {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 36px;
  }

  .chapter-card,
  .world-card {
    padding: 18px;
  }
}
