/* Modern CSS Reset and Base Styles */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* CSS Custom Properties (Design Tokens) */
:root {
  /* Colors */
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --secondary-color: #64748b;
  --accent-color: #f59e0b;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --background: #ffffff;
  --background-secondary: #f8fafc;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  
  /* Typography */
  --font-family-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-family-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  
  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  
  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;
  
  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-normal: 250ms ease-in-out;
  --transition-slow: 350ms ease-in-out;
}

/* Base Typography */
body,
td,
th,
tr,
p,
a {
  font-family: var(--font-family-primary);
  font-size: var(--font-size-base);
  color: var(--text-primary);
  line-height: 1.6;
}

/* Links */
a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:focus,
a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* Headings */
heading {
  font-family: var(--font-family-primary);
  font-size: var(--font-size-2xl);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-4);
}

name {
  font-family: var(--font-family-primary);
  font-size: var(--font-size-4xl);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

papertitle {
  font-family: var(--font-family-primary);
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

/* Modern Header */
.header {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  transition: all var(--transition-normal);
}

.header.scrolled {
  box-shadow: var(--shadow-md);
}

.header .header-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-4) var(--space-6);
}

.header .brand {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.header .brand:hover {
  color: var(--primary-color);
  text-decoration: none;
}

.header nav {
  display: flex;
  gap: var(--space-6);
}

.header nav a {
  font-size: var(--font-size-base);
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
  position: relative;
}

.header nav a:hover {
  color: var(--primary-color);
  text-decoration: none;
}

.header nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width var(--transition-fast);
}

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

/* Content Container */
.content-container {
  position: relative;
  padding: 120px var(--space-6) var(--space-8);
  max-width: 1200px;
  margin: 0 auto;
  background: linear-gradient(
    to left,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 1) 35%,
    rgba(255, 255, 255, 1) 65%,
    rgba(255, 255, 255, 0) 100%
  );
}

/* Profile Section - Simplified */
.profile-container {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  margin-bottom: var(--space-16);
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

/* Removed gradient ribbon */

.profile-image {
  flex-shrink: 0;
}

.profile-image img {
  width: 200px;
  height: 200px;
  border-radius: var(--radius-xl);
  object-fit: cover;
  border: 3px solid var(--border-color);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.profile-image img:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-lg);
}

.profile-text {
  flex: 1;
}

.profile-text p {
  font-size: var(--font-size-lg);
  line-height: 1.7;
  margin-bottom: var(--space-6);
}

/* Social Links */
.social-links {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  margin: var(--space-6) 0;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: transparent;
  border-radius: var(--radius-lg);
  color: var(--text-secondary);
  font-size: var(--font-size-xl);
  transition: all var(--transition-fast);
  border: none;
}

.social-links a:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
  border: none;
}

/* Scholar Metrics - Simplified */
.scholar-metrics {
  background: transparent;
  border-radius: 0;
  padding: var(--space-4);
  margin: var(--space-6) auto;
  text-align: center;
  border: none;
  box-shadow: none;
  max-width: 400px;
}

.scholar-metrics span {
  font-weight: 600;
  color: var(--primary-color);
  font-size: var(--font-size-lg);
}

/* Section Styling - Simplified like research page */
.section {
  margin-bottom: var(--space-16);
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

/* Removed gradient ribbon from sections */

.section-title {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-6);
  text-align: center;
  position: relative;
}

/* Removed gradient underline from section titles */

/* News Section - Simplified */
.news-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.news-list li {
  padding: var(--space-2) 0;
  margin-bottom: var(--space-4);
  background: transparent;
  border: none;
  transition: none;
}

.news-list li:hover {
  transform: none;
  box-shadow: none;
}

/* Research Section - Simplified */
.research-description {
  font-size: var(--font-size-lg);
  line-height: 1.7;
  text-align: justify;
  margin-bottom: var(--space-6);
  padding: 0;
  background: transparent;
  border: none;
}

/* Experience & Education Lists - Simplified */
.experience-list,
.education-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.experience-list li,
.education-list li {
  padding: var(--space-2) 0;
  margin-bottom: var(--space-4);
  background: transparent;
  border: none;
  transition: none;
}

.experience-list li:hover,
.education-list li:hover {
  transform: none;
  box-shadow: none;
}

/* Image Hover Effects */
img {
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

img:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-lg);
}

/* Paper Info Animation */
.paper-info {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  margin-bottom: 3rem; /* Add significant spacing between papers */
  padding: 2rem;
  background: var(--background);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
}

.paper-info.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Research page specific styling */
.research-page .paper-info {
  margin-bottom: 4rem;
  padding: 2.5rem;
  background: var(--background);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  transition: all var(--transition-normal);
}

.research-page .paper-info:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.research-page .paper-info td {
  padding: 1rem;
  vertical-align: top;
}

.research-page .paper-info td:first-child {
  width: 200px;
  text-align: center;
}

.research-page .paper-info img {
  width: 160px;
  height: 160px;
  border-radius: var(--radius-lg);
  object-fit: cover;
  border: 2px solid var(--border-color);
  transition: all var(--transition-normal);
}

.research-page .paper-info img:hover {
  transform: scale(1.05);
  border-color: var(--primary-color);
}

.research-page .paper-info papertitle {
  font-size: var(--font-size-xl);
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0.5rem;
  display: block;
}

.research-page .paper-info p {
  margin-bottom: 1rem;
  line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 768px) {
  .header .header-content {
    padding: var(--space-3) var(--space-4);
  }
  
  .header nav {
    gap: var(--space-4);
  }
  
  .content-container {
    padding: 100px var(--space-4) var(--space-6);
  }
  
  .profile-container {
    flex-direction: column;
    text-align: center;
    gap: var(--space-6);
    padding: var(--space-6);
  }
  
  .profile-image img {
    width: 150px;
    height: 150px;
  }
  
  .section {
    padding: var(--space-6);
  }
  
  .social-links {
    flex-wrap: wrap;
    gap: var(--space-3);
  }
  
  .social-links a {
    width: 44px;
    height: 44px;
    font-size: var(--font-size-lg);
  }
}

@media (max-width: 480px) {
  .header .brand {
    font-size: var(--font-size-lg);
  }
  
  .header nav a {
    font-size: var(--font-size-sm);
  }
  
  name {
    font-size: var(--font-size-3xl);
  }
  
  .profile-image img {
    width: 120px;
    height: 120px;
  }
}

/* Dark Mode Variables - VSCode Python Theme */
html[data-theme="dark"],
body[data-theme="dark"],
:root[data-theme="dark"] {
  /* VSCode Dark+ Python Theme Colors */
  --primary-color: #007acc !important;
  --primary-hover: #005a9e !important;
  --secondary-color: #858585 !important;
  --accent-color: #ffa500 !important;
  
  /* VSCode Python Syntax Colors */
  --text-primary: #d4d4d4 !important;        /* Default text (like Python strings) */
  --text-secondary: #9cdcfe !important;      /* Blue (like Python keywords) */
  --text-muted: #6a9955 !important;          /* Green (like Python comments) */
  --text-accent: #ce9178 !important;         /* Orange (like Python strings) */
  --text-function: #dcdcaa !important;       /* Yellow (like Python functions) */
  --text-class: #4ec9b0 !important;          /* Cyan (like Python classes) */
  --text-number: #b5cea8 !important;         /* Light green (like Python numbers) */
  
  /* VSCode Background Colors */
  --background: #1e1e1e !important;          /* VSCode editor background */
  --background-secondary: #252526 !important; /* VSCode sidebar background */
  --background-tertiary: #2d2d30 !important;  /* VSCode panel background */
  --border-color: #3c3c3c !important;
  
  /* VSCode Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.5) !important;
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.5), 0 2px 4px -2px rgb(0 0 0 / 0.5) !important;
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5), 0 4px 6px -4px rgb(0 0 0 / 0.5) !important;
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.5), 0 10px 10px -5px rgb(0 0 0 / 0.5) !important;
}

html[data-theme="dark"] .header,
body[data-theme="dark"] .header {
  background: rgba(30, 30, 30, 0.95) !important;
  border-bottom-color: var(--border-color) !important;
}

html[data-theme="dark"] .header.scrolled,
body[data-theme="dark"] .header.scrolled {
  background: rgba(30, 30, 30, 0.98) !important;
  box-shadow: var(--shadow-lg) !important;
}

html[data-theme="dark"] .body-background,
body[data-theme="dark"] .body-background {
  background: var(--background) !important; /* Solid VSCode dark background */
}

html[data-theme="dark"] .content-container,
body[data-theme="dark"] .content-container {
  background: var(--background) !important; /* Solid VSCode dark background */
}

html[data-theme="dark"] body,
body[data-theme="dark"] body {
  background: var(--background) !important; /* Ensure body is dark */
}

html[data-theme="dark"] html,
body[data-theme="dark"] html {
  background: var(--background) !important; /* Ensure html is dark */
}

/* Force specific background elements to be dark in dark mode */
html[data-theme="dark"] .profile-container,
body[data-theme="dark"] .profile-container,
html[data-theme="dark"] .section,
body[data-theme="dark"] .section {
  background-color: transparent !important;
}

html[data-theme="dark"] body,
body[data-theme="dark"] body,
html[data-theme="dark"] html,
body[data-theme="dark"] html {
  background: var(--background) !important;
}

html[data-theme="dark"] .body-background,
body[data-theme="dark"] .body-background,
html[data-theme="dark"] .content-container,
body[data-theme="dark"] .content-container {
  background: transparent !important; /* Let particles show through */
}

/* Ensure particles container is transparent so particles are visible */
html[data-theme="dark"] #particles-js,
body[data-theme="dark"] #particles-js {
  background: transparent !important; /* Let particles show through */
}

html[data-theme="dark"] .scholar-metrics,
body[data-theme="dark"] .scholar-metrics {
  background: transparent !important;
  border: none !important;
}



html[data-theme="dark"] .social-links a,
body[data-theme="dark"] .social-links a {
  background: transparent !important;
  border: none !important;
  color: var(--text-secondary) !important;
}

html[data-theme="dark"] .social-links a:hover,
body[data-theme="dark"] .social-links a:hover {
  background: var(--primary-color) !important;
  color: white !important;
  border: none !important;
}

/* VSCode Python Syntax Highlighting for Dark Mode */
html[data-theme="dark"] h1,
body[data-theme="dark"] h1 {
  color: var(--text-function) !important; /* Yellow like Python functions */
  font-family: 'JetBrains Mono', 'Consolas', 'Monaco', monospace !important;
}

html[data-theme="dark"] h2,
body[data-theme="dark"] h2 {
  color: var(--text-class) !important; /* Cyan like Python classes */
  font-family: 'JetBrains Mono', 'Consolas', 'Monaco', monospace !important;
}

html[data-theme="dark"] h3,
body[data-theme="dark"] h3 {
  color: var(--text-secondary) !important; /* Blue like Python keywords */
  font-family: 'JetBrains Mono', 'Consolas', 'Monaco', monospace !important;
}

html[data-theme="dark"] p,
body[data-theme="dark"] p {
  color: var(--text-primary) !important; /* Default text color */
  font-family: 'JetBrains Mono', 'Consolas', 'Monaco', monospace !important;
}

html[data-theme="dark"] a,
body[data-theme="dark"] a {
  color: var(--text-secondary) !important; /* Blue like Python keywords */
  font-family: 'JetBrains Mono', 'Consolas', 'Monaco', monospace !important;
}

html[data-theme="dark"] a:hover,
body[data-theme="dark"] a:hover {
  color: var(--text-accent) !important; /* Orange like Python strings */
}

html[data-theme="dark"] .brand,
body[data-theme="dark"] .brand {
  color: var(--text-function) !important; /* Yellow like Python functions */
  font-family: 'JetBrains Mono', 'Consolas', 'Monaco', monospace !important;
  font-weight: bold !important;
}

html[data-theme="dark"] nav a,
body[data-theme="dark"] nav a {
  color: var(--text-primary) !important;
  font-family: 'JetBrains Mono', 'Consolas', 'Monaco', monospace !important;
}

html[data-theme="dark"] nav a:hover,
body[data-theme="dark"] nav a:hover {
  color: var(--text-secondary) !important; /* Blue like Python keywords */
}

html[data-theme="dark"] .scholar-metrics,
body[data-theme="dark"] .scholar-metrics {
  color: var(--text-number) !important; /* Light green like Python numbers */
  font-family: 'JetBrains Mono', 'Consolas', 'Monaco', monospace !important;
}

html[data-theme="dark"] .news-list li,
body[data-theme="dark"] .news-list li {
  color: var(--text-primary) !important;
  font-family: 'JetBrains Mono', 'Consolas', 'Monaco', monospace !important;
}

html[data-theme="dark"] .research-description,
body[data-theme="dark"] .research-description {
  color: var(--text-muted) !important; /* Green like Python comments */
  font-family: 'JetBrains Mono', 'Consolas', 'Monaco', monospace !important;
}

html[data-theme="dark"] .experience-list li,
body[data-theme="dark"] .experience-list li {
  color: var(--text-primary) !important;
  font-family: 'JetBrains Mono', 'Consolas', 'Monaco', monospace !important;
}

html[data-theme="dark"] .education-list li,
body[data-theme="dark"] .education-list li {
  color: var(--text-primary) !important;
  font-family: 'JetBrains Mono', 'Consolas', 'Monaco', monospace !important;
}

/* VSCode-style code blocks - transparent like code */
html[data-theme="dark"] .paper-info,
body[data-theme="dark"] .paper-info {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 16px 0 !important;
  margin: 16px 0 !important;
  font-family: 'JetBrains Mono', 'Consolas', 'Monaco', monospace !important;
}

html[data-theme="dark"] .paper-info h3,
body[data-theme="dark"] .paper-info h3 {
  color: var(--text-class) !important; /* Cyan like Python classes */
}

html[data-theme="dark"] .paper-info .authors,
body[data-theme="dark"] .paper-info .authors {
  color: var(--text-secondary) !important; /* Blue like Python keywords */
}

html[data-theme="dark"] .paper-info .venue,
body[data-theme="dark"] .paper-info .venue {
  color: var(--text-accent) !important; /* Orange like Python strings */
}

/* More Python syntax highlighting for research page */
html[data-theme="dark"] .paper-info .date,
body[data-theme="dark"] .paper-info .date {
  color: var(--text-muted) !important; /* Green like Python comments */
  font-style: italic !important;
}

html[data-theme="dark"] .paper-info .code-link,
body[data-theme="dark"] .paper-info .code-link {
  color: var(--text-function) !important; /* Yellow like Python functions */
  font-weight: bold !important;
}

html[data-theme="dark"] .paper-info .paper-description,
body[data-theme="dark"] .paper-info .paper-description {
  color: var(--text-primary) !important; /* Default text */
  font-style: normal !important;
}

/* Research page specific elements */
html[data-theme="dark"] .research-page h1,
body[data-theme="dark"] .research-page h1 {
  color: var(--text-function) !important; /* Yellow like Python functions */
  text-align: center !important;
  margin-bottom: 2rem !important;
}

html[data-theme="dark"] .research-page .research-intro,
body[data-theme="dark"] .research-page .research-intro {
  color: var(--text-primary) !important;
  text-align: center !important;
  margin-bottom: 2rem !important;
  font-size: 1.1rem !important;
}

/* Light mode highlights - just bold */
.research-page .research-intro .highlight,
.paper-info .paper-description .highlight {
  font-weight: bold !important;
  color: inherit !important;
  background: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
}

/* Dark mode highlights - colored with background */
html[data-theme="dark"] .research-page .research-intro .highlight,
body[data-theme="dark"] .research-page .research-intro .highlight,
html[data-theme="dark"] .paper-info .paper-description .highlight,
body[data-theme="dark"] .paper-info .paper-description .highlight {
  color: var(--text-accent) !important; /* Orange like Python strings - more readable */
  font-weight: bold !important;
  background: rgba(206, 145, 120, 0.1) !important; /* Light orange background */
  padding: 2px 4px !important;
  border-radius: 3px !important;
}

html[data-theme="dark"] .research-page .research-intro .number,
body[data-theme="dark"] .research-page .research-intro .number {
  color: var(--text-number) !important; /* Light green like Python numbers */
  font-weight: bold !important;
}

/* Dark mode support for system preference */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --primary-color: #007acc;
    --primary-hover: #005a9e;
    --secondary-color: #858585;
    --accent-color: #ffa500;
    --text-primary: #cccccc;
    --text-secondary: #858585;
    --text-muted: #6a6a6a;
    --background: #1e1e1e;
    --background-secondary: #252526;
    --border-color: #3c3c3c;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3), 0 4px 6px -4px rgb(0 0 0 / 0.3);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.3), 0 10px 10px -5px rgb(0 0 0 / 0.3);
  }
  
  .header:not([data-theme="light"]) {
    background: rgba(30, 30, 30, 0.95);
    border-bottom-color: var(--border-color);
  }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}

/* Focus styles for keyboard navigation */
a:focus,
button:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --border-color: #000000;
    --text-secondary: #000000;
  }
}

/* Dark Mode Toggle Button */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1001;
  background: var(--background);
  border: 2px solid var(--border-color);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-md);
}

.theme-toggle:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-lg);
}

.theme-toggle:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.theme-toggle i {
  font-size: 1.2rem;
  color: var(--text-primary);
  transition: all var(--transition-normal);
}

.theme-toggle:hover i {
  color: var(--primary-color);
}

/* Theme transition animation - removed to fix dark mode toggle */

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--primary-color);
  color: white;
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 10000;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 6px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  /* Header adjustments */
  .header-content {
    padding: 10px 15px !important;
    flex-direction: column !important;
    gap: 10px !important;
    background: var(--background) !important;
  }
  
  .brand {
    font-size: 1.2rem !important;
    text-align: center !important;
    color: var(--text-primary) !important;
  }
  
  nav {
    display: flex !important;
    justify-content: center !important;
    gap: 15px !important;
    flex-wrap: wrap !important;
    margin-right: 50px !important; /* Space for theme toggle */
  }
  
  nav a {
    font-size: 0.9rem !important;
    color: var(--text-primary) !important;
    background: transparent !important;
    padding: 8px 12px !important;
  }
  
  /* Content adjustments */
  .content-container {
    padding: 20px 15px !important;
    max-width: 100% !important;
  }
  
  /* Profile section */
  .profile-container {
    flex-direction: column !important;
    text-align: center !important;
    gap: 20px !important;
  }
  
  .profile-container img {
    width: 150px !important;
    height: 150px !important;
    margin: 0 auto !important;
  }
  
  /* Typography adjustments */
  h1 {
    font-size: 2rem !important;
    line-height: 1.2 !important;
  }
  
  h2 {
    font-size: 1.5rem !important;
  }
  
  h3 {
    font-size: 1.2rem !important;
  }
  
  p {
    font-size: 0.9rem !important;
    line-height: 1.5 !important;
  }
  
  /* Social links */
  .social-links {
    justify-content: center !important;
    gap: 15px !important;
  }
  
  .social-links a {
    width: 40px !important;
    height: 40px !important;
    font-size: 1.2rem !important;
  }
  
  /* Scholar metrics */
  .scholar-metrics {
    font-size: 0.9rem !important;
    padding: 12px !important;
    text-align: center !important;
  }
  
  /* Research page specific */
  .paper-info {
    flex-direction: column !important;
    text-align: center !important;
    gap: 15px !important;
  }
  
  .paper-info img {
    width: 120px !important;
    height: 120px !important;
    margin: 0 auto !important;
    display: block !important;
  }
  
  .paper-info td:first-child {
    text-align: center !important;
    width: auto !important;
  }
  
  .paper-title {
    font-size: 1.1rem !important;
    line-height: 1.3 !important;
  }
  
  .authors {
    font-size: 0.9rem !important;
  }
  
  .venue {
    font-size: 0.85rem !important;
  }
  
  .paper-description {
    font-size: 0.85rem !important;
    line-height: 1.4 !important;
  }
  
  /* Theme toggle */
  .theme-toggle {
    position: fixed !important;
    top: 15px !important;
    right: 15px !important;
    z-index: 1001 !important;
    width: 40px !important;
    height: 40px !important;
    background: var(--background-secondary) !important;
    border: 1px solid var(--border-color) !important;
  }
}

/* Small mobile devices */
@media (max-width: 480px) {
  .content-container {
    padding: 15px 10px !important;
  }
  
  .brand {
    font-size: 1rem !important;
  }
  
  nav a {
    font-size: 0.9rem !important;
    padding: 6px 10px !important;
  }
  
  h1 {
    font-size: 1.8rem !important;
  }
  
  .profile-container img {
    width: 120px !important;
    height: 120px !important;
  }
  
  .social-links a {
    width: 35px !important;
    height: 35px !important;
    font-size: 1rem !important;
  }
  
  .scholar-metrics {
    font-size: 0.8rem !important;
    padding: 10px !important;
  }
  
  .paper-info img {
    width: 100px !important;
    height: 100px !important;
    margin: 0 auto !important;
    display: block !important;
  }
  
  .paper-info td:first-child {
    text-align: center !important;
    width: auto !important;
  }
  
  .paper-title {
    font-size: 1rem !important;
  }
  
  .authors {
    font-size: 0.8rem !important;
  }
  
  .venue {
    font-size: 0.75rem !important;
  }
  
  .paper-description {
    font-size: 0.8rem !important;
  }
}


