/* General Layout */
html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f8f8f8;
  color: #333;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  box-sizing: border-box;
}

* {
  box-sizing: inherit;
}

/* Ribbon Header */
.ribbon-header {
  background: linear-gradient(135deg, #003049, #264653);
  color: #fff;
  padding: 24px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.ribbon-content {
  display: flex;
  align-items: center;
  font-size: 1.75rem;
  font-weight: 700;
  gap: 16px;
  letter-spacing: 0.5px;
}

.ribbon-content .divider {
  opacity: 0.4;
  font-size: 1.5rem;
}

/* Main Content */
.main-content {
  flex: 1;
  max-width: 1000px;
  margin: 40px auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* Top Section */
.top-section {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  margin-bottom: 40px;
  align-items: center;
}

.photo-slideshow {
  flex: 0 0 400px;
  max-width: 400px;
  width: 100%;
  position: relative;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
}

.slides-wrapper {
  width: 100%;
  height: 100%;
  position: relative;
}

.slide {
  width: 100%;
  height: 100%;
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  transition: opacity 2s ease-in-out;
}

.slide.active {
  display: block;
  z-index: 1;
  opacity: 1;
}

.bio {
  flex: 1 1 0;
  min-width: 0;
}

@media (max-width: 840px) {
  .top-section {
    flex-direction: column;
    align-items: stretch;
  }

  .photo-slideshow {
    flex: none;
    max-width: 100%;
    width: 100%;
  }

  .bio {
    width: 100%;
  }
}

/* Projects Section */
.projects-section {
  margin-top: 60px;
}

.cards {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
}

.card {
  flex: 1;
  min-width: 250px;
  background: white;
  margin-top: 10px;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.card h3 {
  margin-bottom: 10px;
  font-weight: 600;
  font-size: 1.2rem;
}

.education {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
}

.education .card {
  flex: 1;
  min-width: 250px;
  background: none;
  margin-top: 10px;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  transition: none;
}

.education .card:hover {
  transform: none;
  box-shadow: none;
}

a {
  color: #0077b6;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #023e8a;
  text-decoration: underline;
}

/* Bottom Section */
.bottom-section {
  margin: 2rem 0;
  padding: 0;
}

.bottom-section h2 {
  margin-bottom: 1rem;
}

.bottom-section p,
.bottom-section ul {
  margin: 0 0 1rem 0; /* consistent bottom margin for paragraphs and lists */
  padding-left: 0;
  list-style: none;
}

.bottom-section ul li {
  margin-bottom: 1rem; /* same spacing as paragraphs */
  line-height: 1.5;
}


/* Footer */
footer {
  background: #003049;
  color: #ffffff;
  text-align: center;
  padding: 16px 0;
  font-size: 0.95rem;
  border-top: 4px solid #66ccff;
}

footer a {
  color: #66ccff;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .ribbon-header {
    padding: 12px 16px;
  }

  .ribbon-content {
    flex-wrap: nowrap;
    font-size: 1rem;
    gap: 6px;
  }

  .ribbon-content > * {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .name, .role {
    flex: 1 1 auto;
    text-align: left;
  }

  .divider {
    flex-shrink: 0;
    opacity: 0.4;
    font-size: 1rem;
  }
}
