@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&family=Orbitron:wght@700;900&display=swap');

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

:root {
  --mint: #b4fde1;
  --sky: #add8e6;
  --ink: #172620;
  --ink-soft: #1d3329;
  --ink-deep: #101c17;
  --text: #e9fff6;
  --dim: #a9cabd;
  --line: rgba(180, 253, 225, .34);
  --glass: linear-gradient(155deg, rgba(180, 253, 225, .14), rgba(173, 216, 230, .06));
  --r-lg: 24px;
  --r-md: 18px;
  --shadow: inset -3px -3px 10px rgba(0, 0, 0, .32), 7px 7px 0 rgba(9, 24, 19, .55);
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, 'PingFang SC', 'Microsoft YaHei', monospace;
  --display: 'Orbitron', 'JetBrains Mono', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

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

body {
  margin: 0;
  padding: 34px 0 0 236px;
  background:
    radial-gradient(900px 620px at 10% -8%, rgba(180, 253, 225, .16), transparent 60%),
    radial-gradient(760px 540px at 94% 10%, rgba(173, 216, 230, .14), transparent 62%),
    var(--ink);
  color: var(--text);
  font-family: var(--mono);
  font-size: 17px;
  line-height: 1.75;
  overflow-x: hidden;
}

.topline {
  position: fixed;
  inset: 0 0 auto 0;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(90deg, var(--mint), var(--sky));
  color: var(--ink);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .3em;
  z-index: 60;
}

.topline::before,
.topline::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink);
  opacity: .5;
}

.side-head {
  position: fixed;
  top: 34px;
  left: 0;
  bottom: 0;
  width: 236px;
  padding: 28px 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow-y: auto;
  background: linear-gradient(185deg, #1f382c, #13211b 72%);
  border-right: 4px solid rgba(180, 253, 225, .2);
  z-index: 50;
}

.brand {
  display: block;
  padding: 4px 4px 14px;
  border-bottom: 3px dashed rgba(180, 253, 225, .26);
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 900;
  line-height: 1.3;
  color: var(--mint);
  text-decoration: none;
  text-shadow: 0 0 14px rgba(180, 253, 225, .55), 0 0 30px rgba(173, 216, 230, .3);
}

.side-nav > p {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
}

.side-nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 13px;
  border: 3px solid transparent;
  border-radius: 14px;
  color: var(--text);
  font-size: 16px;
  text-decoration: none;
  transition: transform .2s ease-out, border-color .2s ease-out, background .2s ease-out;
}

.side-nav a:hover,
.side-nav a:focus-visible {
  border-color: var(--line);
  background: rgba(180, 253, 225, .1);
  transform: translateX(3px);
}

.side-nav a.on {
  border-color: var(--mint);
  background: rgba(180, 253, 225, .14);
}

main { padding: 0 26px; }

.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 26px 0 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 292px;
  grid-template-areas: "hero hero" "content side";
  gap: 30px;
  align-items: start;
}

.hero {
  grid-area: hero;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: 30px;
  align-items: center;
  min-height: calc(100svh - 130px);
  padding: 36px 34px 78px;
  margin-bottom: 8px;
  border: 4px solid var(--line);
  border-radius: 32px;
  background: var(--glass);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero.solo { grid-template-columns: minmax(0, 1fr); }

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 52px;
  background: linear-gradient(90deg, var(--mint), var(--sky));
  clip-path: polygon(0 100%, 100% 14%, 100% 100%);
}

.hero-body { min-width: 0; }

.hero h1 {
  margin: 0 0 18px;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(2rem, 5.2vw, 3.5rem);
  line-height: 1.16;
  color: var(--mint);
  text-shadow: 0 0 20px rgba(180, 253, 225, .45), 0 4px 0 rgba(9, 24, 19, .55);
  overflow-wrap: anywhere;
}

.lede {
  margin: 0 0 26px;
  max-width: 46ch;
  font-size: 17px;
  line-height: 1.8;
  color: var(--text);
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 14px 26px;
  border: 4px solid var(--ink-deep);
  border-radius: 18px;
  background: linear-gradient(150deg, var(--mint), var(--sky));
  color: var(--ink);
  font-family: var(--display);
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  box-shadow: inset -3px -3px 8px rgba(23, 38, 32, .25), 0 6px 0 rgba(9, 24, 19, .6);
  transition: transform .2s cubic-bezier(.34, 1.56, .64, 1), box-shadow .2s ease-out;
}

.cta:hover { transform: translateY(-3px); }

.cta:active {
  transform: translateY(2px);
  box-shadow: inset -2px -2px 8px rgba(23, 38, 32, .3), 0 2px 0 rgba(9, 24, 19, .6);
}

.hero-art { margin: 0; min-width: 0; }

.hero-img {
  display: block;
  width: 100%;
  height: auto;
  border: 4px solid var(--mint);
  border-radius: 26px;
  box-shadow: inset -4px -4px 12px rgba(0, 0, 0, .3), 8px 8px 0 rgba(173, 216, 230, .26);
}

.main-col { grid-area: content; min-width: 0; }

.prose > article {
  position: relative;
  margin: 0 0 28px;
  padding: 28px 26px;
  border: 3px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--glass);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
  animation: rise .5s cubic-bezier(.34, 1.56, .64, 1) both;
}

.prose > article:nth-child(2) { animation-delay: .05s; }
.prose > article:nth-child(3) { animation-delay: .1s; }
.prose > article:nth-child(4) { animation-delay: .15s; }
.prose > article:nth-child(5) { animation-delay: .2s; }
.prose > article:nth-child(6) { animation-delay: .25s; }
.prose > article:nth-child(7) { animation-delay: .3s; }
.prose > article:nth-child(8) { animation-delay: .35s; }

.prose > article[id] { scroll-margin-top: 96px; }

.prose h2 {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 16px;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  line-height: 1.3;
  color: var(--mint);
  overflow-wrap: anywhere;
}

.prose h2::before {
  content: "";
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  border-radius: 5px;
  background: linear-gradient(140deg, var(--mint), var(--sky));
  box-shadow: 0 0 14px rgba(180, 253, 225, .7);
  transform: translateY(-3px);
}

.prose h3 {
  margin: 22px 0 12px;
  font-family: var(--display);
  font-size: 1.1rem;
  line-height: 1.4;
  color: var(--sky);
  overflow-wrap: anywhere;
}

.prose p { margin: 0 0 16px; }
.prose p:last-child { margin-bottom: 0; }

.prose ul,
.prose ol {
  margin: 0 0 16px;
  padding-left: 1.35em;
}

.prose li { margin: 0 0 8px; }

.prose a {
  color: var(--sky);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.prose a:hover { color: var(--mint); }

.prose strong { color: var(--mint); }

.prose blockquote {
  margin: 0 0 16px;
  padding: 14px 18px;
  border-left: 5px solid var(--mint);
  border-radius: 0 16px 16px 0;
  background: rgba(180, 253, 225, .09);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
}

.prose th,
.prose td {
  border: 2px solid var(--line);
  padding: 10px;
  text-align: left;
}

.prose pre {
  overflow-x: auto;
  padding: 16px;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: var(--ink-deep);
  font-size: 16px;
}

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

.prose hr {
  border: 0;
  border-top: 3px dashed var(--line);
  margin: 22px 0;
}

.rail {
  grid-area: side;
  position: sticky;
  top: 60px;
  min-width: 0;
  padding: 22px 20px;
  border: 3px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--glass);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
}

.rail h2 {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 14px;
  font-family: var(--display);
  font-size: 1.02rem;
  letter-spacing: .04em;
  color: var(--mint);
}

.rail h2::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 4px;
  background: var(--sky);
  box-shadow: 0 0 10px var(--sky);
}

.rail-nav > p {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
}

.rail-nav a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 10px;
  border-radius: 12px;
  color: var(--dim);
  font-size: 16px;
  text-decoration: none;
  transition: color .18s ease-out, background .18s ease-out, transform .18s ease-out;
}

.rail-nav a:hover,
.rail-nav a.on {
  color: var(--ink);
  background: linear-gradient(150deg, var(--mint), var(--sky));
  transform: translateX(-2px);
}

footer {
  max-width: 1160px;
  margin: 0 auto;
  padding: 18px 26px 62px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}

.foot-cta {
  width: 100%;
  padding: 32px 22px;
  border: 4px solid var(--mint);
  border-radius: 30px;
  background: linear-gradient(150deg, rgba(180, 253, 225, .18), rgba(173, 216, 230, .08));
  box-shadow: var(--shadow);
}

.foot-cta h2 {
  margin: 0 0 18px;
  font-family: var(--display);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  color: var(--mint);
  text-shadow: 0 0 16px rgba(180, 253, 225, .4);
}

.foot-cta h2,
.foot-meta h2 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.cta-big {
  min-height: 56px;
  padding: 16px 32px;
  font-size: 1.02rem;
}

.foot-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.foot-meta h2 {
  margin: 0;
  font-family: var(--mono);
  font-size: .95rem;
  font-weight: 500;
  letter-spacing: .26em;
  color: var(--dim);
}

.foot-meta h2::before,
.foot-meta h2::after {
  content: "";
  width: 24px;
  height: 2px;
  background: var(--line);
}

.foot-meta p {
  margin: 0;
  font-size: 16px;
  color: var(--dim);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(16px) scale(.985); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 1000px) {
  body { padding: 32px 0 0; }

  .topline { height: 32px; font-size: 13px; letter-spacing: .2em; }

  .side-head {
    position: sticky;
    top: 32px;
    inset: auto;
    width: auto;
    padding: 12px 16px 10px;
    gap: 10px;
    overflow: visible;
    border-right: 0;
    border-bottom: 4px solid rgba(180, 253, 225, .2);
  }

  .brand { padding: 2px 2px 8px; font-size: 1.08rem; }

  .side-nav { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .side-nav > p { flex-direction: row; gap: 8px; }
  .side-nav a { white-space: nowrap; padding: 8px 12px; }
  .side-nav a:hover { transform: none; }

  main { padding: 0 16px; }

  .wrap {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "hero" "content" "side";
    gap: 22px;
    padding: 16px 0;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    padding: 28px 20px 70px;
    border-radius: 26px;
  }

  .hero-art { order: 2; }
  .rail { position: static; order: 3; }
  footer { padding: 10px 16px 48px; }
}

@media (max-width: 520px) {
  .hero h1 { font-size: clamp(1.9rem, 9vw, 2.5rem); }
  .prose > article { padding: 22px 18px; }
  .lede { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: .001s !important;
    transition-duration: .001s !important;
  }
}

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