@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&family=Space+Grotesk:wght@500;600;700&display=swap');

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

:root {
  --ink: #0d0d0d;
  --ink2: #130e1c;
  --violet: #8000ff;
  --magenta: #ff00ff;
  --txt: #e9e3f6;
  --dim: #a89dc4;
  --line: rgba(128, 0, 255, .32);
  --line2: rgba(255, 0, 255, .3);
  --r: 28px;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: "Space Grotesk", "Inter", system-ui, -apple-system, "Segoe UI", "Noto Sans SC", sans-serif;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100dvh;
  max-width: 100%;
  background: var(--ink);
  color: var(--txt);
  font: 400 17px/1.68 var(--sans);
  letter-spacing: .012em;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(52vw 62vh at 10% -10%, rgba(128, 0, 255, .34), transparent 62%),
    radial-gradient(46vw 54vh at 98% 4%, rgba(255, 0, 255, .22), transparent 64%),
    radial-gradient(64vw 52vh at 58% 110%, rgba(128, 0, 255, .18), transparent 70%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  opacity: .45;
  background: repeating-linear-gradient(180deg, rgba(0, 0, 0, .45) 0 1px, transparent 1px 3px);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--magenta); outline-offset: 3px; }

/* ---------- 左侧竖排控制轨 ---------- */
.rail {
  position: fixed;
  inset: 0 auto 0 0;
  width: 240px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px 18px 30px;
  background: linear-gradient(180deg, #120d1c, #0d0d0d 62%);
  border-right: 1px solid var(--line);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.brand { display: flex; align-items: center; gap: 10px; min-height: 44px; min-width: 0; }
.brand .logo { width: 38px; height: 38px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line2); }
.brand-name {
  font: 600 16px/1.2 var(--sans);
  letter-spacing: .16em;
  color: #fff;
  text-shadow: 0 0 14px rgba(255, 0, 255, .6);
  white-space: nowrap;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: 1px solid var(--line2);
  color: var(--magenta);
  font: 700 18px/1 var(--mono);
  text-shadow: 0 0 12px var(--magenta);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
}

.search {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  padding: 0 4px 0 10px;
  background: #150f20;
  border: 1px solid var(--line);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
}
.search input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  height: 44px;
  border: 0;
  background: transparent;
  color: var(--txt);
  font: 500 16px/1 var(--mono);
  letter-spacing: .04em;
}
.search input::placeholder { color: var(--dim); }
.search button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border: 0;
  background: transparent;
  color: var(--magenta);
  cursor: pointer;
}
.search svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }

.rail-nav { flex: 1 1 auto; min-width: 0; }

.menu-box summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
  padding: 6px 10px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  cursor: pointer;
  list-style: none;
  font: 500 13px/1 var(--mono);
  letter-spacing: .32em;
  color: var(--dim);
}
.menu-box summary::-webkit-details-marker { display: none; }
.menu-box summary em { font-style: normal; }

.bars {
  width: 20px;
  height: 11px;
  background: repeating-linear-gradient(180deg, var(--magenta) 0 2px, transparent 2px 5px);
  filter: drop-shadow(0 0 6px var(--magenta));
}

.links { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.links a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--dim);
  font: 500 16px/1.3 var(--sans);
  transition: color .2s, background .2s, border-color .2s, transform .2s;
}
.links a:hover, .links a:focus-visible, .links a.on {
  color: #fff;
  border-color: var(--line2);
  background: rgba(128, 0, 255, .16);
  transform: translateX(3px);
}

.ico {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border: 1px solid var(--magenta);
  transform: rotate(45deg);
  box-shadow: 0 0 8px rgba(255, 0, 255, .6);
}
.links li:nth-child(2n) .ico { transform: none; border-color: var(--violet); box-shadow: 0 0 8px rgba(128, 0, 255, .8); }
.links li:nth-child(3n) .ico { border-radius: 50%; transform: none; border-color: #fff; }
.links li:nth-child(4n) .ico { transform: rotate(20deg) scale(.8); border-color: var(--magenta); }

/* ---------- 主体骨架 ---------- */
main { position: relative; z-index: 1; padding: 0 20px; min-width: 0; }

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 26px 0 56px;
  display: grid;
  gap: 28px;
  min-width: 0;
}

/* ---------- 左索引卡 ---------- */
.index {
  background: rgba(19, 14, 28, .74);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 18px 16px;
  min-width: 0;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .6), inset 0 0 0 1px rgba(255, 0, 255, .06);
  backdrop-filter: blur(6px);
}
.index h2 {
  margin: 0 0 12px;
  font: 500 13px/1 var(--mono);
  letter-spacing: .34em;
  color: var(--dim);
}
.index h2 span { color: var(--magenta); text-shadow: 0 0 12px rgba(255, 0, 255, .6); }

.index-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.index-list li { animation: rise .5s both; min-width: 0; }
.index-list li:nth-child(1) { animation-delay: .02s; }
.index-list li:nth-child(2) { animation-delay: .07s; }
.index-list li:nth-child(3) { animation-delay: .12s; }
.index-list li:nth-child(4) { animation-delay: .17s; }
.index-list li:nth-child(5) { animation-delay: .22s; }
.index-list li:nth-child(6) { animation-delay: .27s; }
.index-list li:nth-child(7) { animation-delay: .32s; }

.index-list a {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--dim);
  font-size: 16px;
  transition: color .2s, background .2s, border-color .2s;
}
.index-list a:hover, .index-list a.on { color: #fff; background: rgba(255, 0, 255, .1); border-color: var(--line2); }
.no { font: 500 12px/1 var(--mono); color: var(--violet); letter-spacing: .1em; }

/* ---------- 首屏 ---------- */
.stream { min-width: 0; }
.post { min-width: 0; overflow-wrap: break-word; }

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 45vh;
  display: grid;
  align-content: end;
  padding: 26px 22px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background:
    linear-gradient(202deg, rgba(128, 0, 255, .26), transparent 56%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .045) 0 1px, transparent 1px 46px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .045) 0 1px, transparent 1px 46px),
    #100b18;
  box-shadow: 0 26px 70px rgba(0, 0, 0, .68);
  animation: rise .55s both;
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 62%;
  z-index: 1;
  background: linear-gradient(0deg, rgba(13, 13, 13, .92), transparent);
  pointer-events: none;
}

.hero-art { position: absolute; inset: 0; z-index: 0; }
.plate {
  position: absolute;
  margin: 0;
  border: 1px solid var(--line2);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(128, 0, 255, .3), 0 26px 60px rgba(0, 0, 0, .78);
}
.plate img { display: block; width: 100%; height: 100%; object-fit: cover; filter: contrast(1.07) saturate(1.12); }
.p1 {
  top: -6%;
  left: 1%;
  width: 40%;
  height: 64%;
  transform: rotate(-4deg) translateY(var(--py1, 0));
  clip-path: polygon(0 0, 100% 8%, 100% 100%, 0 92%);
}
.p2 {
  bottom: -8%;
  left: 31%;
  width: 32%;
  height: 52%;
  transform: rotate(3deg) translateY(var(--py2, 0));
}

.band {
  position: absolute;
  top: 30%;
  left: -10%;
  width: 130%;
  height: 12px;
  z-index: 1;
  background: linear-gradient(90deg, var(--violet), var(--magenta) 60%, transparent);
  transform: rotate(-7deg);
  opacity: .85;
  filter: blur(.4px) drop-shadow(0 0 14px rgba(255, 0, 255, .7));
  pointer-events: none;
}

.hero-txt { position: relative; z-index: 2; text-align: right; min-width: 0; }
.kick {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font: 500 13px/1 var(--mono);
  letter-spacing: .3em;
  color: #cbbfe6;
  text-shadow: 0 0 12px rgba(128, 0, 255, .8);
}
.blip {
  width: 8px;
  height: 8px;
  background: var(--magenta);
  box-shadow: 0 0 12px var(--magenta);
  animation: pulse 1.8s infinite ease-in-out;
}

.hero h1 {
  position: relative;
  margin: 12px 0 0;
  font: 700 clamp(30px, 5.4vw, 56px)/1.06 var(--sans);
  letter-spacing: -.012em;
  color: #fff;
  overflow-wrap: break-word;
  text-shadow: 0 0 18px rgba(255, 0, 255, .5), 0 0 48px rgba(128, 0, 255, .6);
}
.hero h1::before, .hero h1::after {
  content: attr(data-t);
  position: absolute;
  inset: 0;
  overflow: hidden;
  text-align: right;
  pointer-events: none;
}
.hero h1::before { color: var(--magenta); clip-path: inset(0 0 62% 0); animation: glitchA 3.6s infinite steps(2, end); }
.hero h1::after { color: var(--violet); clip-path: inset(58% 0 0 0); animation: glitchB 4.6s infinite steps(2, end); }

/* ---------- 正文流 ---------- */
.post > section {
  padding: 34px 0;
  border-top: 1px dashed rgba(128, 0, 255, .24);
  scroll-margin-top: 86px;
  min-width: 0;
}
.post > section:first-of-type { border-top: 0; padding-top: 34px; }

.post h2 {
  margin: 0 0 14px;
  font: 600 clamp(21px, 3vw, 29px)/1.24 var(--sans);
  letter-spacing: -.01em;
}
.post h2 span {
  background: linear-gradient(92deg, #ffffff, var(--magenta) 58%, var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.post h3 {
  margin: 24px 0 10px;
  font: 600 19px/1.35 var(--sans);
  color: #fff;
}
.post h3 span { color: var(--magenta); }

.post p { margin: 0 0 14px; max-width: 70ch; color: #ded7ee; }
.post ul, .post ol { margin: 0 0 16px; padding-left: 1.25em; max-width: 70ch; }
.post li { margin: 0 0 6px; }
.post li::marker { color: var(--magenta); }
.post a { color: var(--magenta); text-decoration: underline; text-underline-offset: 3px; }
.post a:hover { color: #fff; }
.post strong, .post b { color: #fff; }
.post blockquote {
  margin: 18px 0;
  padding: 12px 16px;
  max-width: 100%;
  border-left: 2px solid var(--magenta);
  background: rgba(255, 0, 255, .06);
  border-radius: 0 14px 14px 0;
  color: #e7e0f6;
}
.post blockquote p:last-child { margin-bottom: 0; }
.post img { height: auto; max-width: 100%; border-radius: 18px; }
.post pre {
  margin: 0 0 16px;
  padding: 12px 14px;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  font: 400 15px/1.6 var(--mono);
}
.post hr { border: 0; border-top: 1px dashed var(--line); margin: 26px 0; }
.post table { width: 100%; max-width: 100%; border-collapse: collapse; font-size: 16px; }
.post th, .post td { border: 1px solid var(--line); padding: 9px 10px; text-align: left; }
.post th { color: var(--magenta); font-weight: 600; }

/* ---------- 页脚 ---------- */
.foot {
  position: relative;
  z-index: 1;
  padding: 38px 20px 26px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgba(128, 0, 255, .09));
  min-width: 0;
}

.cta {
  max-width: 1180px;
  margin: 0 auto 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 26px 22px;
  border: 1px solid var(--line2);
  border-radius: var(--r);
  background:
    radial-gradient(80% 150% at 100% 0, rgba(255, 0, 255, .24), transparent 62%),
    #120d1c;
  box-shadow: 0 22px 54px rgba(0, 0, 0, .62);
}
.cta h2 {
  margin: 0;
  font: 700 clamp(24px, 4vw, 40px)/1.1 var(--sans);
  color: #fff;
  letter-spacing: -.012em;
  text-shadow: 0 0 24px rgba(128, 0, 255, .7);
}
.cta h2 span { color: var(--magenta); text-shadow: 0 0 22px rgba(255, 0, 255, .8); }
.cta-btn {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 12px 24px;
  font: 600 16px/1 var(--sans);
  color: #0d0d0d;
  background: linear-gradient(92deg, var(--violet), var(--magenta));
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 13px), calc(100% - 13px) 100%, 0 100%);
  box-shadow: 0 0 28px rgba(255, 0, 255, .5);
  transition: filter .2s;
}
.cta-btn:hover { filter: brightness(1.15); }

.cols { max-width: 1180px; margin: 0 auto; display: grid; gap: 20px; grid-template-columns: 1fr 1fr; }
.col-id { display: flex; align-items: center; gap: 12px; min-width: 0; }
.mark {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 1px solid var(--line2);
  transform: rotate(45deg);
  box-shadow: 0 0 16px rgba(255, 0, 255, .45);
}
.wordmark { margin: 0; font: 600 17px/1 var(--sans); letter-spacing: .14em; color: #fff; }

.foot dl { margin: 0; min-width: 0; }
.foot dt { font: 500 12px/1 var(--mono); letter-spacing: .3em; color: var(--magenta); margin-bottom: 8px; }
.foot dd { margin: 0; }
.foot dd a { display: inline-flex; align-items: center; min-height: 40px; padding: 4px 0; color: var(--dim); font-size: 16px; }
.foot dd a:hover { color: #fff; text-shadow: 0 0 12px var(--magenta); }

.copy {
  max-width: 1180px;
  margin: 24px auto 0;
  padding-top: 16px;
  border-top: 1px dashed rgba(128, 0, 255, .24);
  text-align: center;
  font: 500 13px/1.7 var(--mono);
  letter-spacing: .18em;
  color: var(--dim);
}

/* ---------- 动效 ---------- */
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes pulse {
  50% { opacity: .3; transform: scale(.78); }
}
@keyframes glitchA {
  0%, 90%, 100% { transform: none; }
  92% { transform: translate(-3px, -1px) skewX(-6deg); }
  95% { transform: translate(2px, 1px) skewX(5deg); }
}
@keyframes glitchB {
  0%, 88%, 100% { transform: none; }
  91% { transform: translate(3px, 1px) skewX(6deg); }
  94% { transform: translate(-2px, -1px) skewX(-5deg); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- 断点 ---------- */
@media (min-width: 980px) {
  main, .foot { margin-left: 240px; }
}

@media (min-width: 1080px) {
  .wrap { grid-template-columns: 216px minmax(0, 1fr); gap: 34px; align-items: start; }
  .index { position: sticky; top: 24px; }
}

@media (min-width: 900px) {
  .cols { grid-template-columns: 1.15fr 1fr 1fr 1fr; }
}

@media (max-width: 1079px) {
  .stream { order: 1; }
  .index { order: 2; }
}

@media (max-width: 979px) {
  .rail {
    position: static;
    width: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    padding: 12px 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow: visible;
  }
  .brand { order: 1; }
  .search { order: 2; flex: 1 1 140px; }
  .rail-nav { order: 3; flex: 1 1 100%; }

  .menu-box > summary { display: none; }
  .links {
    margin: 0;
    flex-direction: row;
    overflow-x: auto;
    gap: 6px;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
  .links a { white-space: nowrap; padding: 8px 14px; }
  .links a:hover, .links a:focus-visible, .links a.on { transform: none; }

  main { padding: 0 16px; }
  .wrap { padding-top: 16px; }
  .foot { padding: 30px 16px 22px; }
  .post > section, .post > section:first-of-type { scroll-margin-top: 16px; padding: 28px 0; }

  .hero { min-height: 0; align-content: start; padding: 20px 16px 22px; }
  .hero-txt { order: 1; }
  .hero-art { position: relative; inset: auto; order: 2; height: 142px; margin-top: 18px; }
  .p1 { top: 0; left: 0; width: 52%; height: 100%; }
  .p2 { left: auto; right: 0; top: 16%; bottom: auto; width: 40%; height: 80%; }
  .band { top: auto; bottom: 30%; }
  .hero h1 { font-size: clamp(26px, 6.4vw, 40px); }
}

@media (max-width: 639px) {
  body { font-size: 16px; }
  .hero { padding: 18px 14px 20px; }
  .hero-art { height: 118px; }
  .index-list { grid-template-columns: 1fr 1fr; }
  .cols { grid-template-columns: 1fr; }
  .post table { display: block; width: 100%; max-width: 100%; overflow-x: auto; white-space: nowrap; }
}

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