/*-- scss:defaults --*/

/*-- Custom NEPEM theme --*/

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Fira+Code:wght@400;500&display=swap');

/* ── Design tokens ── */
$nepem-green: #2d6a4f;
$nepem-teal: #1b4332;
$nepem-gold: #c9a84c;
$nepem-light: #f8f9fa;
$nepem-dark: #1a1a2e;
$nepem-accent: #40916c;

/* Bootstrap variable overrides */
$body-bg: #fff;
$body-color: #212529;
$font-family-sans-serif: 'Inter', system-ui, -apple-system, sans-serif;
$font-family-monospace: 'Fira Code', monospace;
$presentation-title-color: $nepem-green;

/* Dark mode logic can still use CSS variables or SASS maps, 
   but Quarto prefers defaults here */

/*-- scss:rules --*/

:root {
    --nepem-green: #{$nepem-green};
    --nepem-teal: #{$nepem-teal};
    --nepem-gold: #{$nepem-gold};
    --nepem-light: #{$nepem-light};
    --nepem-dark: #{$nepem-dark};
    --nepem-accent: #{$nepem-accent};

    --bs-font-sans-serif: 'Inter', system-ui, sans-serif;
    --bs-font-monospace: 'Fira Code', monospace;

    --bs-body-font-size: 1.05rem;
    --bs-body-line-height: 1.75;

    /* code blocks */
    --code-bg: #f4f6f9;
    --code-border: #dee2e6;
}

[data-bs-theme="dark"] {
    --code-bg: #1e2433;
    --code-border: #2e3647;
}

/* ── Base typography ── */
body {
    font-family: var(--bs-font-sans-serif);
    letter-spacing: -0.01em;
}

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

/* ── Navbar ── */
.navbar {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.25);
}

.navbar-brand img {
    height: 36px;
}

/* ── Hero section (index page) ── */
.hero-section {
    background: linear-gradient(135deg, var(--nepem-teal) 0%, var(--nepem-green) 50%, var(--nepem-accent) 100%);
    color: #fff;
    padding: 5rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
    opacity: 0.5;
}

.hero-section>* {
    position: relative;
    z-index: 1;
}

.hero-section h1 {
    font-size: clamp(1.6rem, 3.5vw, 2.8rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.hero-section .lead {
    font-size: 1.15rem;
    opacity: 0.9;
    max-width: 760px;
    margin: 0 auto 2rem;
}

.hero-badges .badge {
    font-size: 0.8rem;
    padding: 0.45em 0.85em;
    border-radius: 50px;
    font-weight: 500;
    margin: 0.2rem;
}

/* ── Info cards ── */
.info-card {
    background: #fff;
    border: 1px solid #e8ecf0;
    border-radius: 16px;
    padding: 1.75rem;
    height: 100%;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.info-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

[data-bs-theme="dark"] .info-card {
    background: #1e2433;
    border-color: #2e3647;
}

.info-card .card-icon {
    font-size: 2.2rem;
    margin-bottom: 0.75rem;
    display: block;
}

.info-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.info-card p {
    font-size: 0.92rem;
    color: #6c757d;
    margin: 0;
    line-height: 1.6;
}

[data-bs-theme="dark"] .info-card p {
    color: #adb5bd;
}

/* ── Analysis Navigation ── */
.analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.analysis-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.5rem;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.analysis-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: var(--nepem-green);
    text-decoration: none;
    color: inherit;
}

[data-bs-theme="dark"] .analysis-card {
    background: #1e2433;
    border-color: rgba(255, 255, 255, 0.05);
}

[data-bs-theme="dark"] .analysis-card:hover {
    border-color: var(--nepem-accent);
}

.card-num {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--nepem-green);
    opacity: 0.2;
    font-family: var(--bs-font-monospace);
    transition: opacity 0.3s ease;
}

.analysis-card:hover .card-num {
    opacity: 1;
}

.card-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0;
    letter-spacing: -0.01em;
}

/* ── Code blocks ── */
div.sourceCode,
pre.sourceCode {
    border-radius: 10px;
    border: 1px solid var(--code-border);
    background-color: var(--code-bg) !important;
    font-size: 0.875rem;
}

code {
    font-family: var(--bs-font-monospace);
    font-size: 0.875em;
}

/* ── Callouts ── */
.callout {
    border-radius: 10px;
}

/* ── TOC ── */
#TOC {
    font-size: 0.875rem;
}

#TOC .nav-link {
    padding: 0.2rem 0.5rem;
    color: #6c757d;
}

#TOC .nav-link:hover,
#TOC .nav-link.active {
    color: var(--nepem-green);
}

/* ── Footer ── */
.nav-footer {
    background: var(--nepem-dark);
    color: #adb5bd;
    font-size: 0.875rem;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-footer a {
    color: var(--nepem-gold);
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .hero-section {
        padding: 3rem 1.25rem;
    }
}