:root {
  --bg: #0c0e12;
  --text: #e2e7f0;
  --muted: #949db1;
  --dim: #667089;
  --accent: #4f8cff;
  --cyan: #5ac8fa;
  --green: #8bdcbe;
  --violet: #b48cff;
  --warm: #ffd166;
  --danger: #ff7a90;
  --grad-main: linear-gradient(92deg, #8db4ff 0%, #5ac8fa 46%, #8bdcbe 100%);
  --surface: rgba(13, 18, 28, 0.4);
  --surface-shadow: 0 24px 70px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  --font-mono: "Cascadia Code", ui-monospace, "SF Mono", Consolas, "Liberation Mono", monospace;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  position: relative;
  min-height: 100%;
  margin: 0;
  background:
    radial-gradient(980px 640px at 78% 4%, rgba(217, 108, 255, 0.16), transparent 58%),
    radial-gradient(820px 520px at 12% 22%, rgba(69, 220, 153, 0.14), transparent 62%),
    radial-gradient(820px 520px at 76% 28%, rgba(79, 140, 255, 0.24), transparent 58%),
    linear-gradient(180deg, #0e1016 0%, #11141c 48%, #0d0f15 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  overflow-x: clip;
}

@supports not (overflow-x: clip) {
  body {
    overflow-x: hidden;
  }
}

body.article-open {
  overflow: hidden;
}

body::after {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  content: "";
  /* 全页均匀极淡暗化：统一明暗、无分界线，文字到处可读，流体仍通透 */
  background: rgba(8, 12, 20, 0.3);
}

::selection {
  background: rgba(90, 200, 250, 0.32);
  color: #f2f7ff;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

code {
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.94em;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 16px;
  z-index: 20;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--text);
  color: var(--bg);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

/* ---------- 背景画布（流体保留原样） ---------- */

.field-canvas {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.56;
}

.fluid-canvas {
  position: fixed;
  top: 0;
  left: 0;
  z-index: -3;
  width: 100%;
  height: 100vh;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s ease;
}

body.fluid-active .fluid-canvas {
  opacity: 1;
}

body.fluid-active .field-canvas {
  opacity: 0;
}

body.fluid-fallback .field-canvas {
  opacity: 0.5;
}

/* ---------- 顶栏 ---------- */

/* 智能吸顶：下滑收起（不遮内容），上滑浮现（轻毛玻璃底，无边框无阴影），顶部恢复透明 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1480px, calc(100% - 64px));
  margin: 0 auto;
  padding: 22px 4px 14px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.65), 0 2px 18px rgba(4, 8, 14, 0.6);
  transition: transform 0.32s ease;
}

.site-header.is-hidden {
  transform: translateY(-110%);
  pointer-events: none;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: -6px -50vw -8px;
  z-index: -1;
  pointer-events: none;
  background: rgba(9, 12, 19, 0.55);
  backdrop-filter: blur(16px) saturate(125%);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.site-header.is-floating::before {
  opacity: 1;
}

/* 浮现后色块亮一下随即自动淡出，只留 logo 与站名悬浮 */
.site-header.is-calm::before {
  opacity: 0;
  transition-duration: 0.9s;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
  text-shadow: inherit;
  cursor: pointer;
}

.brand:focus-visible {
  outline: 2px solid rgba(90, 200, 250, 0.6);
  outline-offset: 4px;
  border-radius: 8px;
}

.brand-mark {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(79, 140, 255, 0.95), rgba(90, 200, 250, 0.4)),
    radial-gradient(circle at 70% 30%, #ffffff 0 2.5px, transparent 3.5px);
  box-shadow: 0 0 26px rgba(90, 200, 250, 0.55), inset 0 1px 2px rgba(255, 255, 255, 0.35);
  flex: 0 0 auto;
}

.brand-name em {
  font-style: normal;
  background: var(--grad-main);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-left: 6px;
}

.site-nav {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  position: relative;
  min-width: 64px;
  padding: 10px 16px;
  color: #b9c4d6;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  transition: color 0.2s ease, transform 0.2s ease;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: var(--grad-main);
  opacity: 0;
  transform: translateX(-50%) scale(0.4);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--text);
  outline: none;
  transform: translateY(-1px);
}

.site-nav a.is-active {
  color: #dcf0ff;
}

.site-nav a.is-active::after {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

/* 点击 logo/站名冒出的彩蛋粒子 */
.egg-spark {
  position: fixed;
  z-index: 40;
  pointer-events: none;
  user-select: none;
  line-height: 1;
  text-shadow: 0 0 14px currentColor;
  animation: egg-pop 0.95s ease-out forwards;
}

@keyframes egg-pop {
  0% {
    transform: translate(-50%, -50%) scale(0.35) rotate(0deg);
    opacity: 0;
  }
  14% {
    opacity: 1;
  }
  100% {
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.2) rotate(var(--rot));
    opacity: 0;
  }
}

main {
  position: relative;
  z-index: 1;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  display: grid;
  align-content: center;
  width: min(1480px, calc(100% - 64px));
  min-height: min(800px, calc(100svh - 100px));
  margin: 0 auto;
  padding: clamp(64px, 9vw, 110px) 0 clamp(56px, 8vw, 88px);
  isolation: isolate;
}

.hero-ghost {
  position: absolute;
  top: clamp(-10px, 1vw, 30px);
  right: min(-4vw, -20px);
  z-index: -1;
  font-family: var(--font-mono);
  font-size: clamp(110px, 24vw, 380px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.02em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(148, 182, 240, 0.13);
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}

@supports not (-webkit-text-stroke: 1px red) {
  .hero-ghost {
    color: rgba(148, 182, 240, 0.05);
  }
}

.hero-content {
  position: relative;
  max-width: 820px;
}

.eyebrow,
.section-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 20px;
  color: #a8ddcd;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  text-shadow: 0 1px 14px rgba(4, 8, 14, 0.6);
}

.eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--grad-main);
  box-shadow: 0 0 16px rgba(90, 200, 250, 0.8);
  flex: 0 0 auto;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 26px;
  font-size: clamp(52px, 11vw, 124px);
  line-height: 0.98;
  font-weight: 800;
  letter-spacing: -0.03em;
  filter: drop-shadow(0 2px 7px rgba(0, 0, 0, 0.8)) drop-shadow(0 10px 34px rgba(0, 0, 0, 0.55));
}

.h1-line {
  display: block;
  text-wrap: balance;
}

.h1-grad {
  background: var(--grad-main);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.h1-dot {
  color: transparent;
}

.tagline {
  max-width: 620px;
  margin-bottom: 40px;
  color: #b9c3d6;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.75;
  text-shadow:
    0 2px 6px rgba(0, 0, 0, 0.85),
    0 4px 14px rgba(0, 0, 0, 0.6);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 22px;
  margin-bottom: 44px;
}

.primary-action,
.ghost-action,
.submit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  border: 0;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.primary-action {
  padding: 0 30px;
  border-radius: 999px;
  background: var(--grad-main);
  color: #061120;
  font-weight: 800;
  font-size: 16px;
  box-shadow: 0 14px 44px rgba(79, 140, 255, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.primary-action:hover,
.primary-action:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 20px 56px rgba(90, 200, 250, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  outline: none;
}

.action-arrow {
  display: inline-block;
  margin-left: 10px;
  transition: transform 0.25s ease;
}

.primary-action:hover .action-arrow {
  transform: translateY(3px);
}

.ghost-action {
  position: relative;
  padding: 0 4px;
  background: none;
  color: #cfd9ea;
  font-weight: 600;
  font-size: 16px;
  text-shadow: 0 1px 12px rgba(4, 8, 14, 0.6);
}

.ghost-action::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 8px;
  width: 100%;
  height: 1px;
  background: var(--grad-main);
  opacity: 0.45;
  transform: scaleX(0.35);
  transform-origin: left;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.ghost-action:hover,
.ghost-action:focus-visible {
  color: #ffffff;
  outline: none;
}

.ghost-action:hover::after,
.ghost-action:focus-visible::after {
  opacity: 1;
  transform: scaleX(1);
}

.ghost-action:hover .action-arrow {
  transform: translateX(6px);
}

.hero-coord {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.hero-coord::before {
  content: "";
  width: 48px;
  height: 1px;
  background: linear-gradient(90deg, rgba(140, 180, 255, 0.6), transparent);
  flex: 0 0 auto;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 26px;
  width: 1px;
  height: 52px;
  background: linear-gradient(180deg, transparent, rgba(148, 182, 240, 0.4));
  overflow: hidden;
}

.scroll-cue::after {
  content: "";
  position: absolute;
  left: -1.5px;
  top: -8px;
  width: 4px;
  height: 8px;
  border-radius: 999px;
  background: var(--cyan);
  box-shadow: 0 0 12px rgba(90, 200, 250, 0.9);
  animation: cue-fall 2.2s ease-in-out infinite;
}

@keyframes cue-fall {
  0% { transform: translateY(0); opacity: 0; }
  30% { opacity: 1; }
  100% { transform: translateY(60px); opacity: 0; }
}

/* ---------- 跑马灯 ---------- */

.marquee {
  overflow: hidden;
  padding: 6px 0 10px;
  mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee-slide 90s linear infinite;
}

.marquee-group {
  display: flex;
  align-items: center;
  gap: 34px;
  padding-right: 34px;
}

.marquee-group span {
  color: rgba(168, 182, 208, 0.72);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: 0 1px 10px rgba(4, 8, 14, 0.7);
}

.marquee-group i {
  color: rgba(90, 200, 250, 0.4);
  font-style: normal;
  font-size: 11px;
}

@keyframes marquee-slide {
  to { transform: translateX(-50%); }
}

/* ---------- 区块通用 ---------- */

.section {
  position: relative;
  width: min(1480px, calc(100% - 64px));
  margin: 0 auto;
  padding: clamp(64px, 9vw, 110px) 0;
  isolation: isolate;
}

.section-ghost {
  position: absolute;
  top: clamp(4px, 2vw, 36px);
  right: min(-3vw, -16px);
  z-index: -1;
  font-family: var(--font-mono);
  font-size: clamp(80px, 15vw, 250px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.04em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(148, 182, 240, 0.1);
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}

@supports not (-webkit-text-stroke: 1px red) {
  .section-ghost {
    color: rgba(148, 182, 240, 0.045);
  }
}

.section-heading {
  max-width: 720px;
  margin-bottom: clamp(36px, 5vw, 56px);
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.6), 0 2px 20px rgba(4, 7, 14, 0.55);
}

.kicker-num {
  background: var(--grad-main);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 700;
}

.section-heading h2 {
  margin-bottom: 14px;
  font-size: clamp(34px, 4.6vw, 56px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.section-heading p:not(.section-kicker) {
  color: var(--muted);
  font-size: 16px;
}

/* ---------- 文章：编辑部式列表 ---------- */

.article-list {
  display: grid;
}

.article-row {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: clamp(18px, 3.4vw, 44px);
  padding: clamp(26px, 3.6vw, 40px) clamp(8px, 1.6vw, 20px);
  border-radius: 20px;
  transition: background 0.35s ease;
}

.article-row:not(:first-child)::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(148, 178, 230, 0.2) 16%, rgba(148, 178, 230, 0.2) 84%, transparent);
}

.article-row:hover {
  background: radial-gradient(640px 200px at 24% 40%, rgba(90, 160, 250, 0.08), transparent 72%);
}

.article-index {
  font-family: var(--font-mono);
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 700;
  line-height: 1.3;
  color: rgba(120, 136, 168, 0.5);
  transition: color 0.3s ease;
}

.article-row:hover .article-index {
  background: var(--grad-main);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.article-main {
  min-width: 0;
}

.article-title {
  margin-bottom: 12px;
  font-size: clamp(21px, 2.6vw, 30px);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.3;
  transition: color 0.25s ease;
  text-shadow: 0 1px 16px rgba(4, 8, 14, 0.5);
}

.article-row:hover .article-title {
  color: #eaf6ff;
}

.article-excerpt {
  max-width: 640px;
  margin-bottom: 16px;
  color: #9aa5ba;
  overflow-wrap: anywhere;
  text-shadow: 0 1px 8px rgba(4, 8, 14, 0.6);
}

.article-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.article-date {
  color: var(--warm);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
}

.tag,
.dialog-tags span {
  color: var(--dim);
  font-size: 13px;
  letter-spacing: 0.04em;
}

.tag::before,
.dialog-tags span::before {
  content: "# ";
  color: rgba(90, 200, 250, 0.66);
}

.article-arrow {
  align-self: center;
  font-size: clamp(22px, 2.6vw, 30px);
  color: rgba(130, 148, 180, 0.55);
  transition: transform 0.3s ease, color 0.3s ease;
}

.article-row:hover .article-arrow {
  color: var(--cyan);
  transform: translateX(10px);
}

.article-hit {
  position: absolute;
  inset: 0;
  z-index: 1;
  border: 0;
  border-radius: 20px;
  background: transparent;
  cursor: pointer;
}

.article-hit:focus-visible {
  outline: 2px solid rgba(90, 200, 250, 0.75);
  outline-offset: 3px;
}

/* ---------- 留言板 ---------- */

.message-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

/* 留言两栏不再是"面板"：内容直接浮在背景上，与文章区一致 */
.message-list-panel,
.comment-form-panel {
  min-width: 0;
  text-shadow: 0 1px 8px rgba(4, 8, 14, 0.6);
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.panel-heading h3,
.comment-form-panel h3 {
  margin-bottom: 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.icon-button:hover,
.icon-button:focus-visible {
  background: rgba(90, 200, 250, 0.16);
  box-shadow: 0 0 18px rgba(90, 200, 250, 0.25);
  transform: rotate(90deg);
  outline: none;
}

.icon-button:disabled {
  cursor: wait;
  opacity: 0.56;
}

.comment-list {
  display: grid;
  gap: 6px;
}

.comment-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  padding: 14px 12px;
  border-radius: 18px;
  transition: background 0.25s ease;
}

.comment-item:hover {
  background: rgba(9, 13, 20, 0.35);
}

.comment-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: linear-gradient(135deg, hsl(var(--hue, 210) 82% 64%), hsl(calc(var(--hue, 210) + 46) 82% 50%));
  color: #081018;
  font-weight: 800;
  font-size: 16px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  user-select: none;
}

.comment-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.comment-nick {
  color: var(--text);
  font-weight: 700;
}

.comment-head time {
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 12px;
  flex: 0 0 auto;
}

.comment-content {
  margin-bottom: 0;
  color: #c3cddf;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.empty-state {
  margin: 0;
  padding: 18px;
  border-radius: 16px;
  background: rgba(9, 13, 20, 0.42);
  color: #a7b1c4;
  backdrop-filter: blur(10px);
}

/* ---------- 留言表单 ---------- */

.comment-form-panel form {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

label {
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
}

label span {
  color: var(--dim);
  font-size: 12px;
  font-weight: 500;
  margin-left: 6px;
}

input,
textarea {
  width: 100%;
  border: 0;
  border-radius: 14px;
  background: rgba(8, 12, 19, 0.55);
  color: var(--text);
  outline: none;
  padding: 14px 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

input::placeholder,
textarea::placeholder {
  color: rgba(130, 142, 166, 0.65);
}

textarea {
  resize: vertical;
  min-height: 148px;
  line-height: 1.7;
}

input:focus,
textarea:focus {
  background: rgba(8, 12, 19, 0.68);
  box-shadow: 0 0 0 2px rgba(90, 200, 250, 0.45), 0 0 26px rgba(90, 200, 250, 0.14);
}

.form-meta {
  display: flex;
  min-height: 24px;
  justify-content: space-between;
  gap: 16px;
  color: var(--dim);
  font-size: 13px;
}

#formStatus.is-error {
  color: var(--danger);
}

#formStatus.is-success {
  color: var(--green);
}

.submit-button {
  width: 100%;
  border-radius: 999px;
  background: var(--grad-main);
  color: #061120;
  font-weight: 800;
  box-shadow: 0 14px 40px rgba(79, 140, 255, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.submit-button:hover:not(:disabled),
.submit-button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 18px 50px rgba(90, 200, 250, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  outline: none;
}

.submit-button:disabled {
  cursor: wait;
  opacity: 0.64;
  transform: none;
}

/* ---------- 文章弹窗 ---------- */

.article-dialog {
  width: min(920px, calc(100% - 36px));
  max-height: min(88svh, 880px);
  border: 0;
  border-radius: 28px;
  background:
    radial-gradient(620px 320px at 10% 0%, rgba(79, 140, 255, 0.16), transparent 62%),
    radial-gradient(680px 360px at 92% 100%, rgba(139, 220, 190, 0.1), transparent 62%),
    linear-gradient(180deg, rgba(15, 21, 32, 0.99), rgba(9, 13, 20, 0.99));
  color: var(--text);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  overflow: hidden;
  padding: 0;
}

/* 高度随内容自适应：短文是紧凑卡片，长文在 max-height 内滚动 */
.article-dialog[open] {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
}

.article-dialog::backdrop {
  background:
    radial-gradient(900px 620px at 50% 22%, rgba(79, 140, 255, 0.16), transparent 64%),
    rgba(3, 5, 9, 0.78);
  backdrop-filter: blur(10px);
}

.dialog-shell {
  position: relative;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  touch-action: pan-y;
  padding: clamp(28px, 4.2vw, 54px) clamp(24px, 4.6vw, 64px) clamp(34px, 4.6vw, 58px);
}

/* 关闭按钮挂在 dialog 上（不随内容滚动），任何布局下都固定右上角 */
.close-dialog {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 3;
  width: 42px;
  height: 42px;
  font-size: 20px;
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(12px);
}

.dialog-main {
  min-width: 0;
}

.dialog-figure {
  margin: 6px 0;
}

.dialog-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.38);
}

.dialog-date {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  color: var(--warm);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.dialog-date::before {
  content: "";
  width: 44px;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 209, 102, 0.75), transparent);
  flex: 0 0 auto;
}

.article-dialog h2 {
  margin-right: 44px;
  margin-bottom: 6px;
  max-width: 760px;
  font-size: clamp(26px, 3.2vw, 42px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-wrap: balance;
}

.dialog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 14px 0 0;
}

.dialog-body {
  display: grid;
  max-width: 760px;
  gap: 20px;
  margin-top: 30px;
  color: #ccd5e4;
  font-size: clamp(16px, 1.12vw, 17.5px);
  line-height: 1.95;
  overflow-wrap: anywhere;
}

/* 正文前的两端渐隐分隔线，与文章列表同语言 */
.dialog-body::before {
  content: "";
  height: 1px;
  background: linear-gradient(90deg, rgba(148, 178, 230, 0.28), rgba(148, 178, 230, 0.06) 70%, transparent);
}

.dialog-body p {
  margin: 0;
}

/* ---------- 弹窗内文章留言 ---------- */

.dialog-comments {
  max-width: 760px;
  margin-top: 44px;
}

.dialog-comments::before {
  content: "";
  display: block;
  height: 1px;
  margin-bottom: 26px;
  background: linear-gradient(90deg, rgba(148, 178, 230, 0.28), rgba(148, 178, 230, 0.06) 70%, transparent);
}

.dialog-comments h3 {
  margin-bottom: 16px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.dialog-comments .comment-list {
  margin-bottom: 20px;
}

.dialog-comments .comment-item:hover {
  background: rgba(255, 255, 255, 0.035);
}

.dialog-comments form {
  display: grid;
  gap: 10px;
}

.dialog-comments textarea {
  min-height: 92px;
}

.dialog-comments .form-meta {
  align-items: center;
}

.submit-button.compact {
  width: auto;
  min-height: 42px;
  padding: 0 26px;
  font-size: 14px;
  flex: 0 0 auto;
}

#dialogFormStatus.is-error {
  color: var(--danger);
}

#dialogFormStatus.is-success {
  color: var(--green);
}

/* 留言板里文章内留言的来源标注 */
.comment-article {
  margin: 6px 0 0;
  color: var(--dim);
  font-size: 12.5px;
}

/* 大屏：弹窗左文右评两栏，评论栏吸顶随读随评 */
@media (min-width: 1100px) {
  .article-dialog {
    width: min(1260px, calc(100% - 48px));
  }

  .dialog-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 400px;
    gap: clamp(36px, 4vw, 64px);
    align-items: start;
  }

  .dialog-comments {
    position: sticky;
    top: 0;
    margin-top: 0;
    max-height: calc(88svh - clamp(62px, 8.8vw, 112px));
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 4px;
  }

  .dialog-comments::before {
    display: none;
  }

  .dialog-comments h3 {
    margin-top: 4px;
  }
}

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

.site-footer {
  position: relative;
  width: min(1480px, calc(100% - 64px));
  margin: 0 auto;
  padding: 56px 0 44px;
  color: #7d879c;
  font-size: 13px;
  text-align: center;
  text-shadow: 0 1px 8px rgba(4, 8, 14, 0.6);
}

.site-footer::before {
  content: "";
  display: block;
  width: min(520px, 78%);
  height: 1px;
  margin: 0 auto 34px;
  background: linear-gradient(90deg, transparent, rgba(148, 178, 230, 0.3), transparent);
}

.site-footer p {
  margin-bottom: 8px;
}

.footer-brand {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
  background: var(--grad-main);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.footer-meta {
  color: #79839a;
  font-family: var(--font-mono);
  font-size: 12px;
}

.site-footer a {
  transition: color 0.2s ease;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--cyan);
  outline: none;
}

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

.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 12;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  background: rgba(14, 18, 27, 0.72);
  color: var(--cyan);
  font-size: 18px;
  box-shadow: 0 14px 48px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
  backdrop-filter: blur(14px);
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover,
.back-to-top:focus-visible {
  box-shadow: 0 14px 48px rgba(0, 0, 0, 0.4), 0 0 22px rgba(90, 200, 250, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
  outline: none;
}

/* ---------- 响应式 ---------- */

@media (max-width: 900px) {
  .message-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .scroll-cue {
    display: none;
  }
}

@media (max-width: 860px) {
  .site-header {
    align-items: stretch;
    flex-direction: column;
    gap: 6px;
    padding-top: 14px;
  }

  .brand,
  .site-nav {
    width: 100%;
    justify-content: center;
  }

  .hero {
    padding-top: 34px;
    padding-bottom: 30px;
  }

  .hero-ghost {
    top: -6px;
    font-size: clamp(90px, 22vw, 180px);
  }

  .article-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .article-arrow {
    display: none;
  }
}

/* 手机端背景降噪：粒子弱化，突出流体/渐变本身 */
@media (max-width: 760px) {
  .field-canvas {
    opacity: 0.34;
  }
}

@media (max-width: 520px) {
  html {
    scroll-padding-top: 120px;
  }

  .site-nav a {
    min-width: 0;
    flex: 1 1 0;
  }

  .hero-actions {
    display: grid;
    gap: 14px;
    margin-bottom: 30px;
  }

  .primary-action,
  .ghost-action {
    width: 100%;
  }

  .ghost-action {
    min-height: 44px;
  }

  .hero-coord {
    letter-spacing: 0.2em;
  }

  .section {
    padding: 44px 0;
  }

  .section-ghost {
    font-size: clamp(64px, 18vw, 110px);
  }

  .article-row {
    padding: 24px 4px;
    gap: 14px;
  }

  .article-dialog {
    width: calc(100% - 16px);
    max-height: calc(100svh - 24px);
    border-radius: 20px;
  }

  .dialog-shell {
    padding: 22px 18px 28px;
  }

  .article-dialog h2 {
    margin-right: 38px;
    font-size: clamp(24px, 8vw, 34px);
  }

  .dialog-body {
    font-size: 16px;
    line-height: 1.82;
  }

  .comment-head {
    flex-direction: column;
    gap: 2px;
  }

  .back-to-top {
    right: 12px;
    bottom: 12px;
    width: 40px;
    height: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .marquee-track {
    animation: none;
    transform: none;
  }

  .scroll-cue {
    display: none;
  }
}
