/* Basalt Ops — premium dark design system */

:root {
  --bg: #0B1220;
  --panel: #121A2B;
  --panel-2: #182234;
  --border: #243049;
  --text: #E8EEF9;
  --muted: #A8B4CE;
  --accent: #2DD4BF;
  --accent-2: #38BDF8;
  --warn: #FBBF24;
  --danger: #FB7185;
  --ok: #34D399;

  --radius: 12px;
  --radius-sm: 8px;
  --radius-pill: 999px;
  --sidebar: 260px;
  --topbar: 56px;
  --shadow: 0 10px 30px rgba(2, 6, 16, 0.45);
  --shadow-soft: 0 4px 16px rgba(2, 6, 16, 0.28);
  --ring: 0 0 0 3px rgba(45, 212, 191, 0.28);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
}

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

html {
  scrollbar-width: thin;
  scrollbar-color: #3a4d6d transparent;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-thumb {
  background: #334766;
  border-radius: 99px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

a {
  color: var(--accent-2);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  display: block;
}

[hidden],
.empty[hidden],
.is-hidden {
  display: none !important;
}

/* Layout */

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  grid-template-rows: var(--topbar) minmax(0, 1fr);
  grid-template-areas:
    "sidebar topbar"
    "sidebar main";
  min-height: 100vh;
  min-width: 0;
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(56, 189, 248, 0.08), transparent 55%),
    radial-gradient(900px 420px at 0% 100%, rgba(45, 212, 191, 0.06), transparent 50%),
    var(--bg);
}

.sidebar {
  grid-area: sidebar;
  width: var(--sidebar);
  background: var(--panel);
  border-right: 1px solid var(--border);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
}

.topbar {
  grid-area: topbar;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 0 var(--space-5);
  background: rgba(18, 26, 43, 0.86);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: var(--topbar);
  min-width: 0;
}

.topbar h1,
.topbar .h1,
.topbar .page-title {
  font-size: 16px;
  line-height: 1.25;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.main {
  grid-area: main;
  min-width: 0;
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.sidebar-backdrop {
  display: none;
}

.nav-toggle {
  display: none;
}

/* Surfaces */

.panel,
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.panel {
  padding: var(--space-5);
  border-color: #2c3c58;
  box-shadow:
    inset 0 1px 0 rgba(45, 212, 191, 0.08),
    var(--shadow-soft);
}

.card {
  padding: var(--space-4);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 42%), var(--panel);
  border-color: #223049;
}

.panel-2,
.card.inset {
  background: var(--panel-2);
  border-color: #2a3a55;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  gap: var(--space-5);
  align-items: start;
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--space-5);
}

.grid > .span-3 { grid-column: span 3; }
.grid > .span-4 { grid-column: span 4; }
.grid > .span-6 { grid-column: span 6; }
.grid > .span-8 { grid-column: span 8; }
.grid > .span-12 { grid-column: span 12; }

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(420px, 100vw);
  background: var(--panel);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: var(--space-5);
  transform: translateX(104%);
  transition: transform 180ms ease;
  z-index: 40;
  overflow: auto;
}

.drawer.open,
.drawer.is-open {
  transform: translateX(0);
}

.pdf-preview {
  min-height: 220px;
  width: 100%;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(56, 189, 248, 0.05), transparent 36%),
    var(--panel-2);
  box-shadow: var(--shadow-soft);
  overflow: auto;
  padding: var(--space-3);
}

.pdf-preview canvas,
.pdf-preview iframe,
.pdf-preview embed,
.pdf-preview object {
  display: block;
  max-width: 100%;
  margin: 0 auto;
  background: #f4f7fb;
  border-radius: var(--radius-sm);
}

/* Type */

h1, h2, h3, h4, .h1, .h2, .h3 {
  margin: 0;
  letter-spacing: -0.02em;
  font-weight: 640;
  color: var(--text);
}

h1, .h1 { font-size: 26px; line-height: 1.2; font-weight: 680; }
h2, .h2 { font-size: 18px; line-height: 1.3; font-weight: 640; }
h3, .h3 { font-size: 15px; line-height: 1.35; font-weight: 600; color: #d5deef; }

.muted,
.help {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.kicker {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8e9db8;
  font-weight: 600;
}

.mono {
  font-family: var(--mono);
  font-size: 12px;
}

/* Controls */

.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 34px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease, filter 180ms ease;
  white-space: nowrap;
}

.btn:hover {
  border-color: #334766;
  background: #1d2940;
}

.btn:active {
  transform: translateY(1px);
}

.btn:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(180deg, #3ee0cc, var(--accent));
  color: #06221e;
  border-color: transparent;
  font-weight: 650;
}

.btn-primary:hover {
  filter: brightness(1.05);
  border-color: transparent;
}

.btn-ghost {
  background: transparent;
  box-shadow: none;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.04);
}

.toolbar,
.actions,
.tool-actions,
.row-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  min-width: 0;
}

.chip,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 8px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 560;
  white-space: nowrap;
}

.badge.ok,
.chip.ok { color: var(--ok); border-color: rgba(52, 211, 153, 0.35); background: rgba(52, 211, 153, 0.1); }
.badge.warn,
.chip.warn { color: var(--warn); border-color: rgba(251, 191, 36, 0.35); background: rgba(251, 191, 36, 0.1); }
.badge.danger,
.chip.danger { color: var(--danger); border-color: rgba(251, 113, 133, 0.4); background: rgba(251, 113, 133, 0.1); }
.badge.accent,
.chip.accent { color: var(--accent); border-color: rgba(45, 212, 191, 0.35); background: rgba(45, 212, 191, 0.1); }

/* Data */

.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.table th,
.table td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.table th {
  color: #8e9db8;
  font-size: 12px;
  font-weight: 600;
  background: var(--panel-2);
}

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

.table tbody tr:hover td {
  background: rgba(56, 189, 248, 0.04);
}

.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.list-row + .list-row {
  margin-top: 8px;
}

.list-row:hover {
  border-color: #334766;
}

/* States */

.skeleton {
  display: block;
  height: 12px;
  border-radius: 8px;
  background: linear-gradient(90deg, #182234 0%, #243049 45%, #182234 100%);
  background-size: 200% 100%;
  animation: basalt-shimmer 1.3s ease infinite;
}

.skeleton.lg { height: 18px; width: 42%; }
.skeleton.md { width: 70%; }
.skeleton.sm { width: 36%; height: 10px; }

@keyframes basalt-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  padding: 36px 16px;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: rgba(18, 26, 43, 0.55);
}

.empty strong {
  color: var(--text);
  font-weight: 620;
}

.error-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid rgba(251, 113, 133, 0.45);
  background: rgba(251, 113, 133, 0.1);
  color: #fecdd6;
  box-shadow: var(--shadow-soft);
}

/* Sidebar nav pieces */

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 14px;
  font-weight: 680;
  letter-spacing: -0.02em;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  text-decoration: none;
}

.nav-item:hover,
.nav-item.active {
  background: var(--panel-2);
  color: var(--text);
  text-decoration: none;
}

.nav-item.active {
  box-shadow: inset 2px 0 0 var(--accent);
}

/* Utilities */

.flex { display: flex; }
.inline-flex { display: inline-flex; }
.col { flex-direction: column; }
.wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.grow { flex: 1 1 auto; }
.min-0 { min-width: 0; }

.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }

.m-0 { margin: 0; }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }

.p-0 { padding: 0; }
.p-3 { padding: var(--space-3); }
.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }
.px-3 { padding-left: var(--space-3); padding-right: var(--space-3); }
.py-2 { padding-top: var(--space-2); padding-bottom: var(--space-2); }

.w-full { width: 100%; }
.text-right { text-align: right; }
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

/* Responsive */

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "topbar"
      "main";
    overflow-x: hidden;
    max-width: 100%;
  }

  .sidebar {
    position: fixed;
    z-index: 50;
    transform: translateX(-104%);
    transition: transform 180ms ease;
    box-shadow: var(--shadow);
  }

  .app-shell.sidebar-open .sidebar,
  .sidebar-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-open .sidebar-backdrop,
  .app-shell.sidebar-open .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(5, 8, 16, 0.55);
    z-index: 45;
  }

  .nav-toggle {
    display: inline-flex;
    flex: 0 0 auto;
  }

  .main {
    padding: var(--space-4);
    overflow-x: hidden;
    max-width: 100%;
  }

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

  .grid > .span-3,
  .grid > .span-4,
  .grid > .span-6,
  .grid > .span-8,
  .grid > .span-12 {
    grid-column: auto;
  }

  .app-shell {
    grid-template-rows: auto minmax(0, 1fr);
  }

  .topbar {
    padding: 8px var(--space-3) 12px;
    flex-wrap: wrap;
    align-items: center;
    row-gap: 8px;
    height: auto;
    min-height: var(--topbar);
    overflow: visible;
  }

  .topbar .btn {
    height: 32px;
    padding: 0 10px;
    font-size: 13px;
  }

  .toolbar,
  .actions,
  .tool-actions,
  .row-actions,
  .topbar .flex,
  .topbar .inline-flex {
    flex-wrap: wrap;
  }

  .table {
    display: block;
    overflow-x: auto;
    max-width: 100%;
  }

  .main .chip,
  .main .badge {
    white-space: normal;
    height: auto;
    min-height: 24px;
    max-width: 100%;
    align-items: flex-start;
    line-height: 1.35;
    padding-top: 4px;
    padding-bottom: 4px;
  }

  .main .inline-flex.wrap,
  .main .flex.wrap {
    min-width: 0;
    max-width: 100%;
  }
}

@media (max-width: 420px) {
  html,
  body {
    overflow-x: hidden;
  }

  .app-shell,
  .main {
    overflow-x: hidden;
    max-width: 100vw;
  }

  .main {
    padding: 20px var(--space-3) var(--space-3);
    gap: var(--space-4);
  }

  .main .muted,
  .main .help {
    font-size: 12.5px;
    line-height: 1.4;
  }

  .app-shell {
    grid-template-rows: auto minmax(0, 1fr);
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 10px 10px 14px;
    gap: 8px;
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .topbar > * {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .main {
    padding-top: 20px;
  }

  .topbar h1,
  .topbar .h1,
  .topbar .page-title {
    font-size: 15px;
    flex: 1 1 auto;
  }

  .topbar .btn,
  .toolbar .btn,
  .actions .btn,
  .tool-actions .btn {
    height: 30px;
    padding: 0 8px;
    font-size: 12px;
    gap: 4px;
    letter-spacing: 0;
  }

  .toolbar,
  .actions,
  .tool-actions,
  .row-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar .btn,
  .actions .btn,
  .tool-actions .btn {
    width: 100%;
    justify-content: center;
  }

  h1, .h1 { font-size: 22px; }

  .list-row {
    flex-direction: column;
    align-items: stretch;
  }

  .panel,
  .card {
    padding: var(--space-3);
  }

  .pdf-preview {
    min-height: 220px;
    padding: var(--space-2);
  }

  .main .chip,
  .main .badge {
    white-space: normal;
    height: auto;
    min-height: 24px;
    max-width: 100%;
    align-items: flex-start;
    line-height: 1.35;
    padding-top: 4px;
    padding-bottom: 4px;
  }

  .main .inline-flex.wrap,
  .main .flex.wrap {
    min-width: 0;
    max-width: 100%;
  }
}


/* Landing */

.landing {
  background:
    radial-gradient(900px 480px at 88% -8%, rgba(56, 189, 248, 0.16), transparent 58%),
    radial-gradient(720px 420px at -10% 8%, rgba(45, 212, 191, 0.14), transparent 52%),
    var(--bg);
  min-height: 100vh;
}

.landing-wash {
  pointer-events: none;
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(36, 48, 73, 0.45) 1px, transparent 1px),
    linear-gradient(90deg, rgba(36, 48, 73, 0.45) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 20%, transparent 72%);
  opacity: 0.35;
  z-index: 0;
}

.landing-nav,
.landing main,
.landing-foot {
  position: relative;
  z-index: 1;
}

.landing-nav {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 28px;
}

.landing-brand {
  color: var(--text);
  text-decoration: none;
  font-weight: 680;
}

.landing-brand:hover {
  text-decoration: none;
  color: var(--text);
}

.landing-links {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
}

.landing-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 560;
}

.landing-links a:hover {
  color: var(--text);
  text-decoration: none;
}

.landing-links a:focus-visible,
.landing-brand:focus-visible,
.project-card a:focus-visible,
.hero-actions a:focus-visible,
.landing-notes a:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: 8px;
}

.landing main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 12px 28px 72px;
  display: flex;
  flex-direction: column;
  gap: 72px;
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: 48px;
  align-items: center;
  padding-top: 36px;
}

.landing-hero h1 {
  margin-top: 12px;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.045em;
  font-weight: 680;
  max-width: 14ch;
}

.hero-lede {
  margin: 18px 0 0;
  max-width: 52ch;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

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

.landing .btn {
  height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease, filter 180ms ease, box-shadow 180ms ease;
}

.landing .btn:hover {
  transform: translateY(-1px);
}

.landing .btn:active {
  transform: translateY(0);
}

.landing .btn-primary:hover {
  filter: brightness(1.06);
}

.hero-note {
  margin: 18px 0 0;
}

.hero-proof {
  margin: 0;
}

.proof-frame {
  border: 1px solid #2a3c58;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 30%),
    rgba(18, 26, 43, 0.92);
  box-shadow:
    0 30px 80px rgba(2, 6, 16, 0.45),
    inset 0 1px 0 rgba(45, 212, 191, 0.16);
  overflow: hidden;
}

.proof-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
}

.proof-bar span {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: #243049;
}

.proof-bar span:first-child { background: #2dd4bf; }
.proof-bar span:nth-child(2) { background: #38bdf8; }
.proof-bar span:nth-child(3) { background: #34d399; }

.proof-bar strong {
  margin-left: 8px;
  color: var(--text);
  font-weight: 640;
}

.proof-bar em {
  margin-left: auto;
  font-style: normal;
  color: var(--accent);
}

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

.proof-col {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  min-height: 168px;
  background: rgba(11, 18, 32, 0.45);
}

.proof-col p {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8e9db8;
}

.proof-col b {
  display: block;
  margin: 8px 0 14px;
  font-size: 14px;
}

.proof-col i {
  display: block;
  height: 8px;
  border-radius: 99px;
  background: #243049;
  margin-top: 8px;
}

.proof-col i.short { width: 62%; }

.proof-col.tone-teal { box-shadow: inset 2px 0 0 #2dd4bf; }
.proof-col.tone-blue { box-shadow: inset 2px 0 0 #38bdf8; }
.proof-col.tone-mint { box-shadow: inset 2px 0 0 #34d399; }

.metric-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(18, 26, 43, 0.72);
}

.metric-row article {
  padding: 22px 20px;
  border-right: 1px solid var(--border);
}

.metric-row article:last-child { border-right: 0; }

.metric-row strong {
  display: block;
  font-size: 28px;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.metric-row span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

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

.capability-row article h2 {
  margin-top: 8px;
  font-size: 20px;
}

.capability-row article p:last-child {
  margin: 10px 0 0;
  color: var(--muted);
}

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

.section-head h2 {
  margin-top: 6px;
  font-size: 28px;
}

.section-head p {
  margin: 0;
  max-width: 36ch;
  color: var(--muted);
}

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

.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
  border-radius: 16px;
  border: 1px solid #243049;
  background:
    radial-gradient(420px 180px at var(--mx, 80%) var(--my, 0%), var(--card-glow, transparent), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 40%),
    #121a2b;
  min-height: 280px;
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}

.project-card:hover {
  transform: translateY(-3px);
  border-color: #355072;
  box-shadow: 0 16px 40px rgba(2, 6, 16, 0.35);
}

.project-card.tone-teal {
  --card-glow: rgba(45, 212, 191, 0.22);
  box-shadow: inset 0 1px 0 rgba(45, 212, 191, 0.35);
}
.project-card.tone-blue {
  --card-glow: rgba(56, 189, 248, 0.22);
  box-shadow: inset 0 1px 0 rgba(56, 189, 248, 0.35);
}
.project-card.tone-mint {
  --card-glow: rgba(52, 211, 153, 0.2);
  box-shadow: inset 0 1px 0 rgba(52, 211, 153, 0.35);
}

.project-card h3 {
  font-size: 22px;
  color: var(--text);
}

.project-card > p {
  margin: 0;
  color: var(--muted);
}

.project-card-top,
.project-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.project-card .btn {
  margin-top: auto;
  align-self: flex-start;
  text-decoration: none;
}

.project-card .btn:hover {
  text-decoration: none;
}

.landing-notes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.landing-notes article {
  padding: 22px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(18, 26, 43, 0.8);
}

.landing-notes ul {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.landing-notes li + li { margin-top: 6px; }

.landing-foot {
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 28px 32px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #8e9db8;
  font-size: 12px;
  border-top: 1px solid rgba(36, 48, 73, 0.8);
}

@media (max-width: 900px) {
  .landing-nav {
    flex-wrap: wrap;
    padding: 16px;
  }

  .landing-links {
    order: 3;
    width: 100%;
    margin-left: 0;
    overflow-x: auto;
  }

  .landing main {
    padding: 8px 16px 48px;
    gap: 48px;
  }

  .landing-hero,
  .metric-row,
  .capability-row,
  .project-grid,
  .landing-notes {
    grid-template-columns: 1fr;
  }

  .metric-row article {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .metric-row article:last-child { border-bottom: 0; }

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

  .section-head,
  .landing-foot {
    flex-direction: column;
    align-items: flex-start;
  }

  .landing-hero h1 { font-size: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .drawer,
  .sidebar,
  .project-card,
  .landing .btn {
    transition: none;
  }

  .skeleton { animation: none; }

  .project-card:hover,
  .landing .btn:hover,
  .landing .btn:active {
    transform: none;
  }
}
