/* ==========================================================================
   SAURABH SEN - PREMIUM 3D CYBERNETIC DEVELOPER PORTFOLIO STYLES
   ========================================================================== */

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

/* Variable declarations */
:root {
  --bg-color: #0B0F19;
  --darker-bg: #060810;
  --card-bg: rgba(17, 24, 39, 0.65);
  --card-border: rgba(0, 229, 255, 0.15);
  --text-primary: #E5E7EB;
  --text-muted: #7C8BA1;
  --accent-blue: #00E5FF;
  --accent-purple: #D946EF;
  --scrollbar-bg: #080c14;
  --scrollbar-thumb: #00e5ff33;
}

/* Light Theme Variables */
body.light-mode {
  --bg-color: #F8FAFC;
  --darker-bg: #F1F5F9;
  --card-bg: rgba(255, 255, 255, 0.75);
  --card-border: rgba(59, 130, 246, 0.2);
  --text-primary: #1E293B;
  --text-muted: #64748B;
  --accent-blue: #3B82F6;
  --accent-purple: #8B5CF6;
  --scrollbar-bg: #f1f5f9;
  --scrollbar-thumb: #3b82f633;
}

/* Global Reset & Base */
body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
}

/* Utility Animations */
@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes float-slow {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(2deg); }
}

@keyframes pulse-glowing {
  0%, 100% { opacity: 0.8; filter: drop-shadow(0 0 10px var(--accent-blue)); }
  50% { opacity: 0.4; filter: drop-shadow(0 0 2px var(--accent-blue)); }
}

@keyframes gradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

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

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

::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 4px;
}

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

/* Glassmorphism Classes */
.glass-panel {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* Theme light mode rules */
body.light-mode #cyber-header {
  background-color: rgba(248, 250, 252, 0.85);
  border-bottom: 1px solid rgba(59, 130, 246, 0.1);
}

body.light-mode .project-card,
body.light-mode .bg-cyber-card,
body.light-mode #interactive-3d-box,
body.light-mode #printable-resume-page {
  background-color: var(--card-bg);
  border-color: var(--card-border);
  color: var(--text-primary);
}

body.light-mode #printable-resume-page {
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
}

body.light-mode .text-white {
  color: #0F172A !important;
}

body.light-mode .text-cyber-lightText {
  color: #1E293B !important;
}

body.light-mode .text-cyber-muted {
  color: #475569 !important;
}

body.light-mode .bg-cyber-darker {
  background-color: var(--darker-bg);
}

body.light-mode #ai-chat-panel {
  background-color: rgba(255, 255, 255, 0.98);
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.15);
}

body.light-mode #ai-chat-messages .bg-gray-900 {
  background-color: #F1F5F9;
  border-color: #E2E8F0;
  color: #1E293B;
}

body.light-mode #ai-chat-form {
  background-color: #F8FAFC;
  border-top-color: #E2E8F0;
}

body.light-mode #ai-chat-input {
  background-color: #FFFFFF;
  border-color: #E2E8F0;
  color: #1E293B;
}

body.light-mode #ai-chat-messages {
  color: #1E293B;
}

body.light-mode .nav-link {
  color: #475569;
}

body.light-mode .nav-link:hover {
  color: var(--accent-blue);
}

/* Custom Nav links underline style */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-blue);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* Text glow styles */
.text-glow-blue {
  text-shadow: 0 0 12px rgba(0, 229, 255, 0.45);
}

.text-glow-purple {
  text-shadow: 0 0 12px rgba(217, 70, 239, 0.45);
}

/* Active portfolio indicators */
.active-nav-link {
  color: var(--accent-blue) !important;
}

.active-nav-link::after {
  width: 100% !important;
}

/* Interactive 3D Perspective Card Tilt rules */
#interactive-3d-box {
  transform-style: preserve-3d;
  perspective: 1000px;
  transition: transform 0.15s ease-out, border-color 0.3s ease, box-shadow 0.3s ease;
}

#isometric-dev-svg-container {
  transform: translateZ(50px);
}

#floating-tech-nodes circle {
  animation: float-slow 6s ease-in-out infinite;
}

#floating-tech-nodes circle:nth-child(2) {
  animation-delay: -2s;
}

#floating-tech-nodes circle:nth-child(3) {
  animation-delay: -4s;
}

/* Endorsement Interactive tags animation */
.endorse-tag {
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.endorse-tag:hover {
  transform: scale(1.08) translateY(-2px);
  background-color: var(--card-bg);
}

.endorse-tag.active {
  background-color: rgba(0, 229, 255, 0.12);
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

/* Contribution heat grid layout cell sizes */
#contribution-heatmap .contrib-cell {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 2px;
  transition: transform 0.15s ease, background-color 0.2s ease;
}

#contribution-heatmap .contrib-cell:hover {
  transform: scale(1.3) translateZ(10px);
  z-index: 5;
  outline: 1px solid var(--accent-blue);
}

/* PDF Print rules override for Download functionality */
@media print {
  body * {
    visibility: hidden;
  }
  #printable-resume-page, #printable-resume-page * {
    visibility: visible;
  }
  #printable-resume-page {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    border: none !important;
    background: white !important;
    color: black !important;
    padding: 0 !important;
    margin: 0 !important;
  }
}
