/* Stable visual and layout overrides. Kept separate from the legacy stylesheet. */
html[data-theme] body #welcome~.deck .slide[data-index] :is(.ulh-card,.ulh-svc,.project-card,.award-card,.paper-card,.ability-card){
  border-color:var(--tech-edge,rgba(92,221,237,.28)) !important;
  box-shadow:var(--tech-shadow,0 8px 24px rgba(2,10,24,.14),inset 0 1px 0 rgba(167,230,250,.12)) !important;
}
html{--tech-edge:rgba(92,221,237,.36);--tech-shadow:0 10px 28px rgba(2,10,24,.18),inset 0 1px 0 rgba(167,230,250,.16)}
html[data-theme="light"]{--tech-edge:rgba(26,109,128,.35);--tech-shadow:0 8px 22px rgba(38,73,103,.12),inset 0 1px 0 rgba(255,255,255,.8)}
html body :is(button,a,[role="button"]):focus-visible{outline:2px solid var(--tech-focus,#6fe1d5)!important;outline-offset:2px!important}

/* The project list now has twelve equal entries, so no item is featured-sized. */
@media (min-width:1201px){
  html body .slide[data-index="2"] .projects-grid.site-projects-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;grid-auto-rows:minmax(0,1fr)!important;align-items:stretch!important}
  html body .slide[data-index="2"] .projects-grid.site-projects-grid .project-card{grid-column:auto!important;grid-row:auto!important;height:100%!important;min-height:0!important}
}
@media (min-width:901px) and (max-width:1200px){
  html body .slide[data-index="2"] .projects-grid.site-projects-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;grid-auto-rows:minmax(0,1fr)!important;align-items:stretch!important}
  html body .slide[data-index="2"] .projects-grid.site-projects-grid .project-card{grid-column:auto!important;grid-row:auto!important;height:100%!important;min-height:0!important}
}

/* Reserve the fixed mobile navigation and keep the service list compact. */
@media (max-width:900px){
  html body .slide.active[data-index="1"] .slide-inner{height:calc(100% - 86px)!important;max-height:calc(100% - 86px)!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;padding-bottom:24px!important}
  html body .slide.active[data-index="1"] .ulhome-v2{min-height:0!important}
  html body .slide.active[data-index="1"] .ulh-console{min-height:0!important;height:auto!important;overflow:visible!important;margin-bottom:12px!important}
  html body .slide.active[data-index="1"] .ulh-console .ulh-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-auto-rows:54px!important;gap:9px!important;min-height:0!important}
  html body .slide.active[data-index="1"] .ulh-console .ulh-svc{width:auto!important;min-width:0!important;min-height:54px!important;padding:7px 8px!important;grid-template-columns:28px minmax(0,1fr) auto!important;gap:7px!important}
  html body .slide.active[data-index="1"] .ulh-console .ulh-svc i{width:28px!important;height:28px!important;font-size:.88rem!important}
  html body .slide.active[data-index="1"] .ulh-console .ulh-svc em{font-size:.48rem!important;padding:3px 5px!important}
  html body #guideFab,html body button#guideFab.fab{right:14px!important;bottom:calc(86px + env(safe-area-inset-bottom))!important}
}
