*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0a0c0f;
  --surface: #0f1217;
  --surface2: #151a22;
  --border: rgba(255, 255, 255, 0.07);
  --border2: rgba(255, 255, 255, 0.13);
  --green: #39d353;
  --green-dim: #1a6629;
  --cyan: #58e6d9;
  --text: #e6edf3;
  --muted: #7d8590;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  min-height: 100vh;
  overflow-x: hidden;
}

.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.15) 2px,
    rgba(0, 0, 0, 0.15) 4px
  );
}

.grid-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at 50% 0%, black 30%, transparent 80%);
}

.glow {
  position: fixed;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 400px;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(ellipse, rgba(57, 211, 83, 0.08) 0%, transparent 70%);
}

.page {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

/* NAV */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 18px;
  color: var(--green);
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  gap: 24px;
}

.nav-links a {
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text);
}

/* HERO */
.hero {
  padding: 80px 0 60px;
}

.terminal-prompt {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.prompt-sym {
  color: var(--green);
}

.cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: var(--green);
  animation: blink 1.1s step-end infinite;
  vertical-align: middle;
  margin-left: 2px;
}

@keyframes blink {
  50% { opacity: 0; }
}

h1 {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(44px, 8vw, 72px);
  line-height: 1;
  letter-spacing: -2px;
  margin-bottom: 20px;
}

h1 .name { color: var(--green); }
h1 .dim  { color: var(--muted); }

.tagline {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
  max-width: 480px;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--green);
  color: #0a0c0f;
  border: none;
  font-weight: 700;
}

.btn-primary:hover {
  background: #4ade80;
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border2);
}

.btn-ghost:hover {
  border-color: var(--green);
  color: var(--green);
}

/* STATS */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin: 60px 0;
}

.stat {
  background: var(--surface);
  padding: 20px;
}

.stat-val {
  font-family: 'Syne', sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: var(--green);
}

.stat-label {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* SECTION HEADER */
.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.section-tag {
  font-size: 10px;
  color: var(--green);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.section-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* SEARCH */
.search-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 6px;
  padding: 10px 14px;
  margin-bottom: 16px;
  transition: border-color 0.2s;
}

.search-wrapper:focus-within {
  border-color: var(--green);
}

.search-icon {
  color: var(--green);
  font-size: 12px;
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  caret-color: var(--green);
}

.search-input::placeholder {
  color: var(--muted);
}

.search-count {
  font-size: 11px;
  color: var(--muted);
  flex-shrink: 0;
}

/* REPOS */
.repos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-bottom: 60px;
}

.repo-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  transition: border-color 0.2s, transform 0.2s;
  cursor: pointer;
  text-decoration: none;
  display: block;
}

.repo-card:hover {
  border-color: var(--green-dim);
  transform: translateY(-2px);
}

.repo-card.hidden {
  display: none;
}

.repo-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--cyan);
  margin-bottom: 6px;
}

.repo-desc {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 16px;
  min-height: 36px;
}

.repo-meta {
  display: flex;
  gap: 16px;
  font-size: 11px;
  color: var(--muted);
}

.repo-lang {
  display: flex;
  align-items: center;
  gap: 5px;
}

.lang-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
  color: var(--muted);
  font-size: 12px;
  border: 1px dashed var(--border2);
  border-radius: 8px;
}

/* CONTRIBUTION GRAPH */
.contrib-section {
  margin-bottom: 60px;
}

.contrib-graph {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  overflow: hidden;
}

.contrib-months {
  display: flex;
  gap: 0;
  margin-bottom: 8px;
}

.month-label {
  font-size: 10px;
  color: var(--muted);
  flex: 1;
}

.contrib-row {
  display: flex;
  gap: 3px;
  margin-bottom: 3px;
}

.contrib-cell {
  width: 11px;
  height: 11px;
  border-radius: 2px;
  flex-shrink: 0;
}

.c0 { background: var(--surface2); }
.c1 { background: #0e4429; }
.c2 { background: #006d32; }
.c3 { background: #26a641; }
.c4 { background: var(--green); }

/* SKELETON */
.skeleton {
  background: var(--surface2);
  border-radius: 4px;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0%, 100% { opacity: 0.5; }
  50%       { opacity: 1; }
}

/* FOOTER */
footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-text {
  font-size: 11px;
  color: var(--muted);
}

.footer-link {
  color: var(--green);
  text-decoration: none;
}

.status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--muted);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

.error-msg {
  font-size: 12px;
  color: #f85149;
  padding: 12px;
  background: rgba(248, 81, 73, 0.1);
  border: 1px solid rgba(248, 81, 73, 0.2);
  border-radius: 6px;
  margin-bottom: 12px;
}