/* ==========================================================================
   NIKHIL INGALE - FAANG GRADE PORTFOLIO DESIGN SYSTEM
   Theme: Cybernetic High-Performance Engineering Glassmorphism
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600&family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800;900&display=swap');

:root {
  /* Default Theme: Cyber Cyan */
  --primary: #00f2fe;
  --primary-glow: rgba(0, 242, 254, 0.4);
  --primary-rgb: 0, 242, 254;
  --secondary: #4facfe;
  --secondary-glow: rgba(79, 172, 254, 0.35);
  --accent: #38ef7d;
  --accent-glow: rgba(56, 239, 125, 0.35);
  --warning: #f7b731;
  --danger: #eb3b5a;

  /* Deep Dark Surface Palettes */
  --bg-black: #060913;
  --bg-darker: #0b0f19;
  --bg-card: rgba(14, 21, 37, 0.75);
  --bg-card-hover: rgba(22, 33, 58, 0.85);
  --bg-glass: rgba(15, 23, 42, 0.65);
  --bg-glass-card: rgba(18, 28, 48, 0.55);
  --bg-input: rgba(10, 16, 30, 0.8);

  /* Borders & Highlights */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(0, 242, 254, 0.3);
  --border-glow-hover: rgba(0, 242, 254, 0.6);
  --border-secondary: rgba(79, 172, 254, 0.25);

  /* Text colors */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-code: #38bdf8;

  /* Typography */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-code: 'Fira Code', monospace;

  /* Layout & Geometry */
  --max-width: 1280px;
  --header-height: 80px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  /* Transitions & Shadows */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-sm: 0 4px 20px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 25px var(--primary-glow);
  --shadow-card: 0 12px 40px -10px rgba(0, 0, 0, 0.6);
}

/* Alternate Theme: Electric Violet */
[data-theme="purple"] {
  --primary: #c084fc;
  --primary-glow: rgba(192, 132, 252, 0.4);
  --primary-rgb: 192, 132, 252;
  --secondary: #818cf8;
  --secondary-glow: rgba(129, 140, 248, 0.35);
  --accent: #34d399;
  --accent-glow: rgba(52, 211, 153, 0.35);
  --border-glow: rgba(192, 132, 252, 0.35);
  --border-glow-hover: rgba(192, 132, 252, 0.65);
  --text-code: #e879f9;
}

/* Alternate Theme: Matrix Emerald */
[data-theme="emerald"] {
  --primary: #10b981;
  --primary-glow: rgba(16, 185, 129, 0.4);
  --primary-rgb: 16, 185, 129;
  --secondary: #06b6d4;
  --secondary-glow: rgba(6, 182, 212, 0.35);
  --accent: #a3e635;
  --accent-glow: rgba(163, 230, 53, 0.35);
  --border-glow: rgba(16, 185, 129, 0.35);
  --border-glow-hover: rgba(16, 185, 129, 0.65);
  --text-code: #34d399;
}

/* Alternate Theme: Amber Gold */
[data-theme="amber"] {
  --primary: #f59e0b;
  --primary-glow: rgba(245, 158, 11, 0.4);
  --primary-rgb: 245, 158, 11;
  --secondary: #f97316;
  --secondary-glow: rgba(249, 115, 22, 0.35);
  --accent: #10b981;
  --accent-glow: rgba(16, 185, 129, 0.35);
  --border-glow: rgba(245, 158, 11, 0.35);
  --border-glow-hover: rgba(245, 158, 11, 0.65);
  --text-code: #fbbf24;
}

/* Base Resets */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  min-width: 0;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
  font-size: 16px;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-black);
  color: var(--text-primary);
  line-height: 1.65;
  overflow-x: hidden;
  position: relative;
  width: 100%;
  max-width: 100vw;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.body-scroll-locked {
  overflow: hidden !important;
  touch-action: none;
}

img,
svg,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

pre,
code {
  max-width: 100%;
}

/* Background canvas and ambient glowing orbs */
#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  opacity: 0.85;
}

.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  z-index: 0;
  pointer-events: none;
  opacity: 0.15;
  animation: floatAmbient 18s ease-in-out infinite alternate;
}

.glow-1 {
  top: 5%;
  left: 10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--primary), transparent 70%);
}

.glow-2 {
  top: 45%;
  right: 5%;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, var(--secondary), transparent 70%);
  animation-delay: -6s;
}

.glow-3 {
  bottom: 10%;
  left: 20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent), transparent 70%);
  animation-delay: -12s;
}

@keyframes floatAmbient {
  0% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(60px, -40px) scale(1.1);
  }

  100% {
    transform: translate(-40px, 50px) scale(0.95);
  }
}

/* Typography Base */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

p {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: all var(--transition-fast);
}

a:hover {
  color: #fff;
  text-shadow: 0 0 10px var(--primary-glow);
}

code,
pre {
  font-family: var(--font-code);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-black);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* Global Container & Layout */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

.section {
  padding: 100px 0;
  position: relative;
  z-index: 1;
  scroll-margin-top: calc(var(--header-height) + 16px);
}

section[id] {
  scroll-margin-top: calc(var(--header-height) + 16px);
}

.section-header {
  text-align: center;
  max-width: 750px;
  margin: 0 auto 60px auto;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(var(--primary-rgb), 0.1);
  border: 1px solid var(--border-glow);
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}

.section-tag i {
  font-size: 0.9rem;
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 16px;
  color: #fff;
}

.gradient-text {
  background: linear-gradient(135deg, #fff 20%, var(--primary) 65%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Glass Card Utility */
.glass-panel {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: all var(--transition-normal);
}

.glass-panel:hover {
  border-color: var(--border-glow);
  box-shadow: 0 14px 40px -10px rgba(0, 0, 0, 0.7), var(--shadow-glow);
}

/* Buttons System */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 26px;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-normal);
  border: none;
  outline: none;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: #060913;
  font-weight: 700;
  box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px var(--primary-glow);
  color: #000;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-glow);
  color: var(--primary);
  transform: translateY(-2px);
}

.btn-glow {
  background: rgba(var(--primary-rgb), 0.12);
  color: var(--primary);
  border: 1px solid var(--border-glow);
}

.btn-glow:hover {
  background: rgba(var(--primary-rgb), 0.25);
  box-shadow: 0 0 20px var(--primary-glow);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

/* Live Status Indicator Pulse */
.live-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(56, 239, 125, 0.1);
  border: 1px solid rgba(56, 239, 125, 0.3);
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #4ade80;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: #38ef7d;
  border-radius: 50%;
  box-shadow: 0 0 10px #38ef7d;
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0% {
    transform: scale(0.9);
    opacity: 0.7;
  }

  50% {
    transform: scale(1.3);
    opacity: 1;
  }

  100% {
    transform: scale(0.9);
    opacity: 0.7;
  }
}

/* Tooltips */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: #080c18;
  color: #fff;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--border-glow);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 9999;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8), 0 0 12px var(--primary-glow);
}

[data-tooltip]:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}