/* Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

/* Prevent scrolling during loading */
body.loading {
  overflow: hidden;
}

/* Blur effect for main content during loading */
body.loading .hero,
body.loading section,
body.loading .navbar {
  filter: blur(10px);
  opacity: 0.3;
  transition: all 2s ease;
}

/* Gradual unblur effect */
body:not(.loading) .hero,
body:not(.loading) section,
body:not(.loading) .navbar {
  filter: blur(0px);
  opacity: 1;
  transition: all 2s ease;
}

/* Responsive Breakpoints */
:root {
  --mobile: 480px;
  --tablet: 768px;
  --desktop: 1024px;
  --large-desktop: 1200px;
  --xl-desktop: 1440px;
}

/* Mobile-first responsive utilities */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 768px) {
  .container {
    padding: 0 2rem;
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 3rem;
  }
}

:root {
  /* Main colors */
  --primary-color: #0F172A;    /* Darker blue-black background */
  --secondary-color: #1E293B;  /* Slightly lighter blue-black */
  --text-color: #E2E8F0;      /* Light gray for better readability */
  
  /* Accent colors */
  --accent-color: #38BDF8;    /* Bright blue */
  --accent-dark: #0EA5E9;     /* Darker blue for hover states */
  --accent-light: #7DD3FC;    /* Lighter blue for highlights */
  
  /* Gradient colors */
  --gradient-1: #60A5FA;      /* Bright blue */
  --gradient-2: #A78BFA;      /* Purple-blue */
  --gradient-3: #F472B6;      /* Pink */
  
  /* Additional colors */
  --surface-color: rgba(30, 41, 59, 0.7);     /* For cards and sections */
  --hover-color: rgba(56, 189, 248, 0.1);     /* For hover effects */
  --border-color: rgba(226, 232, 240, 0.1);   /* For subtle borders */
}

/* Particle Background */
#particles-js {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  filter: drop-shadow(0 0 10px var(--accent-color));
  backdrop-filter: blur(10px);
  will-change: transform;
  pointer-events: none;
  transition: background 1s ease;
}

/* Typewriter Effect */
.typewriter {
  display: inline-block;
  overflow: hidden;
  border-right: 0.09em solid var(--accent-color); /* thinner cursor */
  white-space: nowrap;
  margin: 0 auto;
  letter-spacing: 0.15em;
  font-size: 1.2rem; /* reduced size */
  color: var(--accent-color);
  animation: blink-caret 0.75s step-end infinite;
  vertical-align: middle;
  min-height: 1.6em;
}

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

@keyframes blink-caret {
  from, to { border-color: transparent }
  50% { border-color: var(--accent-color); }
}

/* Glitch Effect */
.glitch {
  position: relative;
  font-size: 4rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-color);
  letter-spacing: 0.05em;
  animation: glitch 2s infinite;
}

@keyframes glitch {
  0% {
    text-shadow: 0.05em 0 0 var(--accent-color), -0.05em -0.025em 0 var(--gradient-2);
    text-shadow: -0.05em -0.05em 0 var(--accent-color), 0.025em 0.05em 0 var(--gradient-2);
  }
  15% {
    text-shadow: -0.05em -0.025em 0 var(--accent-color), 0.025em 0.025em 0 var(--gradient-2);
  }
  50% {
    text-shadow: 0.025em 0.05em 0 var(--accent-color), 0.05em 0 0 var(--gradient-2);
  }
  100% {
    text-shadow: -0.025em 0 0 var(--accent-color), -0.025em -0.025em 0 var(--gradient-2);
  }
}

/* Neon Glow Effect */
.neon-text {
  color: var(--text-color);
  text-shadow: 
    0 0 5px var(--accent-color),
    0 0 10px var(--accent-color),
    0 0 15px var(--accent-color),
    0 0 20px var(--accent-color),
    0 0 35px var(--accent-color),
    0 0 40px var(--accent-color);
}

/* Magnetic Cursor Effect */
.magnetic-cursor {
  position: fixed;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-color);
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
  transition: transform 0.1s ease;
}

/* Scroll Progress Bar */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-color), var(--gradient-2));
  z-index: 1001;
  transition: width 0.1s ease;
}

/* Professional Hover Effects */
.skill-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.1), rgba(129, 140, 248, 0.1));
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 10px;
  padding: 2rem;
  transition: all 0.3s ease;
}

.skill-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(56, 189, 248, 0.3);
}

/* Professional Button Effects */
.btn-professional {
  position: relative;
  overflow: hidden;
  background: linear-gradient(45deg, var(--accent-color), var(--gradient-2));
  border: none;
  color: var(--primary-color);
  padding: 1rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
}

.btn-professional::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: left 0.5s;
}

.btn-professional:hover::before {
  left: 100%;
}

/* Professional Section Transitions */
.section-transition {
  position: relative;
  overflow: hidden;
}

.section-transition::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.1), transparent);
  transition: left 0.8s ease;
}

.section-transition:hover::before {
  left: 100%;
}

/* Advanced Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}

/* Professional Card Effects */
.card-glow {
  position: relative;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.1), rgba(129, 140, 248, 0.1));
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 15px;
  padding: 2rem;
  transition: all 0.3s ease;
}

.card-glow:hover {
  border-color: var(--accent-color);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
}

/* Professional Text Effects */
.text-gradient {
  background: linear-gradient(45deg, var(--accent-color), var(--gradient-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-shimmer {
  background: linear-gradient(90deg, var(--accent-color), var(--gradient-2), var(--accent-color));
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 2s infinite;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: var(--text-color);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: inherit;
}

/* Navigation Animations */
@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

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

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 1rem;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  animation: slideDown 0.5s ease forwards;
}

@media (min-width: 768px) {
  .navbar {
    padding: 1rem 2rem;
  }
}

@media (min-width: 1024px) {
  .navbar {
    padding: 1rem 5%;
  }
}

.navbar .logo {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--accent-color);
  opacity: 0;
  animation: fadeIn 0.5s ease forwards 0.3s;
}

.nav-links {
  display: flex;
  list-style: none;
}

.nav-links li {
  margin-left: 2rem;
  opacity: 0;
}

.nav-links li:nth-child(1) { animation: fadeIn 0.5s ease forwards 0.4s; }
.nav-links li:nth-child(2) { animation: fadeIn 0.5s ease forwards 0.5s; }
.nav-links li:nth-child(3) { animation: fadeIn 0.5s ease forwards 0.6s; }
.nav-links li:nth-child(4) { animation: fadeIn 0.5s ease forwards 0.7s; }
.nav-links li:nth-child(5) { animation: fadeIn 0.5s ease forwards 0.8s; }
.nav-links li:nth-child(6) { animation: fadeIn 0.5s ease forwards 0.9s; }

.nav-links a {
  color: var(--text-color);
  position: relative;
  padding: 5px 0;
  transition: color 0.3s;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-color);
  transition: width 0.3s ease;
}

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

.nav-links a.active {
  color: var(--accent-color);
}

.nav-links a.active::after {
  width: 100%;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}

.mobile-menu-toggle span {
  width: 25px;
  height: 3px;
  background: var(--accent-color);
  margin: 3px 0;
  transition: 0.3s;
  border-radius: 2px;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(-45deg) translate(-5px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(45deg) translate(-5px, -6px);
}

/* Responsive Navigation */
@media (max-width: 768px) {
  .navbar {
    animation: none;
    padding: 0.5rem 1rem;
  }
  
  .navbar .logo {
    animation: none;
    opacity: 1;
    font-size: 1.2rem;
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: right 0.3s ease;
    z-index: 1000;
    padding: 2rem;
  }
  
  .nav-links.active {
    right: 0;
    animation: none;
  }
  
  .nav-links li {
    animation: none !important;
    opacity: 1;
    margin: 1rem 0;
    width: 100%;
    text-align: center;
  }
  
  .nav-links a {
    font-size: 1.1rem;
    padding: 1rem 0;
    display: block;
    width: 100%;
  }
  
  /* Overlay for mobile menu */
  .mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }
  
  .mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
  }
}

@media (max-width: 480px) {
  .navbar .logo {
    font-size: 1rem;
  }
  
  .nav-links {
    width: 100%;
    max-width: none;
  }
}

/* Hero Section Animations */
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
  100% { transform: translateY(0px); }
}

@keyframes textReveal {
  0% {
    opacity: 0;
    transform: translateY(20px);
    filter: blur(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes gradientFlow {
  0% {
    background-position: 0% 50%;
    opacity: 0.5;
  }
  50% {
    background-position: 100% 50%;
    opacity: 0.8;
  }
  100% {
    background-position: 0% 50%;
    opacity: 0.5;
  }
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  position: relative;
  background: linear-gradient(
    135deg,
    rgba(96, 165, 250, 0.05),
    rgba(167, 139, 250, 0.05),
    rgba(244, 114, 182, 0.05)
  );
  overflow: hidden;
  isolation: isolate;
  perspective: 1500px;
  transform-style: preserve-3d;
  will-change: transform;
}

@media (min-width: 768px) {
  .hero {
    padding: 0 2rem;
  }
}

@media (min-width: 1024px) {
  .hero {
    padding: 0 5%;
  }
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(
      circle at 20% 20%,
      rgba(96, 165, 250, 0.15) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 80%,
      rgba(244, 114, 182, 0.15) 0%,
      transparent 50%
    );
  filter: blur(80px);
  opacity: 0.7;
  animation: gradientFlow 8s ease-in-out infinite;
  z-index: -1;
}

.hero-content {
  max-width: 100%;
  position: relative;
  z-index: 2;
  opacity: 0;
  animation: textReveal 1s cubic-bezier(0.4, 0, 0.2, 1) forwards 0.3s;
  transform-style: preserve-3d;
  transform: translateZ(50px);
  will-change: transform, opacity;
  text-align: center;
}

@media (min-width: 768px) {
  .hero-content {
    max-width: 500px;
    text-align: left;
  }
}

@media (min-width: 1024px) {
  .hero-content {
    max-width: 600px;
  }
}

.hero-content h1 {
  font-size: 2.5rem;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  background: linear-gradient(
    45deg, 
    var(--gradient-1), 
    var(--gradient-2), 
    var(--gradient-3)
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-size: 200% 200%;
  animation: gradient-shift 8s ease infinite;
  filter: drop-shadow(0 0 20px rgba(96, 165, 250, 0.2));
}

@media (min-width: 768px) {
  .hero-content h1 {
    font-size: 3.5rem;
  }
}

@media (min-width: 1024px) {
  .hero-content h1 {
    font-size: 4rem;
  }
}

.hero-content h3 {
  font-size: 1.8rem;
  color: var(--accent-color);
  margin-bottom: 1.5rem;
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 2.5rem;
  line-height: 1.8;
}

.cta-button {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: linear-gradient(
    45deg,
    var(--accent-color),
    var(--accent-dark)
  );
  color: var(--primary-color);
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.cta-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transform: translateX(-100%);
  transition: transform 0.6s;
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(56, 189, 248, 0.3);
}

.cta-button:hover::before {
  transform: translateX(100%);
}

.hero-img {
  width: 250px;
  height: 250px;
  border-radius: 50%;
  position: relative;
  background: transparent;
  border: none;
  overflow: hidden;
  z-index: 2;
  opacity: 0;
  animation: textReveal 1s cubic-bezier(0.4, 0, 0.2, 1) forwards 1.2s,
             float 6s ease-in-out infinite 2s;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  transform-style: preserve-3d;
  transform: translateZ(100px);
  will-change: transform, opacity, box-shadow;
  transition: box-shadow 0.3s ease;
  margin: 2rem auto 0;
}

@media (min-width: 768px) {
  .hero-img {
    width: 300px;
    height: 300px;
    margin: 0;
  }
}

@media (min-width: 1024px) {
  .hero-img {
    width: 350px;
    height: 350px;
  }
}
.hero-img:hover {
  box-shadow: 0 30px 60px rgba(56, 189, 248, 0.6);
  transform: translateZ(120px) rotateY(10deg) rotateX(5deg);
}

.hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  position: relative;
  z-index: 2;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-img::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(
    45deg,
    var(--gradient-1),
    var(--gradient-2),
    var(--gradient-3)
  );
  z-index: 1;
  border-radius: 50%;
  animation: borderRotate 8s linear infinite;
  opacity: 0.8;
}

.hero-img::after {
  content: '';
  position: absolute;
  inset: 3px;
  background: var(--primary-color);
  border-radius: 50%;
  z-index: 1;
}

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

/* Responsive Hero Section */
@media (max-width: 1024px) {
  .hero {
    flex-direction: column;
    text-align: center;
    padding-top: 6rem;
    gap: 2rem;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-img {
    margin-top: 2rem;
  }
}

@media (max-width: 768px) {
  .hero {
    padding-top: 5rem;
    gap: 1.5rem;
  }
  
  .hero-content h1 {
    font-size: 2.5rem;
  }

  .hero-content h3 {
    font-size: 1.2rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .hero-img {
    width: 200px;
    height: 200px;
  }
}

@media (max-width: 480px) {
  .hero {
    padding-top: 4rem;
    gap: 1rem;
  }
  
  .hero-content h1 {
    font-size: 2rem;
  }
  
  .hero-content h3 {
    font-size: 1rem;
  }
  
  .hero-content p {
    font-size: 0.9rem;
  }
  
  .hero-img {
    width: 180px;
    height: 180px;
  }
}

/* Sections */
section {
  padding: 3rem 1rem;
  position: relative;
  background: transparent;
  margin: 0;
  overflow: hidden;
}

@media (min-width: 768px) {
  section {
    padding: 4rem 2rem;
  }
}

@media (min-width: 1024px) {
  section {
    padding: 5rem 5%;
  }
}

section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(96, 165, 250, 0.08) 0%,
    transparent 50%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

section:hover::before {
  opacity: 1;
}

.section-title {
  font-size: 2rem;
  margin-bottom: 2rem;
  position: relative;
  background: linear-gradient(45deg, var(--gradient-1), var(--gradient-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-align: center;
}

@media (min-width: 768px) {
  .section-title {
    font-size: 2.25rem;
    margin-bottom: 2.5rem;
    text-align: left;
  }
}

@media (min-width: 1024px) {
  .section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
  }
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 50px;
  height: 2px;
  background: linear-gradient(90deg, var(--gradient-1), var(--gradient-2));
}

/* About Section */
.about-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 768px) {
  .about-content {
    flex-direction: row;
    align-items: flex-start;
  }
}

.about-text {
  flex: 1;
}

.about-text p {
  margin-bottom: 1rem;
}

.timeline {
  flex: 1;
  border-left: 2px solid var(--accent-color);
  padding-left: 1rem;
  cursor: pointer;
  width: 100%;
}

@media (min-width: 768px) {
  .timeline {
    padding-left: 2rem;
  }
}

.timeline-item {
  margin-bottom: 2rem;
  position: relative;
  padding: 20px;
  background: var(--surface-color);
  border-radius: 10px;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.timeline-item:hover {
  transform: translateX(10px);
  background: rgba(30, 41, 59, 0.9);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.5rem;
  top: 0;
  width: 15px;
  height: 15px;
  background: var(--accent-color);
  border-radius: 50%;
  border: 2px solid var(--accent-color);
  box-shadow: 0 0 10px var(--accent-color);
}

/* Achievements Section */
.achievements-content ul {
  list-style: disc;
  padding-left: 2rem;
}

.achievements-content li {
  margin-bottom: 0.8rem;
}

/* Projects Section */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}

@media (min-width: 1024px) {
  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.project-card {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  height: 250px;
  transform-style: preserve-3d;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  perspective: 1000px;
  background: var(--surface-color);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  border: none;
}

@media (min-width: 768px) {
  .project-card {
    height: 280px;
  }
}

@media (min-width: 1024px) {
  .project-card {
    height: 300px;
  }
}

.project-card.tilt {
  transform: rotateX(var(--rotateX)) rotateY(var(--rotateY)) scale(1.02);
}

.project-card .project-content {
  transform: translateZ(20px);
  transform-style: preserve-3d;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(56, 189, 248, 0.1),
    rgba(129, 140, 248, 0.1)
  );
  opacity: 0;
  transition: opacity 0.4s ease;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.project-card:hover::before {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .project-card {
    transform: none !important;
    transition: none !important;
  }
}

.project-image {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transition: transform 0.3s ease;
}

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

.project-title-box {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.6);
  padding: 0.5rem 1rem;
  border-radius: 5px;
  color: #fff;
  z-index: 2;
}

.project-hover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 3;
  pointer-events: none;
}

.project-card:hover .project-hover {
  opacity: 1;
  pointer-events: auto;
}

.project-description {
  margin-bottom: 1rem;
}

.tech-stack {
  margin-bottom: 1rem;
}

.tech-badge {
  display: inline-block;
  background: rgba(56, 189, 248, 0.15);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--text-color);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  margin: 0.3rem;
  font-size: 0.8rem;
  transition: all 0.3s ease;
}

.tech-badge:hover {
  background: rgba(56, 189, 248, 0.25);
  transform: translateY(-2px);
}

.btn-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
  z-index: 10;
  pointer-events: auto;
  width: 100%;
}

@media (min-width: 768px) {
  .btn-container {
    flex-direction: row;
    gap: 1rem;
    width: auto;
  }
}

.btn {
  padding: 0.5rem 1rem;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  z-index: 10;
  pointer-events: auto;
}

.btn-color-2 {
  background: transparent;
  border: 2px solid var(--accent-color);
  color: var(--accent-color);
}

.btn-color-2:hover {
  background: var(--accent-color);
  color: var(--primary-color);
  transform: scale(1.05);
}

/* Resume Section */
.resume-content {
  display: flex;
  gap: 2rem;
}

.resume-download {
  text-align: center;
}

.resume-download a {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.8rem 2rem;
  background: var(--accent-color);
  color: var(--primary-color);
  border-radius: 5px;
  transition: transform 0.3s;
}

.resume-download a:hover {
  transform: scale(1.05);
}

@media (max-width: 768px) {
  .resume-content {
    flex-direction: column;
  }
}

/* Contact Section */
.contact-form {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 768px) {
  .contact-form {
    max-width: 600px;
    padding: 0;
  }
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.8rem;
  margin-bottom: 1rem;
  background: var(--surface-color);
  backdrop-filter: blur(5px);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  color: var(--text-color);
  transition: all 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

.contact-form button {
  background: var(--accent-color);
  color: var(--primary-color);
  padding: 0.8rem 2rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: transform 0.3s;
}

.contact-form button:hover {
  background: var(--accent-dark);
  transform: scale(1.05);
}

/* Footer */
footer {
  text-align: center;
  padding: 4rem 2rem;
  background: transparent;
  margin-top: 5rem;
  position: relative;
  overflow: hidden;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 25%;
  right: 25%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--accent-color),
    transparent
  );
}

.social-links {
  margin-top: 1rem;
}

.social-links a {
  margin: 0 1rem;
  color: var(--text-color);
  position: relative;
  display: inline-block;
  padding: 8px;
  transition: all 0.3s ease;
}

.social-links a:hover {
  color: var(--accent-color);
}

.social-links a::before {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent-color);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.social-links a:hover::before {
  transform: scaleX(1);
}

/* Scroll Animations */
[data-scroll] {
  opacity: 0;
  transition: all 1s ease;
}

[data-scroll="fade-in"] {
  transform: translateY(50px);
}

[data-scroll="slide-right"] {
  transform: translateX(-100px);
}

[data-scroll="slide-left"] {
  transform: translateX(100px);
}

[data-scroll].in-view {
  opacity: 1;
  transform: translate(0, 0);
}

@media (prefers-reduced-motion: reduce) {
  [data-scroll] {
    transform: none !important;
    opacity: 1 !important;
    transition: none !important;
  }
}

/* Preloader Styles */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  background-size: 400% 400%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  transition: all 0.5s ease;
  animation: gradientShift 6s ease infinite;
}

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

.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}





/* Responsive loading screen */
@media (max-width: 768px) {
  .loading-container dotlottie-wc {
    width: 200px !important;
    height: 200px !important;
  }
}

@media (max-width: 480px) {
  .loading-container dotlottie-wc {
    width: 150px !important;
    height: 150px !important;
  }
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 3000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.8);
}

.modal-content {
  background-color: var(--secondary-color);
  margin: 10% auto;
  padding: 20px;
  border: 1px solid var(--accent-color);
  width: 80%;
  max-width: 600px;
  border-radius: 10px;
  position: relative;
  animation: modalFadeIn 0.5s;
}

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

.modal-content .close {
  position: absolute;
  top: 10px;
  right: 20px;
  color: var(--accent-color);
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

/* Enhanced Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--primary-color);
}

::-webkit-scrollbar-thumb {
  background: var(--accent-color);
  border-radius: 5px;
}

/* Touch-friendly improvements for mobile */
@media (max-width: 768px) {
  /* Increase touch targets */
  .btn {
    min-height: 44px;
    padding: 0.75rem 1rem;
  }
  
  .nav-links a {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  /* Improve modal for mobile */
  .modal-content {
    margin: 5% auto;
    width: 95%;
    max-width: none;
    padding: 1rem;
  }
  
  /* Better spacing for mobile */
  .tech-badge {
    margin: 0.2rem;
    padding: 0.4rem 0.6rem;
  }
  
  /* Improve project hover for touch devices */
  .project-card:hover .project-hover {
    opacity: 1;
  }
  
  /* Disable hover effects on touch devices */
  @media (hover: none) {
    .project-card:hover {
      transform: none;
    }
    
    .btn:hover {
      transform: none;
    }
  }
}

/* Landscape orientation improvements */
@media (max-width: 768px) and (orientation: landscape) {
  .hero {
    min-height: 100vh;
    padding-top: 3rem;
  }
  
  .hero-content h1 {
    font-size: 2rem;
  }
  
  .hero-img {
    width: 150px;
    height: 150px;
  }
}

/* Global Animation Classes */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-up.active {
  opacity: 1;
  transform: translateY(0);
}

.slide-in-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-in-left.active {
  opacity: 1;
  transform: translateX(0);
}

.slide-in-right {
  opacity: 0;
  transform: translateX(50px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-in-right.active {
  opacity: 1;
  transform: translateX(0);
}

/* 3D/4D Hero Section Container */
.hero-3d {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  pointer-events: none;
  overflow: visible;
}
.hero-content, .hero-img {
  position: relative;
  z-index: 2;
}
