/*
  Pol4rFuchs Codeberg Pages Hub
  Static, dependency-free, Codeberg Pages-safe.
  Rule: use relative paths in HTML. No root-absolute /assets paths.
*/

:root {
  color-scheme: dark;
  --bg: #03110c;
  --bg-2: #071c14;
  --panel: rgba(8, 31, 22, 0.72);
  --panel-strong: rgba(10, 44, 31, 0.88);
  --text: #eafff4;
  --muted: #93b7a7;
  --dim: #6f9585;
  --ntfy: #34d399;
  --ntfy-2: #16a34a;
  --ntfy-3: #0f7f42;
  --warning: #fbbf24;
  --danger: #fb7185;
  --blue: #38bdf8;
  --violet: #a78bfa;
  --border: rgba(116, 255, 184, 0.16);
  --border-strong: rgba(116, 255, 184, 0.34);
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.44);
  --glow: 0 0 44px rgba(52, 211, 153, 0.18);
  --radius: 26px;
  --radius-sm: 16px;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(52, 211, 153, 0.22), transparent 32rem),
    radial-gradient(circle at 86% 16%, rgba(22, 163, 74, 0.18), transparent 30rem),
    linear-gradient(135deg, #020807 0%, var(--bg) 46%, #020604 100%);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.55;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.42;
  background-image:
    linear-gradient(rgba(116, 255, 184, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(116, 255, 184, 0.035) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: radial-gradient(circle at top, black, transparent 78%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, transparent, rgba(52, 211, 153, 0.08), transparent);
  transform: translateX(-70%);
  animation: scan 11s linear infinite;
}

@keyframes scan {
  0% { transform: translateX(-75%); }
  100% { transform: translateX(75%); }
}

a { color: inherit; }

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 42px;
  position: relative;
  z-index: 1;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(3, 17, 12, 0.68);
  backdrop-filter: blur(18px);
  box-shadow: var(--glow);
  position: sticky;
  top: 12px;
  z-index: 10;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--ntfy), var(--ntfy-3));
  color: #02110b;
  font-family: var(--mono);
  font-size: 0.88rem;
  box-shadow: 0 0 22px rgba(52, 211, 153, 0.35);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.nav a,
.button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.nav a {
  padding: 10px 12px;
  color: var(--muted);
  border: 1px solid transparent;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--text);
  border-color: var(--border);
  background: rgba(52, 211, 153, 0.08);
}

.hero {
  display: grid;
  grid-template-columns: 1.28fr 0.72fr;
  gap: 18px;
  margin: 18px 0;
}

.hero-panel,
.card,
.code-panel,
.status-panel,
.footer {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(8, 31, 22, 0.72), rgba(2, 8, 6, 0.62));
  backdrop-filter: blur(22px);
  box-shadow: var(--shadow), var(--glow);
}

.hero-panel {
  padding: clamp(24px, 5vw, 54px);
  overflow: hidden;
  position: relative;
}

.hero-panel::after {
  content: "";
  position: absolute;
  width: 380px;
  height: 380px;
  right: -130px;
  top: -170px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(52, 211, 153, 0.22), transparent 68%);
  pointer-events: none;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.08);
  color: var(--ntfy);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

h1 {
  max-width: 900px;
  margin-top: 18px;
  font-size: clamp(2.35rem, 7vw, 6.4rem);
}

h2 {
  font-size: clamp(1.65rem, 3vw, 3rem);
}

h3 {
  font-size: 1.16rem;
}

p {
  margin: 0;
  color: var(--muted);
}

.lead {
  max-width: 820px;
  margin-top: 18px;
  font-size: clamp(1.03rem, 2vw, 1.28rem);
  color: #d7ffeb;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.button {
  padding: 13px 16px;
  border: 1px solid rgba(52, 211, 153, 0.36);
  background: linear-gradient(135deg, var(--ntfy), var(--ntfy-2));
  color: #02110b;
  box-shadow: 0 14px 38px rgba(22, 163, 74, 0.22);
}

.ghost-button {
  padding: 13px 16px;
  border: 1px solid var(--border);
  background: rgba(52, 211, 153, 0.07);
  color: var(--text);
}

.button:hover,
.ghost-button:hover,
.card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}

.status-panel {
  padding: 22px;
  display: grid;
  gap: 13px;
  align-content: start;
}

.status-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(116, 255, 184, 0.1);
}

.status-row:last-child { border-bottom: 0; }

.status-label {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.status-value {
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.86rem;
  text-align: right;
}

.grid,
.docs-grid,
.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.section {
  margin-top: 28px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 12px;
}

.section-head p { max-width: 640px; }

.card {
  min-height: 100%;
  padding: 20px;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.12), transparent 48%);
  opacity: 0;
  transition: opacity 160ms ease;
  pointer-events: none;
}

.card:hover::before { opacity: 1; }

.card .meta,
.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: max-content;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.08);
  color: var(--ntfy);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.card h3 { margin-bottom: 9px; }
.card p { margin-bottom: 14px; }

.card-link {
  color: var(--ntfy);
  font-family: var(--mono);
  font-size: 0.86rem;
  font-weight: 800;
}

.code-panel {
  padding: 18px;
  overflow: auto;
}

pre,
code {
  font-family: var(--mono);
}

pre {
  margin: 0;
  color: #b7ffd8;
  font-size: 0.88rem;
  line-height: 1.62;
  white-space: pre-wrap;
}

.kbd {
  display: inline-flex;
  align-items: center;
  padding: 3px 7px;
  border: 1px solid var(--border);
  border-bottom-color: rgba(116, 255, 184, 0.32);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  color: #dfffee;
  font-family: var(--mono);
  font-size: 0.82em;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(3, 17, 12, 0.46);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(116, 255, 184, 0.1);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--ntfy);
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

td { color: var(--muted); }
tr:last-child td { border-bottom: 0; }

.footer {
  margin-top: 32px;
  padding: 18px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.78rem;
}

.search-box {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  outline: none;
  background: rgba(3, 17, 12, 0.72);
  color: var(--text);
  font: inherit;
}

.search-box:focus {
  border-color: var(--border-strong);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.1);
}

.muted { color: var(--muted); }
.dim { color: var(--dim); }
.ntfy { color: var(--ntfy); }
.warn { color: var(--warning); }
.danger { color: var(--danger); }

@media (max-width: 900px) {
  .hero,
  .grid,
  .docs-grid,
  .tool-grid,
  .grid.two {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
    border-radius: 22px;
    flex-direction: column;
    position: static;
  }

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
