/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  background-color: #f5f5f7;
  color: #1d1d1f;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: #0071e3;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #005bb5;
}

/* Header and Navigation */
.header {
  background-color: #fff;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

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

.logo {
  font-weight: 600;
  font-size: 1.25rem;
  color: #1d1d1f;
}

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

.nav-links li a {
  font-weight: 500;
  font-size: 1rem;
}

/* Sections */
.section {
  max-width: 960px;
  margin: 3rem auto;
  padding: 0 1.5rem;
  background-color: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgb(0 0 0 / 0.1);
  padding: 2rem 3rem;
}

h1, h2, h3 {
  font-weight: 600;
  color: #1d1d1f;
  margin-bottom: 1rem;
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
  border-bottom: 2px solid #e5e5ea;
  padding-bottom: 0.5rem;
  margin-bottom: 2rem;
}

h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

p, li {
  font-weight: 400;
  font-size: 1rem;
  color: #3c3c4399;
  margin-bottom: 1rem;
}

ul {
  list-style: disc inside;
  padding-left: 1rem;
}

/* About Section */
.about-section {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
}

.profile-photo-container {
  flex: 0 0 180px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 10px 30px rgb(0 0 0 / 0.15);
  transition: box-shadow 0.3s ease;
}

.profile-photo-container:hover {
  box-shadow: 0 15px 40px rgb(0 0 0 / 0.25);
}

.profile-photo {
  width: 180px;
  height: 180px;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}

.about-text {
  flex: 1 1 400px;
}

.subtitle {
  font-weight: 500;
  font-size: 1.125rem;
  color: #6e6e73;
  margin-bottom: 1rem;
}

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

/* Projects Section */
.project-item {
  margin-bottom: 2rem;
}

.project-item a {
  font-weight: 600;
  color: #0071e3;
}

.project-item a:hover {
  color: #004bb5;
}

/* Leadership Section */
.leadership-item {
  margin-bottom: 2rem;
}

/* Contact Section */
.contact-section a {
  font-weight: 600;
  color: #0071e3;
}

.contact-section a:hover {
  color: #004bb5;
}

/* Footer */
.footer {
  text-align: center;
  padding: 2rem 1rem;
  color: #6e6e73;
  font-size: 0.875rem;
  background-color: #f5f5f7;
  margin-top: 4rem;
  user-select: none;
}

/* Contact Form */
.contact-form {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 500px;
}

.contact-form label {
  font-weight: 600;
  color: #1d1d1f;
  margin-bottom: 0.25rem;
}

.contact-form input,
.contact-form textarea {
  padding: 0.75rem 1rem;
  border: 1px solid #d2d2d7;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #0071e3;
  box-shadow: 0 0 0 3px rgb(0 113 227 / 0.3);
}

.contact-form button {
  background-color: #0071e3;
  color: white;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.3s ease;
  align-self: flex-start;
}

.contact-form button:hover {
  background-color: #005bb5;
}

/* Responsive */
#menu-toggle {
  display: none;
}

@media (max-width: 480px) {
  /* Small mobile devices */
  .header .nav {
    position: relative;
    flex-direction: column;
    align-items: flex-start;
  }

  #menu-toggle {
    display: block;
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #0071e3;
    margin-bottom: 0.5rem;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
  }

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

  .nav-links li a {
    font-size: 0.9rem;
    padding: 12px 0; /* Increase tap target size for better UX */
  }

  .logo {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
  }

  /* Hide all sections except nav on mobile */
  /* main > section {
    display: none;
  }

  .nav-links.active + main > section {
    display: block;
  } */

  .about-section {
    flex-direction: column;
    text-align: center;
  }

  .profile-photo-container {
    flex: 0 0 140px;
  }

  .profile-photo {
    width: 140px;
    height: 140px;
  }

  .about-text {
    flex: none;
  }

  .section {
    margin: 1.5rem 1rem;
    padding: 1rem 1.5rem;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  p, li {
    font-size: 0.9rem;
  }
}

@media (max-width: 768px) {
  .about-section {
    flex-direction: column;
    text-align: center;
  }

  .about-text {
    flex: none;
  }

  .nav-links {
    gap: 1rem;
  }

  .section {
    margin: 2rem 1rem;
    padding: 1.5rem 2rem;
  }
}

@media (max-width: 1024px) {
  /* Laptops and tablets */
  .nav {
    max-width: 720px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
  }

  .section {
    max-width: 720px;
    margin: 2rem auto;
    padding: 1.5rem 2rem;
  }

  h1 {
    font-size: 2.25rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  .nav-links li a {
    font-size: 0.95rem;
  }
}

/* Animation styles */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

.pop-in {
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.pop-in.visible {
  opacity: 1;
  transform: scale(1);
}

.slide-in-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

.slide-in-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

.button-animate {
  transition: transform 0.2s ease;
}

.button-animate:active {
  transform: scale(0.95);
}

.nav-links li a {
  transition: color 0.3s ease, transform 0.3s ease;
}

.nav-links li a:hover {
  transform: scale(1.1);
}
