:root {
  color-scheme: dark;
  --bg: #030504;
  --panel: rgba(7, 18, 13, 0.86);
  --panel-strong: rgba(5, 12, 10, 0.96);
  --line: rgba(68, 255, 154, 0.24);
  --line-strong: rgba(88, 255, 176, 0.54);
  --text: #e6fff2;
  --muted: #88a89a;
  --green: #46ff96;
  --cyan: #52d8ff;
  --amber: #ffcf5a;
  --red: #ff5b7c;
  --shadow: rgba(0, 255, 128, 0.18);
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  font-family:
    ui-monospace, "SFMono-Regular", "Cascadia Code", "Roboto Mono", Menlo,
    Consolas, monospace;
  background:
    radial-gradient(circle at 18% 12%, rgba(70, 255, 150, 0.14), transparent 24rem),
    radial-gradient(circle at 82% 20%, rgba(82, 216, 255, 0.1), transparent 22rem),
    linear-gradient(180deg, #020403 0%, #06100c 48%, #020504 100%);
  letter-spacing: 0;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(70, 255, 150, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(70, 255, 150, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.95), transparent 86%);
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: 0.22;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 5px,
    rgba(230, 255, 242, 0.08) 6px
  );
  mix-blend-mode: screen;
}

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

button,
input {
  font: inherit;
}

#signal-canvas {
  position: fixed;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  opacity: 0.5;
}

.site-header,
.site-footer,
main {
  width: min(calc(100% - 32px), var(--max));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 82px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 1rem;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #031009;
  background: var(--green);
  box-shadow: 0 0 26px var(--shadow);
}

.identity-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.identity-links a,
.actions a {
  border: 1px solid var(--line);
  color: var(--green);
  background: rgba(2, 8, 5, 0.62);
  transition:
    border-color 160ms ease,
    color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.identity-links a {
  padding: 9px 12px;
  font-size: 0.8rem;
}

.identity-links a:hover,
.actions a:hover,
.identity-links a:focus-visible,
.actions a:focus-visible {
  border-color: var(--line-strong);
  color: var(--text);
  background: rgba(70, 255, 150, 0.1);
  box-shadow: 0 0 24px rgba(70, 255, 150, 0.16);
  outline: none;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
  gap: 32px;
  align-items: end;
  min-height: clamp(430px, 58vh, 620px);
  padding: 34px 0 28px;
}

.kicker,
.section-label {
  margin: 0 0 14px;
  color: var(--green);
  font-size: 0.86rem;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 850px;
  margin-bottom: 18px;
  font-size: clamp(3rem, 8vw, 6.7rem);
  line-height: 0.9;
  text-transform: uppercase;
}

.summary {
  max-width: 680px;
  margin-bottom: 0;
  color: #b6d4c8;
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.7;
}

.terminal,
.directory-shell {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow:
    0 20px 80px rgba(0, 0, 0, 0.34),
    inset 0 0 42px rgba(70, 255, 150, 0.035);
  backdrop-filter: blur(18px);
}

.terminal {
  min-height: 290px;
}

.terminal-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  height: 42px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(4, 11, 8, 0.9);
}

.terminal-bar span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--red);
}

.terminal-bar span:nth-child(2) {
  background: var(--amber);
}

.terminal-bar span:nth-child(3) {
  background: var(--green);
}

.terminal-body {
  padding: 22px;
  color: #cffff0;
}

.terminal-body p {
  margin-bottom: 13px;
  line-height: 1.55;
}

.muted {
  color: var(--muted);
}

.ok {
  color: var(--green);
}

.warn {
  color: var(--amber);
}

.cursor-line {
  color: var(--cyan);
}

.cursor {
  display: inline-block;
  width: 0.68em;
  height: 1.15em;
  margin-left: 4px;
  vertical-align: -0.18em;
  background: var(--green);
  animation: blink 1s steps(2, start) infinite;
}

.directory-shell {
  margin-bottom: 44px;
  padding: clamp(18px, 3vw, 30px);
}

.directory-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.55rem, 3vw, 2.5rem);
}

.search {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(100%, 360px);
  min-height: 46px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.32);
}

.search span {
  align-self: stretch;
  display: grid;
  min-width: 72px;
  place-items: center;
  border-right: 1px solid var(--line);
  color: var(--green);
  background: rgba(70, 255, 150, 0.06);
}

.search input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.search:focus-within {
  border-color: var(--line-strong);
  box-shadow: 0 0 30px rgba(70, 255, 150, 0.13);
}

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

.resource-card {
  display: flex;
  min-height: 260px;
  flex-direction: column;
  padding: 18px;
  border: 1px solid rgba(68, 255, 154, 0.18);
  background:
    linear-gradient(135deg, rgba(70, 255, 150, 0.06), transparent 38%),
    rgba(2, 10, 7, 0.76);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.resource-card:hover {
  transform: translateY(-3px);
  border-color: rgba(82, 216, 255, 0.58);
  background:
    linear-gradient(135deg, rgba(82, 216, 255, 0.09), transparent 42%),
    rgba(3, 15, 11, 0.92);
}

.card-topline,
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.card-topline {
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
}

.node-id {
  color: var(--cyan);
}

.state {
  color: var(--green);
}

.resource-card h3 {
  margin-bottom: 12px;
  color: var(--text);
  font-size: 1.08rem;
}

.resource-card p {
  margin-bottom: 24px;
  color: #a8c8bb;
  line-height: 1.55;
}

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

.actions a {
  max-width: 100%;
  padding: 9px 10px;
  overflow-wrap: anywhere;
  font-size: 0.78rem;
}

.empty-state {
  margin: 22px 0 0;
  color: var(--amber);
}

.site-footer {
  min-height: 72px;
  color: var(--muted);
  font-size: 0.82rem;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 72px;
  }

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

@media (max-width: 680px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 18px 0;
  }

  .identity-links {
    justify-content: flex-start;
  }

  .hero {
    gap: 22px;
    padding-top: 42px;
  }

  h1 {
    font-size: clamp(2.45rem, 15vw, 4.2rem);
  }

  .directory-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .search {
    width: 100%;
  }

  .resource-grid {
    grid-template-columns: 1fr;
  }

  .resource-card {
    min-height: 230px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
  }
}
