:root {
  color-scheme: dark;
  --bg: #061014;
  --ink: #f4fbff;
  --muted: #a9bdc4;
  --line: rgba(167, 238, 255, 0.2);
  --cyan: #67e7ff;
  --gold: #f2c66d;
  --red: #ff5c6e;
  --green: #8ef0b0;
  --panel: rgba(8, 25, 31, 0.72);
  --panel-strong: rgba(9, 37, 45, 0.88);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 16% 12%, rgba(103, 231, 255, 0.16), transparent 28rem),
    radial-gradient(circle at 84% 10%, rgba(242, 198, 109, 0.11), transparent 25rem),
    linear-gradient(145deg, #03090c 0%, var(--bg) 46%, #0a1110 100%);
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(103, 231, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(103, 231, 255, 0.04) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}

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

#signalCanvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  opacity: 0.78;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 64px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(3, 10, 13, 0.76);
  backdrop-filter: blur(18px);
}

.brand,
nav {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(103, 231, 255, 0.46);
  background: linear-gradient(145deg, rgba(103, 231, 255, 0.18), rgba(242, 198, 109, 0.12));
  box-shadow: 0 0 28px rgba(103, 231, 255, 0.18);
}

nav {
  gap: 6px;
}

nav a {
  padding: 10px 12px;
  color: var(--muted);
  font-size: 0.92rem;
  transition: color 180ms ease, background 180ms ease;
}

nav a:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
}

main {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.68fr);
  gap: clamp(32px, 6vw, 92px);
  min-height: calc(100vh - 78px);
  align-items: center;
  padding: 72px 0 54px;
}

.kicker,
.section-label {
  margin: 0 0 18px;
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 22px;
  font-size: clamp(3.4rem, 5vw, 5.8rem);
  line-height: 0.9;
  letter-spacing: 0;
  white-space: nowrap;
}

h2 {
  max-width: 820px;
  margin-bottom: 24px;
  font-size: clamp(2rem, 5vw, 4.6rem);
  line-height: 0.96;
  letter-spacing: 0;
}

h3 {
  font-size: 1.35rem;
  line-height: 1.1;
}

.lede {
  max-width: 670px;
  color: #c5dbe2;
  font-size: clamp(1.12rem, 2vw, 1.45rem);
  line-height: 1.6;
}

.hero-actions,
.cta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  color: #041014;
  background: linear-gradient(135deg, var(--cyan), var(--gold));
  box-shadow: 0 18px 44px rgba(103, 231, 255, 0.22);
}

.button.ghost {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.05);
}

.hero-system {
  position: relative;
  min-height: min(72vw, 620px);
  perspective: 1100px;
}

.hero-system::before,
.hero-system::after {
  position: absolute;
  inset: 12%;
  content: "";
  border: 1px solid rgba(103, 231, 255, 0.16);
  transform: rotateX(62deg) rotateZ(-18deg);
  box-shadow: inset 0 0 80px rgba(103, 231, 255, 0.08), 0 0 80px rgba(242, 198, 109, 0.08);
}

.hero-system::after {
  inset: 23%;
  border-color: rgba(242, 198, 109, 0.22);
  animation: pulseFrame 4s ease-in-out infinite;
}

.orbit {
  position: absolute;
  inset: 12%;
  border: 1px solid var(--line);
  border-radius: 50%;
  transform-style: preserve-3d;
}

.orbit::before {
  position: absolute;
  top: 50%;
  left: -5px;
  width: 10px;
  height: 10px;
  content: "";
  border-radius: 999px;
  background: var(--cyan);
  box-shadow: 0 0 24px var(--cyan);
}

.orbit-a {
  animation: spinA 11s linear infinite;
}

.orbit-b {
  inset: 20%;
  border-color: rgba(242, 198, 109, 0.32);
  transform: rotateX(68deg) rotateY(22deg);
  animation: spinB 14s linear infinite;
}

.orbit-c {
  inset: 30%;
  border-color: rgba(255, 92, 110, 0.28);
  animation: spinC 9s linear infinite;
}

.core {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: min(42vw, 300px);
  aspect-ratio: 1;
  place-items: center;
  padding: 28px;
  border: 1px solid rgba(103, 231, 255, 0.34);
  background:
    linear-gradient(135deg, rgba(103, 231, 255, 0.19), rgba(255, 255, 255, 0.04)),
    rgba(5, 22, 27, 0.8);
  box-shadow: var(--shadow), inset 0 0 70px rgba(103, 231, 255, 0.12);
  transform: translate(-50%, -50%);
  text-align: center;
}

.core span {
  align-self: end;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.core strong {
  align-self: start;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 0.92;
}

.data-chip {
  position: absolute;
  min-width: 118px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(4, 17, 22, 0.8);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.32);
  color: #dff8ff;
  font-size: 0.82rem;
  font-weight: 800;
  text-align: center;
  backdrop-filter: blur(12px);
  animation: floatChip 5s ease-in-out infinite;
}

.chip-one {
  top: 14%;
  left: 5%;
}

.chip-two {
  top: 19%;
  right: 2%;
  animation-delay: -1s;
}

.chip-three {
  right: 10%;
  bottom: 15%;
  animation-delay: -2.2s;
}

.chip-four {
  bottom: 20%;
  left: 2%;
  animation-delay: -3.1s;
}

.metrics,
.book-grid,
.link-grid,
.theme-stack {
  display: grid;
  gap: 14px;
}

.metrics {
  grid-template-columns: repeat(4, 1fr);
  margin: 0 0 72px;
  border: 1px solid var(--line);
  background: rgba(3, 15, 19, 0.58);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.metrics div {
  min-height: 136px;
  padding: 24px;
  border-right: 1px solid var(--line);
}

.metrics div:last-child {
  border-right: 0;
}

.metrics strong {
  display: block;
  margin-bottom: 10px;
  color: var(--cyan);
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 1;
}

.metrics span {
  color: var(--muted);
}

.section {
  padding: 94px 0;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
  gap: clamp(28px, 5vw, 70px);
}

.profile p,
.works p,
.themes p,
.cta p {
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.8;
}

.signal-panel,
.book-card,
.link-card,
.theme-stack article,
.cta {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.signal-panel {
  position: relative;
  overflow: hidden;
  padding: 28px;
}

.scanline {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent, rgba(103, 231, 255, 0.13), transparent);
  animation: scan 4s linear infinite;
}

.signal-panel h3,
.signal-panel p,
.signal-panel ul {
  position: relative;
}

.signal-panel ul {
  display: grid;
  gap: 12px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.signal-panel li {
  padding: 12px 14px;
  border-left: 3px solid var(--cyan);
  background: rgba(255, 255, 255, 0.05);
  color: #dff7ff;
  font-weight: 700;
}

.book-grid {
  grid-template-columns: repeat(4, 1fr);
  margin-top: 34px;
}

.book-card {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  padding: 26px;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.book-card::before {
  position: absolute;
  inset: auto -20% -38% -20%;
  height: 55%;
  content: "";
  background: radial-gradient(circle, rgba(103, 231, 255, 0.19), transparent 64%);
}

.book-card:hover {
  transform: translateY(-8px);
  border-color: rgba(103, 231, 255, 0.5);
  background: var(--panel-strong);
}

.book-index {
  display: inline-flex;
  margin-bottom: 78px;
  color: var(--gold);
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 0.2em;
}

.book-card h3,
.book-card p,
.book-card a {
  position: relative;
}

.book-card a {
  display: inline-flex;
  margin-top: 16px;
  color: var(--cyan);
  font-weight: 900;
}

.link-grid {
  grid-template-columns: repeat(2, 1fr);
  margin-top: 34px;
}

.link-card {
  position: relative;
  overflow: hidden;
  min-height: 300px;
  padding: 28px;
}

.link-card::before {
  position: absolute;
  top: 0;
  right: 0;
  width: 42%;
  height: 100%;
  content: "";
  background:
    linear-gradient(135deg, transparent, rgba(103, 231, 255, 0.12)),
    repeating-linear-gradient(90deg, transparent 0 13px, rgba(255, 255, 255, 0.045) 13px 14px);
  opacity: 0.82;
}

.link-card h3,
.link-card p,
.link-card .book-index,
.link-actions {
  position: relative;
}

.link-card .book-index {
  margin-bottom: 36px;
}

.link-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.link-actions a,
.link-actions span {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  padding: 0 12px;
  border: 1px solid rgba(103, 231, 255, 0.24);
  background: rgba(255, 255, 255, 0.055);
  color: #dff8ff;
  font-size: 0.86rem;
  font-weight: 900;
}

.link-actions a:hover {
  border-color: rgba(242, 198, 109, 0.55);
  color: var(--gold);
}

.link-actions span {
  border-color: rgba(255, 255, 255, 0.14);
  color: var(--muted);
}

.theme-stack {
  grid-template-columns: repeat(3, 1fr);
}

.theme-stack article {
  padding: 28px;
}

.theme-stack article:nth-child(2) {
  border-color: rgba(242, 198, 109, 0.32);
}

.theme-stack article:nth-child(3) {
  border-color: rgba(142, 240, 176, 0.28);
}

.cta {
  justify-content: space-between;
  margin-bottom: 70px;
  padding: clamp(28px, 5vw, 56px);
}

.cta div {
  max-width: 760px;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(18px, 4vw, 64px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  background: rgba(0, 0, 0, 0.25);
}

footer a {
  color: var(--cyan);
  font-weight: 800;
}

@keyframes spinA {
  to {
    transform: rotateX(64deg) rotateY(8deg) rotateZ(360deg);
  }
}

@keyframes spinB {
  to {
    transform: rotateX(68deg) rotateY(22deg) rotateZ(-360deg);
  }
}

@keyframes spinC {
  to {
    transform: rotateX(24deg) rotateY(66deg) rotateZ(360deg);
  }
}

@keyframes pulseFrame {
  50% {
    box-shadow: inset 0 0 90px rgba(242, 198, 109, 0.13), 0 0 70px rgba(242, 198, 109, 0.12);
  }
}

@keyframes floatChip {
  50% {
    transform: translateY(-16px);
  }
}

@keyframes scan {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(100%);
  }
}

@media (max-width: 980px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    width: 100%;
    overflow-x: auto;
  }

  .hero,
  .split {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  h1 {
    font-size: clamp(3.2rem, 10vw, 5.4rem);
  }

  .hero-system {
    min-height: 520px;
  }

  .metrics,
  .book-grid,
  .link-grid,
  .theme-stack {
    grid-template-columns: repeat(2, 1fr);
  }

  .metrics div:nth-child(2) {
    border-right: 0;
  }
}

@media (max-width: 640px) {
  main {
    width: min(100% - 28px, 1180px);
  }

  h1 {
    font-size: clamp(2.2rem, 10.7vw, 4.2rem);
  }

  .hero-system {
    min-height: 430px;
  }

  .core {
    width: 230px;
  }

  .data-chip {
    min-width: 96px;
    font-size: 0.72rem;
  }

  .metrics,
  .book-grid,
  .link-grid,
  .theme-stack {
    grid-template-columns: 1fr;
  }

  .metrics div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .metrics div:last-child {
    border-bottom: 0;
  }

  .book-card {
    min-height: 280px;
  }

  footer {
    flex-direction: column;
  }
}

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