/* Base Styles */
body {
  margin: 0;
  font-family: 'Roboto', sans-serif;
  background-color: #eeeeee; /* Light Gray */
  line-height: 1.6;
  font-weight: 400;
  color: #000000; /* Black for text */
}

/* ----------------------------------------------
   Navigation Bar Styles
---------------------------------------------- */
nav {
  background-color: #5C2223; /* Dark Red for nav */
  padding: 1rem 65%;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

nav ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
}

nav ul li {
  margin-right: 3rem;
}

nav ul li:last-child {
  margin-right: 0;
}

nav a {
  color: #FFFFFF; /* White for links */
  text-decoration: none;
  font-size: 1.1rem;
  transition: background-color 0.3s ease;
  padding: 0.5rem 1rem;
}

nav a:hover {
  background-color: #8E2425; /* Brighter Red hover effect */
}

nav a.active {
  background-color: #8E2425; /* Brighter Red for active links */
}

/* Hamburger Menu */
.hamburger {
  display: none;
  cursor: pointer;
  padding: 13px;
  position: absolute;
  top: 20px;
  right: 20px;
  background-color: #5C2223; /* Dark Red */
  border-radius: 8px;
  z-index: 1001;
}

.bar {
  width: 25px;
  height: 3px;
  background-color: #FFFFFF;
  margin: 5px 0;
  transition: 0.4s;
}

/* ----------------------------------------------
   Profile and Social Links (Left Column)
---------------------------------------------- */
.left-column {
  max-width: 250px;
  position: sticky;
  top: 100px;
  align-self: flex-start;
  text-align: center; /* 添加居中对齐 */
}

.profile-pic {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1rem;
  border: 3px solid #5C2223; /* Matches nav background */
  display: block; /* 确保图片为块级元素 */
  margin-left: auto; /* 左右边距自动使图片居中 */
  margin-right: auto;
}

.social-links {
  display: flex;
  justify-content: space-between; /* 修改为两端对齐 */
  gap: 1rem;
  margin-top: 1rem;
}

.social-links a {
  text-decoration: none;
  display: inline-block;
  transition: transform 0.3s ease;
}

.social-links img.social-icon {
  width: 29px;
  height: 29px;
  transition: transform 0.3s ease;
}

.social-links a:hover img.social-icon {
  transform: scale(1.2);
}

/* ----------------------------------------------
   Main Content Container
---------------------------------------------- */
.container {
  display: flex;
  justify-content: space-between;
  margin: 120px 15%;
  padding-top: 2rem;
}

.left-column,
.right-column {
  flex: 1;
}

.right-column {
  margin-left: 2rem;
}

.right-column p {
  font-size: 1.1rem;
  color: #292929; /* Dark Gray */
  margin-bottom: 1.5rem;
  text-align: justify;
}

/* Content sections for better organization */
.content-section {
  margin-bottom: 2.5rem;
  padding: 1.5rem;
  background-color: #f8f8f8;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.content-section h3 {
  margin-top: 0;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #ddd;
}

.content-section p:last-child {
  margin-bottom: 0;
}

.content-section details {
  margin-top: 1rem;
}

.content-section details:first-child {
  margin-top: 1.5rem;
}

.content-section details:last-child {
  margin-bottom: 0;
}

/* ----------------------------------------------
   Research Page Styles
---------------------------------------------- */
.right-column.research-content {
  flex: 3;
  max-width: 1200px;
}

.research-container {
  display: flex;
  align-items: center;
  padding: 1.5rem;
  border-radius: 8px;
  background-color: #F0F0F0; /* Light Gray for container */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  width: 100%;
  margin-bottom: 1.5rem;
}

.research-container img.research-pic {
  width: 300px;
  margin-right: 1.5rem;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.research-pic:hover {
  transform: scale(1.05);
}

.research-details h3 {
  margin: 0;
  font-size: 1.3rem;
  color: #000000; /* Black */
}

.research-details p {
  margin: 0.5rem 0;
  color: #000000; /* Black */
}

.research-details a.read-more {
  text-decoration: none;
  color: #5C2223; /* Dark Red accent */
  font-weight: 500;
  cursor: pointer;
  margin-top: 0.5rem;
}

.research-details a.read-more:hover {
  color: #8E2425; /* Brighter Red hover */
}

/* Optional: Style for the expanded long-description text */
.long-description {
  margin-top: 1rem;
  color: #000000; /* Black */
}

/* Alternating Background Colors for Research Containers */
.alt-color-1 {
  background-color: #eeeeee;
}

.alt-color-2 {
  background-color: #F0F0F0;
}

/* ----------------------------------------------
   Publication Page Styles
---------------------------------------------- */
.publication-container {
  padding: 1.5rem;
  border-radius: 8px;
  background-color: #eeeeee;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin-bottom: 1.5rem;
}

.publication-container h3 {
  font-size: 1.3rem;
  color: #000000; /* Black */
}

.publication-container p {
  margin: 0.25rem 0;
  font-size: 1rem;
  color: #000000; /* Black */
}

.publication-button {
  text-decoration: none;
  padding: 0.4rem 0.8rem;
  background-color: #8E2425; /* Brighter Red button */
  color: #FFFFFF; /* White text */
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 5px;
  display: inline-block;
  margin-top: 0.5rem;
  transition: background-color 0.3s ease;
}

.publication-button:hover {
  background-color: #5C2223; /* Dark Red hover effect */
}

/* ----------------------------------------------
   Gallery Page Styles
---------------------------------------------- */
.gallery-container {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.gallery-item {
  background-color: #eeeeee;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  overflow: hidden;
  width: 48%;
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
}

.gallery-item .caption {
  text-align: center;
  padding: 10px;
  font-size: 14px;
  color: #000000;
}

.gallery-pic:hover {
  transform: scale(1.05);
}

/* ----------------------------------------------
   Lightbox Styles (Shared Across Pages)
---------------------------------------------- */
.lightbox {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
}

.lightbox-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 80%;
  max-height: 80%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.lightbox .close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #FFFFFF;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}

.lightbox .close:hover {
  color: #8E2425; /* Brighter Red hover for close */
}

.lightbox .caption {
  color: #FFFFFF;
  text-align: center;
  font-size: 1.2rem;
  margin-top: 10px;
}

/* ----------------------------------------------
   Footer Styles
---------------------------------------------- */
footer {
  background-color: #eeeeee;
  color: #040404;
  text-align: center;
  padding: 1rem;
  font-size: 1rem;
}

/* ----------------------------------------------
   Responsive Styles
---------------------------------------------- */
@media (max-width: 768px) {
  /* Hide desktop nav items but keep the nav container */
  nav {
    padding: 0;
    box-shadow: none;
    background-color: transparent;
  }

  nav ul {
    display: none;
  }

  /* Hamburger menu styles */
  .hamburger {
    display: block;
    cursor: pointer;
    padding: 10px;
    position: fixed;
    top: 10px;
    right: 10px;
    background-color: #5C2223;
    border-radius: 8px;
    z-index: 1001;
  }

  .bar {
    width: 20px;
    height: 2px;
    background-color: #FFFFFF;
    margin: 4px 0;
    transition: 0.4s;
  }

  .hamburger.active .bar:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .hamburger.active .bar:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active .bar:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  /* Mobile nav menu */
  .nav-menu {
    display: none;
    flex-direction: column;
    position: fixed;
    top: 39px;
    right: 10px;
    width: 200px;
    background-color: #5C2223;
    padding-top: 10px;
    padding-bottom: 10px;
    transition: 0.3s;
    z-index: 1000;
    border-radius: 8px 0 8px 8px;
  }

  .nav-menu.show {
    display: flex;
  }

  .nav-menu li {
    margin: 0.5rem 0;
  }

  .nav-menu a {
    color: #FFFFFF;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    display: block;
    text-align: left;
  }

  /* Remove active menu styles for mobile */
  .nav-menu a.active {
    background-color: #8E2425;
  }

  /* Container adjustments */
  .container {
    flex-direction: column;
    align-items: center;
    margin: 80px 5% 20px;
    padding-top: 0;
  }

  /* Left column adjustments */
  .left-column {
    display: none;
    position: static;
    width: 100%;
    max-width: none;
    margin-bottom: 2rem;
    text-align: center;
  }

  /* Show left-column only on the About page */
  body.about-page .left-column {
    display: block;
  }

  /* Center profile pic, name, and social links */
  .profile-pic {
    display: block;
    margin: 1rem auto;
  }

  .left-column h2,
  .left-column p {
    text-align: center;
    margin: 0.5rem 0;
  }

  .social-links {
    justify-content: center;
    margin: 1rem 0 2rem;
  }

  /* Right column adjustments */
  .right-column {
    width: 100%;
    margin-left: 0;
    padding: 0 1rem;
  }
  
  .content-section {
    padding: 1rem;
    margin-bottom: 2rem;
  }

  /* Research and Publication Containers */
  .research-container,
  .publication-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem;
    margin: 1rem 0;
    width: 100%;
    box-sizing: border-box;
  }

  .research-container img.research-pic,
  .publication-container img {
    width: 100%;
    height: auto;
    margin-bottom: 1rem;
  }

  /* Adjust text alignment and spacing */
  .research-details h3,
  .research-details p,
  .publication-container h3,
  .publication-container p {
    text-align: left;
    padding: 0;
    margin-bottom: 1rem;
  }

  /* Adjust read-more link and buttons */
  .research-details a.read-more,
  .publication-button {
    display: inline-block;
    margin: 0.5rem 0 0;
  }

  /* Gallery adjustments */
  .gallery-container {
    flex-direction: column;
    gap: 1rem;
  }

  .gallery-item {
    width: 100%;
  }

  /* Ensure no horizontal overflow */
  body {
    overflow-x: hidden;
  }
}

/* ----------------------------------------------
   Responsive Styles for Extra Large Screens (Ultra-Wide)
---------------------------------------------- */
@media (min-width: 1600px) {
  .container {
    margin: 120px 20%; /* Further increase the side margins */
  }

  .left-column {
    max-width: 350px; /* Larger max width for the left column */
  }

  .right-column {
    font-size: 1.2rem; /* Increase the font size for larger screens */
  }

  footer {
    font-size: 1.3rem; /* Slightly larger footer text for extra-large screens */
    padding: 0.4rem;
  }
}

/* ----------------------------------------------
   Responsive Styles for Large Screens
---------------------------------------------- */
@media (min-width: 1200px) {
  body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
  }

  .container {
    flex: 1;
  }

  footer {
    margin-top: auto;
  }

  nav {
    padding: 1rem 10%;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }

  nav ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    margin-left: auto;
    margin-right: 570px;
  }

  nav ul li {
    margin-right: 3rem;
  }

  nav ul li:last-child {
    margin-right: 0;
  }
}

details {
  margin-bottom: 1rem;
}

summary {
  font-weight: bold;
  cursor: pointer;
  color: #333;
}

summary::-webkit-details-marker {
  display: none; /* Remove default arrow */
}

/* Personal Information Styles */
.personal-info {
  margin: 1.5rem 0;
  background-color: #f8f8f8;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.info-item {
  margin-bottom: 0.8rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #eee;
}

.info-item:last-child {
  margin-bottom: 0;
  border-bottom: none;
}

.info-label {
  font-weight: 500;
  color: #000000;
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
}

.info-value {
  color: #292929;
  font-size: 0.95rem;
  word-break: break-all; /* 允许长单词换行 */
}
