/* =============================================
   HD DEV PORTFOLIO — GOD LEVEL UI
   ============================================= */

:root {
  --bg: #06060f;
  --bg2: #0d0d1f;
  --surface: rgba(255, 255, 255, 0.04);
  --surface2: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.08);
  --purple: #7c3aed;
  --purple-light: #9d5ff5;
  --cyan: #06b6d4;
  --pink: #ec4899;
  --green: #10b981;
  --text: #f1f1f3;
  --text-muted: #8b8ba8;
  --gradient: linear-gradient(135deg, #7c3aed, #06b6d4);
  --gradient2: linear-gradient(135deg, #ec4899, #7c3aed);
  --glow-purple: 0 0 40px rgba(124, 58, 237, 0.3);
  --glow-cyan: 0 0 40px rgba(6, 182, 212, 0.3);
  --radius: 16px;
  --radius-sm: 8px;
  --transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

body.light-mode {
  --bg: #080808;
  --bg2: #121212;
  --surface: rgba(255, 255, 255, 0.04);
  --surface2: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 157, 0, 0.15);
  --text: #ffffff;
  --text-muted: #a0a0a0;
  --gradient: linear-gradient(135deg, #ff9d00, #ff4d00);
  --gradient2: linear-gradient(135deg, #ff4d00, #ff0000);
  --glow-purple: 0 0 40px rgba(255, 157, 0, 0.2);
  --glow-cyan: 0 0 40px rgba(255, 77, 0, 0.2);
}

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

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

body {
  font-family: "Inter", sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
  transition:
    background 0.5s ease,
    color 0.5s ease;
}

/* Canvas Particles */
#particles-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ---- UTILITIES ---- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.section {
  padding: 100px 0;
  position: relative;
  z-index: 1;
}
.section-label {
  font-family: "Fira Code", monospace;
  color: var(--cyan);
  font-size: 0.85rem;
  margin-bottom: 12px;
  letter-spacing: 0.1em;
}
.section-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1.15;
}
.section-sub {
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 60px;
  text-align: center;
  font-size: 1.05rem;
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(-100%);
  transition: transform 0.4s ease;
}
.btn:hover::before {
  transform: translateX(0);
}
.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 4px 24px rgba(124, 58, 237, 0.4);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(124, 58, 237, 0.6);
}
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
  backdrop-filter: blur(10px);
}
.btn-outline:hover {
  border-color: var(--purple);
  color: var(--purple-light);
  transform: translateY(-2px);
}

/* ---- NAVBAR ---- */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  background: rgba(6, 6, 15, 0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: var(--transition);
}
#navbar.scrolled {
  background: rgba(6, 6, 15, 0.9);
  padding: 10px 0;
}
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 40px;
}
.nav-logo {
  font-family: "Fira Code", monospace;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}
.logo-bracket {
  color: var(--cyan);
}
.logo-accent {
  color: var(--purple-light);
}
.nav-links {
  display: flex;
  list-style: none;
  gap: 8px;
  flex: 1;
  justify-content: center;
}
.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 50px;
  white-space: nowrap;
  transition: var(--transition);
}
.nav-link span,
.nav-footer-mobile {
  display: none; /* Hidden on Desktop */
}
.nav-link:hover,
.nav-link.active {
  color: var(--text);
  background: var(--surface2);
}
.nav-cta {
  background: var(--gradient);
  color: #fff;
  padding: 9px 22px;
  border-radius: 50px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: var(--transition);
}
.nav-cta:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* Theme Toggle */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}
.theme-toggle-btn {
  background: var(--surface);
  border: 1.5px solid var(--border);
  color: var(--text);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.theme-toggle-btn:hover {
  background: var(--surface2);
  transform: scale(1.1);
}
.theme-toggle-btn svg {
  width: 20px;
  height: 20px;
}
.sun-icon {
  display: none;
}
.light-mode .sun-icon {
  display: block;
}
.light-mode .moon-icon {
  display: none;
}
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

/* ---- HERO ---- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 100px 24px 60px;
  max-width: 1200px;
  margin: 0 auto;
  gap: 60px;
  position: relative;
  z-index: 1;
}
.hero-content {
  flex: 1;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--green);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 24px;
  animation: fadeInDown 0.6s ease;
}
.badge-dot {
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.8);
  }
}
.hero-title {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 900;
  line-height: 1.12;
  margin-bottom: 24px;
  animation: fadeInUp 0.7s ease 0.1s both;
}
.typewriter {
  font-family: "Fira Code", monospace;
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  color: var(--cyan);
  display: inline-block;
  white-space: nowrap;
  min-height: 1.8em;
}
.hero-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 560px;
  margin-bottom: 36px;
  animation: fadeInUp 0.7s ease 0.2s both;
  line-height: 1.75;
}
.hero-desc strong {
  color: var(--text);
}
.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 48px;
  animation: fadeInUp 0.7s ease 0.3s both;
}
.hero-stats {
  display: flex;
  align-items: center;
  gap: 32px;
  animation: fadeInUp 0.7s ease 0.4s both;
}
.stat {
  text-align: left;
}
.stat-num {
  font-size: 2.2rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat span {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--purple-light);
}
.stat p {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-top: 2px;
}
.stat-divider {
  width: 1px;
  height: 50px;
  background: var(--border);
}

.hero-visual {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  animation: fadeInRight 0.8s ease 0.2s both;
}
.code-card {
  background: rgba(13, 13, 31, 0.9);
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow:
    var(--glow-purple),
    0 24px 60px rgba(0, 0, 0, 0.5);
  width: 100%;
  max-width: 440px;
  animation: float 6s ease-in-out infinite;
  transition:
    box-shadow 0.5s ease,
    border-color 0.5s ease;
}
.code-card.success-anim {
  box-shadow:
    0 0 50px rgba(16, 185, 129, 0.4),
    0 24px 60px rgba(0, 0, 0, 0.5);
  border-color: var(--green);
}
@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-16px);
  }
}
.code-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid var(--border);
}
.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.dot.red {
  background: #ff5f57;
}
.dot.yellow {
  background: #febc2e;
}
.dot.green {
  background: #28c840;
}
.code-title {
  font-family: "Fira Code", monospace;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-left: 16px;
}
.run-code-btn {
  margin-left: auto;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: var(--green);
  font-family: "Inter", sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 4px;
}
.run-code-btn:hover {
  background: var(--green);
  color: #fff;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.6);
  transform: translateY(-1px);
}
.run-code-btn:active {
  transform: translateY(1px);
}
.code-body {
  padding: 24px;
  font-family: "Fira Code", monospace;
  font-size: 0.82rem;
  line-height: 1.8;
  overflow-x: auto;
}
.kw {
  color: #c792ea;
}
.cls {
  color: #82aaff;
}
.fn {
  color: #82aaff;
}
.str {
  color: #c3e88d;
}

.terminal-output {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(6, 6, 15, 0.95);
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.terminal-output.open {
  max-height: 250px;
}
.terminal-header {
  font-family: "Fira Code", monospace;
  font-size: 0.65rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  padding: 6px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.terminal-body {
  padding: 16px;
  font-family: "Fira Code", monospace;
  font-size: 0.75rem;
  color: #10b981;
  line-height: 1.7;
  white-space: pre-wrap;
  min-height: 140px;
  position: relative;
  text-shadow: 0 0 5px rgba(16, 185, 129, 0.4);
}
.terminal-body::after {
  content: "█";
  animation: blink 1s step-end infinite;
  margin-left: 2px;
  color: #10b981;
}
.terminal-body.done::after {
  content: "";
}
@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

.floating-badge {
  position: absolute;
  background: rgba(13, 13, 31, 0.95);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 8px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
.fb1 {
  top: 0;
  left: -20px;
  border-color: rgba(124, 58, 237, 0.4);
  animation: float 5s ease-in-out infinite;
}
.fb2 {
  top: 30%;
  right: -30px;
  border-color: rgba(6, 182, 212, 0.4);
  animation: float 7s ease-in-out infinite 1s;
}
.fb3 {
  bottom: 25%;
  left: -30px;
  border-color: rgba(16, 185, 129, 0.4);
  animation: float 6s ease-in-out infinite 0.5s;
}
.fb4 {
  bottom: 0;
  right: 0;
  border-color: rgba(236, 72, 153, 0.4);
  animation: float 8s ease-in-out infinite 2s;
}

.scroll-indicator {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.75rem;
  animation: fadeIn 1s ease 1s both;
}
.scroll-arrow {
  width: 20px;
  height: 20px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  animation: scrollBounce 2s ease-in-out infinite;
}
@keyframes scrollBounce {
  0%,
  100% {
    transform: rotate(45deg) translateY(-4px);
  }
  50% {
    transform: rotate(45deg) translateY(4px);
  }
}

/* ---- UI TRANSFORMATION SLIDER ---- */
.transformation {
  background: linear-gradient(180deg, transparent, rgba(124, 58, 237, 0.04) 50%, transparent);
}
.comparison-container {
  position: relative;
  width: 100%;
  max-width: 900px;
  height: 500px;
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
  user-select: none;
}
.comparison-before,
.comparison-after {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 40px;
  overflow: hidden;
}
.comparison-before {
  background: #e2e8f0;
  color: #475569;
}
.comparison-after {
  background: var(--bg2);
  color: var(--text);
  clip-path: inset(0 0 0 50%); /* Initial state: half visible */
  z-index: 2;
}

/* Mock Plain Content */
.mock-plain-content {
  font-family: "Arial", sans-serif;
  opacity: 0.8;
}
.plain-nav {
  font-size: 0.8rem;
  border-bottom: 1px solid #cbd5e1;
  padding-bottom: 8px;
  margin-bottom: 40px;
}
.plain-hero h1 {
  font-size: 1.8rem;
  margin-bottom: 10px;
  color: #1e293b;
}
.plain-hero p {
  font-size: 0.9rem;
  margin-bottom: 20px;
}
.plain-hero button {
  padding: 8px 16px;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 0.8rem;
}
.plain-card {
  margin-top: 40px;
  padding: 20px;
  border: 1px solid #cbd5e1;
  width: 200px;
}
.plain-card h3 {
  font-size: 1rem;
  margin-bottom: 6px;
}

/* Mock Premium Content */
.mock-premium-content {
  font-family: "Inter", sans-serif;
  position: relative;
  height: 100%;
}
.premium-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
  margin-bottom: 40px;
}
.p-logo {
  font-size: 1.1rem;
  font-weight: 800;
}
.p-accent {
  color: var(--purple-light);
}
.p-links {
  display: flex;
  gap: 16px;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.premium-hero {
  margin-bottom: 40px;
}
.p-title {
  font-size: 2.5rem;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 12px;
}
.p-grad {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.p-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 400px;
  margin-bottom: 24px;
}
.p-btn {
  display: inline-block;
  padding: 12px 24px;
  background: var(--gradient);
  color: white;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: var(--glow-purple);
}
.premium-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 24px;
  width: 240px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}
.p-card-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.1), transparent 70%);
}
.p-card-icon {
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.label-badge {
  position: absolute;
  bottom: 24px;
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  z-index: 5;
}
.label-badge.before {
  left: 24px;
  background: #94a3b8;
  color: #fff;
}
.label-badge.after {
  right: 24px;
  background: var(--purple);
  color: #fff;
}

.comparison-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: var(--cyan);
  z-index: 10;
  pointer-events: none;
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.5);
}
.handle-line {
  width: 100%;
  height: 100%;
}
.handle-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  background: var(--bg2);
  border: 2px solid var(--cyan);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

/* ---- ABOUT ---- */
.about {
  background: linear-gradient(
    180deg,
    transparent,
    rgba(124, 58, 237, 0.04) 50%,
    transparent
  );
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 80px;
  align-items: center;
  margin-top: 60px;
}
.about-image-wrap {
  position: relative;
  display: flex;
  justify-content: center;
}
.about-img-frame {
  width: 260px;
  height: 260px;
  border-radius: 50%;
  border: 2px solid rgba(124, 58, 237, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.about-avatar {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 1;
}
.avatar-ring {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: var(--gradient) border-box;
  -webkit-mask:
    linear-gradient(#fff 0 0) padding-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
  animation: spin 8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.about-decorations {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.deco-card {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  gap: 6px;
}
.dc1 {
  top: 0;
  right: 0;
  border-color: rgba(124, 58, 237, 0.3);
}
.dc2 {
  bottom: 20px;
  left: 0;
  border-color: rgba(6, 182, 212, 0.3);
}

.about-content h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text);
}
.about-content p {
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.75;
}
.about-content p strong {
  color: var(--text);
}
.about-highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 28px 0;
}
.highlight {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.highlight:hover {
  border-color: rgba(124, 58, 237, 0.4);
  background: var(--surface2);
}
.hl-icon {
  font-size: 1.4rem;
}
.highlight strong {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 2px;
}
.highlight p {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0;
}

/* ---- SKILLS ---- */
.skills {
  background: linear-gradient(
    180deg,
    transparent,
    rgba(6, 182, 212, 0.03) 50%,
    transparent
  );
}
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
  margin-top: 60px;
}
.skill-category {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: var(--transition);
}
.skill-category:hover {
  border-color: rgba(124, 58, 237, 0.4);
  background: var(--surface2);
  transform: translateY(-4px);
  box-shadow: var(--glow-purple);
}
.skill-category h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 20px;
}
.skill-bars {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.skill-bar {
}
.sb-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-bottom: 6px;
}
.sb-info span:last-child {
  color: var(--purple-light);
  font-weight: 600;
}
.sb-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}
.sb-fill {
  height: 100%;
  background: var(--gradient);
  border-radius: 3px;
  width: 0%;
  transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.sb-fill::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 20px;
  height: 100%;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

.tech-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 44px;
  justify-content: center;
}
.chip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 6px 18px;
  font-size: 0.82rem;
  font-weight: 500;
  transition: var(--transition);
  cursor: default;
}
.chip:hover {
  border-color: var(--purple);
  color: var(--purple-light);
  background: rgba(124, 58, 237, 0.1);
  transform: translateY(-2px);
}

/* ---- PROJECTS ---- */
.projects {
}
.project-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 40px 0;
}
.filter-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 8px 22px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}
.filter-btn:hover,
.filter-btn.active {
  background: var(--gradient);
  border-color: transparent;
  color: #fff;
}
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.project-glow {
  position: absolute;
  inset: 0;
  background: var(--gradient);
  opacity: 0;
  transition: opacity 0.4s ease;
  filter: blur(40px);
  z-index: 0;
}
.project-card:hover .project-glow {
  opacity: 0.06;
}
.project-card:hover {
  border-color: rgba(124, 58, 237, 0.5);
  transform: translateY(-6px);
  box-shadow: var(--glow-purple);
}
.project-card.hidden {
  display: none;
}
.project-card > * {
  position: relative;
  z-index: 1;
}
.project-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}
.project-icon {
  font-size: 2.2rem;
}
.project-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.tag {
  background: rgba(124, 58, 237, 0.15);
  border: 1px solid rgba(124, 58, 237, 0.25);
  color: var(--purple-light);
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
}
.project-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
}
.project-card p {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.65;
  margin-bottom: 16px;
}
.project-tech {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.project-tech span {
  font-size: 0.75rem;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.2);
  color: var(--cyan);
  padding: 2px 8px;
  border-radius: 4px;
}
.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.project-link {
  color: var(--purple-light);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}
.project-link:hover {
  color: var(--cyan);
}
.project-stars {
  font-size: 0.82rem;
  color: #fbbf24;
}

/* ---- SERVICES ---- */
.services {
  background: linear-gradient(
    180deg,
    transparent,
    rgba(124, 58, 237, 0.04) 50%,
    transparent
  );
}
.services .section-title,
.services .section-label {
  text-align: center;
}
.services .section-sub {
  text-align: center;
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 24px;
  margin-top: 60px;
}
.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 28px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.service-card:hover {
  transform: translateY(-6px);
  border-color: rgba(124, 58, 237, 0.4);
  box-shadow: var(--glow-purple);
}
.service-card.featured {
  border-color: rgba(124, 58, 237, 0.5);
  background: linear-gradient(
    135deg,
    rgba(124, 58, 237, 0.1),
    rgba(6, 182, 212, 0.05)
  );
}
.service-ribbon {
  position: absolute;
  top: 20px;
  right: -30px;
  background: var(--gradient);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 5px 40px;
  transform: rotate(45deg);
  letter-spacing: 0.05em;
}
.service-icon {
  font-size: 2.5rem;
  margin-bottom: 20px;
  display: block;
}
.service-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
}
.service-card p {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.65;
  margin-bottom: 20px;
}
.service-features {
  list-style: none;
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.service-features li {
  font-size: 0.875rem;
  color: var(--text-muted);
}
.service-btn {
  width: 100%;
  justify-content: center;
}

/* ---- RESUME ---- */
.resume {
}
.resume-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  margin-top: 60px;
}
.resume-col-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}
.timeline {
  position: relative;
  padding-left: 24px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--purple), transparent);
}
.timeline-item {
  position: relative;
  padding-bottom: 32px;
}
.tl-dot {
  position: absolute;
  left: -29px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gradient);
  box-shadow: 0 0 12px rgba(124, 58, 237, 0.5);
}
.tl-date {
  font-family: "Fira Code", monospace;
  font-size: 0.75rem;
  color: var(--cyan);
  display: block;
  margin-bottom: 6px;
}
.tl-content h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.tl-content p {
  font-size: 0.85rem;
  color: var(--purple-light);
  margin-bottom: 8px;
}
.tl-content ul {
  list-style: disc;
  list-style-position: inside;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tl-content ul li {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* 3D INTERACTIVE RESUME */
.resume-grid {
  perspective: 2000px;
}
.timeline {
  transform-style: preserve-3d;
}
.timeline-item {
  position: relative;
  padding-bottom: 32px;
  transition:
    transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 0.6s ease;
  transform: translateZ(0) rotateX(10deg);
  opacity: 0.6;
}
.timeline-item.visible {
  transform: translateZ(50px) rotateX(0deg);
  opacity: 1;
}
.timeline-item:hover {
  transform: translateZ(100px) scale(1.05) rotateY(-5deg);
  z-index: 10;
}
.tl-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
}
.timeline-item:hover .tl-content {
  border-color: var(--cyan);
  background: var(--surface2);
  box-shadow: var(--glow-cyan);
}
.resume-cta {
  text-align: center;
  margin-top: 48px;
}

/* ---- TESTIMONIALS ---- */
.testimonials {
  position: relative;
  overflow: hidden;
}
.testimonials::before {
  content: '"';
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 20rem;
  color: rgba(124, 58, 237, 0.04);
  font-family: Georgia, serif;
  line-height: 1;
  pointer-events: none;
}
.testimonials .container {
  text-align: center;
}
.testimonials-slider {
  position: relative;
  margin: 60px auto 0;
  max-width: 700px;
  min-height: 220px;
}
.testimonial-card {
  display: none;
  padding: 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  animation: fadeIn 0.5s ease;
}
.testimonial-card.active {
  display: block;
}
.t-stars {
  color: #fbbf24;
  font-size: 1.1rem;
  margin-bottom: 20px;
  letter-spacing: 4px;
}
.testimonial-card p {
  font-size: 1.05rem;
  color: var(--text);
  line-height: 1.75;
  margin-bottom: 24px;
  font-style: italic;
}
.t-author {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: center;
}
.t-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
}
.t-author strong {
  display: block;
  font-size: 0.95rem;
}
.t-author span {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.t-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: center;
  margin-top: 24px;
}
.t-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.t-btn:hover {
  background: var(--gradient);
  border-color: transparent;
}
.t-dots {
  display: flex;
  gap: 8px;
}
.t-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  transition: var(--transition);
}
.t-dot.active {
  background: var(--purple);
  width: 24px;
  border-radius: 4px;
}

/* ---- CONTACT ---- */
.contact {
  background: linear-gradient(
    180deg,
    transparent,
    rgba(124, 58, 237, 0.04) 50%,
    transparent
  );
}
.contact .section-title,
.contact .section-label {
  text-align: center;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 60px;
  margin-top: 60px;
  align-items: start;
}
.contact-info h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 28px;
}
.contact-items {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 36px;
}
.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.ci-icon {
  font-size: 1.5rem;
}
.contact-item strong {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 3px;
}
.contact-item a,
.contact-item span {
  color: var(--text);
  font-size: 0.92rem;
  text-decoration: none;
  transition: var(--transition);
}
.contact-item a:hover {
  color: var(--purple-light);
}
.social-links {
  display: flex;
  gap: 12px;
}
.social-btn {
  width: 44px;
  height: 44px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0 !important;
  line-height: 0 !important;
  transition: var(--transition);
}
.social-btn:hover {
  background: var(--gradient);
  border-color: transparent;
  color: #fff;
  transform: translateY(-2px);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}
.form-group input,
.form-group select,
.form-group textarea {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text);
  font-family: "Inter", sans-serif;
  font-size: 0.9rem;
  transition: var(--transition);
  outline: none;
  resize: vertical;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--purple);
  background: rgba(124, 58, 237, 0.06);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}
.form-group select {
  cursor: pointer;
}
.form-group select option {
  background: var(--bg2);
}
.form-success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--green);
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  font-size: 0.9rem;
}

/* ---- FOOTER ---- */
.footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 60px 0 30px;
  position: relative;
  z-index: 1;
}
.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}
.footer-brand p {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.65;
  margin-top: 16px;
  max-width: 280px;
}
.footer-links h4 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
}
.footer-links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-links ul li a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.87rem;
  transition: var(--transition);
}
.footer-links ul li a:hover {
  color: var(--purple-light);
}
.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
}

/* ---- BACK TO TOP ---- */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  background: var(--gradient);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  transition: var(--transition);
  z-index: 999;
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4);
}
.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}
.back-to-top:hover {
  transform: translateY(-4px);
}

/* ---- ANIMATIONS ---- */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(24px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
  .hero {
    flex-direction: column;
    padding-top: 120px;
    text-align: center;
  }
  .hero-content {
    order: 1;
  }
  .hero-visual {
    order: 2;
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
  }
  .hero-desc,
  .hero-title {
    max-width: 100%;
  }
  .hero-actions {
    justify-content: center;
  }
  .hero-stats {
    justify-content: center;
  }
  .about-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .about-image-wrap {
    justify-content: center;
  }
  .resume-grid {
    grid-template-columns: 1fr;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links,
  .nav-cta {
    display: none;
  }
  .hamburger {
    display: flex;
    z-index: 1001; /* Stay above the menu */
  }
  #navbar {
    background: #06060f !important; /* Solid background on mobile */
    backdrop-filter: none;
    height: 70px;
  }
  .nav-links.open {
    display: flex !important;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at top right, rgba(124, 58, 237, 0.2), transparent 70%), #06060f;
    padding: 100px 24px 60px;
    gap: 10px;
    align-items: center;
    justify-content: flex-start;
    z-index: 1000;
    overflow-y: auto;
    clip-path: circle(0% at 90% 35px);
    animation: menuReveal 0.6s cubic-bezier(0.19, 1, 0.22, 1) forwards;
  }
  .nav-links.open::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
      linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -1;
    opacity: 0.5;
  }
  @keyframes menuReveal {
    to { clip-path: circle(150% at 90% 35px); }
  }
  .nav-links.open li {
    width: 100%;
    max-width: 280px;
    opacity: 0;
    transform: translateY(20px);
    animation: itemStagger 0.4s cubic-bezier(0.19, 1, 0.22, 1) forwards;
  }
  .nav-links.open li:nth-child(1) { animation-delay: 0.1s; }
  .nav-links.open li:nth-child(2) { animation-delay: 0.15s; }
  .nav-links.open li:nth-child(3) { animation-delay: 0.2s; }
  .nav-links.open li:nth-child(4) { animation-delay: 0.25s; }
  .nav-links.open li:nth-child(5) { animation-delay: 0.3s; }
  .nav-links.open li:nth-child(6) { animation-delay: 0.35s; }
  .nav-links.open li:nth-child(7) { animation-delay: 0.4s; }
  .nav-links.open li:nth-child(8) { animation-delay: 0.45s; }

  @keyframes itemStagger {
    to { opacity: 1; transform: translateY(0); }
  }

  .nav-links.open .nav-link {
    font-size: 1.05rem;
    font-weight: 600;
    padding: 14px 24px;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    color: var(--text-muted);
    transition: all 0.3s ease;
  }
  .nav-links.open .nav-link span {
    display: inline-block !important; /* Re-enable only for Mobile God-Level UI */
    font-size: 1.2rem;
    filter: grayscale(1) brightness(1.5);
    transition: filter 0.3s;
  }
  .nav-links.open .nav-link:hover,
  .nav-links.open .nav-link.active {
    background: rgba(124, 58, 237, 0.1);
    border-color: var(--purple-light);
    color: #fff;
    transform: translateX(8px);
  }
  .nav-links.open .nav-link.active span {
    filter: grayscale(0);
  }

  /* Nav Footer */
  .nav-footer-mobile {
    display: block !important;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
  }
  .nav-footer-content p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
  }
  .nav-socials {
    display: flex;
    justify-content: center;
    gap: 15px;
  }
  .social-mini {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.3s;
  }
  .social-mini:hover {
    background: var(--gradient);
    color: #fff;
    border-color: transparent;
    transform: translateY(-3px);
  }
  .section {
    padding: 70px 0;
  }
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .skills-grid {
    grid-template-columns: 1fr;
  }
  .services-grid {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .about-highlights {
    grid-template-columns: 1fr;
  }
  .footer-top {
    grid-template-columns: 1fr;
  }
  .floating-badge {
    display: none;
  }
  .hero-stats {
    flex-direction: column;
    gap: 16px;
  }
  .stat-divider {
    display: none;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }
  .section-title {
    font-size: 1.8rem;
  }
}

/* ---- GOD LEVEL ADDITIONS ---- */
/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: rgba(124, 58, 237, 0.5);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--purple-light);
}

/* Scroll Progress Tracker */
.scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--gradient);
  z-index: 10000;
  width: 0%;
  pointer-events: none;
  box-shadow: 0 0 10px rgba(124, 58, 237, 0.8);
}

/* Magnetic Element Classes */
.magnetic {
  display: inline-block;
  will-change: transform;
}

/* Fluid Cursor Blob */
#cursor-blob {
  position: fixed;
  top: 0;
  left: 0;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(124, 58, 237, 0.12),
    rgba(6, 182, 212, 0.05),
    transparent 70%
  );
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: screen;
  transition:
    width 0.3s,
    height 0.3s;
}

/* Dynamic Text Highlight */
.magnetic-text {
  transition:
    color 0.3s,
    text-shadow 0.3s;
}
.magnetic-text.hovered {
  color: #fff;
}

/* ---- JUPYTER NOTEBOOK MODAL ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 6, 15, 0.9);
  backdrop-filter: blur(10px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.modal-content {
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  background: #fafafa;
  color: #333;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(124, 58, 237, 0.3);
  transform: translateY(30px) scale(0.95);
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  font-family: "Inter", sans-serif;
}
.modal-overlay.open .modal-content {
  transform: translateY(0) scale(1);
}

/* Notebook Theme Styles */
.modal-content.notebook-theme .modal-header {
  background: #eeeeee;
  border-bottom: 1px solid #ddd;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.modal-controls {
  display: flex;
  gap: 6px;
}
.modal-title {
  font-family: "Fira Code", monospace;
  font-size: 0.85rem;
  color: #555;
  margin-left: auto;
}
.modal-body {
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.modal-body::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}
.modal-body::-webkit-scrollbar-track {
  background: #f0f0f0;
}

/* Notebook Cells */
.jn-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  animation: fadeInUp 0.4s ease forwards;
  opacity: 0;
}
.jn-md {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #222;
}
.jn-md h2 {
  border-bottom: 1px solid #ccc;
  padding-bottom: 8px;
  margin-bottom: 12px;
  font-weight: 700;
  font-size: 1.4rem;
  color: #000;
}
.jn-md p {
  margin-bottom: 10px;
}

.jn-io-wrap {
  display: flex;
  flex-direction: column;
  margin-bottom: 8px;
}
.jn-input-wrap,
.jn-output-wrap {
  display: flex;
  font-family: "Fira Code", monospace;
}
.jn-prompt {
  width: 55px;
  text-align: right;
  padding-right: 10px;
  font-size: 0.75rem;
  color: #303f9f;
  padding-top: 10px;
  font-weight: 500;
}
.jn-prompt.out {
  color: #d84315;
}
.jn-input {
  flex: 1;
  background: #f7f7f7;
  border: 1px solid #cfcfcf;
  border-radius: 4px;
  padding: 10px 14px;
  font-size: 0.82rem;
  color: #111;
  white-space: pre-wrap;
}
.jn-output {
  flex: 1;
  padding: 10px 14px;
  font-size: 0.82rem;
  color: #333;
  white-space: pre-wrap;
}
.view-notebook-btn {
  cursor: pointer;
}

/* ---- INTERACTIVE CLIENT ORBIT ---- */
.client-orbit {
  padding: 80px 0 100px;
  background: linear-gradient(180deg, transparent, rgba(6, 182, 212, 0.05) 50%, transparent);
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  position: relative;
  overflow: hidden;
}
.orbit-container {
  position: relative;
  width: 100%;
  max-width: 600px;
  height: 600px;
  margin: 40px auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1000px;
}
.orbit-center {
  position: relative;
  width: 80px;
  height: 80px;
  background: var(--bg);
  border: 2px solid var(--purple);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  box-shadow: var(--glow-purple);
}
.orbit-core-text {
  font-family: "Fira Code", monospace;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
  line-height: 1.2;
}
.orbit-core-glow {
  position: absolute;
  inset: -20px;
  background: radial-gradient(
    circle,
    rgba(124, 58, 237, 0.3) 0%,
    transparent 70%
  );
  border-radius: 50%;
  animation: pulse 3s infinite;
  z-index: -1;
}

.orbit-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.15);
  pointer-events: none;
}
.ring-1 {
  width: 300px;
  height: 300px;
  animation: spin-slow 20s linear infinite;
}
.ring-2 {
  width: 500px;
  height: 500px;
  animation: spin-slow-reverse 30s linear infinite;
  border-color: rgba(6, 182, 212, 0.15);
}

.client-node {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 70px;
  height: 70px;
  margin-top: -35px;
  margin-left: -35px;
  border-radius: 50%;
  z-index: 5;
  cursor: pointer;
}
/* Node Positioning */
.node-1 {
  transform: rotate(0deg) translateX(150px) rotate(0deg);
}
.node-2 {
  transform: rotate(120deg) translateX(150px) rotate(-120deg);
}
.node-5 {
  transform: rotate(240deg) translateX(150px) rotate(-240deg);
}
.node-3 {
  transform: rotate(60deg) translateX(250px) rotate(-60deg);
}
.node-4 {
  transform: rotate(180deg) translateX(250px) rotate(-180deg);
}
.node-6 {
  transform: rotate(300deg) translateX(250px) rotate(-300deg);
}

.node-content {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  backdrop-filter: blur(5px);
  transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}
.node-logo {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: grayscale(100%) opacity(0.8);
  transition: filter 0.4s;
}

/* Tooltip */
.node-tooltip {
  position: absolute;
  top: -70px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--surface2);
  border: 1px solid var(--cyan);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  width: 180px;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
  box-shadow: var(--glow-cyan);
  backdrop-filter: blur(10px);
}
.node-tooltip h4 {
  font-size: 0.85rem;
  color: #fff;
  margin-bottom: 4px;
  font-weight: 700;
}
.node-tooltip p {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin: 0;
}
.node-tooltip::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px 6px 0;
  border-style: solid;
  border-color: var(--cyan) transparent transparent transparent;
}

.client-node:hover {
  z-index: 20;
}
.client-node:hover .node-content {
  transform: scale(1.3);
  border-color: var(--cyan);
  box-shadow: var(--glow-cyan);
}
.client-node:hover .node-logo {
  filter: grayscale(0%) opacity(1);
}
.client-node:hover .node-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

@keyframes spin-slow {
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}
@keyframes spin-slow-reverse {
  100% {
    transform: translate(-50%, -50%) rotate(-360deg);
  }
}

@media (max-width: 768px) {
  .orbit-container {
    transform: scale(0.6);
    margin-top: 0;
  }
}

/* ---- ENGINEERING ARCHITECTURE FLOWCHART ---- */
.flowchart-section {
  position: relative;
  padding: 40px 0;
  max-width: 900px;
  margin: 0 auto;
  min-height: 400px;
}
#flowchart-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}
.fc-grid {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 80px;
}
.fc-row {
  display: flex;
  gap: 120px;
  width: 100%;
  justify-content: center;
}
.fc-node {
  background: rgba(13, 13, 31, 0.8);
  border: 1px solid rgba(124, 58, 237, 0.3);
  padding: 16px 20px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 16px;
  width: 260px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  cursor: pointer;
  backdrop-filter: blur(10px);
}
.fc-node:hover {
  transform: translateY(-5px);
  border-color: var(--cyan);
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.4);
}
.fc-icon {
  font-size: 2rem;
  background: rgba(255, 255, 255, 0.02);
  padding: 12px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fc-text h4 {
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 4px;
  font-family: "Inter", sans-serif;
}
.fc-text p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}

@media (max-width: 768px) {
  .fc-row {
    flex-direction: column;
    gap: 80px;
    align-items: center;
  }
  .fc-grid {
    gap: 80px;
  }
}

/* ---- AUDIO CONTROLLER ---- */
.audio-controller {
  position: fixed;
  bottom: 32px;
  left: 32px;
  background: rgba(13, 13, 31, 0.8);
  border: 1px solid rgba(124, 58, 237, 0.3);
  padding: 10px 16px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  z-index: 999;
  backdrop-filter: blur(10px);
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}
.audio-controller:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.3);
  transform: translateY(-2px);
}
.audio-text {
  font-family: "Fira Code", monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 1px;
}
.audio-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 14px;
}
.audio-bars .bar {
  width: 3px;
  height: 4px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: height 0.2s ease;
}
.audio-controller.playing .audio-text {
  color: var(--cyan);
}
.audio-controller.playing .audio-bars .bar {
  background: var(--cyan);
  animation: equalize 1s ease-in-out infinite;
}
.audio-controller.playing .audio-bars .bar:nth-child(1) {
  animation-duration: 0.9s;
}
.audio-controller.playing .audio-bars .bar:nth-child(2) {
  animation-duration: 0.7s;
}
.audio-controller.playing .audio-bars .bar:nth-child(3) {
  animation-duration: 1.1s;
}
.audio-controller.playing .audio-bars .bar:nth-child(4) {
  animation-duration: 0.8s;
}

@keyframes equalize {
  0%,
  100% {
    height: 4px;
  }
  50% {
    height: 14px;
  }
}

/* ---- ESTIMATOR WIDGET ---- */
.estimator {
  background: linear-gradient(180deg, rgba(6, 182, 212, 0.03), transparent 80%);
}
.estimator-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  margin-top: 50px;
  align-items: start;
}
.estim-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 24px;
}
.estim-option {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  transition: var(--transition);
}
.estim-option:hover {
  border-color: rgba(124, 58, 237, 0.4);
  transform: translateX(5px);
}
.estim-option.active {
  border-color: var(--cyan);
  background: rgba(6, 182, 212, 0.05);
}
.estim-info h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.estim-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border);
  transition: 0.4s;
}
.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: #fff;
  transition: 0.4s;
}
.small-switch {
  width: 36px;
  height: 20px;
}
.small-switch .slider:before {
  height: 12px;
  width: 12px;
  left: 3px;
  bottom: 3px;
}
.small-switch input:checked + .slider:before {
  transform: translateX(16px);
}
.slider.round {
  border-radius: 24px;
}
.slider.round:before {
  border-radius: 50%;
}
.toggle-switch input:checked + .slider {
  background: var(--gradient);
  border-color: transparent;
}
.toggle-switch input:checked + .slider:before {
  transform: translateX(20px);
}

/* Radio Group */
.estim-radio-group {
  display: flex;
  gap: 16px;
}
.estim-radio {
  cursor: pointer;
  flex: 1;
}
.estim-radio input {
  display: none;
}
.radio-btn {
  display: block;
  text-align: center;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: var(--transition);
}
.estim-radio input:checked + .radio-btn {
  background: rgba(124, 58, 237, 0.1);
  border-color: var(--purple-light);
  color: #fff;
  box-shadow: 0 0 15px rgba(124, 58, 237, 0.2);
}

/* Dashboard Card */
.estimator-dashboard {
  position: sticky;
  top: 120px;
}
.dashboard-card {
  background: rgba(13, 13, 31, 0.9);
  border: 1px solid rgba(6, 182, 212, 0.4);
  border-radius: var(--radius);
  padding: 40px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
}
.dash-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at top right,
    rgba(6, 182, 212, 0.15),
    transparent 60%
  );
  pointer-events: none;
}
.dashboard-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 32px;
  text-align: center;
}
.dash-metrics {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 32px;
}
.dash-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}
.dm-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
}
.dm-value {
  font-size: 3rem;
  font-weight: 900;
  font-family: "Fira Code", monospace;
  line-height: 1;
}
.text-glow-green {
  color: #10b981;
  text-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}
.text-glow-cyan {
  color: var(--cyan);
  text-shadow: 0 0 15px rgba(6, 182, 212, 0.4);
}
.dash-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  width: 100%;
}
.dash-disclaimer {
  font-size: 0.75rem;
  color: #888;
  text-align: center;
  margin-bottom: 24px;
  font-style: italic;
}

@media (max-width: 768px) {
  .estimator-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .estimator-dashboard {
    position: static;
  }
}

/* Pulse Loader for Live Stats */
.pulse-loader {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #06b6d4;
  border-radius: 50%;
  margin-right: 8px;
  animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.9); opacity: 0.7; box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.4); }
  70% { transform: scale(1.1); opacity: 1; box-shadow: 0 0 0 10px rgba(6, 182, 212, 0); }
  100% { transform: scale(0.9); opacity: 0.7; box-shadow: 0 0 0 0 rgba(6, 182, 212, 0); }
}

/* Scroll Reveal Animations */
.reveal-hidden {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity, transform;
}
.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Vanilla Tilt 3D Elements */
.project-card, .service-card, .dashboard-card {
  transform-style: preserve-3d;
}
.project-card h3, .project-card .project-icon, 
.service-card h3, .service-card .service-icon {
  transform: translateZ(30px);
}
.project-card p, .service-card p {
  transform: translateZ(20px);
}

/* Magnetic Button Transition */
.btn, .social-btn, .nav-cta, .filter-btn {
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), background-color 0.3s, color 0.3s;
  will-change: transform;
}
