/* ===== Footer ===== */
footer {
    text-align: center;
    width: 100%;
    max-width: 100%;
    padding: 0.65rem 1rem;
    border-top: 1px solid var(--border);
    margin-top: auto;
    background-color: var(--secondary-bg);
    color: var(--body-text);
    overflow-x: clip;
}

/* ===== Footer Structure Enhancements ===== */
.footer-info {
  margin-bottom: 0.65rem;
}

.footer-copyright {
  margin: 0;
  font-weight: 600;
}

.working-timezone {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  color: var(--body-text);
  opacity: 0.9;
}

.footer-linkedin {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  justify-content: center;
  gap: 0.4rem;
}

.footer-linkedin img {
  width: 20px;
  height: 20px;
  opacity: 1;
  filter: invert(34%) sepia(22%) saturate(1436%) hue-rotate(133deg) brightness(92%) contrast(91%);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.footer-linkedin:hover {
  color: var(--hover-accent);
}

.footer-linkedin:hover img {
  transform: scale(1.06);
}

.footer-linkedin:focus-visible {
  outline: 3px solid var(--hover-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem;
}

.footer-links li {
  display: inline-flex;
  align-items: center;
}

.footer-links li:not(:last-child)::after {
  content: "\2022";
  margin-left: 0.85rem;
  color: var(--body-text);
  opacity: 0.65;
}

.footer-links a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--hover-accent);
}

/* ===== Footer: Dark Mode Consistency ===== */
body.dark-mode footer {
  background-color: var(--secondary-bg);
  color: var(--body-text);
  border-top: 1px solid var(--border);
}

html.high-contrast footer {
  background:
    radial-gradient(circle at 20% 20%, rgba(46, 230, 214, 0.08), transparent 24%),
    linear-gradient(180deg, #08111d 0%, #0b1623 100%) !important;
  color: #ffffff !important;
  border-top: 2px solid var(--border) !important;
}

html.high-contrast .footer-copyright,
html.high-contrast .working-timezone,
html.high-contrast .footer-links li:not(:last-child)::after {
  color: #ffffff !important;
}

html.high-contrast .footer-links a {
  color: var(--accent) !important;
}

html.high-contrast .footer-links a:hover,
html.high-contrast .footer-links a:focus-visible {
  color: var(--hover-accent) !important;
}

html.high-contrast .footer-linkedin img {
  filter:
    brightness(1.25)
    contrast(1.2)
    saturate(1.4)
    drop-shadow(0 0 5px rgba(94, 242, 232, 0.3));
  opacity: 1;
}

body.dark-mode .footer-linkedin img {
  filter: brightness(0) saturate(100%) invert(87%) sepia(29%) saturate(1633%)
    hue-rotate(121deg) brightness(105%) contrast(95%);
}

/* ===== Social Links Section ===== */
.social-links {
  display: flex;
  justify-content: center;
  gap: 1.8rem;
  margin-top: 0.75rem;
}

.social-links img {
  width: 42px;
  height: 42px;
  opacity: 0.85;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.social-links img:hover {
  opacity: 1;
  transform: scale(1.1);
}

/* Extra hit area for icons */
.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 8px;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.social-links a:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

body.dark-mode .social-links a:hover {
  background-color: rgba(255, 255, 255, 0.06);
}

.social-links a:active {
  transform: scale(0.96);
}

/* ===== Responsive Adjustment: Smaller Icons on Short Screens ===== */
@media (max-height: 640px) {
  .social-links img {
    width: 36px;
    height: 36px;
  }

  .social-links {
    gap: 1.5rem;
  }
}

/* ===== MOBILE FOOTER (inside max-width: 768px media query) ===== */
@media (max-width: 768px) {
  footer {
      padding: 0.85rem 1rem;
      font-size: 0.85rem;
  }

  .working-timezone {
      font-size: 0.82rem;
  }

  .footer-links ul {
      gap: 0.65rem;
  }

  .footer-links a {
      display: inline-flex;
      min-height: 44px;
      align-items: center;
      padding: 0.6rem 0.2rem;
  }

  .footer-links li:not(:last-child)::after {
      margin-left: 0.65rem;
  }
}

@media (max-width: 480px) {
  .footer-links ul {
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
  }

  .footer-links li:not(:last-child)::after {
    content: none;
  }

  .footer-links a {
    justify-content: center;
    padding-block: 0.4rem;
  }
}
