/* Global Typography */
body {
  font-family: 'Merriweather', serif;
  color: #2d3748; /* Tailwind's gray-800 */
  background-color: #f7fafc; /* Tailwind's gray-50 */
}

h1, h2, h3, .font-bold {
  font-family: 'Open Sans', sans-serif;
  color: #1a202c; /* Tailwind's gray-900 */
}

/* Link Styles */
a {
  color: #3182ce; /* Tailwind's blue-600 */
  transition: color 0.3s;
}

a:hover {
  color: #2b6cb0; /* Darker shade for hover */
}

a:focus {
  outline: 2px solid #3182ce; /* Accessibility improvement */
}

/* Button Styles */
.button {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  background-color: #3182ce; /* Tailwind's blue-600 */
  color: #fff;
  border-radius: 0.375rem; /* Rounded corners */
  transition: background-color 0.3s;
}

.button:hover {
  background-color: #2b6cb0; /* Darker shade for hover */
}

.button:focus {
  outline: 2px solid #2b6cb0; /* Accessibility improvement */
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 50;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
  background-color: #fefefe;
  margin: 15% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
  border-radius: 8px;
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

/* Wrap text in the <pre> block */
pre {
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Header Styles */
header {
  background-color: #fff;
  padding: 1rem 0;
  height: 80px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 50;
}

/* Navigation Bar Styles */
nav {
  display: flex;
  justify-content: center; /* Center the nav items; use 'flex-end' to align right */
  align-items: center;
  padding: 0 2rem; /* Adjust as needed to create space on left and right */
}

/* Navigation Spacing */
nav ul {
  display: flex;
  list-style: none; /* Remove default list styling */
  margin: 0;
  padding: 0;
}

nav ul li {
  margin-right: 1rem;
}

nav ul li:last-child {
  margin-right: 0;
}

/* Container for Content Alignment */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

#menu-container {
  backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0.8);
}

#menu-container {
  transition: transform 0.4s ease-in-out;
}

span.inline-block {
  margin-top: 0.5rem;
  display: inline-block;
  font-size: 0.875rem;
}

/* ul li:hover {
    background-color: #f0f4f8;
    border-left: 4px solid #3182ce;
    padding-left: 1rem;
    transition: background-color 0.3s ease-in-out, padding-left 0.3s ease-in-out;
}
p {
  color: #2d3748; /* Tailwind's gray-800 */
/* } */ 

.button {
  transition: transform 0.2s;
}

.button:hover {
  transform: translateY(-2px);
}

.course-description {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  display: block;
  max-height: 2.4em; /* Controls the visible height */
}

.course-description.expanded {
  white-space: normal;
  max-height: none;
}

.more-text {
  display: none;
}

.more-text.expanded {
  display: inline;
}

.toggle-course {
  color: #3182ce;
  background: none;
  border: none;
  cursor: pointer;
  font-weight: bold;
  padding-left: 0;
  font-size: 1rem;
  text-align: left;
}

.toggle-course:hover {
  color: #2b6cb0;
}

.hover-disappear:hover {
  color: transparent;
  transition: color 0.3s;
}

.publication-item {
  background: none;
  border: none;
  box-shadow: none; /* Remove shadow */
  transition: none; /* Remove hover shadow */
}

.publication-image {
  width: 350px; /* Adjust the width */
  height: auto; /* Maintain aspect ratio */
  border-radius: 8px; /* Rounded corners */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Light shadow */
  transition: transform 0.3s ease, box-shadow 0.3s ease; /* Smooth transition */
}

.publication-image:hover {
  transform: scale(1.05); /* Slight zoom effect */
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2); /* Enhanced shadow on hover */
}

.btn-oval {
  display: inline-block;
  padding: 0.3rem 0.8rem; /* Smaller padding for a compact look */
  border: 2px solid black; /* Black border */
  color: black; /* Black text */
  background-color: transparent; /* Transparent background */
  text-decoration: none;
  border-radius: 50px; /* Fully rounded corners for oval shape */
  transition: all 0.3s ease; /* Smooth transition */
}

.btn-oval:hover {
  background-color: #3182ce; /* Blue background on hover */
  border-color: #3182ce; /* Blue border on hover */
  color: white; /* White text on hover */
}

/* Default: Desktop Styles */
.publication-image {
  width: 320px; /* Slightly smaller image width */
  height: auto; /* Maintain aspect ratio */
  border-radius: 8px; /* Rounded corners */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Light shadow */
  transition: transform 0.3s ease, box-shadow 0.3s ease; /* Smooth transition */
  margin-bottom: 1rem; /* Add margin between image and buttons */
}

.publication-image:hover {
  transform: scale(1.03); /* Slightly reduce hover zoom */
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2); /* Enhanced shadow on hover */
}

/* Mobile Devices: Disable Hover Effect */
@media (max-width: 640px) {
  .publication-item {
    flex-direction: column; /* Stack the text and image vertically on mobile */
  }

  .publication-image {
    width: 100%; /* Make the image fill the available width */
    max-width: 100%; /* Ensure it doesn't overflow */
    height: auto; /* Maintain aspect ratio */
    margin-bottom: 1rem; /* Space between image and buttons */
    margin-top: 1.5rem; /* Add top margin to shift the image down */
  }

  /* Disable hover effect for mobile */
  .publication-image:hover {
    transform: none; /* Disable zoom */
    box-shadow: none; /* No shadow change */
  }
}

@media (max-width: 640px) {
  .research-section .flex {
    flex-direction: column-reverse; /* This moves the image above the text */
    align-items: center; /* Center the content */
  }

  .research-section .flex img {
    width: 100%; /* Make the image take up the full width of the container */
    max-width: 100%; /* Prevent the image from exceeding the container width */
    height: auto; /* Maintain the aspect ratio */
    margin-bottom: 1.5rem; /* Add space below the image */
    margin-top: 0; /* Remove top margin */
  }
}


