/* Theme CSS Variables */
:root {
  --color-background: #050507;
  --color-surface: #0f0f16;
  --color-dim: #181824;
  --color-foreground: #ffffff;
  --color-muted: #9ca3af;
  --color-accent: #a855f7;
  --color-accent-secondary: #ec4899;
}

/* Inverted light mode - negative colors of dark mode */
html.light {
  --color-background: #faf8fd;
  --color-surface: #f0edf9;
  --color-dim: #e7e4db;
  --color-foreground: #0a0a0f;
  --color-muted: #635c73;
  --color-accent: #7c3aed;
  --color-accent-secondary: #db2777;
}

/* Custom Utilities */
body {
  background-color: var(--color-background);
  color: var(--color-foreground);
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Light mode scrollbar - inverted purple tones */
html.light ::-webkit-scrollbar-track {
  background: #f0edf9;
}

html.light ::-webkit-scrollbar-thumb {
  background: #c4b5fd;
}

html.light ::-webkit-scrollbar-thumb:hover {
  background: #7c3aed;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: #050507;
}
::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: #a855f7;
}

/* Glassmorphism */
.glass {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Inverted glass effect for light mode */
html.light .glass {
  background: rgba(240, 237, 249, 0.85);
  border: 1px solid rgba(124, 58, 237, 0.1);
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.08);
}

.glass:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(168, 85, 247, 0.3);
  box-shadow: 0 0 30px rgba(168, 85, 247, 0.1);
}

html.light .glass:hover {
  background: rgba(250, 248, 253, 0.95);
  border-color: rgba(124, 58, 237, 0.3);
  box-shadow: 0 8px 30px rgba(124, 58, 237, 0.15);
}

/* Text Gradient */
.text-gradient {
  background: linear-gradient(to right, #a855f7, #ec4899, #a855f7);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient 5s linear infinite;
}

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

/* Animation Classes for JS Observer */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Canvas Styles */
#starfield {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.8;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* Light mode starfield with inverted purple tint */
html.light #starfield {
  opacity: 0.2;
  filter: invert(1) hue-rotate(180deg);
}

/* Konami Code Easter Egg styles */
@keyframes rainbow {
  0% {
    filter: hue-rotate(0deg);
  }
  100% {
    filter: hue-rotate(360deg);
  }
}

.easter-egg-active {
  animation: rainbow 3s linear infinite;
}

.easter-egg-message {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  background: rgba(168, 85, 247, 0.95);
  padding: 2rem 3rem;
  border-radius: 1rem;
  z-index: 9999;
  font-size: 1.5rem;
  font-weight: bold;
  text-align: center;
  box-shadow: 0 0 50px rgba(168, 85, 247, 0.5);
  transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.easter-egg-message.show {
  transform: translate(-50%, -50%) scale(1);
}

/* Scroll to Top Button visible state */
#scrollToTopBtn.visible {
  opacity: 1;
  pointer-events: auto;
}

/* Enhanced Scroll-to-Top button visuals */
#scrollToTopBtn {
  background: linear-gradient(135deg, rgba(168, 85, 247, 1) 0%, rgba(236, 72, 153, 1) 100%);
  border: 2px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 8px 30px rgba(168, 85, 247, 0.2);
  transform: translateY(0);
}

#scrollToTopBtn:hover {
  transform: translateY(-6px) scale(1.03);
}

#scrollToTopBtn .scroll-ring {
  position: absolute;
  width: 120%;
  height: 120%;
  border-radius: 9999px;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.06), transparent 40%);
  filter: blur(6px);
  z-index: 0;
  transition: opacity 0.3s ease;
}

#scrollToTopBtn i {
  position: relative;
  z-index: 10;
}

/* make visible state stronger */
#scrollToTopBtn.visible {
  opacity: 1;
  pointer-events: auto;
}

/* Enhanced Project Card Animations */
.project-card {
  transform-style: preserve-3d;
  /* Removed tilt/wobble animation, keeping only translateY */
  transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.5s ease;
}

.project-card:hover {
  /* Removed rotateX(2deg) to stop wobble effect */
  transform: translateY(-8px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Light mode project card shadows with purple tint */
html.light .project-card {
  background: rgba(240, 237, 249, 0.9);
  border: 1px solid rgba(124, 58, 237, 0.1);
}

html.light .project-card:hover {
  box-shadow: 0 25px 50px -12px rgba(124, 58, 237, 0.2);
  border-color: rgba(124, 58, 237, 0.25);
}

html.light .project-card:hover {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

/* Icon container 3D effect */
.icon-container {
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.project-card:hover .icon-container {
  /* Removed rotation, keeping only scale effect */
  transform: scale(1.1) translateZ(20px);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
}

/* Status badge animation */
.status-badge {
  transition: all 0.3s ease;
}

.project-card:hover .status-badge {
  transform: scale(1.05);
}

/* Stat items hover effect */
.stat-item {
  transition: all 0.3s ease;
}

.project-card:hover .stat-item {
  color: var(--color-foreground);
}

/* Floating particles for Nether theme */
.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(249, 115, 22, 0.6);
  border-radius: 50%;
  animation: float-particle 4s ease-in-out infinite;
}

.particle-1 {
  top: 20%;
  left: 20%;
  animation-delay: 0s;
}

.particle-2 {
  top: 60%;
  left: 70%;
  animation-delay: 1s;
}

.particle-3 {
  top: 80%;
  left: 30%;
  animation-delay: 2s;
}

/* End themed particles */
.particle-end-1 {
  background: rgba(147, 51, 234, 0.6);
  animation-delay: 0.5s;
}

.particle-end-2 {
  background: rgba(192, 132, 252, 0.6);
  animation-delay: 1.5s;
}

.particle-end-3 {
  background: rgba(216, 180, 254, 0.6);
  animation-delay: 2.5s;
}

@keyframes float-particle {
  0%,
  100% {
    transform: translateY(0) translateX(0);
    opacity: 0.6;
  }
  50% {
    transform: translateY(-20px) translateX(10px);
    opacity: 1;
  }
}

/* End dimension floating particles */
.end-particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: rgba(192, 132, 252, 0.4);
  border-radius: 50%;
  animation: end-float 6s ease-in-out infinite;
}

.end-particle-1 {
  top: 10%;
  left: 15%;
  animation-delay: 0s;
}

.end-particle-2 {
  top: 30%;
  right: 20%;
  animation-delay: 1.5s;
}

.end-particle-3 {
  bottom: 25%;
  left: 25%;
  animation-delay: 3s;
}

.end-particle-4 {
  bottom: 15%;
  right: 15%;
  animation-delay: 4.5s;
}

@keyframes end-float {
  0%,
  100% {
    transform: translateY(0) scale(1);
    opacity: 0.3;
  }
  50% {
    transform: translateY(-30px) scale(1.5);
    opacity: 0.8;
  }
}

/* Gradient shift animation for card borders */
@keyframes gradient-shift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Button hover enhancements */
.btn-download,
.btn-modrinth {
  position: relative;
  overflow: hidden;
}

.btn-download::after,
.btn-modrinth::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn-download:hover::after,
.btn-modrinth:hover::after {
  left: 100%;
}

/* Preview image reveal on hover (for future use) */
.project-card .preview-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.project-card:hover .preview-image {
  opacity: 0.1;
}

/* Theme toggle button animation */
#themeToggle,
#themeToggleMobile {
  transition: transform 0.3s ease, background-color 0.3s ease;
}

#themeToggle:hover,
#themeToggleMobile:hover {
  transform: rotate(15deg);
}

/* Language toggle styling */
#langToggle,
#langToggleMobile {
  min-width: 42px;
  text-align: center;
  transition: all 0.3s ease;
}

#langToggle:hover,
#langToggleMobile:hover {
  transform: scale(1.05);
}

/* Added experimental language indicator styles */
.lang-experimental-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: rgba(234, 179, 8, 0.2);
  border: 1px solid rgba(234, 179, 8, 0.3);
  border-radius: 9999px;
  font-size: 10px;
  color: #eab308;
  margin-left: 4px;
}

/* Light mode specific adjustments */
/* Light mode specific adjustments - inverted purple tones */
html.light .bg-surface\/50 {
  background-color: rgba(240, 237, 249, 0.5);
}

html.light .bg-surface\/30 {
  background-color: rgba(240, 237, 249, 0.3);
}

html.light .bg-black\/40 {
  background-color: rgba(240, 237, 249, 0.9);
}

html.light .bg-black\/20 {
  background-color: rgba(124, 58, 237, 0.05);
}

html.light .border-white\/5,
html.light .border-white\/10 {
  border-color: rgba(124, 58, 237, 0.12);
}

html.light .bg-white\/5 {
  background-color: rgba(124, 58, 237, 0.06);
}

html.light .bg-white\/10 {
  background-color: rgba(124, 58, 237, 0.1);
}

/* Adding Social Proof Section styles */
/* Counter Animation */
.counter {
  transition: all 0.3s ease;
}

/* Achievement Badge Hover */
.achievement-badge {
  transition: all 0.3s ease;
}

/* Light mode achievement badge hover */
html.light .achievement-badge:hover {
  box-shadow: 0 0 20px rgba(124, 58, 237, 0.25);
}

.achievement-badge:hover {
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.3);
}

/* Adding Blog/Updates Section styles */
/* Update Filter Buttons */
.update-filter-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--color-muted);
}

.update-filter-btn:hover {
  background: rgba(168, 85, 247, 0.1);
  border-color: rgba(168, 85, 247, 0.3);
  color: var(--color-foreground);
}

.update-filter-btn.active {
  background: rgba(168, 85, 247, 0.2);
  border-color: rgba(168, 85, 247, 0.5);
  color: #a855f7;
}

/* Light mode update filter buttons with purple tones */
html.light .update-filter-btn {
  background: rgba(124, 58, 237, 0.06);
  border: 1px solid rgba(124, 58, 237, 0.12);
  color: var(--color-muted);
}

html.light .update-filter-btn:hover {
  background: rgba(124, 58, 237, 0.12);
  border-color: rgba(124, 58, 237, 0.25);
}

html.light .update-filter-btn.active {
  background: rgba(124, 58, 237, 0.18);
  border-color: rgba(124, 58, 237, 0.4);
}

html.light .update-filter-btn {
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

html.light .update-filter-btn:hover {
  background: rgba(168, 85, 247, 0.1);
}

html.light .update-filter-btn.active {
  background: rgba(168, 85, 247, 0.15);
}

/* Update Card Transition */
.update-card {
  transition: all 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
}

.update-card.hidden {
  opacity: 0;
  transform: scale(0.95);
  pointer-events: none;
  position: absolute;
}

/* Light mode update card with purple-tinted background */
html.light .update-card {
  background: rgba(240, 237, 249, 0.9);
  border: 1px solid rgba(124, 58, 237, 0.1);
}

/* Adding Timeline styles */
/* Timeline Styles */
.timeline-item {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
}

.timeline-item.active {
  opacity: 1;
  transform: translateY(0);
}

.timeline-dot {
  transition: all 0.3s ease;
  box-shadow: 0 0 0 4px var(--color-background);
}

.timeline-item:hover .timeline-dot {
  transform: translate(-50%, 0) scale(1.3);
  box-shadow: 0 0 20px currentColor;
}

/* Adding Performance Metrics styles */
/* Version Bar Animation */
.version-bar {
  transition: all 0.3s ease;
}

.version-bar:hover {
  transform: translateX(5px);
}

.version-bar .h-3 > div {
  transition: width 1s ease-out;
}

/* Circular Progress Animation */
@keyframes progress-circle {
  from {
    stroke-dashoffset: 220;
  }
}

.glass svg circle:last-child {
  animation: progress-circle 1.5s ease-out forwards;
}

/* Light mode adjustments for new sections */
html.light .bg-surface\/30 {
  background-color: rgba(241, 245, 249, 0.3);
}

html.light .update-card {
  background: rgba(255, 255, 255, 0.8);
}

html.light .timeline-dot {
  box-shadow: 0 0 0 4px var(--color-background);
}

/* Light mode text gradient - deeper purple for contrast */
html.light .text-gradient {
  background: linear-gradient(to right, #7c3aed, #db2777, #7c3aed);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Light mode version bars and metrics */
html.light .version-bar {
  background: rgba(124, 58, 237, 0.08);
  border: 1px solid rgba(124, 58, 237, 0.1);
}

/* Light mode icon containers */
html.light .icon-container {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.15), rgba(219, 39, 119, 0.15));
}

/* Light mode stat items */
html.light .stat-item {
  background: rgba(124, 58, 237, 0.06);
  border: 1px solid rgba(124, 58, 237, 0.1);
}

/* Light mode buttons */
html.light .btn-download,
html.light .btn-modrinth {
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.2);
}

html.light .btn-download:hover,
html.light .btn-modrinth:hover {
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.3);
}

/* Light mode scroll to top button */
html.light #scrollToTopBtn {
  background: linear-gradient(135deg, rgba(124, 58, 237, 1) 0%, rgba(219, 39, 119, 1) 100%);
  box-shadow: 0 8px 30px rgba(124, 58, 237, 0.3);
}

/* Light mode particles - inverted colors */
html.light .particle {
  background: rgba(124, 58, 237, 0.4);
}

html.light .end-particle {
  background: rgba(192, 132, 252, 0.5);
}

/* Added styles for single-page navigation and sections */

/* Page Section Management */
.page-section {
  display: none;
  animation: fadeIn 0.4s ease-in-out;
}

.page-section.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Navigation Buttons */
.nav-btn {
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 0.5rem;
  color: var(--color-muted);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.nav-btn:hover {
  background: rgba(168, 85, 247, 0.1);
  border-color: rgba(168, 85, 247, 0.3);
  color: var(--color-foreground);
}

.nav-btn.active {
  background: rgba(168, 85, 247, 0.2);
  border-color: rgba(168, 85, 247, 0.5);
  color: #a855f7;
  font-weight: 600;
}

/* Light mode navigation buttons */
html.light .nav-btn {
  background: rgba(124, 58, 237, 0.06);
  border: 1px solid rgba(124, 58, 237, 0.12);
}

html.light .nav-btn:hover {
  background: rgba(124, 58, 237, 0.12);
  border-color: rgba(124, 58, 237, 0.25);
  color: var(--color-foreground);
}

html.light .nav-btn.active {
  background: rgba(124, 58, 237, 0.18);
  border-color: rgba(124, 58, 237, 0.4);
  color: #7c3aed;
}

/* Sticky Navigation */
nav.sticky {
  position: sticky;
  top: 0;
  z-index: 100;
}

/* Smooth transitions for all internal links */
html {
  scroll-behavior: smooth;
}
