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

:root {
  --red: #ff0000;
  --mag: #ff006e;
  --ink: #1a1a2e;
  --bg: #08080f;
  --panel: #101020;
  --line: rgba(255, 0, 110, 0.22);
  --line-hard: rgba(255, 0, 110, 0.42);
  --text: #f2eef8;
  --dim: #b6aecb;
  --glow-m: 0 0 6px rgba(255, 0, 110, 0.75), 0 0 22px rgba(255, 0, 110, 0.35);
}

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

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

body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(255, 0, 110, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 0, 110, 0.055) 1px, transparent 1px);
  background-size: 44px 44px;
  background-attachment: fixed;
  color: var(--text);
  font-family: 'Noto Sans KR', system-ui, -apple-system, 'Segoe UI', 'Microsoft YaHei', sans-serif;
  font-size: 17px;
  line-height: 1.85;
  font-weight: 400;
  overflow-x: hidden;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.05) 0 1px,
    transparent 1px 3px
  );
  opacity: 0.6;
  mix-blend-mode: screen;
}

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

a {
  color: var(--mag);
  text-decoration: none;
  transition: color 0.18s linear;
}

a:hover {
  color: #fff;
}

h1,
h2,
h3,
h4 {
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin: 0 0 0.5em;
}

p {
  margin: 0 0 1.1em;
}

hr {
  border: 0;
  height: 2px;
  margin: 0.5em 0 1.2em;
  background: linear-gradient(90deg, var(--red), var(--mag) 45%, rgba(255, 0, 110, 0));
}

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

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- 布局骨架 ---------- */

.shell {
  padding-left: 78px;
  padding-top: 42px;
  min-height: 100vh;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 42px;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  background: #0c0c17;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.tick {
  margin: 0;
  font-size: 15px;
  letter-spacing: 0.14em;
  color: var(--dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  text-transform: none;
}

.rail {
  position: fixed;
  top: 42px;
  left: 0;
  bottom: 0;
  z-index: 45;
  width: 78px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0 18px;
  background: rgba(10, 10, 20, 0.94);
  border-right: 1px solid var(--line);
}

.rail-brand {
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.28em;
  color: #fff;
  text-shadow: var(--glow-m);
}

.rail-brand:hover {
  color: var(--mag);
}

.burger {
  writing-mode: vertical-rl;
  text-orientation: upright;
  padding: 16px 10px;
  min-height: 44px;
  font-family: inherit;
  font-size: 15px;
  letter-spacing: 0.3em;
  color: var(--mag);
  background: transparent;
  border: 1px solid var(--line-hard);
  border-radius: 0;
  cursor: pointer;
}

.burger:hover {
  color: #fff;
  border-color: var(--mag);
  box-shadow: 0 0 14px rgba(255, 0, 110, 0.4);
}

/* ---------- 全屏菜单 ---------- */

.menu {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 26px 24px 40px;
  background: #07070d;
  background-image: radial-gradient(circle at 80% 10%, rgba(255, 0, 110, 0.18), transparent 60%);
  transform: translateY(-101%);
  transition: transform 0.42s cubic-bezier(0.2, 0.9, 0.2, 1);
  overflow-y: auto;
}

.menu.open {
  transform: translateY(0);
}

.menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.menu-mark {
  font-weight: 700;
  letter-spacing: 0.2em;
  color: #fff;
  text-shadow: var(--glow-m);
}

.menu-close {
  font-family: inherit;
  font-size: 15px;
  letter-spacing: 0.2em;
  color: var(--mag);
  background: transparent;
  border: 1px solid var(--line-hard);
  border-radius: 0;
  padding: 10px 16px;
  min-height: 44px;
  cursor: pointer;
}

.menu-nav {
  display: flex;
  flex-direction: column;
}

.menu-nav a {
  display: flex;
  align-items: center;
  padding: 14px 4px;
  min-height: 48px;
  font-size: clamp(1.35rem, 5.4vw, 2.2rem);
  font-weight: 500;
  color: var(--text);
  border-bottom: 1px solid rgba(255, 0, 110, 0.14);
}

.menu-nav a:hover {
  color: var(--mag);
  text-shadow: var(--glow-m);
  padding-left: 12px;
}

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

.hero {
  position: relative;
  min-height: calc(100vh - 42px);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 60px 20px 70px;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 42%;
  background-image:
    linear-gradient(rgba(255, 0, 110, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 0, 110, 0.16) 1px, transparent 1px);
  background-size: 46px 46px;
  transform: perspective(360px) rotateX(62deg);
  transform-origin: bottom;
  opacity: 0.55;
  pointer-events: none;
  mask-image: linear-gradient(to top, #000, transparent 82%);
  -webkit-mask-image: linear-gradient(to top, #000, transparent 82%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 900px;
}

.glitch {
  position: relative;
  margin: 0 0 26px;
  font-size: clamp(2.5rem, 11vw, 6.4rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
  text-shadow:
    0 0 8px rgba(255, 255, 255, 0.5),
    0 0 26px rgba(255, 0, 110, 0.8),
    0 0 60px rgba(255, 0, 0, 0.55);
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  pointer-events: none;
  text-shadow: none;
  opacity: 0.85;
}

.glitch::before {
  color: var(--mag);
  clip-path: inset(0 0 56% 0);
  animation: glitch-a 5s steps(2, end) infinite;
}

.glitch::after {
  color: var(--red);
  clip-path: inset(52% 0 0 0);
  animation: glitch-b 3.4s steps(2, end) infinite;
}

@keyframes glitch-a {
  0%,
  86%,
  100% { transform: translate(0, 0); }
  88% { transform: translate(-4px, -3px) skewX(-2deg); }
  92% { transform: translate(3px, 2px); }
  96% { transform: translate(-2px, 1px) skewX(1.5deg); }
}

@keyframes glitch-b {
  0%,
  80%,
  100% { transform: translate(0, 0); }
  84% { transform: translate(4px, 3px) skewX(2deg); }
  90% { transform: translate(-3px, -2px); }
  95% { transform: translate(2px, -1px); }
}

.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.chips a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 14px;
  font-size: 15px;
  letter-spacing: 0.08em;
  color: #ffd3e2;
  border: 1px solid var(--line-hard);
  background: rgba(255, 0, 110, 0.06);
}

.chips a:hover,
.chips a.on {
  color: #08080f;
  background: var(--mag);
  border-color: var(--mag);
  box-shadow: 0 0 18px rgba(255, 0, 110, 0.55);
}

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

.split {
  display: grid;
  grid-template-columns: 214px minmax(0, 1fr);
  gap: 44px;
  max-width: 1260px;
  margin: 0 auto;
  padding: 66px 30px 80px;
  border-top: 1px solid var(--line);
}

.side {
  position: sticky;
  top: 78px;
  align-self: start;
  border-left: 2px solid var(--mag);
  padding: 4px 0 10px 16px;
}

.side h2 {
  font-size: 1.05rem;
  letter-spacing: 0.3em;
  color: #fff;
  margin-bottom: 0.2em;
}

.side hr {
  margin: 0.2em 0 0.9em;
}

.side-nav {
  display: flex;
  flex-direction: column;
}

.side-nav a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 0;
  font-size: 15px;
  color: var(--dim);
  border-bottom: 1px dashed rgba(255, 0, 110, 0.18);
}

.side-nav a:hover {
  color: var(--mag);
  padding-left: 6px;
}

.stream {
  min-width: 0;
  font-size: 17px;
  line-height: 1.9;
  color: #e7e2f2;
}

.stream div {
  scroll-margin-top: 92px;
  position: relative;
  margin: 0 0 34px;
  padding: 30px 30px 22px;
  background: linear-gradient(180deg, #11111f, #0c0c17);
  border: 1px solid rgba(255, 0, 110, 0.16);
  border-left: 3px solid var(--mag);
  box-shadow: 0 22px 48px -30px rgba(255, 0, 110, 0.85), 0 2px 0 rgba(255, 255, 255, 0.03) inset;
}

.stream h2 {
  font-size: clamp(1.35rem, 3.2vw, 1.75rem);
  color: #fff;
  text-shadow: 0 0 12px rgba(255, 0, 110, 0.5);
}

.stream h3 {
  font-size: 1.15rem;
  color: #ffd3e2;
  margin-top: 1.4em;
}

.stream a {
  color: var(--mag);
  text-decoration: underline;
  text-decoration-color: rgba(255, 0, 110, 0.5);
  text-underline-offset: 3px;
}

.stream a:hover {
  color: #fff;
  text-decoration-color: #fff;
}

.stream ul,
.stream ol {
  padding-left: 1.3em;
  margin: 0 0 1.2em;
}

.stream li {
  margin-bottom: 0.45em;
}

.stream blockquote {
  margin: 0 0 1.2em;
  padding: 12px 18px;
  border-left: 2px solid var(--red);
  background: rgba(255, 0, 0, 0.06);
  color: #f6d9e4;
}

.stream table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.2em;
  font-size: 16px;
}

.stream th,
.stream td {
  border: 1px solid rgba(255, 0, 110, 0.24);
  padding: 9px 11px;
  text-align: left;
}

.stream th {
  background: rgba(255, 0, 110, 0.12);
  color: #fff;
}

.stream figure {
  margin: 0 0 1.2em;
}

.stream figcaption {
  font-size: 14px;
  color: var(--dim);
  letter-spacing: 0.06em;
  margin-top: 6px;
}

.stream aside {
  margin: 0 0 1.2em;
  padding: 14px 18px;
  border: 1px dashed var(--line-hard);
  background: rgba(26, 26, 46, 0.7);
  color: #ffd3e2;
  font-size: 16px;
}

.stream code,
.stream pre {
  font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 15px;
  background: #05050b;
  border: 1px solid var(--line);
  color: #ff9dc2;
}

.stream code {
  padding: 1px 5px;
}

.stream pre {
  padding: 12px 14px;
  overflow-x: auto;
}

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

.foot {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 34px;
  padding: 52px 30px 0;
  border-top: 1px solid var(--line);
  background: #0a0a14;
}

.foot div {
  min-width: 0;
}

.foot-logo {
  display: inline-block;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: #fff;
  text-shadow: var(--glow-m);
  padding: 6px 0;
  min-height: 44px;
}

.foot-line {
  font-size: 15px;
  line-height: 1.7;
  color: var(--dim);
  max-width: 34ch;
}

.foot dl {
  margin: 0;
}

.foot dt {
  font-size: 14px;
  letter-spacing: 0.1em;
  color: #7e7793;
}

.foot dd {
  margin: 0 0 8px;
}

.foot dd a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 4px 0;
  font-size: 16px;
  color: var(--dim);
}

.foot dd a:hover {
  color: var(--mag);
}

.foot h2 {
  font-size: 1.02rem;
  letter-spacing: 0.26em;
  color: #fff;
}

.sub-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.sub-form input {
  flex: 1 1 130px;
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 16px;
  color: #fff;
  background: #05050b;
  border: 1px solid var(--line-hard);
  border-radius: 0;
}

.sub-form input::placeholder {
  color: #6f6984;
}

.sub-form button {
  min-height: 44px;
  padding: 10px 20px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #fff;
  background: linear-gradient(90deg, var(--red), var(--mag));
  border: 0;
  border-radius: 0;
  cursor: pointer;
}

.sub-form button:hover {
  box-shadow: 0 0 20px rgba(255, 0, 110, 0.6);
}

.foot-base {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(255, 0, 110, 0.14);
  margin-top: 12px;
  padding: 16px 0 26px;
}

.foot-base p {
  margin: 0;
  font-size: 15px;
  letter-spacing: 0.16em;
  color: #7e7793;
}

/* ---------- 回到顶部 ---------- */

.to-top {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 35;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 14px;
  font-size: 15px;
  color: var(--mag);
  background: rgba(8, 8, 15, 0.9);
  border: 1px solid var(--line-hard);
}

.to-top:hover {
  color: #08080f;
  background: var(--mag);
}

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

@media (max-width: 900px) {
  .split {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 46px 20px 62px;
  }

  .side {
    position: static;
    border-left-width: 2px;
  }

  .side-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }

  .side-nav a {
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid rgba(255, 0, 110, 0.18);
    font-size: 15px;
  }

  .foot {
    grid-template-columns: 1fr 1fr;
    padding: 40px 20px 0;
  }

  .foot-brand {
    grid-column: 1 / -1;
  }
}

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

  .shell {
    padding-left: 62px;
  }

  .rail {
    width: 62px;
  }

  .rail-brand {
    font-size: 16px;
    letter-spacing: 0.2em;
  }

  .tick {
    font-size: 14px;
    letter-spacing: 0.08em;
  }

  .hero {
    padding: 48px 16px 56px;
  }

  .chips a {
    font-size: 14px;
    padding: 8px 11px;
  }

  .stream div {
    padding: 22px 18px 16px;
    scroll-margin-top: 78px;
  }

  .foot {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .to-top {
    right: 12px;
    bottom: 12px;
  }
}

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

  .glitch::before,
  .glitch::after {
    animation: none;
  }

  .menu {
    transition: none;
  }

  .menu-nav a:hover,
  .side-nav a:hover {
    padding-left: 0;
  }
}

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