/* ===== BASE STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --text-color: #ffffff;
  --bg-color: #0f1729; /* Darker navy blue like in the banner */
  --card-bg: #1a2234; /* Card background color matching the banner */
  --card-bg-hover: rgba(35, 47, 74, 0.9);
  --card-border: rgba(255, 255, 255, 0.1);
  --glow-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
  --rainbow-gradient: linear-gradient(90deg, 
    #ff3366, 
    #ff6633, 
    #ffcc33, 
    #33ff66, 
    #33ccff, 
    #3366ff, 
    #cc33ff);
  --card-shadow: 0px 8px 20px rgba(0, 0, 0, 0.3);
  --card-shadow-hover: 0px 15px 30px rgba(0, 0, 0, 0.4);
  --neon-glow: 0 0 5px rgba(255, 255, 255, 0.3), 0 0 10px rgba(255, 255, 255, 0.2), 0 0 15px rgba(255, 255, 255, 0.1);
}

html {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  padding-top: 80px;
  line-height: 1.6;
  width: 100%;
  min-height: 100vh; /* Fixes height issue */
  position: relative;
  overflow-x: hidden; /* Ensures no horizontal scroll */
  opacity: 0;
  animation: fadeIn 0.8s ease-in-out forwards;
}

html, body {
  overflow-y: auto !important; /* Force scrollbar */
  height: auto !important;    /* Allow content to expand */
}

::selection {
  background-color: #ffffff;
  color: var(--bg-color);
}

/* Main content wrapper */
.content-wrapper {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  animation: slideUpFade 0.8s ease-out forwards;
}

/* ===== NAVBAR STYLES ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(26, 34, 52, 0.8);
  backdrop-filter: blur(10px);
  padding: 15px 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  animation: navbarSlideDown 0.6s ease-out forwards;
}

.navbar-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 30px;
}

.navbar-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-color);
  text-decoration: none;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: all 0.3s ease;
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
  position: relative;
  animation: logoGlow 3s infinite alternate;
}

.navbar-logo:hover {
  text-shadow: var(--glow-shadow);
}

.navbar-logo::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--rainbow-gradient);
  transition: width 0.4s ease;
}

.navbar-logo:hover::after {
  width: 100%;
}

.navbar-links {
  display: flex;
  gap: 25px;
  list-style: none;
}

.navbar-link {
  color: var(--text-color);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  opacity: 0.8;
  position: relative;
}

.navbar-link:hover {
  opacity: 1;
  text-shadow: var(--glow-shadow);
}

.navbar-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--text-color);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

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

/* ===== PROJECTS CONTAINER STYLES ===== */
.projects-container {
  max-width: 900px;
  width: 100%;
  text-align: center;
  padding: 30px;
  background: var(--card-bg);
  backdrop-filter: blur(15px);
  border-radius: 20px;
  box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.3);
  margin: 20px auto 50px;
  border: 1px solid var(--card-border);
  position: relative;
  overflow: hidden;
  animation: containerFadeIn 1s ease-out forwards;
}

.projects-container::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: var(--rainbow-gradient);
  opacity: 0.05;
  animation: rotateGradient 15s linear infinite;
  pointer-events: none;
  z-index: -1;
}

.title {
  font-size: 2.5rem;
  margin-bottom: 30px;
  color: var(--text-color);
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
  letter-spacing: 2px;
  font-weight: 700;
  background: var(--rainbow-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: rainbow 8s linear infinite, titlePulse 3s ease-in-out infinite;
  background-size: 200% 100%;
  display: inline-block;
  position: relative;
}

.title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 50%;
  height: 3px;
  background: var(--rainbow-gradient);
  animation: rainbow 8s linear infinite;
  background-size: 200% 100%;
}

/* ===== PROJECT CARDS STYLES ===== */
.project-card {
  display: flex;
  align-items: center;
  background: rgba(15, 23, 41, 0.8);
  padding: 25px;
  border-radius: 15px;
  margin-bottom: 30px;
  width: 100%;
  box-shadow: var(--card-shadow);
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
              box-shadow 0.5s ease, 
              background 0.3s ease;
  border: 1px solid var(--card-border);
  position: relative;
  overflow: hidden;
  animation: cardSlideUp 0.6s ease-out forwards;
  animation-fill-mode: both;
}

.project-card:nth-child(odd) {
  animation-delay: 0.2s;
}

.project-card:nth-child(even) {
  animation-delay: 0.4s;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, transparent 65%, rgba(255, 255, 255, 0.05) 100%);
  z-index: 1;
  pointer-events: none;
}

.project-card::after {
  content: '';
  position: absolute;
  top: -100%;
  left: -100%;
  width: 50%;
  height: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  transition: all 0.5s ease;
  opacity: 0;
  z-index: 2;
  pointer-events: none;
}

.project-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--card-shadow-hover), 0 0 20px rgba(255, 255, 255, 0.1);
  background: var(--card-bg-hover);
}

.project-card:hover::after {
  opacity: 1;
  top: 0;
  left: 0;
  animation: cardGlare 1.5s ease-out forwards;
}

.project-image {
  width: 180px;
  height: auto;
  border-radius: 12px;
  margin-right: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  object-fit: cover;
  transition: transform 0.5s ease, box-shadow 0.5s ease;
  position: relative;
  z-index: 3;
  filter: brightness(0.9);
}

.project-card:hover .project-image {
  transform: scale(1.05) rotate(1deg);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4), 0 0 15px rgba(255, 255, 255, 0.1);
  filter: brightness(1.1);
}

.project-info {
  flex: 1;
  text-align: left;
  position: relative;
  z-index: 3;
  transition: transform 0.3s ease;
}

.project-card:hover .project-info {
  transform: translateX(5px);
}

.project-card h2 {
  color: white;
  font-size: 1.8rem;
  margin-bottom: 12px;
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
  position: relative;
  display: inline-block;
  transition: transform 0.3s ease, text-shadow 0.3s ease;
}

.project-card:hover h2 {
  text-shadow: var(--neon-glow);
  transform: translateY(-2px);
}

.project-card h2::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--rainbow-gradient);
  transition: width 0.4s ease;
  background-size: 200% 100%;
}

.project-card:hover h2::after {
  width: 100%;
  animation: rainbow 8s linear infinite;
}

.project-card p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.05rem;
  margin-bottom: 15px;
  line-height: 1.6;
  transition: color 0.3s ease, transform 0.3s ease;
}

.project-card:hover p {
  color: rgba(255, 255, 255, 0.95);
  transform: translateY(-2px);
}

.project-tech {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  flex-wrap: wrap;
  transition: transform 0.3s ease;
}

.project-card:hover .project-tech {
  transform: translateY(-2px);
}

.tech-tag {
  background: rgba(255, 255, 255, 0.1);
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  color: #e0e0e0;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.tech-tag::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: all 0.5s ease;
}

.tech-tag:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  color: white;
}

.tech-tag:hover::before {
  left: 100%;
  animation: tagShine 1s forwards;
}

.project-link-btn {
  font-size: 1.1rem;
  color: var(--text-color);
  text-decoration: none;
  font-weight: 600;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  display: inline-block;
  margin-top: 5px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.3));
  position: relative;
  overflow: hidden;
  z-index: 3;
}

.project-link-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: all 0.5s ease;
}

.project-link-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.5));
  transform: translateY(-3px) scale(1.05);
  color: white;
}

.project-link-btn:hover::before {
  left: 100%;
  animation: btnShine 1s forwards;
}

/* ===== GITHUB BUTTON STYLES ===== */
.github-btn {
  display: inline-block;
  margin: 20px 0 40px;
  font-size: 1.3rem;
  color: var(--text-color);
  text-decoration: none;
  font-weight: 700;
  padding: 12px 25px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.3));
  position: relative;
  overflow: hidden;
  z-index: 3;
  animation: pulseButton 2s infinite alternate;
}

.github-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: all 0.5s ease;
}

.github-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.6));
  transform: translateY(-5px) scale(1.05);
  animation: none;
}

.github-btn:hover::before {
  left: 100%;
  animation: btnShine 1s forwards;
}

/* ===== ANIMATIONS ===== */
/* Page Load Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes navbarSlideDown {
  from { 
    opacity: 0;
    transform: translateY(-100%);
  }
  to { 
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes containerFadeIn {
  from { 
    opacity: 0;
    transform: scale(0.95);
  }
  to { 
    opacity: 1;
    transform: scale(1);
  }
}

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

/* Continuous Animations */
@keyframes rainbow {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

@keyframes rotateGradient {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes titlePulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

@keyframes logoGlow {
  0% { text-shadow: 0 0 5px rgba(255, 255, 255, 0.3); }
  100% { text-shadow: 0 0 15px rgba(255, 255, 255, 0.7), 0 0 20px rgba(255, 255, 255, 0.5); }
}

@keyframes pulseButton {
  0% { transform: scale(1); box-shadow: 0 0 0 rgba(255, 255, 255, 0); }
  100% { transform: scale(1.05); box-shadow: 0 0 20px rgba(255, 255, 255, 0.3); }
}

/* Interaction Animations */
@keyframes cardGlare {
  0% { 
    top: -100%;
    left: -100%;
    opacity: 0;
  }
  100% { 
    top: 100%;
    left: 100%;
    opacity: 1;
  }
}

@keyframes tagShine {
  0% { left: -100%; }
  100% { left: 100%; }
}

@keyframes btnShine {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 768px) {
  body {
    padding-top: 120px;
  }
  
  .navbar-container {
    padding: 0 20px;
  }
  
  .navbar-logo {
    font-size: 1.5rem;
    margin-right: 20px;
  }
  
  .navbar-links {
    gap: 15px;
  }
  
  .navbar-link {
    font-size: 0.9rem;
  }

  .projects-container {
    padding: 25px 20px;
    margin: 15px auto 40px;
  }

  .title {
    font-size: 2.2rem;
    margin-bottom: 25px;
  }

  .project-card {
    flex-direction: column;
    text-align: center;
    padding: 20px;
  }

  .project-image {
    margin: 0 0 20px 0;
    width: 100%;
    max-width: 250px;
  }

  .project-info {
    text-align: center;
  }

  .project-tech {
    justify-content: center;
  }
  
  /* Mobile animations adjustments */
  .project-card:hover {
    transform: translateY(-5px) scale(1.01);
  }
  
  .project-card:hover .project-image {
    transform: scale(1.03);
  }
}

/* ===== ADDITIONAL ANIMATIONS ===== */
/* Floating Elements Animation */
.project-card:nth-child(odd) {
  animation: floatUp 6s ease-in-out infinite alternate;
  animation-delay: 0s;
}

.project-card:nth-child(even) {
  animation: floatDown 7s ease-in-out infinite alternate;
  animation-delay: 0.5s;
}

@keyframes floatUp {
  0% { transform: translateY(0); }
  100% { transform: translateY(-8px); }
}

@keyframes floatDown {
  0% { transform: translateY(0); }
  100% { transform: translateY(8px); }
}

/* Cursor Trail Effect (add this to your HTML with JS) */
.cursor-trail {
  position: fixed;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: screen;
  transition: transform 0.1s, opacity 0.5s;
  transform: translate(-50%, -50%);
  opacity: 0;
}

/* Typing Animation for Text */
.typing-animation {
  overflow: hidden;
  border-right: 2px solid white;
  white-space: nowrap;
  margin: 0 auto;
  animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}

@keyframes blink-caret {
  from, to { border-color: transparent }
  50% { border-color: white }
}

/* Parallax Scrolling Effect */
.parallax-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background-size: cover;
  background-position: center;
  transform: translateZ(0);
  will-change: transform;
}

/* Staggered Animation for Multiple Elements */
.stagger-item {
  opacity: 0;
  transform: translateY(20px);
}

.stagger-item.animate {
  animation: staggerFadeIn 0.5s ease forwards;
}

.stagger-item:nth-child(1).animate { animation-delay: 0.1s; }
.stagger-item:nth-child(2).animate { animation-delay: 0.2s; }
.stagger-item:nth-child(3).animate { animation-delay: 0.3s; }
.stagger-item:nth-child(4).animate { animation-delay: 0.4s; }
.stagger-item:nth-child(5).animate { animation-delay: 0.5s; }

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

/* Magnetic Button Effect (requires JS) */
.magnetic-btn {
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  will-change: transform;
}

/* Reveal on Scroll Animation */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* 3D Card Tilt Effect (requires JS) */
.tilt-card {
  transform-style: preserve-3d;
  perspective: 1000px;
}

.tilt-card-inner {
  transition: transform 0.5s ease;
  transform: rotateX(0) rotateY(0);
}

/* Particle Background Effect (requires JS) */
.particles-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.particle {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  pointer-events: none;
}
