
/* Temi comuni – selettore in tutte le pagine */
:root{color-scheme:light}
html[data-theme="dark"]{color-scheme:dark;--blue:#78bbfa;--deep:#8bc4fa;--navy:#b5d8ff;--cyan:#38bdf8;--copy:#d4e5f9;--text:#d4e5f9;--line:#334f70;--pale:#132740}
html[data-theme="midnight"]{color-scheme:dark;--blue:#83b4ff;--deep:#93bfff;--navy:#c6dbff;--cyan:#7dd3fc;--copy:#c7dcff;--text:#c7dcff;--line:#26395e;--pale:#0b1734}
html[data-theme="dark"] body{background:#0b1728;color:var(--copy)}
html[data-theme="midnight"] body{background:#040b1d;color:var(--copy)}
html[data-theme="dark"] .sitehead,html[data-theme="dark"] .servicecard,html[data-theme="dark"] .panel,html[data-theme="dark"] .othercard{background:#16283e;color:var(--copy);border-color:#36506e}
html[data-theme="midnight"] .sitehead,html[data-theme="midnight"] .servicecard,html[data-theme="midnight"] .panel,html[data-theme="midnight"] .othercard{background:#101b34;color:var(--copy);border-color:#30466c}
html[data-theme="dark"] .hero:after{background:linear-gradient(90deg,#0616296e 0%,#142b42ad 39%,#142b42f5 60%,#10273ddf 100%)}
html[data-theme="midnight"] .hero:after{background:linear-gradient(90deg,#0309226e 0%,#06132cb5 39%,#071329f6 60%,#061125ee 100%)}
html[data-theme="dark"] .hero h1,html[data-theme="midnight"] .hero h1,html[data-theme="dark"] .hero p,html[data-theme="midnight"] .hero p,html[data-theme="dark"] .sectiontop h2,html[data-theme="midnight"] .sectiontop h2,html[data-theme="dark"] .about-copy h2,html[data-theme="midnight"] .about-copy h2,html[data-theme="dark"] .servicecard h3,html[data-theme="midnight"] .servicecard h3,html[data-theme="dark"] .work h3,html[data-theme="midnight"] .work h3{color:var(--navy)}
html[data-theme="dark"] .about{background:#14263b}html[data-theme="midnight"] .about{background:#0d1931}
html[data-theme="dark"] .mainnav a,html[data-theme="midnight"] .mainnav a{color:var(--copy)}
html[data-theme="dark"] .servicecard p,html[data-theme="midnight"] .servicecard p,html[data-theme="dark"] .work p,html[data-theme="midnight"] .work p{color:#a9c1d9}
html[data-theme="dark"] .btn.outline,html[data-theme="midnight"] .btn.outline{background:#162a43;color:#e5f4ff}
html[data-theme="dark"] .detailhero,html[data-theme="midnight"] .detailhero{background:var(--pale)}
html[data-theme="dark"] .main-content,html[data-theme="midnight"] .main-content{background:transparent;color:var(--copy)}
html[data-theme="dark"] .other,html[data-theme="midnight"] .other{background:var(--pale)}
.theme-control{display:inline-flex;align-items:center;gap:7px;margin-left:6px;padding:5px 9px;border:1px solid var(--line);border-radius:999px;background:var(--pale);color:var(--navy);font-size:12px;font-weight:700;white-space:nowrap}
.theme-control select{border:none;background:transparent;color:inherit;font-size:12px;font-weight:700;cursor:pointer;outline-offset:2px}
.theme-control select option{color:#122c4f;background:#fff}
html[data-theme="dark"] .theme-control select option,html[data-theme="midnight"] .theme-control select option{background:#13243e;color:#fff}
@media(max-width:700px){.theme-control{margin-left:auto;margin-right:10px}.mainnav{z-index:90}html[data-theme="dark"] .mainnav{background:#16283e}html[data-theme="midnight"] .mainnav{background:#101b34}}
.projectgrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;margin-top:24px}
.projectcard{display:block;border:1px solid var(--line);background:var(--pale);border-radius:12px;overflow:hidden;text-decoration:none;color:var(--copy);transition:transform .15s}
.projectcard:hover{transform:translateY(-4px)}.projectcard img{width:100%;height:180px;object-fit:cover;background:#c4d7e5}
.projectcard>div{padding:16px}.projectcard h2{font-size:18px;color:var(--blue);margin:0 0 7px}.projectcard p{margin:0 0 12px;font-size:13px}.projectcard span{color:var(--cyan);font-weight:700}
@media(max-width:850px){.projectgrid{grid-template-columns:repeat(2,1fr)}}@media(max-width:550px){.projectgrid{grid-template-columns:1fr}}
