/* Portfolio-wide header and footer responsive rules. Excludes my-tools pages. */

header.site-nav {
  min-height: 68px;
}

.nav-brand {
  min-width: 0;
}

.nav-brand-text {
  min-width: 0;
}

.nav-name,
.nav-role {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-nav-drawer.open,
.mobile-nav-drawer.active {
  right: 0;
}

.mobile-nav-drawer {
  width: min(360px, 88vw);
  max-width: 88vw;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.mobile-drawer-links {
  min-height: 0;
}

.site-footer {
  overflow: hidden;
}

.site-footer .footer-content,
.site-footer .footer-bottom,
.site-footer .footer-inner {
  min-width: 0;
}

.site-footer .footer-bottom,
.site-footer .footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
}

.site-footer .footer-bottom > div:first-child,
.site-footer .footer-content > div:first-child,
.site-footer .footer-inner > div:first-child {
  min-width: 0;
}

@media (max-width: 960px) {
  header.site-nav {
    padding: 14px 5%;
  }

  .nav-menu-links {
    display: none !important;
  }

  .mobile-nav-toggle {
    display: inline-flex !important;
    flex: 0 0 auto;
  }
}

@media (max-width: 600px) {
  header.site-nav {
    min-height: 62px;
    padding: 11px 16px;
  }

  .nav-name {
    max-width: calc(100vw - 100px);
    font-size: 0.78rem !important;
    letter-spacing: 0.02em !important;
  }

  .nav-role {
    max-width: calc(100vw - 100px);
    font-size: 0.53rem !important;
    letter-spacing: 0.1em !important;
  }

  .mobile-nav-toggle {
    width: 38px;
    height: 38px;
  }

  .mobile-nav-drawer {
    padding: 20px 18px;
  }

  .drawer-brand {
    max-width: calc(100% - 46px);
    font-size: 0.68rem;
  }

  .drawer-link {
    min-height: 44px;
    padding: 11px 12px;
  }

  .site-footer {
    padding: 36px 16px 32px;
  }

  .site-footer .footer-content,
  .site-footer .footer-bottom,
  .site-footer .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }

  .site-footer .footer-links,
  .site-footer .footer-social-strip,
  .site-footer .footer-content > div:last-child,
  .site-footer .footer-bottom > div:last-child {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .site-footer .footer-inner > div[style*="border-top"] {
    width: 100% !important;
    align-items: flex-start !important;
    flex-direction: column;
  }

  .site-footer a {
    overflow-wrap: anywhere;
  }
}
