/*
 * 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-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;
}
