/* Import custom premium typography */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800;900&display=swap');

/* Apply classic Tufte-inspired base styles */
body {
  font-family: Georgia, Palatino, "Palatino Linotype", "Book Antiqua", serif;
  font-size: 1.05rem;
  line-height: 1.72;
  color: #111111;
  background-color: #fffff8; /* Classic Tufte cream background */
}

/* Maintain dark mode readability */
.quarto-dark body {
  color: #e2e8f0;
  background-color: #0f141c;
}

/* Headings with Gill Sans / Outfit font */
h1, h2, h3, h4, h5, h6 {
  font-family: "Gill Sans", "Gill Sans MT", "Outfit", -apple-system, sans-serif;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: #111111;
  margin-top: 2rem;
  margin-bottom: 0.8rem;
}

.quarto-dark h1, .quarto-dark h2, .quarto-dark h3, .quarto-dark h4, .quarto-dark h5, .quarto-dark h6 {
  color: #e2e8f0;
}

h1 {
  font-size: 2.3rem;
  font-style: italic;
  font-family: Georgia, Palatino, serif;
  font-weight: normal;
  color: #3d0106; /* Deep Tufte maroon */
  margin-bottom: 1.5rem;
}

.quarto-dark h1 {
  color: #fca5a5;
  font-style: italic;
}

/* Navbar adjustments */
.navbar {
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.quarto-dark .navbar {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
}

/* Hero Section style for homepage */
.hero-section {
  padding: 3.5rem 2rem;
  margin-bottom: 3rem;
  background: rgba(61, 1, 6, 0.02);
  border-radius: 12px;
  border: 1px dashed rgba(61, 1, 6, 0.2);
  box-shadow: none;
  transition: all 0.3s ease;
}

.quarto-dark .hero-section {
  background: rgba(252, 165, 165, 0.03);
  border: 1px dashed rgba(252, 165, 165, 0.2);
}

/* Premium Card style for publications */
.article-card {
  padding: 2rem;
  margin-bottom: 2rem;
  background: #fffff8;
  border-radius: 8px;
  border: 1px solid rgba(61, 1, 6, 0.15);
  box-shadow: 0 2px 5px rgba(0,0,0,0.02);
  transition: transform 0.25s ease, border-color 0.25s ease;
  text-decoration: none !important;
  display: block;
}

.quarto-dark .article-card {
  background: #111622;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.article-card:hover {
  transform: translateY(-2px);
  border-color: #3d0106;
}

.quarto-dark .article-card:hover {
  border-color: #fca5a5;
}

.article-card-title {
  font-family: Georgia, Palatino, serif;
  font-size: 1.35rem;
  font-weight: 600;
  margin-top: 0;
  margin-bottom: 0.8rem;
  color: #3d0106;
}

.quarto-dark .article-card-title {
  color: #fca5a5;
}

.article-card-desc {
  font-size: 0.95rem;
  color: #222222;
  margin-bottom: 1.2rem;
  line-height: 1.6;
}

.quarto-dark .article-card-desc {
  color: #cbd5e0;
}

.article-card-meta {
  font-size: 0.78rem;
  color: #777777;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Custom Math/LaTeX block styling - Display Math only */
.math.display, .equation {
  margin: 2rem 0;
  overflow-x: auto;
}

/* Ensure inline math does not render block styles */
.math.inline {
  padding: 0 !important;
  margin: 0 !important;
  background: none !important;
  border: none !important;
  display: inline !important;
}

/* Callouts & Blockquotes styling */
blockquote {
  border-left: 4px solid #667eea;
  background: rgba(102, 126, 234, 0.03);
  padding: 1rem 1.5rem;
  border-radius: 0 12px 12px 0;
  font-style: italic;
  margin: 2rem 0;
}

.quarto-dark blockquote {
  border-left: 4px solid #a3bffa;
  background: rgba(163, 191, 250, 0.04);
}

/* Code block adjustments */
.sourceCode {
  border-radius: 8px;
  box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
}

/* TOC style updates */
#TOC {
  border-left: 1px solid rgba(0, 0, 0, 0.06);
  padding-left: 1rem;
}

.quarto-dark #TOC {
  border-left: 1px solid rgba(255, 255, 255, 0.06);
}

/* Machine Abstract (AIO Visually Hidden) */
.machine-abstract {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* AI Ingestion Feeder Button */
.ai-ingestion-btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  margin: 1.5rem 0;
  font-size: 0.82rem;
  font-family: "Gill Sans", "Gill Sans MT", "Outfit", sans-serif;
  font-weight: 500;
  color: #3d0106;
  border: 1px solid #3d0106;
  border-radius: 4px;
  text-decoration: none !important;
  transition: all 0.2s ease;
}

.ai-ingestion-btn:hover {
  background-color: #3d0106;
  color: #fffff8 !important;
}

.quarto-dark .ai-ingestion-btn {
  color: #fca5a5;
  border-color: #fca5a5;
}

.quarto-dark .ai-ingestion-btn:hover {
  background-color: #fca5a5;
  color: #0f141c !important;
}
