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

:root {
  --neon: #87ff71;
  --cyan: #01cdfe;
  --ink: #192617;
  --ink-deep: #0d1710;
  --pink: #ff71ce;
  --violet: #b967ff;
  --text: #e2f4dd;
  --muted: #a9c7a6;
  --line: rgba(135, 255, 113, 0.22);
  --glass: linear-gradient(158deg, rgba(135, 255, 113, 0.08), rgba(1, 205, 254, 0.06));
  --serif: 'EB Garamond', 'Songti SC', Georgia, serif;
  --sans: 'Lato', system-ui, -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  overflow-x: hidden;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.8;
  color: var(--text);
  background:
    radial-gradient(900px 520px at 84% -10%, rgba(1, 205, 254, 0.14), transparent 68%),
    radial-gradient(700px 420px at 6% 6%, rgba(255, 113, 206, 0.1), transparent 70%),
    linear-gradient(180deg, #102017 0%, var(--ink) 58%, #101c14 100%);
  background-attachment: fixed, fixed, fixed;
}

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

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

a:hover,
a:focus-visible {
  color: var(--neon);
}

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

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ---------- 顶部导航 ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 6px clamp(14px, 4vw, 44px) 2px;
  background: rgba(13, 23, 16, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.topbar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 2px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 0;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--neon);
  text-shadow: 0 0 14px rgba(135, 255, 113, 0.5), 0 0 34px rgba(1, 205, 254, 0.35);
}

.brand:hover,
.brand:focus-visible {
  color: #d8ffcf;
}

.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  object-fit: cover;
}

.brand-text {
  white-space: nowrap;
}

.contact {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 18px;
  font-size: 16px;
  letter-spacing: 0.12em;
  color: var(--neon);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(135, 255, 113, 0.07);
  transition: background 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.contact:hover,
.contact:focus-visible {
  background: rgba(135, 255, 113, 0.16);
  box-shadow: 0 0 18px rgba(135, 255, 113, 0.35);
  transform: translateY(-1px);
}

.nav > ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 2px;
  padding-bottom: 2px;
}

.nav > ul > li {
  position: relative;
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 12px;
  font-size: 16px;
  line-height: 1.35;
  letter-spacing: 0.05em;
  color: #cfe9c9;
  border-radius: 10px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--neon);
  background: rgba(135, 255, 113, 0.09);
}

.has-sub > a::after {
  content: "▾";
  margin-left: 6px;
  font-size: 12px;
  opacity: 0.7;
}

.sub {
  position: absolute;
  left: 0;
  top: calc(100% + 2px);
  min-width: 186px;
  display: none;
  flex-direction: column;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(13, 23, 16, 0.97);
  box-shadow: 0 24px 44px rgba(0, 0, 0, 0.55);
}

.has-sub:hover .sub,
.has-sub:focus-within .sub {
  display: flex;
}

.sub a {
  display: block;
  white-space: nowrap;
}

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

.hero {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  min-height: 100vh;
  min-height: 100svh;
  padding: clamp(22px, 4vw, 48px) clamp(18px, 5vw, 68px) clamp(90px, 13vw, 150px);
  overflow: hidden;
  text-align: right;
  isolation: isolate;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 7vw), 0 100%);
  background:
    radial-gradient(circle at 74% 26%, rgba(255, 113, 206, 0.42), transparent 46%),
    linear-gradient(196deg, #1f3d28 0%, #192617 42%, #16283a 72%, #2b1a3d 100%);
}

.hero::before {
  content: "";
  position: absolute;
  left: -40%;
  right: -40%;
  bottom: -6%;
  height: 58%;
  z-index: 0;
  background-image:
    linear-gradient(rgba(1, 205, 254, 0.45) 1px, transparent 1px),
    linear-gradient(90deg, rgba(1, 205, 254, 0.45) 1px, transparent 1px);
  background-size: 64px 44px;
  transform: perspective(420px) rotateX(66deg);
  transform-origin: bottom center;
  opacity: 0.42;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
  filter: saturate(1.15) contrast(1.05);
}

.hero-glow {
  position: absolute;
  right: 8%;
  top: 12%;
  z-index: 0;
  width: 42vmin;
  height: 42vmin;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 34%, #ffd8f0 0%, var(--pink) 30%, var(--violet) 62%, transparent 74%);
  filter: blur(4px);
  opacity: 0.55;
  animation: hue-drift 20s linear infinite;
}

.hero-word {
  position: absolute;
  left: 2%;
  bottom: 4%;
  z-index: 0;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(72px, 19vw, 240px);
  line-height: 0.8;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px rgba(135, 255, 113, 0.4);
  opacity: 0.55;
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 20em;
  margin-top: 6px;
}

.hero-copy h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(30px, 6vw, 62px);
  line-height: 1.12;
  letter-spacing: 0.01em;
  color: #f2fff0;
  text-shadow: 0 0 14px rgba(135, 255, 113, 0.55), 0 0 44px rgba(1, 205, 254, 0.42);
}

.hero-jump {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 22px;
  padding: 9px 24px;
  font-size: 16px;
  letter-spacing: 0.2em;
  color: var(--neon);
  border: 1px solid rgba(135, 255, 113, 0.5);
  border-radius: 999px;
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.hero-jump:hover,
.hero-jump:focus-visible {
  background: rgba(135, 255, 113, 0.14);
  box-shadow: 0 0 22px rgba(135, 255, 113, 0.45);
}

@keyframes hue-drift {
  to {
    filter: blur(4px) hue-rotate(360deg);
  }
}

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

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(40px, 7vw, 76px) clamp(16px, 4vw, 32px);
}

.shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: clamp(24px, 4vw, 52px);
  align-items: start;
}

.prose {
  padding: clamp(20px, 4vw, 44px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.38);
}

.prose section {
  scroll-margin-top: 160px;
  padding: 34px 0;
  border-bottom: 1px dashed rgba(135, 255, 113, 0.18);
}

.prose section:first-child {
  padding-top: 0;
}

.prose section:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.prose h2 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(24px, 3.4vw, 34px);
  line-height: 1.24;
  color: #eefeea;
  text-shadow: 0 0 18px rgba(1, 205, 254, 0.35);
}

.prose h3 {
  margin: 26px 0 8px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(20px, 2.4vw, 24px);
  line-height: 1.3;
  color: #dffcd9;
}

.prose h2 + hr,
.prose h3 + hr {
  margin: 0 0 18px;
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--neon), var(--cyan), transparent);
  opacity: 0.55;
}

.prose p {
  margin: 0 0 16px;
  color: #d9ecd6;
}

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

.prose ul li,
.prose ol li {
  margin: 0 0 8px;
  padding-left: 2px;
}

.prose ul li::marker {
  color: var(--neon);
}

.prose strong {
  color: #f0ffec;
  font-weight: 700;
}

.prose blockquote {
  margin: 20px 0;
  padding: 14px 20px;
  border-left: 2px solid var(--cyan);
  border-radius: 0 14px 14px 0;
  background: rgba(1, 205, 254, 0.08);
  color: #dcefe8;
}

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 14px;
}

/* ---------- 侧栏 ---------- */

.rail {
  position: sticky;
  top: 160px;
}

.rail-nav ul {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(13, 23, 16, 0.6);
  overflow: hidden;
}

.rail-nav li + li {
  border-top: 1px solid rgba(135, 255, 113, 0.12);
}

.rail-nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 16px;
  font-size: 16px;
  line-height: 1.4;
  letter-spacing: 0.04em;
  color: #cfe9c9;
  border-left: 3px solid transparent;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.rail-nav a:hover,
.rail-nav a:focus-visible,
.rail-nav a.on {
  color: var(--neon);
  background: rgba(135, 255, 113, 0.1);
  border-left-color: var(--neon);
}

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

.foot {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px clamp(20px, 4vw, 48px);
  align-items: end;
  margin-top: 20px;
  padding: clamp(34px, 6vw, 64px) clamp(16px, 4vw, 40px) 28px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(1, 205, 254, 0.07), transparent 70%);
}

.foot-brand {
  grid-column: 1 / -1;
  margin: 0;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(40px, 11vw, 108px);
  line-height: 0.94;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px rgba(135, 255, 113, 0.62);
  text-shadow: 0 0 26px rgba(1, 205, 254, 0.35);
}

.foot hr {
  grid-column: 1 / -1;
  margin: 4px 0 8px;
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--pink), var(--cyan), var(--neon), transparent);
  opacity: 0.5;
}

.foot-legal {
  font-size: 16px;
  color: var(--muted);
}

.foot-legal p {
  margin: 0;
  padding: 8px 0;
}

.foot-links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 16px;
  justify-content: flex-end;
}

.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 2px;
  font-size: 16px;
  color: #cfe9c9;
}

.foot-links a:hover,
.foot-links a:focus-visible {
  color: var(--neon);
}

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

@media (max-width: 880px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .rail {
    position: static;
    order: 2;
  }

  .foot-links ul {
    justify-content: flex-start;
  }
}

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

  .topbar {
    padding: 4px 14px 0;
  }

  .brand {
    font-size: 19px;
    padding: 6px 0;
  }

  .brand-logo {
    width: 28px;
    height: 28px;
  }

  .nav > ul {
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding-bottom: 6px;
    scrollbar-width: none;
  }

  .nav > ul::-webkit-scrollbar {
    display: none;
  }

  .nav a {
    padding: 8px 10px;
    white-space: nowrap;
  }

  .sub {
    position: static;
    flex-direction: row;
    gap: 0;
    min-width: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .has-sub > a::after {
    content: "";
    margin: 0;
  }

  .has-sub {
    display: flex;
  }

  .hero {
    padding: 18px 16px 24vw;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 16vw), 0 100%);
  }

  .hero-copy {
    max-width: 100%;
    margin-top: 0;
  }

  .hero-copy h1 {
    font-size: clamp(28px, 8.6vw, 40px);
  }

  .hero-word {
    bottom: 22%;
    font-size: 20vw;
    opacity: 0.4;
  }

  .hero-glow {
    right: -6%;
    top: 4%;
    width: 54vmin;
    height: 54vmin;
  }

  .hero-jump {
    margin-top: 16px;
    padding: 8px 20px;
  }

  .prose section {
    scroll-margin-top: 140px;
  }

  .foot {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .foot-legal p {
    padding-bottom: 0;
  }
}

@media (max-width: 400px) {
  .nav a {
    padding: 8px 9px;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

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