/* CSS Variables for theme colors */
:root {
  --bg-color: #ffffff;
  --text-color: #333333;
  --text-muted: #666666;
  --accent-color: #2563eb;
  --accent-hover: #1d4ed8;
  --border-color: #e5e7eb;
  --shadow-color: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
  --bg-color: #1a1a1a;
  --text-color: #e5e5e5;
  --text-muted: #a3a3a3;
  --accent-color: #60a5fa;
  --accent-hover: #3b82f6;
  --border-color: #374151;
  --shadow-color: rgba(0, 0, 0, 0.3);
}

/* Reset and base styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
  transition: background-color 0.3s ease, color 0.3s ease;
  margin: 0;
  padding-top: 80px; /* Account for fixed navbar */
}

/* Container */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  max-width: 1200px;
}

.nav-brand a {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-color);
  text-decoration: none;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

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

.nav-link.active {
  color: var(--accent-color);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--accent-color);
}

/* Hero Section */
.hero {
  padding: 2rem 0;
  text-align: left;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.hero .title {
  font-size: 1.3rem;
  color: var(--accent-color);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.hero .subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* Page Header */
.page-header {
  padding: 2rem 0;
  text-align: left;
}

.page-header h1 {
  font-size: 2.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.page-header p {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

#theme-toggle {
  background: none;
  border: none;
  width: 36px;
  height: 36px;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  color: var(--text-color);
}

#theme-toggle:hover {
  transform: scale(1.05);
}

/* Main content */
main {
  padding-bottom: 4rem;
}

section {
  margin-bottom: 3rem;
}

section h2 {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.5rem;
}

section p {
  margin-bottom: 1rem;
  font-size: 1rem;
  line-height: 1.7;
}

/* Publications */
.publication-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.publication {
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background-color: var(--bg-color);
  box-shadow: 0 2px 4px var(--shadow-color);
}

.publication h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.publication .authors {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.publication .venue {
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.publication .publisher {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* Projects */
.project-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.project {
  padding: 1.5rem;
  border-left: 4px solid var(--accent-color);
  background-color: var(--bg-color);
}

.project h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--accent-color);
}

.project p {
  margin-bottom: 0.5rem;
}

/* Links */
a {
  color: var(--accent-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

/* Experience Timeline */
.experience-timeline {
  margin-top: 2rem;
}

.experience-item {
  margin-bottom: 3rem;
  padding: 2rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background-color: var(--bg-color);
}

.experience-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.experience-header h2 {
  font-size: 1.5rem;
  margin: 0;
  color: var(--accent-color);
}

.location {
  color: var(--text-muted);
  font-style: italic;
  margin: 0;
}

.position {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

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

.position h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.duration {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.achievements {
  list-style: none;
  padding: 0;
}

.achievements li {
  margin-bottom: 0.75rem;
  padding-left: 1rem;
  position: relative;
}

.achievements li::before {
  content: '▶';
  position: absolute;
  left: 0;
  color: var(--accent-color);
  font-size: 0.8rem;
}

/* Key Projects Grid */
.key-projects {
  margin-top: 3rem;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.key-project {
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background-color: var(--bg-color);
}

.key-project h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  color: var(--accent-color);
}

/* Publication Styles */
.publication-category {
  margin-bottom: 3rem;
}

.publication-category h2 {
  color: var(--accent-color);
  border-bottom: 2px solid var(--accent-color);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

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

.publication-link {
  display: inline-block;
  margin-right: 1rem;
  margin-bottom: 0.5rem;
  padding: 0.25rem 0.75rem;
  background-color: var(--border-color);
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
}

.publication-link:hover {
  background-color: var(--accent-color);
  color: white;
  text-decoration: none;
}

/* Research Interests */
.interests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.interest-area {
  padding: 1.5rem;
  border-left: 4px solid var(--accent-color);
  background-color: var(--bg-color);
}

.interest-area h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  color: var(--accent-color);
}

/* Academic Activities */
.recognition-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 1.5rem;
}

.recognition-item {
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.recognition-item h3 {
  color: var(--accent-color);
  margin-bottom: 1rem;
}

.recognition-item ul {
  list-style: none;
  padding: 0;
}

.recognition-item li {
  margin-bottom: 0.5rem;
  padding-left: 1rem;
  position: relative;
}

.recognition-item li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--accent-color);
}

/* Project Categories */
.project-categories {
  margin-top: 2rem;
}

.project-category {
  margin-bottom: 3rem;
}

.project-category h2 {
  color: var(--accent-color);
  border-bottom: 2px solid var(--accent-color);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

.project.featured {
  border-left: 4px solid var(--accent-color);
  background: linear-gradient(90deg, var(--accent-color)05, transparent);
}

.project-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  font-style: italic;
}

.tech-stack {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tech-tag {
  background-color: var(--border-color);
  color: var(--text-color);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
}

.project-link {
  display: inline-block;
  margin-right: 1rem;
  margin-bottom: 0.5rem;
  color: var(--accent-color);
  font-weight: 500;
}

/* Contact Page Styles */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.contact-section h2 {
  color: var(--accent-color);
  margin-bottom: 1rem;
}

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

.social-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-color);
  transition: all 0.3s ease;
}

.social-link:hover {
  border-color: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px var(--shadow-color);
  text-decoration: none;
}

.social-icon {
  font-size: 1.5rem;
}

.social-link strong {
  display: block;
  margin-bottom: 0.25rem;
}

.social-link p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.collaboration-areas,
.focus-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.collab-area,
.focus-item {
  padding: 1.5rem;
  border-left: 4px solid var(--accent-color);
  background-color: var(--bg-color);
}

.collab-area h3,
.focus-item h3 {
  color: var(--accent-color);
  margin-bottom: 0.75rem;
}

.facts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.fact {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.fact-icon {
  font-size: 1.5rem;
}

.fact strong {
  display: block;
  margin-bottom: 0.25rem;
}

.fact p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.response-note {
  background: linear-gradient(90deg, var(--accent-color)10, transparent);
  padding: 1.5rem;
  border-left: 4px solid var(--accent-color);
  border-radius: 8px;
  margin-top: 2rem;
}

.response-note h3 {
  color: var(--accent-color);
  margin-bottom: 1rem;
}

/* Highlights and achievements */
.highlights,
.achievements {
  margin-top: 2rem;
}

.highlights h3,
.achievements h3 {
  color: var(--accent-color);
  margin-bottom: 1rem;
}

.highlights ul,
.achievements ul {
  list-style: none;
  padding: 0;
}

.highlights li,
.achievements li {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
  position: relative;
}

.highlights li::before {
  content: '▶';
  position: absolute;
  left: 0;
  color: var(--accent-color);
}

.achievements li::before {
  content: attr(data-icon);
  position: absolute;
  left: 0;
  font-size: 1.1rem;
}

/* Education */
.education-item {
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.education-item h3 {
  color: var(--accent-color);
  margin-bottom: 0.5rem;
}

.degree {
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.duration {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

/* Skills Grid */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.skill-category {
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.skill-category h3 {
  color: var(--accent-color);
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

.skill-category p {
  margin: 0;
  line-height: 1.5;
}

/* Emphasize text */
strong {
  font-weight: 600;
  color: var(--text-color);
}

/* Footer */
footer {
  border-top: 1px solid var(--border-color);
  padding: 2rem 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }
  
  header {
    padding: 2rem 0 1.5rem;
  }
  
  header h1 {
    font-size: 2rem;
  }
  
  .subtitle {
    font-size: 1rem;
  }
  
  #theme-toggle {
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
  
  section h2 {
    font-size: 1.5rem;
  }
  
  .publication,
  .project {
    padding: 1rem;
  }
  
  section {
    margin-bottom: 2.5rem;
  }
}

@media (max-width: 480px) {
  header h1 {
    font-size: 1.8rem;
  }
  
  .subtitle {
    font-size: 0.95rem;
  }
  
  section h2 {
    font-size: 1.4rem;
  }
  
  .publication h3,
  .project h3 {
    font-size: 1.1rem;
  }
}