/* CodeWithStephen: one palette for pages, editors, controls and dialogs.
   html:root wins over legacy :root declarations without !important. */
html:root {
    color-scheme: light;
    --theme-bg: #f6f7fb;
    --theme-text: #202438;
    --theme-surface: #ffffff;
    --theme-surface-soft: #eef0f7;
    --theme-border: #dce0ed;
    --theme-muted: #606980;
    --theme-link: #424c6d;
    --theme-link-hover-bg: #eae7fd;
    --theme-link-hover: #5141bc;
    --theme-link-active-bg: #e6e1fb;
    --theme-link-active: #4935a9;
    --theme-accent: #6550cf;
    --theme-accent-hover: #5140b4;
    --theme-on-accent: #ffffff;
    --theme-accent-contrast: var(--theme-on-accent);
    --theme-overlay: rgba(17, 18, 35, .55);
    --theme-danger: #ba3552;
    --theme-success: #17734f;
    --theme-positive: #17734f;
    --theme-positive-hover: #115b3d;
    --theme-warning: #94611a;
    --theme-info: #126d88;
    --theme-violet: #7850ae;
    --theme-rose: #a64282;
    --theme-scrollbar-track: #eef0f7;
    --theme-scrollbar-thumb: #a0a8c2;
    --theme-scrollbar-thumb-hover: #737e9f;
    --theme-code-bg: #f1f3fa;
    --theme-code-surface: #f9faff;
    --theme-code-text: #28314d;
    --theme-code-border: #dce0ed;
    --theme-code-gutter-bg: #e8ecf6;
    --theme-code-gutter-text: #66708b;
    --theme-code-overlay: rgba(246,247,251,.88);
    --theme-accent-rgb: 101, 80, 207;
    --theme-info-rgb: 18, 109, 136;
    --theme-success-rgb: 23, 115, 79;
    --theme-warning-rgb: 148, 97, 26;
    --theme-danger-rgb: 186, 53, 82;
    --theme-violet-rgb: 120, 80, 174;
    --theme-rose-rgb: 166, 66, 130;
    --theme-shadow-rgb: 25, 27, 52;
    --theme-highlight-rgb: 255, 255, 255;
    --theme-neutral-rgb: 96, 105, 128;
    --theme-depth: #111323;
    --theme-white: #ffffff;
    --theme-field: #ffffff;
    --theme-header: rgba(246,247,251,.94);
    --theme-shadow: 0 12px 38px rgba(25,27,52,.065);
    --theme-radius: 18px;
    --theme-radius-control: 10px;
}
html:root[data-theme="dark"] {
    color-scheme: dark;
    --theme-bg: #10121b;
    --theme-text: #eceefa;
    --theme-surface: #181c29;
    --theme-surface-soft: #202537;
    --theme-border: #30374d;
    --theme-muted: #a7b0c8;
    --theme-link: #c1c9e2;
    --theme-link-hover-bg: #2d2948;
    --theme-link-hover: #d3c9ff;
    --theme-link-active-bg: #352d55;
    --theme-link-active: #ded5ff;
    --theme-accent: #b3a1ff;
    --theme-accent-hover: #cdc0ff;
    --theme-on-accent: #20183b;
    --theme-overlay: rgba(5,7,17,.78);
    --theme-danger: #ff94ac;
    --theme-success: #7cdbb0;
    --theme-positive: #7cdbb0;
    --theme-positive-hover: #a1ebca;
    --theme-warning: #efc178;
    --theme-info: #79cfe5;
    --theme-violet: #c5a3f4;
    --theme-rose: #e9a0d1;
    --theme-scrollbar-track: #181c29;
    --theme-scrollbar-thumb: #4e5877;
    --theme-scrollbar-thumb-hover: #7883a7;
    --theme-code-bg: #111522;
    --theme-code-surface: #171d2d;
    --theme-code-text: #e0e6f7;
    --theme-code-border: #30374d;
    --theme-code-gutter-bg: #131827;
    --theme-code-gutter-text: #909cbb;
    --theme-code-overlay: rgba(17,21,34,.88);
    --theme-accent-rgb: 179, 161, 255;
    --theme-info-rgb: 121, 207, 229;
    --theme-success-rgb: 124, 219, 176;
    --theme-warning-rgb: 239, 193, 120;
    --theme-danger-rgb: 255, 148, 172;
    --theme-violet-rgb: 197, 163, 244;
    --theme-rose-rgb: 233, 160, 209;
    --theme-shadow-rgb: 0, 0, 0;
    --theme-highlight-rgb: 202, 213, 255;
    --theme-neutral-rgb: 167, 176, 200;
    --theme-field: #121725;
    --theme-header: rgba(16,18,27,.94);
    --theme-shadow: 0 14px 40px rgba(0,0,0,.2);
}

html { accent-color: var(--theme-accent); }
::selection { background: var(--theme-link-active-bg); color: var(--theme-link-active); }
html body { background: var(--theme-bg); color: var(--theme-text); -webkit-font-smoothing: antialiased; }
html body .site-navbar { background: var(--theme-header); border-color: var(--theme-border); backdrop-filter: blur(18px); }
html body .site-navbar__wrap { grid-template-columns: minmax(170px,1fr) auto auto auto; gap: clamp(.6rem,1.6vw,1.5rem); }
html body .site-navbar__brand { grid-column:1;grid-row:1; }
html body .site-navbar__links { grid-column:2;grid-row:1; }
html body .site-theme-toggle { grid-column:3;grid-row:1; }
html body .site-navbar__actions { grid-column:4;grid-row:1; }
html body .site-navbar__links { background: var(--theme-surface); box-shadow: none; border-radius: 999px; padding: .3rem; }
html body .site-navbar__links a { border-radius: 999px; min-height: 38px; }
html body .site-navbar .site-navbar__links a.is-active,
html body .site-navbar .site-navbar__links a.is-active:hover { background:var(--theme-accent);border-color:var(--theme-accent);color:var(--theme-on-accent);box-shadow:0 4px 12px rgba(var(--theme-accent-rgb),.18); }
html body .site-navbar__btn { border-radius: 999px; min-height: 40px; display:inline-flex;align-items:center; }
.site-theme-toggle:not([hidden]) { display:inline-grid;place-items:center;width:42px;height:42px;padding:0;flex-shrink:0;border:1px solid var(--theme-border);border-radius:50%;color:var(--theme-text);background:var(--theme-surface);cursor:pointer; }
.site-theme-toggle:hover { background:var(--theme-link-hover-bg);border-color:var(--theme-accent); }
.site-theme-toggle svg { width:19px;height:19px; }
.site-theme-toggle__sun { display:none; }
html[data-theme="dark"] .site-theme-toggle__sun { display:block; }
html[data-theme="dark"] .site-theme-toggle__moon { display:none; }
html body :is(button,a,input,select,textarea):focus-visible { outline:2px solid var(--theme-accent);outline-offset:3px; }
html body :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="submit"]):not([type="button"]),select,textarea) { color:var(--theme-text);background-color:var(--theme-field);border-color:var(--theme-border);border-radius:var(--theme-radius-control); }
html body :is(input,textarea)::placeholder { color:var(--theme-muted);opacity:.85; }
html body :is(input,textarea,select):disabled { opacity:.65; }
html body :is(.card,.panel-card,.profile-card,.project-card,.home-path-card,.home-build-card,.home-availability,.about-card,.discussion-category-block) { border-radius:var(--theme-radius);border-color:var(--theme-border);box-shadow:var(--theme-shadow); }
html body :is(.discussion-btn,.panel-btn,.auth-btn,.site-contact-modal__submit) { border-radius:var(--theme-radius-control); }
html body :is(.discussion-btn,.panel-btn,.auth-btn):not([class*="danger"]):not([class*="secondary"]):not([class*="ghost"]):not([class*="lite"]) { color:var(--theme-on-accent); }
html body .home-hero__title { letter-spacing:-.055em; }
html body .home-hero__kicker span { color:var(--theme-accent); }
html body :is(.home-build-card,.home-availability) { background:linear-gradient(140deg,color-mix(in srgb,var(--theme-accent) 7%,var(--theme-surface)),var(--theme-surface) 60%); }
html body .home-build-card::before { inset:15% 0 0 18%; }
html body .home-proof { background:var(--theme-surface);border:1px solid var(--theme-border);border-radius:var(--theme-radius); }
html body .home-capability-list { border:0;gap:1rem; }
html body .home-capability-list article { background:var(--theme-surface);border:1px solid var(--theme-border);border-radius:var(--theme-radius);box-shadow:var(--theme-shadow); }
html body .home-process__steps { gap:1rem;border:0; }
html body .home-process__steps li { border:1px solid var(--theme-border);border-radius:var(--theme-radius);background:var(--theme-surface); }
html body :is(.home-portfolio-section,.home-capabilities,.home-process) { border-color:var(--theme-border); }
html body .site-ambient-bg { opacity:.4; }
html body :is(.discussion-modal__panel,.panel-modal__panel,.auth-modal__panel,.project-source-modal__panel,.site-contact-modal__panel,.site-cookie-modal__panel,.site-error-modal__panel,.site-confirm-modal__panel,.nuget-modal__panel,.site-notification-modal__panel,.site-private-message-modal__panel,.profile-module-modal__panel,.profile-edit-modal__panel,.discussion-global-search-modal__panel,.discussion-create-modal__panel,.discussion-preview-modal__panel) { background:var(--theme-surface);color:var(--theme-text);border-color:var(--theme-border);border-radius:20px;box-shadow:0 30px 90px rgba(var(--theme-shadow-rgb),.35); }
html body :is(.discussion-modal__panel,.panel-modal__panel,.auth-modal__panel,.project-source-modal__panel,.site-contact-modal__panel,.site-cookie-modal__panel,.site-error-modal__panel,.site-confirm-modal__panel,.nuget-modal__panel,.site-notification-modal__panel,.site-private-message-modal__panel,.profile-module-modal__panel,.profile-edit-modal__panel,.discussion-global-search-modal__panel,.discussion-create-modal__panel,.discussion-preview-modal__panel) { padding-bottom:1.1rem; }
html body :is(.discussion-modal__backdrop,.panel-modal__backdrop,.auth-modal__backdrop,.project-source-modal__backdrop,.site-contact-modal__backdrop,.site-cookie-modal__backdrop,.site-error-modal__backdrop,.site-confirm-modal__backdrop,.nuget-modal__backdrop,.discussion-global-search-modal__backdrop) { background:var(--theme-overlay);backdrop-filter:blur(10px); }
html body :is(.discussion-modal__close,.panel-modal__close,.auth-modal__close,.site-contact-modal__close,.site-cookie-modal__close,.site-error-modal__close,.site-confirm-modal__close,.nuget-modal__close,.project-source-modal__close) { background:var(--theme-surface-soft);color:var(--theme-text);border-color:var(--theme-border);border-radius:50%; }
html body :is(.discussion-modal__close,.panel-modal__close,.auth-modal__close,.site-contact-modal__close,.nuget-modal__close):hover { background:var(--theme-link-hover-bg);color:var(--theme-accent); }
html body :is(.markdown-body pre,.source-code,.project-source-code) { color:var(--theme-code-text);background-color:var(--theme-code-bg);border-color:var(--theme-code-border); }
html body :is(.markdown-body pre code,.hljs) { color:var(--theme-code-text);background:var(--theme-code-bg); }
html body :is(.hljs-comment,.hljs-quote) { color:var(--theme-code-gutter-text); }
html body :is(.hljs-keyword,.hljs-selector-tag,.hljs-type) { color:var(--theme-violet); }
html body :is(.hljs-string,.hljs-regexp,.hljs-addition) { color:var(--theme-success); }
html body :is(.hljs-number,.hljs-literal,.hljs-symbol) { color:var(--theme-warning); }
html body :is(.hljs-title,.hljs-section,.hljs-attribute,.hljs-attr) { color:var(--theme-info); }
html body :is(.hljs-deletion,.hljs-variable) { color:var(--theme-danger); }
@media(max-width:860px) {
    html body .site-navbar__wrap { flex-wrap:wrap;gap:.6rem; }
    html body .site-navbar__brand { margin-right:auto; }
    html body .site-theme-toggle { order:1; }
    html body .site-navbar__menu-toggle { order:2;margin-left:0; }
    html body .site-navbar__links { order:3; }
    html body .site-navbar__actions { order:4; }
}
@media(max-width:480px) { html body .site-navbar__brand { font-size:.85rem;gap:.4rem; } html body .site-navbar__brand-icon { width:26px;height:26px; } .site-theme-toggle:not([hidden]) { width:40px;height:40px; } html body .site-navbar__menu-toggle { min-width:40px;width:40px;height:40px;padding:0;font-size:0; } html body .site-navbar__menu-toggle::before { content:'☰';font-size:20px; } html body .site-navbar__wrap { gap:.5rem; } }
@media(prefers-reduced-motion:reduce) { html { scroll-behavior:auto; } .site-theme-toggle { transition:none; } }

/* Shared page surfaces for utility, member, editor and admin views. */
html body :is(.page-shell,.page-container,.discussion-page,.members-page,.profile-page,.projects-page,.panel-page,.auth-page) { color:var(--theme-text); }
html body :is(.panel-card,.panel-section,.panel-widget,.discussion-card,.discussion-category-block,.member-card,.profile-card,.project-card,.auth-card) { background:var(--theme-surface); color:var(--theme-text); border-color:var(--theme-border); }
html body :is(.panel-card,.panel-section,.panel-widget,.discussion-card,.discussion-category-block,.member-card,.profile-card,.project-card,.auth-card) :is(h1,h2,h3,h4,strong,th) { color:var(--theme-text); }
html body :is(.muted,.panel-muted,.discussion-muted,.profile-muted,.auth-help,.form-help) { color:var(--theme-muted); }
html body :is(.panel-table-wrap,.discussion-table-wrap,.profile-table-wrap) { border-color:var(--theme-border); background:var(--theme-surface); }
html body :is(table) :is(th,td) { border-color:var(--theme-border); }
html body :is(table) th { background:var(--theme-surface-soft); color:var(--theme-text); }
html body :is(.notice,.alert,.flash,.panel-notice,.discussion-notice) { border-color:var(--theme-border); background:var(--theme-surface-soft); color:var(--theme-text); }
html body :is(.notice--success,.alert-success,.flash-success) { border-color:color-mix(in srgb,var(--theme-success) 38%,var(--theme-border)); background:color-mix(in srgb,var(--theme-success) 10%,var(--theme-surface)); }
html body :is(.notice--error,.alert-danger,.flash-error) { border-color:color-mix(in srgb,var(--theme-danger) 38%,var(--theme-border)); background:color-mix(in srgb,var(--theme-danger) 10%,var(--theme-surface)); }
html body :is(.tag,.badge,.chip) { border-color:var(--theme-border); background:var(--theme-surface-soft); color:var(--theme-text); }
@media(max-width:480px) { html body .site-navbar__menu-toggle::before { content:"\\2630"; } }
html body .home-build-card__code code { color:var(--theme-code-text); font:inherit; }
html body .home-build-card__code > span:nth-child(7) { background:transparent; }
html body .home-build-card__code .code-punct,html body .home-build-card__code .code-keyword { color:var(--theme-accent); }
html body .home-build-card__code .code-var { color:var(--theme-violet); }
html body .home-build-card__code .code-string { color:var(--theme-success); }
html body .home-build-card__code .code-comment { color:var(--theme-muted); }
html body [data-home-code-language] { transition:opacity 180ms ease; }
html body .home-build-card { transition:opacity 260ms ease,filter 260ms ease; }
html body .home-build-card.is-swapping { opacity:.18;filter:blur(2px); }
@media(prefers-reduced-motion:reduce) { html body .home-build-card { transition:none; } }
html body .home-process,html body .home-explore,html body .about-skill-tree { display:none; }
html body .home-portfolio-section:has(.home-portfolio-empty) { display:none; }
html body .about-overview { border-color:var(--theme-border); }
html body .about-overview__copy h2 { color:var(--theme-text); }
html body .about-overview__copy p { color:var(--theme-muted); }
html body .about-overview__details { border-color:var(--theme-border); }
html body .about-overview__details div { border-color:var(--theme-border); }
html body.about-page :is(.about-overview,.about-expertise) { padding:clamp(2.8rem,5vw,4.8rem) 0; border-top:0; }
html body.about-page .about-overview { grid-template-columns:minmax(0,1.15fr) minmax(320px,.85fr); gap:clamp(2rem,5vw,5rem); align-items:center; margin:2rem 0 4rem; padding:clamp(2rem,4vw,3.5rem); border:1px solid var(--theme-border); border-radius:var(--theme-radius); background:var(--theme-surface); box-shadow:var(--theme-shadow); }
html body.about-page .about-overview h2 { max-width:620px; font-size:clamp(2.2rem,3.6vw,3.7rem); line-height:1.02; }
html body.about-page .about-overview__copy > p { max-width:650px; font-size:.95rem; line-height:1.75; }
html body.about-page .about-overview__details { margin:0; padding:0; border:0; background:transparent; }
html body.about-page .about-capability-grid { border-top:0; border-bottom:0; }
@media(max-width:900px) { html body.about-page .about-overview { grid-template-columns:1fr; gap:1.8rem; margin:1rem 0 3rem; } }

/* Quiet animated mesh shared by every page. */
html body .site-ambient-bg { display:none; }
.site-modern-bg { position:fixed;inset:0;z-index:0;overflow:hidden;pointer-events:none;background:linear-gradient(145deg,var(--theme-bg),color-mix(in srgb,var(--theme-accent) 3%,var(--theme-bg)) 52%,var(--theme-bg)); }
.site-modern-bg::before { content:"";position:absolute;inset:-72px;background-image:linear-gradient(color-mix(in srgb,var(--theme-border) 38%,transparent) 1px,transparent 1px),linear-gradient(90deg,color-mix(in srgb,var(--theme-border) 38%,transparent) 1px,transparent 1px);background-size:72px 72px;mask-image:linear-gradient(to bottom,transparent,black 16%,black 82%,transparent);opacity:.48;animation:site-modern-grid 14s linear infinite; }
.site-modern-bg::after { content:"";position:absolute;width:120vmax;height:120vmax;left:50%;top:50%;translate:-50% -50%;background:conic-gradient(from 10deg,transparent 0 18%,rgba(var(--theme-accent-rgb),.11) 30%,transparent 43% 60%,rgba(var(--theme-info-rgb),.09) 72%,transparent 86%);filter:blur(55px);animation:site-modern-aurora 28s linear infinite; }
.site-modern-bg__glow { position:absolute;width:min(64vw,920px);aspect-ratio:1;border-radius:50%;filter:blur(72px);opacity:.38;will-change:transform; }
.site-modern-bg__glow--one { top:-30%;left:-16%;background:radial-gradient(circle,rgba(var(--theme-accent-rgb),.62),transparent 68%);animation:site-modern-drift-one 12s ease-in-out infinite alternate; }
.site-modern-bg__glow--two { top:16%;right:-24%;background:radial-gradient(circle,rgba(var(--theme-info-rgb),.48),transparent 68%);animation:site-modern-drift-two 16s ease-in-out infinite alternate; }
.site-modern-bg__glow--three { bottom:-38%;left:30%;background:radial-gradient(circle,rgba(var(--theme-violet-rgb),.4),transparent 68%);animation:site-modern-drift-three 19s ease-in-out infinite alternate; }
html[data-theme="dark"] .site-modern-bg::before { opacity:.27; }
html[data-theme="dark"] .site-modern-bg__glow { opacity:.3; }
@keyframes site-modern-grid { to { transform:translate3d(72px,72px,0); } }
@keyframes site-modern-aurora { to { transform:rotate(360deg); } }
@keyframes site-modern-drift-one { to { transform:translate3d(24vw,18vh,0) scale(1.12); } }
@keyframes site-modern-drift-two { to { transform:translate3d(-22vw,22vh,0) scale(.9); } }
@keyframes site-modern-drift-three { to { transform:translate3d(12vw,-22vh,0) scale(1.14); } }
@media(prefers-reduced-motion:reduce) { .site-modern-bg::before,.site-modern-bg::after,.site-modern-bg__glow { animation:none; } }
html body.discussion-page--detail .discussion-detail__actions :is(.discussion-btn,.discussion-comments-toolbar__action,.discussion-reply-toggle) { color:var(--theme-text) !important; background:transparent; }
html body.discussion-page--detail .discussion-detail__actions .discussion-report-trigger { color:var(--theme-danger) !important; }
html body.discussion-page--detail .discussion-detail__actions :is(.discussion-btn,.discussion-comments-toolbar__action,.discussion-reply-toggle):hover { color:var(--theme-accent) !important; background:var(--theme-link-hover-bg); }
