* { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; }
body {
  background:#090d16;
  color:#fff;
  font-family:'Hind Siliguri', sans-serif;
  overflow-x:hidden;
  width:100%;
}

/* ---------- Ambient full-page particle background ---------- */
#bg3d {
  position:fixed; top:0; left:0;
  width:100vw; height:100vh;
  z-index:-1;
  opacity:0.55;
  pointer-events:none;
}

/* ---------- Navbar ---------- */
.navbar {
  position:fixed; top:0; width:100%;
  display:flex; justify-content:space-between; align-items:center;
  padding:1rem 6%;
  background:rgba(9,13,22,0.85);
  backdrop-filter:blur(12px);
  z-index:100;
  border-bottom:1px solid rgba(255,255,255,0.1);
}
.logo { font-size:1.2rem; font-weight:bold; display:flex; align-items:center; gap:8px; white-space:nowrap; }
.highlight { color:#ec4899; }
.nav-links {
  display:flex; align-items:center;
}
.nav-links a {
  color:#94a3b8; margin-left:1.4rem; text-decoration:none;
  font-size:0.95rem; transition:color 0.2s ease;
}
.nav-links a:hover { color:#fff; }

.nav-toggle {
  display:none;
  flex-direction:column;
  justify-content:center;
  gap:5px;
  width:34px; height:34px;
  background:transparent;
  border:1px solid rgba(255,255,255,0.15);
  border-radius:8px;
  cursor:pointer;
  z-index:110;
}
.nav-toggle span {
  display:block; height:2px; width:18px;
  margin:0 auto;
  background:#fff;
  border-radius:2px;
  transition:transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle.active span:nth-child(1) { transform:translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity:0; }
.nav-toggle.active span:nth-child(3) { transform:translateY(-7px) rotate(-45deg); }

/* ---------- Hero: two-column, 3D showcase alongside text ---------- */
.hero-section {
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:3rem;
  padding:7rem 8% 4rem;
  max-width:1300px;
  margin:0 auto;
}
.hero-text { flex:1 1 480px; min-width:0; }
.badge {
  background:rgba(99,102,241,0.2); border:1px solid #6366f1;
  padding:6px 16px; border-radius:20px; font-size:0.85rem; color:#818cf8;
  margin-bottom:1rem; display:inline-flex; align-items:center; gap:6px;
}
.hero-section h1 {
  font-size:clamp(1.9rem, 4.2vw, 3rem);
  margin-bottom:1rem; line-height:1.25;
  word-break:keep-all;
}
.hero-section p { font-size:clamp(0.95rem, 1.6vw, 1.1rem); color:#cbd5e1; max-width:560px; }
.gradient-text {
  background:linear-gradient(135deg, #6366f1, #ec4899);
  -webkit-background-clip:text; -webkit-text-fill-color:transparent;
}
.btn {
  padding:12px 28px; background:linear-gradient(135deg, #6366f1, #4f46e5);
  color:#fff; text-decoration:none; border-radius:30px; margin-top:1.5rem;
  display:inline-block; border:none; cursor:pointer;
  font-size:1rem; touch-action:manipulation;
  box-shadow:0 8px 24px rgba(99,102,241,0.35);
}
.btn:active { transform:scale(0.97); }

/* --- The dedicated 3D showcase stage --- */
.hero-3d-stage {
  position:relative;
  flex:1 1 460px;
  width:100%;
  max-width:560px;
  aspect-ratio:1 / 1;
  border-radius:24px;
  background:radial-gradient(circle at 30% 20%, rgba(99,102,241,0.18), transparent 60%),
             rgba(255,255,255,0.03);
  border:1px solid rgba(148,163,184,0.18);
  box-shadow:0 0 0 1px rgba(255,255,255,0.02) inset,
             0 20px 60px rgba(0,0,0,0.45),
             0 0 90px rgba(99,102,241,0.12);
  overflow:hidden;
  backdrop-filter:blur(6px);
}
.hero-3d-stage canvas { width:100% !important; height:100% !important; display:block; }
.hero-3d-stage .stage-glow-tag {
  position:absolute; top:14px; left:14px;
  font-size:0.7rem; letter-spacing:0.06em;
  color:#94a3b8; background:rgba(9,13,22,0.55);
  padding:4px 10px; border-radius:999px;
  border:1px solid rgba(255,255,255,0.08);
  z-index:2; pointer-events:none;
}

/* ---------- Sections ---------- */
.section { padding:5rem 8%; max-width:1100px; margin:0 auto; }
.section h2 { text-align:center; margin-bottom:2rem; font-size:clamp(1.5rem, 3.5vw, 2rem); }
.glass-card {
  background:rgba(255,255,255,0.04); border:1px solid rgba(255,255,255,0.1);
  padding:1.8rem; border-radius:16px; backdrop-filter:blur(12px); margin-top:1rem;
  transition:transform 0.2s ease, border-color 0.2s ease;
}
.glass-card:hover { transform:translateY(-4px); border-color:rgba(99,102,241,0.4); }
.skills-grid, .projects-grid {
  display:grid; grid-template-columns:repeat(auto-fit, minmax(260px, 1fr)); gap:1.5rem;
}
.tag {
  background:rgba(99,102,241,0.2); padding:4px 12px; border-radius:15px;
  font-size:0.8rem; color:#818cf8; display:inline-block; margin-top:10px;
}
.contact-box input, .contact-box textarea {
  width:100%; padding:12px; background:rgba(0,0,0,0.4);
  border:1px solid rgba(255,255,255,0.15); border-radius:8px;
  color:#fff; font-family:inherit; font-size:1rem;
}
.contact-box textarea { resize:vertical; }

/* ============ RESPONSIVE BREAKPOINTS ============ */

/* Tablets */
@media (max-width: 900px) {
  .hero-section {
    flex-direction:column-reverse;
    text-align:center;
    padding:6.5rem 6% 3rem;
    gap:2rem;
  }
  .hero-text { display:flex; flex-direction:column; align-items:center; }
  .hero-section p { max-width:100%; }
  .hero-3d-stage { max-width:420px; aspect-ratio:4/3; }
  .section { padding:4rem 6%; }
}

/* Mobile phones */
@media (max-width: 640px) {
  .navbar { padding:0.85rem 5%; }
  .logo { font-size:1.05rem; }
  .nav-toggle { display:flex; }
  .nav-links {
    position:fixed; top:0; right:0;
    height:100vh; width:min(72vw, 280px);
    background:rgba(9,13,22,0.98);
    backdrop-filter:blur(14px);
    flex-direction:column;
    justify-content:center;
    align-items:flex-start;
    padding:2rem 2rem;
    transform:translateX(100%);
    transition:transform 0.3s ease;
    border-left:1px solid rgba(255,255,255,0.1);
  }
  .nav-links.open { transform:translateX(0); }
  .nav-links a { margin:0 0 1.4rem 0; font-size:1.05rem; }

  .hero-section { padding:6rem 6% 2.5rem; gap:1.5rem; }
  .hero-3d-stage { aspect-ratio:1/1; max-width:100%; border-radius:18px; }
  .badge { font-size:0.75rem; padding:5px 12px; }
  .btn { width:100%; text-align:center; padding:14px; }

  .section { padding:3rem 5%; }
  .glass-card { padding:1.4rem; }
  .contact-box input, .contact-box textarea { font-size:16px; } /* prevents iOS zoom-on-focus */
}

/* Very small phones */
@media (max-width: 380px) {
  .hero-section h1 { font-size:1.6rem; }
  .hero-3d-stage { aspect-ratio:4/3.4; }
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior:auto; }
}
