@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:ital,wght@0,400;0,500;0,700;1,400&display=swap");

:root {
  --bg: #06040a;
  --bg-panel: #100a16;
  --bg-panel-2: #1a1024;

  --border: #7c3aed;
  --border-soft: #5b21b6;

  --amber: #c026ff;
  --amber-bright: #e879f9;
  --amber-dim: #9333ea;

  --text: #f8f5ff;
  --text-dim: #cdb4f8;

  --green: #c026ff;
  --red: #ff5f87;

  --font-display: "Space Grotesk", sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  --radius: 3px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.55;
  position: relative;
  overflow-x: hidden;
}

/* ---------- ambient texture: scanlines + vignette + flicker ---------- */

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0px,
    rgba(0, 0, 0, 0) 2px,
    rgba(0, 0, 0, 0.18) 3px
  );
  mix-blend-mode: multiply;
  opacity: 0.5;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 51;
  background: radial-gradient(
    ellipse at center,
    rgba(0, 0, 0, 0) 55%,
    rgba(0, 0, 0, 0.55) 100%
  );
}

::selection {
  background: var(--amber);
  color: #1a1103;
}

a {
  color: var(--amber-bright);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--amber-bright);
  outline-offset: 2px;
}

/* ---------- skip link ---------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--amber);
  color: #1a1103;
  padding: 8px 14px;
  z-index: 100;
  font-weight: 700;
}
.skip-link:focus {
  left: 12px;
  top: 12px;
}

/* ---------- top bar: workspace switcher ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 20px;
  background: rgba(11, 9, 4, 0.92);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--amber-bright);
  font-size: 15px;
  text-shadow: 0 0 8px rgba(255, 176, 0, 0.35);
}
.brand span {
  color: var(--text-dim);
  font-weight: 500;
}

.workspaces {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.workspaces a {
  display: block;
  padding: 6px 14px;
  color: var(--text-dim);
  font-size: 13px;
  border-right: 1px solid var(--border);
  transition:
    background 0.15s,
    color 0.15s;
}
.workspaces li:last-child a {
  border-right: none;
}
.workspaces a:hover {
  background: var(--bg-panel-2);
  color: var(--amber-bright);
  text-decoration: none;
}
.workspaces a[aria-current="page"] {
  background: var(--amber-dim);
  color: #1a1103;
  font-weight: 700;
}

.status-cluster {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  color: var(--text-dim);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  display: inline-block;
  margin-right: 6px;
  box-shadow: 0 0 6px currentColor;
}
.dot.is-online {
  background: var(--green);
  color: var(--green);
}
.dot.is-offline {
  background: var(--red);
  color: var(--red);
}

/* ---------- layout shell ---------- */

main {
  max-width: 1040px;
  margin: 0 auto;
  padding: 36px 20px 60px;
}

.page-heading {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0 0 22px;
}
.page-heading::before {
  content: "# ";
  color: var(--amber-dim);
}

/* ---------- windows ---------- */

.window {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 22px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.window-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg-panel-2);
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--text-dim);
}

.window-titlebar .traffic {
  display: flex;
  gap: 6px;
  margin-right: 6px;
}
.window-titlebar .traffic i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border-soft);
  display: inline-block;
}
.window-titlebar .traffic i:nth-child(1) {
  background: #6b4a4a;
}
.window-titlebar .traffic i:nth-child(2) {
  background: #6b5f3f;
}
.window-titlebar .traffic i:nth-child(3) {
  background: #3f6b4a;
}

.window-body {
  padding: 20px;
}

/* ---------- hero / profile window ---------- */

.profile-window .window-body {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  align-items: center;
}

.avatar-ascii {
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.05;
  color: var(--amber);
  background: #0e0a05;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  white-space: pre;
  text-shadow: 0 0 6px rgba(255, 176, 0, 0.35);
}

.profile-name {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--amber-bright);
  text-shadow: 0 0 14px rgba(255, 176, 0, 0.25);
}
.profile-handle {
  color: var(--text-dim);
  font-size: 14px;
  margin-bottom: 10px;
}
.profile-tags {
  font-size: 18px;
  margin-bottom: 10px;
}
.profile-tagline {
  color: var(--text);
  margin: 0 0 16px;
  max-width: 46ch;
}

.btn-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 9px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--amber-dim);
  background: transparent;
  color: var(--amber-bright);
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s;
}
.btn:hover {
  background: var(--amber);
  color: #1a1103;
  text-decoration: none;
}
.btn.btn-primary {
  background: var(--amber);
  color: #1a1103;
}
.btn.btn-primary:hover {
  background: var(--amber-bright);
}

/* ---------- terminal / status.conf block ---------- */

.term-line {
  margin: 0 0 6px;
  color: var(--text-dim);
}
.term-line .prompt {
  color: var(--green);
}
.term-line .path {
  color: var(--amber-bright);
}
.term-line .cmd {
  color: var(--text);
}

.conf-grid {
  display: grid;
  grid-template-columns: 140px 1fr;
  row-gap: 10px;
  margin: 14px 0;
  font-size: 13.5px;
}
.conf-grid dt {
  color: var(--amber-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  align-self: start;
  padding-top: 2px;
}
.conf-grid dd {
  margin: 0;
  color: var(--text);
}

/* ---------- stream status ---------- */

.stream-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
@media (max-width: 620px) {
  .stream-grid {
    grid-template-columns: 1fr;
  }
}

.state-badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.05em;
  margin: 6px 0 2px;
}
.state-badge.offline {
  color: var(--red);
}
.state-badge.live {
  color: var(--green);
}

.stream-meta {
  font-size: 13px;
  color: var(--text-dim);
  margin: 2px 0;
}
.stream-meta strong {
  color: var(--text);
  font-weight: 500;
}

/* ---------- links window / network manager list ---------- */

.link-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.link-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border-soft);
}
.link-list li:last-child {
  border-bottom: none;
}

.sig-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
}
.sig-bars i {
  width: 3px;
  background: var(--amber-dim);
  display: block;
}
.sig-bars i:nth-child(1) {
  height: 4px;
}
.sig-bars i:nth-child(2) {
  height: 7px;
}
.sig-bars i:nth-child(3) {
  height: 10px;
}
.sig-bars i:nth-child(4) {
  height: 12px;
}
.link-list li:hover .sig-bars i {
  background: var(--amber-bright);
}

.link-list .link-name {
  color: var(--text);
  flex: 1;
}
.link-list .link-sub {
  color: var(--text-dim);
  font-size: 12px;
}

/* ---------- footer ---------- */

footer {
  max-width: 1040px;
  margin: 0 auto;
  padding: 10px 20px 40px;
  color: var(--text-dim);
  font-size: 12px;
  text-align: center;
}
footer .kbd {
  font-family: var(--font-mono);
  background: var(--bg-panel-2);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 6px;
  color: var(--amber-bright);
}

/* ---------- project cards (projects page) ---------- */

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.project-card {
  display: flex;
  flex-direction: column;
}
.project-card .window-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.project-tag {
  align-self: flex-start;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1a1103;
  background: var(--amber-dim);
  padding: 2px 8px;
  border-radius: 20px;
  margin-bottom: 10px;
}
.project-card h3 {
  font-family: var(--font-display);
  color: var(--amber-bright);
  margin: 0 0 8px;
  font-size: 17px;
}
.project-card p {
  color: var(--text-dim);
  font-size: 13.5px;
  flex: 1;
  margin: 0 0 14px;
}
.project-path {
  font-size: 12px;
  color: var(--text-dim);
  border-top: 1px dashed var(--border-soft);
  padding-top: 10px;
  margin-bottom: 10px;
}
.project-path .path {
  color: var(--amber);
}

/* ---------- misc ---------- */

.section-intro {
  color: var(--text-dim);
  margin: -10px 0 22px;
  max-width: 60ch;
}

@media (prefers-reduced-motion: reduce) {
  .cursor,
  .crt-flicker {
    animation: none;
  }
}

@media (max-width: 560px) {
  .profile-window .window-body {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .conf-grid {
    grid-template-columns: 110px 1fr;
  }
}

.profile-content {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.profile-avatar {
  flex-shrink: 0;
}

.profile-avatar img {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 14px;

  border: 2px solid var(--border);
  background: var(--bg-panel);

  image-rendering: auto;

  transition: 0.25s;
}

.profile-avatar img:hover {
  transform: scale(1.03);
}

.profile-info {
  flex: 1;
  min-width: 260px;
}

.mt-12 {
  margin-top: 12px;
}
