/* CSS Variables for theming */
:root {
  --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --text-primary: #2d3748;
  --text-secondary: #4a5568;
  --text-accent: #667eea;
  --bg-glass: rgba(255, 255, 255, 0.95);
  --bg-section: rgba(255, 255, 255, 0.7);
  --bg-card: rgba(255, 255, 255, 0.9);
  --border-glass: rgba(255, 255, 255, 0.3);
  --shadow-light: rgba(0, 0, 0, 0.1);
  --shadow-medium: rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] {
  --bg-gradient: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
  --text-primary: #f7fafc;
  --text-secondary: #e2e8f0;
  --text-accent: #90cdf4;
  --bg-glass: rgba(26, 32, 44, 0.95);
  --bg-section: rgba(45, 55, 72, 0.8);
  --bg-card: rgba(45, 55, 72, 0.9);
  --border-glass: rgba(255, 255, 255, 0.1);
  --shadow-light: rgba(0, 0, 0, 0.3);
  --shadow-medium: rgba(0, 0, 0, 0.4);
}

/* Base styles */
body {
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', sans-serif;
  line-height: 1.7;
  color: var(--text-primary);
  margin: 0;
  padding: 0;
  background: var(--bg-gradient);
  background-attachment: fixed;
  min-height: 100vh;
  animation: fadeIn 0.8s ease-in;
  transition: all 0.3s ease;
}

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Main content wrapper */
main.container {
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  margin: 2rem auto;
  padding: 3rem;
  box-shadow: 0 25px 50px var(--shadow-medium);
  max-width: 1000px;
  border: 1px solid var(--border-glass);
}

/* Header styles */
.site-header {
  background: var(--bg-glass);
  backdrop-filter: blur(15px);
  box-shadow: 0 8px 32px var(--shadow-light);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border-glass);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
}

.navbar-brand a {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
  font-weight: 800;
}

.navbar-menu {
  display: flex;
}

.navbar-end {
  display: flex;
  align-items: center;
}

.navbar-item {
  color: #4a5568;
  text-decoration: none;
  margin-left: 2rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
}

.navbar-item:hover {
  color: var(--text-accent);
  background: rgba(102, 126, 234, 0.1);
  transform: translateY(-1px);
}

/* Theme toggle */
.theme-toggle {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  margin-left: 1rem;
}

.theme-toggle:hover {
  color: var(--text-accent);
  background: rgba(102, 126, 234, 0.1);
}

/* Main content styles */
.page-content {
  padding: 2rem 0;
}

.wrapper {
  max-width: 900px;
  margin: 0 auto;
}

/* Footer styles */
.site-footer {
  background-color: #24292e;
  color: #fff;
  padding: 2rem 0;
  margin-top: 3rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

.footer-col {
  flex: 1;
  min-width: 200px;
  margin-bottom: 1.5rem;
}

.footer-col h3 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: #fff;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  color: #fff;
  font-size: 1.5rem;
  transition: color 0.3s ease;
}

.social-links a:hover {
  color: #58a6ff;
}

.copyright {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.9rem;
  color: #8b949e;
}

/* Hero section */
.hero-section {
  text-align: center;
  margin: 2rem 0 4rem 0;
  padding: 2rem 0;
}

.hero-name {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 900;
  line-height: 1.1;
  animation: slideInUp 1s ease-out;
}

.hero-title {
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--text-accent);
  margin-bottom: 0;
  animation: slideInUp 1s ease-out 0.2s both;
}

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

/* Profile section */
.profile-section {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 3rem;
  margin: 4rem 0;
  padding: 0;
}

.profile-image-container {
  flex: 0 0 300px;
  text-align: center;
}

.profile-image {
  margin-bottom: 2rem;
}

.profile-image img {
  width: 250px;
  height: 250px;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 20px 40px var(--shadow-medium);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 4px solid var(--border-glass);
}

.profile-image img:hover {
  transform: translateY(-8px);
  box-shadow: 0 30px 60px var(--shadow-medium);
}

/* Social links */
.social-links-container {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  background: var(--bg-card);
  color: var(--text-secondary);
  border-radius: 12px;
  text-decoration: none;
  font-size: 1.2rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px var(--shadow-light);
  border: 1px solid var(--border-glass);
}

.social-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
  color: var(--text-accent);
  background: var(--bg-glass);
}

.profile-content {
  flex: 1;
  min-width: 350px;
}

.about-title {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

/* Research interests tags */
.research-interests {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1rem;
}

.interest-tag {
  background: var(--bg-card);
  color: var(--text-secondary);
  padding: 0.6rem 1.2rem;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid var(--border-glass);
  transition: all 0.3s ease;
  cursor: default;
}

.interest-tag:hover {
  background: var(--text-accent);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

/* Education items */
.education-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.education-item {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  background: var(--bg-card);
  padding: 2rem;
  border-radius: 16px;
  border: 1px solid var(--border-glass);
  box-shadow: 0 8px 25px var(--shadow-light);
  transition: all 0.3s ease;
}

.education-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 40px rgba(102, 126, 234, 0.2);
}

.education-logo {
  flex: 0 0 80px;
}

.edu-logo {
  width: 80px;
  height: auto;
  max-height: 60px;
  object-fit: contain;
  border-radius: 8px;
}

.education-content h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1.2rem;
  color: var(--text-primary);
  font-weight: 600;
}

.education-content p {
  margin: 0.3rem 0;
  color: var(--text-secondary);
}

.advisors {
  font-style: italic;
  font-size: 0.9rem;
  color: var(--text-accent);
}

/* Section styles */
.section {
  margin: 4rem 0;
  padding: 2.5rem;
  background: var(--bg-section);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-glass);
  box-shadow: 0 8px 32px var(--shadow-light);
}

.section-title {
  font-size: 2.2rem;
  margin-bottom: 2rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
  position: relative;
  padding-bottom: 1rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 4px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 2px;
}

/* Enhanced lists */
.section ul {
  list-style: none;
  padding: 0;
}

.section li {
  background: rgba(255, 255, 255, 0.8);
  margin: 1rem 0;
  padding: 1.2rem 1.5rem;
  border-radius: 12px;
  border-left: 4px solid #667eea;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  position: relative;
}

.section li:hover {
  transform: translateX(8px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
  border-left-color: #764ba2;
}

.section li::before {
  content: '▶';
  color: #667eea;
  font-size: 0.8rem;
  margin-right: 0.8rem;
}

/* Project cards */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2.5rem;
}

.project-card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.4s ease;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.project-card-image {
  height: 200px;
  overflow: hidden;
}

.project-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-card-content {
  padding: 1.5rem;
}

.project-card-title {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: #24292e;
}

.project-card-description {
  color: #586069;
  margin-bottom: 1rem;
}

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

.project-tag {
  background-color: #f1f8ff;
  color: #0366d6;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
}

/* News items */
.news-list {
  list-style: none;
  padding: 0;
}

.news-item {
  background-color: #fff;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.news-date {
  color: #586069;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.news-title {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: #24292e;
}

/* Publications */
.publication-list {
  list-style: none;
  padding: 0;
}

.publication-item {
  background-color: #fff;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.publication-title {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: #24292e;
}

.publication-authors {
  color: #586069;
  margin-bottom: 0.5rem;
}

.publication-venue {
  font-style: italic;
  color: #586069;
  margin-bottom: 0.5rem;
}

.publication-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.publication-link {
  color: #0366d6;
  text-decoration: none;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.publication-link:hover {
  text-decoration: underline;
}

/* Enhanced button styles */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-decoration: none;
  border-radius: 10px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
  color: white;
}

/* Enhanced publication cards */
.publication-item {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  border-left: 4px solid #667eea;
  transition: all 0.3s ease;
}

.publication-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 35px rgba(102, 126, 234, 0.15);
}

.publication-title {
  font-size: 1.3rem;
  margin-bottom: 0.8rem;
  color: #2d3748;
  font-weight: 600;
  line-height: 1.4;
}

/* Responsive styles */
@media (max-width: 768px) {
  body {
    font-size: 0.9rem;
  }
  
  main.container {
    margin: 1rem;
    padding: 2rem;
    border-radius: 15px;
  }
  
  .navbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .navbar-end {
    margin-top: 1rem;
    flex-wrap: wrap;
  }
  
  .navbar-item {
    margin-left: 0;
    margin-right: 1rem;
    margin-bottom: 0.5rem;
  }
  
  .profile-section {
    flex-direction: column;
    text-align: center;
  }
  
  .profile-image {
    margin: 0 auto;
  }
}
