.footer {
  background: var(--fg-color-general);
  border-top: 1px solid var(--fg-color-primary-dim);
  padding: 2rem 0 1.5rem;
}

.footer-layout {
  display: grid;
  gap: 1.75rem;
}

.footer .social-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem 2rem;
}

.footer .social {
  margin: 0;
}

.footer .social a {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;

  color: var(--fg-color-primary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;

  transition: color 0.2s ease;
}

.footer .social-icon svg {
  width: 2.25rem;
  height: 2.25rem;

  fill: var(--fg-color-primary);
  border: 1px solid var(--fg-color-primary);
  border-radius: 50%;
  padding: 0.4rem;

  flex-shrink: 0;
  transition: fill 0.2s ease, border-color 0.2s ease;
}

.footer .social-handle {
  line-height: 1.35;
  white-space: nowrap;
}

.footer .social a:hover {
  color: var(--bg-color-primary-bright);
}

.footer .social a:hover svg {
  fill: var(--bg-color-primary-bright);
  border-color: var(--bg-color-primary-bright);
}

.footer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 243, 243, 0.18);
}

.footer .copyright_text p {
  margin: 0;
  padding: 0;
  color: var(--fg-color-primary-dark);
  font-size: 0.8rem;
  line-height: 1.5;
}

.footer .copyright_text p i {
    color: var(--bg-color-primary-bright);
}

.footer .copyright_text p a {
  color: var(--bg-color-primary-bright);
  text-underline-offset: 0.18em;
}

@media (max-width: 576px) {
  .footer {
    padding: 1.75rem 0 calc(1.25rem + env(safe-area-inset-bottom));
  }

  .footer .container {
    padding-right: 1.5rem;
    padding-left: 1.5rem;
  }

  .footer-layout {
    gap: 1.5rem;
  }

  .footer .social-links {
    width: max-content;
    max-width: 100%;
    margin: 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0.875rem;
  }

  .footer .social a {
    display: grid;
    grid-template-columns: 2.25rem minmax(0, 1fr);
    min-height: 2.25rem;
  }

  .footer-meta {
    gap: 0.75rem;
    padding-top: 1rem;
  }

  .footer-powered {
    text-align: right;
  }

  .scrollup {
    display: none;
  }
}

@media (max-width: 340px) {
  .footer-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-powered {
    text-align: left;
  }
}
