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

:root {
  --ink: #1c1726;
  --ink-2: #241c33;
  --violet: #6514ff;
  --magenta: #bf00ff;
  --paper: #f4eeff;
  --dim: #b8accf;
  --edge: rgba(255, 255, 255, 0.12);
  --r: 4px;
  --head: 'Bebas Neue', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  isolation: isolate;
  background: var(--ink);
  color: var(--paper);
  font-family: 'Source Sans 3', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  overflow-x: hidden;
  padding-bottom: calc(82px + env(safe-area-inset-bottom));
}

body::before {
  content: "";
  position: fixed;
  inset: -25% -25% -25% -25%;
  z-index: -1;
  pointer-events: none;
  background:
    repeating-linear-gradient(115deg, transparent 0 40px, rgba(101, 20, 255, 0.16) 40px 42px),
    radial-gradient(58% 44% at 88% 2%, rgba(191, 0, 255, 0.32), transparent 70%),
    radial-gradient(54% 40% at 2% 18%, rgba(101, 20, 255, 0.3), transparent 72%);
  animation: drift 28s linear infinite;
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-42px, 42px, 0); }
}

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

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

/* 角落品牌 */
.brand-corner {
  position: fixed;
  top: 0.7rem;
  left: 0.7rem;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--violet), var(--magenta));
  color: #fff;
  text-decoration: none;
  font-family: var(--head);
  font-size: 1.4rem;
  line-height: 1;
  box-shadow: 0 12px 28px -14px rgba(191, 0, 255, 0.95);
  transition: transform 0.25s ease, filter 0.25s ease;
}

.brand-corner:hover,
.brand-corner:focus-visible {
  transform: rotate(-8deg) scale(1.06);
  filter: brightness(1.14);
}

.brand-corner img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

/* 首屏 */
.hero {
  position: relative;
  min-height: 45vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5.5rem 1.15rem 4rem;
  text-align: center;
  overflow: hidden;
}

.hero-title {
  position: relative;
  z-index: 2;
  margin: 0;
  max-width: 20ch;
  font-family: var(--head);
  font-weight: 700;
  font-size: clamp(2.6rem, 12vw, 7.2rem);
  line-height: 0.96;
  letter-spacing: 0.01em;
  background: linear-gradient(102deg, #ffffff 0%, #ddc8ff 44%, var(--magenta) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 18px 34px rgba(101, 20, 255, 0.5));
}

.hero-cut {
  position: absolute;
  left: -12%;
  right: -12%;
  bottom: -7vh;
  height: 26vh;
  z-index: 1;
  background: linear-gradient(90deg, var(--violet), var(--magenta));
  opacity: 0.92;
  transform: skewY(-4deg);
  will-change: transform;
}

.hero-cut::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.22) 0 3px, transparent 3px 26px);
}

/* 主体 */
main {
  display: block;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3rem) 1rem 0;
}

.shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
}

.cut {
  grid-column: 1 / -1;
  margin: 0;
  height: 10px;
  border-radius: 2px;
  background: repeating-linear-gradient(90deg,
    var(--violet) 0 22px,
    transparent 22px 34px,
    var(--magenta) 34px 58px,
    transparent 58px 70px);
}

.prose {
  min-width: 0;
  overflow-wrap: break-word;
}

.prose > article {
  position: relative;
  margin: 0 0 clamp(2.2rem, 5vw, 3.6rem);
  padding: clamp(1.35rem, 3.6vw, 2.5rem);
  background: linear-gradient(160deg, #251d35, #1f1829 68%);
  border: 1px solid var(--edge);
  border-radius: var(--r);
  box-shadow:
    0 26px 50px -32px rgba(101, 20, 255, 0.95),
    inset 0 2px 0 rgba(191, 0, 255, 0.32);
  scroll-margin-top: 88px;
  scroll-margin-bottom: 104px;
}

.prose > article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  border-radius: var(--r) 0 0 var(--r);
  background: linear-gradient(180deg, var(--violet), var(--magenta));
}

.prose h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 4.8vw, 2.2rem);
  line-height: 1.18;
  color: #fff;
  letter-spacing: 0.01em;
}

.prose h2::after {
  content: "";
  display: block;
  width: 54px;
  height: 4px;
  margin: 0.7rem 0 0;
  border-radius: 2px;
  background: var(--magenta);
}

.prose h2:first-child,
.prose > article > h2:first-child {
  margin-top: 0;
}

.prose h3 {
  margin: 2rem 0 0.5rem;
  font-size: 1.2rem;
  color: #e8dbff;
}

.prose p {
  margin: 0 0 1.1rem;
  color: #ded4f0;
}

.prose .subtitle,
.prose .subhead,
.prose .lead,
.prose .desc,
.subtitle {
  margin: 0.15rem 0 1.2rem;
  color: var(--dim);
  font-size: 1rem;
}

.prose a {
  color: #dcbaff;
  text-decoration: none;
  border-bottom: 1px solid rgba(191, 0, 255, 0.62);
}

.prose a:hover {
  color: #fff;
  border-bottom-color: #fff;
}

.prose ul,
.prose ol {
  margin: 0 0 1.2rem;
  padding-left: 1.25rem;
}

.prose li {
  margin: 0.4rem 0;
  color: #ded4f0;
}

.prose strong {
  color: #fff;
}

.prose img {
  margin: 1rem 0;
  border-radius: var(--r);
  box-shadow: 0 20px 40px -26px rgba(191, 0, 255, 0.9);
}

.prose blockquote {
  margin: 1.2rem 0;
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--violet);
  background: rgba(101, 20, 255, 0.14);
  color: #e8dbff;
}

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

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.98rem;
}

.prose th,
.prose td {
  padding: 0.5rem 0.55rem;
  border-bottom: 1px solid var(--edge);
  text-align: left;
}

/* 右侧栏 */
.rail {
  align-self: start;
  padding: 1.2rem 1.15rem 0.9rem;
  background: rgba(26, 21, 36, 0.88);
  border: 1px solid var(--edge);
  border-left: 3px solid var(--magenta);
  border-radius: var(--r);
  box-shadow: 0 20px 44px -30px rgba(191, 0, 255, 0.95);
}

.rail h2 {
  margin: 0 0 0.35rem;
  font-size: 1.02rem;
  letter-spacing: 0.16em;
  color: #fff;
}

.rail .subtitle {
  margin: 0 0 0.6rem;
  font-size: 0.98rem;
}

.rail-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rail-list a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0.35rem 0.15rem;
  color: var(--dim);
  text-decoration: none;
  font-size: 1rem;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
  transition: color 0.22s ease, padding-left 0.22s ease, border-color 0.22s ease;
}

.rail-list a:hover,
.rail-list a:focus-visible {
  color: #fff;
  padding-left: 0.4rem;
  border-bottom-color: var(--magenta);
}

/* 页脚 */
.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1180px;
  margin: clamp(2.4rem, 6vw, 4rem) auto 0;
  padding: 2rem 1rem 3rem;
  border-top: 2px solid rgba(255, 255, 255, 0.13);
}

.foot-cta {
  margin: 0;
}

.foot-cta a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0.5rem 1.6rem;
  border-radius: 3px;
  background: linear-gradient(120deg, var(--violet), var(--magenta));
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  transition: transform 0.24s ease, filter 0.24s ease;
}

.foot-cta a:hover,
.foot-cta a:focus-visible {
  transform: translateY(-2px);
  filter: brightness(1.16);
}

.foot-meta {
  margin: 0;
  color: var(--dim);
}

.foot-meta small {
  font-size: 0.95rem;
}

/* 底部固定导航 */
.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.55rem calc(0.45rem + env(safe-area-inset-bottom));
  background: rgba(19, 15, 27, 0.95);
  border-top: 2px solid var(--violet);
  box-shadow: 0 -16px 34px -22px rgba(191, 0, 255, 0.95);
  backdrop-filter: blur(10px);
}

.dock-cta {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 0.85rem;
  border-radius: 3px;
  background: linear-gradient(120deg, var(--violet), var(--magenta));
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
}

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

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

.dock ul {
  display: flex;
  gap: 0.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dock li {
  flex: 0 0 auto;
}

.dock li a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.62rem;
  border-radius: 3px;
  border-bottom: 2px solid transparent;
  color: var(--dim);
  font-size: 1rem;
  white-space: nowrap;
  text-decoration: none;
  transition: color 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}

.dock li a:hover,
.dock li a:focus-visible,
.dock li a.on {
  color: #fff;
  background: rgba(101, 20, 255, 0.24);
  border-bottom-color: var(--magenta);
}

/* 桌面 */
@media (min-width: 760px) {
  .hero {
    min-height: 45vh;
    padding: 6.5rem 2rem 5rem;
  }

  .hero-title {
    max-width: 26ch;
  }
}

@media (min-width: 940px) {
  body {
    padding-bottom: 96px;
  }

  .shell {
    grid-template-columns: minmax(0, 1fr) 298px;
    align-items: start;
  }

  .rail {
    position: sticky;
    top: 1.5rem;
  }

  .dock {
    justify-content: center;
    gap: 0.6rem;
    padding: 0.5rem 1rem;
  }

  .dock nav {
    flex: 0 1 auto;
  }

  .dock li a {
    padding: 0 0.8rem;
  }
}

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

  body::before {
    animation: none;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

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