:root {
  --baic-navy: #f8fafc;
  --baic-blue: #e2e8f0;
  --baic-accent: #00c2ff;
  --baic-ice: #0f172a;
}

html.dark {
  --baic-navy: #0a2540;
  --baic-blue: #0b3c5d;
  --baic-accent: #00c2ff;
  --baic-ice: #e6f7ff;
}

body {
  font-family: "IBM Plex Sans", system-ui, sans-serif;
}

/* Keep desktop header navigation metrics consistent across pages */
header .hidden.items-center.gap-5.text-sm a,
header .hidden.items-center.gap-5.text-sm.whitespace-nowrap a,
header .hidden.items-center.gap-3 a,
header .hidden.items-center.gap-3.whitespace-nowrap a {
  white-space: nowrap;
}

.text-justify {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

.baic-card {
  box-shadow: 0 18px 45px rgba(3, 10, 20, 0.3);
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.baic-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 60px rgba(0, 194, 255, 0.2);
  border-color: rgba(0, 194, 255, 0.45);
}

html:not(.dark) .baic-card {
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

.baic-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  background: rgba(0, 194, 255, 0.12);
  color: var(--baic-accent);
  border: 1px solid rgba(0, 194, 255, 0.25);
}

.partner-marquee {
  position: relative;
  overflow: hidden;
  padding: 0.5rem 0;
}

.partner-track {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  width: max-content;
  animation: partner-marquee 28s linear infinite;
}

.partner-marquee:hover .partner-track {
  animation-play-state: paused;
}

@keyframes partner-marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.partner-card {
  border-radius: 1.25rem;
  border: 1px solid rgba(230, 247, 255, 0.12);
  background: rgba(15, 23, 42, 0.5);
  padding: 1.5rem 2rem;
  min-width: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
  box-shadow: 0 12px 30px rgba(3, 10, 20, 0.22);
}

.partner-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 194, 255, 0.4);
  box-shadow: 0 18px 45px rgba(0, 194, 255, 0.18);
}

html:not(.dark) .partner-card {
  background: rgba(248, 250, 252, 0.95);
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.12);
}

.cta-glow:hover {
  box-shadow: 0 0 35px rgba(0, 194, 255, 0.4);
}

.logo-dark {
  display: none;
}

img.logo-light,
img.logo-dark {
  width: auto !important;
  max-width: 100%;
  object-fit: contain;
  aspect-ratio: auto;
  flex-shrink: 0;
}

img.logo-light {
  display: block;
}

img.logo-dark {
  display: none;
}

html.dark .logo-dark {
  display: block;
}

html.dark .logo-light {
  display: none;
}

.icon-sun {
  display: none;
}

html.dark .icon-sun {
  display: block;
}

html.dark .icon-moon {
  display: none;
}

.community-member-card {
  border-radius: 1.25rem;
  border: 1px solid rgba(230, 247, 255, 0.16);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.64), rgba(15, 23, 42, 0.5));
  padding: 1.4rem;
  display: grid;
  gap: 0.8rem;
}

html:not(.dark) .community-member-card {
  background: rgba(248, 250, 252, 0.96);
  border-color: rgba(15, 23, 42, 0.1);
}

.community-member-name {
  font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
  font-size: 1.35rem;
  line-height: 1.15;
  margin: 0;
}

.community-member-role {
  margin: 0;
  font-weight: 700;
  color: var(--baic-accent);
}

.community-photo-frame {
  position: relative;
  border: 1px solid rgba(230, 247, 255, 0.32);
  transform: skewX(-12deg);
  overflow: hidden;
  border-radius: 0.35rem;
  background: rgba(15, 23, 42, 0.35);
}

.community-photo-frame::after {
  content: "";
  position: absolute;
  right: -10px;
  bottom: 10px;
  width: 26px;
  height: 12px;
  background: rgba(239, 68, 68, 0.42);
}

.community-photo-frame img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: center 22%;
  display: block;
  transform-origin: center center;
  transform: skewX(12deg) scale(1.08);
}

.community-member-meta {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(230, 247, 255, 0.85);
}

html:not(.dark) .community-member-meta {
  color: rgba(15, 23, 42, 0.78);
}

.back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border: 1px solid rgba(230, 247, 255, 0.18);
  border-radius: 999px;
  background: rgba(10, 37, 64, 0.9);
  color: #e6f7ff;
  box-shadow: 0 18px 42px rgba(3, 10, 20, 0.28);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease, background 180ms ease;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: rgba(0, 194, 255, 0.9);
  color: #062033;
}

html:not(.dark) .back-to-top {
  background: rgba(248, 250, 252, 0.95);
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.12);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.16);
}

@media (max-width: 640px) {
  .back-to-top {
    right: 1rem;
    bottom: 1rem;
    width: 2.75rem;
    height: 2.75rem;
  }
}

.community-member-skills {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.32rem;
  font-size: 0.9rem;
}

.community-home-carousel {
  position: relative;
}

.community-carousel-viewport {
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent 0%, black 7%, black 93%, transparent 100%);
}

.community-carousel-track {
  display: flex;
  align-items: stretch;
  gap: 1rem;
  width: max-content;
  padding: 0.4rem 0.2rem;
}

.community-carousel-track .community-member-card {
  width: min(80vw, 310px);
  min-width: min(80vw, 310px);
}

.community-carousel-track.is-animated {
  animation: community-marquee 42s linear infinite;
}

.community-carousel-viewport:hover .community-carousel-track.is-animated {
  animation-play-state: paused;
}

@keyframes community-marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(calc(-50% - 0.5rem));
  }
}
