:root {
  --bg: #05060a;
  --panel: rgba(11, 15, 23, .72);
  --cyan: #3ff7e4;
  --pink: #fa4fd1;
  --red: #ff314a;
  --text: #f4f7fb;
  --muted: #8b93a3;
  --line: rgba(113, 137, 162, .22);
}

* { box-sizing: border-box; }

html { color-scheme: dark; background: var(--bg); }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 68% 43%, rgba(63, 247, 228, .08), transparent 24rem),
    radial-gradient(circle at 78% 18%, rgba(250, 79, 209, .06), transparent 22rem),
    var(--bg);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(107, 136, 156, .075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(107, 136, 156, .075) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 90%);
  animation: grid-drift 14s linear infinite;
}

a { color: inherit; }

#neural-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  opacity: .55;
}

.noise, .scanlines { position: fixed; inset: 0; pointer-events: none; }
.noise {
  z-index: 20;
  opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}
.scanlines {
  z-index: 19;
  opacity: .17;
  background: repeating-linear-gradient(to bottom, transparent 0 3px, rgba(0,0,0,.24) 4px);
}

.shell { width: min(1520px, 100%); min-height: 100vh; margin: auto; padding: 0 clamp(20px, 4.5vw, 72px); }

.topbar {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: inline-flex;
  text-decoration: none;
  color: #fff;
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -.08em;
}

.wordmark .ai-a, .wordmark .ai-i { position: relative; }
.wordmark .ai-a { animation: signal-a 5.2s infinite; }
.wordmark .ai-i { animation: signal-i 5.2s infinite; }

.system-status {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font: 700 .72rem/1 "Courier New", monospace;
  letter-spacing: .14em;
}
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); animation: pulse 1.8s infinite; }

.hero { min-height: calc(100vh - 160px); padding: clamp(34px, 7vh, 76px) 0 32px; display: flex; flex-direction: column; justify-content: center; }
.eyebrow, .rail-meta {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font: 700 .7rem/1.2 "Courier New", monospace;
  letter-spacing: .18em;
}

.hero-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(380px, .88fr); gap: clamp(36px, 7vw, 100px); align-items: center; padding: clamp(30px, 5vh, 56px) 0; }
.kicker { margin: 0 0 18px; color: var(--cyan); font: 700 .78rem/1 "Courier New", monospace; letter-spacing: .22em; }
h1 { margin: 0; max-width: 900px; font-size: clamp(3.8rem, 8vw, 8.4rem); line-height: .79; letter-spacing: -.075em; font-weight: 900; }
.outline {
  position: relative;
  color: transparent;
  -webkit-text-stroke: 1px rgba(244,247,251,.66);
  text-shadow: 8px 0 28px rgba(63,247,228,.09), -8px 0 28px rgba(250,79,209,.08);
}
.outline::before, .outline::after { content: attr(data-text); position: absolute; inset: 0; overflow: hidden; opacity: 0; }
.outline::before { color: var(--cyan); -webkit-text-stroke: 0; transform: translateX(-3px); animation: glitch 6s infinite; }
.outline::after { color: var(--pink); -webkit-text-stroke: 0; transform: translateX(3px); animation: glitch 6s .08s infinite reverse; }
.intro { max-width: 650px; margin: 30px 0 0; color: #aab1bf; font-size: clamp(1rem, 1.35vw, 1.2rem); line-height: 1.65; }

.contacts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; }
.contact {
  min-width: 190px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 7px 18px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: rgba(6,9,14,.62);
  color: #dce1e9;
  text-decoration: none;
  font-size: .9rem;
  transition: border-color .25s, transform .25s, background .25s;
}
.contact:not(.address):hover { transform: translateY(-2px); border-color: var(--cyan); background: rgba(63,247,228,.06); }
.contact.primary { border-color: rgba(63,247,228,.45); }
.contact-label { grid-column: 1 / -1; color: var(--muted); font: 700 .62rem/1 "Courier New", monospace; letter-spacing: .15em; }
.arrow { color: var(--cyan); font-size: 1.1rem; }
.contact.address { min-width: 210px; line-height: 1.4; }

.core-wrap { min-width: 0; }
.core-hud { position: relative; width: min(100%, 520px); aspect-ratio: 1; margin: auto; display: grid; place-items: center; }
.core-hud::before, .core-hud::after { content: ""; position: absolute; border: 1px solid var(--line); border-radius: 50%; inset: 8%; }
.core-hud::after { inset: 20%; border-style: dashed; animation: spin 32s linear infinite; }
.axis { position: absolute; background: linear-gradient(90deg, transparent, rgba(63,247,228,.35), transparent); }
.axis-x { width: 100%; height: 1px; }
.axis-y { width: 1px; height: 100%; background: linear-gradient(transparent, rgba(250,79,209,.3), transparent); }
.core { width: 35%; aspect-ratio: 1; display: grid; place-items: center; border: 1px solid rgba(63,247,228,.6); border-radius: 50%; background: radial-gradient(circle, rgba(63,247,228,.16), rgba(5,6,10,.72) 60%); box-shadow: inset 0 0 35px rgba(63,247,228,.15), 0 0 40px rgba(63,247,228,.12); animation: core-breathe 3s ease-in-out infinite; }
.core-inner { width: 54%; aspect-ratio: 1; display: grid; place-items: center; border: 1px solid rgba(250,79,209,.72); border-radius: 50%; color: #fff; font: 900 clamp(1.6rem, 4vw, 3.1rem)/1 "Courier New", monospace; letter-spacing: -.08em; text-shadow: 0 0 16px var(--pink); box-shadow: 0 0 22px rgba(250,79,209,.18); }
.orbit { position: absolute; inset: 11%; border: 1px solid rgba(115,139,164,.25); border-radius: 50%; animation: spin 9s linear infinite; }
.orbit i { position: absolute; width: 8px; height: 8px; top: 50%; left: -4px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 14px var(--cyan); }
.orbit-two { inset: 25% 5%; animation-duration: 12s; animation-direction: reverse; transform: rotate(35deg); }
.orbit-two i { background: var(--pink); box-shadow: 0 0 14px var(--pink); }
.orbit-three { inset: 5% 27%; animation-duration: 7s; transform: rotate(70deg); }
.orbit-three i { width: 5px; height: 5px; background: #fff; box-shadow: 0 0 10px #fff; }
.hud-label { position: absolute; color: #6f7889; font: 700 .59rem/1.35 "Courier New", monospace; letter-spacing: .15em; }
.label-a { top: 20%; right: 2%; text-align: right; }
.label-b { left: 1%; bottom: 22%; }

.terminal { max-width: 520px; margin: -18px auto 0; border: 1px solid var(--line); background: rgba(6,9,14,.78); backdrop-filter: blur(12px); font: .72rem/1.4 "Courier New", monospace; }
.terminal-top { display: flex; justify-content: space-between; padding: 8px 11px; color: #717b8d; border-bottom: 1px solid var(--line); }
.terminal-live { color: var(--pink); }
.terminal-line { min-height: 42px; padding: 12px 11px; color: #d7dce4; }
.prompt { color: var(--cyan); }
.cursor { animation: blink .72s step-end infinite; }

.build-rail { margin-top: auto; }
.rail-track { height: 2px; margin-top: 12px; overflow: hidden; background: rgba(125,146,167,.14); }
.rail-track span { display: block; width: 38%; height: 100%; background: linear-gradient(90deg, transparent, var(--cyan), var(--pink), transparent); animation: rail 2.8s ease-in-out infinite; }

.ticker { width: 100vw; margin-left: calc(50% - 50vw); overflow: hidden; border-block: 1px solid var(--line); background: #080b11; }
.ticker-track { width: max-content; display: flex; align-items: center; gap: 22px; padding: 13px 0; color: #97a0af; font: 700 .68rem/1 "Courier New", monospace; letter-spacing: .13em; animation: ticker 34s linear infinite; }
.ticker b { color: var(--pink); font-size: .92rem; }

footer { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 20px; color: #687182; font: 700 .65rem/1.4 "Courier New", monospace; letter-spacing: .12em; }

@keyframes grid-drift { to { background-position: 44px 44px; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .35; transform: scale(.75); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes core-breathe { 50% { transform: scale(1.045); filter: brightness(1.22); } }
@keyframes rail { 0% { transform: translateX(-105%); } 60%, 100% { transform: translateX(265%); } }
@keyframes ticker { to { transform: translateX(-50%); } }
@keyframes glitch { 0%, 88%, 100% { clip-path: inset(0 0 100% 0); opacity: 0; } 89% { clip-path: inset(12% 0 65% 0); opacity: .65; } 90% { clip-path: inset(68% 0 12% 0); opacity: .5; } 91% { clip-path: inset(40% 0 35% 0); opacity: .65; } 92% { clip-path: inset(0 0 100% 0); opacity: 0; } }
@keyframes signal-a { 0%, 5%, 9%, 12%, 100% { color: #fff; text-shadow: none; } 6%, 8%, 10% { color: var(--cyan); text-shadow: 0 0 12px var(--cyan), 0 0 28px var(--cyan); } }
@keyframes signal-i { 0%, 21%, 25%, 29%, 100% { color: #fff; text-shadow: none; } 22%, 24%, 26%, 28% { color: var(--pink); text-shadow: 0 0 12px var(--pink), 0 0 28px var(--pink); } }

@media (max-width: 980px) {
  .hero { min-height: auto; }
  .hero-grid { grid-template-columns: 1fr; }
  .core-wrap { width: min(620px, 100%); margin: 0 auto; }
  .core-hud { max-height: 500px; }
  h1 { font-size: clamp(3.8rem, 12vw, 7rem); }
}

@media (max-width: 620px) {
  .shell { padding-inline: 17px; }
  .topbar { min-height: 68px; }
  .system-status { font-size: .58rem; letter-spacing: .1em; }
  .hero { padding-top: 30px; }
  .eyebrow { font-size: .57rem; letter-spacing: .11em; }
  .hero-grid { gap: 24px; padding: 28px 0; }
  h1 { font-size: clamp(2.75rem, 12vw, 4.3rem); line-height: .83; }
  .intro { margin-top: 24px; }
  .contacts { display: grid; }
  .contact { width: 100%; }
  .core-wrap { margin-top: 10px; }
  .core-hud { width: 92vw; max-width: 390px; margin-left: 50%; transform: translateX(-50%); }
  .terminal { margin-top: -10px; }
  footer { align-items: flex-start; flex-direction: column; justify-content: center; padding: 18px 0; }
}

@media (prefers-reduced-motion: reduce) {
  .noise { display: none; }
}
