:root {
  --bg: #0b0c0f;
  --surface: #12141a;
  --border: #2a2f3a;
  --accent: #5b8cff;
  --gold: #c9a84c;
  --text: #e5e8f0;
  --muted: #9ba3b6;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: radial-gradient(circle at 20% -10%, #172033 0%, var(--bg) 35%);
  color: var(--text);
  line-height: 1.6;
}

h1,
h2,
h3 {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  line-height: 1.15;
  margin: 0;
}

code {
  font-family: 'JetBrains Mono', monospace;
  color: var(--gold);
}

a {
  color: var(--accent);
}

main,
.hero {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section {
  padding: 3.25rem 0;
  border-top: 1px solid var(--border);
}

.section-head {
  margin-bottom: 1rem;
}

.section-head p,
.subtitle {
  color: var(--muted);
}

.hero {
  min-height: 70vh;
  display: grid;
  align-content: center;
  gap: 1rem;
  border: 1px solid var(--border);
  background: linear-gradient(160deg, rgba(91, 140, 255, 0.1), rgba(11, 12, 15, 0.4) 45%);
  margin-top: 1rem;
  border-radius: 14px;
  padding: 2.5rem 1.25rem;
}

.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin: 0;
}

h1 {
  font-size: clamp(2.6rem, 8vw, 5rem);
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.55rem 1rem;
  color: var(--text);
  transition: border-color 180ms ease, background-color 180ms ease;
}

.btn.primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn:hover,
.module a:hover,
.repo a:hover,
.research-item a:hover {
  border-color: var(--gold);
}

.surface {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 12px;
  padding: 0.95rem 1rem;
}

.stack {
  display: grid;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.layer {
  text-align: left;
  border: 1px solid var(--border);
  background: #0f1117;
  color: var(--text);
  padding: 0.8rem 1rem;
  border-radius: 10px;
  font-family: 'JetBrains Mono', monospace;
  cursor: pointer;
}

.layer.active {
  border-color: var(--accent);
  background: rgba(91, 140, 255, 0.12);
}

.reasoning-loop {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 0.75rem;
}

.reasoning-loop span {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #0f1117;
  padding: 0.8rem;
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  animation: pulse 3.6s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.22s);
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(91, 140, 255, 0.05);
    border-color: var(--border);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(91, 140, 255, 0.08);
    border-color: var(--accent);
  }
}

.modules-grid,
.repo-grid,
.research-list {
  display: grid;
  gap: 0.9rem;
}

.modules-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.module,
.repo,
.research-item {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 12px;
  padding: 1rem;
}

.module h3,
.repo h4,
.research-item h3 {
  margin-bottom: 0.55rem;
}

.module a,
.repo a,
.research-item a {
  display: inline-block;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.35rem 0.7rem;
  text-decoration: none;
}

.module-open {
  cursor: pointer;
  transition: border-color 180ms ease, transform 180ms ease;
}

.module-open:hover {
  border-color: #999;
  transform: translateY(-1px);
}

.module-status {
  margin: 0 0 0.6rem;
  font-size: 0.88rem;
}

.module-status.online {
  color: #8fd694;
}

.module-status.experimental {
  color: var(--gold);
}

.graph {
  height: 360px;
  padding: 0;
  overflow: hidden;
}

.repo-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

@media (max-width: 820px) {
  .reasoning-loop {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .graph {
    height: 280px;
  }
}

@media (max-width: 560px) {
  .hero {
    min-height: 56vh;
  }

  .reasoning-loop,
  .repo-grid,
  .modules-grid {
    grid-template-columns: 1fr;
  }
}

.site-footer {
  padding: 2rem 1.25rem;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.footer-content {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-content p {
  margin: 0;
}

.footer-links {
  display: flex;
  gap: 1rem;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color 180ms ease;
}

.footer-links a:hover {
  color: var(--text);
}
