/* =========================================================================
   PORTFOLIO DESIGN SYSTEM V3 (Scrollytelling + Elementor Safe)
   Dark Mode, Neon Accents, Glassmorphism
========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;800&display=swap');

/* =========================================================================
   CINEMATIC NEON PRELOADER
   ========================================================================= */
.mz-preloader {
  position: fixed;
  inset: 0;
  background: #0a0a0a;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease-out, visibility 0.6s;
}
.mz-donut-spinner {
  position: relative;
  width: 150px;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Add slight rotating gradient effect to the container */
  animation: rotateDonutContainer 8s linear infinite;
}
@keyframes rotateDonutContainer {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.mz-donut-spinner svg {
  transform: rotate(-90deg); /* Counteract container rotation for the number visually */
  width: 100%;
  height: 100%;
  position: absolute;
}
.mz-donut-bg {
  fill: none;
  stroke: #1a1a1a; 
  stroke-width: 8;
}
.mz-donut-progress {
  fill: none;
  stroke: url(#neonGradient); /* SVG gradient defined in HTML */
  stroke-width: 8;
  stroke-dasharray: 314;
  stroke-dashoffset: 314; /* Starts hidden at 0% */
  transition: stroke-dashoffset 0.3s ease;
  stroke-linecap: round;
  /* Add subtle pulse glow animation */
  filter: drop-shadow(0 0 15px #00f0ff);
  animation: donutPulse 2s infinite alternate ease-in-out;
}
@keyframes donutPulse {
  0% { filter: drop-shadow(0 0 10px #00f0ff); stroke-width: 7; }
  100% { filter: drop-shadow(0 0 25px #8a2be2); stroke-width: 9; }
}
.mz-percent-text {
  position: absolute;
  /* Counteract the container spinning so text remains upright rigidly */
  animation: counterRotateText 8s linear infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}
@keyframes counterRotateText {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(-360deg); }
}

:root {
  /* Colors */
  --bg-color: #0a0a0a;
  --accent-blue: #00f0ff;
  --accent-purple: #8a2be2;
  --text-main: #ffffff;
  --text-muted: #b0b0b0;
  
  /* Overlays & Glass */
  --overlay-dark: rgba(0, 0, 0, 0.4);
  --glass-bg: rgba(18, 18, 18, 0.5);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-blur: blur(12px);
  
  /* Layout */
  --nav-height: 90px; /* Reduced to match sleek pill aesthetics */
  --max-width: 1200px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

/* Base Scope */
body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
  box-sizing: border-box;
}

*, *::before, *::after {
  box-sizing: inherit;
}

a {
  text-decoration: none;
  color: inherit;
}

.gradient-text {
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  filter: drop-shadow(0 0 12px rgba(0, 240, 255, 0.5));
}

/* Glassmorphism Utilities */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(0, 240, 255, 0.15);
  border-radius: 12px;
  box-shadow: inset 0 0 20px rgba(0, 240, 255, 0.05);
}

/* =========================================================================
   HEADER & NAVBAR (Floating Pill Design)
========================================================================= */
header.mz-header {
  position: fixed;
  top: 20px; left: 50%;
  transform: translateX(-50%);
  width: 95%; max-width: 1400px;
  height: 70px; /* Reduced for a sleeker profile */
  border-radius: 40px; /* Tighter rounding mapping height */
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  
  /* Premium Liquid Glass Effect */
  background: rgba(18, 18, 18, 0.25);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.08); /* Full border wrapper instead of bottom */
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4), inset 0 0 20px rgba(255, 255, 255, 0.02);
}

.mz-nav-container {
  width: 100%;
  max-width: var(--max-width);
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mz-logo-container img {
  height: 40px;
  width: auto;
  object-fit: contain;
}

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

.mz-nav-links li a {
  font-size: 0.95rem;
  font-weight: 400;
  position: relative;
  transition: color 0.3s ease;
}

.mz-nav-links li a:hover {
  color: var(--accent-blue);
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

/* Mobile Toggle */
.mz-mobile-toggle {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 5001;
}

/* =========================================================================
   SECTION 1: CANVAS SCROLLYTELLING
========================================================================= */
.mz-scrolly-wrapper {
  position: relative;
  width: 100%;
  height: 500vh; /* Determines the scroll duration */
  background: var(--bg-color);
  z-index: 10;
}

.mz-sticky-canvas {
  position: sticky;
  top: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

canvas#mz-scroll-canvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* Scrollytelling Overlay */
.mz-scrolly-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: var(--overlay-dark);
  z-index: 2;
  pointer-events: none;
}

/* Text Layers mapping Cinematic Center Lower-Third Offset */
.mz-text-layer {
  position: absolute;
  top: 85%; /* Pushed to the extreme bottom baseline completely avoiding the subject */
  left: 50%; /* Force Center Layout */
  transform: translate(-50%, -50%);
  width: 100%; /* Recapture full viewport safe bounds */
  max-width: 900px;
  text-align: center;
  z-index: 3;
  opacity: 0;
  transition: opacity 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
  padding: 0 2rem;
  pointer-events: none;
  text-shadow: 0 4px 30px rgba(0,0,0,0.9); /* Heavy diffusion for text clarity */
}

.mz-text-layer h1 {
  font-size: 5rem;
  font-weight: 800;
  margin: 0 0 0.5rem 0;
  letter-spacing: -2px; /* Cinematic modern tracking */
}

.mz-text-layer h3, .mz-text-layer h2 {
  font-size: 1.8rem;
  font-weight: 500;
  color: #fff;
  opacity: 0.9;
  margin: 0;
  max-width: 600px;
  line-height: 1.4;
}

/* SECTION 2 RESERVED */

/* =========================================================================
   GLOBAL ABSTRACT DATA NETWORK (Behind UI)
========================================================================= */
canvas#mz-network-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: 0; /* Keep securely behind UI blocks but over base body */
  pointer-events: none; /* Mouse physics piped from window listener manually */
  opacity: 0.25; /* Hard constraint to not overpower glass panels */
}

/* =========================================================================
   STANDARD SECTIONS
========================================================================= */
.mz-section {
  padding: 6rem 2rem;
  position: relative;
  z-index: 30; /* Above backgrounds */
  max-width: var(--max-width);
  margin: 0 auto;
  background: var(--bg-color); /* ensures isolation unless transparent is desired */
}

.mz-section.transparent {
  background: transparent;
}

.mz-section h2.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 3rem;
}

/* =========================================================================
   SECTION 3: SKILLS
========================================================================= */
.mz-skills-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 800px;
  margin: 0 auto;
}

.mz-skill-row {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.mz-skill-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.mz-skill-track {
  width: 100%;
  height: 12px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.mz-skill-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #00f0ff, #8a2be2);
  border-radius: 6px;
  transition: width 2s ease;
}

.mz-skill-fill.active {
  box-shadow: 0 0 10px #00f0ff, 0 0 20px #00f0ff, 0 0 40px #00f0ff;
  animation: glowPulse 2s infinite;
}

@keyframes glowPulse {
  0% { box-shadow: 0 0 10px #00f0ff; }
  50% { box-shadow: 0 0 30px #00f0ff; }
  100% { box-shadow: 0 0 10px #00f0ff; }
}

/* =========================================================================
   SECTION 4: FEATURED PROJECTS (3D ARC)
========================================================================= */
.mz-3d-section {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden; 
  padding: 4rem 0;
  z-index: 20;
}

.mz-3d-scene {
  position: relative;
  width: 100%;
  height: 60vh;
  perspective: 1500px;
  transform-style: preserve-3d;
  margin: 3rem 0;
}

.mz-arc-track {
  position: absolute;
  top: 50%; left: 50%;
  width: 0; height: 0; 
  transform-style: preserve-3d;
}

.mz-3d-card {
  position: absolute;
  top: 0; left: 0;
  width: 340px; height: 460px;
  /* Transform matrix injected dynamically matching trigonometry coordinates */
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.mz-card-inner {
  position: relative;
  width: 100%; height: 100%;
  background: rgba(18, 18, 18, 0.6);
  border: 1px solid rgba(0, 240, 255, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: all 0.4s ease;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  cursor: pointer;
}

.mz-3d-card.active .mz-card-inner {
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.3), 0 0 50px rgba(138, 43, 226, 0.2);
  border-color: var(--accent-blue);
}

.mz-3d-card:hover .mz-card-inner {
  transform: translateY(-10px);
  box-shadow: 0 0 35px rgba(0, 240, 255, 0.5);
}

.mz-3d-img {
  width: 100%; height: 220px;
  object-fit: cover;
  transition: transform 0.4s;
}

.mz-3d-card:hover .mz-3d-img {
  transform: scale(1.05); /* Isolates image scale naturally */
}

/* Explicit overlay design rendering data boundaries implicitly natively */
.mz-data-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none;
  background-image: 
    linear-gradient(rgba(0, 240, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.05) 1px, transparent 1px);
  background-size: 20px 20px;
  z-index: 2;
  opacity: 0.5;
}

.mz-3d-info {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  z-index: 3;
}

.mz-3d-info h3 {
  margin: 0 0 0.5rem 0;
  color: #fff;
  font-size: 1.3rem;
}

.mz-3d-info p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.4;
  flex-grow: 1;
  margin: 0;
}

.mz-impact-tag {
  align-self: flex-start;
  background: rgba(138, 43, 226, 0.2);
  color: var(--accent-blue);
  padding: 0.4rem 1rem;
  margin-top: 1rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.9rem;
  border: 1px solid rgba(138, 43, 226, 0.4);
}

/* 3D specific Right-Side Navigation Dial Mapping Explicitly Out of the Matrix Boundary */
.mz-3d-arrows-wrapper {
  position: absolute; /* Frees button from flex constraints */
  right: 5%;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  z-index: 1000;
}

.mz-3d-arrows-wrapper button {
  width: 65px; height: 65px;
  border-radius: 50%;
  background: rgba(18, 18, 18, 0.4);
  border: 1px solid var(--accent-blue);
  backdrop-filter: blur(12px);
  color: #fff;
  font-size: 1.8rem;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.3), inset 0 0 10px rgba(0, 240, 255, 0.2); /* Deep permanent default neon glow */
  display: flex;
  justify-content: center;
  align-items: center;
}

.mz-3d-arrows-wrapper button:hover {
  background: var(--accent-blue);
  color: #000;
  box-shadow: 0 0 40px rgba(0, 240, 255, 0.9), inset 0 0 20px rgba(255, 255, 255, 0.5); /* Saturated extreme neon blast */
  transform: scale(1.15) translateY(-2px); /* Slight lift */
}

/* Base override resolving missing carousel controls fallback globally */
.mz-carousel-controls {
  display: flex;
  gap: 2rem;
  margin-top: 1rem;
  z-index: 50;
}

.mz-view-all-cta {
  display: inline-block;
  margin-top: 2rem;
  padding: 1rem 2.5rem;
  background: transparent;
  color: var(--accent-blue);
  border: 2px solid var(--accent-blue);
  border-radius: 30px;
  font-weight: bold;
  font-family: inherit;
  font-size: 1.1rem;
  transition: all 0.3s;
  cursor: pointer;
  z-index: 100;
}

.mz-view-all-cta:hover {
  background: var(--accent-blue);
  color: #000;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.6);
  transform: scale(1.05);
}

/* =========================================================================
   SECTION 5: ADVANCED CERTIFICATIONS SLIDER
========================================================================= */
.mz-advanced-slider {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: #0a0a0a; 
  margin-bottom: 2rem;
}

.mz-slider-list {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
}

.mz-slider-item {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 250px;
  height: 350px;
  border-radius: 20px;
  background-size: cover;
  background-position: center;
  transition: all 0.6s cubic-bezier(0.25, 1.0, 0.5, 1.0);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  cursor: pointer;
  overflow: hidden;
}

/* Background overlay mapped natively BEFORE transition occurs */
.mz-slider-item::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(0deg, rgba(0,0,0,0.9) 0%, transparent 60%);
  transition: background 0.6s;
  z-index: 1;
}

/* Hover lift explicitly handling right queue */
.mz-slider-item:not(:nth-child(1)):hover {
  transform: translateY(calc(-50% - 13px));
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.4), 0 0 40px rgba(138, 43, 226, 0.3);
  border: 1px solid var(--accent-blue);
}

/* --- STATE 1: ACTIVE BACKGROUND INFLATION --- */
.mz-slider-item:nth-child(1) {
  top: 0; left: 0;
  width: 100%; height: 100%;
  transform: translateY(0);
  border-radius: 0;
  box-shadow: none;
  cursor: default;
}

.mz-slider-item:nth-child(1)::before {
  background: rgba(0, 0, 0, 0.65); /* Ambient dark overlay immediately applied */
}

/* --- STATE QUEUE: RIGHT ALIGNMENT MAP --- */
.mz-slider-item:nth-child(2) {
  left: 55%;
}

.mz-slider-item:nth-child(3) {
  left: calc(55% + 280px); /* 250 width + 30 gap */
}

.mz-slider-item:nth-child(4) {
  left: calc(55% + 560px);
}

.mz-slider-item:nth-child(n+5) {
  left: calc(55% + 840px);
  opacity: 0; /* Stalled hidden queue */
  pointer-events: none;
}

/* --- Content Block Visibility Logic --- */
.mz-slider-content {
  position: absolute;
  top: 50%;
  left: 10%;
  transform: translateY(-50%);
  width: 500px;
  color: #fff;
  opacity: 0;
  display: none;
  z-index: 2;
  transition: opacity 0.6s;
}

.mz-slider-item:nth-child(1) .mz-slider-content {
  display: block;
  opacity: 1;
  animation: slideUpContent 0.6s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes slideUpContent {
  from { opacity: 0; transform: translateY(-30%); }
  to { opacity: 1; transform: translateY(-50%); }
}

/* --- Navigation Arrows Map Bottom-Center --- */
.mz-slider-arrows {
  position: absolute;
  bottom: 5%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 1.5rem;
  z-index: 100;
}

.mz-slider-arrows button {
  width: 55px; height: 55px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.mz-slider-arrows button:hover {
  background: var(--accent-blue);
  color: #000;
  transform: scale(1.15);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.7);
}

/* =========================================================================
   SECTION 6: CYBERNETIC TIMELINE
========================================================================= */
.mz-timeline-cybernetic {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 4rem 0;
}

/* Base Grey Conduit */
.mz-timeline-track {
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 3px;
  background: rgba(255, 255, 255, 0.05); /* Extremely dim base wire */
  transform: translateX(-50%);
  z-index: 1;
}

/* Neon Plasma Beam mapped against scroll */
.mz-timeline-beam {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 0%; /* Natively driven by Javascript */
  background: linear-gradient(to bottom, transparent, var(--accent-blue));
  box-shadow: 0 10px 20px var(--accent-blue); /* Pushes glow strongly downwards towards the active node */
  transition: height 0.1s ease-out; 
}

/* Node Wrappers */
.mz-timeline-node {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: flex-end; /* Right side default */
  padding-right: 0;
  margin-bottom: 4rem;
  opacity: 0.3; /* Cleaner baseline */
  transition: all 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.mz-timeline-node.left {
  justify-content: flex-start;
}

.mz-timeline-node.active {
  opacity: 1;
  filter: grayscale(0);
}

.mz-timeline-node:last-child {
  margin-bottom: 0;
}

/* 50% split targeting */
.mz-timeline-node .mz-node-content {
  width: 45%; /* Keeps boundary clear of the central 50% wire */
  padding: 2rem;
  position: relative;
  z-index: 5;
  transition: transform 0.4s, box-shadow 0.6s;
  border: 1px solid rgba(255,255,255,0.05); /* Stealth resting border */
}

.mz-timeline-node.active .mz-node-content {
  transform: scale(1);
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.25), inset 0 0 10px rgba(0, 240, 255, 0.1);
  border-color: rgba(0, 240, 255, 0.4); /* Elegant glowing outline mapping active timeline position */
}
.mz-timeline-node .mz-node-content {
  transform: scale(0.9);
}

/* Marker anchor */
.mz-node-marker {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 18px; height: 18px;
  background: var(--bg-color);
  border: 2px solid rgba(255,255,255,0.1);
  border-radius: 50%;
  z-index: 10;
  transition: all 0.5s;
}

.mz-timeline-node.active .mz-node-marker {
  border-color: var(--accent-blue);
  background: var(--accent-blue);
  box-shadow: 0 0 15px var(--accent-blue), 0 0 30px rgba(0, 240, 255, 0.5); /* Massive focus point */
}

/* =========================================================================
   SECTION 7: CONTACT
========================================================================= */
.mz-contact-form {
  max-width: 600px;
  margin: 0 auto;
  padding: 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.mz-input-group {
  display: flex;
  flex-direction: column;
}

.mz-input-group label {
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-muted);
}

.mz-input-group input,
.mz-input-group textarea {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 1rem;
  color: var(--text-main);
  font-family: inherit;
  outline: none;
}

.mz-input-group input:focus,
.mz-input-group textarea:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
}

.mz-btn-submit {
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
  color: #fff;
  border: none;
  border-radius: 30px;
  padding: 1rem 2rem;
  font-weight: bold;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

.mz-btn-submit:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.6), 0 0 40px rgba(138, 43, 226, 0.4);
}

/* =========================================================================
   SECTION 8: CHATBOT
========================================================================= */
.mz-chatbot {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 8000;
}

.mz-chat-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--accent-blue);
  color: var(--bg-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.8rem;
  cursor: pointer;
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.6);
  transition: all 0.3s;
  animation: glowPulse 3s infinite;
}

.mz-chat-btn:hover {
  transform: scale(1.15);
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.9);
}

.mz-chat-window {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 300px;
  background: rgba(18, 18, 18, 0.95);
  border: 1px solid var(--accent-blue);
  border-radius: 12px;
  overflow: hidden;
  display: none;
  flex-direction: column;
}

.mz-chat-window.open {
  display: flex;
}

.mz-chat-header {
  background: var(--accent-blue);
  color: var(--bg-color);
  padding: 1rem;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
}

.mz-chat-body {
  padding: 1.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.mz-chat-close {
  cursor: pointer;
}

/* =========================================================================
   PROJECT PAGE (projects.html)
========================================================================= */
.mz-detail-container {
  padding-top: calc(var(--nav-height) + 3rem);
  max-width: 900px;
  margin: 0 auto;
  padding-bottom: 5rem;
  position: relative;
  z-index: 30;
}

.mz-btn-back {
  display: inline-block;
  margin-bottom: 2rem;
  color: var(--accent-blue);
  border: 1px solid var(--accent-blue);
  padding: 0.5rem 1.5rem;
  border-radius: 20px;
  transition: all 0.3s;
}

.mz-btn-back:hover {
  background: var(--accent-blue);
  color: var(--bg-color);
  box-shadow: 0 0 10px var(--accent-blue);
}

.mz-detail-hero img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 2rem;
}

.mz-detail-block {
  margin-bottom: 2rem;
  padding: 2rem;
}

.mz-detail-block h3 {
  color: var(--accent-purple);
  margin-top: 0;
  font-size: 1.5rem;
}

.mz-detail-block p {
  color: var(--text-muted);
  line-height: 1.8;
  font-size: 1.1rem;
  margin: 0;
}

/* =========================================================================
   MOBILE RESPONSIVENESS (CRITICAL)
========================================================================= */
@media (max-width: 768px) {
  .mz-nav-links {
    position: fixed;
    top: var(--nav-height);
    right: -100%;
    width: 250px;
    height: 100vh;
    background: rgba(18, 18, 18, 0.98);
    flex-direction: column;
    padding: 3rem 2rem;
    transition: right 0.4s ease;
  }
  .mz-nav-links.active {
    right: 0;
  }
  .mz-mobile-toggle {
    display: block;
  }
  .mz-text-layer h1 {
    font-size: 2.5rem;
  }
  .mz-parallax-content h2 {
    font-size: 2.2rem;
  }
  .mz-card {
    min-width: 280px;
    width: 320px;
  }
  /* Ensure canvas scales nicely */
  /* Slider Restructuring Constraint */
  .mz-slider-item:nth-child(2) { left: 5%;   top: 75%; width: 140px; height: 200px; }
  .mz-slider-item:nth-child(3) { left: 50%;  top: 75%; width: 140px; height: 200px; }
  .mz-slider-item:nth-child(4) { left: 95%;  top: 75%; width: 140px; height: 200px; }
  .mz-slider-content { left: 5%; width: 90%; top: 35%; }
  .mz-slider-content h2.gradient-text { font-size: 2.2rem !important; }

  /* Mobile override collapsing 3D right arrows safely to standard bottom center bindings */
  .mz-3d-arrows-wrapper {
    position: relative;
    right: auto;
    top: auto;
    transform: none;
    flex-direction: row;
    justify-content: center;
    margin-top: 2rem;
  }
  
  /* Cybernetic Node Mobile Override Mapping Left Safety Bounds */
  .mz-timeline-track {
    left: 20px;
    transform: none;
  }
  
  .mz-timeline-node, .mz-timeline-node.left {
    justify-content: flex-start;
    padding-left: 50px;
  }
  
  .mz-timeline-node .mz-node-content {
    width: 100%;
  }
  
  .mz-node-marker {
    left: 20px;
  }
}
