@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600;700&family=Josefin+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --pink: #ff0080;
  --magenta: #ff00ff;
  --ink: #26171f;
  --ink-deep: #150c12;
  --glow: #ff8ad0;
  --violet: #a54bff;
  --text: #f7ebf2;
  --muted: #cda9c0;
  --line: rgba(255, 138, 208, 0.22);
  --bar-h: 120px;
  --serif: 'Cinzel', 'Songti SC', 'Noto Serif SC', Georgia, serif;
  --sans: 'Josefin Sans', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--ink-deep);
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  position: relative;
  min-height: 100%;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.78;
  color: var(--text);
  letter-spacing: 0.01em;
  padding-bottom: calc(var(--bar-h) + 10px);
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: -25%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(38% 42% at 16% 20%, rgba(255, 0, 128, 0.52), transparent 62%),
    radial-gradient(34% 38% at 80% 12%, rgba(255, 0, 255, 0.40), transparent 60%),
    radial-gradient(48% 46% at 62% 82%, rgba(165, 75, 255, 0.42), transparent 66%),
    radial-gradient(30% 34% at 10% 84%, rgba(255, 138, 208, 0.26), transparent 62%);
  filter: blur(52px) saturate(135%);
  animation: drift 26s ease-in-out infinite alternate;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.42;
  mix-blend-mode: screen;
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1px),
    conic-gradient(from 205deg at 50% -10%, rgba(255, 0, 128, 0.13), rgba(255, 0, 255, 0.09), rgba(255, 138, 208, 0.12), rgba(255, 0, 128, 0.13));
  background-size: 26px 26px, 100% 100%;
}

@keyframes drift {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to { transform: translate3d(3%, 2%, 0) scale(1.14); }
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--glow);
}

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

/* ---------- hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 84px 20px calc(var(--bar-h) + 56px);
  scroll-margin-top: 0;
}

.hero-bg {
  position: absolute;
  inset: -12% -10% 0;
  z-index: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  filter: blur(44px);
  opacity: 0.9;
  background: conic-gradient(from 178deg at 50% 34%,
    rgba(255, 0, 128, 0.42),
    rgba(255, 0, 255, 0.24),
    rgba(255, 138, 208, 0.30),
    rgba(38, 23, 31, 0.04),
    rgba(255, 0, 128, 0.42));
  will-change: transform;
}

.hero::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 46%;
  z-index: 0;
  background: linear-gradient(180deg, rgba(21, 12, 18, 0) 0%, rgba(21, 12, 18, 0.88) 100%);
}

.hero > *:not(.hero-bg) {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 26px;
  font-size: 16px;
  letter-spacing: 0.52em;
  text-indent: 0.52em;
  color: var(--glow);
  text-transform: none;
}

.hero h1 {
  margin: 0 0 24px;
  max-width: 19ch;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.5rem, 8.4vw, 5.6rem);
  line-height: 1.07;
  letter-spacing: 0.015em;
  text-wrap: balance;
  background: linear-gradient(102deg, #ffffff 8%, #ffd6ec 34%, #ff00ff 68%, #ff0080 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 24px 60px rgba(255, 0, 128, 0.18);
}

.lead {
  margin: 0 0 40px;
  max-width: 40ch;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.8;
}

.jump {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 26px;
  font-size: 16px;
  letter-spacing: 0.24em;
  text-indent: 0.24em;
  text-decoration: none;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: linear-gradient(100deg, rgba(255, 0, 128, 0.34), rgba(255, 0, 255, 0.22));
  transition: border-color 0.3s ease, background 0.3s ease;
}

.jump:hover {
  border-color: var(--glow);
  background: linear-gradient(100deg, rgba(255, 0, 128, 0.6), rgba(255, 0, 255, 0.36));
}

/* ---------- layout ---------- */

.wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 68px 22px 40px;
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 46px;
  align-items: start;
}

.stage {
  min-width: 0;
}

/* ---------- aside ---------- */

.side {
  position: sticky;
  top: 34px;
  padding-left: 18px;
  border-left: 1px solid transparent;
  border-image: linear-gradient(180deg, var(--pink), var(--magenta), rgba(255, 138, 208, 0)) 1;
}

.side h2 {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 0.26em;
  color: #fff;
}

.side h2 > span {
  position: relative;
  display: inline-block;
  padding-bottom: 8px;
}

.side h2 .deco {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, var(--pink), var(--magenta), rgba(255, 255, 255, 0));
}

.side-nav ul {
  list-style: none;
  margin: 0 0 34px;
  padding: 0;
}

.side-nav a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 0;
  color: var(--muted);
  font-size: 16px;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  transition: color 0.25s ease, padding-left 0.25s ease;
}

.side-nav a:hover {
  color: #fff;
  padding-left: 6px;
}

.side > p {
  margin: 0 0 20px;
}

.side > p a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  font-size: 16px;
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--line);
}

.side > p a:hover {
  border-color: var(--pink);
  color: #fff;
}

/* ---------- prose ---------- */

.prose > article {
  position: relative;
  margin: 0 0 30px;
  padding: 36px 30px 40px;
  background: linear-gradient(178deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018));
  box-shadow: 0 34px 66px -36px rgba(0, 0, 0, 0.96), 0 0 0 1px rgba(255, 138, 208, 0.14);
}

.prose > article::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--pink), var(--magenta), var(--glow), rgba(255, 255, 255, 0));
}

.prose > article[id] {
  scroll-margin-top: 26px;
}

.prose h2 {
  margin: 0 0 18px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.45rem, 3.2vw, 2.05rem);
  line-height: 1.28;
  letter-spacing: 0.01em;
}

.prose h2 > span {
  display: inline-block;
  background: linear-gradient(96deg, #ffffff, #ffc9e7 70%, var(--glow));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.prose h3 {
  margin: 32px 0 12px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.16rem;
  letter-spacing: 0.04em;
  color: #fff;
}

.prose h3 > span {
  display: inline-block;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line);
}

.prose p {
  margin: 0 0 18px;
  overflow-wrap: break-word;
}

.prose ul,
.prose ol {
  margin: 0 0 20px;
  padding-left: 22px;
}

.prose li {
  margin: 0 0 10px;
}

.prose li::marker {
  color: var(--pink);
}

.prose a {
  color: var(--glow);
  text-decoration-color: rgba(255, 138, 208, 0.5);
  text-underline-offset: 3px;
}

.prose a:hover {
  color: #fff;
}

.prose blockquote {
  margin: 0 0 20px;
  padding: 14px 20px;
  border-left: 2px solid var(--magenta);
  background: rgba(255, 0, 255, 0.07);
  color: var(--muted);
}

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

.prose strong {
  color: #fff;
  font-weight: 600;
}

.prose hr {
  border: 0;
  height: 1px;
  margin: 26px 0;
  background: linear-gradient(90deg, var(--line), rgba(255, 255, 255, 0));
}

.prose img {
  box-shadow: 0 30px 60px -34px rgba(0, 0, 0, 0.95);
  margin: 22px 0;
}

/* ---------- footer ---------- */

.foot {
  margin-top: 46px;
  border-top: 1px solid var(--line);
  background: rgba(14, 7, 12, 0.66);
}

.foot-line {
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  font-size: 16px;
  color: var(--muted);
}

.foot-logo {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-family: var(--serif);
  letter-spacing: 0.2em;
  color: #fff;
  text-decoration: none;
}

.foot-nav {
  min-width: 0;
}

.foot-nav p {
  display: flex;
  flex-wrap: wrap;
  gap: 0 14px;
  margin: 0;
}

.foot-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--muted);
  text-decoration: none;
  font-size: 16px;
}

.foot-nav a:hover {
  color: #fff;
}

.copy {
  margin-left: auto;
  color: rgba(205, 169, 192, 0.72);
}

.totop {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--line);
  font-size: 16px;
}

.totop:hover {
  border-color: var(--pink);
  color: #fff;
}

/* ---------- fixed bar ---------- */

.bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  padding: 6px 16px calc(8px + env(safe-area-inset-bottom));
  background: rgba(19, 10, 16, 0.86);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-top: 1px solid var(--line);
  box-shadow: 0 -26px 50px -30px rgba(0, 0, 0, 0.95);
}

.bar-brand {
  display: flex;
  align-items: center;
  overflow: hidden;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  color: #fff;
  text-decoration: none;
}

.brand img,
.foot-logo img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.brand-word {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.24em;
  background: linear-gradient(96deg, #fff, var(--glow) 60%, var(--magenta));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav {
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.nav::-webkit-scrollbar {
  display: none;
}

.nav p {
  display: flex;
  gap: 2px;
  margin: 0;
  white-space: nowrap;
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  font-size: 16px;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.22s ease, border-color 0.22s ease;
}

.nav a:hover,
.nav a:focus-visible {
  color: #fff;
  border-bottom-color: var(--pink);
}

.search {
  flex: 0 0 auto;
  display: flex;
  align-items: stretch;
}

.search input {
  width: 86px;
  height: 40px;
  min-width: 0;
  padding: 0 8px;
  font-family: var(--sans);
  font-size: 16px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
  border-right: 0;
  border-radius: 0;
  appearance: none;
}

.search input::placeholder {
  color: rgba(205, 169, 192, 0.7);
}

.search button {
  height: 40px;
  padding: 0 10px;
  font-family: var(--sans);
  font-size: 16px;
  color: #fff;
  cursor: pointer;
  border: 1px solid rgba(255, 0, 128, 0.55);
  border-radius: 0;
  background: linear-gradient(100deg, rgba(255, 0, 128, 0.62), rgba(255, 0, 255, 0.42));
}

.search button:hover {
  border-color: var(--glow);
}

/* ---------- reveal ---------- */

html.js .reveal {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.25, 1);
}

html.js .reveal.in {
  opacity: 1;
  transform: none;
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .wrap {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
    padding: 48px 18px 30px;
  }

  .side {
    position: static;
    border-left: 0;
    border-image: none;
    border-top: 1px solid var(--line);
    padding: 20px 0 0;
  }

  .side-nav ul {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 18px;
    margin-bottom: 24px;
  }

  .side h2:first-of-type {
    margin-top: 4px;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 16px;
  }

  .hero {
    padding-left: 18px;
    padding-right: 18px;
  }

  .eyebrow {
    letter-spacing: 0.36em;
    text-indent: 0.36em;
    margin-bottom: 20px;
  }

  .lead {
    margin-bottom: 32px;
  }

  .prose > article {
    padding: 28px 19px 32px;
  }

  .search input {
    width: 62px;
  }

  .foot-line {
    padding: 14px 18px;
    gap: 6px 16px;
  }

  .copy {
    margin-left: 0;
    width: 100%;
    order: 5;
  }
}

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

  body::before {
    animation: none;
  }

  html.js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-bg {
    transform: none !important;
  }
}

button[aria-expanded]{min-width:44px;min-height:44px}
