:root {
  --bg: #07090d;
  --bezel: #0b0f14;
  --panel: #10161d;
  --panel-2: #151c25;
  --line: #2a3542;
  --text: #e6edf3;
  --muted: #8b98a6;
  --amber: #d7b36a;
  --green: #4ade97;
  --cyan: #7dd3fc;
  --mono: "IBM Plex Mono", "ui-monospace", "SFMono-Regular", Menlo, Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--mono);
  color: var(--text);
  background:
    radial-gradient(1200px 520px at 12% -10%, #152033 0%, transparent 55%),
    linear-gradient(180deg, #0a0e13 0%, var(--bg) 100%);
  letter-spacing: 0.01em;
}

a {
  color: var(--green);
}

.scanlines,
.vignette {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 8;
}

.scanlines {
  opacity: 0.35;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.012) 0,
    rgba(255, 255, 255, 0.012) 1px,
    transparent 2px,
    transparent 4px
  );
}

.vignette {
  background: radial-gradient(ellipse at center, transparent 62%, rgba(0, 0, 0, 0.28) 100%);
}

.bezel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: none;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  padding: 10px 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.bezel.narrow {
  min-height: 100vh;
}

.mast {
  display: flex;
  justify-content: space-between;
  gap: 16px 24px;
  align-items: center;
  padding: 16px 18px;
  background: rgba(16, 22, 29, 0.92);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.mast-left {
  display: flex;
  gap: 14px;
  align-items: center;
  min-width: 0;
}

.mark {
  width: 38px;
  height: 38px;
  color: var(--amber);
  flex: none;
}

.kicker,
dt,
.chip,
.github-link-kicker,
.foot {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.68rem;
  color: var(--muted);
}

h1,
h2 {
  margin: 0;
  font-weight: 600;
}

h1 {
  font-size: clamp(1.4rem, 1.6vw, 1.9rem);
}

h1 span,
h2 {
  color: var(--amber);
}

h2 {
  font-size: 0.86rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.mast-status {
  display: grid;
  grid-template-columns: repeat(4, auto);
  gap: 16px 28px;
  margin: 0;
}

.mast-status div,
.spec div {
  margin: 0;
}

dd {
  margin: 4px 0 0;
  font-size: 0.95rem;
}

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

.live {
  display: flex;
  align-items: center;
  gap: 8px;
}

.led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 2.4s ease-in-out infinite;
}

.desk {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto auto auto;
  gap: 10px;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  align-items: stretch;
}

.panel {
  background: rgba(16, 22, 29, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px 18px;
  min-width: 0;
}

.identity,
.scope,
.channels {
  display: flex;
  flex-direction: column;
}

.identity .spec,
.scope .scope-grid,
.channels .channel-stack {
  flex: 1;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.chip {
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--cyan);
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.chip.idle {
  color: var(--amber);
}

.spec {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 18px;
  margin: 0 0 14px;
}

.note {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.86rem;
}

.note.tight {
  margin-bottom: 14px;
}

.scope-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.scope-grid li {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
}

.scope-grid strong {
  display: block;
  color: var(--amber);
  margin-bottom: 6px;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.scope-grid span {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.channel-stack {
  display: grid;
  gap: 10px;
}

.github-link {
  display: grid;
  gap: 4px;
  text-decoration: none;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid #355043;
  background: linear-gradient(180deg, #16241c, #101a14);
}

.discord-link {
  border-color: #3d4a78;
  background: linear-gradient(180deg, #1a2036, #121628);
}

.discord-link .github-link-url {
  color: #9db0ff;
}

.mail-link {
  border-color: #5a4a2e;
  background: linear-gradient(180deg, #241c12, #18140e);
}

.mail-link .github-link-url {
  color: var(--amber);
}

.channel-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.channel-brand img {
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 4px;
}

.channel-brand > span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.github-link:hover,
.github-link:focus-visible {
  border-color: var(--green);
  outline: none;
}

.github-link-handle {
  color: var(--text);
  font-size: 1.15rem;
}

.github-link-url {
  color: var(--green);
  font-size: 0.82rem;
}

.github-link.compact {
  display: inline-grid;
  margin-top: 12px;
  color: var(--green);
}

.channel-negatives {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.channel-negatives li {
  padding: 6px 0;
  border-bottom: 1px dashed var(--line);
}

.bio,
.tools,
.log,
.capabilities {
  grid-column: 1 / -1;
}

.tool-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.tool-card {
  display: grid;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  padding: 16px 18px;
  border: 1px solid #355043;
  border-radius: 8px;
  background: linear-gradient(180deg, #16241c, #101a14);
}

.tool-card:hover,
.tool-card:focus-visible {
  border-color: var(--green);
  outline: none;
}

.tool-kicker,
.tool-url {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.68rem;
  color: var(--muted);
}

.tool-card strong {
  color: var(--amber);
  font-size: 1.05rem;
}

.tool-card span {
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.85rem;
}

.tool-url {
  color: var(--green);
  text-transform: none;
  letter-spacing: 0;
}

.bio-lead {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 1.02rem;
  line-height: 1.7;
  max-width: none;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

th,
td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
}

th {
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.68rem;
}

.empty {
  text-align: center;
  color: var(--muted);
  padding: 42px 12px !important;
}

.empty strong {
  display: block;
  color: var(--amber);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.caps {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.caps li {
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  border-radius: 6px;
  font-size: 0.8rem;
}

.foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0;
  padding: 6px 4px 2px;
}

.foot p {
  margin: 0;
}

.missing {
  min-height: 180px;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

@media (min-width: 901px) {
  .bezel {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
  }
}

@media (max-width: 1100px) {
  .mast {
    display: grid;
  }

  .mast-status {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .bezel {
    height: auto;
    overflow: visible;
  }

  .desk {
    grid-template-rows: none;
  }

  .desk,
  .mast-status,
  .scope-grid,
  .spec,
  .tool-grid {
    grid-template-columns: 1fr;
  }

  .mast-status {
    grid-template-columns: 1fr 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .led {
    animation: none;
  }

  .scanlines {
    display: none;
  }
}
