@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --primary-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --card-hover-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --bg-color: #ffffff;
  --text-primary: #1f2937;
  --text-secondary: #4b5563;
  --card-bg: rgba(255, 255, 255, 0.98);
  --nav-bg: rgba(255, 255, 255, 0.8);
  --border-color: #e5e7eb;
  --hero-overlay: rgba(255, 255, 255, 0.15);
}

[data-theme="dark"], .dark {
  --bg-color: #111827;
  --text-primary: #f9fafb;
  --text-secondary: #d1d5db;
  --card-bg: rgba(31, 41, 55, 0.98);
  --nav-bg: rgba(17, 24, 39, 0.8);
  --border-color: #374151;
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
  --card-hover-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
  --hero-overlay: rgba(0, 0, 0, 0.3);
}

*, *::before, *::after {
  transition: background-color 0.3s ease-in-out, border-color 0.3s ease-in-out, color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

html {
  transition: background-color 0.3s ease-in-out, color 0.3s ease-in-out;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.hero-section {
  background-image: linear-gradient(135deg, #312e81 0%, #5b21b6 100%);
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.15'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.8;
  background-color: var(--hero-overlay);
}

.card {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  box-shadow: var(--card-shadow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--card-hover-shadow);
}

/* Adjust project cards to only occupy necessary space */
#projects-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

#projects-container > .card {
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#projects-container > .card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

#projects-container > .card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.3), rgba(124, 58, 237, 0.3));
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

#projects-container > .card:hover::before {
  opacity: 1;
}

#projects-container > .card > * {
  position: relative;
  z-index: 2;
}

.tech-tag {
  background: var(--primary-gradient);
  color: white;
  font-weight: 500;
  transition: all 0.3s ease;
}

.tech-tag:hover {
  transform: scale(1.05);
}

.nav-link {
  position: relative;
  transition: all 0.3s ease;
  font-weight: 500;
  color: var(--text-secondary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-gradient);
  transition: width 0.3s ease;
}

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

.section-title {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  color: transparent;
  display: inline-block;
}

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

.animate-fade-in {
  animation: fadeIn 0.6s ease-out forwards;
}