/* Modern Portfolio Styles */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #8b5cf6;
  --secondary: #a78bfa;
  --accent: #ec4899;
  --dark: #0f172a;
  --darker: #020617;
  --card-bg: #1e293b;
  --card-border: #334155;
  --light: #f1f5f9;
  --gray: #94a3b8;
  --gray-light: #475569;
  --gradient-1: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
  --gradient-2: linear-gradient(135deg, #ec4899 0%, #f97316 100%);
  --gradient-3: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
  --gradient-bg: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 1px 2px 0 rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 10px 10px -5px rgba(0, 0, 0, 0.5);
  --glow: 0 0 20px rgba(139, 92, 246, 0.4);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Helvetica Neue', sans-serif;
  line-height: 1.6;
  color: var(--light);
  background-color: var(--darker);
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--card-border);
  z-index: 1000;
  transition: all 0.3s ease;
}

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

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

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

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

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

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

/* Animations Helper Classes */
.fade-in-element {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  will-change: opacity, transform;
}

.fade-in-element.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Optimized Animations */
@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }

  /* Reduced movement distance */
}

@keyframes bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-5px);
  }
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 6rem 2rem 4rem;
  background: var(--gradient-bg);
  background-image:
    radial-gradient(at 40% 20%, rgba(139, 92, 246, 0.15) 0px, transparent 50%),
    radial-gradient(at 80% 0%, rgba(236, 72, 153, 0.15) 0px, transparent 50%),
    radial-gradient(at 0% 50%, rgba(139, 92, 246, 0.1) 0px, transparent 50%);
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-content {
  animation: fadeInLeft 1s ease;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--light);
}

.gradient-text {
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.5rem;
  color: var(--gray);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.hero-description {
  font-size: 1.1rem;
  color: var(--gray);
  line-height: 1.8;
  margin-bottom: 2rem;
  max-width: 600px;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  padding: 0.875rem 2rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-block;
}

.btn-primary {
  background: var(--gradient-1);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

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

.btn-secondary:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--glow);
}

.hero-image {
  animation: fadeInRight 1s ease;
  display: flex;
  justify-content: center;
  align-items: center;
}

.image-container {
  position: relative;
  width: 400px;
  height: 400px;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: float 6s ease-in-out infinite;
}

.img-wrapper {
  position: relative;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  overflow: hidden;
  z-index: 2;
  border: 4px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 60px -15px rgba(139, 92, 246, 0.5), 0 0 30px rgba(236, 72, 153, 0.3);
  background: var(--card-bg);
  animation: pulse-glow 3s infinite ease-in-out alternate;
}

.img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.5s ease;
}

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

@keyframes pulse-glow {
  0% {
    box-shadow: 0 0 50px -15px rgba(139, 92, 246, 0.4), 0 0 30px rgba(236, 72, 153, 0.2);
  }

  100% {
    box-shadow: 0 0 80px -10px rgba(139, 92, 246, 0.6), 0 0 50px rgba(236, 72, 153, 0.4);
  }
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: var(--gray);
  font-size: 0.9rem;
}

.scroll-arrow {
  margin-top: 0.5rem;
  font-size: 1.5rem;
  animation: bounce 2s infinite;
}

/* About Section */
.about-section {
  padding: 6rem 0;
  background: var(--dark);
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--gradient-1);
  border-radius: 2px;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.about-card {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  text-align: center;
  border: 1px solid var(--card-border);
}

.about-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-xl), var(--glow);
  border-color: var(--primary);
}

.card-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.about-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--light);
}

.about-card p {
  color: var(--gray);
  line-height: 1.7;
}

.skills-container {
  margin-top: 4rem;
}

.skills-heading {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 2rem;
  color: var(--light);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
  max-width: 800px;
  margin: 0 auto;
}

.skill-card {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.3s ease;
  border: 2px solid var(--card-border);
}

.skill-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md), var(--glow);
}

.skill-emoji {
  font-size: 2.5rem;
}

.skill-name {
  font-weight: 600;
  color: var(--light);
}

/* Projects Section */
.projects-section {
  padding: 6rem 0;
  background: var(--darker);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2.5rem;
}

.project-card {
  background: var(--card-bg);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  border: 1px solid var(--card-border);
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-xl), var(--glow);
  border-color: var(--primary);
}

.project-image {
  height: 280px;
  overflow: hidden;
  position: relative;
}

.project-image svg {
  width: 100%;
  height: 100%;
  display: block;
  transition: transform 0.3s ease;
}

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

.project-info {
  padding: 2rem;
}

.project-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--light);
}

.project-description {
  color: var(--gray);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tech-tag {
  background: rgba(139, 92, 246, 0.2);
  color: var(--secondary);
  padding: 0.4rem 0.9rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.project-link:hover {
  gap: 0.75rem;
  color: var(--secondary);
}

/* Experience Section */
.experience-section {
  padding: 6rem 0;
  background: var(--dark);
}

.timeline {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  padding-left: 3rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--gradient-1);
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
  animation: fadeIn 0.5s ease;
}

.timeline-dot {
  position: absolute;
  left: -3.5rem;
  top: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary);
  border: 4px solid var(--dark);
  box-shadow: 0 0 0 3px var(--primary), var(--glow);
}

.timeline-card {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  border-left: 4px solid var(--primary);
  border: 1px solid var(--card-border);
  border-left: 4px solid var(--primary);
  transition: all 0.3s ease;
}

.timeline-card:hover {
  transform: translateX(10px);
  box-shadow: var(--shadow-lg), var(--glow);
  border-color: var(--primary);
}

.timeline-date {
  display: inline-block;
  background: var(--gradient-1);
  color: white;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.timeline-card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--light);
}

.timeline-card h4 {
  font-size: 1.1rem;
  color: var(--primary);
  margin-bottom: 1rem;
  font-weight: 600;
}

.timeline-list {
  list-style: none;
  padding-left: 0;
}

.timeline-list li {
  color: var(--gray);
  margin-bottom: 0.75rem;
  padding-left: 1.5rem;
  position: relative;
  line-height: 1.6;
}

.timeline-list li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
  font-size: 1.2rem;
}

/* Contact Section */
.contact-section {
  padding: 6rem 0;
  background: var(--darker);
  text-align: center;
}

.contact-description {
  font-size: 1.2rem;
  color: var(--gray);
  max-width: 600px;
  margin: 0 auto 2.5rem;
  line-height: 1.8;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: var(--card-bg);
  color: var(--light);
  text-decoration: none;
  border-radius: 12px;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  border: 2px solid var(--card-border);
}

.contact-btn:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg), var(--glow);
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}

/* Footer */
.footer {
  background: var(--darker);
  color: white;
  padding: 2rem 0;
  text-align: center;
  border-top: 1px solid var(--card-border);
}

.footer p {
  color: rgba(255, 255, 255, 0.8);
}

/* Animations */
@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Float and Bounce are defined above with optimized values for performace */

/* Responsive Design */
@media (max-width: 968px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-content {
    order: 2;
  }

  .hero-image {
    order: 1;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-description {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-buttons {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    gap: 1rem;
    font-size: 0.9rem;
  }

  .hero {
    padding: 5rem 1rem 3rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1.2rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .timeline {
    padding-left: 2rem;
  }

  .timeline-dot {
    left: -2.5rem;
  }

  .contact-links {
    flex-direction: column;
    align-items: stretch;
    max-width: 300px;
    margin: 0 auto;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .image-container {
    width: 300px;
    height: 300px;
  }

  .img-wrapper {
    width: 240px;
    height: 240px;
  }

  .nav-container {
    padding: 1rem;
    flex-direction: column;
    gap: 1rem;
  }

  .hero-title {
    font-size: 1.75rem;
  }

  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}