/* ==========================================================================
   LIQUID GLASS WATER DROPLET PORTFOLIO DESIGN SYSTEM
   Developer: Ravi Kumar Gangwar (Java Developer)
   Aesthetic: Water Droplet, Glassmorphism, Deep Dark Void, Cyan/Blue Glow
   ========================================================================== */

/* 1. TOKENS & DESIGN VARIABLES */
:root {
  --bg-dark: #050914;
  --bg-dark-surface: #0a1124;
  --bg-glass: rgba(12, 22, 45, 0.45);
  --bg-glass-hover: rgba(18, 32, 64, 0.65);
  --border-glass: rgba(0, 242, 255, 0.18);
  --border-glass-bright: rgba(0, 242, 255, 0.45);
  
  --accent-cyan: #00f2ff;
  --accent-aqua: #00a8ff;
  --accent-blue: #0055ff;
  --accent-indigo: #4361ee;
  
  --text-primary: #f0f6fc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-code: 'Fira Code', monospace;

  --shadow-droplet: 0 16px 40px rgba(0, 242, 255, 0.15), inset 0 2px 3px rgba(255, 255, 255, 0.25);
  --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
  
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-full: 9999px;
  
  --transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 2. BASE & RESET */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-main);
  overflow-x: hidden !important;
  width: 100%;
}

body {
  position: relative;
  min-height: 100vh;
  line-height: 1.6;
  width: 100%;
  overflow-x: hidden !important;
}

img, video, canvas, svg {
  max-width: 100%;
}

/* ==========================================================================
   DYNAMIC AMBIENT CURSOR RADIAL GLOW FOLLOWER
   ========================================================================== */
#cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(
    circle, 
    rgba(99, 102, 241, 0.15) 0%,   /* Inner Indigo Glow */
    rgba(6, 182, 212, 0.05) 50%,   /* Outer Cyan Haze */
    transparent 70%
  );
  pointer-events: none;             /* Prevents blocking clicks or selection */
  transform: translate(-50%, -50%); /* Centers 600px circle on mouse tip */
  z-index: 1;                       /* Layered above dark background */
  transition: transform 0.1s ease-out; /* Smooth trailing spring effect */
}

/* BACKGROUND CANVAS */
#liquid-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
}

/* UTILITY GLASSMORPHISM CLASSES */
.glass-card {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-glass);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.glass-card:hover {
  border-color: var(--border-glass-bright);
  box-shadow: 0 12px 40px rgba(0, 242, 255, 0.2);
}

.text-cyan { color: var(--accent-cyan); }
.text-center { text-align: center; }

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.8rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  text-decoration: none;
  border: none;
  transition: var(--transition);
}

.glass-btn {
  background: rgba(0, 242, 255, 0.08);
  border: 1px solid var(--border-glass-bright);
  color: var(--text-primary);
  backdrop-filter: blur(10px);
}

.glass-btn:hover {
  background: var(--accent-cyan);
  color: var(--bg-dark);
  box-shadow: 0 0 25px rgba(0, 242, 255, 0.6);
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  color: var(--bg-dark);
}

.btn-primary:hover {
  box-shadow: 0 0 30px rgba(0, 242, 255, 0.7);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.5rem 1.1rem;
  font-size: 0.85rem;
}

.btn-cyan {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

/* 3. NAVIGATION */
.navbar-wrapper {
  position: fixed;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 92%;
  max-width: 1200px;
  z-index: 1000;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 2rem;
  background: rgba(5, 9, 20, 0.65);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  transition: var(--transition);
}

.navbar.scrolled {
  background: rgba(10, 17, 36, 0.92);
  border-color: var(--border-glass-bright);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.25rem;
}

.brand-droplet {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 35% 35%, rgba(0, 242, 255, 0.28) 0%, rgba(5, 9, 20, 0.85) 75%);
  border: 1.5px solid var(--border-glass-bright);
  box-shadow: 0 0 16px rgba(0, 242, 255, 0.4), inset 0 0 8px rgba(0, 242, 255, 0.2);
  overflow: hidden;
  transition: var(--transition);
  flex-shrink: 0;
  position: relative;
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.18);
  filter: drop-shadow(0 0 6px rgba(0, 242, 255, 0.45));
  display: block;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s ease;
}

.nav-brand:hover .brand-droplet {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 25px rgba(0, 242, 255, 0.75), inset 0 0 10px rgba(0, 242, 255, 0.35);
}

.nav-brand:hover .brand-logo-img {
  transform: scale(1.26) rotate(6deg);
  filter: drop-shadow(0 0 12px rgba(0, 242, 255, 0.85)) brightness(1.12);
}

.brand-accent { 
  color: var(--accent-cyan); 
  text-shadow: 0 0 12px rgba(0, 242, 255, 0.4);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.8rem;
  list-style: none;
}

.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
  color: var(--accent-cyan);
}

.mobile-toggle {
  display: none !important;
}

/* 4. SECTIONS COMMON */
.section {
  padding: 6rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  background: rgba(0, 242, 255, 0.1);
  border: 1px solid var(--border-glass-bright);
  border-radius: var(--radius-full);
  color: var(--accent-cyan);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.section-heading {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #ffffff, var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-sub {
  color: var(--text-muted);
  font-size: 1rem;
  margin-top: 0.4rem;
}

.heading-underline {
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue));
  margin: 0.8rem auto 2.5rem;
  border-radius: var(--radius-full);
}

/* 5. HERO SECTION */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 7.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-container {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3.5rem;
  align-items: center;
  width: 100%;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 1.1rem;
  font-size: 0.85rem;
  border-radius: var(--radius-full);
  margin-bottom: 1.5rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-cyan);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-cyan);
  animation: pulseGlow 1.8s infinite;
}

@keyframes pulseGlow {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0.5; }
}

.hero-name {
  font-size: 3.6rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #ffffff 40%, var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-title {
  font-size: 1.5rem;
  color: var(--accent-cyan);
  font-family: var(--font-code);
  margin-bottom: 1.2rem;
}

.cursor-blink {
  animation: blink 1s infinite;
}

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.hero-bio {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin-bottom: 2.2rem;
}

.hero-actions {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
}

/* 3D Frosted Ice Cube Visual with Photograph */
.hero-visual {
  display: flex;
  justify-content: center;
  position: relative;
}

.ice-cube-container {
  position: relative;
  width: 320px;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1000px;
}

/* Cold Icy Glow Rings */
.ice-ring {
  position: absolute;
  border-radius: 40px;
  border: 1px dashed rgba(0, 242, 255, 0.3);
  pointer-events: none;
  animation: iceRingRotate 25s linear infinite;
}

.ice-ring.ring-1 {
  width: 310px;
  height: 310px;
  box-shadow: 0 0 35px rgba(0, 242, 255, 0.18);
}

.ice-ring.ring-2 {
  width: 335px;
  height: 335px;
  border: 1px dotted rgba(255, 255, 255, 0.25);
  animation-direction: reverse;
  animation-duration: 38s;
}

@keyframes iceRingRotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Central 3D Animated Ice Cube Crystal Block */
.ice-cube-3d {
  width: 270px;
  height: 270px;
  border-radius: 28px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.55);
  box-shadow: 
    inset 0 0 0 1px rgba(255, 255, 255, 0.25),
    0 20px 50px rgba(0, 0, 0, 0.65),
    0 0 40px rgba(0, 242, 255, 0.22);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transform-style: preserve-3d;
  animation: iceCubeFloat 6.5s ease-in-out infinite alternate;
  transition: border-color 0.4s ease, box-shadow 0.4s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.ice-cube-3d:hover {
  border-color: rgba(255, 255, 255, 0.85);
  box-shadow: 
    inset 0 0 0 1px rgba(255, 255, 255, 0.4),
    0 25px 60px rgba(0, 0, 0, 0.75),
    0 0 55px rgba(0, 242, 255, 0.4);
}

@keyframes iceCubeFloat {
  0% {
    transform: perspective(1000px) rotateX(4deg) rotateY(-5deg) translateY(0px);
  }
  50% {
    transform: perspective(1000px) rotateX(2deg) rotateY(-2deg) translateY(-12px);
  }
  100% {
    transform: perspective(1000px) rotateX(6deg) rotateY(-7deg) translateY(6px);
  }
}

.portrait-ice-cube {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* User Portrait inside the Ice Cube - Crystal Clear & Vibrant */
.hero-portrait {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 8%;
  border-radius: 26px;
  filter: contrast(1.05) saturate(1.03);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s ease;
  will-change: transform;
}

.ice-cube-3d:hover .hero-portrait {
  transform: scale(1.06);
  filter: contrast(1.07) saturate(1.05);
}

/* Subtle bottom vignette only behind badges (face remains 100% crystal clear) */
.ice-frost-overlay {
  position: absolute;
  inset: 0;
  border-radius: 26px;
  background: linear-gradient(180deg, transparent 65%, rgba(5, 12, 26, 0.5) 100%);
  pointer-events: none;
  z-index: 2;
}

/* Disabled facet to eliminate any whitish film over the face */
.ice-prism-facet {
  display: none;
}

/* Dynamic ice specular sheen sweep ONLY on hover */
.ice-specular-shine {
  position: absolute;
  top: -120%;
  left: -120%;
  width: 340%;
  height: 340%;
  background: linear-gradient(
    125deg,
    transparent 45%,
    rgba(255, 255, 255, 0.22) 50%,
    transparent 55%
  );
  transform: translateY(-100%) rotate(25deg);
  pointer-events: none;
  z-index: 4;
  opacity: 0;
  transition: transform 0.85s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.ice-cube-3d:hover .ice-specular-shine {
  opacity: 1;
  transform: translateY(100%) rotate(25deg);
}

/* Inner 3D ice bevel chamfer line along the edge */
.ice-cube-bevel {
  position: absolute;
  inset: 5px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  pointer-events: none;
  z-index: 3;
}

/* Floating Badges pinned at bottom center */
.hero-photo-badges {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 5;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.ice-cube-3d:hover .hero-photo-badges {
  transform: translateX(-50%) translateY(-3px) scale(1.04);
}

.photo-badge {
  background: rgba(5, 9, 20, 0.88);
  border: 1px solid var(--border-glass-bright);
  color: var(--accent-cyan);
  padding: 0.28rem 0.7rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.45);
}

.orbiting-node {
  position: absolute;
  width: 44px;
  height: 44px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass-bright);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(0, 242, 255, 0.3);
  animation: orbit 12s linear infinite;
}

.node-1 { top: 0; left: 50%; }
.node-2 { bottom: 20px; left: 10px; animation-delay: -4s; }
.node-3 { bottom: 20px; right: 10px; animation-delay: -8s; }

@keyframes orbit {
  0% { transform: rotate(0deg) translate(140px) rotate(0deg); }
  100% { transform: rotate(360deg) translate(140px) rotate(-360deg); }
}

/* 6. ABOUT SECTION */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
}

.about-card {
  padding: 2.2rem;
}

.about-header {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-bottom: 1.5rem;
}

.avatar-photo-wrap {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--accent-cyan);
  box-shadow: 0 0 15px rgba(0, 242, 255, 0.4);
  flex-shrink: 0;
}

.about-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
}

.about-text {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-size: 1rem;
}

.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

.glass-pill {
  padding: 0.35rem 0.9rem;
  background: rgba(0, 242, 255, 0.06);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  color: var(--text-primary);
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.stat-card {
  padding: 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.stat-icon {
  font-size: 1.6rem;
  color: var(--accent-cyan);
  margin-bottom: 0.5rem;
}

.stat-number {
  font-size: 2.2rem;
  font-weight: 800;
  display: inline-block;
}

.stat-plus {
  display: inline-block;
  font-size: 1.8rem;
  color: var(--accent-cyan);
  font-weight: 700;
}

.stat-text-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent-cyan);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* 7. SKILLS SECTION */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}

.skill-card {
  padding: 1.8rem 1.4rem;
  text-align: center;
}

.primary-skill-card {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 25px rgba(0, 242, 255, 0.25);
}

.skill-badge-top {
  position: absolute;
  top: 10px;
  right: 12px;
  background: var(--accent-cyan);
  color: var(--bg-dark);
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
}

.skill-icon-wrap {
  font-size: 2.4rem;
  color: var(--accent-cyan);
  margin-bottom: 0.8rem;
  transition: transform 0.3s ease;
}

.skill-card:hover .skill-icon-wrap {
  transform: scale(1.2) rotate(5deg);
}

.skill-name {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.skill-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* 8. WHY JAVA? SECTION */
.why-java-container {
  position: relative;
  margin-top: 3rem;
}

.java-core-sphere {
  width: 140px;
  height: 140px;
  margin: 0 auto 3rem;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 50px rgba(0, 242, 255, 0.5);
  animation: pulseSphere 3s ease-in-out infinite alternate;
}

@keyframes pulseSphere {
  0% { transform: scale(1); box-shadow: 0 0 30px rgba(0, 242, 255, 0.4); }
  100% { transform: scale(1.08); box-shadow: 0 0 60px rgba(0, 242, 255, 0.7); }
}

.sphere-core {
  text-align: center;
  color: var(--bg-dark);
  font-weight: 800;
}

.core-logo { font-size: 2.5rem; }

.nodes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.8rem;
}

.java-node {
  padding: 1.6rem;
}

.node-icon {
  font-size: 1.8rem;
  color: var(--accent-cyan);
  margin-bottom: 0.6rem;
}

.java-node h4 {
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}

.java-node p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* 9. PROJECTS SECTION */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.8rem;
}

.project-card {
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.project-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.project-category {
  font-size: 0.75rem;
  color: var(--accent-cyan);
  font-weight: 600;
}

.project-icon-badge {
  width: 36px;
  height: 36px;
  background: rgba(0, 242, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
}

.project-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.project-description {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1.2rem;
}

.project-features {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
}

.project-tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.tech-badge {
  font-size: 0.75rem;
  font-family: var(--font-code);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  color: var(--text-primary);
}

.project-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

/* 9.5 WORK EXPERIENCE SECTION */
.experience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.8rem;
}

.experience-card {
  padding: 2rem 1.8rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.experience-glow {
  position: absolute;
  top: -30px;
  right: -30px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(0, 242, 255, 0.18) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  transition: var(--transition);
}

.experience-card:hover .experience-glow {
  transform: scale(1.3);
  background: radial-gradient(circle, rgba(0, 242, 255, 0.28) 0%, transparent 70%);
}

.experience-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.experience-type-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-cyan);
  background: rgba(0, 242, 255, 0.1);
  border: 1px solid var(--border-glass-bright);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.experience-icon-badge {
  width: 38px;
  height: 38px;
  background: rgba(0, 242, 255, 0.1);
  border: 1px solid var(--border-glass);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  font-size: 1.1rem;
  transition: var(--transition);
}

.experience-card:hover .experience-icon-badge {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(0, 242, 255, 0.4);
  transform: rotate(6deg) scale(1.08);
}

.experience-role-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.experience-company {
  font-size: 1rem;
  color: var(--accent-cyan);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}

.experience-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-family: var(--font-code);
  margin-bottom: 1.2rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-glass);
}

.experience-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.experience-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.2rem;
}

.experience-features {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  list-style: none;
  margin-bottom: 1.5rem;
}

.experience-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.experience-features li i {
  color: var(--accent-cyan);
  margin-top: 0.25rem;
  flex-shrink: 0;
  font-size: 0.78rem;
}

.experience-tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* 10. JOURNEY / TIMELINE SECTION */
.timeline-container {
  position: relative;
  max-width: 800px;
  margin: 3rem auto 0;
}

.timeline-liquid-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--accent-cyan), var(--accent-blue));
  transform: translateX(-50%);
  border-radius: var(--radius-full);
  box-shadow: 0 0 15px var(--accent-cyan);
}

.timeline-items {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.timeline-item {
  display: flex;
  align-items: center;
  position: relative;
  width: 50%;
}

.timeline-item.left {
  align-self: flex-start;
  padding-right: 2.5rem;
}

.timeline-item.right {
  align-self: flex-end;
  padding-left: 2.5rem;
}

.timeline-dot {
  position: absolute;
  width: 32px;
  height: 32px;
  background: var(--bg-dark);
  border: 2px solid var(--accent-cyan);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  font-size: 0.75rem;
  z-index: 2;
}

.timeline-item.left .timeline-dot { right: -16px; }
.timeline-item.right .timeline-dot { left: -16px; }

.timeline-content {
  padding: 1.5rem;
  width: 100%;
}

.timeline-year {
  font-family: var(--font-code);
  color: var(--accent-cyan);
  font-weight: 700;
  font-size: 0.9rem;
}

/* 11. DSA & ALGORITHM VISUALIZER */
.dsa-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.2rem;
  margin-bottom: 2.5rem;
}

.dsa-card {
  padding: 1.4rem;
}

.dsa-icon {
  font-size: 1.5rem;
  color: var(--accent-cyan);
  margin-bottom: 0.5rem;
}

.algo-visualizer-container {
  padding: 2rem;
}

.algo-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.algo-controls {
  display: flex;
  gap: 0.6rem;
}

.algo-bars-area {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0.5rem;
  height: 180px;
  padding: 1rem;
  background: rgba(5, 9, 20, 0.6);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-glass);
}

.algo-bar {
  flex: 1;
  max-width: 30px;
  background: linear-gradient(180deg, var(--accent-cyan), var(--accent-blue));
  border-radius: 4px 4px 0 0;
  transition: height 0.2s ease, background-color 0.2s;
}

.algo-bar.active-bar {
  background: #ff0055 !important;
  box-shadow: 0 0 15px #ff0055;
}

.algo-status {
  margin-top: 1rem;
  font-family: var(--font-code);
  font-size: 0.85rem;
  color: var(--accent-cyan);
  text-align: center;
}

/* 12. CONTACT SECTION */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 2rem;
}

.contact-info-wrap {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.contact-info-card {
  padding: 1.4rem;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  text-decoration: none;
  color: var(--text-primary);
}

.contact-icon {
  width: 48px;
  height: 48px;
  background: rgba(0, 242, 255, 0.1);
  border: 1px solid var(--border-glass-bright);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  font-size: 1.2rem;
}

.contact-form-card {
  padding: 2rem;
}

.form-group {
  margin-bottom: 1.2rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  background: rgba(5, 9, 20, 0.7);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-main);
  outline: none;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(0, 242, 255, 0.3);
}

.btn-block { width: 100%; }

.form-toast {
  margin-top: 1.2rem;
  padding: 0.9rem 1.2rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  display: none;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.form-toast.success {
  background: rgba(0, 242, 255, 0.15);
  border: 1px solid var(--accent-cyan);
  color: var(--accent-cyan);
}

.form-toast.error {
  background: rgba(255, 0, 85, 0.15);
  border: 1px solid #ff0055;
  color: #ff0055;
}

/* 13. FOOTER & MODAL */
.footer {
  border-top: 1px solid var(--border-glass);
  padding: 2rem 1.5rem;
  margin-top: 4rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-logo-wrap {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  border: 1.5px solid var(--border-glass-bright);
  box-shadow: 0 0 12px rgba(0, 242, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 35% 35%, rgba(0, 242, 255, 0.25) 0%, rgba(5, 9, 20, 0.85) 75%);
  flex-shrink: 0;
  transition: var(--transition);
}

.footer-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.18);
  filter: drop-shadow(0 0 5px rgba(0, 242, 255, 0.4));
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s ease;
  display: block;
}

.footer-brand:hover .footer-logo-wrap {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 20px rgba(0, 242, 255, 0.65), inset 0 0 8px rgba(0, 242, 255, 0.3);
}

.footer-brand:hover .footer-logo-img {
  transform: scale(1.24) rotate(6deg);
  filter: drop-shadow(0 0 10px rgba(0, 242, 255, 0.8)) brightness(1.1);
}

.footer-socials {
  display: flex;
  gap: 1rem;
}

.footer-socials a {
  color: var(--text-secondary);
  font-size: 1.1rem;
  transition: var(--transition);
}

.footer-socials a:hover {
  color: var(--accent-cyan);
}

/* RESUME MODAL */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(5, 9, 20, 0.85);
  backdrop-filter: blur(12px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  width: 90%;
  max-width: 650px;
  padding: 2.5rem;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 2rem;
}

/* ==========================================================================
   CERTIFICATIONS & RESUME ENHANCEMENT STYLES
   ========================================================================== */

/* CERTIFICATIONS GRID */
.certs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.8rem;
}

.cert-card {
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.8rem;
}

.cert-actions {
  margin-top: auto;
  padding-top: 0.8rem;
  display: flex;
}

.cert-icon-wrap {
  width: 48px;
  height: 48px;
  background: rgba(0, 242, 255, 0.1);
  border: 1px solid var(--border-glass-bright);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 0.4rem;
}

.cert-title {
  font-size: 1.2rem;
  font-weight: 700;
}

.cert-issuer {
  font-size: 0.85rem;
  color: var(--accent-cyan);
  font-weight: 600;
}

.cert-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* RESUME SECTION */
.resume-container-card {
  padding: 2.2rem;
}

.resume-hero-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.2rem;
  padding-bottom: 1.5rem;
  margin-bottom: 1.8rem;
  border-bottom: 1px solid var(--border-glass);
}

.resume-hero-banner h3 {
  font-size: 1.4rem;
  font-weight: 700;
}

.resume-hero-banner p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.resume-banner-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.resume-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.resume-block {
  margin-bottom: 1.8rem;
}

.resume-block h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.resume-bullet-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.resume-bullet-list li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  position: relative;
  padding-left: 1.2rem;
}

.resume-bullet-list li::before {
  content: "•";
  color: var(--accent-cyan);
  font-weight: bold;
  position: absolute;
  left: 0;
}

@media (max-width: 768px) {
  .resume-details-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   14. RESPONSIVE BREAKPOINTS (SMARTPHONE, TABLET, LAPTOP)
   ========================================================================== */

@media (max-width: 992px) {
  .hero-container {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  .hero-name { font-size: 2.8rem; }
  .section { padding: 5rem 1.5rem; }

  .ice-cube-container,
  .droplet-container {
    width: 285px;
    height: 285px;
  }

  .ice-cube-3d,
  .water-droplet-3d {
    width: 245px;
    height: 245px;
    border-radius: 24px;
  }

  .ice-ring.ring-1 { width: 275px; height: 275px; }
  .ice-ring.ring-2 { width: 295px; height: 295px; }
}

@media (max-width: 768px) {
  /* DISABLE DESKTOP RADIAL GLOW ON TOUCH SCREENS */
  #cursor-glow,
  #ambient-radial-light, .ambient-radial-light,
  #cursor-core-pointer, .cursor-core-pointer {
    display: none !important;
  }

  html, body, a, button, input, textarea, select, label, .glass-card, .btn, .nav-link {
    cursor: auto !important;
  }

  /* UNCLIPPED MOBILE NAVBAR */
  .navbar-wrapper, .navbar {
    overflow: visible !important;
    z-index: 999999 !important;
  }

  .navbar-wrapper {
    width: 94%;
    top: 0.8rem;
  }

  .navbar {
    padding: 0.6rem 1.2rem;
    position: relative;
  }

  /* HAMBURGER TOGGLE BUTTON */
  .mobile-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: rgba(0, 242, 255, 0.15) !important;
    border: 1px solid var(--border-glass-bright) !important;
    border-radius: 50% !important;
    color: var(--accent-cyan) !important;
    font-size: 1.25rem !important;
    cursor: pointer !important;
    z-index: 1000000 !important;
    pointer-events: auto !important;
    touch-action: manipulation;
  }

  /* MOBILE MENU GLASS DRAWER */
  .nav-menu {
    position: fixed !important;
    top: 75px !important;
    left: 3vw !important;
    width: 94vw !important;
    background: rgba(5, 9, 20, 0.98) !important;
    backdrop-filter: blur(30px) !important;
    -webkit-backdrop-filter: blur(30px) !important;
    border: 1px solid var(--border-glass-bright) !important;
    border-radius: var(--radius-md) !important;
    flex-direction: column !important;
    padding: 1.8rem 1.2rem !important;
    gap: 1.2rem !important;
    align-items: center !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.95), 0 0 30px rgba(0, 242, 255, 0.3) !important;
    z-index: 999999 !important;

    /* Hidden by default on mobile until hamburger is clicked */
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateY(-15px) !important;
    transition: opacity 0.3s ease, transform 0.3s ease !important;
  }

  .nav-menu.active {
    display: flex !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: translateY(0) !important;
  }

  .nav-menu .nav-link {
    font-size: 1.1rem;
    padding: 0.6rem 1rem;
    width: 100%;
    text-align: center;
    border-bottom: 1px solid rgba(0, 242, 255, 0.08);
  }

  /* HERO MOBILE STACK */
  .hero-section {
    padding-top: 6.5rem;
    padding-bottom: 3rem;
    min-height: auto;
  }

  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2.5rem;
  }

  .hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-name {
    font-size: 2.4rem;
  }

  .hero-title {
    font-size: 1.25rem;
  }

  .hero-bio {
    font-size: 0.95rem;
  }

  .hero-actions {
    justify-content: center;
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
    max-width: 280px;
  }

  .ice-cube-container,
  .droplet-container {
    width: 260px;
    height: 260px;
    margin: 0 auto;
  }

  .ice-cube-3d,
  .water-droplet-3d {
    width: 220px;
    height: 220px;
    border-radius: 22px;
  }

  .ice-ring.ring-1 { width: 250px; height: 250px; }
  .ice-ring.ring-2 { width: 270px; height: 270px; }

  .hero-photo-badges {
    bottom: 10px;
    gap: 0.4rem;
  }

  .photo-badge {
    padding: 0.22rem 0.55rem;
    font-size: 0.7rem;
  }

  .orbiting-node {
    width: 36px;
    height: 36px;
    font-size: 0.85rem;
  }

  /* ABOUT MOBILE */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .about-card {
    padding: 1.5rem;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .stat-card {
    padding: 1.2rem;
  }

  .stat-number, .stat-text-title {
    font-size: 1.6rem;
  }

  /* SKILLS MOBILE */
  .skills-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 1rem;
  }

  .skill-card {
    padding: 1.2rem 0.8rem;
  }

  .skill-icon-wrap {
    font-size: 1.8rem;
  }

  .skill-name {
    font-size: 1rem;
  }

  /* WHY JAVA MOBILE */
  .nodes-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .java-core-sphere {
    width: 110px;
    height: 110px;
    margin-bottom: 2rem;
  }

  .core-logo {
    font-size: 2rem;
  }

  /* PROJECTS MOBILE */
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .project-actions {
    flex-direction: column;
  }

  .project-actions .btn {
    width: 100%;
  }

  /* EXPERIENCE MOBILE */
  .experience-grid {
    grid-template-columns: 1fr;
    gap: 1.4rem;
  }

  .experience-card {
    padding: 1.5rem;
  }

  /* TIMELINE MOBILE FIX */
  .timeline-container {
    margin-top: 2rem;
  }

  .timeline-liquid-line {
    left: 18px;
    transform: none;
  }

  .timeline-items {
    gap: 1.8rem;
  }

  .timeline-item {
    width: 100% !important;
    padding-left: 46px !important;
    padding-right: 0 !important;
    align-self: flex-start !important;
  }

  .timeline-dot {
    left: 2px !important;
    right: auto !important;
    width: 32px;
    height: 32px;
  }

  .timeline-content {
    padding: 1.2rem;
  }

  /* DSA MOBILE */
  .dsa-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.9rem;
  }

  .dsa-card {
    padding: 1rem;
  }

  .algo-visualizer-container {
    padding: 1.2rem;
  }

  .algo-bars-area {
    height: 140px;
    gap: 0.25rem;
    padding: 0.5rem;
  }

  .algo-bar {
    max-width: 16px;
  }

  .algo-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .algo-controls {
    width: 100%;
    display: flex;
    gap: 0.5rem;
  }

  .algo-controls .btn {
    flex: 1;
  }

  /* CONTACT MOBILE */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .contact-form-card {
    padding: 1.4rem;
  }

  /* FOOTER MOBILE */
  .footer-container {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .brand-droplet {
    width: 38px;
    height: 38px;
  }

  .nav-brand {
    font-size: 1.15rem;
    gap: 0.5rem;
  }

  .hero-name {
    font-size: 2.0rem;
  }

  .ice-cube-container,
  .droplet-container {
    width: 225px;
    height: 225px;
  }

  .ice-cube-3d,
  .water-droplet-3d {
    width: 195px;
    height: 195px;
    border-radius: 18px;
  }

  .ice-ring.ring-1 { width: 215px; height: 215px; }
  .ice-ring.ring-2 { width: 232px; height: 232px; }

  .orbiting-node {
    width: 30px;
    height: 30px;
    font-size: 0.75rem;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dsa-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    max-width: 300px;
  }

    .hero-actions .btn {
    width: 100%;
  }
}

/* ==========================================================================
   15. FULL-SCREEN LIQUID GLASS PRELOADER / SPLASH SCREEN
   ========================================================================== */
/* Keep ambient cursor visible above preloader */
#preloader ~ #cursor-glow {
  z-index: 10000002;
}

#preloader {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 10000000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(10, 17, 36, 0.98) 0%, var(--bg-dark) 100%);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1), clip-path 0.75s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
  user-select: none;
  overflow: hidden;
}

#preloader.pl-fade-out {
  opacity: 0 !important;
  transform: scale(1.08);
  clip-path: circle(150% at 50% 50%);
  pointer-events: none !important;
  visibility: hidden;
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1), clip-path 0.75s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.75s;
}

/* 15.1 BACKGROUND "JAVA RUNNING" LAYER */
.pl-code-bg {
  position: absolute;
  inset: -20px;
  overflow: hidden;
  pointer-events: none;
  opacity: 0.22;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem 5%;
  z-index: 1;
  transition: opacity 0.5s ease, transform 0.2s ease-out;
  will-change: transform;
}

.pl-code-editor {
  width: 100%;
  max-width: 820px;
  background: rgba(5, 9, 20, 0.5);
  border: 1px solid rgba(0, 242, 255, 0.12);
  border-radius: var(--radius-sm);
  padding: 1.2rem 1.6rem;
  backdrop-filter: blur(4px);
}

.pl-code-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
  opacity: 0.7;
}

.pl-code-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.pl-code-dot.red { background: #ff5f56; }
.pl-code-dot.yellow { background: #ffbd2e; }
.pl-code-dot.green { background: #27c93f; }

.pl-code-file {
  font-family: var(--font-code);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: 0.4rem;
}

.pl-code-stream {
  font-family: var(--font-code);
  font-size: 0.84rem;
  line-height: 1.55;
  white-space: pre-wrap;
  color: var(--text-secondary);
  min-height: 200px;
}

/* Syntax Highlighting Tokens */
.pl-kw { color: #00f2ff; font-weight: 600; }
.pl-cls { color: #60a5fa; }
.pl-str { color: #6ee7b7; }
.pl-fn { color: #f1f5f9; }
.pl-var { color: #93c5fd; }
.pl-punct { color: #64748b; }
.pl-comment { color: #475569; font-style: italic; }

/* Simulated Floating Console Output */
.pl-console-panel {
  width: 100%;
  max-width: 820px;
  margin-top: 0.8rem;
  background: rgba(4, 7, 16, 0.7);
  border: 1px solid rgba(0, 242, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 0.7rem 1.2rem;
  font-family: var(--font-code);
  font-size: 0.76rem;
  color: #a5f3fc;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.pl-console-panel.active {
  opacity: 0.88;
  transform: translateY(0);
}

.pl-console-header {
  color: var(--text-muted);
  font-size: 0.68rem;
  margin-bottom: 0.35rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.pl-console-output {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  line-height: 1.45;
}

.pl-console-line {
  color: #7dd3fc;
}

.pl-console-line.success {
  color: #34d399;
}

/* Soft Radial Vignette Overlay */
.pl-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 25%, rgba(5, 9, 20, 0.85) 85%);
  pointer-events: none;
  z-index: 2;
}

/* Particle Canvas */
.pl-particle-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

/* 15.2 FOREGROUND CONTENT */
.pl-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 1.5rem;
  max-width: 480px;
  width: 90%;
  position: relative;
  z-index: 3;
}

/* Glass Ring & Rotating Logo */
.pl-logo-wrapper {
  position: relative;
  width: 110px;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  transition: transform 0.15s ease-out;
  transform-style: preserve-3d;
}

.pl-glass-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid var(--border-glass-bright);
  background: rgba(0, 242, 255, 0.04);
  box-shadow: 0 0 35px rgba(0, 242, 255, 0.3), inset 0 0 15px rgba(0, 242, 255, 0.15);
  animation: pl-pulse-ring 3s ease-in-out infinite;
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

/* Stage-based glow color shifts */
#preloader.pl-stage-1 .pl-glass-ring {
  border-color: rgba(0, 242, 255, 0.45);
  box-shadow: 0 0 35px rgba(0, 242, 255, 0.35);
}

#preloader.pl-stage-2 .pl-glass-ring {
  border-color: rgba(0, 168, 255, 0.6);
  box-shadow: 0 0 42px rgba(0, 168, 255, 0.45);
}

#preloader.pl-stage-3 .pl-glass-ring {
  border-color: rgba(67, 97, 238, 0.7);
  box-shadow: 0 0 48px rgba(67, 97, 238, 0.55);
}

#preloader.pl-stage-4 .pl-glass-ring {
  border-color: #00f2ff;
  box-shadow: 0 0 55px rgba(0, 242, 255, 0.8), inset 0 0 25px rgba(0, 242, 255, 0.4);
}

.pl-glow-orb {
  position: absolute;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 242, 255, 0.25) 0%, transparent 70%);
  filter: blur(10px);
  pointer-events: none;
}

.pl-logo-img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  position: relative;
  z-index: 3;
  animation: pl-rotate 3.5s linear infinite;
  filter: drop-shadow(0 0 16px rgba(0, 242, 255, 0.65));
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s ease;
}

/* Final Moment Animation */
#preloader.pl-final-moment .pl-logo-img {
  animation: none !important;
  transform: scale(1.18);
  filter: drop-shadow(0 0 32px var(--accent-cyan)) brightness(1.25);
}

/* Welcome Title & Subtle Glitch */
.pl-welcome-title {
  font-family: var(--font-main);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.8rem;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  transition: all 0.3s ease;
}

.pl-welcome-title.pl-glitch {
  animation: pl-glitch-anim 0.22s ease-in-out;
}

.pl-welcome-text {
  display: inline-block;
}

.pl-accent {
  color: var(--accent-cyan);
  text-shadow: 0 0 12px rgba(0, 242, 255, 0.5);
}

.pl-welcome-cursor {
  color: var(--accent-cyan);
  margin-left: 2px;
  animation: pl-blink 0.8s infinite;
  font-weight: 300;
}

/* Status Console */
.pl-status-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  min-height: 1.6rem;
  margin-bottom: 1.6rem;
  padding: 0.4rem 1rem;
  background: rgba(0, 242, 255, 0.05);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  max-width: 100%;
}

.pl-status-line {
  font-family: var(--font-code);
  font-size: 0.82rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}

.pl-status-cursor {
  font-family: var(--font-code);
  font-size: 0.85rem;
  color: var(--accent-cyan);
  font-weight: 700;
  animation: pl-blink 0.6s infinite;
}

/* Progress Container */
.pl-progress-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.pl-progress-bar {
  width: 260px;
  max-width: 80vw;
  height: 5px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-full);
  border: 1px solid var(--border-glass);
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6);
}

.pl-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-blue) 0%, var(--accent-cyan) 100%);
  border-radius: var(--radius-full);
  box-shadow: 0 0 12px var(--accent-cyan);
  transition: width 0.06s linear;
}

.pl-counter {
  font-family: var(--font-code);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-cyan);
  text-shadow: 0 0 10px rgba(0, 242, 255, 0.45);
  letter-spacing: 0.05em;
}

/* Boost Hint */
.pl-hint-text {
  font-family: var(--font-code);
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 1rem;
  opacity: 0.45;
  transition: opacity 0.3s, color 0.3s;
}

.pl-hint-text.active {
  opacity: 1;
  color: var(--accent-cyan);
  text-shadow: 0 0 8px var(--accent-cyan);
}

.pl-hint-text kbd {
  background: rgba(255, 255, 255, 0.08);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  border: 1px solid var(--border-glass);
  font-size: 0.64rem;
}

/* 15.3 INTERACTIVE CONTROLS (SKIP & SOUND) */
.pl-skip-btn {
  position: absolute;
  bottom: 22px;
  right: 26px;
  z-index: 200;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 1rem;
  font-family: var(--font-code);
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: rgba(5, 9, 20, 0.75);
  border: 1px solid var(--border-glass-bright);
  border-radius: var(--radius-full);
  cursor: pointer;
  opacity: 0.65;
  pointer-events: auto;
  transition: opacity 0.3s ease, color 0.25s, border-color 0.25s, box-shadow 0.25s;
  backdrop-filter: blur(8px);
}

.pl-skip-btn.visible {
  opacity: 0.85;
  pointer-events: auto;
}

.pl-skip-btn:hover {
  opacity: 1;
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(0, 242, 255, 0.35);
}

.pl-sound-btn {
  position: absolute;
  bottom: 22px;
  left: 26px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.9rem;
  font-family: var(--font-code);
  font-size: 0.74rem;
  color: var(--text-muted);
  background: rgba(5, 9, 20, 0.65);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.3s, color 0.25s, border-color 0.25s, box-shadow 0.25s;
  backdrop-filter: blur(8px);
}

.pl-sound-btn:hover {
  opacity: 1;
  color: var(--accent-cyan);
  border-color: var(--border-glass-bright);
}

.pl-sound-btn.active {
  opacity: 1;
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(0, 242, 255, 0.3);
}

/* Click/Tap Water Ripple */
.pl-ripple {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid var(--accent-cyan);
  background: radial-gradient(circle, rgba(0, 242, 255, 0.22) 0%, transparent 70%);
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0);
  animation: pl-ripple-anim 0.85s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
  z-index: 5;
}

/* Keyframes */
@keyframes pl-rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes pl-pulse-ring {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 35px rgba(0, 242, 255, 0.3), inset 0 0 15px rgba(0, 242, 255, 0.15);
  }
  50% {
    transform: scale(1.06);
    box-shadow: 0 0 45px rgba(0, 242, 255, 0.5), inset 0 0 25px rgba(0, 242, 255, 0.3);
  }
}

@keyframes pl-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes pl-pulse {
  0%, 100% { opacity: 0.6; transform: scale(0.96); }
  50% { opacity: 1; transform: scale(1.04); }
}

@keyframes pl-ripple-anim {
  to {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0;
  }
}

@keyframes pl-glitch-anim {
  0%, 100% { transform: none; text-shadow: none; }
  25% { transform: translate(-2px, 1px); text-shadow: -2px 0 #00f2ff, 2px 0 #4361ee; }
  75% { transform: translate(2px, -1px); text-shadow: 2px 0 #00f2ff, -2px 0 #4361ee; }
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .pl-logo-img {
    animation: pl-pulse 2s ease-in-out infinite;
  }
  .pl-glass-ring {
    animation: none;
  }
  .pl-welcome-title.pl-glitch {
    animation: none;
  }
  .pl-code-bg {
    transform: none !important;
  }
  #preloader.pl-fade-out {
    transform: none !important;
    clip-path: none !important;
    transition: opacity 0.4s ease !important;
  }
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
  .pl-logo-wrapper {
    width: 95px;
    height: 95px;
    margin-bottom: 1.2rem;
  }
  .pl-logo-img {
    width: 50px;
    height: 50px;
  }
  .pl-welcome-title {
    font-size: 1.15rem;
  }
  .pl-status-line {
    font-size: 0.74rem;
  }
  .pl-progress-bar {
    width: 220px;
  }
  .pl-code-stream {
    font-size: 0.72rem;
  }
  .pl-code-editor {
    padding: 0.8rem 1rem;
  }
  .pl-skip-btn {
    bottom: 14px;
    right: 16px;
    padding: 0.3rem 0.7rem;
    font-size: 0.68rem;
  }
  .pl-sound-btn {
    bottom: 14px;
    left: 16px;
    padding: 0.3rem 0.7rem;
    font-size: 0.68rem;
  }
  .pl-hint-text {
    font-size: 0.62rem;
    margin-top: 0.6rem;
  }
}

/* ==========================================================================
   11. LIQUID GLASS PORTFOLIO CHATBOT WIDGET (#rg-chat & .rg-chat-)
   Developer: Ravi Kumar Gangwar
   Aesthetic: Native Glassmorphism, Liquid Droplet Pulse, Deep Void Theme
   ========================================================================== */

/* 11.1 Floating Launcher Button */
#rg-chat-launcher {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(20, 36, 75, 0.95), rgba(6, 12, 28, 0.95));
  border: 1.5px solid var(--border-glass-bright);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.6), 0 0 25px rgba(0, 242, 255, 0.35), inset 0 2px 4px rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  cursor: pointer;
  z-index: 9995;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  outline: none;
  opacity: 0;
  transform: scale(0.7) translateY(20px);
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, box-shadow 0.3s ease;
  user-select: none;
}

#rg-chat-launcher.rg-chat-launcher-visible {
  opacity: 1;
  transform: scale(1) translateY(0);
  animation: rgLauncherFloat 5.5s ease-in-out infinite;
}

#rg-chat-launcher:hover {
  transform: scale(1.08) translateY(-4px);
  border-color: var(--accent-cyan);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.7), 0 0 35px rgba(0, 242, 255, 0.55), inset 0 2px 5px rgba(255, 255, 255, 0.5);
}

#rg-chat-launcher:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 4px;
}

#rg-chat-launcher.rg-chat-launcher-active {
  animation: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 242, 255, 0.4);
}

.rg-chat-launcher-glow-ring {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1px solid rgba(0, 242, 255, 0.25);
  pointer-events: none;
  animation: rgRingPulse 3s ease-in-out infinite;
}

.rg-chat-launcher-icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 242, 255, 0.5));
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

/* Compiler Terminal </> Badge */
.rg-chat-launcher-badge {
  position: absolute;
  bottom: 0px;
  right: -1px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  color: #050914;
  font-family: var(--font-code);
  font-size: 0.62rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: var(--radius-full);
  box-shadow: 0 2px 8px rgba(0, 242, 255, 0.5);
  line-height: 1.1;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.5);
}

#rg-chat-launcher:hover .rg-chat-launcher-icon {
  transform: scale(1.1) rotate(5deg);
}

/* Tooltip */
.rg-chat-tooltip {
  position: absolute;
  bottom: calc(100% + 14px);
  right: 0;
  background: rgba(8, 16, 36, 0.9);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-glass-bright);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 242, 255, 0.2);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.rg-chat-tooltip::after {
  content: '';
  position: absolute;
  bottom: -5px;
  right: 24px;
  width: 9px;
  height: 9px;
  background: rgba(8, 16, 36, 0.9);
  border-right: 1px solid var(--border-glass-bright);
  border-bottom: 1px solid var(--border-glass-bright);
  transform: rotate(45deg);
}

#rg-chat-launcher:hover .rg-chat-tooltip {
  opacity: 1;
  transform: translateY(0);
}

/* 11.2 Chatbot Modal Window */
#rg-chat-window {
  position: fixed;
  bottom: 104px;
  right: 28px;
  width: 390px;
  max-width: calc(100vw - 32px);
  height: 560px;
  max-height: calc(100vh - 130px);
  border-radius: var(--radius-lg);
  background: rgba(7, 14, 30, 0.88);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--border-glass-bright);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.75), 0 0 45px rgba(0, 242, 255, 0.16), inset 0 1px 2px rgba(255, 255, 255, 0.18);
  z-index: 9996;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: scale(0.88) translateY(24px);
  pointer-events: none;
  transition: opacity 0.32s cubic-bezier(0.16, 1, 0.3, 1), transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: var(--font-main), 'Noto Sans Devanagari', -apple-system, system-ui, sans-serif;
  color: var(--text-primary);
}

/* Subtle Header Scanlines (Very Low Opacity) */
.rg-chat-scanlines {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 2px,
    rgba(0, 242, 255, 0.035) 3px,
    transparent 4px
  );
  z-index: 2;
}

#rg-chat-window.rg-chat-active {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

/* 11.3 Chat Window Header */
.rg-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: rgba(11, 20, 42, 0.85);
  border-bottom: 1px solid var(--border-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  flex-shrink: 0;
}

.rg-chat-header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rg-chat-header-logo-wrap {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 242, 255, 0.08);
  border: 1px solid var(--border-glass-bright);
  display: flex;
  align-items: center;
  justify-content: center;
}

.rg-chat-header-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.rg-chat-header-info {
  display: flex;
  flex-direction: column;
}

.rg-chat-header-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
  display: flex;
  align-items: center;
  gap: 6px;
}

.rg-chat-status-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.rg-chat-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: rgPulseGreen 2.2s infinite;
}

.rg-chat-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rg-chat-header-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.85rem;
  transition: var(--transition);
  outline: none;
}

.rg-chat-header-btn:hover {
  background: rgba(0, 242, 255, 0.1);
  border-color: var(--border-glass);
  color: var(--accent-cyan);
  transform: translateY(-1px);
}

.rg-chat-header-btn:focus-visible {
  outline: 2px solid var(--accent-cyan);
}

/* 11.4 Messages Container */
#rg-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scroll-behavior: smooth;
}

#rg-chat-messages::-webkit-scrollbar {
  width: 5px;
}
#rg-chat-messages::-webkit-scrollbar-track {
  background: transparent;
}
#rg-chat-messages::-webkit-scrollbar-thumb {
  background: rgba(0, 242, 255, 0.25);
  border-radius: 10px;
}
#rg-chat-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 242, 255, 0.5);
}

/* Boot Sequence Terminal View */
.rg-chat-boot-sequence {
  background: rgba(5, 12, 28, 0.7);
  border: 1px dashed rgba(0, 242, 255, 0.35);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-family: var(--font-code);
  font-size: 0.76rem;
  color: var(--accent-cyan);
  line-height: 1.6;
  margin-bottom: 4px;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

.rg-chat-boot-sequence:hover {
  border-color: var(--accent-cyan);
  background: rgba(8, 16, 36, 0.85);
  box-shadow: 0 0 15px rgba(0, 242, 255, 0.15);
}

.rg-chat-boot-line {
  opacity: 0;
  transform: translateY(3px);
  animation: rgFadeUp 0.25s forwards;
}

.rg-chat-boot-line.ok {
  color: #10b981;
}

.rg-chat-boot-hint {
  font-size: 0.64rem;
  color: var(--text-muted);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 5px;
}

@keyframes rgFadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 11.5 Message Rows & Bubbles */
.rg-chat-msg-row {
  display: flex;
  gap: 10px;
  width: 100%;
}

.rg-chat-user-row {
  justify-content: flex-end;
}

.rg-chat-bot-row {
  justify-content: flex-start;
  align-items: flex-start;
}

.rg-chat-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0, 242, 255, 0.12);
  border: 1px solid var(--border-glass-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.rg-chat-avatar img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.rg-chat-bubble {
  max-width: 84%;
  padding: 12px 15px;
  font-size: 0.88rem;
  line-height: 1.62;
  word-break: break-word;
  position: relative;
}

.rg-chat-bubble.rg-chat-hindi-bubble {
  line-height: 1.76;
  padding-top: 13px;
  padding-bottom: 13px;
  letter-spacing: 0.01em;
}

.rg-chat-user-bubble {
  background: linear-gradient(135deg, rgba(0, 242, 255, 0.28) 0%, rgba(0, 85, 255, 0.4) 100%);
  border: 1px solid rgba(0, 242, 255, 0.5);
  color: #ffffff;
  border-radius: 18px 18px 4px 18px;
  box-shadow: 0 4px 18px rgba(0, 168, 255, 0.15);
  animation: rgUserSlideIn 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.rg-chat-sent-tick {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.7);
  margin-left: 6px;
  font-family: var(--font-code);
  vertical-align: baseline;
}

@keyframes rgUserSlideIn {
  from {
    opacity: 0;
    transform: translateX(12px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.rg-chat-bot-bubble {
  background: rgba(14, 25, 52, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-glass);
  border-left: 3px solid var(--accent-cyan);
  color: var(--text-primary);
  border-radius: 4px 18px 18px 18px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

/* Compiler Refusal Bubble Styling */
.rg-chat-compiler-error {
  border-left: 3px solid #ef4444 !important;
  background: rgba(30, 12, 22, 0.78) !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
}

.rg-chat-error-title {
  color: #ef4444;
  font-family: var(--font-code);
  font-weight: 700;
  font-size: 0.82rem;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.02em;
}

/* Local Build Footer */
.rg-chat-build-footer {
  margin-top: 10px;
  padding-top: 6px;
  border-top: 1px dashed rgba(0, 242, 255, 0.18);
  font-family: var(--font-code);
  font-size: 0.68rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}

.rg-chat-build-footer.success {
  color: #10b981;
}

.rg-chat-build-footer.failure {
  color: #ef4444;
  border-top-color: rgba(239, 68, 68, 0.25);
}

/* Syntax Highlight Chips (Local) */
.rg-chat-tech-chip {
  font-family: var(--font-code);
  font-size: 0.8rem;
  color: var(--accent-cyan);
  background: rgba(0, 242, 255, 0.1);
  border: 1px solid rgba(0, 242, 255, 0.3);
  padding: 1px 6px;
  border-radius: 4px;
  display: inline-block;
  vertical-align: baseline;
  font-weight: 500;
  margin: 0 2px;
}

.rg-chat-bubble-text strong {
  color: var(--accent-cyan);
  font-weight: 600;
}

.rg-chat-inline-code {
  font-family: var(--font-code);
  font-size: 0.82rem;
  background: rgba(0, 242, 255, 0.12);
  padding: 2px 5px;
  border-radius: 4px;
  border: 1px solid rgba(0, 242, 255, 0.2);
  color: var(--accent-cyan);
}

.rg-chat-bullet {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 5px;
}

.rg-chat-bullet-dot {
  color: var(--accent-cyan);
  font-weight: bold;
}

.rg-chat-spacing {
  height: 8px;
}

.rg-chat-link, .rg-chat-section-link {
  color: var(--accent-cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: var(--transition);
}

.rg-chat-link:hover, .rg-chat-section-link:hover {
  color: #ffffff;
  text-shadow: 0 0 8px var(--accent-cyan);
}

/* 11.6 Auxiliary Action Buttons & Command-Style Chips */
.rg-chat-actions-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(0, 242, 255, 0.12);
}

.rg-chat-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-cyan);
  background: rgba(0, 242, 255, 0.08);
  border: 1px solid var(--border-glass-bright);
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
}

.rg-chat-action-btn:hover {
  background: rgba(0, 242, 255, 0.2);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(0, 242, 255, 0.3);
  transform: translateY(-2px);
  color: #ffffff;
}

.rg-chat-chips-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

/* Command-Style Glass Chips ($ skills) */
.rg-chat-chip {
  background: rgba(10, 20, 42, 0.75);
  border: 1px solid rgba(0, 242, 255, 0.3);
  color: var(--accent-cyan);
  font-family: var(--font-code);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
  outline: none;
  white-space: nowrap;
}

.rg-chat-chip:hover {
  background: rgba(0, 242, 255, 0.18);
  border-color: var(--accent-cyan);
  color: #ffffff;
  transform: translateY(-1.5px);
  box-shadow: 0 0 12px rgba(0, 242, 255, 0.35);
}

.rg-chat-chip:focus-visible {
  outline: 2px solid var(--accent-cyan);
}

/* 11.7 Compiler Thinking Indicator with Spinner & Status Text */
.rg-chat-typing-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  align-self: flex-start;
}

.rg-chat-thinking-bubble {
  background: rgba(14, 25, 52, 0.75);
  border: 1px solid var(--border-glass);
  border-left: 3px solid var(--accent-cyan);
  padding: 9px 14px;
  border-radius: 4px 18px 18px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-code);
  font-size: 0.76rem;
  color: var(--accent-cyan);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

.rg-chat-thinking-spinner {
  width: 13px;
  height: 13px;
  border: 2px solid rgba(0, 242, 255, 0.25);
  border-top-color: var(--accent-cyan);
  border-radius: 50%;
  animation: rgSpin 0.7s linear infinite;
  flex-shrink: 0;
}

.rg-chat-thinking-text {
  letter-spacing: 0.02em;
}

@keyframes rgSpin {
  to { transform: rotate(360deg); }
}
.rg-chat-drop.drop-3 {
  animation-delay: 0.4s;
}

/* 11.8 Input Bar & Controls */
.rg-chat-input-bar {
  padding: 12px 14px 10px;
  background: rgba(10, 18, 38, 0.9);
  border-top: 1px solid var(--border-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  flex-shrink: 0;
}

.rg-chat-input-wrap {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  background: rgba(5, 10, 22, 0.6);
  border: 1px solid var(--border-glass);
  border-radius: 18px;
  padding: 6px 8px 6px 12px;
  transition: var(--transition);
}

.rg-chat-input-wrap:focus-within {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 16px rgba(0, 242, 255, 0.2);
}

#rg-chat-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.86rem;
  line-height: 1.4;
  resize: none;
  max-height: 90px;
  min-height: 22px;
  padding: 4px 0;
}

#rg-chat-input::placeholder {
  color: var(--text-muted);
  font-size: 0.82rem;
}

#rg-chat-send-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  border: none;
  color: #050914;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--transition);
  font-size: 0.85rem;
  outline: none;
}

#rg-chat-send-btn:hover:not(:disabled) {
  transform: scale(1.08);
  box-shadow: 0 0 12px var(--accent-cyan);
}

#rg-chat-send-btn:disabled,
#rg-chat-send-btn[aria-disabled="true"] {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

#rg-chat-send-btn:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

/* New Message Pill (Scroll-to-bottom indicator) */
.rg-chat-new-msg-pill {
  position: absolute;
  bottom: 74px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: rgba(8, 20, 48, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--accent-cyan);
  color: var(--accent-cyan);
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-family: var(--font-code);
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s ease-out, opacity 0.25s ease-out, background 0.2s ease;
  box-shadow: 0 4px 18px rgba(0, 242, 255, 0.25);
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 6px;
  outline: none;
}

.rg-chat-new-msg-pill.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.rg-chat-new-msg-pill:hover {
  background: rgba(0, 242, 255, 0.2);
  color: #ffffff;
  box-shadow: 0 0 16px rgba(0, 242, 255, 0.4);
}

.rg-chat-input-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  padding: 0 4px;
}

.rg-chat-hint {
  font-size: 0.68rem;
  color: var(--text-muted);
}

#rg-chat-char-counter {
  font-family: var(--font-code);
  font-size: 0.68rem;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

#rg-chat-char-counter.rg-chat-char-limit {
  color: #ef4444;
  font-weight: 600;
}

/* 11.9 Keyframe Animations */
@keyframes rgLauncherFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes rgRingPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.35;
  }
  50% {
    transform: scale(1.15);
    opacity: 0.75;
  }
}

@keyframes rgPulseGreen {
  0%, 100% {
    transform: scale(1);
    opacity: 0.85;
  }
  50% {
    transform: scale(1.35);
    opacity: 1;
    box-shadow: 0 0 12px #10b981;
  }
}

@keyframes rgLiquidDropBounce {
  0%, 100% {
    transform: translateY(0);
    opacity: 0.35;
  }
  50% {
    transform: translateY(-8px);
    opacity: 1;
    box-shadow: 0 0 8px var(--accent-cyan);
  }
}

/* 11.10 Responsive Mobile Behavior (Bottom Sheet) */
@media (max-width: 640px) {
  #rg-chat-launcher {
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
  }

  .rg-chat-launcher-icon {
    width: 32px;
    height: 32px;
  }

  .rg-chat-tooltip {
    display: none !important;
  }

  #rg-chat-window {
    width: 100% !important;
    max-width: 100% !important;
    height: 85vh !important;
    max-height: 85vh !important;
    bottom: 0 !important;
    right: 0 !important;
    left: 0 !important;
    border-radius: 24px 24px 0 0 !important;
    border-bottom: none !important;
    transform: translateY(100%);
  }

  #rg-chat-window.rg-chat-active {
    transform: translateY(0);
  }
}

/* 11.11 Accessibility: Prefers-Reduced-Motion */
@media (prefers-reduced-motion: reduce) {
  #rg-chat-launcher {
    animation: none !important;
    transition: opacity 0.1s ease !important;
  }

  .rg-chat-launcher-glow-ring,
  .rg-chat-status-dot,
  .rg-chat-drop {
    animation: none !important;
  }

  #rg-chat-window {
    transition: opacity 0.15s ease !important;
    transform: none !important;
  }

  #rg-chat-window.rg-chat-active {
    transform: none !important;
  }
}