:root {
  --ink: #080b0e;
  --surface: #10151a;
  --surface-2: #151c22;
  --line: #263039;
  --text: #edf2ee;
  --muted: #8f9ca3;
  --green: #b7f34b;
  --violet: #aa8cff;
  --cyan: #5de4d3;
  --radius: 18px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--ink);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--ink); overflow-x: hidden; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

.ambient { position: fixed; width: 44rem; height: 44rem; border-radius: 999px; filter: blur(120px); opacity: .08; pointer-events: none; }
.ambient-one { background: var(--green); top: -28rem; left: -12rem; }
.ambient-two { background: var(--violet); right: -24rem; top: 18rem; }

.topbar { height: 72px; padding: 0 max(28px, calc((100vw - 1120px) / 2)); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand { color: var(--text); text-decoration: none; font-weight: 740; display: flex; align-items: center; gap: 10px; letter-spacing: -.03em; }
.brand-mark { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--green); color: var(--ink); }
.brand small { padding: 3px 6px; color: var(--green); border: 1px solid #3c4a2d; border-radius: 5px; font-size: 10px; letter-spacing: .08em; }
.topbar-meta { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; display: flex; align-items: center; gap: 9px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 14px var(--green); }

main { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.hero { min-height: calc(100vh - 72px); padding: clamp(72px, 10vh, 120px) 0 52px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.eyebrow { margin: 0 0 18px; color: var(--green); font-size: 11px; font-weight: 750; letter-spacing: .17em; text-transform: uppercase; }
.hero h1 { margin: 0; max-width: 920px; font-size: clamp(48px, 7.3vw, 92px); line-height: .96; letter-spacing: -.065em; font-weight: 620; }
.hero h1 em { color: var(--green); font-style: normal; }
.hero-copy { max-width: 640px; margin: 30px auto 40px; color: #a9b3b7; font-size: clamp(16px, 2vw, 19px); line-height: 1.65; }
.search-shell { width: min(760px, 100%); padding: 11px; text-align: left; border: 1px solid var(--line); border-radius: 20px; background: rgba(17,22,27,.86); box-shadow: 0 26px 80px rgba(0,0,0,.34); }
.search-shell label { display: block; padding: 4px 8px 10px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.search-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; min-height: 58px; overflow: hidden; border: 1px solid #2d383f; border-radius: 13px; background: #0b0f12; }
.protocol { padding-left: 18px; color: #5f6e76; }
.search-row input { width: 100%; padding: 0 10px 0 2px; color: var(--text); background: transparent; border: 0; outline: 0; font-size: 17px; }
.search-row button { align-self: stretch; margin: 5px; padding: 0 20px; border: 0; border-radius: 9px; color: #0b1007; background: var(--green); font-weight: 760; cursor: pointer; }
.search-row button:hover { filter: brightness(1.08); transform: translateY(-1px); }
.search-row button:focus-visible, .ghost-button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.search-shell > p { margin: 10px 8px 2px; color: #65727a; font-size: 12px; }
.source-rail { margin-top: 42px; display: flex; align-items: center; gap: 16px; color: #65727a; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; }
.source-rail i { width: 34px; height: 1px; background: #303b42; }

.loading-panel { min-height: calc(100vh - 72px); display: flex; align-items: center; justify-content: center; gap: 34px; }
.loading-panel h2 { margin: 0; font-size: clamp(25px, 4vw, 42px); letter-spacing: -.04em; }
.loader-orbit { width: 74px; height: 74px; border: 1px solid #324039; border-radius: 50%; display: grid; place-items: center; animation: spin 2s linear infinite; }
.loader-orbit span { width: 12px; height: 12px; margin-top: -68px; border-radius: 50%; background: var(--green); box-shadow: 0 0 22px var(--green); }
.progress { width: min(420px, 60vw); height: 3px; margin-top: 24px; overflow: hidden; background: #20282d; }
.progress span { display: block; width: 45%; height: 100%; background: var(--green); animation: progress 1.35s ease-in-out infinite; }

.workspace { padding: 70px 0 110px; }
.workspace-head { display: flex; justify-content: space-between; gap: 40px; align-items: end; padding-bottom: 38px; }
.workspace-head > div { max-width: 780px; }
.workspace-head h2 { margin: 0 0 16px; font-size: clamp(38px, 6vw, 66px); line-height: 1; letter-spacing: -.055em; text-transform: capitalize; }
.workspace-head > div > p:last-child { margin: 0; color: var(--muted); line-height: 1.65; }
.ghost-button { padding: 12px 18px; color: var(--text); background: transparent; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; white-space: nowrap; }
.metric-strip { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.metric-strip article { padding: 24px 26px; border-right: 1px solid var(--line); }
.metric-strip article:last-child { border: 0; }
.metric-strip strong { display: block; font-size: 32px; letter-spacing: -.04em; }
.metric-strip span { color: var(--muted); font-size: 12px; }
.section-block { padding-top: 70px; }
.section-title { display: grid; grid-template-columns: 260px 1fr; align-items: end; margin-bottom: 24px; }
.section-title > div { display: flex; align-items: center; gap: 12px; }
.section-title p { margin: 0; color: var(--muted); font-size: 12px; }
.section-index { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; color: var(--ink); background: var(--cyan); font-size: 11px; font-weight: 800; }
.section-index.green { background: var(--green); }
.section-index.violet { background: var(--violet); }
.section-title h3 { margin: 0; font-size: clamp(26px, 4vw, 42px); letter-spacing: -.045em; }

.persona-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.persona-card { position: relative; min-height: 250px; padding: 28px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, #151c22, #0d1115); }
.persona-card::after { content: ""; position: absolute; width: 180px; height: 180px; border-radius: 50%; right: -85px; bottom: -90px; background: var(--cyan); filter: blur(60px); opacity: .1; }
.persona-card.user::after { background: var(--violet); }
.persona-kind { color: var(--cyan); font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.persona-card.user .persona-kind { color: var(--violet); }
.persona-card h4 { margin: 16px 0 22px; max-width: 520px; font-size: 25px; line-height: 1.16; letter-spacing: -.035em; }
.chip-row, .repo-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.chip-row span, .repo-tags span { padding: 6px 9px; color: #b8c2c6; background: #1b242a; border: 1px solid #2b363d; border-radius: 7px; font-size: 11px; }
.persona-trigger { margin: 22px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.persona-trigger b { color: var(--text); }

.repo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.repo-card { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: transform .2s ease, border-color .2s ease; }
.repo-card:hover { transform: translateY(-3px); border-color: #4d5c43; }
.identity { display: flex; align-items: center; gap: 12px; }
.avatar { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; background: #222; }
.identity h4, .identity p { margin: 0; }
.identity h4 { font-size: 15px; }
.identity p { margin-top: 3px; color: var(--muted); font-size: 11px; }
.linkedin-button { width: 28px; height: 28px; margin-left: auto; display: grid; place-items: center; border-radius: 7px; color: var(--text); background: #1666c5; text-decoration: none; font-weight: 800; font-size: 12px; }
.role { margin-top: 22px; display: grid; gap: 5px; }
.role strong { font-size: 14px; }
.role span { color: var(--muted); font-size: 12px; }
.match-reason { min-height: 54px; color: #a2adb2; font-size: 12px; line-height: 1.5; }
.repo-stats { display: flex; align-items: center; gap: 11px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.repo-stats b { margin-left: auto; color: var(--green); }
.repo-tags { margin-top: 14px; }
.repo-tags span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.table-shell { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.lead-table { display: grid; grid-template-columns: 1.25fr .85fr .5fr .36fr 1.7fr; gap: 16px; align-items: center; min-width: 860px; padding: 17px 22px; border-top: 1px solid var(--line); }
.lead-table:first-child { border-top: 0; }
.lead-table-head { color: #68777e; background: #0c1013; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }
.lead-person { display: grid; gap: 4px; }
.lead-person a { color: var(--text); text-decoration: none; font-weight: 700; }
.lead-person small, .lead-table > span, .lead-table > p { color: var(--muted); font-size: 11px; }
.lead-table > p { margin: 0; line-height: 1.4; }
.match-pill { justify-self: start; padding: 5px 8px; border-radius: 999px; color: var(--ink) !important; font-size: 9px !important; font-weight: 800; text-transform: uppercase; }
.match-pill.buyer { background: var(--violet); }
.match-pill.user { background: var(--cyan); }
.score { font-size: 19px; }
.panel-error { padding: 18px; color: #ffb0a8; border: 1px solid #633a37; border-radius: 12px; background: #251716; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes progress { 0% { transform: translateX(-120%); } 100% { transform: translateX(330%); } }

@media (max-width: 820px) {
  .topbar-meta { display: none; }
  main { width: min(100% - 24px, 1120px); }
  .hero { padding-top: 64px; }
  .search-row { grid-template-columns: auto 1fr; }
  .search-row button { grid-column: 1 / -1; min-height: 48px; margin-top: 0; }
  .source-rail { gap: 8px; }
  .source-rail i { width: 12px; }
  .workspace-head { align-items: start; flex-direction: column; }
  .metric-strip { grid-template-columns: repeat(2, 1fr); }
  .metric-strip article:nth-child(2) { border-right: 0; }
  .metric-strip article:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .section-title { grid-template-columns: 1fr; gap: 18px; }
  .persona-grid, .repo-grid { grid-template-columns: 1fr; }
  .table-shell { overflow-x: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
