:root {
  color-scheme: dark;
  --ink: #f2f2f2;
  --ink-soft: #c6c6c6;
  --ink-muted: #858585;
  --paper: #050505;
  --violet: #280034;
  --accent: #0f0;
  --violet-deep: #1d0026;
  --rule: rgba(0, 255, 0, 0.14);
  --rule-strong: rgba(0, 255, 0, 0.38);
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 7rem;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background: #07050b;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  z-index: -3;
  inset: -7rem;
  content: "";
  background-image:
    linear-gradient(rgba(178, 107, 226, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(178, 107, 226, 0.035) 1px, transparent 1px);
  background-size: 4.5rem 4.5rem;
  transform: perspective(800px) rotateX(58deg) translateY(6rem) scale(1.35);
  transform-origin: 50% 80%;
  animation: grid-drift 24s linear infinite;
}

body::after {
  position: fixed;
  z-index: -4;
  inset: 0;
  content: "";
  background:
    radial-gradient(circle at 15% 22%, rgba(105, 27, 142, 0.3), transparent 26rem),
    radial-gradient(circle at 86% 68%, rgba(79, 18, 111, 0.25), transparent 30rem),
    #07050b;
  animation: field-breathe 14s ease-in-out infinite alternate;
}

a {
  color: var(--accent);
  text-decoration-color: rgba(0, 255, 0, 0.5);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

a:focus-visible,
  button:focus-visible,
  summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

::selection,
::-moz-selection {
  background: #ff8c00;
  color: #000;
}

.shell {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 1rem;
  transform: translateY(-180%);
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: #0a070e;
  color: var(--ink);
  font: 700 0.8rem/1 var(--sans);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.ambient-field {
  position: fixed;
  z-index: -2;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.ambient-field__orbit {
  position: absolute;
  display: block;
  border: 1px solid rgba(188, 98, 231, 0.12);
  border-radius: 50%;
}

.ambient-field__orbit::before {
  position: absolute;
  top: -3px;
  left: 50%;
  width: 6px;
  height: 6px;
  content: "";
  border-radius: 50%;
  background: #d29aff;
  box-shadow: 0 0 18px 4px rgba(210, 154, 255, 0.65);
}

.ambient-field__orbit--one {
  top: 4vh;
  right: -22rem;
  width: 48rem;
  height: 48rem;
  animation: orbit-turn 32s linear infinite;
}

.ambient-field__orbit--two {
  bottom: -23rem;
  left: -13rem;
  width: 39rem;
  height: 39rem;
  animation: orbit-turn 26s linear infinite reverse;
}

.ambient-field__orbit--three {
  top: 44%;
  left: 34%;
  width: 22rem;
  height: 8rem;
  transform: rotate(-24deg);
  animation: orbit-tilt 18s ease-in-out infinite alternate;
}

.ambient-field__particle {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #d29aff;
  box-shadow:
    12vw 18vh rgba(210, 154, 255, 0.32),
    28vw 56vh rgba(210, 154, 255, 0.18),
    47vw 31vh rgba(158, 255, 189, 0.22),
    67vw 74vh rgba(210, 154, 255, 0.26),
    83vw 39vh rgba(210, 154, 255, 0.35),
    92vw 88vh rgba(158, 255, 189, 0.2);
}

.ambient-field__particle--one {
  top: 8%;
  left: 3%;
  animation: particle-float 18s ease-in-out infinite;
}

.ambient-field__particle--two {
  top: 36%;
  left: 12%;
  opacity: 0.6;
  animation: particle-float 25s ease-in-out infinite reverse;
}

.ambient-field__particle--three {
  top: 68%;
  left: 0;
  opacity: 0.45;
  animation: particle-float 21s ease-in-out infinite 3s;
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid rgba(0, 255, 0, 0.14);
  background: rgba(7, 5, 11, 0.82);
  backdrop-filter: blur(18px);
}

.site-header__inner {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--ink);
  font-family: var(--sans);
  text-decoration: none;
}

.brand:hover {
  color: var(--ink);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.brand small {
  margin-top: 0.18rem;
  color: var(--ink-muted);
  font: 500 0.64rem/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.7rem, 2.5vw, 2rem);
  font: 600 0.75rem/1 var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-nav a {
  position: relative;
  padding-block: 0.6rem;
  color: var(--ink-muted);
  text-decoration: none;
}

.site-nav a::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  content: "";
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 220ms ease;
}

.site-nav a:hover,
.site-nav a.is-current {
  color: var(--ink);
}

.site-nav a:hover::after,
.site-nav a.is-current::after {
  transform: scaleX(1);
  transform-origin: left;
}

.eyebrow,
.label {
  margin: 0 0 1.25rem;
  color: var(--accent);
  font: 700 0.7rem/1.4 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.journal {
  position: relative;
  margin-bottom: clamp(5rem, 10vw, 10rem);
  border-top: 1px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule-strong);
  background: rgba(2, 2, 2, 0.97);
  box-shadow: var(--shadow);
}

.journal::before,
.journal::after {
  position: absolute;
  top: -1px;
  width: 5rem;
  height: 1px;
  content: "";
  background: var(--accent);
  box-shadow: 0 0 18px rgba(0, 255, 0, 0.55);
}

.journal::before {
  left: 0;
}

.journal::after {
  right: 0;
}

.journal__header,
.content-page__heading {
  padding: clamp(2.25rem, 4vw, 3.75rem);
  border-bottom: 1px solid var(--rule);
}

.journal__header .eyebrow,
.content-page__heading .eyebrow {
  margin-bottom: 0.8rem;
}

.journal__header h2,
.content-page__heading h1 {
  margin: 0;
  font-size: clamp(2rem, 3.6vw, 3.55rem);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1;
}

.journal-column,
.content-page__body {
  min-width: 0;
  padding: clamp(2rem, 5vw, 4.5rem);
}

.paper-section {
  position: relative;
  margin-bottom: 4.5rem;
}

.paper-section:last-child {
  margin-bottom: 0;
}

.paper-section h3,
.feature-panel h3 {
  margin: 0 0 1.35rem;
  font-family: var(--sans);
  font-size: clamp(1.35rem, 2.2vw, 1.8rem);
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.paper-section p {
  color: var(--ink-soft);
}

.paper-section p + p {
  margin-top: 1.25rem;
}

.site-footer {
  border-top: 1px solid var(--rule);
  background: rgba(5, 3, 7, 0.88);
}

.site-footer__inner {
  display: flex;
  min-height: 190px;
  padding-block: 3rem;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  font-family: var(--sans);
}

.site-footer p {
  margin: 0.4rem 0 0;
  color: var(--ink-muted);
  font-size: 0.7rem;
}

.site-footer__inner > p {
  font-family: var(--mono);
}

@keyframes grid-drift {
  to {
    transform: perspective(800px) rotateX(58deg) translate(4.5rem, 10.5rem) scale(1.35);
  }
}

@keyframes field-breathe {
  0% {
    filter: saturate(0.88) brightness(0.88);
    transform: scale(1);
  }
  100% {
    filter: saturate(1.16) brightness(1.05);
    transform: scale(1.04);
  }
}

@keyframes orbit-turn {
  to {
    transform: rotate(360deg);
  }
}

@keyframes orbit-tilt {
  0% {
    transform: rotate(-24deg) scale(0.92);
  }
  100% {
    transform: rotate(9deg) scale(1.08);
  }
}

@keyframes particle-float {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(5vw, -4vh, 0);
  }
}

@media (max-width: 760px) {
  html {
    scroll-padding-top: 9rem;
  }

  .shell {
    width: min(100% - 28px, 1180px);
  }

  .site-header__inner {
    min-height: 104px;
    padding-block: 0.8rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
  }

  .site-nav {
    width: 100%;
    padding-bottom: 0.2rem;
    overflow-x: auto;
    justify-content: space-between;
    gap: 1rem;
  }

  .journal-column,
  .content-page__body {
    padding: 2.5rem 1.25rem;
  }

  .journal__header,
  .content-page__heading {
    padding: 2.25rem 1.25rem;
  }

  .journal__header h2,
  .content-page__heading h1 {
    font-size: clamp(1.9rem, 9vw, 2.8rem);
  }

  .site-footer__inner {
    min-height: 160px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 1.2rem;
  }
}

@media (max-width: 480px) {
  .site-nav {
    font-size: 0.64rem;
  }

  .brand small {
    display: none;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
