/* Base Styles */
:root {
  --background: #ffffff;
  --foreground: #0f172a;
  --card: #ffffff;
  --card-foreground: #0f172a;
  --primary: #6366f1;
  --primary-foreground: #f8fafc;
  --primary-light: rgba(99, 102, 241, 0.1);
  --secondary: #f1f5f9;
  --secondary-foreground: #1e293b;
  --muted: #f1f5f9;
  --muted-foreground: #64748b;
  --accent: #f1f5f9;
  --accent-foreground: #1e293b;
  --destructive: #ef4444;
  --destructive-foreground: #f8fafc;
  --border: #e2e8f0;
  --input: #e2e8f0;
  --ring: #6366f1;
  --radius: 0.75rem;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --gradient-start: #6366f1;
  --gradient-end: #8b5cf6;
}

.dark {
  --background: #0a0a0a;
  --foreground: #e4e4e7;
  --card: #111111;
  --card-foreground: #e4e4e7;
  --primary: #8b5cf6;
  --primary-foreground: #ffffff;
  --primary-light: rgba(139, 92, 246, 0.15);
  --secondary: #1a1a1a;
  --secondary-foreground: #e4e4e7;
  --muted: #1a1a1a;
  --muted-foreground: #a1a1aa;
  --accent: #1f1f23;
  --accent-foreground: #e4e4e7;
  --destructive: #dc2626;
  --destructive-foreground: #ffffff;
  --border: #27272a;
  --input: #1f1f23;
  --ring: #8b5cf6;
  --text-primary: #8b5cf6;
  --gradient-start: #8b5cf6;
  --gradient-end: #6366f1;
  --shadow-light: rgba(139, 92, 246, 0.1);
  --shadow-medium: rgba(139, 92, 246, 0.15);
  --shadow-heavy: rgba(0, 0, 0, 0.3);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: linear-gradient(135deg, #f8fafc 0%, #e0e7ff 100%);
  color: var(--foreground);
  line-height: 1.6;
  transition: all 0.3s ease;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.relative {
  position: relative;
}

.text-primary {
  color: var(--primary);
}

.icon {
  width: 1.25rem;
  height: 1.25rem;
}

.icon-sm {
  width: 1rem;
  height: 1rem;
  margin-left: 0.5rem;
}

/* Particle Background */
.particle-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  transition: all 0.3s;
  background-color: transparent;
}

.navbar.scrolled {
  background-color: rgba(var(--background-rgb), 0.8);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.navbar-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--foreground);
}

.desktop-nav {
  display: none;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  color: rgba(var(--foreground-rgb), 0.8);
  text-decoration: none;
  transition: color 0.3s;
}

.nav-link:hover {
  color: var(--primary);
}

.mobile-nav-toggle {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--foreground);
}

.menu-toggle .close {
  display: none;
}

.menu-toggle.active .menu {
  display: none;
}

.menu-toggle.active .close {
  display: block;
}

.mobile-menu {
  display: none;
  background-color: rgba(var(--background-rgb), 0.95);
  backdrop-filter: blur(8px);
  padding: 1rem 0;
}

.mobile-menu.active {
  display: block;
}

.mobile-nav-link {
  display: block;
  padding: 0.5rem 0;
  color: rgba(var(--foreground-rgb), 0.8);
  text-decoration: none;
  transition: color 0.3s;
}

.mobile-nav-link:hover {
  color: var(--primary);
}

/* Theme Toggle */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--foreground);
  position: relative;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle .sun {
  opacity: 1;
  transform: rotate(0) scale(1);
  transition: all 0.3s;
}

.theme-toggle .moon {
  position: absolute;
  opacity: 0;
  transform: rotate(90deg) scale(0);
  transition: all 0.3s;
}

.dark .theme-toggle .sun {
  opacity: 0;
  transform: rotate(-90deg) scale(0);
}

.dark .theme-toggle .moon {
  opacity: 1;
  transform: rotate(0) scale(1);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  font-weight: 500;
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  border: none;
  font-size: 0.875rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
  color: var(--primary-foreground);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 6px 25px rgba(99, 102, 241, 0.4);
  transform: translateY(-2px);
}

.btn-outline {
  background-color: transparent;
  color: var(--foreground);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  background-color: var(--secondary);
}

.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
}

.btn-full {
  width: 100%;
}

/* Hero Section */
.hero-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 4rem;
}

.hero-content {
  max-width: 48rem;
}

.hero-title {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  height: 3rem;
  display: flex;
  align-items: center;
}

.cursor {
  animation: blink 1s infinite;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

.hero-description {
  font-size: 1.125rem;
  color: rgba(var(--foreground-rgb), 0.8);
  margin-bottom: 2rem;
  max-width: 32rem;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  color: var(--foreground);
  transition: all 0.3s;
}

.social-link:hover {
  background-color: var(--secondary);
  color: var(--primary);
}

/* Section Styles */
.section {
  padding: 5rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title {
  font-size: 1.875rem;
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-description {
  color: rgba(var(--foreground-rgb), 0.7);
  max-width: 32rem;
  margin: 0 auto;
}

.section-footer {
  text-align: center;
  margin-top: 3rem;
}

/* Projects Section */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.project-card {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid #e2e8f0;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  backdrop-filter: blur(12px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.08);
}

.project-card:hover {
  box-shadow: 0 20px 40px rgba(99, 102, 241, 0.2);
  transform: translateY(-8px) scale(1.02);
  border-color: var(--primary);
}

.project-image {
  position: relative;
  height: 12rem;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--secondary);
}

.project-image img {
  width: 100%;
  height: 100%;
  min-height: 12rem;
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s;
  display: block;
}

@media (max-width: 640px) {
  .project-image {
    height: 10rem;
  }
  
  .project-image img {
    min-height: 10rem;
  }
}

@media (max-width: 480px) {
  .project-image {
    height: 9rem;
  }
  
  .project-image img {
    min-height: 9rem;
  }
}

.project-card:hover .project-image img {
  transform: scale(1.05);
}

.project-header {
  padding: 1.5rem 1.5rem 0.5rem;
}

.project-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.project-description {
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

.project-content {
  padding: 0.5rem 1.5rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
  color: var(--primary);
  font-size: 0.75rem;
  border: 1px solid rgba(99, 102, 241, 0.2);
  font-weight: 500;
}

.project-footer {
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
}

.skill-tag {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

.skill-tag:hover {
  color: #3b82f6; /* Or your preferred hover color */
  text-decoration: underline;
}

/* Skills Section */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.skill-card {
  border-radius: var(--radius);
  border: 1px solid #e2e8f0;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  backdrop-filter: blur(12px);
  padding: 1.5rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.08);
}

.skill-card:hover {
  box-shadow: 0 20px 40px rgba(99, 102, 241, 0.2);
  transform: translateY(-4px) scale(1.05);
  border-color: var(--primary);
}

.skill-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.skill-icon {
  width: 2rem;
  height: 2rem;
  color: var(--primary);
}

.skill-title {
  font-size: 1.25rem;
  font-weight: 600;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  background-color: var(--primary-light);
  color: var(--primary);
  font-size: 0.875rem;
}

/* About Section */
.about-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

.about-image {
  position: relative;
  aspect-ratio: 1;
  max-width: 24rem;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 0.75rem;
  border: 4px solid rgba(99, 102, 241, 0.2);
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 768px) {
  .about-image {
    max-width: 18rem;
  }
}

@media (max-width: 480px) {
  .about-image {
    max-width: 16rem;
  }
}

.about-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.about-role {
  font-size: 1.25rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.about-paragraph {
  margin-bottom: 1rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

.stat-card {
  background-color: rgba(var(--card-rgb), 0.5);
  padding: 1rem;
  border-radius: var(--radius);
}

.stat-value {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--primary);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* Contact Section */
.contact-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

.contact-subtitle {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.contact-cards {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  transition: all 0.3s ease;
}

.contact-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.contact-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  background-color: var(--primary-light);
  flex-shrink: 0;
}

.contact-icon {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--primary);
  stroke-width: 2;
  display: block;
  fill: none;
  stroke: currentColor;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
  flex: 1;
}

.contact-label {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.contact-value {
  color: var(--foreground);
  text-decoration: none;
  transition: color 0.3s;
}

.contact-value:hover {
  color: var(--primary);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 500;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--input);
  background-color: transparent;
  color: var(--foreground);
  font-family: var(--font-sans);
  transition: border-color 0.3s;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--ring);
  box-shadow: 0 0 0 2px rgba(var(--ring-rgb), 0.2);
}

.form-message {
  padding: 0.75rem;
  border-radius: var(--radius);
  text-align: center;
  display: none;
}

.form-message.success {
  display: block;
  background-color: rgba(34, 197, 94, 0.1);
  color: rgb(34, 197, 94);
}

.form-message.error {
  display: block;
  background-color: rgba(239, 68, 68, 0.1);
  color: rgb(239, 68, 68);
}

/* Footer */
.footer {
  background-color: rgba(var(--background-rgb), 0.5);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(var(--border-rgb), 0.4);
  padding: 3rem 0;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.footer-logo {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer-description {
  color: rgba(var(--foreground-rgb), 0.7);
  margin-bottom: 1rem;
}

.footer-social {
  display: flex;
  gap: 0.75rem;
}

.footer-heading {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
}

.footer-link {
  display: block;
  padding: 0.5rem 0;
  color: rgba(var(--foreground-rgb), 0.7);
  text-decoration: none;
  transition: color 0.3s;
}

.footer-link:hover {
  color: var(--primary);
}

.footer-contact {
  list-style: none;
}

.footer-contact-item {
  padding: 0.5rem 0;
  color: rgba(var(--foreground-rgb), 0.7);
}

.footer-contact-label {
  font-weight: 500;
  color: var(--foreground);
}

.footer-bottom {
  border-top: 1px solid rgba(var(--border-rgb), 0.4);
  margin-top: 2rem;
  padding-top: 2rem;
  text-align: center;
  color: rgba(var(--foreground-rgb), 0.6);
}

/* Go to Top Button */
.go-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--primary);
  color: var(--primary-foreground);
  border: none;
  border-radius: 50%;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  z-index: 1000;
}

.go-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.go-to-top:hover {
  background: var(--primary);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.go-to-top .icon {
  width: 1.25rem;
  height: 1.25rem;
}

/* Mobile responsiveness for go to top button */
@media (max-width: 768px) {
  .go-to-top {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 2.75rem;
    height: 2.75rem;
  }
  
  .go-to-top .icon {
    width: 1rem;
    height: 1rem;
  }
}

/* Media Queries */
@media (max-width: 480px) {
  .container {
    padding: 0 0.75rem;
  }

  .hero-title {
    font-size: 1.75rem;
  }

  .hero-subtitle {
    font-size: 1.25rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .project-card,
  .skill-card {
    margin: 0 auto;
    max-width: 100%;
  }
}

@media (min-width: 640px) {
  .projects-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }

  .skills-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 3.75rem;
  }

  .hero-subtitle {
    font-size: 2.25rem;
  }

  .hero-description {
    font-size: 1.25rem;
  }

  .desktop-nav {
    display: flex;
  }

  .mobile-nav-toggle {
    display: none;
  }

  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-content {
    grid-template-columns: 1fr 1fr;
  }

  .contact-content {
    grid-template-columns: 1fr 1fr;
  }

  .form-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-content {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .skills-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1280px) {
  .container {
    max-width: 1280px;
  }
}

/* Team Section Specific Styles */
#team .project-image {
  height: 16rem;
  width: 100%;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--secondary);
  overflow: hidden;
}

#team .project-image img {
  width: 100%;
  height: 100%;
  min-height: 16rem;
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s;
  display: block;
}

@media (max-width: 640px) {
  #team .project-image {
    height: 14rem;
  }
  
  #team .project-image img {
    min-height: 14rem;
  }
}

@media (max-width: 480px) {
  #team .project-image {
    height: 12rem;
  }
  
  #team .project-image img {
    min-height: 12rem;
  }
}

#team .project-card:hover .project-image img {
  transform: scale(1.05);
}

/* Ensure consistent card heights in team section */
#team .project-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

#team .project-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Enhanced Dark Mode Styles */
.dark body {
  background: linear-gradient(135deg, #0a0a0a 0%, #111111 100%);
  color: var(--foreground);
}

.dark .navbar {
  background: rgba(17, 17, 17, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.dark .navbar.scrolled {
  background: rgba(17, 17, 17, 0.98);
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.4);
}

.dark .project-card {
  background: linear-gradient(145deg, #111111 0%, #1a1a1a 100%);
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.dark .project-card:hover {
  border-color: var(--primary);
  box-shadow: 0 12px 48px rgba(139, 92, 246, 0.15);
  transform: translateY(-4px);
}

.dark .skill-card {
  background: linear-gradient(145deg, #111111 0%, #1a1a1a 100%);
  border: 1px solid var(--border);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

.dark .skill-card:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 32px rgba(139, 92, 246, 0.2);
}

.dark .contact-card {
  background: linear-gradient(145deg, #111111 0%, #1a1a1a 100%);
  border: 1px solid var(--border);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

.dark .stat-card {
  background: linear-gradient(145deg, #111111 0%, #1a1a1a 100%);
  border: 1px solid var(--border);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

.dark .footer {
  background: linear-gradient(135deg, #0a0a0a 0%, #111111 100%);
  border-top: 1px solid var(--border);
}

.dark .form-input,
.dark .form-textarea {
  background: var(--input);
  border: 1px solid var(--border);
  color: var(--foreground);
}

.dark .form-input:focus,
.dark .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.dark .btn-primary {
  background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
  color: var(--primary-foreground);
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.3);
}

.dark .btn-primary:hover {
  box-shadow: 0 6px 24px rgba(139, 92, 246, 0.4);
  transform: translateY(-2px);
}

.dark .btn-outline {
  border-color: var(--border);
  color: var(--foreground);
}

.dark .btn-outline:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-foreground);
}

.dark .tag {
  background: rgba(139, 92, 246, 0.15);
  color: var(--primary);
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.dark .skill-tag {
  background: rgba(139, 92, 246, 0.1);
  color: var(--primary);
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.dark .skill-tag:hover {
  background: rgba(139, 92, 246, 0.2);
  transform: translateY(-2px);
}

.dark .social-link {
  background: var(--accent);
  border: 1px solid var(--border);
}

.dark .social-link:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-foreground);
  transform: translateY(-2px);
}

.dark .go-to-top {
  background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.3);
}

.dark .go-to-top:hover {
  box-shadow: 0 12px 32px rgba(139, 92, 246, 0.4);
}

.dark .mobile-menu {
  background: rgba(17, 17, 17, 0.98);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
}

.dark .particle-background {
  opacity: 0.3;
}

/* Dark mode text enhancements */
.dark .section-title {
  background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.dark .project-title,
.dark .skill-title {
  color: var(--foreground);
}

.dark .project-description,
.dark .section-description {
  color: var(--muted-foreground);
}

.dark .hero-title .text-primary {
  background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Enhanced scrollbar for dark mode */
.dark ::-webkit-scrollbar {
  width: 8px;
}

.dark ::-webkit-scrollbar-track {
  background: var(--background);
}

.dark ::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.dark ::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* Dark Mode Visual Enhancements */
.dark .about-image img {
  border: 2px solid var(--border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.dark .contact-icon-wrapper {
  background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
  color: var(--primary-foreground);
}

.dark .contact-icon {
  color: var(--primary-foreground);
  stroke: currentColor;
}

.dark .skill-icon {
  color: var(--primary);
}

.dark .form-message {
  color: var(--foreground);
}

.dark .footer-logo .text-primary {
  background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.dark .navbar .logo .text-primary {
  background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.dark .theme-toggle {
  background: var(--accent);
  border: 1px solid var(--border);
}

.dark .theme-toggle:hover {
  background: var(--primary);
  border-color: var(--primary);
}

.dark .menu-toggle {
  background: var(--accent);
  border: 1px solid var(--border);
  color: var(--foreground);
}

.dark .menu-toggle:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-foreground);
}

/* Dark mode gradients and effects */
.dark .hero-section {
  background: radial-gradient(ellipse at center, rgba(139, 92, 246, 0.05) 0%, transparent 70%);
}

.dark .section {
  position: relative;
}

.dark .section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at center, rgba(139, 92, 246, 0.02) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

/* Enhanced focus states for dark mode */
.dark .nav-link:focus,
.dark .mobile-nav-link:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.dark .btn:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Dark mode selection styling */
.dark ::selection {
  background: rgba(139, 92, 246, 0.3);
  color: var(--foreground);
}

.dark ::-moz-selection {
  background: rgba(139, 92, 246, 0.3);
  color: var(--foreground);
}

/* Blog Grid Responsive */
.blogs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 640px) {
  .blogs-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

@media (min-width: 768px) {
  .blogs-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .blogs-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Responsive Images */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Responsive Cards */
.project-card,
.skill-card {
  width: 100%;
  max-width: 100%;
}

/* Feature List Responsive */
.feature-list {
  padding-left: 1.25rem;
  margin: 0.75rem 0;
}

.feature-list li {
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

@media (max-width: 480px) {
  .feature-list {
    padding-left: 1rem;
  }
  
  .feature-list li {
    font-size: 0.8125rem;
  }
}

/* Icon fixes and enhancements */
.icon, .contact-icon, .skill-icon {
  display: inline-block;
  vertical-align: middle;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-sm {
  width: 1rem;
  height: 1rem;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
  flex: 1;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  transition: all 0.3s ease;
}

.contact-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}
/* ============================================
   IMAGE OPTIMIZATION & FIX FOR ALL DEVICES
   ============================================ */

/* Image Rendering Optimization */
.project-image img,
#team .project-image img {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Prevent image distortion on all devices */
img {
  max-width: 100%;
  height: auto;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

