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

:root {
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --indigo-600: #4f46e5;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-900: #111827;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--gray-900);
  background: linear-gradient(135deg, #f8fafc 0%, #dbeafe 50%, #e0e7ff 100%);
  min-height: 100vh;
}

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

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: transparent;
  transition: all 0.3s ease;
}

.nav.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

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

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(to right, var(--blue-600), var(--indigo-600));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  cursor: pointer;
}

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

.nav-menu a {
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-weight: 500;
  color: var(--gray-700);
  transition: all 0.2s;
}

.nav-menu a:hover {
  background: rgba(37, 99, 235, 0.1);
  color: var(--blue-600);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 3px;
  background: var(--gray-700);
  border-radius: 2px;
  transition: all 0.3s;
}

/* Hero Section */
.hero {
  max-width: 1280px;
  margin: 0 auto;
  padding: 140px 1rem 80px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  justify-items: center;
}

.hero-content {
  animation: fadeIn 0.8s ease-out;
  justify-self: start;
}

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

.badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: rgba(37, 99, 235, 0.1);
  color: var(--blue-700);
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 0.5rem;
  line-height: 1.1;
}

.hero h1 .gradient-text {
  background: linear-gradient(to right, var(--blue-600), var(--indigo-600));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero h2 {
  font-size: 2rem;
  color: var(--gray-700);
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.125rem;
  color: var(--gray-600);
  margin-bottom: 2rem;
  line-height: 1.7;
}

.btn-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  font-size: 1rem;
}

.btn-primary {
  background: linear-gradient(to right, var(--blue-600), var(--indigo-600));
  color: white;
  box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
}

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

.btn-secondary:hover {
  background: var(--blue-600);
  color: white;
}

.hero-card {
  position: relative;
  display: flex;
  justify-content: center;
  width: 100%;
}

.contact-card {
  position: relative;
  background: white;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--gray-100);
  max-width: 400px;
  width: 100%;
}

.contact-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(37, 99, 235, 0.3), rgba(79, 70, 229, 0.3));
  border-radius: 1rem;
  filter: blur(40px);
  opacity: 0.3;
  z-index: -1;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.5; }
}

.profile-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 0 auto 1.5rem;
  overflow: hidden;
  border: 4px solid rgba(37, 99, 235, 0.2);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.contact-item:last-child {
  margin-bottom: 0;
}

.icon {
  color: var(--blue-600);
  flex-shrink: 0;
}

/* Section Styles */
.section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 80px 1rem;
}

.section-alt {
  background: rgba(255, 255, 255, 0.5);
}

.section h2 {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 3rem;
  color: var(--gray-900);
}

.about-text {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--gray-700);
}

/* Skills Grid */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  justify-items: center;
}

.skill-card {
  background: white;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--gray-100);
  transition: all 0.3s;
  width: 100%;
  max-width: 300px;
}

.skill-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.skill-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--blue-600);
}

.skill-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--gray-900);
}

.skill-card p {
  color: var(--gray-600);
}

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2rem;
}

.project-card {
  background: white;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--gray-100);
  transition: all 0.3s;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.project-image {
  height: 200px;
  background: linear-gradient(135deg, #dbeafe 0%, #e0e7ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-content {
  padding: 1.5rem;
}

.project-content h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--gray-900);
}

.project-content p {
  color: var(--gray-600);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tag {
  padding: 0.25rem 0.75rem;
  background: rgba(37, 99, 235, 0.1);
  color: var(--blue-700);
  border-radius: 1rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.project-links {
  display: flex;
  gap: 0.75rem;
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* Experience Timeline */
.timeline {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.timeline-item {
  background: white;
  padding: 1.5rem;
  border-radius: 1rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--gray-100);
  transition: all 0.3s;
}

.timeline-item:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.timeline-header h3 {
  font-size: 1.25rem;
  color: var(--gray-900);
}

.timeline-year {
  color: var(--blue-600);
  font-weight: 600;
}

.timeline-institution {
  color: var(--gray-700);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.timeline-description {
  color: var(--gray-600);
}

/* Contact Form */
.contact-form {
  max-width: 700px;
  margin: 0 auto;
  background: white;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--gray-100);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--blue-600);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-message {
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: 0.5rem;
  text-align: center;
  font-weight: 500;
}

.form-message.success {
  background: #d1fae5;
  color: #065f46;
}

.form-message.error {
  background: #fee2e2;
  color: #991b1b;
}

/* Footer */
footer {
  background: var(--gray-900);
  color: white;
  padding: 3rem 1rem;
  text-align: center;
}

.footer-content {
  max-width: 1280px;
  margin: 0 auto;
}

.footer-content p {
  color: #9ca3af;
  margin-bottom: 1.5rem;
}

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

.social-links a {
  color: #9ca3af;
  transition: color 0.2s;
}

.social-links a:hover {
  color: white;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 80px;
    right: 1rem;
    background: white;
    flex-direction: column;
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    display: none;
    min-width: 200px;
  }

  .nav-menu.active {
    display: flex;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-top: 120px;
  }

  .hero-content {
    order: 1;
    justify-self: center;
    text-align: center;
  }

  .hero-card {
    order: 2;
  }

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

  .hero h2 {
    font-size: 1.5rem;
  }

  .btn-group {
    justify-content: center;
  }

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

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