/* proctop project website — dependency-free, self-contained. */

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

:root {
  color-scheme: dark;
  --bg: #0b0e13;
  --panel: #12171f;
  --panel-2: #0f1419;
  --line: #232b36;
  --ink: #e6edf3;
  --muted: #8b98a8;
  --cpu: #3ddc97;
  --mem: #6cb6ff;
  --peak: #ffb454;
  --accent: #3ddc97;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Consolas, "Liberation Mono", monospace;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  background-image:
    radial-gradient(900px 420px at 78% -8%, rgba(61, 220, 151, 0.10), transparent 62%),
    radial-gradient(700px 380px at 8% 4%, rgba(108, 182, 255, 0.07), transparent 60%);
  background-repeat: no-repeat;
}

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
}

code, pre, .mono {
  font-family: var(--mono);
}

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

/* ---------- top bar ---------- */

/* Namespaced on purpose: the shared site navbar injected by ubunatic.com's
   `make inject-nav` defines a bare `.topbar` rule inside the page body, which
   would otherwise win over anything we set here. */
.site-head {
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: 1px solid var(--line);
  background: rgba(11, 14, 19, 0.86);
  backdrop-filter: blur(12px);
}

.nav {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 760;
  text-decoration: none;
}

.brand-icon {
  width: 26px;
  height: 26px;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 0.94rem;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--ink);
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  font-weight: 640;
  text-decoration: none;
}

.btn:hover {
  border-color: rgba(61, 220, 151, 0.5);
}

.btn-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #06231a;
}

/* ---------- hero ---------- */

.hero-shell {
  padding: 46px 0 26px;
}

.hero-badge {
  display: inline-block;
  margin: 0 0 16px;
  padding: 4px 12px;
  border: 1px solid rgba(61, 220, 151, 0.35);
  border-radius: 999px;
  background: rgba(61, 220, 151, 0.08);
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  max-width: 18ch;
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
}

h1 .name {
  font-family: var(--mono);
  color: var(--accent);
}

.lede {
  max-width: 62ch;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(1.02rem, 1.6vw, 1.2rem);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

/* ---------- terminal ---------- */

.terminal {
  margin-top: 40px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  box-shadow: var(--shadow);
}

.terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  font-size: 0.8rem;
}

.terminal-controls {
  display: flex;
  gap: 7px;
}

.term-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: block;
}

.dot-red    { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green  { background: #28c840; }

.terminal-title {
  font-family: var(--mono);
}

.terminal-body {
  margin: 0;
  padding: 18px;
  overflow-x: auto;
  color: var(--ink);
  font-size: clamp(0.52rem, 1.02vw, 0.8rem);
  line-height: 1.32;
  white-space: pre;
  tab-size: 4;
}

.t-head  { color: var(--muted); }
.t-cpu   { color: var(--cpu); }
.t-mem   { color: var(--mem); }
.t-label { color: var(--peak); font-weight: 700; }
.t-cur   { color: var(--peak); }
.t-note  { color: var(--muted); }
.t-dim   { color: var(--muted); }

.caption {
  margin: 12px 2px 0;
  color: var(--muted);
  font-size: 0.86rem;
}

/* ---------- sections ---------- */

main > section {
  padding: 74px 0;
  border-top: 1px solid var(--line);
}

.section-head {
  max-width: 68ch;
  margin-bottom: 34px;
}

.section-title {
  margin: 0 0 12px;
  font-size: clamp(1.7rem, 3.6vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
}

.section-title span {
  color: var(--accent);
}

.section-desc {
  margin: 0;
  color: var(--muted);
  font-size: 1.04rem;
}

/* ---------- cards ---------- */

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

.card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}

.card h3 {
  margin: 0 0 8px;
  font-size: 1.04rem;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.card-icon {
  margin-bottom: 12px;
  font-size: 1.5rem;
}

/* ---------- tables ---------- */

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}

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

th, td {
  padding: 11px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

tbody tr:last-child td {
  border-bottom: 0;
}

td code {
  color: var(--accent);
  white-space: nowrap;
}

/* ---------- keys ---------- */

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

.key {
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  font-size: 0.9rem;
}

.key b {
  font-family: var(--mono);
  color: var(--accent);
  font-weight: 700;
}

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

/* ---------- code panel ---------- */

.code-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
}

.code-body {
  margin: 0;
  padding: 18px;
  overflow-x: auto;
  font-size: 0.88rem;
  line-height: 1.75;
  white-space: pre;
}

.c-prompt  { color: var(--accent); }
.c-flag    { color: var(--mem); }
.c-comment { color: var(--muted); }

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

footer {
  padding: 34px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  justify-content: space-between;
}

footer p {
  margin: 0;
}

/* ---------- responsive ---------- */

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

@media (max-width: 620px) {
  .nav {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 0;
  }

  .terminal-body {
    font-size: 0.42rem;
  }
}
