:root {
  --bg: #080c12;
  --surface: #0d1320;
  --surface-2: #111827;
  --border: rgba(255,255,255,0.07);
  --border-bright: rgba(99,179,237,0.25);
  --text: #e2e8f0;
  --text-muted: #4a5568;
  --text-dim: #718096;
  --accent: #63b3ed;
  --accent-glow: rgba(99,179,237,0.15);
  --accent-2: #4fd1c5;
  --green: #68d391;

  --font-display: "Montserrat", "Google Sans", sans-serif;
  --font-mono: "ui-monospace", "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  --radius: 12px;
  --radius-sm: 8px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }


body {
  font-family: var(--font-display);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(99,179,237,0.15), transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(79,209,197,0.12), transparent 40%);
  z-index: -1;
}



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

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-bright); border-radius: 2px; }

/* ── NAV ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 0 32px;
  height: 60px;
  background: rgba(8,12,18,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text);
}

.logo-icon {
  color: var(--accent);
  font-size: 20px;
  line-height: 1;
}
.theme-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
}

.nav-btn {
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--accent);
  color: #000;
  font-weight: 700;
}
/* ── CONTAINER ── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── GLOW BLOBS ── */
.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  opacity: 0.35;
}
.glow-1 { width: 500px; height: 500px; background: rgba(99,179,237,0.15); top: -120px; left: -100px; }
.glow-2 { width: 400px; height: 400px; background: rgba(79,209,197,0.1); bottom: -80px; right: -80px; }

/* ─────────────────────────────────────────
   HOME PAGE
   ───────────────────────────────────────── */
.home {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 80px 24px 40px;
}

.home-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

/* subtle dot grid */
.grid-overlay {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(99,179,237,0.12) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 40%, transparent 100%);
}

.search-wrapper {
  position: relative;
  z-index: 2;
  max-width: 560px;
  width: 100%;
  text-align: center;
  animation: fadeUp 0.7s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.search-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid var(--border-bright);
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 28px;
}

.search-title {
  font-size: clamp(40px, 7vw, 64px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  color: #f0f4f8;
}

.accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.search-sub {
  font-size: 15px;
  color: var(--text-dim);
  line-height: 1.6;
  margin-bottom: 36px;
  font-weight: 400;
}

/* ── SEARCH FORM ── */
.search-form {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.input-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 16px;
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--text-muted);
  pointer-events: none;
  transition: color 0.2s;
}

.input-wrap:focus-within .input-icon { color: var(--accent); }

.input-wrap input {
  width: 100%;
  padding: 14px 16px 14px 36px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-wrap input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.input-wrap input::placeholder { color: var(--text-muted); }

.btn-analyze {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  background: var(--accent);
  color: #0a0f1a;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.btn-analyze:hover {
  background: #90cdf4;
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(99,179,237,0.3);
}

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

/* ── EXAMPLE TAGS ── */
.search-examples {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.example-tag {
  padding: 3px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-dim);
  font-size: 12px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.example-tag:hover {
  border-color: var(--border-bright);
  color: var(--accent);
}

/* ─────────────────────────────────────────
   DASHBOARD
   ───────────────────────────────────────── */
.dashboard {
  padding-top: 60px;
  min-height: 100vh;
}

/* ── PROFILE HERO ── */
.profile-hero {
  position: relative;
  padding: 60px 0 48px;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 48px;
}

.profile-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.profile-card {
  display: flex;
  align-items: flex-start;
  gap: 32px;
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
}

/* ── AVATAR ── */
.avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  display: block;
  border: 2px solid var(--border-bright);
}

.avatar-ring {
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1px solid var(--border-bright);
  animation: pulse-ring 3s ease-in-out infinite;
}

@keyframes pulse-ring {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.04); }
}

/* ── PROFILE INFO ── */
.profile-info { flex: 1; min-width: 220px; }

.profile-names { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }

.profile-realname {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #f0f4f8;
}

.profile-handle {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  background: var(--accent-glow);
  padding: 2px 10px;
  border-radius: 20px;
  border: 1px solid var(--border-bright);
}

.profile-bio {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.6;
  margin-bottom: 16px;
  max-width: 500px;
}

.profile-meta {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.meta-item svg { opacity: 0.6; flex-shrink: 0; }

/* ── SCORE RING ── */
.score-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.score-ring {
  position: relative;
  width: 110px;
  height: 110px;
}

.score-svg {
  width: 110px;
  height: 110px;
  transform: rotate(-90deg);
}

.score-track {
  fill: none;
  stroke: var(--surface-2);
  stroke-width: 5;
}

.score-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dashoffset: 0;
  transition: stroke-dasharray 1s ease;
  filter: drop-shadow(0 0 6px rgba(99,179,237,0.5));
}

.score-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.score-num {
  font-size: 28px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.score-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 2px;
}

.score-caption {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ── STATS ROW ── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 48px;
  animation: fadeUp 0.5s ease 0.1s both;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: border-color 0.2s, transform 0.2s;
}

.stat-card:hover {
  border-color: var(--border-bright);
  transform: translateY(-2px);
}

.stat-icon {
  font-size: 20px;
  color: var(--accent);
  opacity: 0.8;
  line-height: 1;
  flex-shrink: 0;
}

.stat-body { display: flex; flex-direction: column; min-width: 0; }

.stat-value {
  font-size: 22px;
  font-weight: 800;
  color: #f0f4f8;
  line-height: 1;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
  letter-spacing: 0.04em;
}

/* ── SECTION ── */
.section {
  margin-bottom: 48px;
  animation: fadeUp 0.5s ease both;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.section-count,
.section-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.05em;
}

.section-badge {
  color: var(--accent);
  border-color: var(--border-bright);
  background: var(--accent-glow);
}

/* ── LANGUAGE TAGS ── */
.lang-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lang-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 5px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-dim);
  transition: border-color 0.2s, color 0.2s, transform 0.15s;
  animation: fadeUp 0.4s ease both;
}

.lang-tag:hover {
  border-color: var(--border-bright);
  color: var(--accent);
  transform: translateY(-2px);
}

/* ── TOP REPO CARD ── */
.top-repo-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}

.top-repo-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-glow), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
}

.top-repo-card:hover {
  border-color: var(--border-bright);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(99,179,237,0.1);
}

.top-repo-card:hover::before { opacity: 1; }

.top-repo-main { flex: 1; min-width: 0; }

.top-repo-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-repo-desc {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.5;
}

.top-repo-stats {
  display: flex;
  gap: 16px;
  flex-shrink: 0;
}

.repo-stat {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 5px;
}

.repo-stat span { color: var(--accent); }

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-2);
  display: inline-block;
}

.top-repo-arrow {
  font-size: 18px;
  color: var(--text-muted);
  transition: transform 0.2s, color 0.2s;
  flex-shrink: 0;
}

.top-repo-card:hover .top-repo-arrow {
  transform: translateX(4px);
  color: var(--accent);
}

/* ── REPO GRID ── */
.repo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.repo-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.2s, transform 0.2s;
  animation: fadeUp 0.4s ease both;
}

.repo-card:hover {
  border-color: var(--border-bright);
  transform: translateY(-2px);
}

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

.repo-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.repo-lang-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 20px;
  background: rgba(79,209,197,0.1);
  border: 1px solid rgba(79,209,197,0.2);
  color: var(--accent-2);
  white-space: nowrap;
  flex-shrink: 0;
}

.repo-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.repo-footer {
  display: flex;
  gap: 12px;
  margin-top: auto;
}

.repo-stat-sm {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

/* ── FOOTER ── */
.footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  margin-top: 80px;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-logo {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.05em;
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.footer-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 20px;
}

/* ─────────────────────────────────────────
   RESPONSIVE
   ───────────────────────────────────────── */
@media (max-width: 768px) {
  .profile-card { flex-direction: column; align-items: center; text-align: center; }
  .profile-meta { justify-content: center; }
  .profile-names { justify-content: center; }
  .score-display { order: -1; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .top-repo-card { flex-wrap: wrap; }
  .top-repo-arrow { display: none; }
  .search-form { flex-direction: column; }
  .btn-analyze { width: 100%; justify-content: center; }
  .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .stats-row { grid-template-columns: 1fr 1fr; }
  .repo-grid { grid-template-columns: 1fr; }
  .nav { padding: 0 16px; }
  .container { padding: 0 16px; }
}