:root {
  --ink: #171f26;
  --ink-lo: #131a21;
  --ink-hi: #1e2833;
  --ice: #c8e0f4;
  --rose: #f5e0e8;
  --dim: #93a8b9;
  --line: rgba(200, 224, 244, 0.09);
  --r: 14px;
  --up: -6px -6px 16px rgba(255, 255, 255, 0.045), 7px 9px 22px rgba(0, 0, 0, 0.58);
  --up-sm: -3px -3px 10px rgba(255, 255, 255, 0.05), 4px 4px 12px rgba(0, 0, 0, 0.5);
  --in: inset -3px -3px 9px rgba(255, 255, 255, 0.05), inset 3px 3px 9px rgba(0, 0, 0, 0.6);
}

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

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

body {
  margin: 0;
  background:
    radial-gradient(880px 460px at 10% -8%, rgba(200, 224, 244, 0.11), transparent 62%),
    radial-gradient(720px 420px at 94% 2%, rgba(245, 224, 232, 0.09), transparent 58%),
    var(--ink);
  color: var(--ice);
  font-family: "JetBrains Mono", ui-monospace, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  line-height: 1.68;
  letter-spacing: 0.01em;
  min-height: 100vh;
}

body.lock { overflow: hidden; }

h1, h2, h3, .brand, .foot__mark, .hero__h1, .panel__h {
  font-family: "Orbitron", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 顶部细条 */
.ticker {
  background: linear-gradient(90deg, rgba(200, 224, 244, 0.16), rgba(245, 224, 232, 0.16));
  border-bottom: 1px solid var(--line);
}

.ticker__t {
  display: block;
  max-width: 1180px;
  margin: 0 auto;
  padding: 7px 20px;
  text-align: center;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  color: #e4f0fa;
  text-transform: lowercase;
}

/* 页头 */
.masthead { border-bottom: 1px solid var(--line); }

.masthead__in {
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cline {
  list-style: none;
  display: flex;
  gap: 2px;
  margin: 0;
  padding: 0;
  flex: 1;
}

.cline--r { justify-content: flex-end; }

.cline a {
  display: inline-block;
  padding: 12px 11px;
  border-radius: 10px;
  color: var(--ice);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.15s ease, box-shadow 0.15s ease;
}

.cline a:hover,
.cline a:focus-visible { color: var(--rose); box-shadow: var(--in); }

.masthead__mark { flex: 0 0 auto; }

.brand {
  display: inline-block;
  font-weight: 900;
  font-size: 1.02rem;
  letter-spacing: 0.08em;
  color: var(--ice);
  text-decoration: none;
  padding: 6px 4px;
}

.brand__img { display: block; height: 34px; width: auto; }

.masthead__tail {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.burger {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 15px;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(145deg, #212c37, #151c23);
  color: var(--ice);
  box-shadow: var(--up-sm);
  font: inherit;
  font-size: 0.86rem;
  cursor: pointer;
  transition: box-shadow 0.15s ease, transform 0.15s ease, color 0.15s ease;
}

.burger:hover { color: var(--rose); }
.burger:active { box-shadow: var(--in); transform: scale(0.97); }

.burger__bars {
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  box-shadow: 0 5px 0 currentColor, 0 -5px 0 currentColor;
}

/* 粘性锚点条 */
.rail {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(23, 31, 38, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.rail__in {
  max-width: 1180px;
  margin: 0 auto;
  padding: 5px 12px;
  overflow-x: auto;
}

.rail__list {
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  white-space: nowrap;
}

.rail__list a {
  display: inline-block;
  padding: 12px 13px;
  min-height: 44px;
  border-radius: 10px;
  color: var(--dim);
  text-decoration: none;
  font-size: 0.86rem;
  transition: color 0.15s ease, box-shadow 0.15s ease;
}

.rail__list a:hover,
.rail__list a:focus-visible { color: var(--rose); box-shadow: var(--in); }

/* 全屏遮罩菜单 */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 64px 24px 40px;
  overflow-y: auto;
  background: rgba(19, 26, 33, 0.975);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
}

.drawer.is-open { opacity: 1; visibility: visible; transform: none; }

.drawer__nav { width: 100%; max-width: 420px; }

.drawer__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.drawer__list a {
  display: block;
  padding: 16px 18px;
  min-height: 48px;
  text-align: center;
  text-decoration: none;
  color: var(--ice);
  border-radius: var(--r);
  background: linear-gradient(145deg, #1d2731, #141b22);
  box-shadow: var(--up-sm);
  font-size: 1rem;
  transition: box-shadow 0.15s ease, color 0.15s ease;
}

.drawer__list a:hover,
.drawer__list a:focus-visible { color: var(--rose); box-shadow: var(--in); }

.drawer__close {
  padding: 13px 28px;
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(145deg, #26313c, #161d24);
  color: var(--rose);
  box-shadow: var(--up-sm);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}

.drawer__close:active { box-shadow: var(--in); }

/* 主体网格 */
.main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 296px;
  column-gap: 30px;
  padding-top: 22px;
  padding-bottom: 40px;
}

.hero { grid-column: 1; }
.post { grid-column: 1; }
.side { grid-column: 2; grid-row: 1 / -1; }

/* 首屏 */
.hero {
  min-height: 70vh;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1fr);
  gap: 26px;
  align-items: center;
  padding: 10px 0 34px;
}

.hero__art {
  position: relative;
  margin: 0;
  height: 46vh;
  min-height: 290px;
  border-radius: 18px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #27333f, #121920);
  box-shadow: var(--up);
}

.hero__img { width: 100%; height: 100%; object-fit: cover; display: block; }

.hero__glow {
  width: 56%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 30%, #e8f3fc, rgba(200, 224, 244, 0.14) 62%, rgba(245, 224, 232, 0.05) 100%);
  box-shadow: inset -16px -16px 34px rgba(0, 0, 0, 0.55), 0 0 48px rgba(200, 224, 244, 0.16);
}

.hero__tag {
  position: absolute;
  left: 14px;
  bottom: 14px;
  margin: 0;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  color: var(--rose);
  background: rgba(23, 31, 38, 0.78);
  box-shadow: var(--up-sm);
  backdrop-filter: blur(4px);
}

.hero__copy { text-align: center; }

.hero__eyebrow {
  margin: 0 0 12px;
  font-size: 0.8rem;
  letter-spacing: 0.24em;
  color: var(--dim);
  text-transform: lowercase;
}

.hero__h1 {
  margin: 0;
  font-size: clamp(1.85rem, 4.4vw, 3rem);
  line-height: 1.24;
  font-weight: 900;
  color: var(--ice);
  text-shadow: 0 0 26px rgba(200, 224, 244, 0.22);
}

/* 正文 */
.post { padding-top: 6px; }

.post > section {
  padding: 30px 0 34px;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 92px;
}

.post > section:last-child { border-bottom: 0; padding-bottom: 10px; }

.post h2 {
  margin: 0 0 8px;
  font-size: clamp(1.28rem, 2.3vw, 1.7rem);
  line-height: 1.36;
  color: var(--rose);
}

.post > section > h2 + p,
.post p.subtitle,
.panel .subtitle {
  margin: 0 0 16px;
  color: var(--dim);
  font-size: 0.94rem;
}

.post h3 {
  margin: 24px 0 8px;
  font-size: 1.12rem;
  color: var(--ice);
}

.post p { margin: 0 0 16px; }

.post ul,
.post ol { margin: 0 0 18px; padding-left: 22px; }

.post li { margin-bottom: 8px; }

.post a {
  color: var(--rose);
  text-decoration: none;
  border-bottom: 1px dashed rgba(245, 224, 232, 0.4);
}

.post a:hover { border-bottom-style: solid; }

.post strong { color: #eef7fe; }

.post blockquote {
  margin: 0 0 18px;
  padding: 14px 18px;
  border-radius: var(--r);
  box-shadow: var(--in);
  color: #d7e8f6;
}

.post figure,
.post aside { margin: 0 0 18px; }

.post img { max-width: 100%; height: auto; border-radius: var(--r); }

.post table { width: 100%; border-collapse: collapse; margin: 0 0 18px; font-size: 0.94rem; }

.post th,
.post td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; }

/* 右侧栏 */
.side {
  position: sticky;
  top: 76px;
  align-self: start;
  display: grid;
  gap: 16px;
  padding-top: 8px;
}

.panel {
  padding: 20px 18px;
  border-radius: var(--r);
  background: linear-gradient(145deg, #1d2731, #141b22);
  box-shadow: var(--up);
}

.panel__h { margin: 0 0 4px; font-size: 1.02rem; color: var(--ice); }

.side__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }

.side__list a {
  display: block;
  padding: 12px 10px;
  min-height: 44px;
  border-radius: 10px;
  color: var(--dim);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.15s ease, box-shadow 0.15s ease;
}

.side__list a:hover,
.side__list a:focus-visible { color: var(--rose); box-shadow: var(--in); }

.totop {
  padding: 13px 16px;
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(145deg, #26313c, #161d24);
  color: var(--ice);
  box-shadow: var(--up-sm);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}

.totop:active { box-shadow: var(--in); transform: scale(0.98); }

/* 页脚 */
.foot {
  margin-top: 26px;
  border-top: 1px solid var(--line);
  padding: 26px 0 34px;
}

.foot__in {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 12px 22px;
}

.foot__mark {
  font-size: clamp(1.9rem, 6.6vw, 3.4rem);
  line-height: 0.94;
  font-weight: 900;
  color: rgba(200, 224, 244, 0.2);
  letter-spacing: 0.03em;
}

.foot__nav { display: flex; flex-wrap: wrap; gap: 2px 8px; }

.foot__nav a {
  display: inline-block;
  padding: 11px 4px;
  min-height: 42px;
  color: var(--dim);
  text-decoration: none;
  font-size: 0.86rem;
}

.foot__nav a:hover { color: var(--rose); }

.foot__copy {
  margin: 0 0 0 auto;
  color: var(--dim);
  font-size: 0.82rem;
  padding-bottom: 8px;
}

/* 动效 */
.js-on .rv {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.js-on .rv.is-in { opacity: 1; transform: none; }

/* 断点 */
@media (max-width: 1080px) {
  .cline { display: none; }
  .main { grid-template-columns: minmax(0, 1fr) 260px; column-gap: 22px; }
}

@media (max-width: 860px) {
  .main { grid-template-columns: minmax(0, 1fr); }
  .hero, .post, .side { grid-column: 1; }
  .side { position: static; grid-row: auto; }
  .hero {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    padding-top: 6px;
  }
  .hero__copy { order: -1; }
  .hero__art { height: 230px; min-height: 230px; }
  .hero__h1 { font-size: clamp(1.7rem, 7vw, 2.3rem); }
  .foot__copy { margin-left: 0; }
}

@media (max-width: 420px) {
  body { font-size: 16px; }
  .wrap { padding: 0 15px; }
  .foot__in { padding: 0 15px; }
  .brand__img { height: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js-on .rv { opacity: 1; transform: none; transition: none; }
  * { animation-duration: 0.001ms !important; }
}

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