/* N1K0DER mobile stability layer v4.1.1 — loaded after the visual baseline. */

html,
body,
#root,
.portfolioMain,
.projectsPage,
.projects-page,
.page-projects {
  max-width: 100%;
  overflow-x: hidden;
}

@supports (overflow: clip) {
  html,
  body,
  #root,
  .portfolioMain,
  .projectsPage,
  .projects-page,
  .page-projects {
    overflow-x: clip;
  }
}

@media (max-width: 1024px) {
  .page-projects .projectBentoGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-auto-rows: auto !important;
  }

  .page-projects .projectBentoCard,
  .page-projects .projectBentoCard.big,
  .page-projects .projectBentoCard.wide {
    grid-column: auto !important;
    grid-row: auto !important;
    min-height: 360px !important;
  }
}

@media (max-width: 760px) {
  :root {
    --nk-mobile-gutter: 12px;
  }

  html,
  body,
  #root,
  .portfolioMain,
  .page-home,
  .page-projects {
    width: 100% !important;
    min-width: 0 !important;
  }

  body {
    overscroll-behavior-x: none;
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
  }

  img,
  video,
  iframe,
  canvas,
  svg {
    max-width: 100%;
  }

  .premiumHeaderV1.portfolioHeader {
    top: 8px !important;
    right: 8px !important;
    left: 8px !important;
    width: auto !important;
    max-width: calc(100vw - 16px) !important;
    min-width: 0 !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    padding: 8px 9px 8px 12px !important;
    border: 1px solid rgba(144, 232, 255, .18) !important;
    border-radius: 18px !important;
    background: rgba(4, 11, 18, .9) !important;
    box-shadow: 0 18px 48px rgba(0, 0, 0, .38) !important;
    transform: none !important;
    -webkit-backdrop-filter: blur(18px) saturate(1.08) !important;
    backdrop-filter: blur(18px) saturate(1.08) !important;
  }

  .portfolioHeader .premiumHeaderV1Brand,
  .portfolioHeader .premiumHeaderV1Text {
    min-width: 0 !important;
  }

  .portfolioHeader .premiumHeaderV1Text b {
    display: block;
    max-width: 100%;
    overflow: hidden;
    font-size: 12px !important;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .portfolioHeader .premiumHeaderV1Text small,
  .portfolioHeader .premiumHeaderV1Contact {
    display: none !important;
  }

  .portfolioHeader .premiumHeaderV1Menu {
    display: grid !important;
    width: 42px !important;
    height: 42px !important;
    place-items: center;
    border: 1px solid rgba(144, 232, 255, .23) !important;
    border-radius: 13px !important;
    background: rgba(8, 21, 33, .94) !important;
  }

  .portfolioHeader .premiumHeaderV1Nav {
    position: absolute !important;
    top: calc(100% + 7px) !important;
    right: 0 !important;
    left: 0 !important;
    width: 100% !important;
    min-width: 0 !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
    padding: 8px !important;
    border: 1px solid rgba(144, 232, 255, .18) !important;
    border-radius: 16px !important;
    background: rgba(3, 9, 16, .97) !important;
    box-shadow: 0 24px 64px rgba(0, 0, 0, .58) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    backdrop-filter: blur(20px) !important;
  }

  .portfolioHeader .premiumHeaderV1Nav a {
    min-width: 0 !important;
    min-height: 44px !important;
    padding: 0 10px !important;
    border-radius: 10px !important;
    overflow-wrap: anywhere;
  }

  .page-home .hybridCinematicHero {
    min-height: auto !important;
    padding: 82px 8px 28px !important;
    overflow: hidden !important;
  }

  .page-home .hybridCinematicHero .cinematicHeroInner {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .page-home .hybridCinematicHero .cinematicWorkspace {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 650px !important;
    border-radius: 26px !important;
    animation: none !important;
    transform: none !important;
  }

  .page-home .hybridCinematicHero .workspaceContent {
    right: 17px !important;
    bottom: 20px !important;
    left: 17px !important;
    width: auto !important;
    max-width: calc(100% - 34px) !important;
    min-width: 0 !important;
  }

  .page-home .hybridCinematicHero .workspaceContent h1 {
    max-width: 100% !important;
    font-size: clamp(38px, 12vw, 54px) !important;
    line-height: .91 !important;
    letter-spacing: -.062em !important;
    overflow-wrap: normal;
  }

  .page-home .hybridCinematicHero .workspaceContent h1 span {
    margin-top: 5px !important;
  }

  .page-home .hybridCinematicHero .cinematicLead {
    max-width: 100% !important;
    margin-top: 13px !important;
    font-size: 14px !important;
    line-height: 1.42 !important;
  }

  .page-home .hybridHeroTech {
    max-width: 100% !important;
    margin-top: 12px !important;
  }

  .page-home .hybridCinematicHero .cinematicActions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    width: 100% !important;
    margin-top: 15px !important;
  }

  .page-home .hybridCinematicHero .cinematicBtn {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 46px !important;
    justify-content: center !important;
  }

  .page-home .hybridCinematicHero .workspaceMiniPanel,
  .page-home .hybridCinematicHero .workspaceScan {
    display: none !important;
  }

  .page-home .hybridWorkspaceMedia .heroShowreelMedia img,
  .page-home .hybridWorkspaceMedia .heroShowreelMedia video,
  .page-home .hybridCinematicHero .cinematicHeroBg,
  .mainOneBackground {
    animation: none !important;
    transform: none !important;
  }

  .page-home section,
  .page-projects section,
  .page-home .portfolioSectionHeader,
  .page-home .moreProjectsHeader,
  .page-home .selectedWorkCard,
  .page-home .selectedWorkVisual,
  .page-home .selectedWorkBody,
  .page-home .engineeringCase,
  .page-home .moreProjectCard,
  .page-home .contactFinalShell {
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .page-projects .subPageHero {
    display: none !important;
  }

  .page-projects .projectArchiveSection,
  .page-projects .projectBentoSection {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 96px var(--nk-mobile-gutter) 58px !important;
    overflow: visible !important;
  }

  .page-projects .projectBentoTop {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 14px !important;
    width: 100% !important;
    min-width: 0 !important;
    margin-bottom: 20px !important;
    padding-bottom: 18px !important;
  }

  .page-projects .projectBentoTop > * {
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .page-projects .projectBentoTop h2 {
    max-width: 100% !important;
    font-size: clamp(39px, 11.8vw, 54px) !important;
    line-height: .92 !important;
    letter-spacing: -.06em !important;
    overflow-wrap: anywhere;
  }

  .page-projects .projectBentoTop p {
    max-width: 100% !important;
    font-size: 14px !important;
    line-height: 1.48 !important;
    white-space: normal !important;
    display: block !important;
    overflow: visible !important;
    -webkit-line-clamp: unset !important;
  }

  .page-projects .projectBentoBuildsLink {
    width: 100% !important;
    min-height: 46px !important;
    justify-content: center !important;
    border-radius: 12px !important;
  }

  .page-projects .projectBentoTabs {
    box-sizing: border-box !important;
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 0 16px !important;
    padding: 2px 0 8px !important;
    gap: 7px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x proximity;
    scroll-padding-inline: 1px;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .page-projects .projectBentoTabs::-webkit-scrollbar {
    display: none;
  }

  .page-projects .projectBentoTabs button {
    flex: 0 0 auto !important;
    min-height: 42px !important;
    padding: 0 13px !important;
    border-radius: 11px !important;
    white-space: nowrap !important;
    scroll-snap-align: start;
  }

  .page-projects .projectBentoGrid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-auto-rows: auto !important;
    gap: 14px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    align-items: stretch !important;
    animation: none !important;
    transform: none !important;
    filter: none !important;
  }

  .page-projects .projectBentoCard,
  .page-projects .projectBentoCard.big,
  .page-projects .projectBentoCard.wide {
    box-sizing: border-box !important;
    grid-column: auto !important;
    grid-row: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 390px !important;
    overflow: hidden !important;
    border: 1px solid rgba(145, 231, 255, .17) !important;
    border-radius: 22px !important;
    background: #07101b !important;
    box-shadow: 0 22px 54px rgba(0, 0, 0, .3) !important;
    content-visibility: auto;
    contain: layout paint style;
    contain-intrinsic-size: auto 390px;
    animation: none !important;
    transition: border-color .22s ease, box-shadow .22s ease !important;
    transform: none !important;
    filter: none !important;
    opacity: 1 !important;
  }

  .page-projects .projectBentoImage,
  .page-projects .projectBentoImage img {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    animation: none !important;
    transform: none !important;
  }

  .page-projects .projectBentoLeaves,
  .page-projects .projectBentoPlay {
    display: none !important;
  }

  .page-projects .projectBentoCard.big .projectBentoContent,
  .page-projects .projectBentoContent {
    right: 16px !important;
    bottom: 16px !important;
    left: 16px !important;
    width: auto !important;
    max-width: calc(100% - 32px) !important;
    min-width: 0 !important;
  }

  .page-projects .projectBentoHead,
  .page-projects .projectBentoType,
  .page-projects .projectBentoTags {
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .page-projects .projectBentoCard.big .projectBentoContent h3,
  .page-projects .projectBentoContent h3 {
    max-width: 100% !important;
    font-size: clamp(28px, 8.5vw, 36px) !important;
    line-height: .94 !important;
    letter-spacing: -.045em !important;
    overflow-wrap: anywhere;
  }

  .page-projects .projectBentoCard.big .projectBentoContent p,
  .page-projects .projectBentoContent p {
    max-width: 100% !important;
    font-size: 13px !important;
    line-height: 1.38 !important;
  }

  .page-projects .projectBentoTags {
    flex-wrap: wrap !important;
    overflow: hidden !important;
  }

  .page-projects .projectBentoTags span:nth-child(n+4) {
    display: none !important;
  }

  .page-projects .projectBentoHint,
  .page-projects .projectBentoBottomNote {
    display: none !important;
  }

  .cursorGlow,
  .grainOverlay,
  .premiumNoise,
  .premiumScanlines {
    display: none !important;
  }
}

@media (max-width: 390px) {
  .page-home .hybridCinematicHero .cinematicWorkspace {
    min-height: 630px !important;
  }

  .page-home .hybridCinematicHero .workspaceContent h1 {
    font-size: clamp(36px, 11.7vw, 46px) !important;
  }

  .page-projects .projectBentoTop h2 {
    font-size: clamp(37px, 11.4vw, 46px) !important;
  }

  .page-projects .projectBentoCard,
  .page-projects .projectBentoCard.big,
  .page-projects .projectBentoCard.wide {
    min-height: 370px !important;
    contain-intrinsic-size: auto 370px;
  }
}

@media (max-width: 480px) {
  .page-projects .projectBentoTabs {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    overflow: visible !important;
    padding-bottom: 0 !important;
    scroll-snap-type: none;
    touch-action: manipulation;
  }

  .page-projects .projectBentoTabs button {
    width: 100% !important;
    min-width: 0 !important;
    justify-content: center !important;
  }

  .page-projects .projectBentoTabs button.active {
    border-color: rgba(174, 242, 255, .64) !important;
    color: #031015 !important;
    background: linear-gradient(135deg, #a7f7ff, #70dff4) !important;
    box-shadow: 0 10px 28px rgba(75, 207, 229, .18) !important;
  }
}

@media (hover: none) and (pointer: coarse) {
  .page-projects .projectBentoCard:hover,
  .page-home .selectedWorkCard:hover .selectedWorkVisual,
  .page-home .engineeringCard:hover,
  .page-home .moreProjectCard:hover {
    transform: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto !important;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
