:root {
  --bg: #010102;
  --bg-soft: #050506;
  --bg-panel: #09090c;
  --card: rgba(8, 8, 11, 0.94);
  --card-solid: #0b0b0f;
  --border: rgba(255, 255, 255, 0.055);

  --text: #e6e6ea;
  --muted: #85858d;
  --muted-dark: #5d5d66;

  --red: #9f1230;
  --red-bright: #c51632;
  --red-dark: #520914;
  --red-deep: #180205;

  --white-soft: #c9c9d0;
  --black: #010102;

  --shadow: 0 24px 90px rgba(0, 0, 0, 0.82);
  --glow-red: 0 0 22px rgba(159, 18, 48, 0.18);
  --radius: 22px;
}

/* Reset */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% 8%, rgba(159, 18, 48, 0.08), transparent 26%),
    radial-gradient(circle at 82% 0%, rgba(82, 9, 20, 0.08), transparent 28%),
    linear-gradient(135deg, #010102 0%, #030304 48%, #050203 100%);
}

/* Very dark atmospheric overlay */

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(1, 1, 2, 0.12), rgba(1, 1, 2, 0.96)),
    radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 0.58) 68%);
}

/* Extremely subtle background texture */

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.008) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.007) 1px, transparent 1px);
  background-size: 72px 72px;
  opacity: 0.12;
}

/* Base */

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

.page {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 64px;
  position: relative;
  z-index: 1;
}

/* Header */

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 14px 0 48px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-weight: 950;
  color: #fff;
  background:
    linear-gradient(135deg, var(--red-bright), var(--red-dark)),
    #08080a;
  box-shadow: var(--glow-red);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--muted);
  font-size: 0.95rem;
}

nav a {
  transition: color 0.18s ease;
}

nav a:hover {
  color: var(--red-bright);
}

/* Hero */

.hero {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 32px;
  align-items: center;
  min-height: 520px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid rgba(159, 18, 48, 0.22);
  border-radius: 999px;
  background: rgba(159, 18, 48, 0.055);
  color: var(--white-soft);
  font-size: 0.9rem;
  margin-bottom: 22px;
  box-shadow: 0 0 16px rgba(159, 18, 48, 0.08);
}

.pulse {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--red-bright);
  box-shadow: 0 0 10px rgba(197, 22, 50, 0.55);
}

h1 {
  font-size: clamp(3rem, 8vw, 6.5rem);
  line-height: 0.92;
  letter-spacing: -0.07em;
  margin-bottom: 24px;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
  letter-spacing: -0.045em;
}

h3 {
  letter-spacing: -0.02em;
}

.gradient-text {
  background: linear-gradient(
    135deg,
    #f0f0f2 0%,
    #b9b9c0 38%,
    var(--red-bright) 76%,
    var(--red-dark) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.subtitle {
  max-width: 680px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  margin-bottom: 32px;
}

/* Buttons */

.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 13px 18px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-weight: 800;
  transition: 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.9rem;
}

.button.primary {
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  box-shadow: 0 14px 32px rgba(159, 18, 48, 0.18);
}

.button.secondary {
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
}

.button:hover {
  transform: translateY(-2px);
  border-color: rgba(197, 22, 50, 0.34);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
}

/* Terminal / command panel */

.terminal-card {
  background:
    linear-gradient(180deg, rgba(10, 10, 14, 0.96), rgba(4, 4, 6, 0.98));
  border: 1px solid rgba(159, 18, 48, 0.16);
  border-radius: 14px;
  box-shadow: var(--shadow), 0 0 22px rgba(159, 18, 48, 0.04);
  overflow: hidden;
  backdrop-filter: blur(14px);
}

.terminal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  background:
    linear-gradient(180deg, #111116, #060608);
  border-bottom: 1px solid rgba(159, 18, 48, 0.14);
}

.terminal-title {
  color: var(--white-soft);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.terminal-button {
  width: 18px;
  height: 10px;
  border-radius: 2px;
  background: linear-gradient(180deg, #18181d, #070709);
  border: 1px solid rgba(255, 255, 255, 0.065);
}

.terminal-button:nth-child(3) {
  border-color: rgba(159, 18, 48, 0.32);
  background: linear-gradient(
    180deg,
    rgba(159, 18, 48, 0.22),
    rgba(82, 9, 20, 0.12)
  );
}

.terminal-body {
  padding: 22px;
  font-family: Consolas, "Liberation Mono", monospace;
  font-size: 0.92rem;
  color: #b8b8bf;
  background:
    linear-gradient(rgba(255, 255, 255, 0.012) 1px, transparent 1px),
    radial-gradient(circle at top left, rgba(159, 18, 48, 0.045), transparent 42%),
    #020203;
  background-size: 100% 28px, auto, auto;
}

.line {
  margin-bottom: 12px;
}

.prompt {
  color: var(--red-bright);
}

.cmd {
  color: #dedee4;
}

.comment {
  color: var(--muted-dark);
}

.success {
  color: var(--white-soft);
}

.pending {
  color: var(--red-bright);
}

/* Sections */

.section {
  margin-top: 84px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 24px;
}

.section-heading p {
  max-width: 520px;
  color: var(--muted);
}

/* Cards */

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

.card {
  background:
    linear-gradient(180deg, rgba(10, 10, 14, 0.94), rgba(4, 4, 6, 0.96));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(159, 18, 48, 0.035), transparent 34%),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.016), transparent 55%);
  opacity: 0.75;
}

.card > * {
  position: relative;
  z-index: 1;
}

.card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

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

.wide-card {
  grid-column: span 2;
}

.full-card {
  grid-column: 1 / -1;
}

/* Tags */

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.tag {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: #c7c7cd;
  background: rgba(255, 255, 255, 0.028);
  font-size: 0.82rem;
}

.success-tag {
  color: #d9d9df;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.pending-tag {
  color: #e9a8b3;
  border-color: rgba(159, 18, 48, 0.3);
  background: rgba(159, 18, 48, 0.075);
}

.info-tag {
  color: #c4c4ca;
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.035);
}

/* Links */

.project-link {
  display: inline-flex;
  margin-top: 18px;
  color: #e8e8ee;
  font-weight: 800;
  transition: color 0.18s ease;
}

.project-link:hover {
  color: var(--red-bright);
}

/* Status */

.status-list {
  display: grid;
  gap: 14px;
}

.status-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.status-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.status-item span:first-child {
  color: var(--muted);
}

.status-item span:last-child {
  font-weight: 800;
  text-align: right;
  color: var(--text);
}

/* Diagram */

.diagram {
  font-family: Consolas, "Liberation Mono", monospace;
  color: #d3d3d8;
  background:
    linear-gradient(180deg, rgba(5, 5, 7, 0.96), rgba(1, 1, 2, 0.98));
  border: 1px solid rgba(159, 18, 48, 0.16);
  border-radius: 14px;
  padding: 20px;
  overflow-x: auto;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Timeline */

.timeline {
  display: grid;
  gap: 16px;
}

.timeline-item {
  border-left: 2px solid rgba(159, 18, 48, 0.58);
  padding-left: 18px;
}

.timeline-item h3 {
  margin-bottom: 6px;
}

.timeline-item p {
  color: var(--muted);
}

/* Docs landing */

.docs-hero {
  padding: 32px 0 18px;
}

.docs-hero h1 {
  max-width: 900px;
  font-size: clamp(2.75rem, 7vw, 5.5rem);
}

.docs-list {
  display: grid;
  gap: 18px;
  margin-top: 32px;
}

.doc-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  background:
    linear-gradient(180deg, rgba(10, 10, 14, 0.94), rgba(4, 4, 6, 0.96));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.doc-card p {
  color: var(--muted);
  margin-top: 6px;
}

.doc-card:hover {
  border-color: rgba(159, 18, 48, 0.28);
  background: rgba(9, 9, 12, 0.98);
}

/* Tables */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-top: 16px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 580px;
}

th,
td {
  padding: 13px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  color: var(--text);
  background: rgba(159, 18, 48, 0.055);
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

td {
  color: var(--muted);
  font-size: 0.94rem;
}

tr:last-child td {
  border-bottom: none;
}

/* Footer */

footer {
  margin-top: 84px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 0.95rem;
}

/* Responsive */

@media (max-width: 860px) {
  header {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

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

  .wide-card {
    grid-column: span 1;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

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

@media (max-width: 560px) {
  .page {
    width: min(100% - 24px, 1120px);
    padding-top: 18px;
  }

  header {
    padding-bottom: 32px;
  }

  nav {
    gap: 12px;
    font-size: 0.88rem;
  }

  .buttons {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .card,
  .doc-card {
    padding: 20px;
  }

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