/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #7c3aed;
  --secondary-color: #5b21b6;
  --accent-color: #a78bfa;
  --text-dark: #1f2937;
  --text-light: #6b7280;
  --bg-light: #faf5ff;
  --bg-white: #ffffff;
  --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --border-color: #e5e7eb;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--bg-white);
  overflow-x: hidden;
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

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

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

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

.fade-in {
  animation: fadeInUp 0.8s ease-out forwards;
}

.fade-in-delay-1 {
  animation: fadeInUp 0.8s ease-out 0.2s forwards;
  opacity: 0;
}

.fade-in-delay-2 {
  animation: fadeInUp 0.8s ease-out 0.4s forwards;
  opacity: 0;
}

.fade-in-delay-3 {
  animation: fadeInUp 0.8s ease-out 0.6s forwards;
  opacity: 0;
}

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

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

/* Header & Navigation */
.header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
  z-index: 1000;
  transition: var(--transition);
}

.header.scrolled {
  box-shadow: var(--shadow-lg);
  background: rgba(255, 255, 255, 0.98);
}

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

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-dark);
}

.logo-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-gradient);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.125rem;
}

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

.nav-link {
  text-decoration: none;
  color: var(--text-light);
  font-weight: 500;
  transition: var(--transition);
  position: relative;
  padding: 0.5rem 0;
}

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

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

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

.btn-nav {
  padding: 0.625rem 1.5rem;
  background: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  transition: var(--transition);
}

.btn-nav:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

/* Hero Section */
.hero {
  background: linear-gradient(
    135deg,
    rgba(250, 245, 255, 0.5) 0%,
    rgba(255, 255, 255, 1) 100%
  );
  padding: 5rem 0 4rem;
  min-height: 90vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 800px;
  height: 800px;
  background: radial-gradient(
    circle,
    rgba(167, 139, 250, 0.15) 0%,
    transparent 70%
  );
  border-radius: 50%;
  animation: float 6s ease-in-out infinite;
}

.hero-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-content {
  z-index: 1;
}

.hero-text h1 {
  font-size: 3.5rem;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  font-weight: 800;
  color: var(--text-dark);
}

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

.hero-description {
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--text-light);
  margin-bottom: 2rem;
  max-width: 500px;
}

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

.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.image-placeholder {
  position: relative;
  width: 400px;
  height: 400px;
  background: var(--bg-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 30px 60px rgba(124, 58, 237, 0.3);
  animation: pulse 3s ease-in-out infinite;
}

.profile-circle {
  width: 350px;
  height: 350px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 6rem;
  font-weight: 700;
  color: var(--primary-color);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.stat-card {
  background: white;
  padding: 1.5rem;
  border-radius: 1rem;
  box-shadow: var(--shadow);
  text-align: center;
  transition: var(--transition);
}

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

.stat-card h3 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.25rem;
}

.stat-card p {
  font-size: 0.875rem;
  color: var(--text-light);
  font-weight: 500;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 1rem 2rem;
  border-radius: 0.75rem;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
  font-size: 1rem;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.4);
}

.btn-primary:hover {
  background: var(--secondary-color);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.5);
}

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

.btn-secondary:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.3);
}

/* Sections */
section {
  padding: 5rem 0;
  opacity: 0;
  transform: translateY(20px);
  transition: var(--transition);
}

section.animate-in {
  opacity: 1;
  transform: translateY(0);
}

section:nth-child(even) {
  background-color: var(--bg-light);
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 3rem;
  text-align: center;
  color: var(--text-dark);
  font-weight: 800;
  position: relative;
  display: inline-block;
  width: 100%;
}

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

/* About Section */
.about-content {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  gap: 1.5rem;
}

.about-text {
  font-size: 1.125rem;
  line-height: 1.9;
  color: var(--text-light);
  background: white;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.about-text:hover {
  transform: translateX(10px);
  box-shadow: var(--shadow-lg);
}

/* Skills Section */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.skill-category {
  background: var(--bg-white);
  padding: 2rem;
  border-radius: 1.25rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 2px solid transparent;
  opacity: 0;
  transform: translateY(20px);
}

.skill-category.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.skill-category:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-color);
}

.skill-category h3 {
  font-size: 1.25rem;
  margin-bottom: 1.25rem;
  color: var(--primary-color);
  font-weight: 700;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
}

.tag {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--bg-light);
  color: var(--text-dark);
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 600;
  border: 2px solid var(--border-color);
  transition: var(--transition);
}

.tag:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  transform: scale(1.05);
}

/* Education Section */
.timeline {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 24px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(
    180deg,
    var(--primary-color) 0%,
    var(--accent-color) 100%
  );
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  padding-left: 80px;
  margin-bottom: 3rem;
  opacity: 0;
  transform: translateX(-30px);
  transition: var(--transition);
}

.timeline-item.animate-in {
  opacity: 1;
  transform: translateX(0);
}

.timeline-marker {
  position: absolute;
  left: 14px;
  top: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary-color);
  border: 4px solid var(--bg-white);
  box-shadow: 0 0 0 4px var(--accent-color);
  z-index: 1;
  animation: pulse 2s ease-in-out infinite;
}

.timeline-content {
  background: white;
  padding: 1.75rem;
  border-radius: 1rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.timeline-content:hover {
  transform: translateX(10px);
  box-shadow: var(--shadow-lg);
}

.timeline-content h3 {
  font-size: 1.375rem;
  margin-bottom: 0.625rem;
  color: var(--text-dark);
  font-weight: 700;
}

.institution {
  color: var(--text-light);
  font-size: 1.0625rem;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.year {
  color: var(--primary-color);
  font-weight: 700;
  font-size: 0.9375rem;
}

/* Projects Section */
.project-card {
  background: var(--bg-white);
  padding: 3rem;
  border-radius: 1.5rem;
  box-shadow: var(--shadow-lg);
  max-width: 1000px;
  margin: 0 auto;
  border: 2px solid transparent;
  transition: var(--transition);
  opacity: 0;
  transform: scale(0.95);
}

.project-card.animate-in {
  opacity: 1;
  transform: scale(1);
}

.project-card:hover {
  border-color: var(--accent-color);
  box-shadow: 0 25px 50px rgba(124, 58, 237, 0.15);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.project-card h3 {
  font-size: 2rem;
  color: var(--primary-color);
  font-weight: 700;
  margin: 0;
}

.github-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background: var(--text-dark);
  color: white;
  text-decoration: none;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  transition: var(--transition);
  white-space: nowrap;
}

.github-link:hover {
  background: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.github-link .icon {
  width: 20px;
  height: 20px;
}

.project-description {
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--text-light);
  margin-bottom: 2rem;
}

.tech-stack,
.responsibilities {
  margin-top: 2rem;
}

.tech-stack h4,
.responsibilities h4 {
  font-size: 1.125rem;
  margin-bottom: 1rem;
  color: var(--text-dark);
  font-weight: 700;
}

.responsibilities ul {
  list-style: none;
  color: var(--text-light);
}

.responsibilities li {
  margin-bottom: 0.875rem;
  line-height: 1.7;
  padding-left: 1.5rem;
  position: relative;
}

.responsibilities li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: 700;
}

/* Project Toggle Button */
.btn-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 1rem;
  margin-top: 2rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 0.75rem;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-toggle:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
}

.icon-chevron {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
}

.project-card.open .icon-chevron {
  transform: rotate(180deg);
}

/* Project Details with Smooth Animation */
.project-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card.open .project-details {
  margin-top: 2rem;
}

/* Contact Section */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 700px;
  margin: 0 auto;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.75rem 2rem;
  background: var(--bg-white);
  border-radius: 1rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 2px solid transparent;
  opacity: 0;
  transform: translateX(-30px);
}

.contact-item.animate-in {
  opacity: 1;
  transform: translateX(0);
}

.contact-item:hover {
  transform: translateX(10px);
  border-color: var(--accent-color);
  box-shadow: var(--shadow-lg);
}

.icon {
  width: 28px;
  height: 28px;
  color: var(--primary-color);
  flex-shrink: 0;
}

.contact-item a,
.contact-item span {
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.0625rem;
  transition: var(--transition);
}

.contact-item a:hover {
  color: var(--primary-color);
}

/* Footer */
.footer {
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  color: var(--bg-light);
  text-align: center;
  padding: 2.5rem 0;
  position: relative;
  overflow: hidden;
}

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

.footer p {
  font-size: 0.9375rem;
  opacity: 0.9;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .hero-image {
    order: -1;
  }

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

  .profile-circle {
    width: 250px;
    height: 250px;
    font-size: 4rem;
  }

  .hero-text h1 {
    font-size: 2.75rem;
  }
}

@media (max-width: 768px) {
  .nav {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .nav-menu {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    order: 3;
    width: 100%;
  }

  .btn-nav {
    order: 2;
  }

  .hero {
    min-height: auto;
    padding: 3rem 0;
  }

  .hero-text h1 {
    font-size: 2.25rem;
  }

  .hero-description {
    font-size: 1rem;
  }

  .image-placeholder {
    width: 250px;
    height: 250px;
  }

  .profile-circle {
    width: 200px;
    height: 200px;
    font-size: 3rem;
  }

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

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

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

  .project-card {
    padding: 2rem;
  }

  .timeline::before {
    left: 10px;
  }

  .timeline-item {
    padding-left: 40px;
  }

  .timeline-marker {
    left: 2px;
  }
}

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

  .hero-text h1 {
    font-size: 1.875rem;
  }

  .btn {
    padding: 0.875rem 1.5rem;
    font-size: 0.9375rem;
  }

  .hero-cta {
    flex-direction: column;
  }

  .hero-cta .btn {
    width: 100%;
    text-align: center;
  }

  .image-placeholder {
    width: 200px;
    height: 200px;
  }

  .profile-circle {
    width: 160px;
    height: 160px;
    font-size: 2.5rem;
  }
}
