:root {
  --bg: #09090b;
  --bg2: #111827;
  --card: rgba(15, 23, 42, 0.72);
  --card-strong: rgba(30, 41, 59, 0.9);
  --text: #e5eefb;
  --muted: #a5b4cc;
  --line: rgba(148, 163, 184, 0.22);
  --accent: #7c3aed;
  --accent-2: #06b6d4;
  --accent-3: #f59e0b;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  --success: #22c55e;
  --warning: #f59e0b;
  --critical: #ef4444;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(124, 58, 237, 0.22), transparent 32%),
    radial-gradient(circle at top right, rgba(6, 182, 212, 0.18), transparent 28%),
    linear-gradient(160deg, var(--bg), var(--bg2));
  color: var(--text);
}

body {
  position: relative;
  overflow-x: hidden;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.08;
  background-image:
    linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: radial-gradient(circle at center, black, transparent 85%);
}

.shell {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 64px;
}

main:not(.shell) {
  max-width: 980px;
  margin: 24px auto;
  padding: 0 16px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  padding: 20px;
  margin: 12px 0;
}

.hero {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 8px;
  padding: 40px;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  right: -40px;
  top: -50px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.28), transparent 70%);
  filter: blur(8px);
}

.avatar { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; }
.summary-wrap { display: flex; gap: 12px; align-items: center; }
.tagline { margin: 0; color: #cbd5e1; font-style: italic; }
.eyebrow {
  letter-spacing: 0.24em;
  font-size: 0.75rem;
  color: var(--accent-2);
  margin: 0 0 12px;
}

h1, h2, h3, p { margin-top: 0; }
h1 {
  font-size: clamp(2.4rem, 7vw, 4.8rem);
  line-height: 0.95;
  max-width: 12ch;
  margin-bottom: 18px;
}
h2 { margin-bottom: 12px; }
.lede, .card p, li, .muted-line {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--line);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button:hover, .project:hover, .card a:hover {
  transform: translateY(-2px);
}

.button.primary {
  background: linear-gradient(135deg, var(--accent), #9333ea);
  border-color: transparent;
}

.button.ghost {
  background: rgba(255,255,255,0.03);
}

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

.two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.spark-list {
  padding-left: 20px;
  margin: 0;
}

.tilt { transform: rotate(-1deg); }
.accent {
  background: linear-gradient(160deg, rgba(15, 23, 42, 0.82), rgba(49, 46, 129, 0.75));
}

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

.badges span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  color: #dbe6ff;
  font-size: 0.92rem;
}

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

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

.project {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
  padding: 18px;
  border-radius: 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.project h3 { margin-bottom: 8px; }
.project span {
  font-size: 1.6rem;
  color: var(--accent-3);
}

.report-panel {
  display: block;
}

.report-body {
  margin-top: 14px;
  padding: 18px 0 0;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  background: transparent;
  border-radius: 0;
  overflow: visible;
  max-height: none;
}

pre {
  margin: 0;
  white-space: pre-wrap;
  color: #dbe6ff;
  font: 0.98rem/1.8 "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(8, 15, 31, 0.72);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}

.table-card {
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.06);
}

th, td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  font-size: 14px;
  text-align: left;
}

th {
  color: #dbe6ff;
  background: rgba(255,255,255,0.04);
}

a:link, a:visited {
  color: #ffffff;
  text-decoration: none;
}

a:hover, a:active {
  opacity: .95;
  text-decoration: none;
}

.link-list a { display: inline-block; margin: 4px 0; }
.link-table { border: none; background: transparent; }
.link-table th, .link-table td { border: none; padding: 6px 0; }
.ok { color: var(--success); }
.warning { color: var(--warning); }
.critical { color: var(--critical); }
.metric-grid { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 12px; margin-top: 8px; }
.metric { background: #0b1220; border: 1px solid #1f2937; border-radius: 10px; padding: 10px; min-width: 0; }
.metric-label { font-size: 12px; color: #94a3b8; margin-bottom: 4px; }
.metric-value { font-size: 20px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.metric-sub { font-size: 12px; color: #94a3b8; margin-top: 4px; }

.footer {
  text-align: center;
  padding: 26px 8px 0;
}

.footer p {
  color: rgba(229, 238, 251, 0.7);
}

@media (max-width: 980px) {
  .metric-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}

@media (max-width: 820px) {
  .two-up,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 28px;
    display: block;
  }

  h1 {
    max-width: none;
  }
}

@media (max-width: 640px) {
  .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .shell { width: min(1100px, calc(100% - 20px)); }
  table, thead, tbody, th, td, tr {
    display: block;
  }
  thead {
    display: none;
  }
  tr {
    padding: 10px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  }
  td {
    border-bottom: none;
    padding: 6px 12px;
  }
}
