/* Theme control shares the header without changing the centered mobile brand. */
.header-actions{display:flex;align-items:center;justify-self:end;gap:10px}
.mobile-menu-toggle{display:none}.mobile-menu-toggle .menu-close{display:none}
.theme-toggle{display:grid;place-items:center;width:42px;height:42px;padding:0;background:var(--surface);border:1px solid #33445e;border-radius:12px;color:var(--ink);flex:none}
.theme-toggle[hidden]{display:none}.theme-toggle .icon{width:20px;height:20px}.theme-toggle:hover{border-color:var(--blue);color:#8ecaff}.theme-toggle .theme-moon{display:none}
html[data-theme="light"] .theme-toggle .theme-sun{display:none}html[data-theme="light"] .theme-toggle .theme-moon{display:block}
html[data-theme="light"]{color-scheme:light;--bg:#f7f9fc;--surface:#fff;--surface-2:#eaf0f7;--ink:#142135;--muted:#536378;--line:#d5dfe9;scrollbar-color:#8babc9 var(--bg)}
html[data-theme="light"] .header,html[data-theme="light"] .mobile-nav{background:rgba(247,249,252,.96);border-color:var(--line)}
html[data-theme="light"] .header nav a,html[data-theme="light"] .header nav a:first-child,html[data-theme="light"] .mobile-nav a{color:#536378}
html[data-theme="light"] .header nav a.is-active,html[data-theme="light"] .header nav a:hover,html[data-theme="light"] .mobile-nav a.is-active{color:#142135}
html[data-theme="light"] .header nav a.is-active::after,html[data-theme="light"] .mobile-nav a.is-active::after{box-shadow:none}
html[data-theme="light"] .brand-name>span{color:#0065b3}html[data-theme="light"] .brand-symbol{background:#101c2c;border-radius:6px;padding:3px}
html[data-theme="light"] .header-cta,html[data-theme="light"] .theme-toggle{background:#fff;border-color:#a6b8cb;color:#142135}
html[data-theme="light"] .theme-toggle:hover{background:#eaf0f7;border-color:#0065b3;color:#0065b3}
html[data-theme="light"] .hero h1 span{background:none;color:#0065b3}
html[data-theme="light"] .hero-role{color:#142135}
html[data-theme="light"] .hero-description,html[data-theme="light"] .follow{color:#536378}
html[data-theme="light"] .hello{background:#eaf0f7;border-color:#c5d4e3;color:#253e58}
html[data-theme="light"] .follow-btn{background:#fff;border-color:#b6c8da;color:#253e58}
html[data-theme="light"] .highlights-inner{background:#fff;border-color:#d5dfe9;box-shadow:none}
html[data-theme="light"] .highlights-inner .stat-item strong{color:#142135}
html[data-theme="light"] .highlights-inner .stat-item p>span{color:#41536a}
html[data-theme="light"] .stat-item+.stat-item::before,html[data-theme="light"] .stat-item:nth-child(n+3)::after{background:#d5dfe9}
html[data-theme="light"] .stat-violet{--stat-color:#6942a4;--stat-bg:#f1ecf9}html[data-theme="light"] .stat-green{--stat-color:#187b43;--stat-bg:#e8f5ec}html[data-theme="light"] .stat-orange{--stat-color:#975900;--stat-bg:#fff1dd}html[data-theme="light"] .stat-pink{--stat-color:#a63170;--stat-bg:#fbeaf2}
html[data-theme="light"] .service-panel{background:#fff;color:#142135}
html[data-theme="light"] .service-introduction p{color:#536378}
html[data-theme="light"] .skill,html[data-theme="light"] .project,html[data-theme="light"] .project-grid.is-filtered .project{background:#fff;border-color:#d5dfe9}
html[data-theme="light"] .skill p{color:#536378}
html[data-theme="light"] .project-context{color:#0065b3}
html[data-theme="light"] .project-summary{color:#536378}
html[data-theme="light"] .project-outcome,html[data-theme="light"] .project[data-category="Automatización"] .project-outcome{color:#253e58}
html[data-theme="light"] .project-stack li{background:#edf3f9;border-color:#cad8e5;color:#41536a}
html[data-theme="light"] .project .project-open{border-color:#a6b8cb;color:#142135}
html[data-theme="light"] .project .project-open:hover{background:#eaf0f7;border-color:#0065b3}
html[data-theme="light"] .filters button{color:#536378;border-color:#cad8e5}
html[data-theme="light"] .filters button[aria-pressed="true"]{background:#dceeff;color:#005a9e;border-color:#86b7e1}
html[data-theme="light"] .text-link,html[data-theme="light"] .back-link,html[data-theme="light"] .contact-email,html[data-theme="light"] .contact-alternative a,html[data-theme="light"] .project-page-cover figcaption a,html[data-theme="light"] .project-next>.icon{color:#0065b3}
html[data-theme="light"] .text-link:hover,html[data-theme="light"] .contact-email:hover,html[data-theme="light"] .project-next:hover strong{color:#004b88}
html[data-theme="light"] .contact-layout{border-color:#d5dfe9}
html[data-theme="light"] .contact-form{border-color:#d5dfe9}
html[data-theme="light"] .form-field input,html[data-theme="light"] .form-field select,html[data-theme="light"] .form-field textarea{background:#fff;color:#142135;border-color:#8194a8;caret-color:#0065b3}
html[data-theme="light"] .form-field textarea::placeholder{color:#62748a}
html[data-theme="light"] .form-field input:user-invalid,html[data-theme="light"] .form-field select:user-invalid,html[data-theme="light"] .form-field textarea:user-invalid{border-color:#b12c45}
html[data-theme="light"] .footer-brand p{color:#536378}html[data-theme="light"] .footer .back-top{border-color:#a6b8cb;color:#253e58}
html[data-theme="light"] .project-page-heading>p,html[data-theme="light"] .project-page-section p,html[data-theme="light"] .project-intro-result p,html[data-theme="light"] .project-process p,html[data-theme="light"] .project-page-contact p{color:#536378}
html[data-theme="light"] .project-page-section p.project-page-lead{color:#253e58}
html[data-theme="light"] .project-time-comparison p:last-child strong{color:#0065b3}
html[data-theme="light"] .project-page-technologies li{background:#e5edf6;color:#253e58}
html[data-theme="light"] a:focus-visible,html[data-theme="light"] button:focus-visible,html[data-theme="light"] .form-field input:focus-visible,html[data-theme="light"] .form-field select:focus-visible,html[data-theme="light"] .form-field textarea:focus-visible{outline-color:#0065b3}
@media(min-width:761px) and (max-width:1000px){.header-inner{grid-template-columns:auto minmax(0,1fr) auto;gap:16px}.header nav{gap:13px}.header nav a{font-size:13px}}
@media(max-width:760px){.header-inner{position:relative}.header-actions{position:absolute;right:max(10px,env(safe-area-inset-right));top:50%;transform:translateY(-50%);gap:0}.theme-toggle{width:44px;height:40px;border:0;background:transparent;border-radius:8px}.theme-toggle .icon{width:20px;height:20px}}
@media(max-width:760px){
 body{padding-top:56px;padding-bottom:env(safe-area-inset-bottom)}
 html{scroll-padding-top:72px;scroll-padding-bottom:16px}
 .header-inner{min-height:56px;padding-block:8px}
 .mobile-menu-toggle:not([hidden]){display:grid;place-items:center;position:absolute;left:max(10px,env(safe-area-inset-left));top:50%;transform:translateY(-50%);width:44px;height:40px;border:0;border-radius:8px;background:transparent;color:var(--ink);padding:10px}
 .mobile-menu-toggle svg{width:23px;height:23px}
 .mobile-menu-toggle[aria-expanded="true"] .menu-bars{display:none}.mobile-menu-toggle[aria-expanded="true"] .menu-close{display:block}
 .mobile-menu-toggle:hover{background:var(--surface-2)}
 .mobile-nav{display:none;position:fixed;top:56px;bottom:auto;left:0;right:0;max-height:calc(100dvh - 56px);overflow-y:auto;padding:12px 20px 20px;background:var(--bg);border-top:0;border-bottom:1px solid var(--line);backdrop-filter:none;-webkit-backdrop-filter:none}
 .mobile-nav.is-open{display:flex;flex-direction:column;align-items:stretch}
 .mobile-nav a{flex:none;min-height:48px;justify-content:flex-start;padding:12px 16px;font-size:16px;line-height:1.4;border-radius:8px;color:var(--muted)}
 .mobile-nav a.is-active{background:var(--surface-2);color:var(--ink)}
 .mobile-nav a.is-active::after{display:none}
 .mobile-nav a:hover{background:var(--surface-2);color:var(--ink)}
}


:root[data-theme="light"] .project-contribution-list{color:var(--muted)}
