/* OneSource theme contrast repair: tokens and page surfaces are explicit in both modes. */
html[data-theme="light"] {
  color-scheme: light;
  --ink: #172126;
  --paper: #f5f6f3;
  --paper-2: #e9eeeb;
  --muted: #526168;
  --line: rgba(23,33,38,.16);
  --dark-line: rgba(23,33,38,.18);
}
html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #edf4f2;
  --paper: #111719;
  --paper-2: #0c1214;
  --muted: #b1bec0;
  --line: rgba(237,244,242,.16);
  --dark-line: rgba(237,244,242,.17);
}
html[data-theme="dark"] body,
html[data-theme="dark"] .section-light,
html[data-theme="dark"] .section:not(.section-dark),
html[data-theme="dark"] .projects-section,
html[data-theme="dark"] .collaboration-section,
html[data-theme="dark"] .detail-light,
html[data-theme="dark"] .reference-project,
html[data-theme="dark"] .foolscap-project { background-color: var(--paper) !important; color: var(--ink) !important; }
html[data-theme="dark"] h1, html[data-theme="dark"] h2, html[data-theme="dark"] h3,
html[data-theme="dark"] h4, html[data-theme="dark"] h5, html[data-theme="dark"] h6,
html[data-theme="dark"] .project-body, html[data-theme="dark"] .project-body h3,
html[data-theme="dark"] .detail-copy, html[data-theme="dark"] .detail-copy h2,
html[data-theme="dark"] .contact-heading h1, html[data-theme="dark"] .recognition-heading h1 { color: #edf4f2; }
html[data-theme="dark"] .project-body, html[data-theme="dark"] .experience-strip article,
html[data-theme="dark"] .about-meta, html[data-theme="dark"] .about-meta .meta-row,
html[data-theme="dark"] .project-card:not(.project-card--open), html[data-theme="dark"] .collab-card,
html[data-theme="dark"] .publication-item, html[data-theme="dark"] .reference-block,
html[data-theme="dark"] .contact-card, html[data-theme="dark"] .contact-direct,
html[data-theme="dark"] .recognition-card, html[data-theme="dark"] .recognition-band-item,
html[data-theme="dark"] .recognition-filter, html[data-theme="dark"] .recognition-toolbar {
  background-color: #182124 !important; color: #edf4f2 !important; border-color: rgba(237,244,242,.17) !important;
}
html[data-theme="dark"] p, html[data-theme="dark"] li, html[data-theme="dark"] small,
html[data-theme="dark"] .project-body p, html[data-theme="dark"] .detail-copy p,
html[data-theme="dark"] .contact-card p, html[data-theme="dark"] .contact-heading p,
html[data-theme="dark"] .recognition-card p, html[data-theme="dark"] .recognition-card small,
html[data-theme="dark"] .project-label, html[data-theme="dark"] .kicker,
html[data-theme="dark"] .section-heading h6 { color: #b8c5c6 !important; opacity: 1; }
html[data-theme="dark"] input, html[data-theme="dark"] textarea, html[data-theme="dark"] select {
  color: #edf4f2; background-color: #182124; border-color: #536368;
}
html[data-theme="dark"] .project-more, html[data-theme="dark"] .project-details-button,
html[data-theme="dark"] .outline-button, html[data-theme="dark"] .coverage-more,
html[data-theme="dark"] .recognition-viewmore { color: #edf4f2; background: #182124; border-color: #647579; }
html[data-theme="dark"] .project-more { background: #d5e5df; color: #14201d; }
html[data-theme="dark"] .project-more *, html[data-theme="dark"] .project-more small { color: inherit !important; }
/* Contact and records were dark by hard-coded page styles; make light mode genuinely light. */
html[data-theme="light"] .contact-page,
html[data-theme="light"] .contact-main,
html[data-theme="light"] .recognition-page,
html[data-theme="light"] .recognition-main { background: #f5f6f3 !important; color: #172126 !important; }
html[data-theme="light"] .contact-card, html[data-theme="light"] .contact-direct,
html[data-theme="light"] .recognition-card, html[data-theme="light"] .recognition-band-item,
html[data-theme="light"] .recognition-filter, html[data-theme="light"] .recognition-toolbar {
  background: #fff !important; color: #172126 !important; border-color: rgba(23,33,38,.16) !important;
  box-shadow: 0 8px 24px rgba(24,38,35,.06);
}
html[data-theme="light"] .contact-heading h1, html[data-theme="light"] .recognition-heading h1,
html[data-theme="light"] .contact-card h2, html[data-theme="light"] .recognition-card h3,
html[data-theme="light"] .recognition-section-head h2 { color: #172126 !important; }
html[data-theme="light"] .contact-card p, html[data-theme="light"] .contact-heading p,
html[data-theme="light"] .recognition-card p, html[data-theme="light"] .recognition-card small,
html[data-theme="light"] .recognition-kicker, html[data-theme="light"] .recognition-section-index { color: #526168 !important; opacity: 1; }
/* Remove the unwanted green neon ring on press/focus while keeping a clear neutral keyboard focus. */
.theme-switch, .theme-switch:active, .theme-switch:focus, .theme-switch:focus-within,
.theme-switch__checkbox:focus, .theme-switch__checkbox:focus-visible { outline: none !important; box-shadow: none !important; }
.theme-switch__checkbox:focus-visible + .theme-switch__container { outline: 2px solid #d7e4e1; outline-offset: 3px; }
.theme-switch__container, .theme-switch__circle-container { box-shadow: 0 2px 5px rgba(0,0,0,.18), inset 0 1px 2px rgba(0,0,0,.18); }
/* Cooler, more polished Foolscap accent: arctic blue + restrained mint, never a neon green wash. */
.foolscap-card-visual { background: radial-gradient(circle at 78% 15%, rgba(89,173,220,.20), transparent 29%), linear-gradient(135deg,#0a1218,#172630 60%,#0c171d) !important; }
.foolscap-preview { background: radial-gradient(circle at 90% 5%,rgba(89,173,220,.17),transparent 30%),linear-gradient(145deg,#0a1218,#172630 60%,#0c171d) !important; }
.foolscap-card-topline strong, .foolscap-preview-top strong { color: #8fd4f2 !important; }
.foolscap-card-footer span { color: #8fd4f2 !important; }
.foolscap-paper i { border-color: #4cabc9; }
.foolscap-page .foolscap-highlight { background: rgba(76,171,201,.28); border-left-color: #287f9e; }
.foolscap-project .open-source-links a:first-child { background: #bfe8f5 !important; border-color: #8dcfe4 !important; color: #10252d !important; }
.foolscap-project .foolscap-heading-subtitle { color: #287f9e; }
html[data-theme="dark"] .foolscap-project .foolscap-heading-subtitle { color: #8fd4f2; }
