/* Navbar Logo Sizing */
.navbar-brand img,
.navbar-logo img,
#quarto-header .navbar-brand img {
  height: 90px !important;
  max-height: 90px !important;
  width: auto !important;
  object-fit: contain;
}

/* Responsive logo sizing for mobile */
@media (max-width: 768px) {
  /* Make logo span full width */
  .navbar-brand,
  #quarto-header .navbar-brand {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0.5rem 1rem !important;
  }
  
  .navbar-brand img,
  .navbar-logo img,
  #quarto-header .navbar-brand img {
    height: auto !important;
    max-height: 60px !important;
    width: 100% !important;
    max-width: 100% !important;
    object-fit: contain;
  }
  
  /* Hide navbar title on mobile */
  .navbar-title,
  #quarto-header .navbar-title,
  .navbar-brand .navbar-title {
    display: none !important;
  }
}

/* Navigation Bar Active Link Highlighting */
.navbar .nav-item .nav-link.active {
  background-color: #007bff !important;
  color: white !important;
  font-weight: 600;
  border-radius: 6px;
  padding: 8px 16px;
  margin: 0 4px;
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
  transform: translateY(-1px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar .nav-item .nav-link {
  color: #495057 !important;
  padding: 8px 16px;
  margin: 0 4px;
  border-radius: 6px;
  transition: all 0.2s ease;
  position: relative;
  text-decoration: none !important;
}

.navbar .nav-item .nav-link:hover {
  background-color: #f8f9fa;
  color: #007bff !important;
  transform: translateY(-1px);
}

/* Optional: Add subtle animation */
@keyframes activePulse {
  0% { box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3); }
  50% { box-shadow: 0 2px 12px rgba(0, 123, 255, 0.5); }
  100% { box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3); }
}

.navbar .nav-item .nav-link.active {
  animation: activePulse 2s ease-in-out infinite;
}

/* Responsive design for mobile
*/

/* Footer styling */
.site-footer {
  text-align: center;
  padding: 1rem 0;
  font-size: 0.9rem;
  color: #6c757d;
  border-top: 1px solid rgba(0,0,0,0.06);
  margin-top: 2rem;
}

.site-footer a { color: #0d6efd; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* Navbar auto-hide is now enabled - Headroom will handle show/hide on scroll */

/* ========================================
   TYPOGRAPHY & READABILITY IMPROVEMENTS
   ======================================== */

/* Better body text readability */
body {
  font-size: 1.1rem;
  line-height: 1.7;
  color: #212529 !important;
  background-color: #ffffff !important;
}

/* Improved heading hierarchy */
h1 {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  color: #1a1a1a !important;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.3;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: #2c3e50 !important;
  border-bottom: 2px solid #e9ecef;
  padding-bottom: 0.5rem;
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.4;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: #34495e !important;
}

h4 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.4;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: #34495e !important;
}

/* Better paragraph spacing */
p {
  margin-bottom: 1.5rem;
  max-width: 75ch; /* Optimal line length for reading */
  color: #212529 !important;
}

/* List improvements */
ul, ol {
  margin-bottom: 1.5rem;
  line-height: 1.8;
  color: #212529 !important;
}

li {
  margin-bottom: 0.5rem;
  color: #212529 !important;
}

/* Emphasis and strong text */
strong, b {
  font-weight: 700;
  color: #1a1a1a !important;
}

em, i {
  font-style: italic;
  color: #2c3e50 !important;
}

/* Blockquote styling */
blockquote {
  border-left: 4px solid #0d6efd;
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  font-size: 1.15rem;
  font-style: italic;
  color: #555;
  background-color: #f8f9fa;
  padding: 1rem 1.5rem;
  border-radius: 0 4px 4px 0;
}

/* Link improvements */
a {
  color: #0d6efd;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #0a58ca;
  text-decoration: underline;
}

/* Code and pre blocks */
code {
  background-color: #f8f9fa;
  padding: 0.2em 0.4em;
  border-radius: 3px;
  font-size: 0.9em;
  color: #d63384;
  font-family: 'Courier New', monospace;
}

pre {
  background-color: #f8f9fa;
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
  border-left: 3px solid #0d6efd;
  margin: 1.5rem 0;
}

/* Callout boxes enhancement */
.callout {
  padding: 1.25rem;
  margin: 1.5rem 0;
  border-radius: 6px;
  border-left: 4px solid;
}

.callout-note {
  background-color: #e7f3ff;
  border-left-color: #0d6efd;
}

.callout-tip {
  background-color: #d1f2eb;
  border-left-color: #198754;
}

.callout-warning {
  background-color: #fff3cd;
  border-left-color: #ffc107;
}

.callout-important {
  background-color: #f8d7da;
  border-left-color: #dc3545;
}

/* Section dividers */
hr {
  margin: 3rem 0;
  border: 0;
  border-top: 2px solid #e9ecef;
}

/* Better table styling */
table {
  width: 100%;
  margin: 1.5rem 0;
  border-collapse: collapse;
}

th {
  background-color: #f8f9fa;
  padding: 0.75rem;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid #dee2e6;
}

td {
  padding: 0.75rem;
  border-bottom: 1px solid #dee2e6;
}

tr:hover {
  background-color: #f8f9fa;
}

/* Icon and emoji spacing */
h2::before,
h3::before {
  margin-right: 0.5rem;
}

/* Improved content sections */
.content-section {
  margin-bottom: 3rem;
}

/* Better spacing for academic content */
.publication-item,
.project-item,
.course-item {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e9ecef;
}

.publication-item:last-child,
.project-item:last-child,
.course-item:last-child {
  border-bottom: none;
}

/* Highlight boxes for key information */
.highlight-box {
  background-color: #f0f7ff;
  border: 1px solid #b3d9ff;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.highlight-box h3 {
  margin-top: 0;
  color: #0d6efd;
}

/* Stats or metrics display */
.stat-item {
  display: inline-block;
  margin: 1rem 2rem 1rem 0;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: #0d6efd;
  display: block;
}

.stat-label {
  font-size: 0.9rem;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Responsive typography */
@media (max-width: 768px) {
  body {
    font-size: 1rem;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
  
  h3 {
    font-size: 1.35rem;
  }
  
  p {
    max-width: 100%;
  }
}

/* ========================================
   LIGHT THEME OVERRIDES
   ======================================== */

/* Ensure light background */
.quarto-light,
#quarto-content,
.sidebar,
.sidebar-navigation {
  background-color: #ffffff !important;
}

/* Sidebar text should be dark */
.sidebar-navigation .sidebar-item-text,
.sidebar .sidebar-title,
.sidebar a {
  color: #212529 !important;
}

/* Active sidebar item */
.sidebar-item .active {
  background-color: #0d6efd !important;
  color: #ffffff !important;
}

/* Content text */
.quarto-title-block .quarto-title,
.quarto-title-meta,
article {
  color: #212529 !important;
}

/* Remove any dark overlays */
.page-columns,
.column-page {
  background-color: transparent !important;
}

/* Hide the sidebar header/logo link */
.sidebar-header,
.sidebar-logo,
.sidebar .sidebar-header a,
.sidebar-title {
  display: none !important;
}

/* Ensure no extra padding where logo was */
.sidebar-menu-container {
  margin-top: 0 !important;
  padding-top: 1rem !important;
}

/* ============================================
   PUBLICATIONS DASHBOARD STYLES
   ============================================ */

/* Publication section styling */
.publication-section {
  margin: 1.5rem 0;
}

.publication-section > ol,
.publication-section > div {
  margin-bottom: 0;
}

.publication-section li {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e9ecef;
  line-height: 1.7;
}

.publication-section li:last-child {
  border-bottom: none;
}

/* Impact badges */
.publication-section li::before {
  content: none; /* Remove default list numbering for custom styling */
}

/* Stats cards */
.card {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  margin-bottom: 1rem;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.card-body {
  padding: 1.5rem;
}

/* Quick navigation links */
.publication-section a {
  color: #0d6efd;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.publication-section a:hover {
  border-bottom-color: #0d6efd;
}

/* Section headings with anchor links */
h2[id], h3[id] {
  scroll-margin-top: 80px; /* Account for fixed header */
}

/* Visual indicators for awards and impact */
.publication-section li:has(🏆) {
  background-color: #fff8e1;
  padding: 1rem;
  border-radius: 6px;
  border-left: 4px solid #ffc107;
}

/* DOI and external link styling */
.publication-section a[href*="doi.org"],
.publication-section a[href*="https://"] {
  font-weight: 500;
}

/* Timeline and progress bars */
.row {
  margin-bottom: 1rem;
}

/* Responsive grid for stats */
@media (max-width: 768px) {
  .g-col-md-3 {
    margin-bottom: 1rem;
  }
}