:root {
  --void: #050510;
  --void-2: #0a0a14;
  --void-3: #12121f;
  --cyan: #2383e2;
  --blue: #4a90f7;
  --purple: #a855f7;
  --orange: #f97316;
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --dim: #71717a;
  --line: rgba(255, 255, 255, 0.06);
  --glass: rgba(8, 8, 20, 0.72);
  --radius: 16px;
  --font: Inter, ui-sans-serif, system-ui, sans-serif;
  --display: Sora, Inter, ui-sans-serif, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: var(--void);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

.sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 480px at 18% -10%, rgba(35, 131, 226, 0.16), transparent 60%),
    radial-gradient(720px 420px at 88% 8%, rgba(168, 85, 247, 0.12), transparent 58%),
    radial-gradient(640px 360px at 50% 110%, rgba(35, 131, 226, 0.08), transparent 55%),
    var(--void);
}

.sky::before,
.sky::after {
  content: "";
  position: absolute;
  inset: 0;
}

.sky::before {
  background-image:
    radial-gradient(1px 1px at 8% 18%, rgba(255, 255, 255, 0.55), transparent),
    radial-gradient(1px 1px at 22% 42%, rgba(255, 255, 255, 0.35), transparent),
    radial-gradient(1px 1px at 41% 12%, rgba(255, 255, 255, 0.45), transparent),
    radial-gradient(1.5px 1.5px at 63% 28%, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(1px 1px at 79% 16%, rgba(255, 255, 255, 0.32), transparent),
    radial-gradient(1px 1px at 91% 38%, rgba(255, 255, 255, 0.4), transparent),
    radial-gradient(1px 1px at 14% 72%, rgba(255, 255, 255, 0.28), transparent),
    radial-gradient(1.4px 1.4px at 33% 81%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1px 1px at 56% 64%, rgba(255, 255, 255, 0.3), transparent),
    radial-gradient(1px 1px at 74% 78%, rgba(255, 255, 255, 0.42), transparent),
    radial-gradient(1px 1px at 96% 70%, rgba(255, 255, 255, 0.26), transparent);
  animation: twinkle 9s ease-in-out infinite alternate;
}

.sky::after {
  background-image:
    radial-gradient(1.6px 1.6px at 18% 30%, rgba(74, 144, 247, 0.7), transparent),
    radial-gradient(1.4px 1.4px at 48% 22%, rgba(168, 85, 247, 0.55), transparent),
    radial-gradient(1.8px 1.8px at 82% 48%, rgba(35, 131, 226, 0.65), transparent),
    radial-gradient(1.2px 1.2px at 70% 88%, rgba(255, 255, 255, 0.45), transparent);
  animation: twinkle 13s ease-in-out infinite alternate-reverse;
}

@keyframes twinkle {
  from { opacity: 0.45; }
  to { opacity: 0.95; }
}

.wrap {
  position: relative;
  z-index: 1;
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mark {
  width: 22px;
  height: 22px;
}

.wordmark {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 13px;
}

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

.hero {
  padding: 28px 0 22px;
  text-align: center;
}

.hero h1 {
  font-family: var(--display);
  font-size: clamp(52px, 8vw, 84px);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 0.95;
}

.hero p {
  max-width: 640px;
  margin: 14px auto 0;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 19px);
}

.cta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: #f4f4f5;
  color: #050510;
}

.btn-primary:hover {
  background: #fff;
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.22);
}

.app {
  position: relative;
  overflow: hidden;
  height: min(560px, 62vh);
  min-height: 420px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(6, 6, 16, 0.78);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(24px);
}

.chrome {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 36px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
}

.dots {
  display: flex;
  gap: 6px;
}

.dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #2a2a3a;
}

.dots i:nth-child(1) { background: #ff5f57; }
.dots i:nth-child(2) { background: #febc2e; }
.dots i:nth-child(3) { background: #28c840; }

.chrome-title {
  color: var(--dim);
  font-size: 12px;
}

.workspace {
  display: grid;
  grid-template-columns: 188px minmax(0, 1.35fr) minmax(280px, 0.95fr) 220px;
  height: calc(100% - 36px);
}

.panel {
  min-width: 0;
  border-right: 1px solid var(--line);
  background: rgba(5, 5, 16, 0.55);
}

.panel:last-child {
  border-right: 0;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 36px;
  padding: 0 10px;
  border-bottom: 1px solid var(--line);
  color: var(--dim);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.search {
  margin: 10px 10px 8px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--dim);
  font-size: 12px;
}

.tree {
  padding: 0 8px 10px;
  color: var(--muted);
  font-size: 12.5px;
}

.folder {
  margin: 8px 2px 4px;
  color: var(--dim);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.file {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 6px;
  border-radius: 6px;
}

.file.active {
  background: rgba(35, 131, 226, 0.14);
  color: var(--text);
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.graph-panel {
  position: relative;
  background:
    radial-gradient(ellipse at 40% 35%, rgba(35, 131, 226, 0.16), transparent 42%),
    radial-gradient(ellipse at 72% 68%, rgba(168, 85, 247, 0.14), transparent 40%),
    #040412;
}

.graph-panel svg {
  display: block;
  width: 100%;
  height: calc(100% - 36px);
}

.node-label {
  fill: #d4d4d8;
  font-family: var(--font);
  font-size: 10px;
}

.edge {
  stroke: rgba(180, 200, 255, 0.28);
  stroke-width: 1;
}

.edge.hot {
  stroke: rgba(74, 144, 247, 0.7);
}

.pulse {
  transform-box: fill-box;
  transform-origin: center;
  animation: breathe 3.6s ease-in-out infinite;
}

@keyframes breathe {
  50% { opacity: 0.7; }
}

.notes {
  display: flex;
  flex-direction: column;
  background: rgba(5, 5, 16, 0.72);
}

.tabs {
  display: flex;
  gap: 2px;
  padding: 6px 8px 0;
}

.tab {
  padding: 6px 10px;
  border-radius: 8px 8px 0 0;
  color: var(--dim);
  font-size: 12px;
}

.tab.active {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.editor {
  flex: 1;
  padding: 14px 16px 8px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.7;
  color: #d4d4d8;
}

.h1 { color: #f4f4f5; font-weight: 600; }
.link { color: #7eb6ff; }
.comment { color: #71717a; }

.status {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px 10px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 11px;
}

.chat {
  display: flex;
  flex-direction: column;
}

.msg {
  margin: 10px 10px 0;
  padding: 8px 9px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.45;
}

.msg.user {
  background: rgba(255, 255, 255, 0.05);
  color: #e4e4e7;
}

.msg.ai {
  background: rgba(35, 131, 226, 0.1);
  color: #d4d4d8;
}

.who {
  display: block;
  margin-bottom: 3px;
  color: var(--dim);
  font-size: 10px;
  letter-spacing: 0.06em;
}

.compose {
  margin-top: auto;
  margin: auto 10px 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--dim);
  font-size: 12px;
}

.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding: 42px 0 10px;
}

.card {
  padding: 18px 16px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(10, 10, 20, 0.55);
}

.card h2 {
  font-family: var(--display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.card p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13.5px;
}

.kicker {
  margin-bottom: 8px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.run {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 28px;
  align-items: center;
  padding: 36px 0 56px;
}

.run h2 {
  font-family: var(--display);
  font-size: 28px;
  letter-spacing: -0.03em;
}

.run p {
  margin-top: 10px;
  color: var(--muted);
}

.term {
  position: relative;
  padding: 16px 18px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #070712;
}

.term pre {
  overflow: auto;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  color: #d4d4d8;
}

.copy {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 11px;
}

.copy:hover {
  color: var(--text);
}

.foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 22px 0 36px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 13px;
}

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

@media (max-width: 1100px) {
  .workspace {
    grid-template-columns: 160px 1fr 240px;
  }

  .chat-panel {
    display: none;
  }

  .features {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 820px) {
  .wrap {
    width: min(1240px, calc(100% - 28px));
  }

  .workspace {
    grid-template-columns: 1fr 1fr;
  }

  .files-panel,
  .notes {
    display: none;
  }

  .app {
    height: 380px;
    min-height: 320px;
  }

  .run {
    grid-template-columns: 1fr;
    padding-bottom: 40px;
  }
}

@media (max-width: 560px) {
  .hero {
    text-align: left;
    padding-top: 18px;
  }

  .cta {
    justify-content: flex-start;
  }

  .workspace,
  .graph-panel {
    grid-template-columns: 1fr;
  }

  .features {
    grid-template-columns: 1fr;
  }

  .nav-links span {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sky::before,
  .sky::after,
  .pulse {
    animation: none;
  }
}
