:root {
  color-scheme: dark;

  --bg: #050706;
  --panel: #090d0b;
  --panel-2: #0d1310;
  --panel-3: #111813;

  --text: #b7f7c6;
  --text-strong: #d9ffe2;
  --muted: #6f8f78;
  --dim: #3d5544;

  --line: #183322;
  --line-strong: #245737;

  --green: #59ff8a;
  --cyan: #63e6ff;
  --amber: #e4c76b;
  --red: #ff6b79;

  --shadow: 0 0 0 1px rgba(89,255,138,.02),
            0 10px 28px rgba(0,0,0,.28);

  --font-ui: "scientifica", "ScientificA", "Cozette", "Cascadia Mono",
             "Consolas", "Lucida Console", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-ui);
  font-size: 12px;
  line-height: 1.45;
  letter-spacing: .01em;
  background:
    linear-gradient(rgba(89,255,138,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(89,255,138,.012) 1px, transparent 1px),
    radial-gradient(circle at 75% 0%, rgba(99,230,255,.045), transparent 26rem),
    var(--bg);
  background-size: 100% 24px, 24px 100%, auto, auto;
  color: var(--text);
}

body::before {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  opacity: .08;
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 2px,
      rgba(255,255,255,.02) 3px
    );
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

.wrap {
  width: min(1080px, calc(100% - 28px));
  margin: 0 auto;
}

/* header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(5,7,6,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-mark {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: #07100a;
  color: var(--green);
  box-shadow: inset 0 0 12px rgba(89,255,138,.035);
  font-weight: 700;
}

.brand strong {
  display: block;
  color: var(--text-strong);
  font-size: 12px;
  font-weight: 500;
}

.brand small {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 9px;
}

.icon-button {
  appearance: none;
  width: 30px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #080c09;
  color: var(--green);
  cursor: pointer;
}

.icon-button:hover {
  border-color: var(--line-strong);
  background: var(--panel-2);
}

/* hero */

.hero {
  padding: 48px 0 30px;
  max-width: 820px;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--green);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .18em;
}

.eyebrow::before {
  content: "[";
  color: var(--dim);
}

.eyebrow::after {
  content: "]";
  color: var(--dim);
}

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

h1 {
  margin-bottom: 12px;
  color: var(--text-strong);
  font-size: clamp(24px, 5vw, 42px);
  line-height: 1.02;
  letter-spacing: -.035em;
  font-weight: 500;
}

.hero-copy {
  max-width: 680px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.hero-copy::before {
  content: "> ";
  color: var(--green);
}

/* controls */

.controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 165px;
  gap: 7px;
}

.search {
  height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #070a08;
}

.search:focus-within {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 1px rgba(89,255,138,.06);
}

.search > span:not(.sr-only) {
  color: var(--green);
}

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

.search input::placeholder {
  color: #45604c;
}

select {
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0 9px;
  background: #070a08;
  color: var(--text);
  font-size: 10px;
}

.tag-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
}

.filter-chip {
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 4px 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 9px;
  text-transform: lowercase;
}

.filter-chip::before {
  content: "#";
  color: var(--dim);
}

.filter-chip:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.filter-chip.active {
  border-color: #2c6740;
  background: #0a160e;
  color: var(--green);
}

/* section */

.projects-section {
  padding: 8px 0 56px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--line);
}

.section-heading h2 {
  margin: 0;
  color: var(--text-strong);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0;
}

.count {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
}

/* cards */

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.project-card {
  position: relative;
  min-height: 220px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background:
    linear-gradient(180deg, rgba(89,255,138,.018), transparent 50%),
    var(--panel);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.project-card::after {
  content: "";
  position: absolute;
  top: -1px;
  left: 14px;
  width: 34px;
  height: 1px;
  background: var(--green);
  opacity: .7;
}

.project-card:hover {
  border-color: var(--line-strong);
  background:
    linear-gradient(180deg, rgba(89,255,138,.028), transparent 52%),
    var(--panel);
}

.project-card.featured {
  border-color: #21472d;
}

.card-topline {
  min-height: 18px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.status,
.featured-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.status-dot {
  width: 5px;
  height: 5px;
  border-radius: 1px;
  background: #607064;
}

.status-active .status-dot {
  background: var(--green);
  box-shadow: 0 0 7px rgba(89,255,138,.35);
}

.status-stable .status-dot {
  background: var(--cyan);
}

.status-experimental .status-dot {
  background: var(--amber);
}

.status-paused .status-dot {
  background: #687269;
}

.featured-label {
  color: var(--green);
}

.project-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  margin: 13px 0 10px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #070b08;
  color: var(--cyan);
  font-size: 13px;
}

.project-card h3 {
  margin-bottom: 5px;
  color: var(--text-strong);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -.01em;
}

.project-card > p {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 16px;
}

.tag {
  padding: 3px 5px;
  border: 1px solid #14291c;
  border-radius: 2px;
  background: #071009;
  color: #70947a;
  font-size: 8px;
}

.tag::before {
  content: ".";
  color: var(--green);
}

.card-footer {
  margin-top: auto;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
}

.updated {
  color: #4b6753;
  font-size: 8px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 25px;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 2px;
  text-decoration: none;
  font-size: 9px;
  font-weight: 500;
  cursor: pointer;
}

.button::before {
  content: "[";
  color: var(--dim);
}

.button::after {
  content: "]";
  color: var(--dim);
}

.button.primary {
  border-color: #275d39;
  background: #0b1a10;
  color: var(--green);
}

.button.secondary {
  background: #080c09;
  color: var(--text);
}

.button:hover {
  border-color: var(--line-strong);
  color: var(--cyan);
}

/* empty state/footer */

.empty-state {
  padding: 36px 16px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 3px;
  color: var(--muted);
}

.empty-state h3 {
  color: var(--text-strong);
  font-size: 13px;
  font-weight: 500;
}

.site-footer {
  min-height: 58px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 8px;
}

.site-footer::before {
  content: "root@projects:~$";
  color: var(--green);
}

code {
  padding: 1px 4px;
  border: 1px solid #14291c;
  border-radius: 2px;
  background: #071009;
  color: var(--cyan);
  font-family: inherit;
  font-size: 8px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 760px) {
  body {
    font-size: 11px;
  }

  .hero {
    padding-top: 38px;
  }

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

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

@media (max-width: 480px) {
  .brand small {
    display: none;
  }

  .project-card {
    min-height: 0;
  }

  .card-footer {
    align-items: flex-start;
    flex-direction: column;
  }

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