/* NeoMorIT — final visual correction pass · 2026-09-11 */
:root{--fix-ink:#07172f;--fix-text:#233044;--fix-muted:#667085;--fix-line:#e4eaf1;--fix-blue:#0768d7;--fix-soft:#f6f9fc}
html,body{max-width:100%;overflow-x:hidden}
img,svg,video,canvas,iframe{max-width:100%;height:auto}
:where(main,section,article,aside,div,form,fieldset,table)>*{min-width:0}
:where(h1,h2,h3,h4,p,li,a,span,strong,label,address){overflow-wrap:anywhere}
input,select,textarea,button{max-width:100%}

/* Global shell: keep the desktop navigation from compressing at laptop/tablet widths. */
@media(max-width:1120px){
  .neo-global-brand-copy small{display:none!important}
  .neo-global-toggle{display:inline-flex!important}
  .neo-global-menu{display:none!important;position:fixed!important;top:80px!important;left:12px!important;right:12px!important;margin:0!important;padding:10px!important;flex-direction:column!important;align-items:stretch!important;background:rgba(255,255,255,.985)!important;border:1px solid var(--fix-line)!important;border-radius:20px!important;box-shadow:0 24px 70px rgba(7,23,47,.18)!important;max-height:calc(100dvh - 96px)!important;overflow:auto!important;z-index:10050!important}
  .neo-global-nav.is-open .neo-global-menu{display:flex!important}
  .neo-global-menu a{padding:12px 14px!important;border-radius:12px!important;font-size:14px!important}
}
@media(max-width:680px){
  .neo-global-nav-inner{width:calc(100% - 22px)!important;gap:7px!important}
  .neo-global-brand{min-width:0!important;max-width:calc(100% - 96px)!important}
  .neo-global-brand-copy{min-width:0!important}
  .neo-global-brand-copy strong{white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  .neo-global-cta{width:42px!important;height:42px!important;min-width:42px!important;padding:0!important;font-size:0!important;border-radius:13px!important;flex:0 0 42px!important}
  .neo-global-cta::after{content:'↗';font-size:17px!important}
}

/* Home navigation: switch to the compact menu before the links start squeezing. */
@media(min-width:761px) and (max-width:1080px){
  body[data-neo-page-family="home"] .nav-links{display:none!important;position:absolute!important;top:78px!important;left:18px!important;right:18px!important;margin:0!important;padding:10px!important;flex-direction:column!important;align-items:stretch!important;background:#fff!important;border:1px solid var(--fix-line)!important;border-radius:18px!important;box-shadow:0 22px 60px rgba(7,23,47,.16)!important;z-index:150!important}
  body[data-neo-page-family="home"] .topbar.open .nav-links{display:flex!important}
  body[data-neo-page-family="home"] .nav-links a{padding:12px 14px!important;border-radius:12px!important}
  body[data-neo-page-family="home"] .menu-btn{display:block!important}
}

/* UI/project screenshots should be readable, not cropped like photography. */
body[data-neo-page-family="home"] .case img{object-fit:contain!important;object-position:center!important;background:#f3f6fa!important;padding:7px!important}
body[data-neo-page-family="project"] :where(.hero img,.section img){object-fit:contain!important;object-position:center!important;background:#f3f6fa!important}

/* Projects listing: image first, information second. This overrides the old dark overlay cards. */
body[data-neo-page-family="core"] .card[data-project]{min-height:0!important;display:grid!important;grid-template-rows:auto 1fr!important;background:#fff!important;border:1px solid var(--fix-line)!important;border-radius:24px!important;box-shadow:0 14px 42px rgba(7,23,47,.07)!important;overflow:hidden!important;color:var(--fix-text)!important}
body[data-neo-page-family="core"] .card[data-project] img{position:relative!important;inset:auto!important;width:100%!important;height:auto!important;aspect-ratio:16/9!important;object-fit:contain!important;object-position:center!important;background:#f3f6fa!important;padding:9px!important;border-bottom:1px solid var(--fix-line)!important;filter:none!important;transform:none!important}
body[data-neo-page-family="core"] .card[data-project]:hover img{transform:scale(1.01)!important}
body[data-neo-page-family="core"] .card[data-project] .overlay{display:none!important}
body[data-neo-page-family="core"] .card[data-project] .content{position:relative!important;left:auto!important;right:auto!important;bottom:auto!important;color:var(--fix-text)!important;padding:21px 22px 23px!important}
body[data-neo-page-family="core"] .card[data-project] .tag{margin:0 0 10px!important;background:#eef6ff!important;color:var(--fix-blue)!important;border:1px solid #d9ebff!important;backdrop-filter:none!important;font-size:10px!important}
body[data-neo-page-family="core"] .card[data-project] .content h2{font-family:"DM Sans",system-ui,-apple-system,"Segoe UI",sans-serif!important;color:var(--fix-ink)!important;font-size:clamp(21px,2vw,27px)!important;line-height:1.12!important;margin:0 0 10px!important}
body[data-neo-page-family="core"] .card[data-project] .meta{color:var(--fix-muted)!important;font-size:12px!important;gap:7px!important}
body[data-neo-page-family="core"] .card[data-project] .meta span{padding:5px 8px!important;border-radius:999px!important;background:#f4f7fa!important}
body[data-neo-page-family="core"] .card[data-project] .arrow{top:14px!important;right:14px!important;width:38px!important;height:38px!important;background:rgba(255,255,255,.94)!important;border:1px solid var(--fix-line)!important;color:var(--fix-blue)!important;box-shadow:0 8px 24px rgba(7,23,47,.08)!important}
body[data-neo-page-family="core"] .popup-visual{background:#f3f6fa!important}
body[data-neo-page-family="core"] .popup-visual img{object-fit:contain!important;padding:12px!important;background:#f3f6fa!important}

/* Cleaner rhythm on legacy/core pages. */
body[data-neo-page-family]:not([data-neo-page-family="home"]) :where(.card,.sa-card,.seo-resource-card){height:auto!important}
body[data-neo-page-family]:not([data-neo-page-family="home"]) :where(.table-wrap){max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
body[data-neo-page-family]:not([data-neo-page-family="home"]) :where(table){max-width:100%}
body[data-neo-page-family="article"] :where(.article-body,.article-content,.post-content,main article){width:min(100%,780px)!important}
body[data-neo-page-family="article"] :where(img:not(.neo-global-brand-mark img):not(.neo-global-footer img)){border-radius:18px}

/* Mobile density and tap targets. */
@media(max-width:760px){
  body[data-neo-page-family]:not([data-neo-page-family="home"]) :where(h1){font-size:clamp(34px,10.5vw,48px)!important;line-height:1.02!important}
  body[data-neo-page-family]:not([data-neo-page-family="home"]) :where(h2){font-size:clamp(27px,8vw,36px)!important}
  body[data-neo-page-family]:not([data-neo-page-family="home"]) :where(.hero,.section,.sa-section,.seo-main){padding-left:0!important;padding-right:0!important}
  body[data-neo-page-family="core"] .grid{gap:14px!important}
  body[data-neo-page-family="core"] .card[data-project] .content{padding:18px!important}
  body[data-neo-page-family="core"] .projects-link-row{align-items:flex-start!important;flex-direction:column!important}
  .neo-global-footer :where(a,span,address){overflow-wrap:anywhere}
}

/* Sticky CTA stays out of the hero and appears only after scroll. */
@media(max-width:760px){
  body[data-neo-page-family="home"] .mobile-sticky{opacity:0!important;visibility:hidden!important;pointer-events:none!important;transform:translateY(18px)!important;transition:opacity .22s ease,transform .22s ease,visibility .22s ease!important}
  body[data-neo-page-family="home"] .mobile-sticky.is-visible{opacity:1!important;visibility:visible!important;pointer-events:auto!important;transform:none!important}
}

/* Forms and long contact details cannot push the layout wider than the viewport. */
:where(.field,.form-group,.newsletter-form,.modal-card){min-width:0!important}
:where(input,select,textarea){width:100%;min-width:0}
