/**
 * Loaded with the legacy portfolio on the home page only.
 * Full-bleed main (no global header anymore).
 */
body.legacy-portfolio-active main.site-main {
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Deep links land below the browser chrome / notch area */
body.legacy-portfolio-active section#home,
body.legacy-portfolio-active section#about,
body.legacy-portfolio-active section#book,
body.legacy-portfolio-active section#company,
body.legacy-portfolio-active section#tools,
body.legacy-portfolio-active section#contact {
  scroll-margin-top: max(1.25rem, env(safe-area-inset-top, 0px));
}

/* ── Redesigned Footer ── */

.footer--redesign {
  background: linear-gradient(180deg, rgba(15, 15, 26, 0) 0%, rgba(15, 15, 26, 1) 15%) !important;
  padding: 4rem 0 0 !important;
}

.footer--redesign .footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

@media (min-width: 640px) {
  .footer--redesign .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 2rem 2.5rem;
  }
}

.footer--redesign .footer-brand__logo {
  display: inline-block;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #f9fafb;
  text-decoration: none;
  padding: 0.4rem 0.65rem;
  border-radius: 0.6rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.footer--redesign .footer-brand__logo:hover {
  color: #fff;
  border-color: rgba(129, 140, 248, 0.4);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.2);
  text-decoration: none;
}

.footer--redesign .footer-brand__tagline {
  margin: 0.85rem 0 0;
  font-size: 0.88rem;
  line-height: 1.6;
  color: rgba(209, 213, 219, 0.55);
}

.footer--redesign .footer-brand__social {
  display: flex;
  gap: 0.6rem;
  margin-top: 1rem;
}

.footer--redesign .footer-brand__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.footer--redesign .footer-brand__social a:hover {
  background: rgba(99, 102, 241, 0.3);
  border-color: rgba(129, 140, 248, 0.4);
  transform: translateY(-2px);
}

.footer--redesign .footer-brand__social .social-icon {
  width: 16px;
  height: 16px;
  fill: rgba(199, 210, 254, 0.8);
}

.footer--redesign .footer-brand__social a:hover .social-icon {
  fill: #fff;
}

.footer--redesign .footer-col__heading {
  margin: 0 0 0.65rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(167, 139, 250, 0.85);
}

.footer--redesign .footer-col__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.footer--redesign .footer-col__list a {
  font-size: 0.88rem;
  color: rgba(209, 213, 219, 0.7);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer--redesign .footer-col__list a:hover {
  color: #c7d2fe;
  text-decoration: none;
}

.footer--redesign .footer-divider {
  height: 1px;
  margin: 2.5rem 0 1.5rem;
  background: linear-gradient(90deg, transparent 0%, rgba(129, 140, 248, 0.2) 30%, rgba(129, 140, 248, 0.2) 70%, transparent 100%);
}

.footer--redesign .footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 2rem;
}

.footer--redesign .footer-bottom__copyright {
  margin: 0;
  font-size: 0.8rem;
  color: rgba(209, 213, 219, 0.4);
}

.footer--redesign .footer-bottom__legal {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer--redesign .footer-bottom__legal span {
  color: rgba(209, 213, 219, 0.25);
  font-size: 0.75rem;
}

.footer--redesign .footer-bottom__legal a {
  font-size: 0.8rem;
  color: rgba(209, 213, 219, 0.5);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer--redesign .footer-bottom__legal a:hover {
  color: #a5b4fc;
  text-decoration: none;
}

@media (max-width: 639px) {
  .footer--redesign .footer-grid {
    text-align: center;
  }

  .footer--redesign .footer-brand__social {
    justify-content: center;
  }

  .footer--redesign .footer-col__list {
    align-items: center;
  }

  .footer--redesign .footer-bottom {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
  }
}
