/* Project Item Animation */
@keyframes fadeInProject {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.project-item:nth-child(1) {
  animation: fadeInProject 0.7s ease-out 0.2s forwards;
  opacity: 0;
}

.project-item:nth-child(2) {
  animation: fadeInProject 0.7s ease-out 0.4s forwards;
  opacity: 0;
}

.project-item:nth-child(3) {
  animation: fadeInProject 0.7s ease-out 0.6s forwards;
  opacity: 0;
}

/* Enhanced Portfolio Page Styles with Side-by-Side Layout */
:root {
  --bg-color: #f5f5f7;
  --text-color: #333;
  --accent-color: #0070f3;
  --accent-hover: #0051b3;
  --card-bg: rgba(255, 255, 255, 0.8);
  --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  --border-color: rgba(0, 0, 0, 0.1);
  
  /* Gradients */
  --gradient-bg: linear-gradient(135deg, #f5f5f7 0%, #e8e8e8 100%);
  --accent-gradient: linear-gradient(90deg, #0070f3 0%, #00a2ff 100%);
  --card-gradient: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(240, 240, 240, 0.85) 100%);
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-regular: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* Dark Mode Variables */
[data-theme="dark"] {
  --bg-color: #121212;
  --text-color: #f5f5f7;
  --accent-color: #00a2ff;
  --accent-hover: #59c0ff;
  --card-bg: rgba(30, 30, 35, 0.8);
  --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  --border-color: rgba(255, 255, 255, 0.1);
  
  /* Gradients */
  --gradient-bg: linear-gradient(135deg, #121212 0%, #1e1e24 100%);
  --accent-gradient: linear-gradient(90deg, #00a2ff 0%, #0070f3 100%);
  --card-gradient: linear-gradient(135deg, rgba(30, 30, 35, 0.95) 0%, rgba(20, 20, 25, 0.85) 100%);
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--gradient-bg);
  color: var(--text-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s, color 0.3s;
}

/* Theme Toggle */
.theme-toggle {
  position: absolute;
  top: 2rem;
  right: 2rem;
  background: var(--card-bg);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--card-shadow);
  transition: all var(--transition-regular);
  z-index: 100;
}

.theme-toggle:hover {
  transform: translateY(-2px);
}

.theme-toggle i {
  font-size: 1.25rem;
  color: var(--accent-color);
}

/* Landing Container */
.landing-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 5rem 2rem 2rem;
  max-width: 100%;
  margin: 0 auto;
  position: relative;
}

.name-title {
  text-align: center;
  margin-bottom: 5rem;
  width: 100%;
}

.name {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.title {
  font-size: 1.2rem;
  opacity: 0.8;
  max-width: 800px;
  margin: 0 auto;
}

/* Project Showcase */
.project-showcase {
  width: 100%;
  max-width: 1200px;
  margin-bottom: 3rem;
  display: flex;
  flex-direction: column;
  gap: 8rem;
}

.project-item {
  display: flex;
  align-items: center;
  gap: 3rem;
}

.project-item.reverse {
  flex-direction: row-reverse;
}

.project-image {
  flex: 1;
  min-width: 0;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: transform var(--transition-regular), box-shadow var(--transition-regular);
  height: 380px;
}

.project-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 112, 243, 0.8), rgba(0, 162, 255, 0.7)); /* Blue gradient overlay */
  mix-blend-mode: multiply; /* For more intensity */
  transition: opacity var(--transition-regular);
  z-index: 1;
}

.project-image:hover::after {
  opacity: 0;
}

.project-image:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
  position: relative;
  z-index: 0;
}

.project-image:hover img {
  transform: scale(1.05);
}

.project-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(45deg, #f3f3f3, #e0e0e0);
  color: #999;
  font-size: 1.2rem;
}

[data-theme="dark"] .project-placeholder {
  background: linear-gradient(45deg, #252525, #1a1a1a);
  color: #777;
}

.project-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.project-header {
  margin-bottom: 1.5rem;
}

.project-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
  color: var(--heading-color);
}

.project-status {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: var(--accent-gradient);
  color: white;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 12px rgba(0, 112, 243, 0.15);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.project-description {
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.project-features {
  margin-bottom: 1rem; /* Reduced margin */
}

.feature-list {
  list-style: none;
}

.feature-item {
  margin-bottom: 0.5rem; /* Reduced from 0.7rem */
  display: flex;
  align-items: flex-start;
  line-height: 1.5;
}

.feature-item i {
  color: var(--accent-color);
  margin-right: 0.8rem;
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: auto;
  margin-bottom: 0.75rem; /* Reduced margin */
}

.tech {
  padding: 0.5rem 1rem;
  background-color: rgba(var(--accent-rgb), 0.1);
  color: var(--accent-color);
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.tech:hover {
  background-color: rgba(var(--accent-rgb), 0.2);
  transform: translateY(-2px);
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

.project-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  background: transparent;
  color: var(--accent-color);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition-fast);
  border: 2px solid var(--accent-color);
  box-shadow: none;
}

.project-link:hover {
  background: var(--accent-color);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 112, 243, 0.15);
}

.project-link i {
  margin-right: 0.5rem;
  font-size: 1rem;
}

/* Navigation Links */
.main-links {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
}

@media (max-width: 768px) {
  .main-links {
    flex-direction: column;
    gap: 1rem;
  }
}

.nav-button {
  padding: 1rem 2.5rem;
  background: var(--card-gradient);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-color);
  text-decoration: none;
  transition: all var(--transition-regular);
  box-shadow: var(--card-shadow);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 180px;
}

.nav-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity var(--transition-regular);
  z-index: -1;
}

.nav-button:hover {
  transform: translateY(-5px);
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.nav-button:hover::before {
  opacity: 0.05;
}

.nav-button i {
  margin-right: 0.75rem;
  font-size: 1.2rem;
}

/* Social Links */
.social-links {
  display: flex;
  gap: 1.5rem;
  margin-top: 2rem;
}

.social-link {
  color: var(--text-color);
  font-size: 1.5rem;
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.social-link:hover {
  color: var(--accent-color);
  transform: translateY(-3px);
}

/* Footer */
.footer {
  margin-top: auto;
  text-align: center;
  padding: 1rem;
  opacity: 0.7;
  font-size: 0.9rem;
}

/* Cursor Follower */
.cursor-follower {
  position: fixed;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 112, 243, 0.15) 0%, rgba(0, 112, 243, 0) 70%);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: -1;
  transition: width 0.3s, height 0.3s, opacity 0.3s;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.name-title {
  animation: fadeIn 0.6s ease-out forwards;
}

.project-showcase {
  animation: fadeIn 0.6s ease-out 0.1s forwards;
  opacity: 0;
}

.main-links {
  animation: fadeIn 0.6s ease-out 0.2s forwards;
  opacity: 0;
}

.social-links {
  animation: fadeIn 0.6s ease-out 0.3s forwards;
  opacity: 0;
}

/* Dark Mode Adjustments */
[data-theme="dark"] .nav-button {
  background: rgba(30, 30, 35, 0.6);
}

[data-theme="dark"] .project-image::after {
  background: linear-gradient(135deg, rgba(0, 128, 255, 0.8), rgba(0, 200, 255, 0.7)); /* Vibrant blue gradient for dark mode */
  mix-blend-mode: multiply;
}

[data-theme="dark"] .project-link {
  border-color: var(--accent-color);
  color: var(--accent-color);
}

[data-theme="dark"] .project-link:hover {
  background: var(--accent-color);
  color: #1a1a1a;
  box-shadow: 0 6px 16px rgba(0, 162, 255, 0.2);
}

[data-theme="dark"] .cursor-follower {
  background: radial-gradient(circle, rgba(0, 162, 255, 0.15) 0%, rgba(0, 162, 255, 0) 70%);
}

/* Media Queries */
@media (max-width: 992px) {
  .project-item, .project-item.reverse {
    flex-direction: column;
    gap: 2rem;
  }
  
  .project-image {
    width: 100%;
    height: 350px;
  }
  
  .project-title {
    font-size: 1.8rem;
  }
}

@media (max-width: 768px) {
  .name {
    font-size: 2.5rem;
  }
  
  .landing-container {
    padding: 4rem 1.5rem 1.5rem;
  }
  
  .project-showcase {
    gap: 4rem;
  }
  
  .project-image {
    height: 280px;
  }
  
  .project-description {
    font-size: 1rem;
  }
  
  .project-links {
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .name {
    font-size: 2rem;
  }
  
  .title {
    font-size: 1rem;
  }
  
  .project-image {
    height: 220px;
  }
  
  .project-title {
    font-size: 1.5rem;
  }
  
  .tech-stack {
    gap: 0.5rem;
  }
  
  .tech {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }
}