:root {
  color-scheme: dark;
  --bg: #08090b;
  --surface: #0f1114;
  --surface-alt: #171a1f;
  --inset: #050607;
  --line: #23272e;
  --line-strong: #464e5a;
  --silver-bright: #eef2f6;
  --silver: #cdd4dc;
  --silver-mid: #9aa3ae;
  --text: #edf0f4;
  --text-soft: #b3bac4;
  --text-dim: #858e99;
  --amber: #e2bc72;
  --font-sans: "Roboto", "Noto Sans", system-ui, -apple-system, sans-serif;
  --font-mono: "Fira Code", "JetBrains Mono", "DejaVu Sans Mono", ui-monospace, monospace;
}

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

html {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}

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

h1, h2, h3, p, dl, dd, figure {
  margin: 0;
}

a {
  color: var(--silver-bright);
  text-decoration: underline;
  text-decoration-color: var(--silver-mid);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

a:hover {
  color: #ffffff;
  text-decoration-color: var(--silver-bright);
}

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

::selection {
  background: var(--silver);
  color: var(--inset);
}

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  color: var(--silver-bright);
  background: var(--inset);
  border: 1px solid var(--line-strong);
  padding: 0.06em 0.34em;
  overflow-wrap: anywhere;
}

kbd {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8em;
  line-height: 1.25;
  color: var(--amber);
  background: var(--surface-alt);
  border: 1px solid var(--line-strong);
  padding: 0.1em 0.4em;
  white-space: nowrap;
}

.shell {
  width: 100%;
  max-width: 70rem;
  margin: 0 auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--silver-bright);
  color: var(--inset);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: 0.75rem;
}


/* --- Header --- */
.site-header {
  background: #0b0d10;
  border-top: 2px solid var(--silver-mid);
  border-bottom: 1px solid var(--line-strong);
}

.header-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  min-height: 4.25rem;
  padding-top: 0.8rem;
  padding-bottom: 0.8rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-mono);
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--silver-bright);
  text-decoration: none;
}

.wordmark:hover {
  color: #ffffff;
}

.wordmark-logo {
  display: block;
  width: 1.75rem;
  height: 1.75rem;
  flex: none;
}

.header-note {
  border-left: 1px solid var(--line-strong);
  padding-left: 1rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.site-nav {
  margin-left: auto;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  display: inline-block;
  padding: 0.25rem 0;
  border-bottom: 1px solid transparent;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-soft);
}

.site-nav a:hover {
  color: var(--silver-bright);
  border-bottom-color: var(--silver);
}

/* --- Hero --- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(18rem, 0.9fr);
  align-items: start;
  gap: 2.5rem;
  padding-top: 3.5rem;
  padding-bottom: 3.25rem;
  border-bottom: 1px solid var(--line);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(205, 212, 220, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(205, 212, 220, 0.055) 1px, transparent 1px);
  background-size: 2.75rem 2.75rem;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 85%);
  mask-image: linear-gradient(to bottom, #000 0%, transparent 85%);
}

.hero > * {
  position: relative;
}

.hero-copy {
  min-width: 0;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--silver);
}

.eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 2px;
  flex: none;
  background: var(--silver);
}

.hero h1 {
  max-width: 19ch;
  margin: 0.8rem 0 1.25rem;
  font-size: clamp(2.1rem, 4.4vw, 3.35rem);
  font-weight: 700;
  line-height: 1.13;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.lead {
  max-width: 62ch;
  font-size: 1.075rem;
  line-height: 1.7;
  color: var(--text-soft);
}

.lead strong {
  color: var(--text);
  font-weight: 600;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.65rem 1.15rem;
  border: 1px solid var(--line-strong);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-decoration: none;
  text-align: center;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.btn-primary {
  background: var(--silver);
  border-color: var(--silver-bright);
  color: var(--inset);
  font-weight: 700;
}

.btn-primary:hover {
  background: var(--silver-bright);
  border-color: #ffffff;
  color: var(--inset);
}

.btn-secondary {
  background: var(--surface);
  border-color: var(--silver-mid);
  color: var(--silver-bright);
}

.btn-secondary:hover {
  background: var(--surface-alt);
  border-color: var(--silver-bright);
  color: #ffffff;
}

/* --- System profile --- */
.profile {
  align-self: start;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-top: 2px solid var(--silver-bright);
}

.profile-emblem {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.65rem 1.5rem;
  background-color: var(--inset);
  background-image:
    linear-gradient(rgba(205, 212, 220, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(205, 212, 220, 0.055) 1px, transparent 1px);
  background-size: 1.5rem 1.5rem;
  border-bottom: 1px solid var(--line-strong);
}

.hero-logo {
  display: block;
  width: 12.75rem;
  max-width: 100%;
  height: auto;
}

.profile-body {
  padding: 1.25rem 1.5rem 1.35rem;
}

.panel-label {
  margin-bottom: 0.9rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--line-strong);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--silver);
}

.spec-row {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}

.spec-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.spec-row dt {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.spec-row dd {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--silver-bright);
}

/* --- Sections --- */
.section {
  padding-top: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--line);
}

.section h2 {
  font-size: 1.4rem;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-bottom: 0.4rem;
}

.section-index {
  margin-right: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--silver);
  white-space: nowrap;
}

.section-lede {
  max-width: 66ch;
  margin-bottom: 1.5rem;
  color: var(--text-dim);
  font-size: 0.95rem;
}

/* --- Feature grid --- */
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line-strong);
}

.card {
  background: var(--surface);
  border-top: 2px solid var(--silver-mid);
  padding: 1.5rem 1.6rem;
  transition: border-top-color 0.16s ease, background-color 0.16s ease;
}

.card:hover {
  border-top-color: var(--silver-bright);
  background: #13161b;
}

.card h3 {
  margin-bottom: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--silver-bright);
}

.card p {
  max-width: 58ch;
  font-size: 0.94rem;
  color: var(--text-soft);
}

/* --- Utilities table --- */
.table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-top: 2px solid var(--silver-mid);
}

.manifest {
  width: 100%;
  min-width: 34rem;
  border-collapse: collapse;
}

.manifest caption {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: left;
  color: var(--text-dim);
}

.manifest th,
.manifest td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.manifest thead th {
  background: var(--surface-alt);
  border-bottom-color: var(--line-strong);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--silver);
}

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

.manifest tbody tr:hover {
  background: rgba(205, 212, 220, 0.05);
}

.manifest td:first-child {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--silver-mid);
  white-space: nowrap;
}

.manifest td:last-child {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--amber);
  white-space: nowrap;
}

.hint {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-left: 2px solid var(--silver);
  background: var(--surface);
  font-size: 0.92rem;
  color: var(--text-soft);
}

/* --- Build and documentation --- */
.terminal {
  border: 1px solid var(--line-strong);
  border-top: 2px solid var(--silver-mid);
  background: var(--inset);
}

.terminal figcaption {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--silver);
}

.terminal figcaption::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  flex: none;
  background: var(--silver);
}

.terminal pre {
  margin: 0;
  padding: 1rem 1.2rem;
  overflow-x: auto;
}

.terminal code {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--silver-bright);
  font-size: 0.9rem;
  line-height: 1.7;
  white-space: pre;
}

.repo-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 1.25rem;
  padding: 1.4rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-left: 2px solid var(--silver);
}

.repo-box p {
  max-width: 62ch;
  color: var(--text-soft);
  font-size: 0.94rem;
}

.repo-box .btn {
  flex-shrink: 0;
}

/* --- Footer --- */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 1.5rem;
  padding-bottom: 2.5rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-dim);
}

.site-footer strong {
  color: var(--silver-bright);
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-top: 2.75rem;
  }

  .hero h1 {
    max-width: 26ch;
  }

  .profile {
    display: grid;
    grid-template-columns: 14rem minmax(0, 1fr);
  }

  .profile-emblem {
    border-bottom: 0;
    border-right: 1px solid var(--line-strong);
    padding: 1.25rem;
  }

  .hero-logo {
    width: 10.5rem;
  }
}

@media (max-width: 680px) {
  .shell {
    padding-left: 1.1rem;
    padding-right: 1.1rem;
  }

  .site-nav {
    margin-left: 0;
    width: 100%;
  }

  .site-nav ul {
    gap: 0.2rem 1.1rem;
  }

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

  .profile-emblem {
    border-right: 0;
    border-bottom: 1px solid var(--line-strong);
    padding: 1.35rem;
  }

  .hero-logo {
    width: 10rem;
  }

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

  .section {
    padding-top: 2.25rem;
    padding-bottom: 2.25rem;
  }

  .repo-box {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.1rem;
  }

  .repo-box .btn {
    width: 100%;
  }
}

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

@media (forced-colors: active) {
  .terminal figcaption::before {
    background: CanvasText;
  }

  .btn {
    border: 1px solid ButtonText;
  }
}

@media print {
  html,
  body {
    background: #fff;
    color: #000;
  }

  .skip-link,
  .hero::before,
  .terminal figcaption::before {
    display: none;
  }

  .profile-emblem {
    background: #fff;
  }

  a,
  code,
  kbd {
    color: #000;
  }

  .card,
  .profile,
  .table-wrap,
  .terminal,
  .repo-box {
    background: #fff;
  }
}
