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

:root {
  --primary-color: #2c3e50;
  --secondary-color: #3498db;
  --accent-color: #e74c3c;
  --text-color: #333;
  --text-light: #666;
  --bg-color: #ffffff;
  --bg-light: #f8f9fa;
  --border-color: #dee2e6;
  --max-width: 1200px;
  --spacing: 2rem;
}

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);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  margin-bottom: 1rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--primary-color);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; margin-top: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p { margin-bottom: 1rem; }

a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

/* Header */
.site-header {
  background-color: var(--primary-color);
  color: white;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
}

.site-title:hover {
  color: var(--secondary-color);
}

.site-nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.site-nav a {
  color: white;
  font-weight: 500;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.3s ease;
}

.site-nav a:hover {
  color: white;
  border-bottom-color: var(--secondary-color);
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-menu-toggle span {
  width: 25px;
  height: 3px;
  background-color: white;
  transition: all 0.3s ease;
}

/* Main Content */
.main-content {
  min-height: calc(100vh - 400px);
  padding: var(--spacing) 0;
}

/* Home Hero */
.home-hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  padding: 4rem 0;
  text-align: center;
  margin-bottom: 3rem;
}

.hero-content h1 {
  color: white;
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero-content .lead {
  font-size: 1.25rem;
  max-width: 800px;
  margin: 0 auto 2rem;
  opacity: 0.9;
}

.hero-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: white;
  color: var(--primary-color);
  border-radius: 4px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 2px solid white;
}

.btn:hover {
  background-color: transparent;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Home Sections */
.home-section {
  margin-bottom: 4rem;
}

.home-section h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--secondary-color);
}

/* About Section */
.about-content {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2rem;
  align-items: start;
}

.profile-photo {
  width: 100%;
  border-radius: 50%;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.about-text p {
  margin-bottom: 1rem;
}

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

.publication-item {
  padding: 1.5rem;
  background-color: var(--bg-light);
  border-left: 4px solid var(--secondary-color);
  border-radius: 4px;
}

.publication-item h3 {
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}

.publication-item h3 a {
  color: var(--primary-color);
}

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

.publication-abstract {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* Publication Page */
.publication-page {
  max-width: 900px;
  margin: 0 auto;
}

.publication-header {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid var(--border-color);
}

.publication-header h1 {
  margin-bottom: 1rem;
}

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

.publication-abstract,
.publication-content,
.publication-citation {
  margin-bottom: 2rem;
}

.publication-citation pre {
  background-color: var(--bg-light);
  padding: 1rem;
  border-radius: 4px;
  overflow-x: auto;
}

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.project-card {
  background-color: var(--bg-light);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

.project-card h3 {
  padding: 1rem 1rem 0.5rem;
  font-size: 1.25rem;
}

.project-card p {
  padding: 0 1rem 1rem;
  color: var(--text-light);
}

/* Project Page */
.project-page {
  max-width: 900px;
  margin: 0 auto;
}

.project-hero-image {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 8px;
  margin: 1rem 0;
}

.project-status {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background-color: var(--secondary-color);
  color: white;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.project-collaborators ul,
.project-publications ul {
  margin-left: 1.5rem;
}

/* Blog Posts */
.posts-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.post-item {
  padding: 1.5rem;
  background-color: var(--bg-light);
  border-radius: 4px;
  transition: box-shadow 0.3s ease;
}

.post-item:hover {
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.post-item h3 {
  margin-bottom: 0.5rem;
}

.post-meta {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.post-date {
  color: var(--text-light);
  font-size: 0.9rem;
}

/* Post Page */
.post {
  max-width: 800px;
  margin: 0 auto;
}

.post-content {
  margin: 2rem 0;
}

.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 1rem 0;
}

.post-content pre {
  background-color: var(--bg-light);
  padding: 1rem;
  border-radius: 4px;
  overflow-x: auto;
}

.post-tags {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background-color: var(--bg-light);
  border-radius: 20px;
  font-size: 0.85rem;
  margin-right: 0.5rem;
}

.related-posts {
  margin-top: 3rem;
  padding: 2rem;
  background-color: var(--bg-light);
  border-radius: 8px;
}

.related-posts ul {
  list-style: none;
}

.related-posts li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

.related-posts li:last-child {
  border-bottom: none;
}

/* View All Links */
.view-all {
  text-align: center;
  margin-top: 2rem;
  font-size: 1.1rem;
  font-weight: 600;
}

/* Footer */
.site-footer {
  background-color: var(--primary-color);
  color: white;
  padding: 3rem 0 1rem;
  margin-top: 4rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  color: white;
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.footer-section p {
  opacity: 0.9;
}

.footer-section ul {
  list-style: none;
}

.footer-section li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: white;
  opacity: 0.9;
  transition: opacity 0.3s ease;
}

.footer-section a:hover {
  opacity: 1;
  color: var(--secondary-color);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  opacity: 0.8;
}

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

/* Responsive Design */
@media (max-width: 768px) {
  :root {
    --spacing: 1rem;
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--primary-color);
    padding: 1rem 0;
  }
  
  .site-nav.active {
    display: block;
  }
  
  .site-nav ul {
    flex-direction: column;
    gap: 0;
  }
  
  .site-nav li {
    text-align: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  
  .hero-content h1 {
    font-size: 2rem;
  }
  
  .about-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .profile-photo {
    max-width: 200px;
    margin: 0 auto;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
  }
  
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
}

@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 1.75rem;
  }
  
  .hero-content .lead {
    font-size: 1rem;
  }
  
  .btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }
}
