/* GeneDAI People — dark-friendly, system fonts, Chinese-capable */
:root {
  color-scheme: dark light;
  --bg: #0b0d12;
  --bg-elev: #12151e;
  --bg-card: #161a24;
  --bg-card-hover: #1c2130;
  --border: #2a3142;
  --text: #e8eaef;
  --text-muted: #9aa3b5;
  --accent: #818cf8;
  --accent-strong: #6366f1;
  --accent-soft: rgba(99, 102, 241, 0.15);
  --radius: 14px;
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC",
    "Noto Sans SC", sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f5f8;
    --bg-elev: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f8f9fc;
    --border: #dde1ea;
    --text: #12141a;
    --text-muted: #5c6578;
    --accent: #4f46e5;
    --accent-strong: #4338ca;
    --accent-soft: rgba(79, 70, 229, 0.1);
    --shadow: 0 8px 24px rgba(18, 20, 26, 0.08);
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(99, 102, 241, 0.18), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(14, 165, 233, 0.1), transparent 55%),
    var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

.wrap {
  width: min(1200px, calc(100% - 2rem));
  margin-inline: auto;
}

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

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: inherit;
  text-decoration: none;
}
.brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 2rem;
  height: 2rem;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-strong), #22d3ee);
  color: white;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.brand-text strong {
  font-size: 1rem;
  letter-spacing: 0.01em;
}
.brand-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 600;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}

/* Hero / search */
.hero {
  padding: 2rem 0 1.25rem;
}
.hero h1 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  letter-spacing: -0.02em;
}
.lede {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
  max-width: 42rem;
}

.search-label {
  display: block;
}
#q {
  width: 100%;
  padding: 0.9rem 1.1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  outline: none;
  box-shadow: var(--shadow);
  transition: border-color 0.15s, box-shadow 0.15s;
}
#q::placeholder {
  color: var(--text-muted);
}
#q:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow);
}

.status {
  min-height: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  padding-bottom: 3rem;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1rem;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  cursor: pointer;
  text-align: left;
  color: inherit;
  font: inherit;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.card:hover,
.card:focus-visible {
  background: var(--bg-card-hover);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  outline: none;
  transform: translateY(-1px);
}

.card-top {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.avatar-fallback {
  display: grid;
  place-items: center;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 1.1rem;
}

.card-id {
  min-width: 0;
  flex: 1;
}
.card-name {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-handle {
  margin: 0.1rem 0 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.card-bio {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 3.9em;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: auto;
}
.tag {
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 60%, var(--bg-elev));
  border: 1px solid var(--border);
  color: var(--text-muted);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0 2.5rem;
  background: color-mix(in srgb, var(--bg) 90%, #000);
}
.footer-inner p {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 48rem;
}
.muted {
  opacity: 0.85;
}

/* Detail dialog */
.detail-dialog {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-elev);
  color: var(--text);
  padding: 0;
  width: min(560px, calc(100% - 2rem));
  max-height: min(85vh, 720px);
  box-shadow: var(--shadow);
}
.detail-dialog::backdrop {
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
}
.detail-close-row {
  display: flex;
  justify-content: flex-end;
  padding: 0.6rem 0.75rem 0;
  margin: 0;
}
.btn-ghost {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.35rem 0.55rem;
  border-radius: 8px;
}
.btn-ghost:hover {
  background: var(--accent-soft);
  color: var(--text);
}
#detail-body {
  padding: 0 1.25rem 1.5rem;
}
.detail-head {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}
.detail-head .avatar {
  width: 72px;
  height: 72px;
}
.detail-head h2 {
  margin: 0;
  font-size: 1.35rem;
}
.detail-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0.75rem 0 1.25rem;
  font-size: 0.875rem;
}
.exp-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.exp-item {
  padding: 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
}
.exp-org {
  font-weight: 600;
  font-size: 0.95rem;
}
.exp-role {
  font-size: 0.875rem;
  color: var(--text-muted);
}
.exp-dates {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}
