:root {
  --bg-deep: #03120d;
  --bg-mid: #0a241a;
  --bg-soft: #0f3326;
  --accent: #6ee7a5;
  --accent-2: #34d399;
  --accent-3: #a7f3d0;
  --moss: #1f5c40;
  --cream: #f4f1e8;
  --ink: #e6f5ec;
}
html,
body {
  height: 100%;
  width: 100%;
}
body {
  background: var(--bg-deep);
  color: var(--ink);
  font-family: "Outfit", sans-serif;
  overflow-x: hidden;
  width: 100%;
}
.portfolio-wrapper {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
}

/* Ambient background */
.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(
      ellipse at 15% 10%,
      rgba(52, 211, 153, 0.18),
      transparent 50%
    ),
    radial-gradient(
      ellipse at 85% 80%,
      rgba(16, 122, 87, 0.25),
      transparent 55%
    ),
    radial-gradient(ellipse at 50% 50%, rgba(10, 36, 26, 0.6), transparent 70%),
    linear-gradient(180deg, #03120d 0%, #061a12 50%, #03120d 100%);
}
.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(110, 231, 165, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(110, 231, 165, 0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}
#particles-canvas {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}
.content-layer {
  position: relative;
  z-index: 10;
}

/* Glassmorphism */
.glass {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.04),
    rgba(255, 255, 255, 0.01)
  );
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid rgba(110, 231, 165, 0.12);
  border-radius: 20px;
}
.glass-strong {
  background: linear-gradient(
    135deg,
    rgba(16, 122, 87, 0.12),
    rgba(3, 18, 13, 0.5)
  );
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(110, 231, 165, 0.18);
  border-radius: 20px;
}

/* Navbar */
#navbar {
  transition: all 0.4s ease;
  background: transparent;
}
#navbar.scrolled {
  background: rgba(3, 18, 13, 0.7);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid rgba(110, 231, 165, 0.15);
}
.nav-link {
  position: relative;
  transition: color 0.3s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: all 0.3s ease;
  transform: translateX(-50%);
  border-radius: 2px;
}
.nav-link:hover::after,
.nav-link.active::after {
  width: 24px;
}
.nav-link.active {
  color: var(--accent);
}

/* Hero */
.hero-gradient-text {
  background: linear-gradient(135deg, #f4f1e8 0%, #6ee7a5 50%, #34d399 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.accent-text {
  background: linear-gradient(135deg, #6ee7a5, #34d399);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Orbit rings */
.orbit {
  position: absolute;
  border: 1px dashed rgba(110, 231, 165, 0.2);
  border-radius: 50%;
  animation: spin 40s linear infinite;
}
.orbit.reverse {
  animation-direction: reverse;
  animation-duration: 60s;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.orbit-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 20px var(--accent);
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
}

/* Cinematic image frame */
.portrait-frame {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: 24px;
  overflow: hidden;
  background:
    radial-gradient(
      circle at 30% 20%,
      rgba(110, 231, 165, 0.3),
      transparent 50%
    ),
    linear-gradient(135deg, #0f3326 0%, #1f5c40 100%);
  border: 1px solid rgba(110, 231, 165, 0.25);
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, var(--accent-2), #10a373);
  color: #03120d;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 999px;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 40px -10px rgba(52, 211, 153, 0.5);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 50px -10px rgba(52, 211, 153, 0.7);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  font-weight: 500;
  padding: 13px 27px;
  border-radius: 999px;
  border: 1px solid rgba(110, 231, 165, 0.3);
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.btn-ghost:hover {
  background: rgba(110, 231, 165, 0.08);
  border-color: var(--accent);
  transform: translateY(-2px);
}

/* Section label */
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(110, 231, 165, 0.08);
  border: 1px solid rgba(110, 231, 165, 0.2);
  color: var(--accent);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-family: "JetBrains Mono", monospace;
}
.section-tag .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.3);
  }
}

/* Stats */
.stat-card {
  transition: all 0.4s ease;
}
.stat-card:hover {
  transform: translateY(-6px);
  border-color: rgba(110, 231, 165, 0.35);
  background: linear-gradient(
    135deg,
    rgba(110, 231, 165, 0.08),
    rgba(3, 18, 13, 0.5)
  );
}

/* Skill bars */
.skill-track {
  height: 6px;
  background: rgba(110, 231, 165, 0.1);
  border-radius: 999px;
  overflow: hidden;
}
.skill-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  border-radius: 999px;
  width: 0;
  transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 12px rgba(110, 231, 165, 0.5);
}

/* Timeline */
.timeline-line {
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(
    180deg,
    transparent,
    rgba(110, 231, 165, 0.3) 10%,
    rgba(110, 231, 165, 0.3) 90%,
    transparent
  );
}
@media (min-width: 768px) {
  .timeline-line {
    left: 50%;
    transform: translateX(-50%);
  }
}
.timeline-node {
  width: 14px;
  height: 14px;
  background: var(--accent);
  border: 3px solid #03120d;
  border-radius: 50%;
  box-shadow: 0 0 20px var(--accent);
}

/* IELTS score ring */
.score-ring {
  position: relative;
  width: 120px;
  height: 120px;
}
.score-ring svg {
  transform: rotate(-90deg);
}
.score-ring circle {
  fill: none;
  stroke-width: 8;
}
.score-ring .track {
  stroke: rgba(110, 231, 165, 0.1);
}
.score-ring .fill {
  stroke: url(#ringGrad);
  stroke-linecap: round;
  transition: stroke-dashoffset 1.5s ease;
  filter: drop-shadow(0 0 8px rgba(110, 231, 165, 0.6));
}

/* Filter chips */
.filter-chip {
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(110, 231, 165, 0.15);
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: "JetBrains Mono", monospace;
}
.filter-chip:hover {
  border-color: rgba(110, 231, 165, 0.4);
}
.filter-chip.active {
  background: linear-gradient(135deg, var(--accent-2), #10a373);
  color: #03120d;
  border-color: transparent;
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Card hover */
.research-card,
.project-card,
.cert-card {
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.research-card:hover,
.project-card:hover,
.cert-card:hover {
  transform: translateY(-6px);
  border-color: rgba(110, 231, 165, 0.35);
}

/* Mobile menu */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}
#mobile-menu.open {
  max-height: 500px;
}

/* Leaf floating */
@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(0);
  }
  50% {
    transform: translateY(-15px) rotate(5deg);
  }
}
.float-anim {
  animation: float 6s ease-in-out infinite;
}

/* Blob decor */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  pointer-events: none;
}

/* Typing cursor */
.typing-cursor {
  display: inline-block;
  width: 3px;
  height: 1em;
  background: var(--accent);
  margin-left: 4px;
  vertical-align: middle;
  animation: blink 1s step-end infinite;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* Earth globe */
.globe {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background:
    radial-gradient(
      circle at 30% 30%,
      rgba(167, 243, 208, 0.4),
      transparent 60%
    ),
    radial-gradient(circle at 70% 70%, rgba(16, 122, 87, 0.8), transparent 60%),
    linear-gradient(135deg, #1f5c40, #0a241a);
  box-shadow:
    inset -20px -20px 60px rgba(0, 0, 0, 0.5),
    0 0 60px rgba(110, 231, 165, 0.3);
  position: relative;
  overflow: hidden;
}
.globe::before,
.globe::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(
      ellipse 40% 30% at 25% 30%,
      rgba(52, 211, 153, 0.5),
      transparent 70%
    ),
    radial-gradient(
      ellipse 30% 25% at 65% 55%,
      rgba(52, 211, 153, 0.4),
      transparent 70%
    ),
    radial-gradient(
      ellipse 25% 20% at 45% 75%,
      rgba(52, 211, 153, 0.45),
      transparent 70%
    );
}

/* Scroll indicator */
.scroll-indicator {
  width: 26px;
  height: 42px;
  border: 2px solid rgba(110, 231, 165, 0.4);
  border-radius: 999px;
  position: relative;
}
.scroll-indicator::after {
  content: "";
  width: 4px;
  height: 8px;
  background: var(--accent);
  border-radius: 2px;
  position: absolute;
  left: 50%;
  top: 8px;
  transform: translateX(-50%);
  animation: scrollDot 1.8s ease-in-out infinite;
}
@keyframes scrollDot {
  0% {
    top: 8px;
    opacity: 1;
  }
  100% {
    top: 22px;
    opacity: 0;
  }
}

/* Custom scrollbar */
.portfolio-wrapper::-webkit-scrollbar {
  width: 8px;
}
.portfolio-wrapper::-webkit-scrollbar-track {
  background: #03120d;
}
.portfolio-wrapper::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent-2), #10a373);
  border-radius: 999px;
}
/* Custom Image & Card Floating Animation (Smooth GPU Accelerated) */
.animated-portrait {
  animation: floatImage 4s ease-in-out infinite;
  /* Nicher line gulo kapa-kapi (jitter) bondho korbe */
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform-style: preserve-3d;
  -webkit-font-smoothing: subpixel-antialiased;
}

@keyframes floatImage {
  0% {
    transform: translate3d(0, 0px, 0);
  }
  50% {
    transform: translate3d(0, -15px, 0);
  }
  100% {
    transform: translate3d(0, 0px, 0);
  }
}

/* ===================== SCROLLBAR DRAG & CLICK FIX ===================== */

/* Background elements gulo jeno mouse click ba scroll block na kore */
.ambient-bg,
.grid-overlay,
#particles-canvas,
.blob {
  pointer-events: none !important;
}

/* Main content ke upore rakha jate scroll perfectly focus dhore rakhte pare */
.portfolio-wrapper,
.content-layer {
  position: relative;
  z-index: 10;
}

/* Horizontal scrollbar block kora jate vertical scrollbar perfect position-e thake */
html, body {
  overflow-x: hidden;
  width: 100%;
}