/* Written by Constantine Heinrich CHEN (ConsHein CHEN) */
/* Last Updated: 2025-10-29 */


/* Global Styles | 全局样式 */
:root {
  --primary: #2a6bc6;
  --secondary: #1a3a7a;
  --accent: #34cceb;
  --dark: #0a1429;
  --light: #f0f8ff;
  --gray: #5a708a;
  --link-color: #34cceb;
  --link-hover-color: #5dd8f5;
  --link-visited-color: #9370db;
  
  /* Module Container Variables | 模块容器变量 */
  --education-color: #3498db;
  --publication-color: #2ecc71;
  --paper-color: #4285f4;
  --experience-color: #e74c3c;
  --employment-color: #f39c12;
  --honor-color: #9b59b6;
  --teaching-color: #1abc9c;
  --reviewer-color: #02bd14;
  --patent-color: #8eb446;
  
  --card-bg: rgba(255, 255, 255, 0.05);
  --border-color: rgba(255, 255, 255, 0.1);
  --text-color: #f0f8ff;
  --secondary-text-color: #b8c6db;
  --tag-bg: rgba(255, 255, 255, 0.1);
  --tag-color: #b8c6db;
  --tag-hover-bg: rgba(255, 255, 255, 0.2);
  
  /* Section Title Variables | 章节标题变量 */
  --section-title-color: #f0f8ff;
  --section-title-border-color: #34cceb;
  --section-title-font-size: 2.5rem;
  --section-title-font-weight: 700;
  
  /* Tab Variables | 标签页变量 */
  --tab-color: #b8c6db;
  --tab-hover-color: #f0f8ff;
  --tab-active-color: #34cceb;
  --tab-border-color: rgba(255, 255, 255, 0.1);
  --tab-active-border-color: #34cceb;
  --tab-transition: all 0.3s ease;
}

/* Section Title Styles | 章节标题样式 */
.section-title {
  font-size: var(--section-title-font-size);
  font-weight: var(--section-title-font-weight);
  color: var(--section-title-color);
  text-align: center;
  margin-bottom: 1rem;
  position: relative;
  padding-bottom: 1rem;
}

/* Tab Container Styles | 标签页容器样式 */
.tabs-container {
  display: flex;
  flex-direction: column;
  margin: 2rem auto;
  position: relative;
  align-items: center;
  width: 100%;
  max-width: 1200px;
}

.tabs {
  display: flex;
  justify-content: center;
  align-items: center;
  border-bottom: 1px solid var(--tab-border-color);
  width: 100%;
  max-width: 800px;
}

.tab-button {
  padding: 1rem 1.5rem;
  background: none;
  border: none;
  color: var(--tab-color);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: var(--tab-transition);
  position: relative;
  z-index: 1;
}

.tab-button::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: transparent;
  transition: background-color 0.3s ease;
}

.tab-button:hover {
  color: var(--tab-hover-color);
}

.tab-button.active {
  color: var(--tab-active-color);
}

.tab-button.active::after {
  background: var(--tab-active-border-color);
}

.tab-pane {
  display: none;
  animation: fadeIn 0.5s ease-in-out;
  width: 100%;
  justify-content: center;
}

.tab-pane.active {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Global link styles | 全局超链接样式 */
a {
  color: var(--link-color);
  text-decoration: none;
  transition: color 0.3s ease, text-decoration 0.3s ease;
}

a:hover {
  color: var(--link-hover-color);
  text-decoration: underline;
}

a:visited {
  color: var(--link-color);
}

a:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

a:active {
  color: var(--link-color);
  text-decoration: none;
}

/* Default to dark theme | 默认使用深色主题 */
body {
    background: linear-gradient(135deg, var(--dark) 0%, #0c1d3e 100%),
                url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect fill="none" stroke="%232a6bc6" stroke-width="0.5" stroke-dasharray="2,4" opacity="0.1" x="0" y="0" width="100" height="100"/></svg>');
    background-size: 40px;
    color: var(--light);
    line-height: 1.6;
    padding-top: 80px; /* Space for fixed navigation bar | 为固定导航栏留出空间 */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Dark theme styles (default) | 深色主题样式（默认） */
body.dark-theme {
    background: linear-gradient(135deg, var(--dark) 0%, #0c1d3e 100%),
                url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect fill="none" stroke="%232a6bc6" stroke-width="0.5" stroke-dasharray="2,4" opacity="0.1" x="0" y="0" width="100" height="100"/></svg>');
    background-size: 40px;
    color: var(--light);
}

/* Header and Navigation | 头部和导航 */
header {
  background: rgba(10, 20, 41, 0.95);
  backdrop-filter: blur(10px);
  position: fixed;
  top: 0;
  width: 100%;
  max-width: 100%;
  left: 0;
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
  box-sizing: border-box;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 5%;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  box-sizing: border-box;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
}

.logo i {
  color: var(--accent);
}

/* Dark theme logo styles (default) | 深色主题标志样式（默认） */
body.dark-theme .logo {
  color: white;
}

body.dark-theme .logo i {
  color: var(--accent);
}

/* Dark theme logo image | 深色主题标志图像 */
body.dark-theme .logo img {
  filter: brightness(0) invert(1);
}

.nav-links {
  display: flex;
  gap: 4rem;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
  position: relative;
  outline: none;
  -webkit-outline: none;
  -moz-outline: none;
  -ms-outline: none;
  box-shadow: none;
  -webkit-box-shadow: none;
  -moz-box-shadow: none;
  -ms-box-shadow: none;
}

.nav-links a:hover {
  color: var(--accent);
}

.nav-links a:focus {
  outline: none;
  -webkit-outline: none;
  -moz-outline: none;
  -ms-outline: none;
  box-shadow: none;
  -webkit-box-shadow: none;
  -moz-box-shadow: none;
  -ms-box-shadow: none;
}

.nav-links a:active {
  outline: none;
  -webkit-outline: none;
  -moz-outline: none;
  -ms-outline: none;
  box-shadow: none;
  -webkit-box-shadow: none;
  -moz-box-shadow: none;
  -ms-box-shadow: none;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links a.active {
  color: var(--accent);
  font-weight: 600;
}

.nav-links a.active::after {
  width: 100%;
  background: var(--accent);
}

/* Controls Container | 控件容器 */
.controls {
  display: flex;
  gap: 1rem;
  align-items: center;
}

/* Theme and Language Switch Buttons | 主题和语言切换按钮 */
.theme-switch, .language-switch {
  background: rgba(42, 107, 198, 0.2) !important;
  color: white !important;
  border: 1px solid var(--accent) !important;
  border-radius: 20px !important;
  padding: 0.4rem 1rem !important;
  font-size: 0.9rem !important;
  cursor: pointer !important;
  transition: all 0.3s ease, transform 0.2s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  text-decoration: none !important;
  outline: none !important;
  -webkit-outline: none !important;
  -moz-outline: none !important;
  -ms-outline: none !important;
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
  -moz-box-shadow: none !important;
  -ms-box-shadow: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: scale(1) !important;
  min-width: 40px !important;
}

.theme-switch i, .language-switch i {
  font-size: 1rem !important;
  color: var(--accent) !important;
}

.theme-switch:hover, .language-switch:hover {
  background: rgba(42, 107, 198, 0.4) !important;
  transform: translateY(-2px) scale(1.05) !important;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2) !important;
}

.theme-switch:hover i, .language-switch:hover i {
  color: white !important;
}

.theme-switch:focus, .language-switch:focus {
  outline: none !important;
  -webkit-outline: none !important;
  -moz-outline: none !important;
  -ms-outline: none !important;
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
  -moz-box-shadow: none !important;
  -ms-box-shadow: none !important;
}

.theme-switch:active, .language-switch:active {
  outline: none !important;
  -webkit-outline: none !important;
  -moz-outline: none !important;
  -ms-outline: none !important;
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
  -moz-box-shadow: none !important;
  -ms-box-shadow: none !important;
  transform: translateY(0) scale(0.95) !important;
}

.theme-switch:disabled, .language-switch:disabled {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
}

/* Dark theme button styles | 深色主题按钮样式 */
body.dark-theme .theme-switch, 
body.dark-theme .language-switch {
  background: rgba(42, 107, 198, 0.2) !important;
  color: white !important;
  border: 1px solid var(--accent) !important;
}

body.dark-theme .theme-switch i, 
body.dark-theme .language-switch i {
  color: var(--accent) !important;
}

body.dark-theme .theme-switch:hover, 
body.dark-theme .language-switch:hover {
  background: rgba(42, 107, 198, 0.4) !important;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2) !important;
}

body.dark-theme .theme-switch:hover i, 
body.dark-theme .language-switch:hover i {
  color: white !important;
}

/* Footer Styles | 页脚样式 */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(10, 20, 41, 0.95);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(52, 204, 235, 0.3);
  box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.3);
  z-index: 999;
  padding: 0.75rem 0;
}

.copyright-container {
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 5%;
}

.copyright-text {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  margin: 0;
  text-align: center;
}

/* Dark theme footer styles | 深色主题页脚样式 */
body.dark-theme .footer {
  background: rgba(10, 20, 41, 0.95);
  border-top: 1px solid rgba(52, 204, 235, 0.3);
}

body.dark-theme .copyright-text {
  color: rgba(255, 255, 255, 0.7);
}

/* Main Content Container | 主内容容器 */
.main-container {
  max-width: 1400px; /* Increased to accommodate the left margin | 增加以适应左边距 */
  margin: 2rem auto;
  padding: 0 1rem;
  padding-bottom: 5rem; /* Add bottom padding to account for fixed footer | 添加底部内边距以适应固定页脚 */
  min-height: calc(100vh - 80px); /* Ensure minimum height to push footer down | 确保最小高度以将页脚推下 */
}

/* Content Sections | 内容区域 */
.content-section {
    display: none;
    padding: 0;
    background: transparent;
    border-radius: 0;
    border: none;
    box-shadow: none;
    margin-bottom: 2rem;
    transition: var(--transition);
    margin-left: auto;
    margin-right: auto;
    max-width: 1200px;
}

.content-section.active {
    display: block;
}

.section-content {
    max-width: 800px;
    margin: 0 auto;
}

/* Experiences and Publications styles have been removed as requested */

.section-content h2 {
    color: var(--accent);
    margin-bottom: 1rem;
    font-size: 2rem;
}

.section-content p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1rem;
    line-height: 1.6;
}

/* Section Title Styles | 标题样式 */
.section-title h2 {
    font-size: 2rem;
    display: inline-block;
    margin-bottom: 1rem;
    color: var(--accent);
}

.section-title h2:after {
    content: '';
    display: block;
    width: 100px;
    height: 4px;
    background: var(--accent);
    margin: 0.75rem auto 0;
    border-radius: 2px;
}

/* Tabs container styles | 标签页容器样式 */
.tabs-container {
  margin: 1.5rem 0;
}

.tabs {
  display: flex;
  border-bottom: 2px solid rgba(52, 204, 235, 0.3);
  margin-bottom: 1.5rem;
}

.tab-button {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.tab-button:hover {
  color: var(--accent);
}

.tab-button.active {
  color: var(--accent);
  font-weight: 600;
}

.tab-button.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
}

.tab-content {
  position: relative;
  margin-top: 1rem;
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.education-modules-container,
.employment-modules-container,
.honors-awards-modules-container,
.teaching-modules-container,
.reviewer-modules-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1200px;
  align-items: center;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.5s ease;
}

.tab-pane.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Home page specific styles | 首页特定样式 */
.home-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 0.5rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0;
    background: transparent;
    border-radius: 0;
    border: none;
    box-shadow: none;
}

.home-content-container {
    display: flex;
    gap: 2rem;
}

/* Left Information Section | 左侧信息栏 */
.info-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    background: rgba(20, 36, 71, 0.8);
    border-radius: 12px;
    border: 1px solid rgba(52, 204, 235, 0.3);
    box-shadow: 0 5px 25px rgba(0, 30, 90, 0.4);
    transition: opacity 0.3s ease; /* Only transition opacity, not transform | 仅过渡不透明度，不变形 */
}

.profile-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent);
    margin-bottom: 1.5rem;
    transition: none; /* Prevent any transition effects on the profile photo | 防止个人照片上的任何过渡效果 */
}

.info-content h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--accent);
}

.info-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    width: 100%;
}

.info-icon {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    filter: invert(100%);
}

.info-item span,
.info-item a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
}

.info-item a:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* Right Content Section | 右侧内容区域 */
.home-content-section {
    flex: 2;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.intro-section {
    background: rgba(20, 36, 71, 0.6);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(52, 204, 235, 0.2);
    box-shadow: 0 5px 25px rgba(0, 30, 90, 0.3);
}

.news-section {
    background: rgba(20, 36, 71, 0.6);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(52, 204, 235, 0.2);
    box-shadow: 0 5px 25px rgba(0, 30, 90, 0.3);
    display: flex;
    flex-direction: column;
}

.intro-section h3,
.news-section h3 {
    color: var(--accent);
    margin-bottom: 1rem;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.news-list {
    list-style: none;
    overflow-y: auto;
    flex-grow: 1;
    max-height: 300px;
    padding-right: 5px;
}

.news-item {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.news-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.news-date {
    font-weight: bold;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.news-content {
    color: rgba(144, 238, 144, 0.9);
}

.news-content a {
    color: var(--accent);
    text-decoration: none;
}

.news-content a:hover {
    text-decoration: underline;
}

/* Latest news item special styling | 最新新闻项特殊样式 */
.news-item:first-child {
    border-left: 3px solid rgba(135, 206, 250, 0.9);
    padding-left: 10px;
    background: rgba(135, 206, 250, 0.1);
    border-radius: 0 8px 8px 0;
}

.news-item:first-child .news-date {
    color: rgba(135, 206, 250, 1);
    font-weight: bold;
    font-size: 1.1em;
}

/* Latest label styling | 最新标签样式 */
.latest-label {
    color: rgba(135, 206, 250, 1);
    font-weight: bold;
    font-size: 0.9em;
    margin-left: 5px;
    padding: 2px 6px;
    background: rgba(135, 206, 250, 0.2);
    border-radius: 4px;
}

.news-item:first-child .news-content {
    color: rgba(144, 238, 144, 0.9);
    font-weight: 500;
}

/* Responsive design | 响应式设计 */
@media (max-width: 768px) {
    .home-container {
        flex-direction: column;
    }
    
    .info-section,
    .home-content-section {
        width: 100%;
    }
}

/* Experience section styles | 经历部分样式 */
.experiences-section {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0;
    background: transparent;
    border-radius: 0;
    border: none;
    box-shadow: none;
}

/* Publications section styles | 出版物部分样式 */
.publications-section {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0;
    background: transparent;
    border-radius: 0;
    border: none;
    box-shadow: none;
}

/* Experience Item Styles | 经历项目样式 */
.experience-item {
  background: rgba(20, 36, 71, 0.6);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(52, 204, 235, 0.2);
  box-shadow: 0 5px 15px rgba(0, 30, 90, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.experience-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 30, 90, 0.4);
}

.experience-item h3 {
  color: var(--accent);
  margin-bottom: 0.5rem;
  font-size: 1.3rem;
}

.experience-item .period {
  color: var(--gray);
  font-style: italic;
  margin-bottom: 0.75rem;
}

.experience-item p {
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
}

/* Custom scrollbar styles | 自定义滚动条样式 */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(20, 36, 71, 0.3);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, var(--primary), var(--secondary));
  border-radius: 10px;
  border: 2px solid rgba(20, 36, 71, 0.3);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, var(--accent), var(--primary));
}

/* For Firefox | 适用于Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--primary) rgba(20, 36, 71, 0.3);
}
