@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('vendor/fonts/inter/v20/inter.woff2') format('woff2');
}

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

:root {
  --bg: #09090b;
  --surface: #18181b;
  --surface-hover: #1c1c1f;
  --border: #27272a;
  --border-hover: #52525b;
  --text-1: #fafafa;
  --text-2: #a1a1aa;
  --text-3: #52525b;
  --accent: #a78bfa;
  --accent-dim: rgba(167, 139, 250, 0.08);
  --accent-border: rgba(167, 139, 250, 0.25);
  --green: #4ade80;
  --green-dim: rgba(74, 222, 128, 0.1);
  --green-border: rgba(74, 222, 128, 0.25);
}

html {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text-1);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 70% 40% at 50% -10%, rgba(120, 80, 255, 0.12), transparent),
    var(--bg);
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Hero ── */
header {
  padding: 5rem 0 3.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.25rem;
}

.avatar-wrap {
  position: relative;
  width: 80px;
  height: 80px;
}

.avatar-ring {
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #a78bfa, #6366f1, #8b5cf6, #a78bfa);
  animation: spin 6s linear infinite;
  opacity: 0.7;
}

@keyframes spin { to { transform: rotate(360deg); } }

.avatar-inner {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--bg);
  padding: 2px;
  z-index: 1;
}

.avatar-inner img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: block;
}

.handle {
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.handle-at { color: var(--text-3); }
.handle-name { color: var(--text-1); }

.bio {
  font-size: 0.9rem;
  color: var(--text-2);
  max-width: 380px;
  line-height: 1.65;
}

.header-links {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.9rem;
  border-radius: 9999px;
  border: 1px solid var(--border);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  background: transparent;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.pill:hover {
  border-color: var(--border-hover);
  color: var(--text-1);
  background: var(--surface);
}

/* ── Stats row ── */
.stats-row {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  padding: 1.5rem 0 2.5rem;
}

.stat {
  text-align: center;
}

.stat-value {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-1);
}

.stat-label {
  font-size: 0.72rem;
  color: var(--text-3);
  margin-top: 0.15rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ── Section divider ── */
.section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.section-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-3);
  white-space: nowrap;
}

.section-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Cards ── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1px;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.card {
  background: var(--surface);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
  position: relative;
  cursor: pointer;
}

.card::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  background: radial-gradient(
    300px circle at var(--mx, 50%) var(--my, 50%),
    var(--accent-dim),
    transparent 70%
  );
  transition: opacity 0.25s;
  pointer-events: none;
}

.card:hover {
  background: var(--surface-hover);
}

.card:hover::after {
  opacity: 1;
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.card-name {
  font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', monospace;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-1);
  line-height: 1.3;
}

.badges {
  display: flex;
  gap: 0.35rem;
  flex-shrink: 0;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.18rem 0.5rem;
  border-radius: 9999px;
  background: var(--green-dim);
  border: 1px solid var(--green-border);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--green);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.live-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; box-shadow: 0 0 4px var(--green); }
  50% { opacity: 0.3; box-shadow: none; }
}

.card-desc {
  font-size: 0.84rem;
  color: var(--text-2);
  line-height: 1.65;
  flex: 1;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.25rem;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.lang {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.76rem;
  color: var(--text-3);
}

.lang-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.stars {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.76rem;
  color: var(--text-3);
}

.arrow-icon {
  color: var(--text-3);
  opacity: 0;
  transform: translate(-3px, 3px);
  transition: opacity 0.15s, transform 0.15s;
  flex-shrink: 0;
}

.card:hover .arrow-icon {
  opacity: 1;
  transform: translate(0, 0);
}

/* ── View all link ── */
.view-all {
  display: flex;
  justify-content: center;
  margin-bottom: 4rem;
}

.view-all a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-2);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 1.1rem;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.view-all a:hover {
  border-color: var(--border-hover);
  color: var(--text-1);
  background: var(--surface);
}

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  padding: 1.75rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer-left {
  font-size: 0.78rem;
  color: var(--text-3);
}

.footer-right {
  display: flex;
  gap: 1.25rem;
}

footer a {
  font-size: 0.78rem;
  color: var(--text-3);
  text-decoration: none;
  transition: color 0.15s;
}

footer a:hover { color: var(--text-1); }

/* ── Skeleton ── */
.skeleton {
  border-radius: 6px;
  background: linear-gradient(90deg, var(--surface) 0%, #222226 50%, var(--surface) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Responsive ── */
@media (max-width: 640px) {
  header { padding: 3rem 0 2rem; }
  .handle { font-size: 1.5rem; }
  .stats-row { gap: 1.5rem; }
  .projects-grid { grid-template-columns: 1fr; }
  footer { flex-direction: column; align-items: flex-start; }
}