:root {
  --bg: #05070d;
  --bg-2: #0a0f1c;
  --card: #0d1424;
  --border: #1a2438;
  --text: #e6edf7;
  --muted: #8b9bb4;
  --accent: #00d4ff;
  --accent-2: #4f8cff;
  --glow: rgba(0, 212, 255, 0.35);
  --radius: 14px;
  --font-head: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
}

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

/* ---------- NAV ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: rgba(5, 7, 13, 0.75);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-brand {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.5px;
}

.nav-brand span { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  font-weight: 500;
}

.nav-links a:not(.btn) { color: var(--muted); transition: color 0.2s; }
.nav-links a:not(.btn):hover { color: var(--accent); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 24px; height: 2px;
  background: var(--text);
  transition: 0.25s;
  border-radius: 2px;
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: 0.25s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #04121a;
  box-shadow: 0 0 24px var(--glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 36px var(--glow); }

.btn-ghost { border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- HERO ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 7rem 1.5rem 4rem;
  position: relative;
}

.hero-glow {
  position: absolute;
  width: 480px; height: 480px;
  top: 10%; left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, var(--glow) 0%, transparent 65%);
  filter: blur(20px);
  pointer-events: none;
}

.hero-content { position: relative; max-width: 720px; }

.hero-avatar {
  width: 128px; height: 128px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
  box-shadow: 0 0 40px var(--glow);
  margin-bottom: 1.5rem;
}

.hero-hello { color: var(--muted); font-size: 1.1rem; }

.hero-title {
  font-family: var(--font-head);
  font-size: clamp(2.6rem, 7vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -1px;
  margin: 0.25rem 0;
}

.accent { color: var(--accent); text-shadow: 0 0 28px var(--glow); }

.hero-type {
  font-family: var(--font-mono);
  font-size: clamp(1rem, 2.6vw, 1.35rem);
  color: var(--accent);
  min-height: 1.6em;
  margin-bottom: 0.5rem;
}

.hero-type .cursor { animation: blink 0.8s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.hero-bio { color: var(--muted); max-width: 560px; margin: 0 auto 1.5rem; }

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  margin: 1.5rem 0 2rem;
}

.stat { display: flex; flex-direction: column; }
.stat strong { font-family: var(--font-head); font-size: 1.6rem; color: var(--text); }
.stat span { color: var(--muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }

/* ---------- SECTIONS ---------- */
.section { padding: 5.5rem 1.5rem; max-width: 1120px; margin: 0 auto; }
.section-alt { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section-head { text-align: center; margin-bottom: 3rem; }

.section-title {
  font-family: var(--font-mono);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  color: var(--accent);
}

.section-sub { color: var(--muted); margin-top: 0.4rem; }

/* ---------- CARDS / GRIDS ---------- */
.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  transition: 0.25s;
}

.card h3 { font-family: var(--font-head); margin-bottom: 0.6rem; }
.card p { color: var(--muted); font-size: 0.95rem; }
.card:hover { border-color: var(--accent); box-shadow: 0 0 24px rgba(0, 212, 255, 0.12); transform: translateY(-3px); }

/* ---------- FILTERS ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.chip {
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
  font-family: var(--font-mono);
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #04121a;
  border-color: transparent;
}

/* ---------- FILTER FAB / PANEL ---------- */
.filter-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  background: var(--card);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  box-shadow: 0 0 22px var(--glow);
  transition: 0.2s;
}
.filter-fab span {
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}
.filter-fab:hover { transform: translateY(-2px); box-shadow: 0 0 30px var(--glow); }

.filter-panel {
  position: fixed;
  right: 20px;
  bottom: 86px;
  z-index: 60;
  width: min(320px, calc(100vw - 32px));
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem 1.2rem;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.55);
}
.filter-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.filter-panel-head h3 { font-family: var(--font-head); font-size: 1rem; }
.filter-close {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  width: 28px;
  height: 28px;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
}
.filter-close:hover { border-color: var(--accent); color: var(--accent); }

.filter-group { margin-bottom: 1.1rem; }
.filter-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.55rem;
}
.filter-chips { display: flex; flex-wrap: wrap; gap: 0.45rem; max-height: 180px; overflow-y: auto; }
.filter-chips .chip { padding: 0.35rem 0.9rem; font-size: 0.78rem; }
.filter-clear { display: block; width: 100%; text-align: center; margin-top: 0.2rem; }

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

.repo-card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.repo-name {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--accent);
  word-break: break-word;
}

.repo-desc { color: var(--muted); font-size: 0.9rem; flex: 1; }

.repo-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  align-items: center;
  font-size: 0.82rem;
  color: var(--muted);
  font-family: var(--font-mono);
}

.lang-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.lang { display: inline-flex; align-items: center; }

.repo-area-tag {
  padding: 0.15rem 0.6rem;
  border: 1px solid var(--accent-2);
  border-radius: 999px;
  font-size: 0.72rem;
  color: var(--accent-2);
}

.repo-empty { text-align: center; color: var(--muted); margin-top: 2rem; }

.section-cta { text-align: center; margin-top: 2.5rem; }

/* ---------- CONTACT ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  max-width: 640px;
  margin: 0 auto;
}

.contact-card { text-align: center; cursor: pointer; }
.contact-icon { font-size: 2rem; display: block; margin-bottom: 0.4rem; }
.contact-card p { font-family: var(--font-mono); font-size: 0.85rem; }

/* ---------- FOOTER ---------- */
.footer {
  text-align: center;
  padding: 2.5rem 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
}
.footer-meta { margin-top: 0.3rem; font-size: 0.8rem; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    inset: 60px 0 auto 0;
    flex-direction: column;
    background: rgba(5, 7, 13, 0.97);
    padding: 1.5rem;
    gap: 1.2rem;
    border-bottom: 1px solid var(--border);
    transform: translateY(-130%);
    transition: transform 0.3s ease;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-toggle { display: flex; }
  .hero-stats { gap: 1.5rem; }
}