/* ==========================================================================
   YAMIN ALAM SARKER — AWWWARDS-STYLE SPATIAL 3D & INTERACTIVE BACKGROUND EDITION
   Obsidian Carbon (#07070a), Electric Acid Lime (#ccff00),
   Solar Coral (#ff4d29), Cyber Cyan (#00f2fe), & Titanium White (#f5f5f7)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  --bg-obsidian: #060609;
  --bg-charcoal: #0d0d14;
  --bg-surface: rgba(16, 16, 24, 0.72);
  --bg-surface-strong: rgba(20, 20, 32, 0.88);
  --lime: #ccff00;
  --coral: #ff4d29;
  --cyan: #00f2fe;
  --violet: #a855f7;
  --white: #f5f5f7;
  --zinc: #9ca3af;
  --muted: #52525b;
  --border-subtle: rgba(255, 255, 255, 0.09);
  --border-lime: rgba(204, 255, 0, 0.48);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  background-color: var(--bg-obsidian);
  color: var(--white);
  font-family: 'Plus Jakarta Sans', sans-serif;
  line-height: 1.65;
  overflow-x: hidden;
  cursor: none;
}

@media (max-width: 991.98px), (hover: none) {
  body {
    cursor: auto;
  }
}

h1, h2, h3, h4, .font-syne {
  font-family: 'Syne', sans-serif;
}

.font-mono {
  font-family: 'JetBrains Mono', monospace;
}

/* ==========================================================================
   1. Multi-Layer Interactive Background Canvases & Cursor System
   ========================================================================== */
/* Layer 1: Full-Viewport Three.js 3D Cyber-Terrain & Floating Polyhedra */
#bgWebGLCanvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
}

/* Layer 2: Interactive 2D Neural Constellation, Matrix Rain & Shockwave Ripples */
#mouseTrailCanvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
}

/* Layer 3: Mouse-Tracking Radial Spotlight + Perspective Grid */
.mouse-spotlight-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(
    700px circle at var(--mx, 50vw) var(--my, 50vh),
    rgba(204, 255, 0, 0.08),
    rgba(0, 242, 254, 0.04) 38%,
    transparent 72%
  );
}

.spatial-grid-lines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-size: 64px 64px;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  mask-image: radial-gradient(550px circle at var(--mx, 50vw) var(--my, 50vh), #000 20%, rgba(0, 0, 0, 0.25) 100%);
  -webkit-mask-image: radial-gradient(550px circle at var(--mx, 50vw) var(--my, 50vh), #000 20%, rgba(0, 0, 0, 0.25) 100%);
}

/* Custom Dual-Ring Magnetic Cursor */
.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 10px;
  height: 10px;
  background: var(--lime);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 18px var(--lime);
  transition: width 0.25s var(--ease-out-expo), height 0.25s var(--ease-out-expo), background 0.25s ease;
}

.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  width: 44px;
  height: 44px;
  border: 1.5px solid rgba(204, 255, 0, 0.7);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: width 0.32s var(--ease-out-expo), height 0.32s var(--ease-out-expo), background 0.32s ease, border-color 0.32s ease;
}

.cursor-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--bg-obsidian);
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.25s var(--ease-out-expo);
  white-space: nowrap;
}

body.cursor-hover .cursor-dot {
  width: 6px;
  height: 6px;
  background: var(--bg-obsidian);
}

body.cursor-hover .cursor-ring {
  width: 84px;
  height: 84px;
  background: var(--lime);
  border-color: var(--lime);
  box-shadow: 0 0 38px rgba(204, 255, 0, 0.6);
}

body.cursor-hover .cursor-label {
  opacity: 1;
  transform: scale(1);
}

@media (max-width: 991.98px), (hover: none) {
  .cursor-dot,
  .cursor-ring {
    display: none !important;
  }
}

/* ==========================================================================
   2. Floating Interactive Background & Mouse FX Control Dock
   ========================================================================== */
.mouse-fx-dock {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 1040;
  background: rgba(12, 12, 18, 0.9);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(204, 255, 0, 0.25);
  border-radius: 999px;
  padding: 6px 10px 6px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.65);
}

.fx-dock-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: var(--lime);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-right: 2px;
}

.fx-mode-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid transparent;
  color: var(--zinc);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.fx-mode-btn.active,
.fx-mode-btn:hover {
  background: var(--lime);
  color: var(--bg-obsidian);
  font-weight: 700;
  box-shadow: 0 0 16px rgba(204, 255, 0, 0.45);
}

/* ==========================================================================
   3. Top Spatial Navigation Bar with 3D Rolling Text
   ========================================================================== */
.spatial-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1050;
  padding: 20px 0;
  transition: all 0.35s var(--ease-out-expo);
}

.spatial-header.scrolled {
  padding: 11px 0;
  background: rgba(6, 6, 9, 0.86);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-subtle);
}

.spatial-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-cluster {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--white);
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--lime);
  color: var(--bg-obsidian);
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 24px rgba(204, 255, 0, 0.35);
  transition: transform 0.35s var(--ease-out-expo);
}

.brand-cluster:hover .brand-mark {
  transform: rotate(-10deg) scale(1.08);
}

.brand-mail {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--zinc);
  transition: color 0.25s ease;
}

.brand-cluster:hover .brand-mail {
  color: var(--lime);
}

/* Dual-Layer Rolling Navigation Links */
.rolling-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.rolling-link {
  position: relative;
  display: inline-block;
  height: 1.25rem;
  overflow: hidden;
  text-decoration: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  color: var(--zinc);
}

.rolling-link span {
  display: block;
  line-height: 1.25rem;
  transition: transform 0.38s var(--ease-out-expo), color 0.38s ease;
}

.rolling-link span:nth-child(2) {
  color: var(--lime);
}

.rolling-link:hover span,
.rolling-link.active span {
  transform: translateY(-100%);
  color: var(--lime);
}

.btn-lime-magnetic {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--lime);
  color: var(--bg-obsidian) !important;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 11px 22px;
  border-radius: 999px;
  text-decoration: none;
  border: none;
  box-shadow: 0 0 25px rgba(204, 255, 0, 0.3);
  transition: transform 0.25s var(--ease-out-expo), box-shadow 0.25s ease;
}

.btn-lime-magnetic:hover {
  box-shadow: 0 0 40px rgba(204, 255, 0, 0.65);
}

.btn-ghost-magnetic {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--white);
  border: 1px solid var(--border-subtle);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 11px 20px;
  border-radius: 999px;
  text-decoration: none;
  transition: all 0.25s var(--ease-out-expo);
}

.btn-ghost-magnetic:hover {
  border-color: var(--lime);
  color: var(--lime);
  background: rgba(204, 255, 0, 0.08);
}

/* Fixed Left Social Spine */
.fixed-social-spine {
  position: fixed;
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1020;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.spine-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(14, 14, 22, 0.75);
  border: 1px solid var(--border-subtle);
  color: var(--zinc);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.3s var(--ease-out-expo);
}

.spine-icon:hover {
  background: var(--lime);
  color: var(--bg-obsidian);
  border-color: var(--lime);
  transform: scale(1.15);
}

/* ==========================================================================
   4. Hero Split-Around-Center-3D Character Stage
   ========================================================================== */
.spatial-hero {
  min-height: 100vh;
  padding: 110px 0 60px;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-center-3d-wrap {
  position: relative;
  height: 540px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#character3dCanvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  touch-action: none;
}

.character-status-tag {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(12, 12, 18, 0.88);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-lime);
  border-radius: 999px;
  padding: 6px 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--lime);
  white-space: nowrap;
  pointer-events: none;
}

.hero-Left-greeting {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.92rem;
  color: var(--lime);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.hero-stacked-name {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2.5rem, 4.6vw, 4.3rem);
  font-weight: 800;
  line-height: 0.96;
  letter-spacing: -2px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.hero-stacked-name .stroke-text {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--white);
  transition: all 0.35s ease;
}

.hero-stacked-name:hover .stroke-text {
  color: var(--lime);
  -webkit-text-stroke: 1.5px var(--lime);
}

.hero-right-role-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  color: var(--zinc);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.hero-right-role-big {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.65rem, 2.6vw, 2.35rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--lime);
  margin-bottom: 14px;
}

/* ==========================================================================
   5. Mouse-Spotlight Cards & Service Ecosystem Grid
   ========================================================================== */
.spotlight-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  padding: 30px;
  overflow: hidden;
  backdrop-filter: blur(16px);
  transition: transform 0.35s var(--ease-out-expo), border-color 0.35s ease, box-shadow 0.35s ease;
}

.spotlight-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    520px circle at var(--card-mx, -200px) var(--card-my, -200px),
    rgba(204, 255, 0, 0.15),
    rgba(0, 242, 254, 0.05) 40%,
    transparent 65%
  );
  pointer-events: none;
  z-index: 0;
}

.spotlight-card > * {
  position: relative;
  z-index: 1;
}

.spotlight-card:hover {
  border-color: var(--border-lime);
  transform: translateY(-5px);
  box-shadow: 0 22px 48px -15px rgba(204, 255, 0, 0.14);
}

.service-icon-badge {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(204, 255, 0, 0.1);
  border: 1px solid rgba(204, 255, 0, 0.3);
  color: var(--lime);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  margin-bottom: 18px;
  transition: all 0.3s ease;
}

.spotlight-card:hover .service-icon-badge {
  background: var(--lime);
  color: var(--bg-obsidian);
  transform: scale(1.08) rotate(-5deg);
}

/* ==========================================================================
   6. Section Typography & Kinetic Work Rows
   ========================================================================== */
.spatial-section {
  padding: 96px 0;
  position: relative;
  z-index: 2;
}

.section-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--lime);
  letter-spacing: 2.5px;
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 10px;
}

.section-giant-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2rem, 3.8vw, 3.2rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -1.5px;
  text-transform: uppercase;
}

.section-giant-title span {
  color: var(--lime);
}

.project-kinetic-row {
  position: relative;
  border-top: 1px solid var(--border-subtle);
  padding: 28px 22px;
  background: rgba(10, 10, 16, 0.55);
  backdrop-filter: blur(8px);
  transition: all 0.4s var(--ease-out-expo);
  overflow: hidden;
}

.project-kinetic-row:last-child {
  border-bottom: 1px solid var(--border-subtle);
}

.project-kinetic-row::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(204, 255, 0, 0.1), rgba(255, 77, 41, 0.05), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease-out-expo);
  z-index: 0;
}

.project-kinetic-row:hover::before {
  transform: scaleX(1);
}

.project-kinetic-row > * {
  position: relative;
  z-index: 1;
}

.project-kinetic-row:hover {
  padding-left: 36px;
  border-top-color: var(--lime);
}

.proj-num {
  font-family: 'Syne', sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.22);
  transition: color 0.3s ease;
}

.project-kinetic-row:hover .proj-num {
  color: var(--lime);
}

.tech-pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.74rem;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--white);
  display: inline-block;
  transition: all 0.25s ease;
}

.tech-pill:hover {
  background: var(--lime);
  color: var(--bg-obsidian);
  border-color: var(--lime);
  transform: translateY(-2px);
}

/* ==========================================================================
   7. Laser Timeline & Academic Credentials
   ========================================================================== */
.laser-timeline {
  position: relative;
  padding-left: 36px;
}

.laser-timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 10px;
  width: 2px;
  background: linear-gradient(to bottom, var(--lime), var(--coral), var(--cyan));
}

.laser-node {
  position: relative;
  margin-bottom: 28px;
}

.laser-dot {
  position: absolute;
  left: -34px;
  top: 28px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg-obsidian);
  border: 3px solid var(--lime);
  box-shadow: 0 0 18px var(--lime);
}

/* ==========================================================================
   8. Interactive Mouse-Physics Tech Stack Arena & AI Terminal
   ========================================================================== */
.physics-arena-wrap {
  position: relative;
  width: 100%;
  height: 460px;
  border-radius: 28px;
  background: radial-gradient(circle at center, rgba(204, 255, 0, 0.08), rgba(10, 10, 16, 0.92) 75%);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}

#techPhysicsCanvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: pointer;
  touch-action: none;
}

.arena-hud {
  position: absolute;
  top: 16px;
  left: 20px;
  right: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
  z-index: 2;
}

.arena-hud-controls {
  pointer-events: auto;
  display: flex;
  gap: 8px;
}

/* AI Terminal Box */
.ai-terminal-box {
  background: rgba(10, 10, 16, 0.92);
  border: 1px solid var(--border-lime);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}

.ai-log-window {
  height: 260px;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ai-bubble {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 0.9rem;
}

.ai-bubble.bot {
  background: rgba(204, 255, 0, 0.09);
  border: 1px solid rgba(204, 255, 0, 0.28);
  color: var(--white);
  align-self: flex-start;
}

.ai-bubble.user {
  background: var(--lime);
  color: var(--bg-obsidian);
  font-weight: 600;
  align-self: flex-end;
}

/* Responsive Adjustments */
@media (max-width: 1199.98px) {
  .rolling-nav,
  .fixed-social-spine {
    display: none;
  }
}

@media (max-width: 991.98px) {
  .hero-center-3d-wrap {
    height: 400px;
  }
  .mouse-fx-dock {
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    max-width: 95vw;
    overflow-x: auto;
  }
}

@media (max-width: 575.98px) {
  .hero-center-3d-wrap {
    height: 330px;
  }
  .physics-arena-wrap {
    height: 360px;
  }
  .spotlight-card {
    padding: 22px;
  }
}
