:root {
  color-scheme: dark;
  --bg: #07090d;
  --bg-soft: #0d1118;
  --surface: #111821;
  --surface-strong: #172232;
  --line: #263548;
  --line-soft: rgba(154, 174, 199, 0.18);
  --text: #f3f6f8;
  --muted: #aab5c4;
  --quiet: #7e8a9b;
  --signal: #7dd3fc;
  --signal-strong: #38bdf8;
  --acid: #b7f36b;
  --danger: #ff8c6b;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.34);
  --ease-out: cubic-bezier(0.2, 0, 0, 1);
  --max: 1160px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 18% 0%, rgba(125, 211, 252, 0.13), transparent 34rem),
    linear-gradient(180deg, #07090d 0%, #0a0e14 44%, #07090d 100%);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 72%);
  animation: grid-drift 18s linear infinite;
}

a {
  color: inherit;
}

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

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 20;
  transform: translateY(-150%);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.65rem 0.8rem;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  padding: 1rem 0;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  backdrop-filter: blur(16px);
}

.brand {
  position: relative;
  display: inline-flex;
  min-width: 0;
  align-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 0.32rem 0.48rem;
  background: var(--bg);
  text-decoration: none;
}

.brand-wordmark {
  width: 178px;
  height: auto;
  border-radius: 4px;
}

.site-nav {
  display: flex;
  gap: 0.25rem;
  align-items: center;
  padding: 0.25rem;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(13, 17, 24, 0.74);
}

.nav-link {
  border-radius: 6px;
  padding: 0.55rem 0.72rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  transition:
    background-color 180ms var(--ease-out),
    color 180ms var(--ease-out),
    transform 180ms var(--ease-out);
}

.nav-link:hover,
.nav-link:focus-visible {
  background: rgba(125, 211, 252, 0.1);
  color: var(--text);
  outline: none;
}

.section-shell {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
}

.hero {
  display: grid;
  min-height: calc(92vh - 5rem);
  padding: 4.5rem 0 4rem;
  grid-template-columns: minmax(0, 1.02fr) minmax(20rem, 0.78fr);
  gap: 3rem;
  align-items: center;
}

.kicker {
  margin: 0 0 0.8rem;
  color: var(--acid);
  font-size: 0.77rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
  line-height: 1.02;
}

h1 {
  max-width: 14ch;
  font-size: clamp(2.55rem, 7vw, 5.2rem);
}

h2 {
  max-width: 14ch;
  font-size: clamp(1.85rem, 3.8vw, 3.2rem);
}

h3 {
  font-size: 1.08rem;
}

.lede,
.section-intro p,
.boundary p,
.name-story p,
.cta p {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.72;
}

.lede {
  max-width: 42rem;
  margin: 1.4rem 0 0;
}

.hero-actions,
.cta-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.6rem;
}

.button {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.72rem 1rem;
  font-weight: 800;
  text-decoration: none;
  transition:
    border-color 180ms var(--ease-out),
    background-color 180ms var(--ease-out),
    color 180ms var(--ease-out),
    outline-color 180ms var(--ease-out),
    transform 180ms var(--ease-out);
}

.button-primary {
  border-color: rgba(125, 211, 252, 0.45);
  background: var(--signal);
  color: #071018;
}

.button-secondary {
  background: rgba(17, 24, 33, 0.86);
  color: var(--text);
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
  outline: 2px solid rgba(125, 211, 252, 0.32);
  outline-offset: 2px;
}

.hero-visual {
  position: relative;
  display: grid;
  gap: 1rem;
}

.salvage-visual {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(125, 211, 252, 0.28);
  border-radius: 8px;
  background: var(--bg);
  box-shadow: var(--shadow);
}

.salvage-visual::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(90deg, transparent 0 42%, rgba(183, 243, 107, 0.18) 50%, transparent 58%),
    linear-gradient(180deg, rgba(7, 9, 13, 0), rgba(7, 9, 13, 0.48));
  mix-blend-mode: screen;
  opacity: 0.7;
  transform: translateX(-72%);
  animation: salvage-scan 9s var(--ease-out) infinite;
}

.salvage-visual img {
  width: 100%;
  height: auto;
}

.evidence-stream {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.evidence-stream span {
  position: absolute;
  left: 4%;
  border: 1px solid rgba(183, 243, 107, 0.36);
  border-radius: 999px;
  padding: 0.28rem 0.48rem;
  background: rgba(7, 9, 13, 0.86);
  color: var(--acid);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateX(-20%) scale(0.98);
  animation: evidence-flow 7.5s var(--ease-out) infinite;
  animation-delay: var(--delay);
}

.evidence-stream span:nth-child(1) {
  top: 16%;
}

.evidence-stream span:nth-child(2) {
  top: 35%;
}

.evidence-stream span:nth-child(3) {
  top: 55%;
}

.evidence-stream span:nth-child(4) {
  top: 73%;
}

.terminal-stack {
  display: grid;
  gap: 1rem;
}

.terminal {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(4, 8, 12, 0.86);
  box-shadow: var(--shadow);
}

.terminal::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background: linear-gradient(180deg, transparent, rgba(125, 211, 252, 0.07), transparent);
  opacity: 0.4;
  transform: translateY(-100%);
  animation: terminal-scan 7s linear infinite;
}

.terminal-title {
  border-bottom: 1px solid var(--line-soft);
  padding: 0.72rem 0.9rem;
  color: var(--quiet);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.terminal pre {
  margin: 0;
  padding: 1rem;
  overflow-x: auto;
}

.terminal code {
  display: block;
  min-width: max-content;
  color: #d9f99d;
  font-size: 0.86rem;
  line-height: 1.7;
  white-space: pre;
}

.terminal code::after {
  display: inline-block;
  width: 0.55em;
  height: 1em;
  margin-left: 0.35em;
  content: "";
  vertical-align: -0.16em;
  background: rgba(217, 249, 157, 0.82);
  animation: cursor-blink 1.1s steps(2, start) infinite;
}

.feature-section,
.section-band,
.repo-map,
.skills-section,
.ai-handoff,
.showcase,
.quick-start,
.boundary,
.name-story,
.cta {
  padding: 5.5rem 0;
}

.section-intro {
  display: grid;
  max-width: 760px;
  gap: 1rem;
  margin-bottom: 2.2rem;
}

.section-intro p {
  margin: 0;
}

.section-intro h2 {
  max-width: min(50vw, 580px);
}

.feature-grid {
  display: grid;
  gap: 1rem;
}

.feature-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.feature-grid-6 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#proof .feature-grid {
  gap: 0.7rem;
}

#proof .handoff-card {
  min-height: 0;
  padding: 0.95rem 1rem;
}

#proof .handoff-card p {
  margin-top: 0.5rem;
  font-size: 0.94rem;
  line-height: 1.48;
}

.pipeline-list p,
.handoff-card p,
.showcase-frame p {
  margin: 0.7rem 0 0;
  color: var(--muted);
  line-height: 1.62;
}

.section-band {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.section-band::before {
  position: absolute;
  left: max(1rem, calc((100vw - var(--max)) / 2));
  right: max(1rem, calc((100vw - var(--max)) / 2));
  top: 9.6rem;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(125, 211, 252, 0.64), rgba(183, 243, 107, 0.42), transparent);
  opacity: 0.56;
  transform: translateX(-18%);
  animation: pipeline-current 8s var(--ease-out) infinite;
}

.pipeline-list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.pipeline-list li {
  position: relative;
  min-height: 12rem;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 1.15rem;
  background: rgba(13, 17, 24, 0.68);
  transition:
    border-color 220ms var(--ease-out),
    box-shadow 220ms var(--ease-out),
    transform 220ms var(--ease-out);
}

.handoff-grid,
.showcase-grid {
  display: grid;
  gap: 1rem;
}

.handoff-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.handoff-card {
  position: relative;
  overflow: hidden;
  min-height: 12rem;
  border: 1px solid rgba(183, 243, 107, 0.28);
  border-radius: 8px;
  padding: 1.15rem;
  background: linear-gradient(180deg, rgba(183, 243, 107, 0.08), rgba(17, 24, 33, 0.76));
  transition:
    border-color 220ms var(--ease-out),
    box-shadow 220ms var(--ease-out),
    transform 220ms var(--ease-out);
}

.handoff-card::before {
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(183, 243, 107, 0.86), transparent);
  opacity: 0;
  transform: translateX(-100%);
  animation: card-signal 7.2s var(--ease-out) infinite;
}

.showcase {
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.repo-map {
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.repo-map-frame {
  display: block;
  overflow: hidden;
  border: 1px solid rgba(125, 211, 252, 0.26);
  border-radius: 8px;
  background: var(--bg);
  box-shadow: var(--shadow);
}

.repo-map-frame img {
  width: 100%;
  height: auto;
}

.repo-map-caption {
  max-width: 48rem;
  margin: 1rem 0 0;
  color: var(--quiet);
  font-size: 0.92rem;
}

.showcase-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.showcase-frame {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 0.8rem;
  background: rgba(13, 17, 24, 0.7);
  transition:
    border-color 220ms var(--ease-out),
    box-shadow 220ms var(--ease-out),
    transform 220ms var(--ease-out);
}

.frame-placeholder {
  position: relative;
  display: grid;
  overflow: hidden;
  min-height: 15rem;
  margin-bottom: 1rem;
  place-items: center;
  border: 1px dashed rgba(125, 211, 252, 0.36);
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(125, 211, 252, 0.08), rgba(183, 243, 107, 0.04)),
    repeating-linear-gradient(
      -45deg,
      rgba(255, 255, 255, 0.04) 0,
      rgba(255, 255, 255, 0.04) 1px,
      transparent 1px,
      transparent 12px
    );
  color: var(--quiet);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.frame-placeholder::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.1) 45%, transparent 70%);
  transform: translateX(-100%);
  animation: placeholder-sweep 5.5s var(--ease-out) infinite;
}

.showcase-image {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  margin-bottom: 1rem;
  border: 1px solid rgba(125, 211, 252, 0.3);
  border-radius: 6px;
  background: var(--bg);
  text-decoration: none;
}

.showcase-image::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background: linear-gradient(110deg, transparent 18%, rgba(255, 255, 255, 0.12) 46%, transparent 72%);
  opacity: 0.8;
  transform: translateX(-110%);
  animation: placeholder-sweep 8s var(--ease-out) infinite;
}

.showcase-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.showcase-image span {
  position: absolute;
  left: 0.7rem;
  top: 0.7rem;
  z-index: 1;
  border: 1px solid rgba(125, 211, 252, 0.3);
  border-radius: 999px;
  padding: 0.28rem 0.48rem;
  background: rgba(7, 9, 13, 0.82);
  color: var(--text);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.step-marker {
  display: block;
  width: 0.7rem;
  height: 0.7rem;
  margin-bottom: 1rem;
  border-radius: 99px;
  background: var(--signal);
  box-shadow: 0 0 0 6px rgba(125, 211, 252, 0.12);
  animation: step-ping 2.6s var(--ease-out) infinite;
}

.terminal-wide code {
  font-size: 0.9rem;
}

.boundary,
.name-story {
  max-width: 860px;
}

.boundary {
  border-left: 4px solid var(--danger);
  padding-left: 1.5rem;
}

.name-story {
  border-left: 4px solid var(--signal);
  padding-left: 1.5rem;
}

.cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: center;
}

.cta h2 {
  max-width: none;
}

.site-footer {
  display: flex;
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line-soft);
  color: var(--quiet);
  font-size: 0.9rem;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(18px) scale(0.992);
  transition:
    opacity 640ms var(--ease-out) var(--reveal-delay, 0ms),
    transform 640ms var(--ease-out) var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

.is-visible .pipeline-list li,
.is-visible .handoff-card,
.is-visible .showcase-frame {
  animation: child-rise 560ms var(--ease-out) both;
}

.is-visible .pipeline-list li:nth-child(2),
.is-visible .handoff-card:nth-child(2),
.is-visible .showcase-frame:nth-child(2) {
  animation-delay: 80ms;
}

.is-visible .pipeline-list li:nth-child(3),
.is-visible .handoff-card:nth-child(3),
.is-visible .showcase-frame:nth-child(3) {
  animation-delay: 150ms;
}

.is-visible .pipeline-list li:nth-child(4) {
  animation-delay: 220ms;
}

.is-visible .pipeline-list li:nth-child(5) {
  animation-delay: 290ms;
}

@media (hover: hover) and (pointer: fine) {
  .nav-link:hover {
    transform: translateY(-1px);
  }

  .pipeline-list li:hover,
  .handoff-card:hover,
  .showcase-frame:hover {
    border-color: rgba(66, 184, 255, 0.78);
    box-shadow:
      0 0 0 1px rgba(66, 184, 255, 0.2),
      0 0 26px rgba(66, 184, 255, 0.18),
      0 18px 52px rgba(0, 0, 0, 0.28);
    transform: translateY(-3px);
  }
}

.button:active {
  transform: scale(0.96);
}

@keyframes grid-drift {
  from {
    background-position: 0 0;
  }

  to {
    background-position: 42px 42px;
  }
}

@keyframes brand-signal {
  0%,
  68%,
  100% {
    opacity: 0;
    transform: translateY(-50%) translateX(-0.45rem) scaleX(0.55);
  }

  10%,
  22% {
    opacity: 1;
    transform: translateY(-50%) translateX(0.25rem) scaleX(1);
  }
}

@keyframes mark-pulse {
  0%,
  75%,
  100% {
    filter: drop-shadow(0 0 0 rgba(125, 211, 252, 0));
  }

  12% {
    filter: drop-shadow(0 0 10px rgba(125, 211, 252, 0.34));
  }
}

@keyframes salvage-scan {
  0%,
  18% {
    opacity: 0;
    transform: translateX(-72%);
  }

  34%,
  54% {
    opacity: 0.72;
  }

  74%,
  100% {
    opacity: 0;
    transform: translateX(72%);
  }
}

@keyframes evidence-flow {
  0% {
    opacity: 0;
    transform: translateX(-18%) scale(0.98);
  }

  14%,
  54% {
    opacity: 1;
  }

  82%,
  100% {
    opacity: 0;
    transform: translateX(290%) scale(1);
  }
}

@keyframes pipeline-current {
  0%,
  16% {
    opacity: 0;
    transform: translateX(-18%);
  }

  38%,
  62% {
    opacity: 0.56;
  }

  84%,
  100% {
    opacity: 0;
    transform: translateX(18%);
  }
}

@keyframes card-signal {
  0%,
  38% {
    opacity: 0;
    transform: translateX(-100%);
  }

  48%,
  64% {
    opacity: 0.75;
  }

  82%,
  100% {
    opacity: 0;
    transform: translateX(100%);
  }
}

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

  to {
    transform: translateY(100%);
  }
}

@keyframes cursor-blink {
  0%,
  45% {
    opacity: 1;
  }

  46%,
  100% {
    opacity: 0;
  }
}

@keyframes placeholder-sweep {
  0%,
  54% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

@keyframes step-ping {
  0% {
    box-shadow: 0 0 0 0 rgba(125, 211, 252, 0.28);
  }

  70%,
  100% {
    box-shadow: 0 0 0 10px rgba(125, 211, 252, 0);
  }
}

@keyframes child-rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .hero,
  .section-intro,
  .cta {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 4rem;
  }

  h1 {
    max-width: 13ch;
  }

  .feature-grid,
  .pipeline-list,
  .handoff-grid,
  .showcase-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-grid-6 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  .site-nav {
    width: 100%;
    overflow-x: auto;
    justify-content: flex-start;
  }

  .nav-link {
    flex: 0 0 auto;
  }

  .hero {
    padding-top: 2.5rem;
  }

  .hero-actions,
  .cta-links {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .feature-grid,
  .pipeline-list,
  .handoff-grid,
  .showcase-grid {
    grid-template-columns: 1fr;
  }

  .feature-section,
  .section-band,
  .repo-map,
  .skills-section,
  .ai-handoff,
  .showcase,
  .quick-start,
  .boundary,
  .name-story,
  .cta {
    padding: 4rem 0;
  }

  .terminal code {
    font-size: 0.78rem;
  }

  .evidence-stream {
    display: none;
  }

  .section-band::before {
    display: none;
  }

  .site-footer {
    flex-direction: column;
  }
}

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

  [data-reveal] {
    opacity: 1;
    transform: none;
    will-change: auto;
  }

  .brand-wordmark,
  .salvage-visual::after,
  .evidence-stream span,
  .section-band::before,
  .handoff-card::before,
  .terminal::before,
  .terminal code::after,
  .frame-placeholder::after,
  .showcase-image::after,
  .step-marker,
  .is-visible .pipeline-list li,
  .is-visible .handoff-card,
  .is-visible .showcase-frame {
    animation: none;
  }
}
