
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Montserrat:wght@800&display=swap');


:root {
  --bg-color: #ffffff;
  --text-main: #334155; 
  --text-muted: #64748b;
  --accent: #2563eb; 
  --surface: #f8fafc;
  --border: #e2e8f0;
  --radius: 6px; 
}

p {
  text-align: justify;
}

figure, 
p > img {
  display: block !important;
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: center !important; 
}

figcaption {
  text-align: center;
  font-style: italic;
  font-size: 0.9rem;
  color: var(--text-muted, #64748b);
  margin-top: 0.75rem;
}

h1.title::before {
  content: "\1F697"; 
  font-family: "bootstrap-icons" !important;
  font-style: normal;
  font-weight: normal;
  color: var(--accent);
  margin-right: 0.5rem;
  font-size: 0.9em;
}

h1.title {
  font-family: 'Montserrat', sans-serif !important;
  font-style: italic;
  font-size: 2.2rem; 
  color: #0f172a; 
  text-align: left;
  letter-spacing: -1px;
}

h2 {
  position: relative;
  padding-right: 70px; 
}

h2::after {
  content: "";
  position: absolute;
  right: 30px; 
  bottom: 8px; 
  width: 18px;
  height: 46px;
  background-color: #1e293b; 
  border-radius: 4px; 
  border: 1px solid #0f172a;
  
  background-image:
    radial-gradient(circle at 50% 20%, #b91c1c 4px, transparent 5px), 
    radial-gradient(circle at 50% 50%, #b45309 4px, transparent 5px), 
    radial-gradient(circle at 50% 80%, #047857 4px, transparent 5px); 
    
  box-shadow: 
    inset 0 2px 4px rgba(0,0,0,0.6), 
    0 2px 4px rgba(0,0,0,0.1); 
    
  transition: all 0.3s ease;
}


h2:hover::after {
  background-image:
    radial-gradient(circle at 50% 20%, #ef4444 4px, transparent 5px), 
    radial-gradient(circle at 50% 50%, #f59e0b 4px, transparent 5px), 
    radial-gradient(circle at 50% 80%, #10b981 4px, transparent 5px); 
    
  box-shadow:
    inset 0 2px 4px rgba(0,0,0,0.6),
    0 4px 8px rgba(0,0,0,0.15);
  transform: translateY(-2px);
}


#TOC h2::after {
  display: none;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.7;
  color: var(--text-main);
  background-color: var(--bg-color);
  max-width: 1500px; 
  margin: 0 auto;
  padding: 3rem 2rem;

  margin: 0;
  padding: 0;
  

  background-image: 
    linear-gradient(
      to bottom,            
      rgba(255, 255, 255, 0.79) 0%,
      rgb(255, 255, 255) 55% 
    ),
    url("Gemini_Generated_Image_y9chtey9chtey9ch.jpeg");   

  background-repeat: no-repeat;
  background-attachment: fixed;  
  background-position: top center; 
  background-size: 100% auto;   
  background-color: #ffffff;

}

/* Center the document block over the wide background */
.quarto-container-default {
  max-width: 100% !important; 
}

/* Groups the text and TOC together and centers them on the page */
#quarto-content.page-columns {
  max-width: 1200px !important; /* Closes the massive gap between text and TOC */
  margin: 0 auto !important; /* Centers the entire reading block perfectly */
  padding-top: 2rem;
}

.sourceCode, pre.sourceCode {
  background-color: var(--surface) !important;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent); 
  border-radius: var(--radius);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05); 
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}


figure, .cell-output-display {
  margin: 2.5rem 0;
  text-align: center;
}

figure img, .cell-output-display img {
  border-radius: var(--radius);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); 
  max-width: 100%;
  height: auto;
}


.wrap-right {
  float: right;
  width: 40%; 
  margin: 0.5rem 0 1.5rem 2.5rem !important;
}

.wrap-left {
  float: left;
  width: 40%;
  margin: 0.5rem 2.5rem 1.5rem 0 !important;
}


h1, h2, h3 {
  clear: both;
}

/* Hover effect */
.sourceCode:hover {
  transform: translateY(-2px); 
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); 
}

/* Typography */
h1, h2, h3 {
  font-weight: 700;
  color: #0f172a;
}

h1 { 
  font-size: 2.5rem; 
  margin-bottom: 1.5rem; 
}

h2 { 
  font-size: 1.75rem; 
  margin-top: 3rem; 
  border-bottom: 2px solid var(--border); 
  padding-bottom: 0.5rem; 
}


#quarto-margin-sidebar {
  min-width: 350px;
}

#TOC {
  width: 100%;
  min-width: 320px; 
  padding: 1.5rem 2rem;
}


#TOC {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 20px 20px -5px rgba(0, 0, 0, 0.05);
}

#TOC::before {
  content: "Table of Contents";
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
  display: block;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}

#toc-title {
  display: none !important;
}

#TOC ul {
  list-style-type: none;
  padding-left: 1rem;
}

#TOC > ul {
  padding-left: 0; 
}

#TOC a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  display: block; 
  padding: 0.3rem 0;
  transition: all 0.2s ease-in-out;
  font-size: 0.8rem;
}

#TOC a:hover {
  color: var(--accent);
  transform: translateX(4px); 
}


table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.95rem;
}

th {
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  padding: 0.75rem 0.5rem;
  border-bottom: 2px solid var(--border);
  text-align: left;
}

td {
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid var(--border);
}

tr:hover td { 
  background-color: var(--surface); 
}


.sourceCode, pre.sourceCode {
  background-color: var(--surface) !important;
  color: var(--text-main);
  padding: 0.75rem 1rem; /* Slashed padding */
  margin: 1rem 0; /* Slashed margin */
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow-x: auto;
  font-family: 'Fira Code', 'JetBrains Mono', Consolas, Monaco, monospace;
  font-size: 0.85rem;
}


div.cell {
  margin-bottom: 1rem;
}

div.cell-output-stdout pre {
  padding: 0.5rem 1rem;
  margin: 0.5rem 0;
  background-color: #f1f5f9 !important; 
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius);
  font-size: 0.85rem;
}



blockquote {
  position: relative; 
  border-left: 4px solid var(--accent);
  padding: 1rem 1.25rem;
  margin: 2rem 0;
  background-color: #eff6ff; 
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-main);
  font-style: normal;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

blockquote::before {
  content: "\F334";
  font-family: "bootstrap-icons" !important;
  position: absolute;
  top: -12px;   
  right: -12px; 
  font-size: 1.5rem;
  color: #ef4444; 
  background: transparent;
  opacity: 0; 
  transition: opacity 0.3s ease;
  z-index: 10;
}

@keyframes doubleFlashRed {
  0%   { background-color: #eff6ff; border-left-color: var(--accent); } 
  20%  { background-color: #fee2e2; border-left-color: #ef4444; }       
  40%  { background-color: #eff6ff; border-left-color: var(--accent); } 
  60%  { background-color: #fee2e2; border-left-color: #ef4444; }       
  100% { background-color: #fef2f2; border-left-color: #ef4444; }       
}

@keyframes pulseWarning {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}


blockquote:hover {
  animation: doubleFlashRed 0.8s ease-in-out forwards;
  box-shadow: 0 4px 12px -2px rgba(239, 68, 68, 0.15); 
}

blockquote:hover::before {
  opacity: 1; /* Makes the icon visible */
  animation: pulseWarning 1.5s ease-in-out infinite; 
}

.code-copy-outer-scaffold {
  background-color: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-left: 4px solid var(--accent) !important; 
  border-radius: var(--radius);
  margin: 1.5rem 0;
  position: relative; 
  box-shadow: 0 2px 4px rgba(0,0,0,0.02); 
  padding: 0 !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}


.code-copy-outer-scaffold:hover {
  transform: translateY(-2px); 
  box-shadow: 0 8px 12px -3px rgba(0, 0, 0, 0.08); 
}


div.sourceCode, 
div.sourceCode.cell-code {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

pre.sourceCode {
  margin: 0 !important;
  padding: 1rem 1.25rem !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  font-family: 'Fira Code', 'JetBrains Mono', Consolas, Monaco, monospace;
  font-size: 0.85rem;
  overflow-x: auto;
}


.code-copy-button {
  top: 0.5rem !important;
  right: 0.5rem !important;
  color: var(--text-muted);
  background: transparent !important;
  border: none !important;
  transition: color 0.2s ease;
}

.code-copy-button:hover {
  color: var(--accent) !important;
}