/* styles.css */


/*
==================================================================
1. THEME VARIABLES
Light theme is the default.
==================================================================
*/

/* Light Theme (Default) */
:root {
  --card-bg-color: #002B36;
  --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  --card-hover-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
  --title-text-color: #e2e8f0;
  --category-boder-color: #002B36;
  --category-text-color: #e2e8f0;
  --category-hover-bg-color: #002B36;
  /* Slightly adjusted for italic style */
  --tooltip-bg-color: rgba(7, 54, 66, 0.95);
  --tooltip-text-color: #e2e8f0;
  --grid-bg-color: #002B36;


}

/* Dark Theme (Activated by Quarto's theme switcher) */
[data-theme="light"] {
  --card-bg-color: #FFFFFF;
  --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  --card-hover-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
  --title-text-color: #1a1a1a;
  --category-text-color: #5a5a5a;
  /* Slightly adjusted for italic style */
  --category-hover-bg-color: #f0f0f0;
  --tooltip-bg-color: rgba(248, 249, 250, 0.92);
  --tooltip-text-color: #1a1a1a;
}

/*
==================================================================
GENERAL SETUP & LAYOUT (No changes)
==================================================================
*/

/*
==================================================================
2. THE MAIN CARD CONTAINER (No changes)
==================================================================
*/
.quarto-grid-item.card {
  background-color: var(--card-bg-color);
  border: none;
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
  position: relative;
}

.quarto-grid-item.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--card-hover-shadow);
}

/*
==================================================================
3. CARD CONTENT STYLING (TITLE & CATEGORIES)
==================================================================
*/
.listing-reading-time{
  color: var(--category-text-color);
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.75rem 1rem 0.5rem;

}
.listing-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--title-text-color);
  padding: 0.75rem 1rem 0.5rem;
  margin: 0;
  border-bottom: none;
}

.listing-categories {
  padding: 0 1rem 0.75rem;
}

.listing-category {
  display: inline-block;
  color: var(--category-text-color);
  font-size: 0.7rem;
  font-weight: 500;
  /* Adjusted font-weight for better italic readability */
  padding: 4px 8px;
  /* Adjusted padding slightly */
  border-radius: 8px;
  /* Softened the radius */
  margin: 4px 4px 4px 0;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;

  /* === CHANGED HERE === */
  font-style: italic;
  border: none;
  /* Explicitly remove border */
}

.listing-category:hover {
  background-color: var(--category-hover-bg-color);
}

/*
==================================================================
4. THE TOOLTIP ON HOVER LOGIC (No changes)
==================================================================
*/
.listing-description {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--tooltip-bg-color);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.quarto-grid-item.card:hover .listing-description {
  opacity: 1;
  visibility: visible;
}

.listing-description p {
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--tooltip-text-color);
  text-align: center;
  padding: 1rem;
  margin: 0;
}

/* Sidebar Level 1 styling: Default / Dark Mode */
.sidebar-item-section > .sidebar-item-container > .sidebar-item-text,
.sidebar-item-section > .sidebar-item-container > .sidebar-item-toggle {
  color: #B58900 !important;
}

/* Sidebar Level 1 styling: Light Mode Overrides */
body.quarto-light .sidebar-item-section > .sidebar-item-container > .sidebar-item-text,
body.quarto-light .sidebar-item-section > .sidebar-item-container > .sidebar-item-toggle,
html.quarto-light .sidebar-item-section > .sidebar-item-container > .sidebar-item-text,
html.quarto-light .sidebar-item-section > .sidebar-item-container > .sidebar-item-toggle,
[data-bs-theme="light"] .sidebar-item-section > .sidebar-item-container > .sidebar-item-text,
[data-bs-theme="light"] .sidebar-item-section > .sidebar-item-container > .sidebar-item-toggle {
  color: #0D6EFD !important;
}

/*
==================================================================
5. PREMIUM CUSTOM SCROLLBARS (Sleek & Minimal)
==================================================================
*/

/* WebKit-based browsers (Chrome, Safari, Edge) */
::-webkit-scrollbar {
  width: 6px !important;
  height: 6px !important;
}

::-webkit-scrollbar-track {
  background: transparent !important;
}

/* Default / Dark Mode scrollbar styling - solid brand yellow #B58900 */
::-webkit-scrollbar-thumb {
  background: #B58900 !important;
  border-radius: 10px !important;
}

::-webkit-scrollbar-thumb:hover {
  background: #B58900 !important;
}

/* Light Mode scrollbar styling overrides - solid brand blue #0D6EFD */
body.quarto-light::-webkit-scrollbar-thumb,
body.quarto-light ::-webkit-scrollbar-thumb,
html.quarto-light::-webkit-scrollbar-thumb,
html.quarto-light ::-webkit-scrollbar-thumb,
[data-bs-theme="light"]::-webkit-scrollbar-thumb,
[data-bs-theme="light"] ::-webkit-scrollbar-thumb {
  background: #0D6EFD !important;
  border-radius: 10px !important;
}

body.quarto-light::-webkit-scrollbar-thumb:hover,
body.quarto-light ::-webkit-scrollbar-thumb:hover,
html.quarto-light::-webkit-scrollbar-thumb:hover,
html.quarto-light ::-webkit-scrollbar-thumb:hover,
[data-bs-theme="light"]::-webkit-scrollbar-thumb:hover,
[data-bs-theme="light"] ::-webkit-scrollbar-thumb:hover {
  background: #0D6EFD !important;
}

/* Firefox compatibility - Default (Dark Mode) yellow */
* {
  scrollbar-width: thin !important;
  scrollbar-color: #B58900 transparent !important;
}

html, body {
  scrollbar-width: thin !important;
  scrollbar-color: #B58900 transparent !important;
}

/* Firefox compatibility - Light Mode blue overrides */
body.quarto-light,
body.quarto-light *,
html.quarto-light,
html.quarto-light *,
[data-bs-theme="light"],
[data-bs-theme="light"] * {
  scrollbar-color: #0D6EFD transparent !important;
}

/* Premium Sidebar Collapse Transition Override (Ultra-smooth Ease-Out Expo curve) */
#quarto-sidebar .collapsing {
  transition: height 0.8s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Premium Content & TOC Page Load Animations (Cohesive Fade & Slide Up) */
@keyframes contentFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#quarto-document-content,
#TOC {
  animation: contentFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  will-change: opacity, transform;
}
