/* Reset & base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --accent:        #00897b;
  --accent-hover:  #00796b;
  --accent-dim:    rgba(0, 137, 123, 0.15);
  --accent-glow:   rgba(0, 137, 123, 0.25);
  --accent-mesh:   rgba(0, 137, 123, 0.07);

  --bg:            #141a1a;
  --bg-top:        #212929;
  --surface:       #1c2626;
  --surface-2:     #233030;
  --border:        rgba(255, 255, 255, 0.07);

  --text:          #e8eaea;
  --text-muted:    #8fa0a0;
  --text-subtle:   #5a7070;

  --radius:        12px;
  --radius-sm:     8px;
  --font:          'Inter', system-ui, sans-serif;

  --bp-two-col:    700px;
  --bp-mobile:     600px;
}

[data-theme="light"] {
  --bg:            #f2f5f5;
  --bg-top:        #d1d6d6;
  --surface:       #e6eaea;
  --surface-2:     #dce2e2;
  --border:        rgba(0, 0, 0, 0.09);

  --text:          #1a2424;
  --text-muted:    #3d5858;
  --text-subtle:   #607a7a;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

/* Shared layout */
.section { padding: 80px 24px; }
.section-inner { max-width: 1080px; margin: 0 auto; }
.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 48px;
  letter-spacing: -0.02em;
}
.section-title.left { text-align: left; }

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, black 12%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}
.brand-icon.small { width: 20px; height: 20px; }
.brand-name {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav-cta {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color 0.2s;
}
.nav-link:hover { color: var(--accent); }
.gh-icon { width: 18px; height: 18px; flex-shrink: 0; }

/* Theme toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
  padding: 0;
  flex-shrink: 0;
}
.theme-toggle:hover {
  color: var(--accent);
  background: var(--accent-dim);
}
.theme-toggle svg { width: 18px; height: 18px; }
[data-theme="dark"]  .icon-moon { display: none; }
[data-theme="light"] .icon-sun  { display: none; }

/* Buttons */
.btn-launch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background 0.2s, transform 0.15s;
}
.btn-launch:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}
.btn-launch-small {
  padding: 7px 18px;
  font-size: 0.85rem;
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: border-color 0.2s, color 0.2s, transform 0.15s;
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}
.btn-secondary.mt { margin-top: 28px; }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 52px 24px 36px;
  background: linear-gradient(160deg, var(--bg-top) 0%, var(--bg) 60%);
}

.hero-bg-mesh {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--accent-mesh) 1px, transparent 1px),
    linear-gradient(90deg, var(--accent-mesh) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 30%, transparent 100%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.hero-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-title {
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text);
}
.accent { color: var(--accent); }
.hero-title .accent { font-size: clamp(1.55rem, 3.8vw, 2.6rem); }

.hero-subtitle {
  max-width: 560px;
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Preview */
.hero-preview {
  width: 100%;
  max-width: 700px;
  margin-top: 4px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 24px 60px rgba(0,0,0,0.5), 0 0 0 1px var(--border);
}
.preview-gif {
  display: block;
  width: 100%;
  height: auto;
}

/* Dev section */
.dev-section {
  background: var(--bg-top);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section-inner--two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
@media (max-width: 700px) {
  .section-inner--two-col { grid-template-columns: 1fr; gap: 40px; }
}
.dev-text p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.code-block-wrapper { display: flex; flex-direction: column; gap: 0; }
.code-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-subtle);
  margin-bottom: 6px;
}
.code-label.mt-sm { margin-top: 18px; }

.code-block {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-family: 'Fira Mono', 'Cascadia Code', 'Consolas', monospace;
  font-size: 0.88rem;
  color: var(--accent);
  overflow-x: auto;
  line-height: 1.6;
}

/* Citation */
.cite-section { background: var(--bg); padding-top: 56px; padding-bottom: 56px; }
.cite-section .section-title { margin-bottom: 20px; }
.cite-intro {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 24px;
  font-size: 0.95rem;
}
.cite-block {
  max-width: 640px;
  margin: 0 auto 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 24px 28px;
  font-family: 'Fira Mono', 'Cascadia Code', 'Consolas', monospace;
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: pre-wrap;
  line-height: 1.7;
}
.cite-badges {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.badge-link img {
  height: 20px;
  border-radius: 4px;
  opacity: 0.9;
  transition: opacity 0.2s;
}
.badge-link:hover img { opacity: 1; }

/* Footer */
.footer {
  background: color-mix(in srgb, var(--bg) 88%, black 12%);
  border-top: 1px solid var(--border);
  padding: 48px 24px;
}
.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-links {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 0.85rem;
}
.footer-links a {
  color: var(--text-muted);
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--accent); }
.sep { color: var(--text-subtle); }
.footer-funding {
  max-width: 600px;
  font-size: 0.78rem;
  color: var(--text-subtle);
  line-height: 1.6;
}
.footer-disclaimer {
  max-width: 600px;
  font-size: 0.75rem;
  color: var(--text-subtle);
  line-height: 1.6;
  font-style: italic;
}
.footer-copy {
  font-size: 0.78rem;
  color: var(--text-subtle);
}

/* Responsive */
@media (max-width: 600px) {
  .section { padding: 60px 18px; }
  .hero { padding: 72px 18px 60px; }
  .nav-links .btn-launch-small { display: none; }
}
