:root {
  --bg: #0b0e16;
  --surf: #141926;
  --surf2: #1c2335;
  --border: #263047;
  --text: #eef2fb;
  --muted: #98a4be;
  --accent: #5b9bff;
  --accent-hover: #7cb0ff;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.55;
  min-height: 100vh;
}

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

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--surf2);
  padding: 0.12em 0.4em;
  border-radius: 5px;
  color: #cfe0ff;
}

.container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
}

.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(11, 14, 22, 0.85);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-inner {
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

.nav-links {
  display: flex;
  gap: 20px;
  font-size: 14px;
  color: var(--muted);
}

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

.hero {
  padding: 44px 0 16px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(36px, 6vw, 52px);
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.hero-sub {
  max-width: 640px;
  margin: 0 auto 28px;
  font-size: 17px;
  color: var(--muted);
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.studio-cta {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.btn-studio {
  background: linear-gradient(135deg, #10b981, #059669);
  border-color: #10b981;
  color: #042117;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 10px;
  box-shadow: 0 6px 24px rgba(16, 185, 129, 0.25);
}

.btn-studio:hover {
  background: linear-gradient(135deg, #34d399, #10b981);
  border-color: #34d399;
}

.studio-cta-note {
  max-width: 640px;
  font-size: 12.5px;
  color: var(--muted);
}

.section { padding: 28px 0 36px; }
.section h2 { font-size: 22px; margin-bottom: 8px; }
.section-sub { color: var(--muted); font-size: 14px; margin-bottom: 20px; }

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

@media (max-width: 720px) {
  .grid-2 { grid-template-columns: 1fr; }
}

.card {
  background: var(--surf);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.card:hover {
  border-color: #3d4f75;
  transform: translateY(-2px);
}

.thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #080a10;
  cursor: pointer;
  overflow: hidden;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(11, 14, 22, 0.85);
  border: 1px solid var(--border);
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #dbe7ff;
}

.card-body { padding: 16px; }
.card-body h3 { font-size: 17px; margin-bottom: 6px; }
.card-body p { font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.card-body p a {
  color: #60a5fa;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.card-body p a:hover { color: #93c5fd; }

.actions { display: flex; flex-wrap: wrap; gap: 8px; }

.repo-card {
  display: block;
  padding: 18px;
}

.repo-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 16px;
}

.repo-name,
.repo-meta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

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

.pill {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surf2);
  border: 1px solid var(--border);
  color: #b7c8eb;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surf);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.gh-icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex-shrink: 0;
}

.ext-arrow {
  font-size: 12px;
  opacity: 0.65;
  line-height: 1;
}

.btn:hover { background: var(--surf2); border-color: #3d4f75; }

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

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

.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 7px; }

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 40px;
  padding: 24px 0;
  font-size: 13px;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

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

dialog#demo-modal {
  width: min(1160px, 95vw);
  height: min(780px, 90vh);
  margin: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #0b0e16;
  color: var(--text);
  overflow: hidden;
  padding: 0;
}

dialog#demo-modal::backdrop { background: rgba(4, 6, 12, 0.8); }

dialog#demo-modal[open] {
  display: flex;
  flex-direction: column;
}

.modal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surf);
}

.modal-frame {
  flex: 1;
  width: 100%;
  border: 0;
  background: #0d0f17;
}
