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

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

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

:root {
  --neon: #87ff71;
  --cyan: #01cdfe;
  --ink: #192617;
  --bg: #0b140c;
  --panel: #14251a;
  --panel-2: #1b3221;
  --txt: #e7f7e1;
  --dim: #a2c39b;
  --line: rgba(135, 255, 113, .22);
  --pink: #ff71ce;
  --violet: #b967ff;
  --dock-h: 96px;
  --f-head: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, monospace;
  --f-body: 'Inter', system-ui, -apple-system, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

body {
  margin: 0;
  min-width: 0;
  overflow-x: hidden;
  background:
    radial-gradient(120% 70% at 50% 0%, #17321c 0%, #0d180f 46%, #08110a 100%) fixed,
    var(--bg);
  color: var(--txt);
  font: 400 17px/1.72 var(--f-body);
  padding-bottom: calc(var(--dock-h) + 26px);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .04) 0 1px, transparent 1px 3px);
  mix-blend-mode: screen;
}

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

a { color: var(--cyan); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--neon); }

::selection { background: var(--neon); color: #061006; }

/* ---------- hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  overflow: hidden;
  padding: clamp(96px, 17vh, 190px) clamp(18px, 5vw, 68px) 170px;
  text-align: right;
}

.hero__media { position: absolute; inset: 0; z-index: 0; }
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: hue-rotate(295deg) saturate(1.25) contrast(1.05) brightness(.62);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(200deg, rgba(11, 20, 12, .2) 0%, rgba(11, 20, 12, .82) 62%, #0b140c 100%),
    linear-gradient(90deg, rgba(255, 113, 206, .22), rgba(1, 205, 254, .18));
  mix-blend-mode: multiply;
}

.hero__sun {
  position: absolute;
  right: clamp(10px, 12vw, 180px);
  top: 14vh;
  width: clamp(150px, 26vw, 320px);
  aspect-ratio: 1;
  border-radius: 50%;
  z-index: 1;
  background: linear-gradient(180deg, var(--pink) 0%, #ff9a6b 42%, var(--cyan) 100%);
  filter: blur(2px);
  opacity: .5;
  box-shadow: 0 0 90px rgba(255, 113, 206, .45);
}

.hero__grid {
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: 0;
  height: 44%;
  z-index: 1;
  opacity: .5;
  transform: perspective(340px) rotateX(63deg);
  transform-origin: bottom center;
  background-image:
    linear-gradient(rgba(1, 205, 254, .55) 1px, transparent 1px),
    linear-gradient(90deg, rgba(1, 205, 254, .4) 1px, transparent 1px);
  background-size: 100% 36px, 62px 100%;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, .1), #000 70%);
}

.hero::after {
  content: "";
  position: absolute;
  left: -4%;
  right: -4%;
  bottom: -2px;
  height: 92px;
  z-index: 3;
  background: linear-gradient(90deg, var(--neon) 0%, var(--cyan) 48%, var(--violet) 78%, var(--pink) 100%);
  clip-path: polygon(0 74%, 100% 8%, 100% 100%, 0 100%);
}

.hero__inner { position: relative; z-index: 4; max-width: 40ch; }

.hero__brand {
  margin: 0 0 14px;
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: .42em;
  text-transform: uppercase;
  color: var(--neon);
  text-shadow: 0 0 14px rgba(135, 255, 113, .7);
}

.hero__h1 {
  position: relative;
  margin: 0;
  font-family: var(--f-head);
  font-weight: 700;
  font-size: clamp(34px, 6.4vw, 74px);
  line-height: 1.06;
  letter-spacing: -.015em;
  color: #fff;
  text-shadow:
    0 0 24px rgba(135, 255, 113, .5),
    4px 4px 0 rgba(1, 205, 254, .55);
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
  clip-path: inset(0 0 55% 0);
}

.glitch::before { color: var(--cyan); transform: translate(-3px, -2px); opacity: .8; }
.glitch::after { color: var(--pink); clip-path: inset(52% 0 0 0); transform: translate(3px, 2px); opacity: .75; }

.hero__desc {
  margin: 20px 0 0 auto;
  max-width: 34ch;
  font-size: 17px;
  color: #cfe9c8;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .8);
}

.hero__jump {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 10px;
  background: var(--neon);
  color: #08160a;
  font-family: var(--f-head);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  box-shadow: 0 8px 30px rgba(135, 255, 113, .28);
  transition: transform .18s ease, box-shadow .18s ease;
}

.hero__jump:hover { transform: translateY(-3px); color: #08160a; box-shadow: 0 12px 38px rgba(1, 205, 254, .5); }
.hero__jump i { font-style: normal; }

/* ---------- layout ---------- */

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

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(34px, 6vw, 66px) clamp(14px, 4vw, 40px) clamp(40px, 7vw, 90px);
  display: grid;
  grid-template-columns: minmax(0, 218px) minmax(0, 1fr);
  gap: clamp(22px, 4vw, 54px);
  align-items: start;
}

.body { min-width: 0; }

/* ---------- aside ---------- */

.side {
  position: sticky;
  top: 26px;
  align-self: start;
  min-width: 0;
  padding: 20px 16px 18px;
  border-radius: 10px;
  background: var(--panel);
  background-image: linear-gradient(150deg, rgba(1, 205, 254, .12), rgba(1, 205, 254, 0) 60%);
}

.side__k {
  display: block;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: .3em;
  color: var(--cyan);
  margin-bottom: 2px;
}

.side__h {
  margin: 0 0 12px;
  font-family: var(--f-head);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--neon);
}

.side__list { list-style: none; margin: 0; padding: 0; }
.side__list li { margin: 0 0 3px; }
.side__list a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 15px;
  line-height: 1.35;
  color: #cbe6c4;
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}

.side__list a:hover,
.side__list a.is-on {
  background: var(--panel-2);
  color: var(--neon);
  border-left-color: var(--cyan);
}

/* ---------- prose ---------- */

.prose { counter-reset: sec; min-width: 0; overflow-wrap: break-word; }

.prose > article {
  counter-increment: sec;
  position: relative;
  padding: clamp(30px, 4.6vw, 54px) 0 clamp(34px, 5vw, 58px) clamp(20px, 3.4vw, 52px);
  border-top: 1px dashed var(--line);
  scroll-margin-top: 24px;
}

.prose > article:first-child { border-top: 0; padding-top: 4px; }

.prose > article::before {
  content: counter(sec, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: clamp(30px, 4.6vw, 54px);
  font-family: var(--f-head);
  font-size: 14px;
  letter-spacing: .16em;
  color: var(--cyan);
  opacity: .8;
}

.prose > article:first-child::before { top: 4px; }

.prose > article::after {
  content: "";
  position: absolute;
  left: 0;
  top: calc(clamp(30px, 4.6vw, 54px) + 22px);
  width: 30px;
  height: 3px;
  background: linear-gradient(90deg, var(--neon), var(--cyan));
}

.prose > article:first-child::after { top: 26px; }

.prose > article:nth-child(even) {
  background-image: linear-gradient(100deg, rgba(1, 205, 254, .08), rgba(1, 205, 254, 0) 58%);
  border-radius: 10px;
  padding-right: clamp(0px, 2vw, 26px);
}

.prose h2,
.prose h3 {
  font-family: var(--f-head);
  color: var(--neon);
  line-height: 1.24;
  letter-spacing: .005em;
  margin: 0 0 14px;
  text-shadow: 0 0 18px rgba(135, 255, 113, .3);
}

.prose h2 { font-size: clamp(22px, 3vw, 31px); }
.prose h3 { font-size: clamp(19px, 2.2vw, 23px); color: #c6ffb6; margin-top: 26px; }

.prose h2 + p, .prose h3 + p { margin-top: 0; }

.prose p { margin: 0 0 16px; max-width: 68ch; }

.prose ul, .prose ol { margin: 0 0 18px; padding-left: 22px; max-width: 66ch; }
.prose li { margin: 0 0 8px; }
.prose li::marker { color: var(--cyan); }

.prose strong { color: #fff; font-weight: 600; }
.prose em { color: var(--cyan); font-style: normal; }

.prose a {
  color: var(--cyan);
  text-decoration: underline;
  text-decoration-color: rgba(1, 205, 254, .45);
}
.prose a:hover { color: var(--neon); text-decoration-color: var(--neon); }

.prose blockquote {
  margin: 0 0 20px;
  padding: 14px 18px;
  border-left: 3px solid var(--pink);
  border-radius: 0 10px 10px 0;
  background: var(--panel);
  color: #dff3d8;
}
.prose blockquote p:last-child { margin-bottom: 0; }

.prose figure { margin: 0 0 22px; }
.prose figcaption { font-size: 14px; color: var(--dim); margin-top: 8px; }

.prose img, .prose video { border-radius: 10px; margin: 0 0 18px; }

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 22px;
  font-size: 16px;
  background: var(--panel);
  border-radius: 10px;
  overflow: hidden;
}

.prose th, .prose td { padding: 10px 12px; text-align: left; }
.prose thead th { background: var(--panel-2); color: var(--neon); font-family: var(--f-head); }
.prose tbody tr + tr td { border-top: 1px solid rgba(135, 255, 113, .12); }

.prose hr { border: 0; height: 1px; background: var(--line); margin: 30px 0; }

.prose code {
  font-family: var(--f-mono);
  font-size: .92em;
  background: rgba(1, 205, 254, .12);
  padding: 1px 5px;
  border-radius: 5px;
}

/* ---------- dock ---------- */

.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  background: rgba(15, 26, 17, .93);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(1, 205, 254, .28);
  box-shadow: 0 -12px 34px rgba(0, 0, 0, .55);
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.dock__nav { padding: 6px clamp(8px, 2vw, 22px) 0; }

.dock__nav nav {
  display: flex;
  align-items: center;
  gap: clamp(6px, 1.4vw, 18px);
  max-width: 1180px;
  margin: 0 auto;
}

.dock__grp { display: flex; align-items: center; gap: 2px; margin: 0; flex: 1 1 0; min-width: 0; }
.dock__grp--l { justify-content: flex-start; }
.dock__grp--r { justify-content: flex-end; }

.dock dt {
  font-size: 12px;
  color: var(--cyan);
  opacity: .7;
  margin: 0 0 0 8px;
  flex: 0 0 auto;
}

.dock dd { margin: 0; flex: 0 0 auto; }

.dock dd a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 4px 9px;
  border-radius: 8px;
  font-size: 15px;
  line-height: 1.2;
  color: #d5eccd;
  text-decoration: none;
  white-space: nowrap;
  transition: color .16s ease, background .16s ease;
}

.dock dd a:hover,
.dock dd a.is-on { color: var(--neon); background: rgba(135, 255, 113, .13); }

.dock__brand {
  flex: 0 0 auto;
  padding: 4px 12px;
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: .12em;
  color: var(--neon);
  text-decoration: none;
  text-shadow: 0 0 16px rgba(135, 255, 113, .65);
  white-space: nowrap;
}

.dock__brand:hover { color: #fff; }

.dock__cta a {
  margin-left: 8px;
  background: var(--neon);
  color: #08160a;
  font-family: var(--f-head);
  font-weight: 600;
  padding: 4px 16px;
  box-shadow: 0 6px 20px rgba(135, 255, 113, .28);
}

.dock__cta a:hover { background: var(--cyan); color: #061318; }

.dock__foot {
  padding: 2px clamp(10px, 3vw, 24px) 7px;
  text-align: center;
}

.dock__foot p {
  margin: 0;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: .1em;
  color: #82a37b;
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  :root { --dock-h: 120px; }

  .wrap {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    padding-top: 26px;
  }

  .side { position: static; padding: 14px 12px 12px; }
  .side__list { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .side__list::-webkit-scrollbar { display: none; }
  .side__list li { margin: 0; flex: 0 0 auto; }
  .side__list a { border-left: 0; border-bottom: 2px solid transparent; white-space: nowrap; }

  .prose > article { padding-left: 30px; }
  .prose > article:nth-child(even) { padding-right: 0; }

  .dock__nav nav { flex-wrap: wrap; gap: 0; }
  .dock__brand { order: -1; flex: 1 0 100%; text-align: center; padding: 5px 0 3px; font-size: 17px; }
  .dock__grp { flex: 1 1 auto; overflow-x: auto; scrollbar-width: none; }
  .dock__grp::-webkit-scrollbar { display: none; }
  .dock__grp--r { justify-content: flex-end; }
  .dock dt { margin-left: 4px; }
  .dock dd a { font-size: 15px; padding: 4px 7px; }
  .dock__cta a { margin-left: 4px; padding: 4px 12px; }
}

@media (max-width: 620px) {
  .hero { padding: 84px 18px 150px; justify-content: flex-start; text-align: right; }
  .hero__inner { max-width: 100%; }
  .hero__sun { right: 8vw; top: 22vh; opacity: .38; }
  .hero__h1 { font-size: clamp(30px, 9.6vw, 44px); }
  .hero__desc { font-size: 16px; margin-left: auto; }
  .prose { font-size: 17px; }
}

@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}
