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

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: #1a1a1a;
  background-color: #ffffff;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #e5e7eb;
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.logo {
  font-size: 1.125rem;
  font-weight: bold;
  color: #1a1a1a;
  text-decoration: none;
}

.desktop-nav {
  display: none;
  gap: 1.5rem;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: #6b7280;
  text-decoration: none;
  transition: color 0.2s;
}

.nav-link:hover {
  color: #2563eb;
}

.desktop-actions {
  display: none;
  align-items: center;
  gap: 0.5rem;
}

.mobile-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: none;
  border: none;
  cursor: pointer;
  color: #6b7280;
}

.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.mobile-menu.active {
  display: block;
}

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

.mobile-nav-link {
  font-size: 1rem;
  font-weight: 500;
  color: #6b7280;
  text-decoration: none;
  padding: 0.5rem 0;
  transition: color 0.2s;
}

.mobile-nav-link:hover {
  color: #2563eb;
}

.mobile-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background-color: #2563eb;
  color: white;
}

.btn-primary:hover {
  background-color: #1d4ed8;
}

.btn-outline {
  background-color: transparent;
  color: #2563eb;
  border: 1px solid #2563eb;
}

.btn-outline:hover {
  background-color: #2563eb;
  color: white;
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
}

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

.btn-full {
  width: 100%;
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  color: #6b7280;
  text-decoration: none;
  border-radius: 0.375rem;
  transition: all 0.2s;
}

.icon-btn:hover {
  background-color: #f3f4f6;
  color: #1a1a1a;
}

/* Sections */
.section {
  padding: 2rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 2rem;
}

.section-title {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.section-description {
  font-size: 0.875rem;
  color: #6b7280;
  max-width: 900px;
  margin: 0 auto;
}

/* Background Gradients */
.bg-gradient-blue {
  background: linear-gradient(135deg, #eff6ff 0%, #eef2ff 100%);
}

.bg-gradient-slate {
  background: linear-gradient(135deg, #f1f5f9 0%, #f3f4f6 100%);
}

.bg-gradient-blue-slate {
  background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
}

/* Hero Section */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 2rem 0;
}

.hero-grid {
  display: grid;
  gap: 1.5rem;
  align-items: center;
  width: 100%;
  margin-bottom: 3rem;
}

.hero-content {
  text-align: center;
}

.hero-title {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.hero-subtitle {
  font-size: 1.125rem;
  font-weight: 500;
  color: #2563eb;
  margin-bottom: 1rem;
}

.hero-description {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 1.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 767px) {
  .hero-buttons {
    margin-bottom: 0;
  }
}

.hero-contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #6b7280;
}

.hero-image {
  display: flex;
  justify-content: center;
}

.profile-img {
  width: 12rem;
  height: 12rem;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(37, 99, 235, 0.2);
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.contact-item i {
  width: 1rem;
  height: 1rem;
}

/* Hero Skills Section */
.hero-skills {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #e5e7eb;
}

.skills-title {
  font-size: 1.25rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 2rem;
  color: #1a1a1a;
}

.skills-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

.skill-category {
  text-align: center;
}

.skill-category-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: #374151;
}

.skills-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.skill-tag {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  background-color: #f3f4f6;
  color: #374151;
  border-radius: 0.25rem;
  transition: all 0.2s;
}

.skill-tag:hover {
  background-color: #2563eb;
  color: white;
}

/* Cards */
.cards-grid {
  display: grid;
  gap: 1rem;
}

.card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  overflow: hidden;
}

.card-header {
  padding: 1rem;
  border-bottom: 1px solid #e5e7eb;
}

/* Mobile-first layout */
.card-title-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
  order: 1;
}

.card-subtitle-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-start;
  order: 3;
}

.card-subtitle {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0;
  display: flex;
  align-items: center;
  order: 2;
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  background-color: #f3f4f6;
  color: #374151;
  border-radius: 0.25rem;
  align-self: flex-start;
  order: 3;
  margin-bottom: 0.5rem;
}

.card-location {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: #9ca3af;
  order: 4;
}

.card-location i {
  width: 0.75rem;
  height: 0.75rem;
}

.card-content {
  padding: 1rem;
}

.card-content p {
  margin-bottom: 0.75rem;
}

.card-content ul {
  margin-left: 1rem;
  color: #6b7280;
}

.card-content li {
  margin-bottom: 0.25rem;
}

.achievements h4 {
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

/* Institution Icons */
.institution-icon {
  display: inline-block;
  width: 1.9rem;
  height: 1.9rem;
  margin-right: 0.5rem;
  vertical-align: middle;
  border-radius: 0.25rem;
  object-fit: contain;
  background-color: #f9fafb;
  padding: 0.125rem;
}

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

.project-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.project-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1);
}

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

.project-header {
  padding: 1rem;
  border-bottom: 1px solid #e5e7eb;
}

.project-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.project-description {
  font-size: 0.875rem;
  color: #6b7280;
}

.project-content {
  padding: 1rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
}

.project-tag {
  padding: 0.125rem 0.375rem;
  font-size: 0.75rem;
  background-color: #f3f4f6;
  color: #374151;
  border-radius: 0.25rem;
}

.project-footer {
  padding: 1rem;
  border-top: 1px solid #e5e7eb;
  display: flex;
  gap: 0.5rem;
}

/* Footer */
.footer {
  border-top: 1px solid #e5e7eb;
  padding: 1.5rem 0;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.footer-text {
  font-size: 0.75rem;
  color: #6b7280;
  text-align: center;
}

.footer-links {
  display: flex;
  gap: 1rem;
}

.footer-link {
  color: #6b7280;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-link:hover {
  color: #1a1a1a;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: white;
  border-radius: 0.5rem;
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid #e5e7eb;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
}

.modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background: none;
  border: none;
  cursor: pointer;
  color: #6b7280;
  border-radius: 0.25rem;
}

.modal-close:hover {
  background-color: #f3f4f6;
}

.modal-body {
  padding: 1rem;
}

/* Scroll margin for sections */
section[id] {
  scroll-margin-top: 4rem;
}

/* Responsive Design */
@media (min-width: 640px) {
  .container {
    padding: 0 1.5rem;
  }

  .hero-buttons {
    flex-direction: row;
    justify-content: center;
  }

  .hero-contact {
    flex-direction: row;
    gap: 1rem;
  }

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

  .skill-category {
    text-align: left;
  }

  .skills-tags {
    justify-content: flex-start;
  }
}

/* Mobile-specific hero layout */
@media (max-width: 767px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .hero-content {
    order: 1;
  }

  .hero-image {
    order: 2;
  }

  .hero-buttons {
    order: 3;
    margin-top: 1.5rem;
    align-items: center;
  }

  .hero-buttons .btn-lg {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    min-width: auto;
    width: auto;
    max-width: 200px;
  }

  .hero-contact {
    order: 2;
    margin-bottom: 0;
  }

  .hero-description {
    margin-bottom: 1.5rem;
  }
}

@media (min-width: 768px) {
  .desktop-nav {
    display: flex;
  }

  .desktop-actions {
    display: flex;
  }

  .mobile-menu-btn {
    display: none;
  }

  .section {
    padding: 3rem 0;
  }

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

  .section-description {
    font-size: 1.125rem;
  }

  .hero-section {
    min-height: calc(100vh - 4rem); /* Account for header height */
  }

  .hero-grid {
    grid-template-columns: 1fr 300px;
    gap: 3rem;
  }

  .hero-content {
    text-align: left;
  }

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

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

  .hero-description {
    font-size: 1.125rem;
    margin-left: 0;
    margin-right: 0;
  }

  .hero-buttons {
    justify-content: flex-start;
  }

  .hero-contact {
    justify-content: flex-start;
  }

  .skills-title {
    font-size: 1.5rem;
    text-align: left;
  }

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

  /* Desktop card layout */
  .card-title-row {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 0.5rem;
  }

  .card-title {
    order: unset;
  }

  .badge {
    align-self: flex-end;
    order: unset;
    margin-bottom: 0;
  }

  .card-subtitle-row {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    order: unset;
  }

  .card-subtitle {
    order: unset;
  }

  .card-location {
    order: unset;
  }

  .footer-content {
    flex-direction: row;
    justify-content: space-between;
  }
}

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

  .section {
    padding: 4rem 0;
  }

  .hero-grid {
    grid-template-columns: 1fr 400px;
  }

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

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