@import url('https://fonts.googleapis.com/css2?family=Crimson+Text:wght@400;600;700&family=EB+Garamond:wght@400;500;600;700;800&display=swap');

:root {
  --ink: #172617;
  --ink-deep: #0b150b;
  --neon: #69ff69;
  --cyan: #00ffff;
  --paper: #e9fff0;
  --chrome: linear-gradient(180deg, #ffffff 0%, #dcebe1 26%, #90a89a 47%, #f4fff8 53%, #b7ccbf 72%, #ffffff 100%);
  --glow: 0 0 16px rgba(105, 255, 105, 0.45);
  --glow-c: 0 0 18px rgba(0, 255, 255, 0.4);
  --edge: rgba(255, 255, 255, 0.14);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(900px 520px at 88% -8%, rgba(0, 255, 255, 0.16), transparent 62%),
    radial-gradient(720px 480px at 4% 104%, rgba(105, 255, 105, 0.16), transparent 64%),
    radial-gradient(600px 400px at 50% 40%, rgba(255, 255, 255, 0.04), transparent 70%),
    var(--ink);
  color: var(--paper);
  font-family: 'EB Garamond', 'Crimson Text', 'Songti SC', 'Noto Serif SC', Georgia, serif;
  font-size: 17px;
  line-height: 1.82;
  letter-spacing: 0.01em;
}

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

::selection {
  background: var(--neon);
  color: var(--ink-deep);
}

a {
  color: var(--cyan);
  text-underline-offset: 3px;
}

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

/* ---------- 骨架 ---------- */
.frame {
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  min-height: 100vh;
}

.rail {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 14px 16px;
  border-right: 1px solid rgba(255, 255, 255, 0.13);
  background: linear-gradient(180deg, rgba(11, 21, 11, 0.94), rgba(11, 21, 11, 0.7));
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 6px 4px;
  text-decoration: none;
  color: var(--paper);
}

.mark {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(0, 255, 255, 0.5);
  box-shadow: var(--glow-c);
}

.mark--txt {
  display: grid;
  place-items: center;
  background: var(--chrome);
  color: #11200f;
  font-size: 16px;
  line-height: 1;
  text-shadow: none;
}

.brand-txt {
  font-size: 1.16rem;
  letter-spacing: 0.16em;
  text-shadow: var(--glow);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.menu {
  min-width: 0;
}

.menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.menu a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(105, 255, 105, 0.12), rgba(0, 255, 255, 0.06));
  color: #d3f6dc;
  text-decoration: none;
  font-size: 1rem;
  letter-spacing: 0.06em;
  transition: background 0.22s ease, color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.menu a:hover,
.menu a:focus-visible {
  background: linear-gradient(180deg, rgba(105, 255, 105, 0.9), rgba(0, 255, 255, 0.62));
  color: var(--ink-deep);
  box-shadow: var(--glow);
  transform: translateX(3px);
}

.to-top {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 999px;
  border: 1px dashed rgba(0, 255, 255, 0.42);
  color: #bfe9f4;
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.14em;
}

.to-top:hover {
  border-style: solid;
  box-shadow: var(--glow-c);
}

main {
  min-width: 0;
}

article {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 clamp(16px, 3.4vw, 42px) 64px;
}

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  overflow: hidden;
  padding: 64px 12px;
  border-bottom: 1px solid var(--edge);
}

.hero::before,
.hero::after {
  content: '✦';
  position: absolute;
  z-index: 2;
  font-size: clamp(18px, 3vw, 34px);
  line-height: 1;
  pointer-events: none;
}

.hero::before {
  top: 17%;
  left: 16%;
  color: var(--cyan);
  text-shadow: 0 0 16px var(--cyan);
  animation: twinkle 3.6s ease-in-out infinite;
}

.hero::after {
  bottom: 19%;
  right: 17%;
  color: var(--neon);
  text-shadow: 0 0 16px var(--neon);
  animation: twinkle 4.4s ease-in-out 1.2s infinite;
}

.ghost {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(96px, 27vw, 320px);
  line-height: 0.8;
  letter-spacing: 0.05em;
  background: var(--chrome);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0.17;
  pointer-events: none;
  user-select: none;
}

.hero-in {
  position: relative;
  z-index: 3;
  max-width: 20ch;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 5.6vw, 4.3rem);
  line-height: 1.14;
  letter-spacing: 0.02em;
  background: linear-gradient(180deg, #ffffff, #d9ffe2 30%, #7fe6b6 48%, #ffffff 55%, #a9ffd0 84%, #ffffff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 24px rgba(0, 255, 255, 0.42));
}

.hero-img {
  position: absolute;
  z-index: 1;
  width: clamp(124px, 22vw, 236px);
  border-radius: 26px;
  border: 2px solid rgba(255, 255, 255, 0.55);
  object-fit: cover;
  opacity: 0.9;
  box-shadow: 0 0 30px rgba(0, 255, 255, 0.32), 0 18px 44px rgba(0, 0, 0, 0.55);
}

.hero-img--0 {
  left: 1.5%;
  bottom: 7%;
  animation: drift0 7s ease-in-out infinite;
}

.hero-img--1 {
  right: 1.5%;
  top: 9%;
  animation: drift1 8.4s ease-in-out infinite;
}

/* ---------- 正文 ---------- */
.lead-h {
  margin: 44px 0 12px;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 600;
  letter-spacing: 0.12em;
  color: #eaffef;
  text-shadow: var(--glow);
}

hr {
  border: 0;
  height: 2px;
  width: 100%;
  margin: 0 0 30px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--neon), var(--cyan) 46%, rgba(255, 255, 255, 0.05));
}

article > div {
  margin: 0 0 26px;
  padding: clamp(20px, 3.4vw, 36px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-bottom: 4px solid var(--neon);
  border-radius: 28px;
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.08), rgba(105, 255, 105, 0.05) 58%, rgba(0, 255, 255, 0.045));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34), 0 12px 32px rgba(0, 0, 0, 0.3);
  scroll-margin-top: 96px;
}

article > div:nth-of-type(even) {
  border-bottom-color: var(--cyan);
}

article > div > :first-child {
  margin-top: 0;
}

div h2 {
  margin: 0 0 12px;
  font-size: clamp(1.36rem, 2.7vw, 1.92rem);
  line-height: 1.3;
  letter-spacing: 0.04em;
  color: #ffffff;
  text-shadow: 0 0 14px rgba(105, 255, 105, 0.3);
}

div h3 {
  margin: 26px 0 10px;
  font-size: 1.14rem;
  letter-spacing: 0.05em;
  color: #d7ffe4;
}

div hr {
  margin: 0 0 18px;
  background: linear-gradient(90deg, var(--cyan), rgba(105, 255, 105, 0.4), transparent);
}

div p {
  margin: 0 0 1.05em;
  color: #dcefe0;
}

div p:last-child {
  margin-bottom: 0;
}

div ul,
div ol {
  margin: 0 0 1.05em;
  padding-left: 1.3em;
  color: #dcefe0;
}

div li {
  margin-bottom: 0.4em;
}

div li::marker {
  color: var(--neon);
}

div a {
  color: var(--cyan);
  text-decoration-thickness: 1px;
}

div a:hover {
  color: var(--neon);
  box-shadow: 0 1px 0 var(--neon);
  text-decoration: none;
}

div blockquote {
  margin: 1.2em 0;
  padding: 12px 18px;
  border-left: 3px solid var(--cyan);
  border-radius: 0 20px 20px 0;
  background: rgba(0, 255, 255, 0.07);
  color: #dff6ff;
}

div strong {
  color: #ffffff;
}

div table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.2em;
  font-size: 0.98rem;
}

div th,
div td {
  padding: 9px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  text-align: left;
  vertical-align: top;
}

div th {
  color: var(--neon);
  letter-spacing: 0.06em;
}

/* ---------- 页脚 ---------- */
.foot {
  display: grid;
  grid-template-columns: 1.2fr 1fr auto;
  gap: 18px 26px;
  align-items: start;
  padding: 40px clamp(16px, 3.4vw, 42px) 34px;
  border-top: 2px solid transparent;
  border-image: linear-gradient(90deg, var(--neon), var(--cyan), rgba(255, 255, 255, 0.1)) 1;
  background: linear-gradient(180deg, rgba(0, 255, 255, 0.07), rgba(11, 21, 11, 0.92));
}

.foot-brand {
  margin: 0;
  font-size: clamp(1.6rem, 4.4vw, 2.9rem);
  line-height: 1.02;
  letter-spacing: 0.05em;
  background: var(--chrome);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 14px rgba(0, 255, 255, 0.28));
}

.foot-nav {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 2px 15px;
  font-size: 0.98rem;
  color: #b9e0c4;
}

.foot-nav span {
  white-space: nowrap;
}

.foot small {
  text-align: right;
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  color: #96b7a1;
  padding-top: 6px;
}

/* ---------- 动效 ---------- */
.js .menu li {
  animation: pop 0.5s cubic-bezier(0.2, 0.85, 0.25, 1) both;
}

.js .menu li:nth-child(1) { animation-delay: 0.04s; }
.js .menu li:nth-child(2) { animation-delay: 0.1s; }
.js .menu li:nth-child(3) { animation-delay: 0.16s; }
.js .menu li:nth-child(4) { animation-delay: 0.22s; }
.js .menu li:nth-child(5) { animation-delay: 0.28s; }
.js .menu li:nth-child(6) { animation-delay: 0.34s; }
.js .menu li:nth-child(7) { animation-delay: 0.4s; }

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.62s ease, transform 0.62s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity, transform;
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

@keyframes pop {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

@keyframes twinkle {
  0%, 100% { opacity: 0.22; transform: scale(0.82) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.18) rotate(12deg); }
}

@keyframes drift0 {
  0%, 100% { transform: rotate(-6deg) translateY(0); }
  50% { transform: rotate(-3deg) translateY(-14px); }
}

@keyframes drift1 {
  0%, 100% { transform: rotate(5deg) translateY(0); }
  50% { transform: rotate(2deg) translateY(-18px); }
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .frame {
    grid-template-columns: minmax(0, 1fr);
  }

  .rail {
    height: auto;
    position: sticky;
    top: 0;
    z-index: 40;
    gap: 8px;
    padding: 9px 12px 10px;
    border-right: 0;
    border-bottom: 1px solid var(--edge);
  }

  .brand {
    min-height: 40px;
  }

  .menu ul {
    flex-direction: row;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .menu ul::-webkit-scrollbar {
    display: none;
  }

  .menu li {
    flex: 0 0 auto;
  }

  .menu a {
    min-height: 42px;
    padding: 8px 15px;
    font-size: 0.98rem;
  }

  .to-top {
    display: none;
  }

  .hero {
    min-height: 78vh;
    padding: 46px 10px;
  }

  .hero-img {
    width: clamp(104px, 30vw, 170px);
    opacity: 0.72;
  }

  .hero-img--0 {
    bottom: 5%;
    left: 0;
  }

  .hero-img--1 {
    top: 6%;
    right: 0;
  }

  .ghost {
    opacity: 0.12;
  }

  article {
    padding-bottom: 48px;
  }

  .lead-h {
    margin-top: 34px;
  }

  article > div {
    scroll-margin-top: 132px;
  }

  .foot {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    text-align: center;
    padding-bottom: 28px;
  }

  .foot-brand {
    font-size: clamp(1.7rem, 8vw, 2.4rem);
  }

  .foot-nav {
    justify-content: center;
  }

  .foot small {
    text-align: center;
    border-top: 1px dashed rgba(255, 255, 255, 0.14);
    padding-top: 14px;
  }
}

@media (max-width: 420px) {
  body {
    font-size: 16.5px;
  }

  article {
    padding-left: 13px;
    padding-right: 13px;
  }

  article > div {
    border-radius: 24px;
    padding: 18px 16px;
  }
}

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

  .js .menu li {
    animation: none;
  }

  .hero::before,
  .hero::after,
  .hero-img--0,
  .hero-img--1 {
    animation: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

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