/* ── Reset & base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #0d1117;
  --bg-card:     #161b22;
  --bg-card-hover: #1c2330;
  --border:      #30363d;
  --border-hover:#58a6ff;
  --text:        #e6edf3;
  --text-muted:  #8b949e;
  --text-link:   #58a6ff;
  --accent:      #58a6ff;
  --accent-soft: #1f3a5f;
  --tag-bg:      #1f2937;
  --tag-text:    #8b949e;
  --radius:      12px;
  --radius-sm:   8px;
  --font:        'Inter', system-ui, sans-serif;
  --mono:        'JetBrains Mono', 'Fira Code', monospace;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

/* ── Layout ────────────────────────────────────────────────── */
.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

/* ── Header ────────────────────────────────────────────────── */
.header {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  margin-bottom: 36px;
}

.avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

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

.status-dot {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #f0e68c;
  border: 2px solid var(--bg);
}

.name {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 4px;
}

.handle {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.handle a { color: var(--text-muted); }
.handle a:hover { color: var(--text-link); }

.tagline {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.tagline a { color: var(--text-muted); font-weight: 500; }
.tagline a:hover { color: var(--text-link); }

.bio {
  font-size: 0.95rem;
  color: var(--text);
  max-width: 560px;
  border-left: 3px solid var(--accent);
  padding-left: 14px;
  color: var(--text-muted);
}

/* ── Badges ────────────────────────────────────────────────── */
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 48px;
}

.badges img {
  height: 22px;
  border-radius: 4px;
}

/* ── Section ───────────────────────────────────────────────── */
.section {
  margin-bottom: 52px;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

/* ── Card grid ─────────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

/* ── Project card ──────────────────────────────────────────── */
.card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  color: var(--text);
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
  position: relative;
  text-decoration: none;
}

.card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  text-decoration: none;
}

.card-icon {
  font-size: 2rem;
  margin-bottom: 12px;
  line-height: 1;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.card-url {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-link);
  margin-bottom: 10px;
}

.card-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
  flex: 1;
  margin-bottom: 14px;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-size: 0.75rem;
  font-family: var(--mono);
  background: var(--tag-bg);
  color: var(--tag-text);
  border-radius: 4px;
  padding: 2px 8px;
  border: 1px solid var(--border);
}

.card-arrow {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 1.1rem;
  color: var(--text-muted);
  transition: color 0.15s, transform 0.15s;
}

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

/* ── Repo cards ────────────────────────────────────────────── */
.card-grid--repos {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.repo-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}

.repo-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  text-decoration: none;
}

.repo-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  line-height: 1.4;
}

.repo-name {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-link);
  margin-bottom: 4px;
  font-weight: 500;
}

.repo-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.repo-card--more .repo-name { color: var(--text-muted); }
.repo-card--more:hover .repo-name { color: var(--text-link); }

/* ── Connect links ─────────────────────────────────────────── */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}

.link-btn:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  color: var(--text);
  text-decoration: none;
}

.link-icon {
  width: 18px;
  height: 18px;
}

/* ── Footer ────────────────────────────────────────────────── */
.footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.footer a { color: var(--text-muted); }
.footer a:hover { color: var(--text-link); }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 600px) {
  .header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
  }

  .bio {
    border-left: none;
    border-top: 3px solid var(--accent);
    padding-left: 0;
    padding-top: 12px;
  }

  .badges { justify-content: center; }

  .name { font-size: 1.4rem; }

  .card-grid,
  .card-grid--repos { grid-template-columns: 1fr; }

  .links { justify-content: center; }
}
