:root {
  --primary-color: #002c4a; /*#003366;*/
  --secondary-color: #008a8a;
  --bg-color: #fbfafa;
  --aside-bg-color: #c0c6d5;
  --font-primary: "Roboto", sans-serif;
  --font-secondary: "Lato", sans-serif;
  --font-tertiary: Bahnschrift, Arial, sans-serif;
}

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

body {
  background-color: var(--bg-color);
  font-family: var(--font-secondary);
  line-height: 1.4;
}

a {
  color: #005a9c;
  text-decoration: none;
  transition: color 0.3s ease;
}

/* Header Styles */
#header {
  background-color: #002c4a;
  padding: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
}

.profile-header {
  background-color: var(--primary-color);
  color: white;
  padding: 2rem 0;
}

#profile-photo {
  width: 220px;
  border-radius: 50%;
  border: 5px solid white;
  object-fit: cover;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);
}

/* Optional: Add a subtle pulsing effect */
@keyframes pulse {
  from {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3),
      0 0 0 8px rgba(255, 255, 255, 0.2), 0 0 30px rgba(70, 130, 240, 0.4);
  }
  to {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4),
      0 0 0 12px rgba(255, 255, 255, 0.3), 0 0 40px rgba(70, 130, 240, 0.6);
  }
  
}

#profile-photo:hover {
  border-color: #f0f0f0;
  animation: pulse 1.5s forwards; 
  cursor: pointer;
  transform: scale(1.05);
  transition: transform 0.8s ease;
}

#info {
  flex: 1;
  min-width: 280px;
  color: white;
}

.name {
  padding: 0 0 1rem 0;
}

.full-name {
  margin-bottom: 0.25rem;
  font-weight: 700;
  color: white;
  font-size: 2.5rem;
}

.degree {
  font-size: 1.5rem;
  font-weight: 300;
  margin-bottom: 0.5rem;
  color: rgba(255, 255, 255, 0.85);
}

.affiliation {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  color: rgba(255, 255, 255, 0.85);
}

#vertical-line-section {
  border-left: 4px solid white;
  padding-left: 1.5rem;
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

#vertical-line-section > div {
  flex: 1;
  min-width: 280px;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}
.content-area {
  padding-bottom: 3rem;
}
.header-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2rem;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}
.header-photo {
  flex-shrink: 0;
}

.contact-details {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  padding-top: 1.5rem;
  margin-top: 1.5rem;
}

.header-info {
  flex: 1;
  min-width: 300px; /* Ensure info doesn't get too squashed */
}

.info-item {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.info-item .icon {
  margin-right: 0.5rem;
  color: rgba(255, 255, 255, 0.8);
  width: 20px; /* Fixed width for alignment */
  text-align: center;
}

.contact-column {
  flex: 1;
  min-width: 250px; /* Prevent columns from becoming too narrow */
}

.info-item-text a {
  color: white;
  font-weight: 400;
  word-break: break-word;
}
.info-item-text {
  text-align: left;
}
.info-item-text a:hover,
.info-item-text a:focus {
  color: #008a8a;
}


/* Section containers */
.section-with-sidebar {
  position: relative;
  display: flex;
  min-height: 300px; /* Set minimum height or use another value */
}
.sidebar {
  width: 250px;
  background-color: var(--secondary-color);
  border-top-right-radius: 2%;
  border-bottom-right-radius: 2%;
  z-index: 0;
  flex-shrink: 0;
}

/* Timeline date styles */
.timeline-date {
  position: absolute;
  top: 9px; /* Align with the circle */
  left: -110px; /* Position to the left of the circle */
  max-width: 100px;
  text-align: left;
  word-break: break-word;
  color: white;
}

#navbar-sentinel {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  visibility: hidden;
}

.top-tab-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #f8fafc;
  position: sticky;
  top: 0;
  z-index: 99;
  padding: 0 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: background-color 0.3s;
}

.top-tab-bar::before {
  content: '';
  position: absolute;
  /* top: -100%; */
  top: 0;
  left: 0;
  width: 100%;
  /* height: 100%; */
  background-color: var(--primary-color);
  transition: top 0.5s ease-in-out;
  transition: height 0.5s ease-in-out;
  z-index: -1;
}
.white-nav-link {
  color: white;
  transition: color 0.3s;
}
.top-tab-bar.sticky::before {
  height: 100%;
}
.top-tab-bar.notSticky::before {
  height: 0;
}
.logo-container {
  display: flex;
  visibility: hidden;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  flex-grow: 1;
}
.logo-container.active {
  visibility: visible;
}

.logo-container img {
  border-radius: 50%;
  width: 40px;
}

.logo-text {
  font-weight: 600;
  color: white;
}

.nav-links {
  display: flex;
  align-items: center;
  flex-grow: 2;
}

.nav-link {
  padding: 1rem 8px;
  color: black;
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  transition: color 0.3s;
  white-space: nowrap;
}

.nav-link:hover {
  color: #334155;
}

.mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px 0;
  background-color: #64748b;
  transition: all 0.3s;
}

/* Institution card */

.education-card {
  background-color: white;
  border-radius: 6px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 600px;
  padding: 18px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}
.education-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.education-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, #264a26, #386e38);
}
.card-header {
  display: flex;
  margin-bottom: 14px;
  position: relative;
}
.institution-logo {
  height: 85px;
  width: auto;
  border-radius: 12px;
  margin-right: 20px;
  overflow: hidden;
}
.institution-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-title {
  flex-grow: 1;
}
.institution-name {
  font-size: 18px;
  font-weight: 700;
  color: #292929;
  margin-bottom: 8px;
  position: relative;
  display: inline-block;
}
.institution-name::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 40px;
  height: 3px;
  background: linear-gradient(90deg, #c69324, #f5b82c);
  border-radius: 3px;
}

.card-degree {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 6px;
}

.department {
  font-size: 14px;
  color: #555;
  margin-bottom: 6px;
  line-height: 1.4;
}

.card-body {
  padding-top: 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.thesis-title {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.referees {
  font-size: 13px;
  color: #444;
  line-height: 1.6;
}

.referee-name {
  font-weight: 600;
  color: #292929;
}
/*  */
.section-content {
  flex: 1;
  border-bottom: 2px solid lightgray;
}

.content-section {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  border-radius: 8px;
  background-color: white;
}

.timeline {
  position: relative;
  /* max-width: 1200px; */
  margin: 0 auto;
}
.timeline::after {
  content: "";
  position: absolute;
  width: 2px;
  background-color: #002c49;
  top: 15px;
  bottom: 0;
  left: 2px;
  margin-left: -3px;
}
.timeline-container {
  padding: 10px 30px;
  position: relative;
  margin-bottom: 1.0rem;
}
.last-item-timeline {
  padding: 0px 40px;
  position: relative;
}
.timeline-container::after {
  content: "";
  position: absolute;
  width: 15px;
  height: 15px;
  /* right: -17px; */
  top: 15px;
  left: -8px;
  border-radius: 50%;
  background-color: #002c49;
  z-index: 1;
}
.timeline-content {
  position: relative;
  /* font-size: 1.5rem; */
  max-width: 1000px;
  text-align: justify;
}

.section {
  padding: 2rem;
  background-color: #f8f9fa;
}

.section-header {
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
  margin-top: 4rem;
  gap: 1rem;
  counter-reset: section;
  font-size: 1.5rem;
  padding-left: 20px;
  padding-bottom: 0.25rem;
  border-bottom: 2px solid #002c4a;
}

.section-header-icon {
  background-color: #002c4a;
  border-radius: 50%;
  padding: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.section-header-icon img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}
.timeline-counter {
  left: -50px;
}
.timeline-counter::before {
  counter-increment: section;
  content: counter(section) " - ";
}
.tab-bar {
  display: flex;
  background: white;
  border-radius: 8px 8px 0 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  position: relative;
  flex-wrap: wrap;
  width: fit-content;
  justify-content: center;
}
.tab-btn {
  padding: 1rem 1.5rem;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  color: #64748b;
  position: relative;
  flex-grow: 0;
  text-align: center;
}

.tab-btn:hover {
  color: var(--secondary-color);
  background-color: rgba(59, 130, 246, 0.05);
}

.tab-btn.active {
  color: var(--secondary-color);
  font-weight: 700;
  border-bottom: 2px solid var(--secondary-color);
}

.tab-content {
  display: none;
  animation: fadeIn 0.5s ease forwards;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* Footer Styles */
footer {
  background-color: #002c4a;
  color: white;
  text-align: center;
  padding: 1rem;
  margin-top: 2rem;
}
.highlighted-header {
  background-color: #008a8a;
  color: white;
  display: inline-block;
  margin-left: 40px;
  padding: 0 3px;
}
.highlighted-text {
  background-color: #008a8a;
  color: white;
  padding: 0 3px;
  display: inline-block;
}
.timeline-subtext {
  color: rgb(115, 124, 130);
  margin-top: 0.5rem;
  font-weight: 300;
  line-height: 1.4;
  word-break: break-word;
  text-align: left;
}

.custom-ul {
  display: flex;
  flex-wrap: wrap;
  /* justify-content: space-around; */
  flex: 1 1 0;
  margin-left: 70px;
}
.ul-column {
  margin-left: 1rem;
}
.ul-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  /* flex-basis: 0; */
  font-size: 1.5rem;
}
.ul-item:before {
  content: "";
  width: 18px;
  height: 18px;
  background-color: #002c4a;
  border-radius: 50%;
  flex-shrink: 0;
  margin: auto 0;
}
.bullet {
  width: 25px;
  height: 25px;
  background-color: #002c4a;
  border-radius: 50%;
  flex-shrink: 0;
}
p {
  font-size: 1.5rem;
}
.logo-grid {
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(150px, 1fr)
  ); /* Responsive grid */
  gap: 2rem;
  margin-top: 1.5rem;
  align-items: baseline; /* Align items vertically */
  /* width: 1100px; */
}

.logo-item {
  text-align: center;
}

.logo-item img {
  max-height: 80px; /* Control logo height */
  width: auto; /* Maintain aspect ratio */
  margin: 0 auto 0.5rem auto; /* Center image */
  filter: grayscale(30%); /* Subtle grayscale effect */
  transition: filter 0.3s ease;
}
.logo-item {
  transition: transform 0.4s ease;
}
.logo-item:hover {
  transform: scale(1.1);
}
.logo-item:hover img {
  filter: grayscale(0%);
  /* Slight zoom effect on hover */
}

.logo-item p {
  font-size: 0.9rem;
  margin-bottom: 0;
}

.interest-list {
  padding-left: 1rem;
  columns: 2; /* Create two columns for lists */
  column-gap: 2rem;
}

.interest-list li {
  margin-bottom: 0.5rem;
  padding-left: 1rem;
  position: relative;
  break-inside: avoid-column; /* Prevent items breaking across columns */
  list-style: none;
}

.interest-list li::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 6px; /* Adjust vertical alignment */
  width: 16px;
  height: 16px;
  background-color: var(--primary-color);
  border-radius: 50%;
}
table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
}

.table-container {
  overflow-x: auto; /* Enable horizontal scrolling on small screens */
  overflow-y: auto; /* Prevent vertical scrolling */
  max-height: 500px; /* Set a maximum height for the table */
}

th {
    text-align: left;
}
thead tr th:first-child {
  border-top-left-radius: 9px;
}
tbody tr:last-child th:first-child {
  border-bottom-left-radius: 9px;
}

thead tr th:last-child {
  border-top-right-radius: 9px;
}
tbody tr:last-child th:last-child {
  border-bottom-right-radius: 9px;
}

thead {
  background-color: var(--primary-color);
  color: white;
  font-size: 1.5rem;
  position: sticky;
  top: 0;
}
td, th {
  padding: 9px;
  align-content: flex-start;
}
tbody tr:nth-child(odd):hover {
  background-color: #d0e6f9; /* Light blue on hover */
  transition: background-color 0.3s ease;
}
tbody tr:nth-child(even):hover {
  background-color: #d0e6f9; /* Light blue on hover */
  transition: background-color 0.3s ease;
}

/* tbody tr {
    font-size: 1.5rem;
} */
tbody tr:nth-child(odd) {
  background-color: #f7f7f7;
}
tbody tr:nth-child(even) {
  background-color: #e6eaf2;
}

.reference-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.card {
  background-color: var(--primary-color);
  color: white;
  border: 1px solid #dee2e6;
  border-radius: 9px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px black;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card h4 {
  margin-bottom: 0.5rem;
}
.card p {
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.card-contact {
  margin-top: 1rem;
  padding-top: 0.5rem;
  border-top: 1px solid #dee2e6;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

.card-contact .info-item {
  margin-bottom: 0; /* Reset margin */
  font-size: 0.9rem;
}

.card-contact a {
  color: white; /* Standard text color for links inside */
}
.card-contact a:hover,
.card-contact a:focus {
  color: #008a8a;
}

.flex-center {
  display: flex;
  align-items: center;
  gap: 1rem;
}
/* Media Queries for Responsiveness */

@media (max-width: 992px) {
  h2 {
    font-size: 1.8rem;
  }
  h3 {
    font-size: 1.4rem;
  }

  .container {
    width: 95%;
  }

  .interest-list,
  .committee-list {
    columns: 1; /* Stack list items */
  }

  .logo-grid {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: var(1.5rem);
  }
  .content-section {
    width: 95%;
    margin: 0 auto;
    /* box-shadow: 0 2px 5px rgba(0,0,0,0.05); */
  }
  td, th {
    padding: 8px;
  }
  p {
    font-size: inherit;
  }
}

@media (max-width: 768px) {
  #header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .header-content {
    flex-direction: column; /* Stack header items */
    text-align: center;
  }
  #profile-photo {
    width: 180px;
    margin-bottom: 1rem;
  }

  #vertical-line-section {
    border-left: none;
    border-top: 4px solid white;
    padding: 1rem 0 0 0;
    margin: 1rem 0 0 0;
  }

  #full-name {
    font-size: 2rem;
  }

  #degree {
    font-size: 1.2rem;
  }

  .info-item {
    justify-content: flex-start;
  }

  #name {
    padding: 0;
  }
  .sidebar {
    width: 35px;
  }
  .timeline-content {
    text-align: left;
  }
  .section-header {
    font-size: 1rem;
    padding-left: 10px;
  }
  /* header{
        margin-left: 20px;
    } */
    .mobile-toggle {
      display: flex;
      flex-direction: column;
      z-index: 101;
    }
    
    .nav-links {
      position: fixed;
      top: 0;
      right: -100%;
      width: 50%;
      height: 100vh;
      flex-direction: column;
      background-color: var(--aside-bg-color);
      box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
      transition: right var(--transition-speed);
      padding-top: 4rem;
      z-index: 100;
    }
    
    .nav-link {
      width: 100%;
      text-align: center;
      padding: 1rem;
    }
    
    .nav-links.active {
      right: 0;
    }
    
    .mobile-toggle.active .bar:nth-child(1) {
      transform: rotate(45deg) translate(10px, 13px);
    }
    
    .mobile-toggle.active .bar:nth-child(2) {
      opacity: 0;
    }
    
    .mobile-toggle.active .bar:nth-child(3) {
      transform: rotate(-45deg) translate(5px, -8px);
    }
    .white-nav-link {
      color: black;
    }
  thead {
    font-size: inherit;
  }
  td, th {
    padding: 8px;
  }
  tbody tr {
    font-size: inherit;
  }
  .ul-item:before {
    width: 20px;
    height: 20px;
  }
  .custom-ul {
    margin-left: 20px;
  }
  .content-section {
    width: 100%;
    margin: 0 auto;
    /* box-shadow: 0 2px 5px rgba(0,0,0,0.05); */
    padding: 2px 1rem 2rem;
  }
  .timeline-date { 
    position: static;
    color: #747474;
    max-width: 100%;
    text-align: left;
  }
  .tab-content-container {
    border-radius: 0 0 8px 8px;
  }

  .tab-indicator {
    display: none;
  }

  .tab-btn.active {
    background-color: rgba(59, 130, 246, 0.1);
  }
}

@media (max-width: 576px) {
  #profile-photo {
    width: 150px;
  }
  .sidebar {
    width: 20px;
  }
  .full-name {
    font-size: 1.8rem;
  }
  .info-item {
    justify-content: center; /* Center icon and text */
  }
  .info-item-text {
    font-size: 0.9rem;
  }
  .timeline-content {
    font-size: 1.2rem;
  }
  .timeline-container {
    padding: 10px 20px 10px 20px;
  }
  .contact-details {
    gap: 0;
  }

  .section {
    margin-left: 10px;
  }
  .ul-item {
    font-size: 1rem;
  }
  td, th {
    padding: 7px;
  }
  tbody tr {
    font-size: 1rem;
  }
  .ul-item:before {
    width: 15px;
    height: 15px;
  }
  .section-header-icon img {
    width: 30px;
    height: 30px;
  }
  .nav-links {
    width: 60%;
  }
}
