/* ==========================================================================
   Exact Netlify Portfolio Styling (gopinath-s.netlify.app)
   Dark Midnight Obsidian & Sora/Inter/JetBrains Mono
   ========================================================================== */

:root {
  --bg-dark: #060911;
  --bg-light: #f8fafc;
  --card-dark: rgba(15, 23, 42, 0.65);
  --card-border-dark: rgba(255, 255, 255, 0.08);
  --cyan: #22d3ee;
  --cyan-bright: #38bdf8;
  --purple: #8b5cf6;
  --purple-bright: #a855f7;
  --pink: #ec4899;
  --amber: #fbbf24;
}

html, body {
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
}

html {
  scroll-behavior: smooth;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
  background-color: #060911;
  color: #f1f5f9;
  -webkit-font-smoothing: antialiased;
}

html.light body {
  background-color: #f8fafc;
  color: #0f172a;
}

h1, h2, h3, h4, h5, h6, .font-heading {
  font-family: 'Sora', 'Inter', system-ui, sans-serif;
}

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

/* Glassmorphism Cards */
.glass-card {
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.glass-card:hover {
  border-color: rgba(34, 211, 238, 0.4);
  box-shadow: 0 16px 36px -12px rgba(34, 211, 238, 0.15), 0 0 20px -2px rgba(139, 92, 246, 0.12);
}

html.light .glass-card {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(226, 232, 240, 0.9);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.06);
}

html.light .glass-card:hover {
  border-color: rgba(6, 182, 212, 0.5);
  box-shadow: 0 14px 32px -10px rgba(6, 182, 212, 0.15);
}

/* Glass Card Lite */
.glass-card-lite {
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0.75rem;
  transition: all 0.25s ease;
}

.glass-card-lite:hover {
  border-color: rgba(34, 211, 238, 0.35);
}

html.light .glass-card-lite {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(226, 232, 240, 0.8);
}

/* 3D Tilt Card Container */
.tilt-card-container {
  position: relative;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  transform-style: preserve-3d;
}

.tilt-glare-overlay {
  pointer-events: none;
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 20;
}

/* Custom Gradient Text */
.gradient-text {
  background: linear-gradient(135deg, #22d3ee 0%, #8b5cf6 50%, #ec4899 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

html.light .gradient-text {
  background: linear-gradient(135deg, #0284c7 0%, #7c3aed 50%, #db2777 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Primary Gradient Button */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  font-weight: 600;
  font-size: 0.875rem;
  color: #ffffff;
  background: linear-gradient(135deg, #22d3ee 0%, #8b5cf6 50%, #ec4899 100%);
  box-shadow: 0 4px 14px -2px rgba(34, 211, 238, 0.35);
  transition: all 0.2s ease;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary:hover {
  box-shadow: 0 8px 24px -2px rgba(34, 211, 238, 0.5), 0 0 16px -2px rgba(236, 72, 153, 0.4);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

/* Secondary Button */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.35rem;
  border-radius: 0.75rem;
  font-weight: 600;
  font-size: 0.875rem;
  background: rgba(30, 41, 59, 0.75);
  color: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.2s ease;
  text-decoration: none;
  cursor: pointer;
}

.btn-secondary:hover {
  background: rgba(30, 41, 59, 0.95);
  color: #22d3ee;
  border-color: rgba(34, 211, 238, 0.4);
  transform: translateY(-1px);
}

html.light .btn-secondary {
  background: #ffffff;
  color: #0f172a;
  border-color: #cbd5e1;
}

html.light .btn-secondary:hover {
  background: #f1f5f9;
  color: #0284c7;
  border-color: rgba(2, 132, 199, 0.4);
}

/* Ghost Button */
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: 0.75rem;
  font-weight: 600;
  font-size: 0.875rem;
  background: transparent;
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-ghost:hover {
  color: #ffffff;
  border-color: rgba(34, 211, 238, 0.4);
  background: rgba(34, 211, 238, 0.05);
}

/* ECG Heartbeat Path & Pulsing Animation */
.ecg-line {
  stroke: url(#vitalsGrad);
  stroke-width: 2.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@keyframes ecgPulse {
  0% {
    stroke-dashoffset: 1;
    opacity: 0.35;
  }
  45% {
    opacity: 1;
  }
  75% {
    opacity: 1;
  }
  100% {
    stroke-dashoffset: 0;
    opacity: 0.35;
  }
}

.ecg-pulse-line {
  stroke: url(#vitalsGrad);
  stroke-width: 2.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: ecgPulse 3s cubic-bezier(0.25, 0.1, 0.25, 1) infinite;
  filter: drop-shadow(0 0 6px rgba(34, 211, 238, 0.45));
}

/* Active Nav Underline */
.nav-link-btn {
  position: relative;
  transition: color 0.2s ease;
}

.nav-link-btn.active {
  color: #22d3ee !important;
  font-weight: 700;
}

.nav-link-btn.active::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, #22d3ee, #8b5cf6, #ec4899);
  border-radius: 2px;
  box-shadow: 0 0 8px 1px rgba(34, 211, 238, 0.7);
}

/* Three.js Background Container */
#threeContainer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

/* Ambient Pulse Glows */
.ambient-glow-1 {
  position: fixed;
  top: -120px;
  left: 20%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.12) 0%, transparent 70%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  animation: pulseAmbient 8s ease-in-out infinite;
}

.ambient-glow-2 {
  position: fixed;
  top: 35%;
  right: -100px;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.12) 0%, transparent 70%);
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
  animation: pulseAmbient 10s ease-in-out infinite 2s;
}

.ambient-glow-3 {
  position: fixed;
  bottom: -80px;
  left: 5%;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.10) 0%, transparent 70%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  animation: pulseAmbient 9s ease-in-out infinite 4s;
}

.ambient-glow-1,
.ambient-glow-2,
.ambient-glow-3 {
  transform: translate3d(0, 0, 0);
  will-change: opacity;
}

@keyframes pulseAmbient {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 0.95; }
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #060911;
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #334155;
}
