
/* Default section background for light theme */
:root {
  --section-bg: #fafafa;
}

/* Typography for scientific content */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  /* Always use the Bootstrap/quarto-aware body variables. These are updated above
     based on the active data-bs-theme attribute, so dark/light switching works. */
  color: var(--bs-body-color);
  background-color: var(--bs-body-bg);
}

/* Make sure the root/html element also reflects the variables so full-page backgrounds
   and elements that read from html inherit the active theme color. */
html {
  color: var(--bs-body-color);
  background-color: var(--bs-body-bg);
}

/* Code blocks - nice styling */
pre {
  background-color: #f8f9fa;
  border-radius: 6px;
  padding: 1rem;
  overflow-x: auto;
  border-left: 4px solid var(--secondary-color);
}

[data-bs-theme="dark"] pre {
  background-color: #2d2d2d;
  color: #f8f8f2;
}

code {
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
}

/* Math rendering */
.math {
  font-style: italic;
}

/* Blog post cards */
.post-card {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: box-shadow 0.3s;
}

.post-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

[data-bs-theme="dark"] .post-card {
  border-color: #444;
  background-color: #2d2d2d;
}

/* Tags */
.tag {
  display: inline-block;
  background-color: var(--secondary-color);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85em;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  cursor: pointer;
  transition: opacity 0.3s;
}

.tag:hover {
  opacity: 0.8;
} */


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

a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
  body {
    font-size: 0.95em;
  }

  pre {
    padding: 0.75rem;
    font-size: 0.85em;
  }
}

/* Light/Dark mode toggle button positioning */
.quarto-navbar-tools {
  margin-left: auto;
}

/* Blog tag filtering */
.tag-filters {
  margin: 1rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-filter {
  background-color: var(--secondary-color);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9em;
}

.tag-filter:hover {
  background-color: var(--primary-color);
  transform: translateY(-2px);
}

.tag-filter.active {
  background-color: var(--primary-color);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Blog post cards */
.blog-post {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
  background-color: var(--section-bg);
}

[data-bs-theme="dark"] .blog-post {
  background-color: var(--section-bg);
  border-color: var(--border-color);
}

.blog-post:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.blog-post h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.blog-post h3 a {
  color: var(--primary-color);
  text-decoration: none;
}

.blog-post h3 a:hover {
  text-decoration: underline;
}

.post-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  font-size: 0.9em;
  color: #666;
}

[data-bs-theme="dark"] .post-meta {
  color: #aaa;
}

.post-meta .tags {
  font-style: italic;
}

/* Blog posts container */
.blog-posts-container {
  max-height: 70vh;
  overflow-y: auto;
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--section-bg);
}

.blog-posts-container h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.blog-posts-container h3 a {
  color: var(--primary-color);
  text-decoration: none;
}

.blog-posts-container h3 a:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

.blog-posts-container hr {
  margin: 1.5rem 0;
  border: none;
  border-top: 1px solid var(--border-color);
}

/* Responsive tag filters */
@media (max-width: 768px) {
  .tag-filters {
    justify-content: center;
  }
  
  .tag-filter {
    font-size: 0.8em;
    padding: 0.4rem 0.8rem;
  }
  
  .blog-posts-container {
    max-height: 60vh;
  }
}

/* Hero page layout */
.hero-container {
  display: flex;
  gap: 3rem;
  align-items: flex-start;
  min-height: 80vh;
  padding: 2rem 0;
}

.hero-left {
  flex: 1;
  max-width: 50%;
}

.hero-right {
  flex: 1;
  max-width: 50%;
}

.profile-section {
  text-align: center;
  margin-bottom: 2rem;
}

.profile-photo {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--secondary-color);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  margin-bottom: 1rem;
  transition: transform 0.3s ease;
}

.profile-photo:hover {
  transform: scale(1.05);
}

.profile-section h1 {
  color: var(--primary-color);
  margin: 0.5rem 0;
  font-size: 2.5rem;
}

.profile-section h2 {
  color: var(--secondary-color);
  margin: 0.5rem 0 1rem 0;
  font-size: 1.3rem;
  font-weight: 400;
}

.welcome-section {
  background: var(--bs-body-bg);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.welcome-section h3 {
  color: var(--primary-color);
  margin-top: 0;
  margin-bottom: 1rem;
}

.welcome-section p {
  line-height: 1.6;
  margin: 0;
}

.quick-links, .social-links, .latest-blog {
  background: var(--section-bg);
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-bottom: 1.5rem;
}

.quick-links h3, .social-links h3, .latest-blog h3 {
  color: var(--primary-color);
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.quick-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.quick-links li {
  margin-bottom: 0.8rem;
}

.quick-links a {
  display: flex;
  align-items: center;
  padding: 0.8rem;
  background: var(--bg-light);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-light);
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
}


.social-icons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: var(--secondary-color);
  color: white;
  border-radius: 50%;
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 1.2rem;
}

.social-icons a:hover {
  background: var(--primary-color);
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.blog-preview {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

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

.blog-preview a {
  text-decoration: none;
  color: var(--text-light);
}

[data-bs-theme="dark"] .blog-preview a {
  color: var(--bs-body-color);
}

.blog-preview h4 {
  color: var(--primary-color);
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
}

.blog-preview p {
  margin: 0;
  font-size: 0.9rem;
  color: #666;
  line-height: 1.4;
}

[data-bs-theme="dark"] .blog-preview p {
  color: var(--muted);
}

.blog-preview a:hover h4 {
  color: var(--secondary-color);
}

.latest-blog p:last-child {
  text-align: center;
  margin-top: 1rem;
}

.latest-blog p:last-child a {
  color: var(--secondary-color);
  font-weight: 500;
}

/* Theme bottom styling - fix for light and dark modes */
.quarto-title-block {
  border-bottom: none !important;
}

.quarto-title-block h1,
.quarto-title-block h2,
.quarto-title-block h3 {
  border-bottom: none !important;
  text-decoration: none !important;
}

/* Ensure proper theme bottom behavior */
[data-bs-theme="light"] .quarto-title-block {
  background: linear-gradient(to bottom, transparent, rgba(52, 152, 219, 0.05));
  border-bottom: 2px solid var(--secondary-color);
  padding-bottom: 1rem;
  margin-bottom: 2rem;
}

[data-bs-theme="dark"] .quarto-title-block {
  background: linear-gradient(to bottom, transparent, rgba(52, 152, 219, 0.1));
  border-bottom: 2px solid var(--secondary-color);
  padding-bottom: 1rem;
  margin-bottom: 2rem;
}

/* Fix any Bootstrap theme conflicts */
.bslib-page-title {
  border-bottom: none !important;
}

.bslib-page-title h1,
.bslib-page-title h2,
.bslib-page-title h3 {
  border-bottom: none !important;
  text-decoration: none !important;
}

/* Override any theme bottom underlines */
.quarto-title-block::after {
  display: none !important;
}

/* Responsive design for hero layout */
@media (max-width: 1024px) {
  .hero-container {
    flex-direction: column;
    gap: 2rem;
  }
  
  .hero-left, .hero-right {
    max-width: 100%;
  }
  
  .profile-photo {
    width: 150px;
    height: 150px;
  }
  
  .profile-section h1 {
    font-size: 2rem;
  }
}

@media (max-width: 768px) {
  .hero-container {
    padding: 1rem 0;
  }
  
  .welcome-section, .quick-links, .social-links, .latest-blog {
    padding: 1rem;
  }
  
  .social-icons {
    gap: 0.5rem;
  }
  
  .social-icons a {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
}