:root {
  color-scheme: dark;
  --bg: #050607;
  --surface: rgba(255, 255, 255, 0.06);
  --surface-strong: rgba(255, 255, 255, 0.08);
  --text: #f2f5f1;
  --muted: rgba(242, 245, 241, 0.66);
  --glow: rgba(255, 255, 255, 0.12);
  --shadow: 0 42px 140px rgba(0, 0, 0, 0.45);

  --accent: #53fc18;
  --accent-soft: rgba(83, 252, 24, 0.16);
  --accent-glow: rgba(83, 252, 24, 0.35);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --font-display: 'Space Grotesk', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-wordmark: 'Orbitron', var(--font-display);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  max-width: 100vw;
  font-family: var(--font-body);
  background: radial-gradient(circle at top, rgba(255, 255, 255, 0.06), transparent 22%),
    radial-gradient(circle at 80% 10%, rgba(83, 252, 24, 0.05), transparent 16%),
    linear-gradient(180deg, #070707 0%, #050505 55%, #030303 100%);
  color: var(--text);
  position: relative;
}

/* Locks scroll while the intro gate is showing */
body.intro-active {
  overflow: hidden;
  height: 100vh;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at center, transparent 50%, rgba(0, 0, 0, 0.55) 110%);
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.035;
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.6) 0px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: overlay;
}

/* ============ INTRO / GATE ============ */

.intro-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: #050607;
  transition: opacity 0.6s var(--ease-out), filter 0.6s var(--ease-out);
}

.intro-screen.is-leaving {
  opacity: 0;
  filter: blur(6px);
  pointer-events: none;
}

.intro-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.6rem;
  text-align: center;
  opacity: 0;
  /* clamp keeps the offset small on narrow phones so nothing overflows or
     feels janky, while still giving a real "slide in" distance on desktop */
  transform: translateX(clamp(28px, 9vw, 90px));
  width: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  .intro-content {
    animation: introContentIn 0.85s var(--ease-out) 0.15s forwards;
  }
}

@media (prefers-reduced-motion: reduce) {
  .intro-content { opacity: 1; transform: none; }
}

@keyframes introContentIn {
  to { opacity: 1; transform: translateX(0); }
}

.intro-avatar-wrap {
  position: relative;
  display: grid;
  place-items: center;
}

.intro-avatar {
  width: clamp(160px, 26vw, 220px);
  height: clamp(160px, 26vw, 220px);
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
  position: relative;
  z-index: 1;
}

/* The avatar's own motion, separate from the orbit ring rotating around it */
@media (prefers-reduced-motion: no-preference) {
  .intro-avatar {
    animation: introAvatarFloat 6s ease-in-out infinite;
    animation-delay: 0.9s;
  }
}

@keyframes introAvatarFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-8px) scale(1.015); }
}

.intro-title {
  margin: 0;
  font-family: var(--font-wordmark);
  font-weight: 900;
  font-size: clamp(2.4rem, 7vw, 4rem);
  letter-spacing: 0.14em;
  color: var(--text);
}

.intro-tag {
  margin: -0.8rem 0 0;
  color: var(--muted);
  letter-spacing: 2px;
  font-size: 0.95rem;
}

.intro-enter {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.6rem;
  padding: 0.9rem 1.8rem;
  border-radius: 999px;
  border: 1px solid var(--accent-glow);
  background: var(--accent-soft);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform 0.3s var(--ease-out), background 0.3s ease, box-shadow 0.3s ease;
}

.intro-enter:hover,
.intro-enter:focus-visible {
  transform: translateY(-3px);
  background: rgba(83, 252, 24, 0.24);
  box-shadow: 0 0 30px var(--accent-glow);
}

.intro-enter i {
  transition: transform 0.3s var(--ease-out);
}

.intro-enter:hover i {
  transform: translateX(4px);
}

@media (max-width: 640px) {
  .intro-content { gap: 1.2rem; }
}

/* ============ NAV ============ */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;

  padding: 1rem 6%;

  background: rgba(5, 6, 7, 0.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  opacity: 0;
  transform: translateY(-100%);
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
  will-change: transform;
}

.site-nav.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.nav-brand {
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.1em;
  font-size: 0.85rem;
  color: var(--text);
  text-decoration: none;
}

.nav-brand .prompt {
  color: var(--accent);
}

/* "NOBILITY" types itself in the first time the nav scrolls into view */
.nav-word {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  width: 0;
  vertical-align: bottom;
}

@media (prefers-reduced-motion: no-preference) {
  .nav-word.typing {
    animation: navTyping 1.6s steps(8, end) forwards;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-word { width: auto; }
}

@keyframes navTyping {
  /* 8ch alone clipped the final "Y" — the letter-spacing on .nav-brand
     adds extra width per character that the ch unit doesn't account for,
     so this needs a small buffer to fit the full word. */
  to { width: calc(8ch + 0.9em); }
}

.cursor-blink {
  color: var(--accent);
}

@media (prefers-reduced-motion: no-preference) {
  .cursor-blink {
    animation: blinkCursor 1s steps(1) infinite;
  }
}

.nav-links {
  display: flex;
  gap: 1.75rem;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  position: relative;
  padding-bottom: 2px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-out);
}

.nav-links a:hover {
  color: var(--text);
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

.nav-status {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
  flex-shrink: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .status-dot {
    animation: statusPulse 2.4s ease-in-out infinite;
  }
}

@keyframes statusPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
  }
}

/* ============ HERO ============ */

.page-shell {
  min-height: 100vh;
  display: grid;
  /* Without this, the implicit grid column auto-sizes to the widest
     child's max-content — and the communities marquee (24 items at
     width: max-content) was stretching the entire page to fit, pushing
     everything far to the right and forcing a horizontal scrollbar. */
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 1.5rem;
  position: relative;
  z-index: 1;
}

.page-shell:focus {
  outline: none;
}

.hero-frame {
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 46rem);
  padding: 2rem;
}

/* Signature element: a slow-rotating orbit ring with a live pulse dot.
   Pure transform animation (rotate) — cheap on the compositor, no layout cost.
   Reused on both the intro gate and the hero. */
.orbit-ring {
  position: absolute;
  width: clamp(220px, 30vw, 340px);
  height: clamp(220px, 30vw, 340px);
  border-radius: 50%;
  border: 1px solid rgba(83, 252, 24, 0.14);
  z-index: 0;
}

.intro-avatar-wrap .orbit-ring {
  width: clamp(200px, 30vw, 270px);
  height: clamp(200px, 30vw, 270px);
}

.orbit-dot {
  position: absolute;
  top: -3px;
  left: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px 2px var(--accent-glow);
  transform: translateX(-50%);
}

@media (prefers-reduced-motion: no-preference) {
  .orbit-ring {
    animation: orbitSpin 18s linear infinite;
  }
}

@keyframes orbitSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.hero-socials {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  margin-top: -5px;
  margin-bottom: -5px;
}

.hero-socials a {
  color: white;
  text-decoration: none;
  font-size: 1.5rem;
  transition: transform 0.3s var(--ease-out), opacity 0.3s ease, color 0.3s ease;
}

.hero-socials a:hover {
  transform: translateY(-4px) scale(1.15);
  color: var(--accent);
}

.hero-kick-icon {
  width: 26px;
  height: 26px;
  object-fit: contain;
  transition: transform 0.4s var(--ease-out);
}

.hero-socials a:hover .hero-kick-icon {
  transform: translateY(-4px) scale(1.15) rotate(6deg);
}

.glow-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  filter: blur(40px);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.14), transparent 48%);
  transform: scale(0.9);
}

.profile-wrap {
  position: relative;
  display: grid;
  place-items: center;
  gap: 1.4rem;
  z-index: 1;
  padding: 3rem 2.5rem;
  border-radius: 2rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: scale(0.82);
}

/* Pops in the moment the intro gate is dismissed. Once the animation
   finishes, JS swaps this for the plain ".popped" state (see script.js) —
   that hand-off matters because a still-active CSS animation would
   otherwise keep overriding "transform" forever, silently blocking the
   pointer-tilt hover effect from ever working afterwards. */
@media (prefers-reduced-motion: no-preference) {
  .profile-wrap.pop-in {
    animation: cardPopIn 0.7s var(--ease-out) forwards;
  }
}

.profile-wrap.popped {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .profile-wrap { opacity: 1; transform: none; }
}

@keyframes cardPopIn {
  0% { opacity: 0; transform: scale(0.82); }
  65% { opacity: 1; transform: scale(1.04); }
  100% { opacity: 1; transform: scale(1); }
}

/* A signal "scan" ring that continuously sweeps around the card border —
   built with a rotating conic-gradient masked down to just the ring
   (mask-composite: exclude), so only a thin glowing arc travels around
   the edge rather than filling the whole card. Loops forever, cheap
   (transform: rotate is the only thing actually animating). */
.profile-wrap::before {
  content: '';
  position: absolute;
  inset: -1px;
  z-index: 2;
  border-radius: inherit;
  padding: 1px;
  pointer-events: none;
  background: conic-gradient(
    from 0deg,
    transparent 0%,
    var(--accent-glow) 6%,
    rgba(255, 255, 255, 0.5) 9%,
    var(--accent-glow) 12%,
    transparent 22%,
    transparent 100%
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

@media (prefers-reduced-motion: no-preference) {
  .profile-wrap::before {
    animation: cardScan 5s linear infinite;
  }
}

@keyframes cardScan {
  to { transform: rotate(360deg); }
}

@media (max-width: 640px) {
  .profile-wrap {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(16, 18, 16, 0.85);
  }
  .site-nav {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(5, 6, 7, 0.88);
  }
}

/* ============ WORDMARK + GLITCH ============ */

.profile-name,
.intro-title {
  font-family: var(--font-wordmark);
  font-weight: 900;
  letter-spacing: 0.12em;
  text-align: center;
  color: var(--text);
}

.profile-name {
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  opacity: 0;
  transform: translateY(20px);
}

.profile-name.is-visible {
  animation: textReveal 0.7s ease both;
  animation-delay: 0.2s;
}

@media (prefers-reduced-motion: reduce) {
  .profile-name {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Periodic "signal glitch" — an RGB-split flicker that fires briefly once
   per cycle rather than running continuously, so it reads as a signal
   hiccup rather than a broken page. */
.glitch-text {
  position: relative;
}

@media (prefers-reduced-motion: no-preference) {
  .glitch-text::before,
  .glitch-text::after {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    background: inherit;
  }

  .glitch-text::before {
    color: #ff2e63;
    animation: glitchSplit 6s infinite linear;
    animation-delay: 0.1s;
  }

  .glitch-text::after {
    color: #17e5ff;
    animation: glitchSplit 6s infinite linear;
    animation-delay: -0.1s;
  }
}

@keyframes glitchSplit {
  0%, 94%, 100% {
    opacity: 0;
    transform: translate(0, 0);
    clip-path: inset(0 0 100% 0);
  }
  95% {
    opacity: 0.8;
    transform: translate(-3px, 1px);
    clip-path: inset(20% 0 55% 0);
  }
  96.5% {
    opacity: 0.8;
    transform: translate(3px, -1px);
    clip-path: inset(55% 0 15% 0);
  }
  98% {
    opacity: 0;
    transform: translate(0, 0);
    clip-path: inset(0 0 100% 0);
  }
}

.section-tag {
  font-family: var(--font-mono);
  color: #777;
  letter-spacing: 4px;
  font-size: 0.8rem;
  width: 0;
  overflow: hidden;
  white-space: nowrap;
  border-right: 2px solid #777;
}

.section-tag.typing {
  animation:
    typing 3.2s steps(5, end) forwards,
    blinkCursorBorder 0.8s infinite;
}

@keyframes typing {
  from { width: 0; }
  to { width: 5ch; }
}

@keyframes blinkCursorBorder {
  50% { border-right-color: transparent; }
}

@keyframes blinkCursor {
  50% { opacity: 0; }
}

@keyframes textReveal {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

@media (max-width: 640px) {
  .page-shell { padding: 1rem; }
  .hero-frame { width: min(100%, 28rem); padding: 1.5rem; }
  .profile-wrap { gap: 1.1rem; padding: 2rem 1.75rem; }
  .profile-name { font-size: clamp(2rem, 8vw, 3rem); }
}

/* ============ ABOUT / CONNECT SHARED ============ */

.about-section,
.connect-section {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 120px 10%;
  position: relative;
  z-index: 1;
  content-visibility: auto;
  contain-intrinsic-size: 900px;
}

.section-content {
  max-width: 900px;
  width: 100%;
}

.about-section h2 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 5rem);
  line-height: 1.05;
  margin: 20px 0 40px;
  max-width: 900px;
  color: #fff;
  font-weight: 700;
}

.connect-section h2 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 5rem);
  margin: 20px 0 40px;
  display: inline-block;
  position: relative;
}

@media (prefers-reduced-motion: no-preference) {
  .connect-section h2 {
    animation:
      dangle 5s ease-in-out infinite,
      shadowSwing 8s ease-in-out infinite;
    transform-origin: top center;
  }
}

.connect-section h2::before {
  content: '';
  position: absolute;
  top: -120px;
  left: 50%;
  width: 2px;
  height: 120px;
  background: rgba(255, 255, 255, 0.15);
  transform: translateX(-50%);
}

@keyframes dangle {
  0% { transform: rotate(0deg); }
  12% { transform: rotate(-2deg); }
  18% { transform: rotate(-6deg); }
  24% { transform: rotate(-8deg); }
  30% { transform: rotate(-5deg); }
  36% { transform: rotate(-9deg); }
  45% { transform: rotate(-2deg); }
  55% { transform: rotate(2deg); }
  65% { transform: rotate(-1deg); }
  90% { transform: rotate(0deg); }
  100% { transform: rotate(-1deg); }
}

@keyframes shadowSwing {
  0%, 100% { text-shadow: 0 0 0 rgba(255, 255, 255, 0); }
  25% { text-shadow: -10px 10px 25px rgba(0, 0, 0, 0.3); }
  50% { text-shadow: -18px 18px 40px rgba(0, 0, 0, 0.4); }
  75% { text-shadow: 8px 8px 18px rgba(0, 0, 0, 0.2); }
}

.tagline {
  position: relative;
  font-size: clamp(3rem, 6vw, 5rem);
  line-height: 1.05;
  font-weight: 700;
  background: linear-gradient(120deg, #7a7a7a 0%, #ffffff 50%, #7a7a7a 100%);
  background-size: 250% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.05);
}

@media (prefers-reduced-motion: no-preference) {
  .tagline.show {
    animation:
      fadeInTagline 1.4s ease forwards,
      luxuryShimmer 6s ease-in-out infinite;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tagline { background-position: 50% center; }
}

@keyframes fadeInTagline {
  from { opacity: 0; transform: translateY(20px); filter: blur(8px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@keyframes luxuryShimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.tagline:hover {
  transform: translateX(8px);
  transition: 0.4s ease;
}

.about-section p {
  color: #aaa;
  line-height: 2;
  font-size: 1.1rem;
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
}

@media (prefers-reduced-motion: no-preference) {
  .reveal-right.show {
    animation: slideInRight 0.7s var(--ease-out) forwards;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal-right { opacity: 1; transform: none; }
}

@keyframes slideInRight {
  to { opacity: 1; transform: translateX(0); }
}

/* ============ SIGNAL STRIP ============ */

.signal-strip {
  position: relative;
  z-index: 1;
  padding: 60px 10% 100px;
}

.signal-grid {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  padding: 2.5rem 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.signal-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  text-align: center;
}

.signal-number {
  font-family: var(--font-mono);
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  font-weight: 500;
  color: var(--accent);
}

.signal-label {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

@media (max-width: 640px) {
  .signal-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.75rem;
    padding: 2rem 1rem;
  }
  .signal-strip { padding: 40px 6% 70px; }
}

/* ============ SOCIAL GRID ============ */

.social-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.social-icon {
  font-size: 1.8rem;
  transition: 0.4s ease;
}

.social-card:hover .social-icon {
  transform: scale(1.25) rotate(8deg);
}

.social-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 60px;
}

.social-card {
  width: 100%;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32px 40px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  text-decoration: none;
  color: white;
  transition: 0.4s ease;
  opacity: 0;
}

.social-card.show {
  animation: socialReveal 0.9s var(--ease-out) forwards;
}

@media (prefers-reduced-motion: reduce) {
  .social-card { opacity: 1; animation: none; }
}

.social-card:hover {
  transform: translateX(12px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 40px rgba(255, 255, 255, 0.05), 0 20px 60px rgba(0, 0, 0, 0.3);
}

.social-title {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.social-handle {
  color: #999;
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

.social-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.connect-text {
  color: #999;
}

.social-card:nth-child(4):hover {
  border-color: var(--accent-glow);
  box-shadow: 0 0 25px rgba(83, 252, 24, 0.15), 0 0 60px rgba(83, 252, 24, 0.08);
  transform: translateX(12px);
}

@keyframes socialReveal {
  0% { opacity: 0; transform: translateY(80px) scale(0.8); filter: blur(10px); }
  60% { opacity: 1; transform: translateY(-10px) scale(1.05); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

/* ============ COMMUNITIES MARQUEE ============ */

.communities-section {
  min-height: 60vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 100px 0;
  position: relative;
  z-index: 1;
  content-visibility: auto;
  contain-intrinsic-size: 600px;
}

.communities-content {
  width: 100%;
  text-align: center;
}

.communities-tag {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 4px;
  color: #777;
  margin-bottom: 60px;
  padding: 0 10%;
}

.marquee-viewport {
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  gap: 3rem;
  padding: 0.5rem 0;
}

@media (prefers-reduced-motion: no-preference) {
  .marquee-track {
    animation: marqueeScroll 42s linear infinite;
  }

  .marquee-viewport:hover .marquee-track,
  .marquee-viewport:focus-within .marquee-track {
    animation-play-state: paused;
  }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-viewport {
    overflow-x: auto;
    mask-image: none;
    -webkit-mask-image: none;
  }
}

@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.marquee-item {
  flex: 0 0 auto;
  width: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.marquee-item img {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.12);
  filter: grayscale(0.3);
  transition: filter 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}

.marquee-item:hover img {
  filter: grayscale(0);
  transform: scale(1.06);
  border-color: var(--accent-glow);
}

.marquee-item span {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
}

@media (max-width: 640px) {
  .communities-section { padding: 70px 0; }
  .communities-tag { margin-bottom: 40px; }
  .marquee-item { width: 96px; }
  .marquee-item img { width: 68px; height: 68px; }
}

/* ============ FOOTER ============ */

.site-footer {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem 10% 3rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
