:root {
  color-scheme: dark;
  --bg: #000;
  --fg: #f5f5f5;
  --muted: #949494;
  --line: #303030;
  --panel: #070707;
  --danger: #ff6b6b;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--fg);
  font-family: "Courier New", Courier, monospace;
  font-size: 16px;
  letter-spacing: 0;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
}

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

a:hover,
button:hover {
  background: var(--fg);
  color: var(--bg);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 42px;
  padding: 0.5rem clamp(1rem, 4vw, 2rem);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.brand {
  font-weight: 700;
}

nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-tab,
button {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--fg);
  font: inherit;
  cursor: pointer;
}

.nav-tab.active {
  background: var(--fg);
  color: var(--bg);
}

.wrap {
  width: min(920px, calc(100vw - 2rem));
  margin: 0 auto;
  padding: clamp(1.25rem, 5vw, 3rem) 0;
}

.terminal-window {
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
}

.terminal-top {
  display: flex;
  gap: 0.45rem;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--line);
}

.terminal-top span {
  width: 0.55rem;
  height: 0.55rem;
  border: 1px solid var(--muted);
}

.terminal-body {
  padding: clamp(1rem, 4vw, 1.5rem);
}

.prompt {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.terminal-title {
  margin: 0 0 1.5rem;
  font-size: clamp(1.35rem, 5vw, 2rem);
  line-height: 1.05;
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0 0 1rem;
  font-weight: 700;
  line-height: 1.1;
}

h2 {
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
  font-size: 1.1rem;
}

h3 {
  font-size: 1rem;
  text-transform: uppercase;
}

.project-group {
  margin: 0 0 1.4rem;
  padding-left: 1rem;
  border-left: 2px solid var(--fg);
}

.project-group:last-child {
  margin-bottom: 0;
}

ul {
  display: grid;
  gap: 0.85rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.project-line {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
}

.project-entry {
  display: grid;
  gap: 0.22rem;
  min-width: 0;
}

.project-title {
  display: block;
  color: var(--fg);
}

.build-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.28rem;
  color: var(--fg);
  font-size: 0.82rem;
}

.dash,
.muted,
.description {
  color: var(--muted);
}

.description::before {
  content: ":: ";
}

.description {
  display: block;
  max-width: 72ch;
  line-height: 1.35;
}

.admin-wrap {
  width: min(1100px, calc(100vw - 2rem));
}

.panel {
  margin: 0 0 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  background: var(--panel);
}

.admin-login {
  width: min(420px, 100%);
  margin: 0 auto;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  align-items: end;
}

.item-form {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--line);
}

label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.78rem;
}

input,
textarea {
  width: 100%;
  min-height: 34px;
  padding: 0.45rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #000;
  color: var(--fg);
  font: inherit;
}

textarea {
  resize: vertical;
}

.wide {
  grid-column: span 2;
}

.check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 34px;
}

.check input {
  width: auto;
  min-height: 0;
}

.button-row,
.inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.button-row {
  margin: 0.75rem 0 1rem;
}

.notice,
.alert {
  padding: 0.75rem;
  border: 1px solid var(--line);
}

.alert {
  color: var(--danger);
}

.new-item {
  margin-top: 1rem;
}

summary {
  cursor: pointer;
  color: var(--fg);
}

@media (max-width: 760px) {
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .wide {
    grid-column: auto;
  }

  .site-header {
    min-height: 38px;
  }
}

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