/* The second colorway keeps the site's ink, paper and wiring language. */
.theme-toggle{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:30px;padding:5px 8px;border:1px solid var(--ink);border-radius:0;background:transparent;color:var(--ink);font:700 10px/1 var(--mono);letter-spacing:.06em;cursor:pointer;transition:background .2s,color .2s,border-color .2s}
.theme-toggle:hover{background:var(--ink);color:var(--paper)}
.theme-toggle:active{transform:translate(1px,1px)}
.theme-symbol{display:inline-block;font-size:15px;line-height:.7;transform:rotate(-45deg);transition:transform .25s}
html[data-theme="dark"] .theme-symbol{transform:rotate(135deg)}
.masthead .theme-toggle{writing-mode:vertical-rl;margin-bottom:12px;min-height:38px}
.masthead .theme-toggle .theme-symbol{writing-mode:horizontal-tb}
.resume-toolbar .theme-toggle{border-color:rgba(255,255,255,.45);color:#fff}
.resume-toolbar .theme-toggle:hover{background:var(--orange);border-color:var(--orange)}
.error-tools{position:fixed;right:24px;top:24px;z-index:4;display:flex;align-items:center;gap:8px}
.error-tools .error-lang{position:static}
.error-tools .theme-toggle{border-color:rgba(255,255,255,.45);color:#fff}
.error-tools .theme-toggle:hover{background:var(--orange);border-color:var(--orange)}
@media(max-width:900px){.masthead .theme-toggle{writing-mode:horizontal-tb;margin:0 0 0 auto}.masthead nav+.theme-toggle{margin-left:auto}.masthead .theme-toggle+.lang-control{margin-left:10px}}
@media(max-width:560px){.masthead .theme-toggle{padding:5px 6px}.masthead .theme-state{display:none}.masthead .theme-toggle+.lang-control{margin-left:8px}.resume-toolbar .theme-toggle{padding:7px}.resume-toolbar .theme-state{display:none}.error-tools{right:16px;top:16px}}

html[data-theme="dark"]{color-scheme:dark;--paper:#161d20;--deep:#222b2d;--ink:#e9e4da;--muted:#b6bdb9;--orange:#e97655;--orange-bright:#ff9a76;--blue:#e97655;--rule:rgba(233,228,218,.24)}
html[data-theme="dark"] .masthead{background:rgba(22,29,32,.94)}
html[data-theme="dark"] .brand-symbol img{filter:invert(1)}
html[data-theme="dark"] .action-primary{color:#161d20}
html[data-theme="dark"] .action-primary:hover{color:#161d20}
html[data-theme="dark"] .skip-link{color:#161d20}
html[data-theme="dark"] .stack-section{background:#253032;color:#e9e4da}
html[data-theme="dark"] .project:hover{background:#273236}
html[data-theme="dark"] .contact-section{background:#803b30}
html[data-theme="dark"] .contact-label i{background:#e9e4da;box-shadow:0 0 0 6px rgba(233,228,218,.18)}
html[data-theme="dark"] footer{background:#101719;color:#e9e4da}
html[data-theme="dark"] .resume-body{background:#101719}
html[data-theme="dark"] .resume-toolbar{background:#101719}
html[data-theme="dark"] .resume-page{background:#20292c;color:#e9e4da;box-shadow:0 20px 70px rgba(0,0,0,.32)}
html[data-theme="dark"] .toolbar-lang .lang-select,html[data-theme="dark"] .error-lang .lang-select{background-color:#20292c;color:#e9e4da;border-color:rgba(233,228,218,.45)}
html[data-theme="dark"] .error-body{background:#161d20;color:#e9e4da}
html[data-theme="dark"] .error-route i{background:#161d20}
html[data-theme="dark"] .error-route i:nth-child(3){background:var(--orange)}
@media print{html[data-theme="dark"]{color-scheme:light;--paper:#f2efe7;--ink:#17212b;--muted:#657079;--orange:#c93618;--rule:rgba(23,33,43,.22)}html[data-theme="dark"] .resume-body,html[data-theme="dark"] .resume-page{background:#fff;color:#17212b;box-shadow:none}.theme-toggle{display:none!important}}

/* Small labels remain secondary, but no longer depend on 10px desktop text. */
.masthead nav a{font-size:clamp(13px,2.1vh,16px);line-height:1.1;letter-spacing:.05em}
.masthead .cv-link{font-size:12px}
.mark small{font-size:10px}
.brand-symbol{width:36px;height:36px}
.brand-symbol img{width:52px;height:52px}
@media(min-width:901px){.masthead .mark small{display:none}.masthead nav{gap:18px}}
.theme-toggle,.lang-select{font-size:11px}
.eyebrow,.action,.topology figcaption,.hero-index span,.section-code,.log-date,.log-no,.logbook h3 em,.ledger-row b,.project>span,.project-proof,.education-line time,.contact-links span,footer{font-size:12px}
.ledger-row span{font-size:11px}
.project p{font-size:16px;line-height:1.55}
.contact-label,.error-route b::after{font-size:12px}
.topology .map-node text{font-size:16px}
.topology .endpoint text{font-size:12px}
.topology .endpoint-count{font-size:13px}
@media screen{.resume-meta{font-size:14px}.resume-page h2,.resume-kicker,.resume-contact-note{font-size:12px}.resume-job li{font-size:14px;line-height:1.45}.resume-when,.resume-job h3 span,.resume-side time{font-size:12px}.resume-side p,.resume-side h3{font-size:13px}.resume-toolbar a,.resume-toolbar button{font-size:11px}}
@media(max-width:560px){.hero-index span{font-size:11px}.ledger-row b{font-size:11px}.topology figcaption{font-size:11px}.resume-meta{font-size:13px}}
@media(min-width:901px) and (max-height:650px){.masthead{padding-top:14px;padding-bottom:14px}.masthead nav{gap:14px}.masthead nav a{font-size:11px}.masthead .theme-toggle{min-height:32px;margin-bottom:7px}.masthead .theme-state{display:none}.lang-control{margin-bottom:9px}}
