/* ── Nav item padding reduction ──────────────────────────────────────────
   Reducing horizontal padding by 3 px/side × 9 items frees ~54 px,
   making room for the toggle <li> (~35 px) while keeping the float
   layout intact and "Ingo Scholtes" on the same line as the nav.       */
header.page .menu.full ul li a {
    padding-left:  7px !important;
    padding-right: 7px !important;
}

/* ── Dark mode toggle button (injected as <li> into the nav menu) ── */
#dark-toggle,
#dark-toggle-mobile {
    display: block;
    padding: 5px 8px 3px;
    margin: 13px 4px;
    font-size: 13px;
    font-weight: bold;
    line-height: normal;
    background: transparent;
    border: 1.5px solid rgba(191,191,191,0.45);
    border-radius: 20px;
    color: #bfbfbf;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    font-family: inherit;
    text-shadow: none;
    white-space: nowrap;
}

#dark-toggle:hover,
#dark-toggle-mobile:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
    border-color: rgba(255,255,255,0.5);
}

/* ── Dark mode overrides — applied when <html data-theme="dark"> ── */

[data-theme="dark"] body {
    background: #0f172a;
    color: #cbd5e1;
}

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6 {
    color: #f1f5f9;
}

[data-theme="dark"] strong {
    color: #e2e8f0;
}

[data-theme="dark"] a,
[data-theme="dark"] a:link,
[data-theme="dark"] a:visited {
    color: #60a5fa;
}

[data-theme="dark"] a:hover {
    color: #93c5fd;
}

[data-theme="dark"] p.lead,
[data-theme="dark"] .subheader {
    color: #94a3b8;
}

[data-theme="dark"] blockquote,
[data-theme="dark"] blockquote p {
    color: #94a3b8;
    border-left-color: #334155;
}

[data-theme="dark"] hr {
    border-color: #334155;
}

/* Slat lists */
[data-theme="dark"] ol.slats li {
    border-bottom-color: #334155;
}

[data-theme="dark"] ol.slats li p span.meta {
    color: #94a3b8;
}

/* Publications list */
[data-theme="dark"] ol.publications li {
    background-color: rgba(41,128,185,0.08);
    border-color: rgba(100,116,139,0.3);
}

[data-theme="dark"] ol.publications li:nth-child(odd) {
    background-color: rgba(41,128,185,0.13);
}

/* Insights list */
[data-theme="dark"] ul.insights {
    background-color: rgba(41,128,185,0.08);
}

/* Footer */
[data-theme="dark"] footer {
    border-top-color: #334155;
}

[data-theme="dark"] footer nav ul li {
    border-right-color: #334155;
}

/* Publication filter chips */
[data-theme="dark"] .pub-chip {
    border-color: #60a5fa;
    color: #60a5fa;
}

[data-theme="dark"] .pub-chip:hover,
[data-theme="dark"] .pub-chip.active {
    background: #60a5fa;
    color: #0f172a;
}

/* Form elements */
[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="password"],
[data-theme="dark"] input[type="email"],
[data-theme="dark"] textarea,
[data-theme="dark"] select,
[data-theme="dark"] form fieldset input.form-text,
[data-theme="dark"] form fieldset textarea {
    background: #1e293b;
    border-color: #475569;
    color: #cbd5e1;
}

[data-theme="dark"] form fieldset {
    border-bottom-color: #334155;
}

/* Map tiles — invert to a dark style in dark mode */
[data-theme="dark"] .map-tiles-light {
    filter: brightness(0.7) saturate(0.5) invert(1) hue-rotate(180deg);
}

/* Quote block */
[data-theme="dark"] .quote {
    color: #94a3b8;
}

/* Institution logos on the front page — invert black logos to white */
[data-theme="dark"] .columnimg img {
    filter: brightness(0) invert(1);
    opacity: 0.85;
}

/* Venue logos in publications sidebar — white card background so dark logos stay legible */
[data-theme="dark"] aside img {
    background: rgba(255,255,255,0.92);
    border-radius: 4px;
    padding: 5px 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* Publication cards */
[data-theme="dark"] ol.publications li {
    background: #1e293b !important;
    box-shadow: 0 1px 5px rgba(0,0,0,0.3) !important;
}
[data-theme="dark"] ol.publications li:nth-child(odd) { background: #1e293b !important; }
[data-theme="dark"] .pub-authors   { color: #94a3b8; }
[data-theme="dark"] .pub-meta      { color: #64748b; }
[data-theme="dark"] .pub-highlight { color: #60a5fa; }
[data-theme="dark"] .pub-badge             { background: #334155; color: #94a3b8; }
[data-theme="dark"] .pub-badge--topconf    { background: #312e81; color: #a5b4fc; }
[data-theme="dark"] .pub-badge--conf       { background: #1e3a5f; color: #93c5fd; }
[data-theme="dark"] .pub-badge--journal    { background: #14532d; color: #86efac; }
[data-theme="dark"] .pub-badge--preprint   { background: #451a03; color: #fcd34d; }
[data-theme="dark"] .pub-badge--workshop   { background: #0c4a6e; color: #7dd3fc; }
[data-theme="dark"] .pub-badge--thesis     { background: #3b0764; color: #d8b4fe; }
[data-theme="dark"] .pub-badge--book       { background: #431407; color: #fdba74; }
[data-theme="dark"] .pub-badge--report      { background: #1e293b; color: #94a3b8; }

/* Talk-type badge dark mode */
[data-theme="dark"] .pub-badge--keynote     { background: #450a0a; color: #fca5a5; }
[data-theme="dark"] .pub-badge--invited     { background: #1e3a5f; color: #93c5fd; }
[data-theme="dark"] .pub-badge--contributed { background: #14532d; color: #86efac; }

/* Filter chip colours in dark mode */
[data-theme="dark"] .pub-chip[data-tag="deep-learning"]               { border-color: #818cf8; color: #818cf8; }
[data-theme="dark"] .pub-chip[data-tag="temporal"]                    { border-color: #22d3ee; color: #22d3ee; }
[data-theme="dark"] .pub-chip[data-tag="higher-order"]                { border-color: #34d399; color: #34d399; }
[data-theme="dark"] .pub-chip[data-tag="software"]                    { border-color: #fbbf24; color: #fbbf24; }
[data-theme="dark"] .pub-chip[data-tag="network-science"]             { border-color: #60a5fa; color: #60a5fa; }
[data-theme="dark"] .pub-chip[data-tag="computational-social-science"]{ border-color: #f87171; color: #f87171; }
[data-theme="dark"] .pub-chip[data-tag="interdisciplinary"]           { border-color: #a78bfa; color: #a78bfa; }
[data-theme="dark"] .pub-chip[data-tag="deep-learning"]:hover,
[data-theme="dark"] .pub-chip[data-tag="deep-learning"].active   { background: #818cf8; border-color: #818cf8; color: #0f172a; }
[data-theme="dark"] .pub-chip[data-tag="temporal"]:hover,
[data-theme="dark"] .pub-chip[data-tag="temporal"].active         { background: #22d3ee; border-color: #22d3ee; color: #0f172a; }
[data-theme="dark"] .pub-chip[data-tag="higher-order"]:hover,
[data-theme="dark"] .pub-chip[data-tag="higher-order"].active     { background: #34d399; border-color: #34d399; color: #0f172a; }
[data-theme="dark"] .pub-chip[data-tag="software"]:hover,
[data-theme="dark"] .pub-chip[data-tag="software"].active         { background: #fbbf24; border-color: #fbbf24; color: #0f172a; }
[data-theme="dark"] .pub-chip[data-tag="network-science"]:hover,
[data-theme="dark"] .pub-chip[data-tag="network-science"].active  { background: #60a5fa; border-color: #60a5fa; color: #0f172a; }
[data-theme="dark"] .pub-chip[data-tag="computational-social-science"]:hover,
[data-theme="dark"] .pub-chip[data-tag="computational-social-science"].active { background: #f87171; border-color: #f87171; color: #0f172a; }
[data-theme="dark"] .pub-chip[data-tag="interdisciplinary"]:hover,
[data-theme="dark"] .pub-chip[data-tag="interdisciplinary"].active{ background: #a78bfa; border-color: #a78bfa; color: #0f172a; }
