/* System preference is the default; manual choices use these same palettes. */
:root{--focus:var(--accent);--selection-ink:#202427}
:root[data-theme="dark"]{color-scheme:dark;--paper:#202427;--ink:#ebe7df;--muted:#b4b8b6;--white:#282d31;--line:#454c50;--lime:var(--accent);--surface:#282d31;--raised:#30363a;--accent:#e6a093;--focus:var(--accent)}
:root[data-theme="light"]{color-scheme:light;--paper:#f2ede3;--white:#faf7f0;--line:#d6cfc2;--surface:#faf7f0;--raised:#e9e3d7;--accent:#8a3232;--lime:var(--accent);--focus:var(--accent);--accent-ink:#fff;--selection-ink:#fff}
[data-theme="light"] .project-card,[data-theme="light"] .notebook,[data-theme="light"] .skip,[data-theme="light"] .model-toolbar button,[data-theme="light"] .contact-form input,[data-theme="light"] .contact-form textarea{background:var(--surface)}
[data-theme="light"] .card-wordmark,[data-theme="light"] .car-card .card-wordmark,[data-theme="light"] .university-card .card-wordmark,[data-theme="light"] .notebook-header,[data-theme="light"] .project-facts,[data-theme="light"] .garage-car,[data-theme="light"] .contact-section,[data-theme="light"] .model-stage{background:var(--raised)}
[data-theme="light"] .model-empty{background:var(--paper);border-color:#aba394}
[data-theme="light"] .garage-year{border-color:var(--line)}
[data-theme="light"] .workbench{box-shadow:10px 10px 0 #ded6c8}
@media(max-width:760px){[data-theme="light"] .workbench{box-shadow:6px 6px 0 #ded6c8}}
.header-controls{display:flex;gap:10px;align-items:center;flex-shrink:0}
.theme-toggle{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:10px 12px;border:1px solid var(--line);background:transparent;color:var(--ink);font:500 .75rem/1 var(--mono);cursor:pointer}
.theme-toggle[hidden]{display:none}.theme-toggle:hover{border-color:var(--ink)}
.theme-toggle svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.theme-toggle .theme-system{display:none}
[data-theme-preference="system"] .theme-toggle .theme-system{display:block}
[data-theme-preference="system"] .theme-toggle .theme-sun,[data-theme-preference="system"] .theme-toggle .theme-moon,[data-theme-preference="dark"] .theme-sun,[data-theme-preference="light"] .theme-moon{display:none}
a:focus-visible,button:focus-visible,summary:focus-visible{outline:3px solid var(--focus);outline-offset:4px}
::selection{background:var(--lime);color:var(--selection-ink)}
[data-theme="dark"] .skip{background:var(--raised);color:var(--ink)}
[data-theme="dark"] .brand-mark{background:var(--raised);color:var(--accent)}
[data-theme="dark"] .languages a[aria-current=true]{background:var(--raised);color:var(--accent)}
[data-theme="dark"] .site-header nav a[aria-current=page]:after{background:var(--accent)}
[data-theme="dark"] .tag.green,[data-theme="dark"] .button-link,[data-theme="dark"] .contact-send,[data-theme="dark"] .model-start{background:var(--accent);border-color:var(--accent);color:var(--paper)}
[data-theme="dark"] .workbench{background:var(--surface);color:var(--ink);border:1px solid var(--line);box-shadow:10px 10px 0 #191d20}
[data-theme="dark"] .bench-top,[data-theme="dark"] .workbench .text-link,[data-theme="dark"] .interest-list,[data-theme="dark"] .interest-list span,[data-theme="dark"] .garage-year{border-color:var(--line)}
[data-theme="dark"] .bench-top>.meta,[data-theme="dark"] .bench-title p,[data-theme="dark"] .bench-focus,[data-theme="dark"] .conversion .meta,[data-theme="dark"] .identity-card p{color:var(--muted)}
[data-theme="dark"] .conversion{background:var(--raised)}
[data-theme="dark"] .project-card,[data-theme="dark"] .notebook,[data-theme="dark"] .identity-card{background:var(--surface);color:var(--ink)}
[data-theme="dark"] .project-card:hover{border-color:var(--accent)}
[data-theme="dark"] .card-wordmark,[data-theme="dark"] .car-card .card-wordmark,[data-theme="dark"] .university-card .card-wordmark,[data-theme="dark"] .notebook-header{background:var(--raised)}
[data-theme="dark"] .printer-card .card-wordmark span,[data-theme="dark"] .accent-letter,[data-theme="dark"] .entry-end{color:var(--accent)}
[data-theme="dark"] .car-card .card-wordmark span,[data-theme="dark"] .university-card .card-wordmark span,[data-theme="dark"] .garage-title h2 span{color:var(--accent)}
[data-theme="dark"] .project-facts,[data-theme="dark"] .garage-car,[data-theme="dark"] .contact-section{background:var(--surface)}
[data-theme="dark"] .muted-note{border-color:var(--accent)}
[data-theme="dark"] .version-roadmap li.current-version{background:var(--surface);border-color:#81645f}
[data-theme="dark"] .version-number{color:var(--accent)}
[data-theme="dark"] .model-empty{background:var(--surface);border-color:var(--line)}
[data-theme="dark"] .model-stage{background:var(--raised)}
[data-theme="dark"] .model-toolbar button{background:var(--surface);border-color:var(--line);color:var(--ink)}
[data-theme="dark"] .model-toolbar button:hover{background:var(--raised);border-color:var(--accent)}
[data-theme="dark"] .contact p,[data-theme="dark"] .contact-section .form-hint,[data-theme="dark"] .contact-section .contact-notice{color:var(--muted)}
[data-theme="dark"] .contact-form input,[data-theme="dark"] .contact-form textarea{background:var(--paper);border-color:var(--line);color:var(--ink)}
[data-theme="dark"] .contact-form input:focus-visible,[data-theme="dark"] .contact-form textarea:focus-visible,[data-theme="dark"] .contact-send:focus-visible,[data-theme="dark"] .model-viewer button:focus-visible,[data-theme="dark"] .model-stage canvas:focus-visible{outline-color:var(--accent)}
@media(max-width:1150px){.site-header{gap:20px}.site-header nav{gap:16px}.header-controls{gap:6px}}
@media(min-width:761px) and (max-width:960px){.site-header{flex-wrap:wrap;padding-top:20px;padding-bottom:12px}.header-controls{margin-left:auto}.site-header nav{order:3;width:100%;margin:0;justify-content:space-between}}
@media(max-width:760px){.header-controls{margin-left:auto}.header-controls .languages{margin-left:0}.theme-toggle{padding:10px;min-width:44px}.theme-toggle-label{display:none}[data-theme="dark"] .workbench{box-shadow:6px 6px 0 #191d20}}
@media(max-width:380px){.site-header{gap:10px}.header-controls{gap:5px}.brand small{font-size:.65rem}}

/* A shared accent ties project initials, status badges and the personal mark together. */
:root{--accent-ink:#10232e}
[data-theme="dark"]{--accent-ink:#202427}
[data-theme] .brand-mark,[data-theme] .initials,[data-theme] .initials span,[data-theme] .bench-title>span,[data-theme] .printer-card .card-wordmark span,[data-theme] .university-card .card-wordmark span,[data-theme] .accent-letter{color:var(--accent)}
[data-theme] .tag.green{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
[data-theme="light"] .version-roadmap li.current-version{background:#eee1dc;border-color:var(--accent)}
[data-theme="light"] .version-number,[data-theme="light"] .entry-end{color:var(--accent)}
[data-theme="light"] .muted-note{border-color:var(--accent)}
[data-theme="light"] .model-toolbar button:hover{background:var(--accent);color:var(--accent-ink)}
[data-theme="light"] .brand-mark,[data-theme="light"] .workbench,[data-theme="light"] .identity-card{background:var(--surface);border:1px solid var(--line)}
[data-theme="light"] .workbench,[data-theme="light"] .identity-card{color:var(--ink)}
[data-theme="light"] .conversion{background:var(--raised)}
[data-theme="light"] .bench-top>.meta,[data-theme="light"] .bench-title p,[data-theme="light"] .bench-focus,[data-theme="light"] .conversion .meta,[data-theme="light"] .identity-card p{color:var(--muted)}
[data-theme="light"] .bench-top,[data-theme="light"] .workbench .text-link,[data-theme="light"] .interest-list,[data-theme="light"] .interest-list span{border-color:var(--line)}
