/* 基础样式，支持浅色/深色模式 */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }

/* 主题色变量：深海蓝与琥珀金 */
:root {
  --accent1: #06368a; /* Navy */
  --accent2: #f6ba27; /* Gold */
  --text: #222222;
  --muted: #64748b;
  --bg: #ffffff;
  --border: rgba(6, 54, 138, 0.15);
  --tint: rgba(6, 54, 138, 0.03);
}
@media (prefers-color-scheme: dark) {
  :root {
    --text: #e6e6e6;
    --muted: #cbd5e1;
    --bg: #111111;
    --border: rgba(246, 186, 39, 0.22);
    --tint: rgba(246, 186, 39, 0.08);
  }
}

body { font-family: system-ui, -apple-system, Segoe UI, Roboto, 'Noto Sans CJK SC', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', Arial, sans-serif; line-height: 1.6; color: var(--text); background: var(--bg); }

.container { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,0.95); backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--border); }
@media (prefers-color-scheme: dark) {
  .site-header { background: rgba(20,20,20,0.95); }
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.brand { font-weight: 700; text-decoration: none; color: inherit; }
.site-nav ul { display: flex; gap: 16px; list-style: none; margin: 0; padding: 0; align-items: center; }
.site-nav a { text-decoration: none; color: inherit; opacity: 0.85; border-bottom: 2px solid transparent; padding-bottom: 2px; }
.site-nav a:hover, .site-nav .active a { opacity: 1; border-bottom-color: var(--accent2); }
.nav-toggle { display: none; background: transparent; border: 0; font-size: 22px; }
@media (max-width: 768px) {
  .nav-toggle { display: inline-block; }
  .site-nav { 
    display: none; 
    position: absolute; 
    left: 0; 
    right: 0; 
    top: 100%; 
    background: var(--bg); 
    border-bottom: 1px solid var(--border);
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.15);
    z-index: 1000;
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; padding: 12px 16px; align-items: flex-start; }
  .site-nav li { width: 100%; border-bottom: 1px solid var(--tint); }
  .site-nav li:last-child { border-bottom: none; }
  .site-nav a { display: block; padding: 12px 0; width: 100%; }
}

.hero { padding: 72px 0 56px; background: linear-gradient(135deg, rgba(246, 186, 39, 0.12), #ffffff); }
@media (prefers-color-scheme: dark) {
  .hero { background: linear-gradient(135deg, #0b1220, #061b47); }
}
.hero h1, .page-hero h1, .container h2 { font-size: 40px; margin: 0 0 12px; }
.hero p { font-size: 18px; margin: 0 0 20px; opacity: 0.9; }
.hero-actions { display: flex; gap: 12px; }

.btn { display: inline-block; padding: 10px 16px; border-radius: 8px; border: 1px solid var(--border); color: inherit; text-decoration: none; }
.btn.primary { background: var(--accent1); border-color: var(--accent1); color: #fff; }
.btn:hover { filter: brightness(1.05); }

.section { padding: 64px 0; }
.section.alt { background: var(--tint); }
@media (prefers-color-scheme: dark) {
  .section.alt { background: var(--tint); }
}
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 1024px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .cards { grid-template-columns: 1fr; } }
.card { border: 1px solid var(--border); border-radius: 12px; padding: 16px; background: rgba(255,255,255,0.9); }
.research-img { width: 100%; height: auto; border-radius: 8px; margin: 12px 0; object-fit: cover; max-height: 160px; }

/* 轮播图样式 */
.carousel-container {
  position: relative;
  width: 75%;
  margin: 0 auto;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-left: 4px solid var(--accent1);
  padding: 0;
  overflow: visible;
  display: flex;
  align-items: center;
}

.carousel-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  width: 100%;
}

.carousel {
  display: flex;
  transition: transform 0.5s ease;
  width: 100%;
}

.carousel-slide {
  flex: 0 0 100%;
  height: auto;
}

.carousel-content {
  position: relative;
  text-align: center;
}

.carousel-content video, .carousel-content img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 500px;
  object-fit: contain;
}

.carousel-caption {
  font-family: 'Microsoft YaHei', sans-serif;
  font-weight: bold;
  font-size: 1.1em;
  color: var(--text);
  margin: 8px 0 4px 0;
  padding: 6px;
  background: rgba(255,255,255,0.8);
  border-radius: 8px;
}

@media (prefers-color-scheme: dark) {
  .carousel-caption {
    background: rgba(20,20,20,0.8);
  }
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  color: var(--accent1);
  border: none;
  width: 50px;
  height: 50px;
  font-size: 32px;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s ease;
  padding: 0;
  font-weight: bold;
}

.carousel-btn.prev {
  left: -60px;
}

.carousel-btn.next {
  right: -60px;
}

.carousel-btn:hover {
  color: var(--accent1);
  filter: brightness(1.2);
}

@media (prefers-color-scheme: dark) { .card { background: rgba(20,20,20,0.9); } }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 16px; }
.stat { text-align: center; padding: 12px; border-radius: 10px; background: var(--tint); border: 1px solid var(--border); }
@media (prefers-color-scheme: dark) { .stat { background: var(--tint); } }
.stat .num { font-size: 28px; font-weight: 700; color: var(--accent1); }
.stat .label { opacity: 0.8; }

.pub-list { margin: 8px 0 0; padding-left: 18px; }
.pub-list a { color: var(--accent1); text-decoration: none; font-weight: 600; }
.pub-list a:hover { text-decoration: underline; }

/* 研究卡片布局 */
.research-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 24px;
  min-width: 1200px;
}

.research-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.research-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.research-card h3 {
  margin-top: 0;
  color: var(--accent1);
  font-size: 1.1em;
  border-bottom: 2px solid var(--accent1);
  padding-bottom: 6px;
  white-space: nowrap;
  overflow: visible;
}

.research-img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 12px 0;
}

.research-card .desc-list {
  font-size: 0.9em;
}

.container > p {
  font-size: 1.1em;
  color: var(--text);
  margin: 0 0 24px 0;
  line-height: 1.5;
}

/* 科研项目卡片样式 */
.container h2 {
  font-size: 2.5em;
  color: var(--text);
}

.project-card {
  display: flex;
  flex-wrap: wrap;
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 4px solid #1a5276;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  margin-top: 24px;
  padding: 0 8px;
}

.project-video {
  flex: 1;
  min-width: 300px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

@media (prefers-color-scheme: dark) {
  .project-video {
    background: #1a1a1a;
  }
}

.project-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-content {
  flex: 2;
  padding: 24px;
  min-width: 320px;
}

.project-content h3 {
  margin-top: 0;
  color: var(--accent1);
  font-size: 1.3em;
  margin-bottom: 12px;
}

.project-time {
  color: #666;
  font-size: 0.9em;
  margin-bottom: 16px;
}

@media (prefers-color-scheme: dark) {
  .project-time {
    color: #94a3b8;
  }
}

.project-description p {
  margin-bottom: 12px;
  line-height: 1.6;
}

.research-card .desc-list {
  margin-bottom: 4px;
}

@media (prefers-color-scheme: dark) {
  .research-card .desc-list li {
    color: var(--text);
  }
}

@media (max-width: 1024px) {
  .research-cards {
    overflow-x: auto;
    grid-template-columns: repeat(4, 240px);
    min-width: 0;
  }
  
  .container {
    padding-left: 12px;
    padding-right: 12px;
  }
}

@media (max-width: 768px) {
  .research-cards {
    grid-template-columns: 1fr;
    overflow-x: visible;
  }
}

/* 论文列表样式 */
.pub-items { margin: 0; padding-left: 18px; }
.pub-items li {
  text-align: justify;
  text-justify: inter-ideograph;
  margin-bottom: 12px;
  line-height: 1.6;
}
.pub-items a { color: var(--text) !important; text-decoration: underline !important; }
.pub-title { font-weight: 600; }
.pub-authors, .pub-venue { opacity: 0.85; }
.pub-citations { 
  color: var(--accent1); 
  font-weight: 500; 
  font-size: 0.9em;
  margin-left: 8px;
}

.pub-items h3 {
  margin: 32px 0 16px 0;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent1);
  color: var(--accent1);
  font-size: 1.3em;
}
@media (prefers-color-scheme: dark) {
  .pub-items h3 {
    border-bottom-color: var(--accent2);
    color: var(--accent2);
  }
}
@media (prefers-color-scheme: dark) {
  .pub-citations {
    color: var(--accent2);
  }
}

.page-hero { padding: 64px 0 0; background: linear-gradient(180deg, var(--tint), transparent); }
@media (prefers-color-scheme: dark) { .page-hero { background: linear-gradient(180deg, var(--tint), transparent); } }

.people-grid { 
  display: grid; 
  grid-template-columns: repeat(auto-fill, 300px); 
  gap: 24px; 
  justify-items: stretch;
  align-items: stretch;
  justify-content: center;
}
@media (max-width: 768px) { 
  .people-grid { 
    grid-template-columns: repeat(auto-fill, 280px); 
    gap: 20px;
  } 
}
@media (max-width: 480px) { 
  .people-grid { 
    grid-template-columns: 1fr; 
    gap: 16px;
  } 
}
.person { 
  border: 1px solid var(--border); 
  border-radius: 12px; 
  padding: 20px; 
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  text-align: center; 
  background: rgba(255,255,255,0.9); 
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  height: 100%;
  width: 300px;
}
@media (max-width: 768px) {
  .person { width: 280px; }
}
@media (max-width: 480px) {
  .person { width: 100%; }
}
.person:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}
@media (prefers-color-scheme: dark) { 
  .person { 
    background: rgba(20,20,20,0.9); 
  }
  .person:hover {
    box-shadow: 0 8px 25px rgba(255,255,255,0.1);
  }
}
.person img { 
  width: 120px; 
  height: 160px; 
  border-radius: 8px; 
  object-fit: cover; 
  background: #f0f0f0; 
  margin-bottom: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
@media (prefers-color-scheme: dark) {
  .person img {
    background: #2a2a2a;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  }
}
.person h3 { 
  margin: 0 0 8px; 
  font-size: 1.2em;
  color: var(--accent1);
}
.person .title { 
  margin: 0 0 8px; 
  font-weight: 600;
  color: var(--muted);
  font-size: 0.9em;
}
.person .subtitle { 
  margin: 4px 0 8px; 
  font-style: italic;
  color: #94a3b8;
  font-size: 0.85em;
}
.person .email { 
  margin: 8px 0 0; 
  font-size: 0.85em;
  color: var(--accent1);
  font-weight: 500;
}
.person p { 
  margin: 4px 0 0; 
  opacity: 0.9; 
  line-height: 1.5;
}
@media (prefers-color-scheme: dark) {
  .person h3 {
    color: var(--accent2);
  }
  .person .title {
    color: var(--muted);
  }
  .person .subtitle {
    color: #94a3b8;
  }
  .person .email {
    color: var(--accent2);
  }
}

/* 优秀毕业生样式 */
.alumni-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.alumni-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  background: rgba(255,255,255,0.9);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.alumni-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.alumni-item h4 {
  margin: 0 0 8px;
  font-size: 1.1em;
  color: var(--accent1);
}

.alumni-item p {
  margin: 0;
  opacity: 0.9;
  line-height: 1.5;
}

@media (prefers-color-scheme: dark) {
  .alumni-item {
    background: rgba(20,20,20,0.9);
  }
  .alumni-item:hover {
    box-shadow: 0 8px 25px rgba(255,255,255,0.1);
  }
  .alumni-item h4 {
    color: var(--accent2);
  }
}

/* 毕业同学荣誉样式 */
.honor-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
  margin-bottom: 32px;
}

.honor-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.9);
  font-size: 0.95em;
  line-height: 1.5;
}

.honor-name {
  font-weight: 700;
  color: var(--accent1);
}

.honor-type {
  font-weight: 600;
}

@media (prefers-color-scheme: dark) {
  .honor-item {
    background: rgba(20,20,20,0.9);
    border-color: #333;
  }
  .honor-name {
    color: var(--accent2);
  }
  .pub-items li {
    color: var(--text);
  }
  .pub-title {
    color: var(--text);
  }
  .pub-authors,
  .pub-venue {
    color: var(--muted);
  }
}

.honor-year {
  color: var(--muted);
  font-style: italic;
}

@media (prefers-color-scheme: dark) {
  .honor-item {
    background: rgba(20,20,20,0.9);
  }
  .honor-name {
    color: var(--accent2);
  }
  .honor-year {
    color: var(--muted);
  }
}

/* 最新动态样式 */
.news-list { display: flex; flex-direction: column; gap: 18px; }
.news-item { display: flex; gap: 20px; align-items: flex-start; }
.news-date {
  min-width: 100px;
  font-weight: bold;
  color: var(--accent1) !important;
  font-size: 16px;
  flex-shrink: 0;
}
.news-content h3 {
  margin: 0 0 4px 0;
  font-size: 18px;
  font-weight: bold;
  color: #000000;
}
.news-content h3 a {
  color: #000000;
  text-decoration: none;
}
.news-content h3 a:hover {
  color: #2188FF;
}
.news-content p {
  margin: 0;
  color: #333333;
  font-size: 15px;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .news-item { flex-direction: column; gap: 4px; }
  .news-date { font-size: 15px; }
}

@media (prefers-color-scheme: dark) {
  .news-date { color: var(--accent2); }
  .news-content h3 {
    color: #ffffff;
  }
  .news-content h3 a {
    color: #ffffff;
  }
  .news-content h3 a:hover {
    color: var(--accent2);
  }
  .news-content p {
    color: #cccccc;
  }
}

@media (max-width: 768px) {
  .news-item { flex-direction: column; gap: 8px; }
  .news-date { font-size: 1em; opacity: 0.8; }
}

@media (prefers-color-scheme: dark) {
  .news-date { color: var(--accent2); }
  .news-content h3 a:hover { color: var(--accent2); }
}

.site-footer { border-top: 1px solid var(--border); padding: 32px 0; }
.footer-inner { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; flex-wrap: wrap; min-height: 80px; }
.footer-logo { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.footer-logo-img { height: 60px; width: auto; max-width: none; object-fit: contain; }
.footer-logo-text { display: flex; flex-direction: column; gap: 4px; }
.footer-title { font-size: 18px; font-weight: 700; }
.footer-subtitle { font-size: 14px; opacity: 0.7; }
.footer-content { display: flex; flex-direction: column; gap: 12px; align-items: flex-end; }
.footer-links { display: flex; gap: 12px; }
@media (max-width: 768px) {
  .footer-inner { flex-direction: column; align-items: center; text-align: center; }
  .footer-logo { align-items: center; }
  .footer-content { align-items: center; }
  .footer-logo-img { height: 48px; width: auto; max-width: none; object-fit: contain; }
  .footer-title { font-size: 16px; }
  .footer-subtitle { font-size: 12px; }
}

.institution-info {
  margin-top: 24px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255,255,255,0.5);
}
@media (prefers-color-scheme: dark) {
  .institution-info {
    background: rgba(20,20,20,0.5);
  }
}
.institution-info h3 {
  margin: 0 0 12px;
  color: var(--accent1);
}
.institution-info p {
  margin: 4px 0;
  opacity: 0.9;
}

.research-areas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 24px 0;
}
.area {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255,255,255,0.5);
}
@media (prefers-color-scheme: dark) {
  .area {
    background: rgba(20,20,20,0.5);
  }
}
.area h3 {
  margin: 0 0 8px;
  color: var(--accent1);
  font-size: 1.1em;
}
.area p {
  margin: 0;
  opacity: 0.9;
  line-height: 1.5;
}

/* 语言切换按钮样式 */
.lang-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 8px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9em;
  color: inherit;
  transition: all 0.2s;
}
.lang-btn:hover {
  background: var(--tint);
  border-color: var(--accent2);
}
.lang-btn:hover {
  background: var(--tint);
  border-color: var(--accent2);
}