/* 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: Light Mode (Default) */
.sidebar-item-section > .sidebar-item-container > .sidebar-item-text,
.sidebar-item-section > .sidebar-item-container > .sidebar-item-toggle {
  color: #0D6EFD !important;
}

/* Sidebar Level 1 styling: Dark Mode Overrides */
[data-bs-theme="dark"] .sidebar-item-section > .sidebar-item-container > .sidebar-item-text,
[data-bs-theme="dark"] .sidebar-item-section > .sidebar-item-container > .sidebar-item-toggle,
body.quarto-dark .sidebar-item-section > .sidebar-item-container > .sidebar-item-text,
body.quarto-dark .sidebar-item-section > .sidebar-item-container > .sidebar-item-toggle {
  color: #B58900 !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;
}

/* Light Mode (Default) scrollbar styling - solid brand blue */
::-webkit-scrollbar-thumb {
  background: #0D6EFD !important;
  border-radius: 10px !important;
}

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

/* Dark Mode scrollbar styling - solid brand yellow #B58900 */
body.quarto-dark::-webkit-scrollbar-thumb,
body.quarto-dark ::-webkit-scrollbar-thumb,
html.quarto-dark::-webkit-scrollbar-thumb,
html.quarto-dark ::-webkit-scrollbar-thumb,
[data-bs-theme="dark"]::-webkit-scrollbar-thumb,
[data-bs-theme="dark"] ::-webkit-scrollbar-thumb {
  background: #B58900 !important;
  border-radius: 10px !important;
}

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

/* Firefox compatibility - Default (Light Mode) blue */
* {
  scrollbar-width: thin !important;
  scrollbar-color: #0D6EFD transparent !important;
}

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

/* Firefox compatibility - Dark Mode yellow overrides */
body.quarto-dark,
body.quarto-dark *,
html.quarto-dark,
html.quarto-dark *,
[data-bs-theme="dark"],
[data-bs-theme="dark"] * {
  scrollbar-color: #B58900 transparent !important;
}
