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

:root {
  --ink: #0d0d0d;
  --violet: #8000ff;
  --magenta: #ff00ff;
  --text: #e9e2f4;
  --dim: #a291bd;
  --edge: rgba(255, 0, 255, 0.26);
  --edge-soft: rgba(128, 0, 255, 0.32);
  --glass: rgba(128, 0, 255, 0.1);
  --hud: 'Russo One', 'Chakra Petch', "PingFang SC", "Microsoft YaHei", sans-serif;
  --body: 'Chakra Petch', "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

body {
  margin: 0;
  background-color: var(--ink);
  background-image:
    radial-gradient(circle at 10% -6%, rgba(128, 0, 255, 0.26), transparent 46%),
    radial-gradient(circle at 92% 8%, rgba(255, 0, 255, 0.16), transparent 44%),
    linear-gradient(rgba(128, 0, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(128, 0, 255, 0.07) 1px, transparent 1px);
  background-size: auto, auto, 46px 46px, 46px 46px;
  background-attachment: fixed;
  color: var(--text);
  font: 400 1rem/1.75 var(--body);
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9;
  pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(0, 0, 0, 0.34) 0 1px, transparent 1px 3px);
  opacity: 0.5;
}

a {
  color: var(--text);
  text-decoration: none;
}

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

h1,
h2,
h3 {
  font-family: var(--hud);
  line-height: 1.25;
  letter-spacing: 0.03em;
  margin: 0 0 0.7rem;
}

h2 {
  font-size: 1.5rem;
  color: #fff;
  text-shadow: 0 0 14px rgba(255, 0, 255, 0.55);
}

h3 {
  font-size: 1.2rem;
  color: #f6ecff;
}

hr {
  border: 0;
  height: 1px;
  margin: 0.7rem 0 1rem;
  background: linear-gradient(90deg, var(--magenta), rgba(128, 0, 255, 0.5) 45%, transparent);
}

h2 + hr,
h3 + hr {
  height: 2px;
  box-shadow: 0 0 12px rgba(255, 0, 255, 0.7);
}

p {
  margin: 0 0 1rem;
}

/* ---------- 顶部 HUD ---------- */

.hud {
  position: relative;
  z-index: 12;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--edge-soft);
  background: linear-gradient(180deg, rgba(13, 13, 13, 0.94), rgba(13, 13, 13, 0.55));
}

.hud__ticker {
  margin: 0;
  padding: 0.55rem 1.4rem 0.55rem 1.2rem;
  background: linear-gradient(90deg, var(--violet), var(--magenta));
  color: #0b0b0b;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.3em;
  clip-path: polygon(0 0, 100% 0, calc(100% - 26px) 100%, 0 100%);
  text-shadow: none;
}

.hud__brand {
  display: flex;
  justify-content: flex-end;
  padding: 0.75rem 1.2rem 0.2rem;
}

.brandmark {
  display: inline-grid;
  place-items: center;
  min-width: 58px;
  min-height: 58px;
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--magenta);
  border-radius: 10px;
  background: var(--glass);
  backdrop-filter: blur(8px);
  font-family: var(--hud);
  font-size: 1rem;
  letter-spacing: 0.04em;
  color: #fff;
  box-shadow: 0 0 20px rgba(255, 0, 255, 0.42), inset 0 0 14px rgba(128, 0, 255, 0.5);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.brandmark:hover,
.brandmark:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 0 28px rgba(255, 0, 255, 0.75), inset 0 0 18px rgba(128, 0, 255, 0.65);
}

.brandmark img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  display: block;
}

/* ---------- 主栅格 ---------- */

.shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 17rem;
  gap: 1.6rem 2rem;
  align-items: start;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.2rem 3rem;
}

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

.post {
  min-width: 0;
}

article > div.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  align-items: center;
  gap: 1.6rem;
  min-height: min(88svh, 780px);
  margin: 0;
  padding: 2.2rem 0 3rem;
  border: 0;
  border-radius: 0;
  background: none;
  backdrop-filter: none;
}

article > div.hero:has(.hero__collage:empty) {
  grid-template-columns: minmax(0, 1fr);
}

.hero::after {
  content: '';
  position: absolute;
  left: -1.2rem;
  right: -1.2rem;
  bottom: 0;
  height: 12px;
  background: linear-gradient(90deg, var(--violet), var(--magenta) 60%, var(--violet));
  clip-path: polygon(0 0, 100% 0, calc(100% - 44px) 100%, 0 100%);
  box-shadow: 0 0 24px rgba(255, 0, 255, 0.55);
}

.hero__copy {
  position: relative;
  min-width: 0;
}

.hero__copy h1 {
  font-size: clamp(2.1rem, 6.4vw, 4.3rem);
  color: #fff;
  margin: 0;
  text-shadow: 0 0 14px rgba(255, 0, 255, 0.8), 0 0 40px rgba(128, 0, 255, 0.7);
  animation: glitch 6.5s infinite steps(1, end);
}

.hero__slash {
  display: block;
  width: 132px;
  height: 8px;
  margin-top: 1.4rem;
  background: linear-gradient(90deg, var(--magenta), var(--violet));
  transform: skewX(-32deg);
  box-shadow: 0 0 16px rgba(255, 0, 255, 0.7);
}

@keyframes glitch {
  0%, 86%, 100% { transform: translate(0, 0) skewX(0); }
  88% { transform: translate(-3px, 1px) skewX(-2.5deg); }
  91% { transform: translate(3px, -1px) skewX(2deg); }
  94% { transform: translate(-1px, 0) skewX(0); }
}

.hero__collage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  align-items: center;
  min-width: 0;
}

.hero__collage:empty {
  display: none;
}

.hero__collage img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 1px solid var(--edge);
  border-radius: 10px;
  box-shadow: 0 0 30px rgba(128, 0, 255, 0.45);
}

.hero__collage img:first-child {
  transform: rotate(-4deg) translateY(calc(-1.2rem + var(--py, 0px)));
}

.hero__collage img:last-child {
  transform: rotate(4deg) translateY(calc(1.2rem + var(--py, 0px)));
  box-shadow: 0 0 30px rgba(255, 0, 255, 0.45);
}

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

article > div {
  position: relative;
  margin: 1.8rem 0;
  padding: 1.5rem 1.4rem;
  border: 1px solid var(--edge-soft);
  border-radius: 10px;
  background: linear-gradient(158deg, rgba(128, 0, 255, 0.12), rgba(13, 13, 13, 0.62));
  backdrop-filter: blur(10px);
  scroll-margin-top: 5.5rem;
  box-shadow: inset 0 0 26px rgba(128, 0, 255, 0.1);
}

article > div::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 14px;
  width: 46px;
  height: 2px;
  background: var(--magenta);
  box-shadow: 0 0 12px var(--magenta);
}

article ul,
article ol {
  margin: 0 0 1.1rem;
  padding-left: 1.3rem;
}

article li {
  margin-bottom: 0.45rem;
}

article strong {
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 0, 255, 0.45);
}

article a {
  color: #f0c9ff;
  border-bottom: 1px solid var(--edge);
}

article a:hover {
  color: #fff;
  border-bottom-color: var(--magenta);
}

/* ---------- 右侧节点栏 ---------- */

.rail {
  position: sticky;
  top: 1rem;
  z-index: 20;
  padding: 1rem 0.85rem;
  border: 1px solid var(--edge);
  border-radius: 10px;
  background: rgba(128, 0, 255, 0.12);
  backdrop-filter: blur(10px);
  box-shadow: 0 0 24px rgba(128, 0, 255, 0.22), inset 0 0 20px rgba(128, 0, 255, 0.18);
}

.rail h2 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.32em;
  color: #ffd9ff;
}

.rail hr {
  margin: 0.55rem 0 0.7rem;
}

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

.rail a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.55rem 0.6rem;
  font-size: 1rem;
  border-left: 2px solid transparent;
  border-radius: 0 6px 6px 0;
  transition: background 0.18s ease, border-color 0.18s ease, text-shadow 0.18s ease;
}

.rail a:hover,
.rail a:focus-visible {
  background: rgba(255, 0, 255, 0.16);
  border-left-color: var(--magenta);
  text-shadow: 0 0 10px var(--magenta);
  outline: none;
}

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

.tail {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1.4rem;
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.8rem 1.2rem 2.4rem;
  border-top: 1px solid var(--edge);
  background: linear-gradient(90deg, rgba(128, 0, 255, 0.14), transparent 70%);
}

.tail p {
  margin: 0;
  font-family: var(--hud);
  letter-spacing: 0.16em;
  color: #fff;
  text-shadow: 0 0 12px rgba(255, 0, 255, 0.6);
}

.tail small {
  font-size: 1rem;
  color: var(--dim);
  letter-spacing: 0.06em;
}

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

/* ---------- 移动端 ---------- */

@media (max-width: 860px) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    padding: 0 0.9rem 2rem;
  }

  .rail {
    order: -1;
    top: 0;
    padding: 0.45rem 0.5rem;
    border-radius: 0 0 10px 10px;
    border-top: 0;
  }

  .rail h2,
  .rail hr {
    display: none;
  }

  .rail ul {
    flex-direction: row;
    gap: 0.15rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .rail a {
    white-space: nowrap;
    min-height: 42px;
    padding: 0.5rem 0.7rem;
    border-left: 0;
    border-bottom: 2px solid transparent;
    border-radius: 6px 6px 0 0;
  }

  .rail a:hover,
  .rail a:focus-visible {
    border-left-color: transparent;
    border-bottom-color: var(--magenta);
  }

  article > div.hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    padding: 1.5rem 0 2.2rem;
  }

  .hero::after {
    left: -0.9rem;
    right: -0.9rem;
    height: 9px;
  }

  .hero__collage img {
    aspect-ratio: 4 / 5;
  }

  article > div {
    padding: 1.2rem 1rem;
    scroll-margin-top: 4.6rem;
  }

  .tail {
    padding: 1.4rem 0.9rem 2rem;
  }
}

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

  .hero__copy h1,
  .hero__collage img,
  .brandmark {
    animation: none;
    transition: none;
  }

  .hero__collage img:first-child {
    transform: rotate(-3deg);
  }

  .hero__collage img:last-child {
    transform: rotate(3deg);
  }
}

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