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

:root {
  --bg: #0d1117;
  --bg-alt: #161b22;
  --surface: #21262d;
  --border: #30363d;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --accent: #58a6ff;
  --accent2: #79c0ff;
  --green: #3fb950;
  --radius: 12px;
  --transition: 0.3s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', 'Noto Sans SC', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--accent2); }

/* ===== Canvas Background ===== */
#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ===== Navbar ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 5vw;
  transition: background var(--transition), box-shadow var(--transition);
}

.navbar.scrolled {
  background: rgba(13,17,23,0.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border);
}

.nav-logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.02em;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.03em;
}
.nav-links a:hover { color: var(--text); }

/* ===== Hero ===== */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 5vw 80px;
}

.avatar-wrap {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--accent);
  box-shadow: 0 0 24px rgba(88,166,255,0.35);
  margin: 0 auto 28px;
}

.avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-name {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
}

.accent {
  background: linear-gradient(135deg, #58a6ff, #79c0ff, #3fb950);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-tagline {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 36px;
  font-weight: 300;
}

.hero-btns {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-primary {
  background: var(--accent);
  color: #0d1117;
}
.btn-primary:hover {
  background: var(--accent2);
  color: #0d1117;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(88,166,255,0.4);
}

.btn-outline {
  border: 1px solid var(--border);
  color: var(--text);
  background: transparent;
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.scroll-hint {
  position: absolute;
  bottom: 36px;
  font-size: 1.4rem;
  color: var(--text-muted);
  animation: bounce 2s infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(8px); }
}

/* ===== Sections ===== */
.section {
  position: relative;
  z-index: 1;
  padding: 96px 5vw;
  max-width: 1100px;
  margin: 0 auto;
}

.section-alt {
  max-width: 100%;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section-alt > * {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

.section-title {
  font-size: 1.9rem;
  font-weight: 700;
  margin-bottom: 48px;
  text-align: center;
  position: relative;
}
.section-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--green));
  border-radius: 2px;
  margin: 12px auto 0;
}

/* ===== Skills ===== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}

.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all var(--transition);
  cursor: default;
}
.skill-card:hover {
  border-color: var(--accent);
  color: var(--text);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(88,166,255,0.15);
}
.skill-icon { font-size: 1.8rem; }

/* ===== Projects ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: all var(--transition);
}
.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(88,166,255,0.15);
}
.project-header {
  font-size: 2rem;
  margin-bottom: 12px;
}
.project-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.project-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 20px;
  line-height: 1.6;
}
.project-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
  transition: gap var(--transition);
}
.project-link:hover { color: var(--accent2); }

/* ===== Contact ===== */
.contact-sub {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 32px;
}
.contact-links {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.contact-pill {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 10px 24px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  transition: all var(--transition);
}
.contact-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(88,166,255,0.2);
}

/* ===== Footer ===== */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 32px 5vw;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ===== Gaming ===== */
.gaming-intro {
  text-align: center;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 48px;
  font-size: 1rem;
  line-height: 1.8;
}
.gaming-intro strong {
  color: var(--accent);
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.game-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  transition: all var(--transition);
}
.game-card:hover {
  border-color: #f78166;
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(247,129,102,0.18);
}
.game-icon {
  font-size: 2.4rem;
  margin-bottom: 14px;
}
.game-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}
.game-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
  .nav-links { display: none; }
  .hero-name { font-size: 2rem; }
  .section { padding: 72px 6vw; }
}
