/* ===================================
   MODERN QUARTO BLOG STYLES
   =================================== */

/* --- ROOT VARIABLES --- */
:root {
    --accent-color: #10b981;
    --accent-hover: #059669;
    --card-radius: 12px;
    --transition-speed: 0.25s;
}

/* --- TYPOGRAPHY ENHANCEMENTS --- */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    letter-spacing: -0.011em;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    letter-spacing: -0.02em;
}

code, pre {
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
}

/* --- ABOUT PAGE / INDEX PAGE --- */
.about-entity {
    padding: 2rem 0;
}

.about-entity .about-link {
    background: var(--accent-color);
    color: white !important;
    border-radius: 8px;
    padding: 0.6rem 1.2rem;
    text-decoration: none;
    transition: all var(--transition-speed) ease;
    font-weight: 500;
}

.about-entity .about-link:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.about-entity img {
    border: 4px solid var(--accent-color);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* --- GRID VIEW CARDS --- */
.quarto-grid-item {
    background-color: var(--bs-body-bg);
    border: 1px solid rgba(128, 128, 128, 0.2);
    border-radius: var(--card-radius);
    transition: all var(--transition-speed) ease;
    overflow: hidden;
}

.quarto-grid-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--accent-color);
}

.quarto-grid-item .card-img-top {
    height: 180px;
    object-fit: cover;
    transition: transform var(--transition-speed) ease;
}

.quarto-grid-item:hover .card-img-top {
    transform: scale(1.05);
}

.quarto-grid-item .card-body {
    padding: 1.25rem;
}

/* --- CARD TEXT --- */
.card-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.card-text {
    opacity: 0.85;
    line-height: 1.6;
}

/* --- CATEGORY BADGES --- */
.listing-categories .listing-category {
    background-color: var(--accent-color);
    color: #ffffff !important;
    border-radius: 20px;
    padding: 0.35rem 0.85rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    transition: all var(--transition-speed) ease;
    border: none;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.listing-categories .listing-category:hover {
    background-color: var(--accent-hover);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
    color: #ffffff !important;
}

/* --- SEARCH INPUT --- */
.quarto-listing-filter input {
    border-radius: 8px;
    padding: 0.75rem 1rem;
    border: 2px solid rgba(128, 128, 128, 0.2);
    transition: all var(--transition-speed) ease;
}

.quarto-listing-filter input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

/* --- NAVBAR ENHANCEMENTS --- */
.navbar {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.3rem;
}

/* --- CALLOUTS (for index page) --- */
.callout {
    border-radius: var(--card-radius);
    border-left-width: 4px;
    margin: 1rem 0;
}

/* --- TITLE BANNER --- */
.quarto-title-banner {
    padding: 3rem 0;
}

.quarto-title-banner h1 {
    font-size: 2.5rem;
    font-weight: 700;
}

/* --- DARK MODE SPECIFIC --- */
[data-bs-theme="dark"] {
    --bs-body-bg: #0f172a;
    --bs-body-color: #e2e8f0;
}

[data-bs-theme="dark"] .quarto-grid-item {
    background-color: #1e293b;
    border-color: rgba(148, 163, 184, 0.1);
}

[data-bs-theme="dark"] .quarto-grid-item:hover {
    background-color: #273449;
    border-color: var(--accent-color);
}

[data-bs-theme="dark"] .navbar {
    background: rgba(15, 23, 42, 0.9) !important;
}

[data-bs-theme="dark"] .callout {
    background-color: #1e293b;
}

[data-bs-theme="dark"] code {
    background-color: #1e293b;
}

/* Dark mode category badges */
[data-bs-theme="dark"] .listing-categories .listing-category {
    background-color: #10b981;
    color: #022c22 !important;
    font-weight: 700;
}

[data-bs-theme="dark"] .listing-categories .listing-category:hover {
    background-color: #34d399;
    color: #022c22 !important;
}

/* --- LIGHT MODE SPECIFIC --- */
[data-bs-theme="light"] .quarto-grid-item {
    background-color: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
}

[data-bs-theme="light"] .quarto-grid-item:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Light mode category badges */
[data-bs-theme="light"] .listing-categories .listing-category {
    background-color: #059669;
    color: #ffffff !important;
    font-weight: 600;
}

[data-bs-theme="light"] .listing-categories .listing-category:hover {
    background-color: #047857;
    color: #ffffff !important;
}

/* --- LINKS --- */
a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}

a:hover {
    color: var(--accent-hover);
}

/* --- READING EXPERIENCE --- */
.content p {
    margin-bottom: 1.5rem;
}

article {
    max-width: 75ch;
    margin: 0 auto;
}

/* --- SMOOTH SCROLLBAR (webkit) --- */
::-webkit-scrollbar {
    width: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: rgba(128, 128, 128, 0.3);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(128, 128, 128, 0.5);
}

/* --- PUBLICATION CARDS --- */
.pub-card {
    background-color: var(--bs-body-bg);
    border: 1px solid rgba(128, 128, 128, 0.2);
    border-left: 4px solid var(--accent-color);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
    transition: all var(--transition-speed) ease;
}

.pub-card:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-left-color: var(--accent-hover);
}

.pub-card .pub-title {
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 0.4rem;
    color: var(--bs-body-color);
}

.pub-card .pub-authors {
    font-size: 0.9rem;
    opacity: 0.85;
    margin-bottom: 0.3rem;
}

.pub-card .pub-venue {
    font-size: 0.85rem;
    font-style: italic;
    opacity: 0.75;
    margin-bottom: 0.5rem;
}

.pub-card .pub-links a {
    display: inline-block;
    font-size: 0.8rem;
    padding: 0.25rem 0.6rem;
    margin-right: 0.5rem;
    border-radius: 4px;
    background-color: var(--accent-color);
    color: white !important;
    font-weight: 500;
}

.pub-card .pub-links a:hover {
    background-color: var(--accent-hover);
}

[data-bs-theme="dark"] .pub-card {
    background-color: #1e293b;
}

[data-bs-theme="light"] .pub-card {
    background-color: #f8fafc;
}

/* --- TALK / FEATURE CARDS --- */
.talk-card {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    background-color: var(--bs-body-bg);
    border: 1px solid rgba(128, 128, 128, 0.2);
    border-radius: var(--card-radius);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    transition: all var(--transition-speed) ease;
    overflow: hidden;
}

.talk-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
    border-color: var(--accent-color);
}

.talk-card .talk-image {
    width: 280px;
    height: 160px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.talk-card .talk-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.talk-card .talk-content h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.15rem;
    font-weight: 600;
}

.talk-card .talk-content p {
    margin-bottom: 0.75rem;
    opacity: 0.85;
    font-size: 0.95rem;
}

.talk-card .talk-links a {
    display: inline-block;
    font-size: 0.8rem;
    padding: 0.3rem 0.7rem;
    margin-right: 0.5rem;
    margin-top: 0.5rem;
    border-radius: 4px;
    background-color: var(--accent-color);
    color: white !important;
    font-weight: 500;
    transition: all var(--transition-speed) ease;
}

.talk-card .talk-links a:hover {
    background-color: var(--accent-hover);
    transform: translateY(-1px);
}

/* Dark mode talk cards */
[data-bs-theme="dark"] .talk-card {
    background-color: #1e293b;
}

/* Light mode talk cards */
[data-bs-theme="light"] .talk-card {
    background-color: #f8fafc;
}

/* Responsive: stack on mobile */
@media (max-width: 768px) {
    .talk-card {
        flex-direction: column;
    }

    .talk-card .talk-image {
        width: 100%;
        height: 200px;
    }
}
