:root {
  --primary: #1a237e;
  --nav-bg: #fff;
  --nav-text: #222;
  --accent: #e53935;
  --bg: #f5f5f5;
  --bg-news: #fafafa;
  --card: #fff;
  --text: #222;
  --muted: #777;
  --border-radius: 10px;
  --max-width: 1200px;
  --nav-height: 54px;
  --nav-height-mobile: 46px;
  --nav-z: 110;
  --hero-height: 22vw;
  --hero-min-height: 170px;
  --hero-max-height: 370px;
  --font-main: 'Lato', Arial, sans-serif;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  padding: 0;
  font-family: var(--font-main);
  font-size: 18px;
  background: var(--bg);
  color: var(--text);
  line-height: 1.72;
  font-weight: 400;
  position: relative;
}

/* =================== Banner =================== */
.top-banner-bg {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: calc(var(--hero-height) + var(--nav-height));
  min-height: calc(var(--hero-min-height) + var(--nav-height));
  max-height: calc(var(--hero-max-height) + var(--nav-height));
  z-index: 0;
  background: url('../img/NUAA1.jpg') center center/cover no-repeat;
  width: 100%;
  pointer-events: none;
}
.top-banner-bg::after {
  content: "";
  display: block;
  position: absolute;
  inset: 0;
  background: rgba(26,35,126, 0.22);
}

/* =================== Navbar =================== */
nav {
  width: 100%;
  height: var(--nav-height);
  background: transparent;
  position: sticky;
  top: 0;
  z-index: var(--nav-z);
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.32s cubic-bezier(.45,.06,.41,.95), color 0.32s, height 0.2s;
}
.nav-inner {
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  height: var(--nav-height);
  justify-content: space-between;
  padding: 0 2vw;
  position: relative;
  z-index: 2;
}
.nav-logo {
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 1.08rem;
  letter-spacing: 1px;
  user-select: none;
  line-height: var(--nav-height);
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none !important;
  display: flex;
  align-items: center;
  transition: opacity 0.2s;
}
.nav-logo:active { opacity:0.7; }
.nav-links {
  display: flex;
  gap: 0.1rem;
  align-items: center;
}
nav a {
  text-decoration: none !important;
  padding: 0 1.08rem;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  font-weight: 400;
  font-size: 1.07rem;
  border-radius: 0;
  transition: background 0.15s, color 0.32s;
  letter-spacing: 0.4px;
  position: relative;
  font-family: var(--font-main);
  background: transparent;
  color: var(--nav-text);
}
nav.scrolled {
  background: var(--nav-bg);
}
nav.scrolled .nav-logo,
nav.scrolled .nav-links a {
  color: var(--nav-text);
  text-decoration: none;
}
.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  margin-left: 15px;
  z-index: var(--nav-z);
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  margin: 5px 0;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.25s;
}
nav.scrolled .nav-toggle span {
  background: #fff;
}
.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6.2px);
}

/* =================== Hero =================== */
.hero {
  width: 100%;
  min-height: var(--hero-min-height);
  height: var(--hero-height);
  max-height: var(--hero-max-height);
  position: relative;
  display: flex;
  align-items: center;
  box-sizing: border-box;
  overflow: hidden;
  margin-bottom: 0.5rem;
  z-index: 1;
  background: transparent;
}
.hero-welcome {
  position: absolute;
  left: 50%;
  top: 43%;
  transform: translate(-50%,-50%);
  color: #fff;
  font-family: var(--font-main);
  font-weight: 1000;
  letter-spacing: 2px;
  z-index: 2;
  text-shadow: 0 2px 16px rgba(0,0,0,0.28),0 1px 1px rgba(0,0,0,0.15);
  white-space: nowrap;
  line-height: 1.08;
  padding: 0 12px;
  text-align: center;
  font-size: clamp(2rem, 7vw, 3.8rem);
}

/* =================== Main Layout =================== */
main {
  max-width: var(--max-width);
  margin: 2.1rem auto 0 auto;
  padding: 1rem 6vw 1.3rem 6vw;
  position: relative;
  z-index: 2;
}
section {
  background: var(--card);
  margin-bottom: 1.6rem;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  padding: 1.35rem 2.6rem 1.35rem 2.6rem;
  scroll-margin-top: calc(var(--nav-height) + 8px);
}

/* =================== Typography =================== */
h2 {
  color: var(--primary);
  margin-top: 0;
  margin-bottom: 0.7em;
  font-size: 1.35rem;
  font-family: var(--font-main);
  font-weight: 700;
  line-height: 1.38;
}
h3 {
  color: var(--primary);
  margin-top: 1em;
  margin-bottom: 1em;
  font-size: 1.13rem;
  font-family: var(--font-main);
  font-weight: 700;
  line-height: 1.28;
}
h4 {
  color: var(--primary);
  margin-top: 1em;
  margin-bottom: 0.2em;
  font-size: 1.18rem;
  border-top: 1px dashed #e5e7eb;
  padding-top: 0.5em;
}
h5 {
  color: var(--primary);
  margin-top: 0.1em;
  margin-bottom: 0em;
  font-size: 1rem;
}
a {
  white-space: nowrap;
  color: var(--primary);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
ul, ol {
  padding-left: 1.15em;
  margin-top: 0.7em;
  margin-bottom: 0.7em;
  font-family: var(--font-main);
  font-size: 1.04rem;
  line-height: 1.72;
}
p, li, td, th, .news-item, .about-bio, .about-name, .about-affil, .about-email {
  font-family: var(--font-main);
  font-size: 1.04rem;
  line-height: 1.72;
  font-weight: 400;
}

/* =================== About =================== */
.about-block {
  display: flex;
  flex-direction: column;
  gap: 0.2em;
}
.about-row {
  display: flex;
  align-items: center;
  gap: 3.6rem;
  flex-wrap: wrap;
  justify-content: flex-start;
}
.about-photo {
  max-width: 98px;
  width: 98px;
  border-radius: 3px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.11);
  background: #e0e0e0;
  flex-shrink: 0;
  display: block;
  object-fit: contain;
  margin: 0;
  transition: max-width 0.25s, width 0.25s;
}
.about-identity {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 220px;
  gap: 0.4em;
}
.about-name {
  font-size: 1.18rem;
  font-family: var(--font-main);
  font-weight: bold;
  color: var(--primary);
}
.about-affil {
  font-size: 1.04rem;
  color: var(--text);
  font-family: var(--font-main);
  line-height: 1.6;
}
.about-email {
  font-size: 1.04rem;
  color: var(--text);
  font-family: var(--font-main);
}
.about-bio {
  margin-top: 0.4em;
  padding-right: 1em;
  text-align: justify;
  font-size: 1.04rem;
  line-height: 1.72;
  color: var(--text);
  font-family: var(--font-main);
  max-width: 100%;
}
.about-bio ul {
  margin-top: 0em;
  margin-bottom: 0em;
}
.about-bio li {
  margin-left: 1em;
  padding-left: 0.1em;
}
.about-bio b {
  font-weight: 700;
  color: var(--primary);
}
.icon-container {
  display: flex;
  align-items: center;
  justify-content: left;
}
.icon-container a,
.icon-container img {
  --iconwidth: 24px;
  width: var(--iconwidth);
  font-size: var(--iconwidth);
  margin-top: 1px !important;
  margin-right: calc(var(--iconwidth)/1.5);
  border: 0px !important;
  box-shadow: none !important;
}
/* ====== Students in About ====== */
/* .students { */
/* margin-top: 1.1rem; */
/* border-top: 1px dashed #e5e7eb; */
/* } */
.students-group {
  background: #f8fafc;
  border: 1px solid #eef2f7;
  border-radius: 8px;
  padding: 0.8rem;
  margin-bottom: 0.8rem;
  font-size: 15px;
}
.students-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.4rem;
  font-size: 1.02rem;
}
.students-badge {
  background: var(--primary, #4285f4);
  color: #fff;
  font-size: 0.76rem;
  font-weight: bold;
  padding: 0.1rem 0.6rem;
  border-radius: 999px;
  letter-spacing: 0.3px;
  display: inline-block;
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}
.students-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
@media (max-width: 900px) {
  .students-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  .students-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 420px) {
  .students-grid {
    grid-template-columns: 1fr;
  }
}
.student-item {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 8px 10px;
  transition: box-shadow .2s ease, border-color .2s ease;
  margin-bottom: 10px;
}

.student-item:hover {
  box-shadow: 0 8px 20px rgba(26,35,126,.08);
  border-color: #dbeafe;
}

.student-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.student-name {
  font-weight: 600;
  color: #111827;
}

.student-meta {
  color: var(--muted, #6b7280);
  white-space: nowrap;
  font-size: 0.97em;
}

.student-remark {
  color: #1976d2;
  background: #f1f7ff;
  border-radius: 0.5em;
  padding: 0.1em 0.6em;
  margin-top: 0.2em;
  font-size: 0.97em;
  font-weight: 500;
  display: inline-block;
}

/* =================== News =================== */
.news-item {
  margin-bottom: 1em;
  border-left: 4px solid var(--accent);
  padding-left: 1em;
  padding-right: 1em;
  padding-top: 3px;
  padding-bottom: 3px;
  background: var(--bg-news);
  border-radius: 3px;
  font-family: var(--font-main);
  font-size: 1.04rem;
  text-align: justify;
  display: flex;
  align-items: center;
  gap: 0.8em;
  transition: background 0.18s, border-left-color 0.18s, box-shadow 0.18s;
}
.news-item:hover {
  background: #f3f8fd;
  border-left-color: var(--primary);
  box-shadow: 0 4px 18px rgba(34,52,120,0.12);
}
.news-date {
  font-size: 1.04rem;
  color: var(--muted);
  margin-right: 0.5em;
  font-weight: bold;
  font-family: var(--font-main);
  min-width: 78px;
  display: inline-block;
  flex-shrink: 0;
}
.news-label {
  font-weight: bold;
  font-family: var(--font-main);
  margin-right: 0.2em;
  color: var(--primary);
}


/* =================== Publications =================== */
.pub-list-num {
  margin: 0 0 1em 0;
  padding: 0;
  counter-reset: pubnum;
  font-size: 1.04rem;
  font-family: var(--font-main);
}
.pub-list-num li {
  list-style: none;
  position: relative;
  padding-left: 2em;
  padding-right: 1em;
  counter-increment: pubnum;
  font-style: normal;
  font-weight: 400;
  font-size: 1.04rem;
  font-family: var(--font-main);
  line-height: 1.72;
  border-bottom: 1.3px solid #eee;
  padding-top: 1.2em;
  padding-bottom: 1.2em;
  text-align: justify;
}
.pub-list-num li:first-child {
  padding-top: 0em;
}
.pub-list-num li:last-child {
  border-bottom: none;
}
.pub-list-num li::before {
  content: counter(pubnum) ".";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
  font-size: 1em;
  min-width: 1.5em;
  text-align: right;
  font-family: var(--font-main);
  font-style: normal;
}
.paper-label {
  font-weight: bold;
  color: var(--primary);
  font-family: var(--font-main);
  margin-right: 0.14em;
  font-size: 1.04rem;
  font-style: normal;
}
.journal-name {
  font-weight: normal !important;
  color: var(--text);
  font-style: normal !important;
  font-family: var(--font-main);
  margin-left: 2px;
  font-size: 1.04rem;
}
.paper-link {
  color: var(--accent);
  text-decoration: none;
  margin-left: 0.2em;
}

/* =================== Contact =================== */
.contact-table {
  width: 100%;
  border-collapse: collapse;
}
.contact-table td {
  padding: 0.4em 0.7em 0.4em 0;
  vertical-align: top;
  font-size: 1.04rem;
  font-family: var(--font-main);
}

/* =================== Footer =================== */
footer {
  text-align:center;
  color: var(--muted);
  font-size: 0.75em;
  margin-bottom: 2.1rem;
  font-family: var(--font-main);
}

/* =================== Responsive =================== */
@media (max-width: 1000px) {
  .about-row { gap: 2rem;}
  .about-identity { min-width: 0; max-width: 620px;}
}
@media (max-width: 900px) {
  .hero-welcome {
    font-size: clamp(1.8rem, 11vw, 3.2rem);
  }
  .hero { min-height: 90px; height: 22vw; max-height: 110px;}
  .top-banner-bg {
    height: calc(22vw + var(--nav-height));
    min-height: calc(90px + var(--nav-height));
    max-height: calc(110px + var(--nav-height));
  }
}
@media (max-width: 750px) {
  .nav-inner {
    padding: 0 0.6vw;
    position: relative;
  }
  .nav-logo {
    margin-right: auto;
  }
  .nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 48px;
    height: 48px;
    position: absolute;
    top: 50%;
    right: 0.6vw;
    transform: translateY(-50%);
    margin-left: 0;
    padding: 0;
    background: none;
    border: none;
    border-radius: 50%;
    z-index: var(--nav-z);
    transition: background 0.15s;
  }
  .nav-toggle span {
    display: block;
    width: 30px;
    height: 3.5px;
    margin: 2.2px 0;
    background: var(--nav-text);
    border-radius: 2px;
    transition: all 0.25s;
  }
  nav.scrolled .nav-toggle span {
    background: var(--nav-text);
  }
  .nav-toggle:hover,
  .nav-toggle:focus {
    background: rgba(26,35,126,0.07);
    outline: none;
  }
  .nav-links {
    position: fixed;
    top: var(--nav-height-mobile);
    right: 0;
    background: var(--nav-bg)!important;
    flex-direction: column;
    align-items: flex-start;
    width: 210px;
    min-width: 150px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.10);
    transform: translateX(110%);
    transition: transform 0.22s cubic-bezier(.8,.25,.3,1), background 0.32s;
    z-index: var(--nav-z);
    padding: 0.6rem 0 0.9rem 0;
    gap: 0;
  }
  .nav-links.open {
    transform: translateX(0);
  }
  .nav-links.open.bg-primary {
    background: var(--nav-bg);
  }
  nav a {
    width: 100%;
    height: 44px;
    justify-content: flex-start;
    padding-left: 1.2em;
    border-radius: 0;
    font-size: 1.04rem;
  }
}
@media (max-width: 700px) {
  .about-row {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }
  .about-photo {
    margin: 0 auto;
    display: block;
  }
  .about-identity {
    align-items: center;
    text-align: center;
    min-width: 0;
    max-width: 98vw;
    margin: 0 auto;
  }
  .icon-container {
    display: flex;
    align-items: center;
    justify-content: center !important;
  }
  .hero-welcome {
    font-size: clamp(1.6rem, 14vw, 2.2rem);
    padding: 0 4vw;
  }
}
@media (max-width: 600px) {
  nav { height: var(--nav-height-mobile); }
  .nav-inner { height: var(--nav-height-mobile);}
  .nav-logo { font-size: 1rem; }
  h2 { font-size: 1.18rem; }
  h3 { font-size: 1.06rem; }
  p, li, td, th, .news-item, .about-bio, .about-name, .about-affil, .about-email {
    font-size: 0.97rem;
  }
  nav a {
    font-size: 0.91rem;
    /* padding: 0 0.12rem;  */
  }
  section { padding: 1.5rem 1.5rem 1.5rem 1.5rem;}
  .top-banner-bg {
    min-height: calc(50px + var(--nav-height-mobile));
  }
}
@media (max-width: 500px) {
  .hero-welcome {
    font-size: clamp(1.1rem, 16vw, 2.3rem);
    padding: 0 4vw;
  }
  .hero { max-height: 80px; min-height: 50px; }
  .top-banner-bg {
    max-height: calc(80px + var(--nav-height));
    min-height: calc(50px + var(--nav-height));
  }
}
@media (min-width: 751px) {
  nav a {
    position: relative;
    overflow: hidden;
  }
  .nav-logo::after {
    content: none;
  }
  nav a:not(.nav-logo)::after {
    content: "";
    position: absolute;
    bottom: 8px;
    left: 50%;
    width: 0;
    height: 2.2px;
    background-color: currentColor;
    transform: translateX(-50%);
    transition: width 0.3s ease;
  }
  nav a:not(.nav-logo):hover::after {
    width: 100%;
  }
}
