/*
 * Quark 2 — user customizations
 *
 * This file is safe to edit. It is loaded last so anything here overrides
 * theme.css without having to mark rules !important.
 */

/* --- Academic typography override ---
 * Swaps the default Cal Sans display font (rounded, SaaS-style) for a serif
 * more in line with an academic paper, and tones down heading weights that
 * read as "marketing landing page" (bold h2 + decorative accent bar).
 */
:root {
  --pico-font-family-display: "Source Serif 4", Georgia, "Times New Roman", serif;
}

h2 {
  font-weight: 500;
}

h2::before {
  display: none;
}

h3,
h4 {
  font-weight: 500;
}

/* --- Text wordmark (no logo file configured) --- */
.navbar-brand-text {
  font-family: var(--pico-font-family-display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--q2-text-strong);
}

/* --- Preprint template ---
 * Flatten the default white "card" (rounded corners + shadow) that theme.css
 * applies to every .content-item — reads like a plain document/paper instead
 * of a boxed-in product-landing-page block.
 */
#body-wrapper > .container > .content-item.preprint {
    background: none;
    border-radius: 0;
    box-shadow: none;
    padding: clamp(1rem, 3vw, 2rem) 0;
}
:root[data-theme="dark"] #body-wrapper > .container > .content-item.preprint {
    box-shadow: none;
}

.preprint .preprint-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-muted, #666);
}

.preprint .preprint-meta a.preprint-doi {
    text-decoration: none;
    border: 1px solid currentColor;
    border-radius: 999px;
    padding: 0.2rem 0.75rem;
}

.preprint .preprint-about-link {
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.preprint .preprint-about-link a {
    text-decoration: none;
    color: var(--text-muted, #666);
    border-bottom: 1px dotted currentColor;
    padding-bottom: 1px;
}

.preprint .preprint-lang-switch {
    margin-bottom: 1.5rem;
}

.preprint .preprint-lang-switch a {
    display: inline-block;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 2px solid currentColor;
    padding-bottom: 2px;
}

.preprint .preprint-body {
    max-width: 72ch;
    margin: 0 auto;
}

/* --- Global language switcher (header) --- */
.language-switcher {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    margin-right: 0.5rem;
}

.language-switcher .lang-link {
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    opacity: 0.6;
    padding: 0.15rem 0.4rem;
}

.language-switcher .lang-link.active {
    opacity: 1;
    text-decoration: underline;
}

/* --- Citation box (preprint) --- */
.preprint .preprint-cite {
    margin: 2rem auto;
    max-width: 72ch;
    padding: 1rem 1.25rem;
    border: 1px solid var(--text-muted, #666);
    border-radius: 8px;
}

.preprint .preprint-cite h2 {
    font-size: 1rem;
    margin: 0 0 0.5rem;
}

.preprint .preprint-cite .cite-apa {
    margin: 0 0 0.5rem;
    font-size: 0.9rem;
}

.preprint .preprint-cite .cite-bibtex summary {
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
}

.preprint .preprint-cite .cite-bibtex pre {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: rgba(128, 128, 128, 0.08);
    border-radius: 4px;
    overflow-x: auto;
    font-size: 0.8rem;
    white-space: pre-wrap;
}

/* --- Preprint title: slightly reduce the display-scale ceiling --- */
.preprint .preprint-title {
    font-size: clamp(2.25rem, 4vw + 1rem, 3.1rem);
}

/* --- Footer links: muted by default, accent on hover (secondary nav, not body links) --- */
.footer-links a {
    color: var(--text-muted, #666);
    text-decoration: underline;
    text-decoration-color: color-mix(in oklab, currentColor 40%, transparent);
    text-underline-offset: 2px;
}

.footer-links a:hover {
    color: var(--q2-link);
}
