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

body {
  font-family: "Open Sans", Tahoma, Verdana, Segoe, sans-serif;
  padding-top: 60px;
}

html,
body {
  width: 100%;
  overflow-x: hidden; /* 禁止横向滚动 */
}

/* 页面内容 */
.content {
  padding: 20px;
  padding-bottom: 50px;
  margin: 0 auto 0 auto;
  float: none;
  width: auto;
  max-width: 54em;
  text-align: justify;
  hyphens: auto;
  font-size: 16px;
}

.content p {
  text-align: left;
  margin-bottom: 15px;
}

/* 导航栏样式 */
nav {
  background-color: #3d518c;
  /* color: white; */
  padding: 0;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  height: 60px;
}

nav .nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

/* 网站名称 */
.navbar-brand {
  font-size: 18px;
  font-weight: bold;
  color: lightgray;
  text-decoration: none;
  font: 24px "PT Sans Narrow", "Open Sans Condensed", "Open Sans", Tahoma,
    Verdana, Segoe, sans-serif;
}

.navbar-brand:hover {
  color: white;
}

/* 菜单列表 */
nav ul {
  list-style: none;
  display: flex;
  gap: 25px;
}

nav a {
  color: lightgray;
  text-decoration: none;
  transition: color 0.3s;
  font-size: 15px;
}

nav a:hover {
  color: lightgray;
}

/* 汉堡菜单按钮（手机上显示） */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
}

/* 手机端样式 */
@media (max-width: 768px) {
  nav ul {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    flex-direction: column;
    background-color: #3d518c;
    gap: 0;
    padding: 20px 0;
  }

  nav ul.active {
    display: flex;
  }

  nav ul li {
    padding: 10px 20px;
  }

  .menu-toggle {
    display: block;
  }

  nav .nav-container {
    padding: 0 15px;
  }
}

/* Show on top of content for mobile, on the side for wider viewponts */
.sidebar {
  display: block;
  padding: 15px;
  padding-bottom: 5px;
  line-height: 1.3;
  background-color: #f5f5f5;
  border-bottom: 1px solid #eee;
}

@media (min-width: 768px) {
  .sidebar {
    width: 259px;
    position: fixed;
    top: 60px;
    bottom: 0;
    left: 0;
    z-index: 1000;
    display: block;
    padding: 15px;
    overflow-x: hidden;
    overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */
    border-right: 1px solid #eee;
  }
}

/* Sidebar navigation */
.nav-sidebar {
  margin-top: 30px;
  margin-right: -21px; /* 20px padding + 1px border */
  margin-bottom: 20px;
  margin-left: -20px;
}

.nav-sidebar > li {
  margin-bottom: 15px;
}
.nav-sidebar > li > a {
  padding-right: 20px;
  padding-left: 20px;
  text-decoration: none;
}

.nav-sidebar > li > a:hover {
  text-decoration: underline;
}

.nav-sidebar > .active > a,
.nav-sidebar > .active > a:hover,
.nav-sidebar > .active > a:focus {
  color: #428bca;

  /* background-color: #428bca; */
}

hr {
  border: none;
  border-top: 1px solid #e0e0e0;
}

h1 {
  font-size: 28px;
}
h2 {
  font-size: 23px;
}
h3 {
  font-size: 19px;
}
h4 {
  font-size: 16px;
  margin-top: 20px;
  margin-bottom: 10px;
}

.staff {
  text-align: center;
  margin-top: 4ex;
  margin-bottom: 5px;
}
/* 
@media (min-width: 986px) {
  .staff { */
/* display: grid; */
/* grid-template-columns: auto auto auto;
    gap: 20px;
  }
} */

.staff > p {
  text-align: center;
  display: inline-block;
  margin-left: auto;
  margin-right: auto;
}

.staff img {
  max-width: 300px;
  max-height: 300px;
  border-radius: 3%;
}

.updates h2 {
  margin-top: 3ex;
  margin-bottom: 40px;
  font-size: 26px;
}

#updates {
  margin-top: 5ex;
}

/* poem */

.poem {
  text-align: center;
  line-height: 2;
  font-family: "Garamond", "Georgia", serif;
  font-size: 16px;
  /* font-family: 'Playfair Display', 'Helvetica', sans-serif; */
}

.poem div {
  margin: 0;
}

.author {
  display: flex;
  justify-content: flex-end; /* Align to the right */
  /* padding-right: 30%; */
  margin: 20px 0 0 0;
  font-style: italic;
  font-size: 14px;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
}

.publication {
  margin-bottom: 20px;
}

.publication p {
  margin: 0;
}

.publication h4 {
  font-size: 18px;
  font-weight: normal;
  margin-top: 15px;
  margin-bottom: 10px;
}

/* project items */
.item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-top: 30px;
  background-color: #f5f5f5;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.item img {
  width: 100px;
  height: 100px;
  flex-shrink: 0;
  border-radius: 8px;
  object-fit: cover;
}

.item-text {
  flex: 1;
}

.item-text h3 {
  font-size: 18px;
  margin-bottom: 10px;
  color: #333;
}

.item-text p {
  line-height: 1.5;
  margin: 0 0 5px 0;
  color: black;
  font-size: 14px;
}

/* 手机端 */
@media (max-width: 768px) {
  .item {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .item img {
    width: 80px;
    height: 80px;
  }
}
