/* V3.05.6: mobile readability, keyboard focus, stable media previews,
   reduced motion and server-rendered CMS content before JSON hydration. */
:root { -webkit-text-size-adjust:100%; }
.topbar .nav > .theme-button {margin-left:0 !important;}
.project-card[data-seo-pre-render="true"] .frame {position:relative;height:100%;overflow:hidden;}
.project-card[data-seo-pre-render="true"] .media-stack,
.project-card[data-seo-pre-render="true"] .media-layer {height:100%;width:100%;}
.project-card[data-seo-pre-render="true"] .media-layer {object-fit:cover;}
.project-pre-render {padding:clamp(32px,5vw,88px) clamp(18px,6vw,100px);max-width:1100px;margin:auto;}
.project-pre-render p {max-width:70ch;font-family:var(--portfolio-font-primary,Archivo,sans-serif);font-size:clamp(1.05rem,1.75vw,1.5rem);line-height:1.55;margin:0 0 1.5em;}
.project-pre-render-summary {font-weight:600;}
.nav button:focus-visible, .nav a:focus-visible,
.award-entry-link:focus-visible, .project-link:focus-visible,
.brand:focus-visible, .back-to-top:focus-visible {
  outline:2px solid currentColor !important;outline-offset:-3px !important;
}
.hello-award-item h3,.hello-award-item p {overflow-wrap:anywhere;}
.hello-award-item .award-entry-link {word-break:normal;overflow-wrap:anywhere;}
.hello-award-item .award-preview {max-width:min(360px,calc(100vw - 32px));}
@media(max-width:760px) {
  .topbar {grid-template-columns:minmax(0,1fr) !important;overflow:visible !important;}
  .topbar .brand {min-height:46px !important;padding:10px 16px !important;line-height:1.2 !important;
    font-size:clamp(.69rem,2.6vw,.9rem) !important;letter-spacing:.025em !important;overflow-wrap:anywhere;}
  .topbar .nav {width:100%;min-width:0 !important;display:grid !important;
    grid-template-columns:repeat(5,minmax(0,1fr)) !important;border-left:0 !important;border-top:1px solid var(--line);margin:0 !important;gap:0 !important;}
  .topbar .nav > * {min-height:44px !important;min-width:0 !important;
    width:auto !important;margin:0 !important;padding:8px 3px !important;
    white-space:normal !important;font-size:clamp(.59rem,2.45vw,.74rem) !important;
    line-height:1.15 !important;text-align:center;word-break:keep-all;}
  .topbar .nav > *:first-child {border-left:0 !important;}
  #helloMode .hello-award-item {grid-template-columns:minmax(68px,.27fr) minmax(0,1fr) !important;
    gap:12px !important;padding:23px 0 28px !important;}
  #helloMode .hello-award-item h3 {font-size:clamp(1.08rem,4.4vw,1.5rem) !important;line-height:1.24 !important;}
  #helloMode .hello-award-item p {font-size:clamp(.85rem,3.45vw,1rem) !important;line-height:1.5 !important;}
  #helloMode .hello-statement {font-size:clamp(1.55rem,6.4vw,2.45rem) !important;line-height:1.18 !important;}
  .hello-award-item .award-preview {left:0 !important;top:calc(100% + 8px);width:min(260px,75vw);}
  .project-pre-render {padding:32px 16px;}
}
@media(max-width:390px) {
  body.index-v3-02 .hello-section {padding-inline:16px !important;}
  #helloMode .hello-award-item {grid-template-columns:70px minmax(0,1fr) !important;gap:8px !important;}
}
@media(hover:none) and (pointer:coarse) {
  /* No floating image on a phone; focus or tapping the award opens its URL directly. */
  .hello-award-item .award-preview {display:none !important;}
  .award-entry-link {touch-action:manipulation;}
}
@media(prefers-reduced-motion:reduce) {
  html {scroll-behavior:auto !important;}
  .welcome-screen, html.portfolio-welcome-pending .welcome-screen {display:none !important;}
  .welcome-slat, .portfolio-blinds-overlay, .portfolio-base-fade-overlay {animation:none !important;transition:none !important;}
  #helloMode [data-trim-line] > .trim-stroke-v305 {transition:none !important;transform:scaleX(1) !important;will-change:auto !important;}
  #helloMode [data-hello-reveal],
  #workGrid .project-card,#labGrid .project-card,
  .is-base-mode-fade-in,.is-base-mode-fade-out {transition:none !important;animation:none !important;opacity:1 !important;filter:none !important;}
  .award-preview, .project-card .media-layer, .project-card .frame {transition:none !important;animation:none !important;}
}
