/* Custom Stylesheet for Akhil Nagipogu's Portfolio */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@600;700;800&family=Work+Sans:wght@400;500;600&family=JetBrains+Mono:wght@400;500;700&display=swap');

/* Scroll behavior and Custom Scrollbar */
html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

:root {
  --scrollbar-thumb: #304d39;
  --scrollbar-track: #f4f4ee;
  --terminal-bg: #0c0e0d;
}

html.dark {
  --scrollbar-thumb: #8ebd9c;
  --scrollbar-track: #141714;
}

/* Scrollbar styling for Chrome/Safari/Edge */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
  background: opacity 0.8;
}

/* Smooth Transitions for Theme Toggling */
body, nav, section, div, p, span, h1, h2, h3, h4, h5, h6, a, button, input, textarea {
  transition: background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
              border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
              color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Material Symbols alignment */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  vertical-align: middle;
}

/* Custom Scroll Reveals (Handled via GSAP ScrollTrigger) */

/* Floating animation for subtle interest */
@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
}

.animate-float {
  animation: float 4s ease-in-out infinite;
}

/* Blinking terminal cursor animation */
@keyframes blink {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

.terminal-cursor {
  display: inline-block;
  width: 8px;
  height: 15px;
  background-color: currentColor;
  margin: 0;
  animation: blink 1s step-end infinite;
  vertical-align: middle;
}

/* Disable transitions inside the terminal CLI for instant typing response */
#terminal-drawer, #terminal-drawer * {
  transition: none !important;
}

/* Glow effects */
.glow-primary {
  box-shadow: 0 0 15px rgba(48, 77, 57, 0.15);
}

html.dark .glow-primary {
  box-shadow: 0 0 20px rgba(142, 189, 156, 0.2);
}

.glow-secondary {
  box-shadow: 0 0 15px rgba(139, 80, 16, 0.15);
}

html.dark .glow-secondary {
  box-shadow: 0 0 20px rgba(255, 183, 120, 0.2);
}

/* Terminal Drawer Custom Style */
.terminal-drawer {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.terminal-stdout-line {
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

/* Pulse animation adjustments */
@keyframes glow-pulse {
  0%, 100% {
    box-shadow: 0 0 5px rgba(48, 77, 57, 0.3);
  }
  50% {
    box-shadow: 0 0 15px rgba(48, 77, 57, 0.6);
  }
}

.status-pulse-glow {
  animation: glow-pulse 2s infinite ease-in-out;
}

/* Home Lab telemetry animations */
.graph-bar {
  transition: height 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Project Card Hover zoom & hover lines */
.project-card {
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--scrollbar-thumb), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.project-card:hover::before {
  transform: translateX(100%);
}

/* Tech card styling */
.tech-card {
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.tech-card:hover {
  border-color: rgba(48, 77, 57, 0.5);
  box-shadow: 0 8px 24px -10px rgba(48, 77, 57, 0.25);
}

html.dark .tech-card:hover {
  border-color: rgba(142, 189, 156, 0.5);
  box-shadow: 0 8px 24px -10px rgba(142, 189, 156, 0.3);
}

/* Interactive custom switch */
.theme-switch-checkbox:checked + .theme-switch-label .theme-switch-ball {
  transform: translateX(24px);
}

/* --- Hyper-Interactive upgrades --- */

/* Mouse Spotlight Glow Aura */
#mouse-glow {
  background: radial-gradient(600px circle at var(--mouse-x, 0px) var(--mouse-y, 0px), rgba(48, 77, 57, 0.08), transparent 80%);
}

html.dark #mouse-glow {
  background: radial-gradient(800px circle at var(--mouse-x, 0px) var(--mouse-y, 0px), rgba(142, 189, 156, 0.06), transparent 80%);
}

/* CRT Scanlines and Pulsing phosphorus text glow */
.terminal-scanlines {
  background: linear-gradient(
    rgba(12, 14, 13, 0) 50%, 
    rgba(0, 0, 0, 0.3) 50%
  );
  background-size: 100% 4px;
}

@keyframes terminal-phosphor-glow {
  0%, 100% { text-shadow: 0 0 3px rgba(16, 185, 129, 0.15); }
  50% { text-shadow: 0 0 5px rgba(16, 185, 129, 0.25); }
}

#terminal-drawer * {
  animation: terminal-phosphor-glow 4s ease-in-out infinite;
}

/* 3D Perspective context for cards */
.tech-card, .project-card {
  transform-style: preserve-3d;
  perspective: 1000px;
}

/* Card Glare Glow Reflection layer */
.card-glare {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    circle at var(--glare-x, 50%) var(--glare-y, 50%), 
    rgba(255, 255, 255, 0.09) 0%, 
    transparent 60%
  );
  z-index: 5;
  mix-blend-mode: overlay;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.tech-card:hover .card-glare, .project-card:hover .card-glare {
  opacity: 1;
}

/* Ensure canvas particles stay in place */
#bg-canvas {
  will-change: transform;
}
