/* ==========================================================================
   exohab documentation theme
   ========================================================================== */

:root {
  --hx-indigo: #4f46e5;
  --hx-teal: #14b8a6;
  --hx-space-1: #070b1f;
  --hx-space-2: #1e1b4b;
  --hx-radius: 14px;
  --hx-card-bg: var(--md-default-bg-color);
  --hx-card-border: rgba(79, 70, 229, 0.14);
  --hx-alt-bg: #f6f7fb;
}
[data-md-color-scheme="slate"] {
  --hx-card-bg: #1b1f2e;
  --hx-card-border: rgba(165, 180, 252, 0.14);
  --hx-alt-bg: #161a28;
}

/* --- header polish ------------------------------------------------------ */
.md-header,
.md-tabs {
  background: linear-gradient(90deg, #1e1b4b 0%, #312e81 55%, #1e3a8a 100%);
}

/* --- hero --------------------------------------------------------------- */
.hx-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(1200px 500px at 85% 20%, rgba(20, 184, 166, 0.28), transparent 60%),
    radial-gradient(900px 500px at 10% 90%, rgba(99, 102, 241, 0.35), transparent 60%),
    linear-gradient(160deg, var(--hx-space-1) 0%, var(--hx-space-2) 100%);
}
.hx-stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 10% 20%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 30% 70%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 55% 15%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 70% 55%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 85% 80%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 92% 35%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 20% 90%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 45% 45%, #fff 50%, transparent 51%);
  background-size: 400px 400px;
  opacity: 0.55;
  animation: hx-twinkle 6s ease-in-out infinite alternate;
}
.hx-hero__inner {
  position: relative;
  max-width: 61rem;
  margin: 0 auto;
  padding: 4.5rem 1.2rem 4rem;
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 2rem;
  align-items: center;
}
.hx-eyebrow {
  display: inline-block;
  margin: 0 0 1rem;
  padding: 0.3rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #c7d2fe;
  background: rgba(255, 255, 255, 0.06);
}
.hx-title {
  margin: 0 0 1rem;
  font-size: clamp(2.1rem, 5vw, 3.3rem);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
}
.hx-gradient-text {
  background: linear-gradient(90deg, #5eead4, #a5b4fc 60%, #f0abfc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hx-lead {
  font-size: 1.08rem;
  line-height: 1.6;
  color: #dbe1ff;
  max-width: 34rem;
  margin: 0 0 1.6rem;
}
.hx-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-bottom: 1.4rem;
}
.md-typeset .hx-btn,
.hx-btn {
  border-radius: 10px;
  padding: 0.65em 1.4em;
  font-size: 0.8rem;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.hx-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.35);
}
.hx-hero .md-button--primary {
  background: linear-gradient(90deg, #6366f1, #14b8a6);
  border: none;
  color: #fff;
}
.hx-btn--ghost {
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
  background: rgba(255, 255, 255, 0.06);
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
}
.hx-btn--ghost svg {
  width: 1.05em;
  height: 1.05em;
  fill: currentColor;
}
.hx-install {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.5rem 0.45rem 1rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-family: var(--md-code-font-family);
}
.hx-install code {
  background: none;
  color: #5eead4;
  font-size: 0.85rem;
}
.hx-install code::before {
  content: "$ ";
  color: #94a3b8;
}
.hx-copy {
  cursor: pointer;
  border: none;
  border-radius: 7px;
  padding: 0.3rem 0.7rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}
.hx-copy:hover {
  background: rgba(255, 255, 255, 0.22);
}
.hx-copy__done,
.hx-copied .hx-copy__idle {
  display: none;
}
.hx-copied .hx-copy__done {
  display: inline;
}
.hx-hero__art {
  display: flex;
  justify-content: center;
}
.hx-orbit {
  position: relative;
  width: 260px;
  height: 260px;
  filter: drop-shadow(0 0 40px rgba(20, 184, 166, 0.45));
  animation: hx-float 7s ease-in-out infinite;
}
.hx-orbit img {
  width: 100%;
  height: 100%;
}

/* --- stats strip -------------------------------------------------------- */
.hx-stats {
  background: #0b1026;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.hx-stats__inner {
  max-width: 61rem;
  margin: 0 auto;
  padding: 1.1rem 1.2rem;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  text-align: center;
}
.hx-stats strong {
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
  background: linear-gradient(90deg, #5eead4, #a5b4fc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hx-stats span {
  font-size: 0.72rem;
  color: #a5b4fc;
}

/* --- landing sections --------------------------------------------------- */
.hx-content > h1:first-child {
  display: none;
}
.md-typeset .hx-section {
  padding: 3rem 0 1rem;
}
.md-typeset .hx-section--alt {
  position: relative;
}
.md-typeset .hx-section--alt::before {
  content: "";
  position: absolute;
  inset: 0 -100vmax;
  background: var(--hx-alt-bg);
  z-index: -1;
}
.md-typeset .hx-kicker {
  margin: 0 0 0.3rem;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--hx-teal);
}
.md-typeset .hx-h2 {
  margin: 0 0 0.6rem;
  text-align: center;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--md-default-fg-color);
}
.md-typeset .hx-h2 .headerlink {
  display: none;
}
.md-typeset .hx-sub {
  text-align: center;
  max-width: 36rem;
  margin: 0 auto 2rem;
  color: var(--md-default-fg-color--light);
}
.md-typeset .hx-features,
.md-typeset .hx-audience,
.md-typeset .hx-steps {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 1.5rem;
}
.md-typeset .hx-card,
.md-typeset .hx-step {
  position: relative;
  padding: 1.3rem 1.3rem 1rem;
  border-radius: var(--hx-radius);
  background: var(--hx-card-bg);
  border: 1px solid var(--hx-card-border);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.md-typeset .hx-card:hover {
  transform: translateY(-3px);
  border-color: rgba(20, 184, 166, 0.45);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}
.md-typeset .hx-card h3,
.md-typeset .hx-step h3 {
  margin: 0.5rem 0 0.4rem;
  font-size: 1rem;
  font-weight: 700;
}
.md-typeset .hx-card p,
.md-typeset .hx-step p {
  font-size: 0.8rem;
  line-height: 1.55;
  margin: 0 0 0.6rem;
}
.md-typeset .hx-icon {
  font-size: 1.4rem;
  padding: 0.45rem;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, var(--hx-indigo), var(--hx-teal));
}
.md-typeset .hx-icon svg {
  fill: #fff;
  width: 1.5rem;
  height: 1.5rem;
  max-height: none;
}
.md-typeset .hx-icon {
  display: inline-flex;
  line-height: 1;
}

/* FAQ: neutral cards instead of the default green "question" admonition */
.md-typeset .hx-section details.question {
  border: 1px solid var(--hx-card-border);
  border-radius: 12px;
  background: var(--hx-card-bg);
  box-shadow: none;
  margin: 0.6rem auto;
  max-width: 46rem;
}
.md-typeset .hx-section details.question > summary {
  background: transparent;
  font-weight: 600;
  font-size: 0.85rem;
  padding-left: 2.6rem;
}
.md-typeset .hx-section details.question > summary::before {
  background-color: var(--hx-teal);
}
.md-typeset .hx-section details.question > summary::after {
  color: var(--md-default-fg-color--light);
}
.md-typeset .hx-section details.question[open] {
  border-color: rgba(20, 184, 166, 0.45);
}
.md-typeset .hx-step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--hx-indigo), var(--hx-teal));
}
.md-typeset .hx-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}
.md-typeset .hx-gallery figure {
  margin: 0;
  padding: 0.8rem;
  border-radius: var(--hx-radius);
  background: var(--hx-card-bg);
  border: 1px solid var(--hx-card-border);
}
.md-typeset .hx-gallery img {
  border-radius: 8px;
}
.md-typeset .hx-gallery figcaption {
  font-size: 0.75rem;
  color: var(--md-default-fg-color--light);
  max-width: none;
}
.md-typeset .hx-refs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 1.2rem;
}
.md-typeset .hx-refs span {
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.75rem;
  border: 1px solid var(--hx-card-border);
  background: var(--hx-card-bg);
}
.md-typeset .hx-link {
  display: block;
  text-align: center;
  font-weight: 600;
}
.md-typeset .hx-final {
  margin: 3rem 0 1rem;
  padding: 2.6rem 1rem;
  text-align: center;
  border-radius: 20px;
  color: #fff;
  background:
    radial-gradient(600px 240px at 80% 0%, rgba(20, 184, 166, 0.35), transparent 60%),
    linear-gradient(135deg, var(--hx-space-1), var(--hx-space-2));
}
.md-typeset .hx-final .hx-h2 {
  color: #fff;
}
.md-typeset .hx-final .hx-sub {
  color: #c7d2fe;
  margin-bottom: 1.2rem;
}
.md-typeset .hx-final .md-button {
  margin: 0.25rem;
}
.md-typeset .hx-final .md-button:not(.md-button--primary) {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}
.md-typeset .hx-final .md-button--primary {
  background: linear-gradient(90deg, #6366f1, #14b8a6);
  border: none;
}

/* --- About page: author card -------------------------------------------- */
.md-typeset .hx-author {
  display: flex;
  gap: 1.4rem;
  align-items: center;
  padding: 1.4rem;
  border-radius: var(--hx-radius);
  background: var(--hx-card-bg);
  border: 1px solid var(--hx-card-border);
}
.md-typeset .hx-author {
  align-items: flex-start;
}
.md-typeset .hx-author > p:first-child {
  flex: 0 0 auto;
  margin: 0;
}
.md-typeset .hx-author .hx-meta svg {
  width: 1em;
  height: 1em;
  vertical-align: -0.12em;
  fill: currentColor;
}
.md-typeset .hx-author img {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  border: 3px solid var(--hx-teal);
  box-shadow: 0 0 0 6px rgba(20, 184, 166, 0.12), 0 10px 30px rgba(15, 23, 42, 0.25);
  object-fit: cover;
  flex-shrink: 0;
}
.md-typeset .hx-author .hx-meta {
  font-size: 0.78rem;
  color: var(--md-default-fg-color--light);
}
.md-typeset .hx-author-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.8rem;
}
.md-typeset .hx-author-links .md-button {
  margin: 0;
  padding: 0.4em 1em;
  font-size: 0.72rem;
  border-radius: 8px;
}
@media screen and (max-width: 38em) {
  .md-typeset .hx-author { align-items: center; }
  .md-typeset .hx-author-links { justify-content: center; }
  .md-typeset .hx-author > div > p:not(.hx-role):not(.hx-meta) { text-align: left; }
}
.md-typeset .hx-author h3 {
  margin: 0 0 0.2rem;
}
.md-typeset .hx-author p {
  margin: 0.25rem 0;
}
.md-typeset .hx-author .hx-role {
  color: var(--hx-teal);
  font-weight: 600;
}

/* --- motion & responsiveness -------------------------------------------- */
@keyframes hx-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
@keyframes hx-twinkle {
  from { opacity: 0.35; }
  to { opacity: 0.7; }
}
@media (prefers-reduced-motion: reduce) {
  .hx-orbit,
  .hx-stars { animation: none; }
  .hx-card,
  .hx-btn { transition: none; }
}
@media screen and (max-width: 76.1875em) {
  .hx-hero__inner { padding-top: 3rem; }
}
@media screen and (max-width: 60em) {
  .hx-hero__inner { grid-template-columns: 1fr; text-align: center; }
  .hx-lead { margin-left: auto; margin-right: auto; }
  .hx-cta { justify-content: center; }
  .hx-hero__art { display: none; }
  .hx-stats__inner { grid-template-columns: repeat(3, 1fr); }
  .md-typeset .hx-features,
  .md-typeset .hx-audience,
  .md-typeset .hx-steps { grid-template-columns: 1fr 1fr; }
  .md-typeset .hx-gallery { grid-template-columns: 1fr; }
}
@media screen and (max-width: 38em) {
  .hx-stats__inner { grid-template-columns: 1fr 1fr; }
  .md-typeset .hx-features,
  .md-typeset .hx-audience,
  .md-typeset .hx-steps { grid-template-columns: 1fr; }
  .md-typeset .hx-author { flex-direction: column; text-align: center; }
  .hx-install code { font-size: 0.75rem; }
}
