:root {
  --blue: #165d9b;
  --blue-dark: #0e3f6c;
  --blue-deep: #0a2f52;
  --blue-light: #eaf3fb;
  --accent: #2f83c5;
  --text: #243443;
  --muted: #687887;
  --line: #dfe7ee;
  --bg: #f3f6f9;
  --white: #ffffff;
  --max-width: 1180px;
  --shadow: 0 6px 22px rgba(24, 62, 93, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.8;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

button {
  font: inherit;
}

.container {
  width: min(var(--max-width), calc(100% - 40px));
  margin: 0 auto;
}

.topbar {
  height: 66px;
  background: var(--blue-deep);
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
}

.topbar .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar-links {
  display: flex;
  gap: 22px;
}

.school-wordmark {
  display: flex;
  height: 100%;
  align-items: center;
}

.school-wordmark img {
  width: auto;
  height: 56px;
}

.topbar a:hover {
  color: #fff;
}

.site-header {
  background: #fff;
}

.header-main {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 15px;
}

.brand-mark {
  width: 56px;
  height: 56px;
  display: grid;
  flex: 0 0 56px;
  place-items: center;
  border-radius: 5px;
  background: var(--blue);
  color: #fff;
  font-family: Georgia, serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -1px;
}

.brand-text strong {
  display: block;
  color: var(--blue-deep);
  font-family: "SimSun", "Songti SC", serif;
  font-size: 24px;
  line-height: 1.35;
  letter-spacing: 1px;
}

.brand-text span {
  display: block;
  margin-top: 3px;
  color: #82909c;
  font-size: 11px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.header-contact {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.header-contact strong {
  display: block;
  color: var(--blue);
  font-size: 14px;
}

.navbar {
  position: relative;
  z-index: 20;
  background: var(--blue);
  box-shadow: 0 2px 8px rgba(5, 42, 74, 0.16);
}

.nav-inner {
  min-height: 52px;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
}

.main-nav {
  display: flex;
  align-items: stretch;
}

.main-nav a {
  min-width: 118px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  transition: background-color 0.15s ease;
}

.main-nav a:hover,
.main-nav a.active {
  background: var(--blue-dark);
}

.nav-note {
  display: flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.75);
  font-size: 12px;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  margin: 5px 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 4px;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.menu-toggle span {
  width: 19px;
  height: 2px;
  display: block;
  margin: 4px auto;
  background: currentColor;
}

.hero-banner {
  position: relative;
  min-height: 300px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 8% 24%, rgba(255,255,255,.11) 0 55px, transparent 56px),
    radial-gradient(circle at 84% 74%, rgba(255,255,255,.12) 0 80px, transparent 81px),
    radial-gradient(circle at 74% 18%, rgba(255,255,255,.07) 0 38px, transparent 39px),
    linear-gradient(120deg, #0e4b7b 0%, #1d6aa5 55%, #378fc6 100%);
  color: #fff;
}

.hero-banner::after {
  position: absolute;
  inset: 0;
  content: "";
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 44px 44px;
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 55px 0;
  text-align: center;
}

.hero-content .hero-label {
  display: inline-block;
  margin-bottom: 12px;
  padding: 4px 12px;
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 2px;
  color: rgba(255,255,255,.86);
  font-size: 11px;
  letter-spacing: 2px;
}

.hero-content h1 {
  margin-bottom: 14px;
  font-family: "STKaiti", "KaiTi", "SimSun", serif;
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 500;
  letter-spacing: 4px;
}

.hero-content p {
  max-width: 760px;
  margin: 0 auto;
  color: rgba(255,255,255,.82);
  font-size: 15px;
  letter-spacing: .5px;
}

.subpage-banner {
  min-height: 190px;
}

.subpage-banner .hero-content {
  padding: 38px 0;
  text-align: left;
}

.subpage-banner .hero-content h1 {
  margin-bottom: 8px;
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 34px;
  font-weight: 500;
  letter-spacing: 2px;
}

.breadcrumb {
  color: rgba(255,255,255,.7);
  font-size: 12px;
}

.page-body {
  padding: 34px 0 60px;
}

.page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: start;
}

.main-column,
.side-column {
  display: grid;
  gap: 24px;
}

.content-card,
.side-card {
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
}

.content-card {
  padding: 32px 36px;
}

.side-card {
  padding: 24px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 25px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.section-title h2 {
  position: relative;
  margin: 0;
  padding-left: 14px;
  color: var(--blue-deep);
  font-size: 22px;
  font-weight: 500;
}

.section-title h2::before {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  width: 4px;
  content: "";
  background: var(--accent);
}

.section-title span,
.more-link {
  color: #8593a0;
  font-size: 12px;
}

.more-link:hover {
  color: var(--blue);
}

.group-intro {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.teacher-photo {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: .745;
  border: 7px solid #f2f5f7;
  background: #e8ecef;
}

.teacher-photo img {
  position: absolute;
  top: -38%;
  left: -298%;
  width: 481%;
  max-width: none;
}

.intro-text h3 {
  margin-bottom: 7px;
  color: var(--blue-deep);
  font-size: 24px;
  font-weight: 500;
}

.intro-text .role {
  margin-bottom: 14px;
  color: var(--blue);
  font-size: 14px;
}

.intro-text p {
  margin-bottom: 12px;
  color: #516271;
  text-align: justify;
}

.plain-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid var(--blue);
  border-radius: 3px;
  background: var(--blue);
  color: #fff;
  font-size: 13px;
}

.plain-button:hover {
  background: var(--blue-dark);
}

.direction-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.direction-item {
  padding: 22px 20px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  background: #fbfdff;
}

.direction-icon {
  width: 42px;
  height: 42px;
  display: grid;
  margin-bottom: 16px;
  place-items: center;
  border-radius: 50%;
  background: var(--blue-light);
  color: var(--blue);
  font-family: Georgia, serif;
  font-size: 18px;
  font-weight: 700;
}

.direction-item h3 {
  margin-bottom: 8px;
  color: var(--blue-deep);
  font-size: 17px;
  font-weight: 500;
}

.direction-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.news-list,
.quick-list,
.project-list,
.publication-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.news-list li {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 16px;
  padding: 15px 0;
  border-bottom: 1px dashed var(--line);
}

.news-list li:last-child {
  border-bottom: 0;
}

.news-date {
  color: var(--blue);
  font-size: 12px;
  font-weight: 600;
}

.news-list a {
  color: #3c4e5e;
  font-size: 14px;
}

.news-list a:hover {
  color: var(--blue);
}

.profile-card {
  padding-top: 0;
  overflow: hidden;
}

.profile-card-header {
  margin: 0 -24px 20px;
  padding: 18px 24px;
  background: var(--blue);
  color: #fff;
  text-align: center;
}

.profile-card .teacher-photo {
  width: 116px;
  margin: 0 auto 16px;
  border-width: 4px;
  border-radius: 50%;
}

.profile-card h3 {
  margin-bottom: 3px;
  color: var(--blue-deep);
  font-size: 20px;
  font-weight: 500;
  text-align: center;
}

.profile-card .profile-role {
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.profile-meta {
  padding-top: 15px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.profile-meta p {
  margin-bottom: 7px;
}

.side-card-title {
  margin: -2px 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  color: var(--blue-deep);
  font-size: 17px;
  font-weight: 500;
}

.quick-list li {
  border-bottom: 1px dashed var(--line);
}

.quick-list li:last-child {
  border-bottom: 0;
}

.quick-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 2px;
  color: #566776;
  font-size: 13px;
}

.quick-list a::after {
  content: "›";
  color: var(--accent);
  font-size: 18px;
}

.quick-list a:hover {
  color: var(--blue);
}

.admission-box {
  border: 0;
  background: var(--blue-light);
}

.admission-box h3 {
  margin-bottom: 10px;
  color: var(--blue-deep);
  font-size: 18px;
}

.admission-box p {
  color: #5f7485;
  font-size: 13px;
}

.admission-box .plain-button {
  width: 100%;
}

.full-card {
  padding: 36px 42px;
}

.profile-detail {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 38px;
  align-items: start;
}

.profile-detail .photo-caption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.profile-summary h2 {
  margin-bottom: 5px;
  color: var(--blue-deep);
  font-size: 30px;
  font-weight: 500;
}

.profile-summary .role {
  margin-bottom: 18px;
  color: var(--blue);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
}

.tag-row span {
  padding: 5px 11px;
  border: 1px solid #cfe0ed;
  border-radius: 2px;
  background: #f4f9fd;
  color: #4b6f8b;
  font-size: 12px;
}

.detail-section {
  margin-top: 32px;
  padding-top: 25px;
  border-top: 1px solid var(--line);
}

.detail-section h3 {
  margin-bottom: 15px;
  color: var(--blue-deep);
  font-size: 19px;
  font-weight: 500;
}

.timeline-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline-list li {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 22px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
  color: #586a78;
  font-size: 14px;
}

.timeline-list time {
  color: var(--blue);
  font-weight: 500;
}

.student-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.student-card {
  padding: 24px;
  border: 1px solid var(--line);
  background: #fbfcfd;
  text-align: center;
}

.student-avatar {
  width: 76px;
  height: 76px;
  display: grid;
  margin: 0 auto 13px;
  place-items: center;
  border-radius: 50%;
  background: #e5edf3;
  color: #90a1ad;
  font-size: 13px;
}

.student-card h3 {
  margin-bottom: 4px;
  font-size: 16px;
  font-weight: 500;
}

.student-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.publication-year {
  margin: 28px 0 8px;
  color: var(--blue);
  font-size: 20px;
  font-weight: 500;
}

.publication-year:first-child {
  margin-top: 0;
}

.publication-list {
  counter-reset: publications;
}

.publication-list li {
  position: relative;
  padding: 15px 0 15px 38px;
  border-bottom: 1px dashed var(--line);
  color: #3c4d5c;
  counter-increment: publications;
  font-size: 14px;
  line-height: 1.7;
}

.publication-list li::before {
  position: absolute;
  top: 16px;
  left: 0;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  content: counter(publications);
  border-radius: 50%;
  background: var(--blue-light);
  color: var(--blue);
  font-size: 11px;
}

.publication-list em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.project-list li {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px dashed var(--line);
}

.project-list strong {
  color: var(--blue);
  font-size: 13px;
}

.project-list span {
  color: #495b69;
  font-size: 14px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.gallery-item {
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
}

.gallery-placeholder {
  position: relative;
  min-height: 190px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 75% 25%, rgba(255,255,255,.55) 0 32px, transparent 33px),
    linear-gradient(135deg, #dceaf4, #a8c9df);
  color: rgba(22,93,155,.72);
  font-size: 13px;
}

.gallery-item:nth-child(2n) .gallery-placeholder {
  background:
    radial-gradient(circle at 30% 70%, rgba(255,255,255,.55) 0 38px, transparent 39px),
    linear-gradient(135deg, #d7e8e5, #a4ccc6);
}

.gallery-caption {
  padding: 15px 17px;
}

.gallery-caption h3 {
  margin-bottom: 3px;
  color: var(--blue-deep);
  font-size: 16px;
  font-weight: 500;
}

.gallery-caption p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.moment-list {
  display: grid;
  gap: 26px;
}

.moment-entry {
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
}

.moment-entry img {
  width: 100%;
  height: auto;
}

.moment-entry-content {
  padding: 20px 24px 22px;
}

.moment-entry-content h3 {
  margin-bottom: 6px;
  color: var(--blue-deep);
  font-size: 19px;
  font-weight: 500;
}

.moment-entry-content p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.notice {
  margin-top: 22px;
  padding: 14px 17px;
  border-left: 4px solid var(--accent);
  background: var(--blue-light);
  color: #567188;
  font-size: 13px;
}

.admission-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: start;
}

.admission-lead {
  margin-bottom: 26px;
  padding: 20px 22px;
  border-left: 4px solid var(--blue);
  background: #f3f8fc;
  color: #506777;
}

.discipline-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.discipline-list div {
  padding: 15px 18px;
  border: 1px solid var(--line);
  background: #fbfdff;
}

.discipline-list span {
  display: block;
  color: #8a99a5;
  font-size: 11px;
}

.discipline-list strong {
  color: var(--blue-deep);
  font-size: 15px;
}

.requirement-list {
  margin: 0;
  padding-left: 22px;
  color: #536573;
}

.requirement-list li {
  margin-bottom: 8px;
}

.contact-panel {
  position: sticky;
  top: 20px;
  overflow: hidden;
  padding: 0;
}

.contact-panel-head {
  padding: 25px;
  background: var(--blue);
  color: #fff;
}

.contact-panel-head h2 {
  margin-bottom: 5px;
  font-size: 22px;
  font-weight: 500;
}

.contact-panel-head p {
  margin: 0;
  color: rgba(255,255,255,.78);
  font-size: 12px;
}

.contact-panel-body {
  padding: 24px;
}

.contact-panel-body dt {
  margin-top: 13px;
  color: #8a98a3;
  font-size: 11px;
}

.contact-panel-body dd {
  margin: 3px 0 0;
  color: #3d5363;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.site-footer {
  padding-top: 38px;
  background: var(--blue-deep);
  color: rgba(255,255,255,.73);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 50px;
  padding-bottom: 32px;
}

.footer-grid h3 {
  margin-bottom: 12px;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
}

.footer-grid p,
.footer-grid a {
  margin-bottom: 5px;
  color: rgba(255,255,255,.64);
  font-size: 12px;
}

.footer-grid a {
  display: block;
}

.footer-grid a:hover {
  color: #fff;
}

.footer-bottom {
  padding: 16px 0;
  border-top: 1px solid rgba(255,255,255,.13);
  text-align: center;
}

.footer-bottom p {
  margin: 0;
  color: rgba(255,255,255,.46);
  font-size: 11px;
}

@media (max-width: 960px) {
  .header-contact,
  .nav-note {
    display: none;
  }

  .main-nav a {
    min-width: auto;
    padding: 0 17px;
  }

  .page-layout,
  .admission-layout {
    grid-template-columns: 1fr;
  }

  .side-column {
    grid-template-columns: repeat(2, 1fr);
  }

  .profile-card {
    grid-row: span 2;
  }

  .contact-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(100% - 28px, var(--max-width));
  }

  .topbar {
    height: 55px;
  }

  .school-wordmark img {
    height: 45px;
  }

  .topbar-links {
    display: none;
  }

  .header-main {
    min-height: 76px;
  }

  .brand-mark {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
    font-size: 16px;
  }

  .brand-text strong {
    font-size: 17px;
  }

  .brand-text span {
    font-size: 8px;
  }

  .nav-inner {
    min-height: 52px;
    display: block;
  }

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .main-nav {
    display: none;
    padding-bottom: 8px;
  }

  .main-nav.open {
    display: block;
  }

  .main-nav a {
    min-height: 44px;
    justify-content: flex-start;
    padding: 0 14px;
    border-top: 1px solid rgba(255,255,255,.13);
  }

  .hero-banner {
    min-height: 245px;
  }

  .hero-content {
    padding: 42px 0;
  }

  .hero-content h1 {
    font-size: 31px;
    letter-spacing: 2px;
  }

  .hero-content p {
    font-size: 13px;
  }

  .subpage-banner {
    min-height: 145px;
  }

  .subpage-banner .hero-content {
    padding: 28px 0;
  }

  .subpage-banner .hero-content h1 {
    font-size: 27px;
  }

  .page-body {
    padding-top: 20px;
  }

  .content-card,
  .full-card {
    padding: 24px 20px;
  }

  .group-intro,
  .profile-detail {
    grid-template-columns: 1fr;
  }

  .group-intro .teacher-photo,
  .profile-detail > div:first-child {
    width: min(210px, 100%);
  }

  .direction-grid,
  .student-grid,
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .side-column {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 26px;
  }

  .footer-grid > div:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .brand-text strong {
    max-width: 240px;
    font-size: 15px;
  }

  .brand-text span {
    display: none;
  }

  .section-title {
    align-items: flex-start;
  }

  .section-title span {
    display: none;
  }

  .direction-grid,
  .student-grid,
  .gallery-grid,
  .discipline-list {
    grid-template-columns: 1fr;
  }

  .timeline-list li,
  .project-list li {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .news-list li {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid > div:first-child {
    grid-column: auto;
  }
}
