@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@300;400;500;600;700&family=Share+Tech+Mono&display=swap');

:root{
  --ink:#1c1726;
  --ink-deep:#110c1b;
  --violet:#6514ff;
  --magenta:#bf00ff;
  --paper:#f6f1ff;
  --dim:rgba(246,241,255,.66);
  --glass:rgba(255,255,255,.055);
  --line:rgba(191,0,255,.3);
  --r:18px;
  --mono:'Share Tech Mono','Fira Code',ui-monospace,SFMono-Regular,Menlo,Consolas,'PingFang SC','Microsoft YaHei',sans-serif;
}

*{box-sizing:border-box}

html{
  scroll-behavior:smooth;
  background:var(--ink-deep);
  overflow-x:hidden;
  -webkit-text-size-adjust:100%;
}

body{
  margin:0;
  width:100%;
  max-width:100%;
  font-family:var(--mono);
  font-size:16px;
  line-height:1.75;
  color:var(--paper);
  background:
    radial-gradient(880px 600px at 10% -10%, rgba(101,20,255,.5), transparent 62%),
    radial-gradient(720px 540px at 96% 4%, rgba(191,0,255,.38), transparent 60%),
    var(--ink-deep);
  background-attachment:fixed;
  overflow-x:hidden;
  -webkit-font-smoothing:antialiased;
}

a{color:inherit}

img,
svg,
video,
iframe{max-width:100%}

.page{position:relative;padding-bottom:40px;max-width:100%;overflow-x:clip}

.grid-bg{
  position:fixed;
  inset:-10% -10% -10% -10%;
  z-index:0;
  pointer-events:none;
  background-image:
    repeating-linear-gradient(112deg, rgba(191,0,255,.16) 0 2px, transparent 2px 48px),
    repeating-linear-gradient(22deg, rgba(101,20,255,.1) 0 1px, transparent 1px 96px);
  animation:drift 26s linear infinite;
  opacity:.75;
}

@keyframes drift{
  from{background-position:0 0,0 0}
  to{background-position:672px 0,-960px 0}
}

/* ---------- 底部固定导航条 ---------- */

.dock{
  position:fixed;
  left:50%;
  bottom:14px;
  transform:translateX(-50%);
  z-index:30;
  display:flex;
  align-items:center;
  gap:10px;
  width:min(1120px, calc(100% - 16px));
  max-width:calc(100vw - 16px);
  padding:9px 12px;
  border-radius:999px;
  border:1px solid var(--line);
  background:rgba(23,17,34,.78);
  backdrop-filter:blur(18px) saturate(140%);
  -webkit-backdrop-filter:blur(18px) saturate(140%);
  box-shadow:0 18px 48px rgba(8,4,18,.55);
}

.brand{
  display:inline-flex;
  align-items:center;
  flex:0 1 auto;
  min-width:0;
  min-height:44px;
  max-width:150px;
  padding:0 12px;
  border-radius:999px;
  text-decoration:none;
  font-weight:700;
  letter-spacing:.02em;
  background:linear-gradient(96deg,var(--violet),var(--magenta));
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  border:1px solid rgba(246,241,255,.16);
}

.brand__logo{display:block;width:auto;height:26px;border-radius:6px}
.brand__word{font-size:16px}

.dock__list{
  flex:1 1 auto;
  display:flex;
  align-items:center;
  gap:4px;
  margin:0;
  padding:0;
  list-style:none;
  min-width:0;
  overflow-x:auto;
  overscroll-behavior-x:contain;
  scrollbar-width:none;
  -webkit-overflow-scrolling:touch;
}

.dock__list::-webkit-scrollbar{display:none}

.dock__list li{flex:0 0 auto}

.dock__list a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:0 13px;
  border-radius:999px;
  font-size:16px;
  text-decoration:none;
  color:#e7dcff;
  white-space:nowrap;
  border:1px solid transparent;
  transition:background 220ms ease, color 220ms ease, transform 220ms ease, border-color 220ms ease;
}

.dock__list a:hover,
.dock__list a:focus-visible{
  background:linear-gradient(96deg,var(--violet),var(--magenta));
  border-color:transparent;
  color:#fff;
  transform:translateY(-2px);
  outline:none;
}

/* ---------- 首屏 ---------- */

.hero{
  position:relative;
  z-index:1;
  min-height:70vh;
  display:grid;
  grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr);
  gap:56px;
  align-items:center;
  padding:96px clamp(18px,5vw,72px) 132px;
  overflow:hidden;
}

.hero__copy{max-width:640px;min-width:0}

.hero__kicker{
  margin:0 0 22px;
  padding-left:16px;
  font-size:16px;
  letter-spacing:.32em;
  color:#d9c6ff;
  border-left:3px solid var(--magenta);
}

.hero__title{
  margin:0;
  font-size:clamp(40px,6.6vw,74px);
  line-height:1.04;
  letter-spacing:-.02em;
  overflow-wrap:anywhere;
  background:linear-gradient(98deg,#ffffff 6%,#dcc9ff 46%,var(--magenta) 96%);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}

.hero__cta{
  display:flex;
  flex-wrap:wrap;
  gap:14px;
  margin:34px 0 0;
}

.btn{
  display:inline-flex;
  align-items:center;
  min-height:48px;
  padding:0 24px;
  border-radius:999px;
  border:1px solid rgba(246,241,255,.34);
  font-size:16px;
  text-decoration:none;
  color:var(--paper);
  transition:transform 200ms ease, background 200ms ease, border-color 200ms ease;
}

.btn:hover,
.btn:focus-visible{
  background:rgba(191,0,255,.28);
  border-color:var(--magenta);
  transform:translateY(-2px);
  outline:none;
}

.btn--solid{
  background:linear-gradient(96deg,var(--violet),var(--magenta));
  border-color:transparent;
  color:#fff;
  box-shadow:0 16px 36px rgba(101,20,255,.45);
}

.btn--solid:hover,
.btn--solid:focus-visible{
  background:linear-gradient(96deg,var(--magenta),var(--violet));
  filter:brightness(1.08);
}

/* 双图错位拼贴 */

.collage{
  position:relative;
  min-width:0;
  min-height:min(58vh,460px);
  border-radius:var(--r);
}

.collage__slab{
  position:absolute;
  border-radius:var(--r);
  opacity:.9;
}

.collage__slab--one{
  inset:6% 26% 44% 0;
  background:linear-gradient(140deg,rgba(101,20,255,.85),rgba(191,0,255,.15));
  transform:rotate(-3deg);
}

.collage__slab--two{
  inset:44% 0 4% 34%;
  background:linear-gradient(140deg,rgba(191,0,255,.55),rgba(101,20,255,.08));
  transform:rotate(4deg);
}

.collage__ring{
  position:absolute;
  right:6%;
  top:2%;
  width:96px;
  height:96px;
  border-radius:50%;
  border:3px solid rgba(246,241,255,.32);
  border-bottom-color:var(--magenta);
  animation:spin 18s linear infinite;
}

@keyframes spin{to{transform:rotate(360deg)}}

.collage__img{
  position:absolute;
  max-width:100%;
  object-fit:cover;
  border-radius:var(--r);
  border:1px solid rgba(246,241,255,.28);
  box-shadow:0 28px 60px rgba(9,4,20,.6);
  filter:saturate(115%) contrast(108%);
}

.collage__img--a{
  width:62%;
  height:70%;
  left:0;
  top:4%;
  transform:rotate(-4deg);
}

.collage__img--b{
  width:52%;
  height:58%;
  right:0;
  bottom:2%;
  transform:rotate(5deg);
}

.hero__slash{
  position:absolute;
  left:-6%;
  right:-6%;
  bottom:26px;
  height:44px;
  transform:skewY(-3.4deg);
  background:linear-gradient(96deg,var(--violet),var(--magenta) 55%,rgba(191,0,255,.1));
  opacity:.85;
  pointer-events:none;
}

/* ---------- 主体两栏 ---------- */

.main{
  position:relative;
  z-index:1;
  padding:8px clamp(16px,5vw,72px) 96px;
  max-width:100%;
  overflow-x:clip;
}

.wrap{
  max-width:1120px;
  margin:0 auto;
  display:grid;
  grid-template-columns:236px minmax(0,1fr);
  gap:48px;
  align-items:start;
}

.wrap > *{min-width:0}

.rail{
  position:sticky;
  top:24px;
  min-width:0;
  padding:24px 20px;
  border-radius:var(--r);
  border:1px solid var(--line);
  background:rgba(255,255,255,.05);
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
}

.rail__title{
  margin:0 0 6px;
  font-size:20px;
  letter-spacing:.16em;
  color:#fff;
}

.subtitle{
  margin:0 0 18px;
  font-size:16px;
  letter-spacing:.12em;
  color:#c9a8ff;
}

.rail__list{
  margin:0;
  padding:0;
  list-style:none;
  display:flex;
  flex-direction:column;
  gap:2px;
  min-width:0;
}

.rail__list a{
  display:flex;
  align-items:center;
  min-height:42px;
  padding:4px 12px;
  border-radius:12px;
  font-size:16px;
  line-height:1.35;
  text-decoration:none;
  color:#e2d7ff;
  overflow-wrap:anywhere;
  border-left:2px solid rgba(191,0,255,.35);
  transition:background 200ms ease, border-color 200ms ease, color 200ms ease, padding-left 200ms ease;
}

.rail__list a:hover,
.rail__list a:focus-visible{
  background:rgba(191,0,255,.18);
  border-left-color:var(--magenta);
  color:#fff;
  padding-left:16px;
  outline:none;
}

/* ---------- 正文块 ---------- */

.stage{min-width:0;max-width:100%}

.prose{display:block;min-width:0;max-width:100%;overflow-wrap:break-word}

.prose div{
  margin:0 0 48px;
  padding:clamp(22px,3.2vw,40px);
  max-width:100%;
  border-radius:var(--r);
  border:1px solid var(--line);
  background:var(--glass);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  box-shadow:0 22px 50px rgba(9,4,20,.32);
  scroll-margin-top:24px;
  scroll-margin-bottom:120px;
}

.prose div:nth-of-type(even){
  background:rgba(191,0,255,.09);
  border-color:rgba(191,0,255,.42);
}

.prose div:last-child{margin-bottom:0}

.prose h2{
  margin:0 0 8px;
  font-size:clamp(26px,3.6vw,40px);
  line-height:1.18;
  letter-spacing:-.01em;
  color:#fff;
  overflow-wrap:break-word;
}

.prose h2::after{
  content:"";
  display:block;
  width:76px;
  height:6px;
  margin:14px 0 20px;
  border-radius:3px;
  background:linear-gradient(96deg,var(--violet),var(--magenta));
  transform:skewY(-14deg);
}

.prose h3{
  margin:30px 0 10px;
  font-size:22px;
  line-height:1.3;
  color:#f0e6ff;
  overflow-wrap:break-word;
}

.prose p{
  margin:0 0 18px;
  max-width:64ch;
  color:rgba(246,241,255,.9);
}

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

.prose a{
  color:#d9b6ff;
  text-decoration:none;
  overflow-wrap:anywhere;
  border-bottom:1px dashed rgba(217,182,255,.55);
}

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

.prose ul,
.prose ol{
  margin:0 0 20px;
  padding-left:24px;
  color:rgba(246,241,255,.9);
}

.prose li{margin:0 0 8px;max-width:60ch}

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

.prose strong{color:#fff}

.prose code{
  padding:2px 6px;
  border-radius:8px;
  background:rgba(191,0,255,.16);
  font-size:15px;
  overflow-wrap:anywhere;
}

.prose pre{
  display:block;
  max-width:100%;
  margin:0 0 20px;
  padding:16px 18px;
  border-radius:var(--r);
  border:1px solid var(--line);
  background:rgba(10,6,20,.6);
  overflow-x:auto;
  overscroll-behavior-x:contain;
  font-size:15px;
  line-height:1.6;
}

.prose pre code{padding:0;background:none;white-space:pre}

.prose blockquote{
  margin:24px 0;
  padding:18px 22px;
  max-width:100%;
  border-left:4px solid var(--magenta);
  border-radius:0 var(--r) var(--r) 0;
  background:rgba(101,20,255,.18);
  color:#f2e9ff;
}

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

.prose img{
  max-width:100%;
  height:auto;
  border-radius:var(--r);
  border:1px solid rgba(246,241,255,.22);
  margin:8px 0 18px;
}

.prose figure{margin:0 0 20px;max-width:100%}

.prose table{
  display:block;
  max-width:100%;
  width:100%;
  overflow-x:auto;
  overscroll-behavior-x:contain;
  border-collapse:collapse;
  margin:0 0 20px;
  font-size:16px;
}

.prose th,
.prose td{
  padding:10px 14px;
  border:1px solid var(--line);
  text-align:left;
  overflow-wrap:anywhere;
}

.prose th{background:rgba(101,20,255,.24);color:#fff}

.time,
.prose time{
  display:inline-block;
  margin:0 0 14px;
  padding:3px 12px;
  border-radius:999px;
  border:1px solid var(--line);
  font-size:16px;
  color:#cdb5ff;
}

/* ---------- 页脚 ---------- */

.foot{
  position:relative;
  z-index:1;
  max-width:1120px;
  margin:0 auto;
  padding:36px clamp(16px,5vw,72px) 132px;
  display:grid;
  grid-template-columns:1fr auto;
  gap:10px 32px;
  align-items:baseline;
  border-top:1px solid var(--line);
}

.foot p{margin:0;min-width:0;overflow-wrap:anywhere}

.foot__brand{
  font-size:22px;
  letter-spacing:.02em;
  background:linear-gradient(96deg,#fff,var(--magenta));
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}

.foot__links{display:flex;flex-wrap:wrap;gap:6px 18px;justify-self:end;min-width:0}

.foot__links a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  font-size:16px;
  text-decoration:none;
  color:#d7c6ff;
  transition:color 200ms ease;
}

.foot__links a:hover,
.foot__links a:focus-visible{color:#fff;outline:none}

.foot__host{font-size:16px;color:var(--dim)}

.foot__copy{
  justify-self:end;
  font-size:16px;
  color:rgba(246,241,255,.5);
}

/* ---------- 断点 ---------- */

@media (max-width:900px){
  .hero{
    grid-template-columns:minmax(0,1fr);
    gap:40px;
    min-height:0;
    padding:72px 18px 96px;
  }

  .collage{min-height:300px;order:2}

  .hero__slash{bottom:16px;height:30px}

  .wrap{
    grid-template-columns:minmax(0,1fr);
    gap:28px;
  }

  .rail{position:static;padding:18px 16px}

  .rail__list{
    flex-direction:row;
    gap:8px;
    overflow-x:auto;
    overscroll-behavior-x:contain;
    padding-bottom:4px;
    scrollbar-width:none;
  }

  .rail__list::-webkit-scrollbar{display:none}

  .rail__list li{flex:0 0 auto}

  .rail__list a{
    border-left:none;
    border:1px solid var(--line);
    border-radius:999px;
    padding:0 14px;
    min-height:42px;
    white-space:nowrap;
  }

  .rail__list a:hover,
  .rail__list a:focus-visible{padding-left:14px}

  .foot{
    grid-template-columns:minmax(0,1fr);
    gap:8px;
    padding-bottom:150px;
  }

  .foot__links,
  .foot__copy{justify-self:start}

  .dock{gap:6px;padding:8px 10px}

  .brand{max-width:104px;padding:0 10px}
  .brand__word{font-size:16px}
}

@media (max-width:420px){
  .hero__title{font-size:36px}
  .dock__list a{font-size:16px;padding:0 11px}
  .prose div{padding:20px 16px}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .grid-bg,
  .collage__ring{animation:none}
  .btn,
  .dock__list a,
  .rail__list a{transition:none}
}

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