@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Fira+Code:wght@400;500&display=swap');
body { background-color: #0a0a0f; color: #fff; scroll-behavior: smooth; }

/* Glitch hover effect for Labs nav link */
.glitch-hover {
  position: relative;
  display: inline-block;
}

.glitch-hover:hover {
  animation: glitchNav 0.3s ease-in-out;
}

@keyframes glitchNav {
  0% { transform: translate(0); }
  10% { transform: translate(-2px, 2px); }
  20% { transform: translate(2px, -2px); }
  30% { transform: translate(-2px, -2px); }
  40% { transform: translate(2px, 2px); }
  50% { transform: translate(-2px, 2px); }
  60% { transform: translate(2px, -2px); }
  70% { transform: translate(-2px, -2px); }
  80% { transform: translate(2px, 2px); }
  90% { transform: translate(-2px, 2px); }
  100% { transform: translate(0); }
}

.glitch-hover::before {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  color: #ff0066;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.glitch-hover:hover::before {
  opacity: 0.7;
  animation: glitchBefore 0.3s ease-in-out;
}

@keyframes glitchBefore {
  0% { transform: translate(0); }
  20% { transform: translate(-2px, 2px); }
  40% { transform: translate(2px, -2px); }
  60% { transform: translate(-2px, -2px); }
  80% { transform: translate(2px, 2px); }
  100% { transform: translate(0); }
}
.gradient-text {
  background: linear-gradient(90deg, #00ff88 0%, #0066ff 50%, #ff0066 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: background 0.5s cubic-bezier(0.4,0,0.2,1);
}
@keyframes fadeInLeft {
  0% {
    opacity: 0;
    transform: translateX(-60px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-fade-in-left {
  animation: fadeInLeft 1.1s cubic-bezier(0.4,0,0.2,1) both;
}
/* Enhanced gradient text hover effect */
.gradient-text:hover {
  background: linear-gradient(90deg, #ffffff 0%, #00ff88 50%, #ffffff 100%);
  filter: brightness(1.15) contrast(1.4) drop-shadow(0 2px 8px #00ff88cc);
  transition: background 0.9s cubic-bezier(0.4,0,0.2,1), filter 0.7s cubic-bezier(0.4,0,0.2,1);
}
.hero-animated-text {
  transition: color 0.7s cubic-bezier(0.4,0,0.2,1), text-shadow 0.7s cubic-bezier(0.4,0,0.2,1);
  text-shadow: 0 2px 8px rgba(0, 255, 136, 0.3);
}
.hero-animated-text:hover {
  color: #ffffff !important;
  text-shadow: 0 4px 16px rgba(0, 255, 136, 0.6);
}

/* Improve readability for hero text */
.hero-title {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.1;
  text-shadow: 0 2px 12px #1a1a2e55;
}

.hero-subtitle {
  font-size: 1.5rem;
  font-weight: 600;
  color: #f8f8f8;
  letter-spacing: 0.01em;
  line-height: 1.3;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 0;
  background-color: #00ff88;
  transition: width 0.3s ease;
}
.nav-link:hover::after { width: 100%; }

nav .font-mono,
nav .font-bold,
nav .text-primary {
  color: #ffffff !important;
  text-shadow: 0 1px 8px rgba(0, 234, 255, 0.2);
}

.nav-link {
  position: relative;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: #00ff88 !important;
}

.nav-link.active {
  color: #00ff88 !important;
}

.nav-link.active::after {
  width: 100%;
}
input, textarea {
  background-color: #1a1a2e !important;
  color: #ffffff !important;
  border: 1px solid rgba(0, 255, 136, 0.4) !important;
  font-weight: 500;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input:focus, textarea:focus {
  border-color: #00ff88 !important;
  box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.1) !important;
  outline: none !important;
}

/* Enhanced Mobile Contact Form Styling */
@media (max-width: 768px) {
  input, textarea {
    font-size: 16px !important; /* Prevents zoom on iOS */
    padding: 12px 16px !important;
    border-radius: 8px !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
  }
  
  textarea {
    resize: vertical;
    min-height: 120px;
  }
  
  /* Contact form button improvements */
  button[type="submit"] {
    width: 100%;
    min-height: 48px;
    font-size: 16px;
    font-weight: 600;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(0, 255, 136, 0.2);
  }
  
  /* Form labels */
  label {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px !important;
    display: block;
  }
  
  /* Form spacing on mobile */
  .space-y-6 > * + * {
    margin-top: 1.5rem !important;
  }
  
  /* Contact section padding */
  #contact {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
}
::selection { background-color: #00ff88; color: #0a0a0f; }

/* Enhanced Mobile Responsive Design */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
    line-height: 1.2;
  }
  
  .hero-subtitle {
    font-size: 1.125rem;
    line-height: 1.4;
  }
  
  .project-card {
    margin-bottom: 1.5rem;
  }
  
  .project-card img {
    height: 200px;
    object-fit: cover;
  }
  
  /* Improve button sizing and touch targets on mobile */
  .px-6 {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
  
  /* Enhanced touch targets - minimum 44px for accessibility */
  button, .px-6.py-3, a.px-6.py-3 {
    min-height: 44px;
    min-width: 44px;
    touch-action: manipulation; /* Prevents zoom on double-tap */
    -webkit-tap-highlight-color: rgba(0, 255, 136, 0.2);
  }
  
  /* Better spacing for mobile */
  section {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
  
  /* Optimize text selection on mobile */
  .hero-title, .hero-subtitle {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
  }
  
  /* Mobile-specific navigation improvements */
  #mobile-menu-button {
    min-height: 44px;
    min-width: 44px;
    touch-action: manipulation;
  }
  
  /* Reduce animation intensity on mobile for better performance */
  .animate-fade-in-left,
  .animate-float,
  .glitch-text::before,
  .glitch-text::after {
    animation-duration: 0.5s !important;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.75rem;
    line-height: 1.1;
    margin-bottom: 1rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
    line-height: 1.4;
    padding: 0 1rem;
    margin-bottom: 2rem;
  }
  
  .text-3xl {
    font-size: 1.75rem;
  }
  
  .grid-cols-1 {
    gap: 1rem;
  }
  
  /* Improve readability on small screens */
  p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
  }
  
  /* About section text improvements */
  #about p {
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 1.25rem;
    padding: 0 0.5rem;
  }
  
  /* Button layout improvements */
  .flex.justify-center.space-x-4 {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
  
  .flex.justify-center.space-x-4 > * {
    width: 100%;
    max-width: 280px;
    text-align: center;
  }
  
  /* Card content spacing */
  .holo-card {
    margin: 0.5rem;
    padding: 1.5rem !important;
  }
  
  /* Navigation improvements */
  .max-w-7xl {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* Enhanced hover effects for better interactivity */
.project-card {
  transform: translateY(0);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 234, 255, 0.1);
}

/* Improved button styles */
button, .px-6.py-3 {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

button:hover, .px-6.py-3:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 234, 255, 0.2);
}

/* Loading animation for better UX */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Performance optimizations */
* {
  box-sizing: border-box;
}

/* Smooth scrolling for the entire page */
html {
  scroll-behavior: smooth;
}

/* Improve text rendering */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Mobile Performance Optimizations */
@media (max-width: 768px) {
  /* Reduce animation complexity on mobile */
  .animate-fade-in-left,
  .animate-float,
  .animate-pulse {
    animation-duration: 0.5s !important;
    animation-iteration-count: 1 !important;
  }
  
  /* Optimize transforms for mobile */
  .project-card,
  .holo-card,
  .cyber-genre-card {
    will-change: auto; /* Only enable will-change during animations */
    transform: translateZ(0); /* Enable hardware acceleration */
  }
  
  /* Reduce glitch effects on mobile */
  .glitch-text::before,
  .glitch-text::after {
    animation-duration: 1s !important;
    animation-iteration-count: 1 !important;
  }
  
  /* Simplify hover effects on mobile (since they don't apply) */
  .project-card:hover,
  .holo-card:hover,
  .cyber-genre-card:hover {
    transform: none;
    box-shadow: none;
  }
  
  /* Optimize background effects */
  .cyber-grid {
    display: none; /* Hide complex grid on mobile */
  }
  
  /* Reduce blur effects on mobile for better performance */
  .backdrop-blur-sm {
    backdrop-filter: none;
    background-color: rgba(10, 10, 15, 0.95) !important;
  }
  
  /* Simplify gradients on mobile */
  .gradient-text {
    background: #00ff88 !important;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
  
  /* Optimize shadow rendering */
  .shadow-xl,
  .shadow-lg {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1) !important;
  }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .animate-fade-in-left,
  .animate-float,
  .animate-pulse,
  .glitch-text::before,
  .glitch-text::after {
    animation: none !important;
  }
}

/* GitHub Integration Styles */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.animate-spin {
  animation: spin 1s linear infinite;
}

/* Enhanced project card styles for GitHub integration */
#projects-container .project-card {
  background: linear-gradient(135deg, #1a1a2e 0%, #1a1b20 100%);
  border: 1px solid rgba(0, 234, 255, 0.1);
}

#projects-container .project-card:hover {
  border-color: rgba(0, 234, 255, 0.3);
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 234, 255, 0.15);
}

/* GitHub icon styling */
.fab.fa-github {
  background: linear-gradient(135deg, #00ff88 0%, #ffffff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Language tag improvements */
.project-card .bg-dark {
  background-color: rgba(17, 18, 22, 0.8) !important;
  backdrop-filter: blur(4px);
}

/* Error and loading states */
.text-red-400 { color: #f87171; }
.bg-red-900 { background-color: #7f1d1d; }
.border-red-500 { border-color: #ef4444; }
.text-red-100 { color: #fecaca; }
.bg-green-900 { background-color: #14532d; }
.border-green-500 { border-color: #22c55e; }
.text-green-100 { color: #dcfce7; }

/* Cyberpunk-inspired glitch effects */
@keyframes glitch {
  0% { transform: translate(0); }
  20% { transform: translate(-2px, 2px); }
  40% { transform: translate(-2px, -2px); }
  60% { transform: translate(2px, 2px); }
  80% { transform: translate(2px, -2px); }
  100% { transform: translate(0); }
}

.glitch-text {
  position: relative;
  display: inline-block;
}

.glitch-text::before,
.glitch-text::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.glitch-text::before {
  color: #ff0066;
  z-index: -1;
  animation: glitch 0.3s infinite;
  clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
}

.glitch-text::after {
  color: #00ff88;
  z-index: -2;
  animation: glitch 0.3s infinite reverse;
  clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
}

/* Holographic card effect */
.holo-card {
  background: linear-gradient(
    135deg,
    rgba(26, 26, 46, 0.8) 0%,
    rgba(10, 10, 15, 0.9) 50%,
    rgba(26, 26, 46, 0.8) 100%
  );
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 255, 136, 0.2);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.holo-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(0, 255, 136, 0.1),
    transparent
  );
  transform: rotate(-45deg);
  transition: transform 0.6s;
  pointer-events: none;
}

.holo-card:hover::before {
  transform: rotate(-45deg) translate(50%, 50%);
}

.holo-card:hover {
  border-color: rgba(0, 255, 136, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 255, 136, 0.15);
}

/* Terminal-inspired section headers */
.terminal-header {
  font-family: 'Fira Code', monospace;
  color: #00ff88;
  position: relative;
  padding-left: 20px;
}

.terminal-header::before {
  content: '$';
  position: absolute;
  left: 0;
  color: #0066ff;
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* Genre cards */
.cyber-genre-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: rgba(26, 26, 46, 0.6);
  border: 1px solid rgba(0, 255, 136, 0.2);
  border-radius: 8px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.cyber-genre-card:hover {
  border-color: rgba(0, 255, 136, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 255, 136, 0.15);
}

/* Timeline */
.cyber-timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  position: relative;
  padding-left: 20px;
  margin-bottom: 16px;
}

.cyber-timeline-dot {
  width: 8px;
  height: 8px;
  background: #00ff88;
  border-radius: 50%;
  position: absolute;
  left: 0;
  top: 6px;
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.cyber-timeline-item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 14px;
  width: 2px;
  height: calc(100% + 12px);
  background: linear-gradient(to bottom, #00ff88, rgba(0, 255, 136, 0.3));
}

.cyber-timeline-content {
  flex: 1;
}

/* Cyberpunk grid overlay */
.cyber-grid {
  background-image: 
    linear-gradient(rgba(0, 255, 136, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 136, 0.1) 1px, transparent 1px);
  background-size: 50px 50px;
}

/* Status indicators */
.status-indicator {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  background: rgba(10, 10, 15, 0.8);
  border-radius: 8px;
  border: 1px solid;
  transition: all 0.3s ease;
}

.status-indicator:hover {
  transform: translateX(4px);
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

/* Blog section styles */
.cyber-blog-featured {
  border: 2px solid rgba(0, 255, 136, 0.3);
}

.cyber-blog-featured:hover {
  border-color: rgba(0, 255, 136, 0.6);
}

/* Music player styles */
.music-progress {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.music-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #00ff88, #0066ff);
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* Neon border effects */
.neon-border {
  border: 2px solid;
  border-image: linear-gradient(45deg, #00ff88, #0066ff, #ff0066, #00ff88) 1;
  box-shadow: 
    0 0 10px rgba(0, 255, 136, 0.3),
    inset 0 0 10px rgba(0, 255, 136, 0.1);
}

/* Cyberpunk Shimeji Styles */
.cyber-shimeji {
  position: fixed;
  width: 64px;
  height: 64px;
  pointer-events: none;
  z-index: 9999;
  transition: none;
  user-select: none;
}

.shimeji-character {
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, #00ff88 20%, #0066ff 80%);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  position: relative;
  animation: shimejiBob 2s ease-in-out infinite;
}

.shimeji-character::before {
  content: '';
  position: absolute;
  top: 15%;
  left: 20%;
  width: 8px;
  height: 8px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 20px 0 0 #fff, 10px 15px 0 -2px #ff0066;
  animation: shimejiBlink 3s infinite;
}

.shimeji-character::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 15px solid #00ff88;
  opacity: 0.7;
}

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

@keyframes shimejiBlink {
  0%, 90%, 100% { opacity: 1; }
  95% { opacity: 0; }
}

@keyframes shimijiWalk {
  0% { transform: translateX(0) scaleX(1); }
  50% { transform: translateX(10px) scaleX(-1); }
  100% { transform: translateX(20px) scaleX(1); }
}

@keyframes shimijiClimb {
  0% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-20px) rotate(-10deg); }
  50% { transform: translateY(-40px) rotate(0deg); }
  75% { transform: translateY(-20px) rotate(10deg); }
  100% { transform: translateY(0) rotate(0deg); }
}

@keyframes shimijiHang {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(10px) rotate(5deg); }
}

.shimeji-walking .shimeji-character {
  animation: shimejiBob 0.5s ease-in-out infinite, shimijiWalk 3s linear infinite;
}

.shimeji-climbing .shimeji-character {
  animation: shimijiClimb 2s ease-in-out infinite;
}

.shimeji-hanging .shimeji-character {
  animation: shimijiHang 1.5s ease-in-out infinite;
}

.shimeji-idle .shimeji-character {
  animation: shimejiBob 2s ease-in-out infinite;
}

/* Speech bubble for shimeji */
.shimeji-speech {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 255, 136, 0.9);
  color: #0a0a0f;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: bold;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  margin-bottom: 10px;
  font-family: 'Fira Code', monospace;
}

.shimeji-speech::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid rgba(0, 255, 136, 0.9);
}

.shimeji-speech.show {
  opacity: 1;
}

/* Cyberpunk Logo Styles */
.cyber-logo {
  transition: all 0.3s ease;
}

.cyber-logo:hover {
  transform: scale(1.05);
}

.cyber-logo-text {
  background: linear-gradient(90deg, #00ff88 0%, #0066ff 50%, #ff0066 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
  transition: all 0.3s ease;
}

.cyber-logo:hover .cyber-logo-text {
  background: linear-gradient(90deg, #ffffff 0%, #00ff88 50%, #ffffff 100%);
  filter: drop-shadow(0 0 8px #00ff88);
}

.cyber-logo svg {
  transition: all 0.3s ease;
}

.cyber-logo:hover svg {
  filter: drop-shadow(0 0 6px #00ff88);
  animation: pulse 2s infinite;
}
