/* Design System Tokens */
:root {
  --font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans CJK SC", sans-serif;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --border-radius-sm: 8px;
  --border-radius-md: 12px;
  --border-radius-lg: 16px;
  
  /* Light Theme Variables */
  --bg-app: #f1f5f9;
  --bg-sidebar: #ffffff;
  --bg-card: #ffffff;
  --bg-card-featured: linear-gradient(135deg, #f0fdfa 0%, #e0f2fe 100%);
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --accent: #0f766e;
  --accent-light: #ccfbf1;
  --accent-hover: #0d9488;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --scroll-thumb: #cbd5e1;
}

body.dark-mode {
  /* Dark Theme Variables */
  --bg-app: #0f172a;
  --bg-sidebar: #1e293b;
  --bg-card: #1e293b;
  --bg-card-featured: linear-gradient(135deg, #112d37 0%, #0f2b48 100%);
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --accent: #2dd4bf;
  --accent-light: #115e59;
  --accent-hover: #14b8a6;
  --border-color: #334155;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
  --scroll-thumb: #475569;
}

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

html {
  scroll-behavior: smooth;
  height: 100%;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-app);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Notch safe area cover for iOS devices */
.notch-cover {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: env(safe-area-inset-top);
  background-color: var(--bg-sidebar);
  z-index: 2000;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--scroll-thumb);
  border-radius: var(--border-radius-sm);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* Application Container */
.app-container {
  display: grid;
  grid-template-columns: 320px 1fr;
  min-height: 100dvh;
  position: relative;
}

/* Sidebar Styling */
.sidebar {
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  padding: 1.5rem 1.25rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  height: 100dvh;
  position: sticky;
  top: 0;
  z-index: 1000;
  overflow-y: auto;
  box-shadow: var(--shadow-sm);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* Profile Card */
.profile-card {
  text-align: center;
  margin-bottom: 1.25rem;
}

.avatar-container {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 0.75rem auto;
  border: 3px solid var(--accent);
  box-shadow: var(--shadow-md);
  transition: transform 0.5s ease;
}

.avatar-container:hover {
  transform: rotate(5deg) scale(1.05);
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-name {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  letter-spacing: 0.05em;
}

.profile-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.profile-institution {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.profile-department {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Quick Contact Info */
.contact-info {
  margin-bottom: 1.25rem;
  padding: 0.65rem 0.75rem;
  background-color: var(--bg-app);
  border-radius: var(--border-radius-md);
  border: 1px solid var(--border-color);
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.contact-item:last-child {
  margin-bottom: 0;
}

.contact-item a {
  color: var(--text-secondary);
  text-decoration: none;
  word-break: break-all;
  transition: var(--transition-smooth);
}

.contact-item a:hover {
  color: var(--accent);
}

.contact-item .icon {
  width: 13px;
  height: 13px;
  fill: var(--accent);
  flex-shrink: 0;
}

/* Hover WeChat styling */
.contact-wechat {
  position: relative;
  cursor: pointer;
}

.wechat-qr-popover {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 0.75rem;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2500;
  text-align: center;
  width: 145px;
}

.wechat-qr-popover::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: var(--border-color) transparent transparent transparent;
}

.wechat-qr-img {
  width: 115px;
  height: 115px;
  border-radius: var(--border-radius-sm);
  display: block;
  margin: 0 auto 0.35rem auto;
}

.wechat-qr-popover p {
  font-size: 0.65rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.2;
}

.contact-wechat:hover .wechat-qr-popover {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) scale(1);
}

/* Navigation Links */
.sidebar-nav {
  margin-bottom: auto;
}

.sidebar-nav ul {
  list-style: none;
}

.sidebar-nav li {
  margin-bottom: 0.25rem;
}

.nav-link {
  display: block;
  padding: 0.45rem 0.75rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.85rem;
  border-radius: var(--border-radius-sm);
  transition: var(--transition-smooth);
  border-left: 3px solid transparent;
}

.nav-link:hover, .nav-link.active {
  background-color: var(--accent-light);
  color: var(--accent);
  border-left: 3px solid var(--accent);
}

body.dark-mode .nav-link:hover, body.dark-mode .nav-link.active {
  background-color: var(--accent-light);
  color: var(--text-primary);
}

/* Sidebar Footer Controls */
.sidebar-footer {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.btn-theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
  background-color: var(--bg-card);
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-theme-toggle:hover {
  background-color: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.btn-theme-toggle .icon-sun, .btn-theme-toggle .icon-moon {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Toggle Sun/Moon display */
body.light-mode .icon-sun { display: none; }
body.dark-mode .icon-moon { display: none; }

.btn-decrypt {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
  background-color: var(--bg-card);
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-decrypt:hover {
  background-color: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.btn-decrypt .icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.btn-decrypt.decrypted {
  background-color: #0d9488 !important; /* Teal green active */
  color: #ffffff !important;
  border-color: #0d9488 !important;
}

/* Main Content Styling */
.main-content {
  padding: 1.5rem 2rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Academic Highlights Dashboard */
.highlights-dashboard {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  width: 100%;
}

.highlight-card {
  background-color: var(--bg-card);
  border-radius: var(--border-radius-md);
  padding: 1rem 0.85rem;
  border: 1px solid var(--border-color);
  border-top: 3px solid var(--accent);
  box-shadow: var(--shadow-sm);
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.highlight-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: linear-gradient(180deg, var(--accent) 0%, transparent 100%);
  opacity: 0.04;
  pointer-events: none;
}

body.dark-mode .highlight-card::before {
  opacity: 0.08;
}

.highlight-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

.h-num {
  font-family: 'Outfit', sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.h-label {
  font-size: 0.7rem;
  color: var(--text-secondary);
  font-weight: 600;
  line-height: 1.35;
}

/* Academic Section Card */
.section-card {
  background-color: var(--bg-card);
  border-radius: var(--border-radius-lg);
  padding: 1.5rem 1.75rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.section-card:hover {
  box-shadow: var(--shadow-md);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-badge {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-weight: 700;
  background-color: var(--accent-light);
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
}

/* About Me Content */
.about-text p {
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.subsection-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 1.25rem 0 0.75rem 0;
  color: var(--text-primary);
  border-left: 3px solid var(--accent);
  padding-left: 0.5rem;
}

.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  background-color: var(--bg-app);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  padding: 0.25rem 0.6rem;
  border-radius: var(--border-radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
  transition: var(--transition-smooth);
}

.tag:hover {
  background-color: var(--accent-light);
  color: var(--accent);
  border-color: var(--accent);
}

/* Education Layout Styles */
.education-timeline {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.edu-item {
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  position: relative;
}

.edu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.edu-degree {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.edu-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

.edu-info {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.academic-awards {
  margin-top: 0.75rem;
  padding-left: 1rem;
}

.academic-awards li {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

/* Publication Card */
.pub-card {
  background-color: var(--bg-app);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 0.85rem 1rem;
  margin-bottom: 0.75rem;
  transition: var(--transition-smooth);
}

.pub-card:last-child {
  margin-bottom: 0;
}

.pub-card:hover {
  border-color: var(--accent);
  background-color: var(--bg-card);
  transform: translateX(4px);
}

.pub-meta {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}

.badge-ssci {
  background-color: #ea580c;
  color: #ffffff;
}

.badge-scie {
  background-color: #0284c7;
  color: #ffffff;
}

.badge-rank {
  background-color: var(--accent-light);
  color: var(--accent);
}

.badge-gmc {
  background-color: #8b5cf6;
  color: #ffffff;
}

.pub-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-left: auto;
}

.pub-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
  line-height: 1.4;
}

.pub-journal {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Project Lists */
.project-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.project-card {
  background-color: var(--bg-app);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 0.85rem 1rem;
  transition: var(--transition-smooth);
}

.project-card.featured {
  background: var(--bg-card-featured);
  border: 1px solid var(--accent);
}

.project-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.badge-horizontal {
  background-color: #0d9488;
  color: #ffffff;
}

.badge-provincial {
  background-color: #6366f1;
  color: #ffffff;
}

.project-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-left: auto;
}

.project-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.project-org {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 0.35rem;
}

.project-funding {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.funding-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.funding-val {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent);
}

.project-award-callout {
  background-color: var(--bg-card);
  padding: 0.5rem 0.75rem;
  border-left: 3px solid #f59e0b;
  border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: var(--shadow-sm);
  margin-top: 0.5rem;
}

/* Curriculum Grid */
.curriculum-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.85rem;
}

.curriculum-card {
  background-color: var(--bg-app);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
}

.curriculum-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.badge-national {
  background-color: #b91c1c;
  color: #ffffff;
  font-size: 0.6rem;
  padding: 0.1rem 0.35rem;
}

.badge-plan {
  background-color: #047857;
  color: #ffffff;
  font-size: 0.6rem;
  padding: 0.1rem 0.35rem;
}

.date-tag {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
}

.card-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  flex-grow: 1;
}

.card-title a {
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition-smooth);
}

.card-title a:hover {
  color: var(--accent);
}

.card-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Timeline Layout for Awards */
.timeline {
  position: relative;
  padding-left: 1.25rem;
  margin-left: 0.25rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 5px;
  bottom: 5px;
  width: 2px;
  background-color: var(--border-color);
}

.timeline-item {
  position: relative;
  margin-bottom: 1rem;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: -1.25rem;
  top: 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent);
  border: 2px solid var(--bg-card);
  transform: translateX(-2px);
  transition: var(--transition-smooth);
}

.timeline-item:hover .timeline-marker {
  transform: translateX(-2px) scale(1.3);
  background-color: var(--accent-hover);
}

.timeline-content {
  background-color: var(--bg-app);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 0.75rem 1rem;
  transition: var(--transition-smooth);
}

.timeline-item:hover .timeline-content {
  border-color: var(--accent);
  background-color: var(--bg-card);
}

.time-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.year {
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent);
}

.badge-national-prize {
  background-color: #854d0e;
  color: #ffffff;
  font-size: 0.65rem;
}

.badge-provincial-prize {
  background-color: #5b21b6;
  color: #ffffff;
  font-size: 0.65rem;
}

.award-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.award-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Skills 4-Category Grid */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.85rem;
}

.skills-category-card {
  background-color: var(--bg-app);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 0.85rem 1rem;
  transition: var(--transition-smooth);
}

.skills-category-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.skills-category-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.65rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.25rem;
}

.skills-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* Experience List */
.experience-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.exp-item {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.85rem;
}

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

.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
}

.exp-comp {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.exp-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

.exp-role {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.exp-bullets {
  list-style-type: none;
  padding-left: 0.25rem;
}

.exp-bullets li {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
  position: relative;
  padding-left: 0.75rem;
}

.exp-bullets li::before {
  content: "•";
  color: var(--accent);
  position: absolute;
  left: 0;
  top: 0;
}

/* Personal Interests Horizontally Distributed */
.interests-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
  width: 100%;
}

.interest-tag {
  flex: 1 1 120px; /* grow and shrink, minimum size of 120px */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.45rem 0.6rem;
  background-color: var(--bg-app);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
  text-align: center;
  transition: var(--transition-smooth);
}

.interest-tag:hover {
  border-color: var(--accent);
  background-color: var(--accent-light);
  color: var(--accent);
}

.interest-tag .emoji {
  font-size: 1rem;
}

/* Hide animations/filtered items */
.hidden {
  display: none !important;
}

/* Responsive Web Design (Media Queries) */
@media (max-width: 1024px) {
  .app-container {
    grid-template-columns: 280px 1fr;
  }
}

@media (max-width: 768px) {
  .app-container {
    grid-template-columns: 1fr;
  }
  
  .sidebar {
    height: auto;
    position: relative;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem;
  }
  
  .sidebar-nav {
    display: none;
  }

  .sidebar-footer {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
  }

  .btn-theme-toggle {
    width: 100%;
  }

  .main-content {
    padding: 1.25rem;
    gap: 1.5rem;
  }

  .section-card {
    padding: 1.5rem;
  }
  
  .highlights-dashboard {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .highlights-dashboard {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   AI INNOVATION SECTION STYLING & MOSAIC EFFECT
   ========================================================================== */
.mosaic-container {
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius-md);
  border: 1px dashed var(--border-color);
  padding: 0.25rem;
}

.mosaic-content {
  filter: blur(8px);
  -webkit-filter: blur(8px);
  pointer-events: none;
  user-select: none;
  opacity: 0.5;
}

.mosaic-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(248, 250, 252, 0.45);
  backdrop-filter: blur(2px);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 1rem;
  text-align: center;
}

body.dark-mode .mosaic-overlay {
  background-color: rgba(9, 13, 22, 0.5);
}

body.sepia-mode .mosaic-overlay {
  background-color: rgba(246, 243, 235, 0.5);
}

.mosaic-overlay .lock-icon {
  font-size: 1.5rem;
  animation: pulse 2.5s infinite ease-in-out;
}

.mosaic-text {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.02em;
  background-color: var(--bg-card);
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); opacity: 0.8; }
  100% { transform: scale(1); }
}

.ai-innovation-container {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.ai-innovation-intro {
  background-color: var(--bg-app);
  border-left: 4px solid var(--accent);
  padding: 0.75rem 1rem;
  border-radius: 0 var(--border-radius-md) var(--border-radius-md) 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  text-align: justify;
}



.ai-innovation-cases {
  background-color: rgba(15, 118, 110, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 1rem;
  margin-top: 0.25rem;
}

body.dark-mode .ai-innovation-cases {
  background-color: rgba(45, 212, 191, 0.02);
}

.cases-section-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.25rem;
}

.cases-bullets {
  list-style-type: none;
  padding-left: 0.25rem;
}

.cases-bullets li {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
  position: relative;
  padding-left: 0.85rem;
  line-height: 1.4;
}

.cases-bullets li:last-child {
  margin-bottom: 0;
}

.cases-bullets li::before {
  content: "•";
  color: var(--accent);
  position: absolute;
  left: 0;
  top: 0;
}


.confidential-redacted {
  filter: blur(2px);
  -webkit-filter: blur(2px);
  opacity: 0.85;
  user-select: none;
  pointer-events: none;
  display: inline-block;
  letter-spacing: 0.02em;
  transition: var(--transition-smooth);
}

/* Print CSS Stylesheet */
@media print {
  body {
    background-color: #ffffff !important;
    color: #000000 !important;
    font-size: 10pt !important;
  }

  /* Colors reset for print */
  :root {
    --bg-app: #ffffff !important;
    --bg-card: #ffffff !important;
    --bg-card-featured: #ffffff !important;
    --text-primary: #000000 !important;
    --text-secondary: #222222 !important;
    --text-muted: #444444 !important;
    --accent: #000000 !important;
    --border-color: #999999 !important;
    --shadow-sm: none !important;
    --shadow-md: none !important;
    --shadow-lg: none !important;
  }

  .notch-cover,
  .sidebar-nav,
  .sidebar-footer,
  #theme-toggle,
  .wechat-qr-popover,
  .mosaic-container {
    display: none !important;
  }

  .app-container {
    grid-template-columns: 1fr !important;
    min-height: auto !important;
  }

  .sidebar {
    position: static !important;
    width: 100% !important;
    height: auto !important;
    border-right: none !important;
    border-bottom: 2px solid #000000 !important;
    padding: 0 0 1rem 0 !important;
    margin-bottom: 1.5rem !important;
    display: block !important;
  }

  .avatar-container {
    width: 80px !important;
    height: 80px !important;
    float: right;
    margin: 0 0 1rem 1rem !important;
    border: 1px solid #000000 !important;
  }

  .profile-card {
    text-align: left !important;
    margin-bottom: 0.75rem !important;
  }

  .contact-info {
    background-color: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin-bottom: 0.75rem !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 1rem !important;
  }

  .contact-item {
    margin-bottom: 0 !important;
  }

  .contact-item .icon {
    display: none !important;
  }

  .main-content {
    padding: 0 !important;
    gap: 1.25rem !important;
  }

  .highlights-dashboard {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 0.75rem !important;
    margin-bottom: 0.75rem !important;
  }

  .highlight-card {
    padding: 0.5rem !important;
    border: 1px solid #999999 !important;
  }

  .h-num {
    font-size: 1.35rem !important;
  }

  .section-card {
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    page-break-inside: avoid;
    margin-bottom: 1.5rem !important;
  }

  .section-card:hover {
    box-shadow: none !important;
  }

  .section-header {
    border-bottom: 1.5px solid #000000 !important;
    margin-bottom: 0.75rem !important;
    padding-bottom: 0.15rem !important;
  }

  .section-badge {
    display: none !important;
  }

  .pub-card, .project-card, .curriculum-card, .timeline-content, .skills-category-card {
    background-color: transparent !important;
    border: 1px solid #999999 !important;
    padding: 0.75rem !important;
    page-break-inside: avoid;
    margin-bottom: 0.75rem !important;
  }

  .project-card.featured {
    background: transparent !important;
    border: 1.5px solid #000000 !important;
  }

  .project-award-callout {
    border-left: 2px solid #000000 !important;
    background-color: transparent !important;
    box-shadow: none !important;
    padding: 0.4rem !important;
  }

  .timeline {
    padding-left: 1rem !important;
  }

  .timeline::before {
    background-color: #999999 !important;
  }

  .timeline-marker {
    background-color: #000000 !important;
    left: -1rem !important;
    width: 5px !important;
    height: 5px !important;
    top: 10px !important;
  }

  .interest-tag, .tag {
    border: 1px solid #999999 !important;
    background-color: transparent !important;
  }

  /* Page break rules */
  h2, h3 {
    page-break-after: avoid;
  }
  
  img {
    page-break-inside: avoid;
  }
}
