:root {
  --bg: #080d18;
  --bg-soft: #101a2d;
  --text: #f5f4ef;
  --muted: #acb6c8;
  --line: rgba(207, 224, 255, 0.2);
  --accent: #ffc247;
  --accent-2: #39d3df;
  --card: rgba(13, 25, 47, 0.72);
  --focus: #ffd56a;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 4% 0%, #1a3158 0%, transparent 37%),
    radial-gradient(circle at 95% 12%, #1e4f71 0%, transparent 32%),
    linear-gradient(168deg, #050913, #080d18 60%, #0c1b36 100%);
  min-height: 100vh;
  line-height: 1.5;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.06;
  background-image: repeating-radial-gradient(circle at 0 0, #ffffff 0, #ffffff 0.5px, transparent 1px, transparent 4px);
}

.hero,
main,
.footer {
  width: min(1100px, 92vw);
  margin: 0 auto;
}

.hero {
  padding: 4.6rem 0 2.1rem;
  animation: rise 560ms ease-out both;
}

.hero-logo {
  width: 96px;
  height: 96px;
  margin-bottom: 1rem;
  border-radius: 20px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.eyebrow {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12rem;
  color: var(--accent-2);
  margin: 0;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
}

h1 {
  font-family: "IBM Plex Serif", serif;
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  margin-top: 0.6rem;
  max-width: 15ch;
}

.lede {
  max-width: 62ch;
  color: var(--muted);
  font-size: 1.08rem;
  margin: 1rem 0 1.6rem;
}

.hero-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.64rem 1rem;
  border: 1px solid var(--line);
  color: var(--text);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

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

.btn:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.btn-primary {
  background: linear-gradient(100deg, var(--accent), #ff9d2a);
  color: #211506;
  border-color: rgba(255, 194, 71, 0.38);
  font-weight: 700;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.03);
}

.btn-star {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 194, 71, 0.5);
  font-weight: 600;
}

.btn-star:hover {
  background: rgba(255, 194, 71, 0.12);
  border-color: var(--accent);
  color: var(--accent);
}

.star-banner {
  width: min(1100px, 92vw);
  margin: 1.5rem auto 0;
  text-align: center;
  padding: 2rem 1rem;
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  background: linear-gradient(140deg, rgba(255, 194, 71, 0.04), rgba(57, 211, 223, 0.04));
}

.star-banner-text {
  margin: 0 0 1rem;
  font-size: 1.15rem;
  color: var(--muted);
}

.btn-star--lg {
  padding: 0.75rem 1.6rem;
  font-size: 1rem;
}

main {
  padding: 0.5rem 0 2.5rem;
}

.panel {
  border: 1px solid var(--line);
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0));
  backdrop-filter: blur(3px);
  border-radius: 1.2rem;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.manifesto {
  position: relative;
  overflow: hidden;
}

.manifesto::after {
  content: "";
  position: absolute;
  width: 460px;
  height: 460px;
  right: -170px;
  top: -220px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(57, 211, 223, 0.14) 0%, rgba(57, 211, 223, 0) 68%);
  pointer-events: none;
}

.manifesto-lede {
  max-width: 72ch;
  margin: 0.8rem 0 1rem;
  color: var(--muted);
}

.principles-grid {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.principle-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  padding: 0.95rem;
  background: var(--card);
}

.principle-card p {
  margin: 0.4rem 0 0;
  color: var(--muted);
}

.principle-index {
  margin: 0;
  color: var(--accent-2);
  font-size: 0.8rem;
  letter-spacing: 0.08rem;
  text-transform: uppercase;
  font-weight: 700;
}

.method-grid {
  margin-top: 0.8rem;
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.method-card {
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  padding: 0.95rem;
  background: rgba(255, 255, 255, 0.018);
}

.method-lede {
  color: var(--muted);
  margin: 0.4rem 0 0.8rem;
}

.method-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: rgba(255, 194, 71, 0.12);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}

.method-card p {
  margin-top: 0.4rem;
  color: var(--muted);
}

.method-card code {
  font-size: 0.88rem;
  background: rgba(255,255,255,0.06);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

/* ── Install panel ──────────────────────────────────────────────── */

.install-panel h2 {
  margin-bottom: 0.2rem;
}

.install-lede {
  color: var(--muted);
  margin: 0 0 1rem;
}

.install-lede code {
  font-size: 0.88rem;
  background: rgba(255,255,255,0.06);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.install-steps {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-bottom: 1rem;
}

.install-step {
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  padding: 0.95rem;
  background: var(--card);
}

.install-step-label {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08rem;
  color: var(--accent-2);
  font-weight: 700;
}

.install-step pre {
  margin: 0;
  overflow-x: auto;
}

.install-step code {
  font-family: "IBM Plex Mono", "Fira Code", monospace;
  font-size: 0.82rem;
  color: var(--text);
  white-space: pre;
}

.install-note {
  color: var(--muted);
  font-size: 0.93rem;
  margin: 0;
}

.install-note code {
  font-size: 0.82rem;
  background: rgba(255,255,255,0.06);
  padding: 0.1em 0.35em;
  border-radius: 4px;
  color: var(--text);
}

.install-note strong {
  color: var(--text);
}

/* ── Tag bar ────────────────────────────────────────────────────── */

.tag-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.8rem 0 0.2rem;
}

.tag-btn {
  font: inherit;
  font-size: 0.8rem;
  padding: 0.28rem 0.72rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  cursor: pointer;
  transition: border-color 150ms ease, color 150ms ease, background 150ms ease;
  text-transform: lowercase;
}

.tag-btn:hover {
  border-color: rgba(255, 194, 71, 0.5);
  color: var(--text);
}

.tag-btn--active {
  background: rgba(255, 194, 71, 0.12);
  border-color: rgba(255, 194, 71, 0.6);
  color: var(--accent);
  font-weight: 700;
}

/* ── Explore header ─────────────────────────────────────────────── */

.explore-header {
  display: flex;
  gap: 0.85rem;
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
}

.search-wrap {
  min-width: min(360px, 100%);
}

input[type="search"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  font: inherit;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  padding: 0.64rem 0.75rem;
}

.result-count {
  color: var(--muted);
  margin: 0.9rem 0;
}

.card-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.card {
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  padding: 0.9rem;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.008));
  animation: fadeInUp 420ms ease both;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.5rem;
}

.tag {
  font-size: 0.72rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(57, 211, 223, 0.3);
  background: rgba(57, 211, 223, 0.07);
  color: var(--accent-2);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.card p,
.card-desc {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.45;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--line);
}

.card-slug {
  font-family: "IBM Plex Mono", "Fira Code", monospace;
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.copy-btn {
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  cursor: pointer;
  transition: border-color 150ms ease, color 150ms ease, background 150ms ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.copy-btn:hover {
  border-color: rgba(255, 194, 71, 0.5);
  color: var(--accent);
  background: rgba(255, 194, 71, 0.08);
}

.card a {
  color: var(--text);
  font-weight: 700;
  text-decoration-color: rgba(255, 143, 60, 0.7);
}

.card a:hover {
  text-decoration-color: var(--accent);
}

.card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 194, 71, 0.48);
  transition: transform 160ms ease, border-color 160ms ease;
}

.footer {
  padding: 1.5rem 0 2.4rem;
  color: var(--muted);
  text-align: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.2rem 1.2rem;
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 150ms ease;
}

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

.footer-note {
  font-size: 0.85rem;
  margin: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .hero {
    padding-top: 3.1rem;
  }

  .panel {
    padding: 0.9rem;
  }

  .hero-actions {
    gap: 0.6rem;
  }
}
