/* ============================================================
   UMDCSEC — design system
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  --purple: #a76bcf;
  --purple-hover: #9158b8;
  --purple-soft: rgba(167, 107, 207, 0.1);
  --purple-border: rgba(167, 107, 207, 0.2);

  --bg: #F6F5F2;
  --bg-elevated: #ffffff;
  --bg-nav: rgba(246, 245, 242, 0.22);
  --border: #E8E8E8;
  --text: #333333;
  --text-muted: #616161;
  --text-faint: #7A7A7A;
  --text-soft: #474747;
  --placeholder: #a0a0a0;

  --font-sans: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --max-width: 1500px;
  --content-width: 64rem;
  --nav-height: 84px;
  --radius-sm: 0.75rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --radius-pill: 999px;
}

html.dark {
  --bg: #0a0a0a;
  --bg-elevated: #141414;
  --bg-nav: rgba(10, 10, 10, 0.25);
  --border: #262626;
  --text: #D8D9DA;
  --text-muted: #a0a0a0;
  --text-faint: #8a8a8a;
  --text-soft: #D8D9DA;
  --placeholder: #666666;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  color-scheme: light;
}
html.dark { color-scheme: dark; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
}
@media (min-width: 1024px) {
  .container { padding: 0 1.75rem; }
}

::-webkit-scrollbar { width: 10px; height: 10px; background: transparent; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #a1a1a1; border-radius: var(--radius-pill); }
html { scrollbar-color: #a1a1a1 transparent; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 3rem;
  padding: 0 1.5rem;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-outline {
  border-color: var(--text);
  color: var(--text);
  background: transparent;
}
.btn-outline:hover { background: rgba(128, 128, 128, 0.08); }

.btn-solid {
  background: var(--purple);
  color: #fff;
  border-color: var(--purple);
}
.btn-solid:hover { background: var(--purple-hover); border-color: var(--purple-hover); }

.btn-accent {
  position: relative;
  border-color: var(--purple);
  color: var(--text);
  background: transparent;
  transition: background-color 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}
.btn-accent:hover {
  background: rgba(167, 107, 207, 0.22);
  border-color: rgba(167, 107, 207, 0.6);
  transform: translate(2px, -2px);
}

.btn-arrow-stack {
  position: relative;
  display: inline-flex;
  width: 16px;
  height: 16px;
  overflow: hidden;
}
.btn-arrow-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(-45deg);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-arrow-icon-2 { transform: translate(-160%, 160%) rotate(-45deg); }
.btn-accent:hover .btn-arrow-icon-1 { transform: translate(160%, -160%) rotate(-45deg); }
.btn-accent:hover .btn-arrow-icon-2 { transform: translate(0, 0) rotate(-45deg); }

/* ---------- Section header (purple pill + heading) ---------- */

.section-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1.1rem;
  border-radius: var(--radius-pill);
  background: var(--purple-soft);
  color: var(--purple);
  border: 1px solid var(--purple-border);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
}

.section-heading {
  font-size: clamp(1.6rem, 3.2vw, 2.75rem);
  font-weight: 600;
  text-align: center;
  margin: 0 0 0.75rem;
  color: var(--text);
}

.section-sub {
  text-align: center;
  color: var(--text-muted);
  max-width: 42rem;
  margin: 0 auto 3rem;
  font-size: 1.05rem;
}

.section-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

section[id] { scroll-margin-top: var(--nav-height); }

/* ---------- Nav ---------- */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--bg-nav);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  box-shadow: 0 1px 0 0 transparent;
  transition: box-shadow 0.3s ease, background-color 0.3s ease;
}
.site-nav.scrolled { box-shadow: 0 4px 20px -2px rgba(167, 107, 207, 0.35); }

.site-nav-inner {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.25rem;
}
@media (min-width: 1024px) { .site-nav-inner { padding: 1.1rem 2.5rem; } }

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.brand img { width: 26px; height: 26px; }
html.dark .brand img { filter: invert(1); }

.nav-links {
  display: none;
  align-items: center;
  gap: 1.75rem;
}
@media (min-width: 1024px) { .nav-links { display: flex; } }

.nav-link {
  position: relative;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 1.1rem;
  padding-bottom: 6px;
  transition: color 0.2s ease;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 2px;
  border-radius: 2px;
  background: var(--purple);
  transform: scaleX(0);
  transition: transform 0.25s ease;
}
.nav-link:hover { color: var(--purple); }
.nav-link.active { color: var(--purple); }
.nav-link.active::after { transform: scaleX(1); }

.nav-actions { display: flex; align-items: center; gap: 0.5rem; }

.theme-toggle {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-moon { display: none; }
html.dark .theme-toggle .icon-sun { display: none; }
html.dark .theme-toggle .icon-moon { display: block; }

.nav-cta { display: none; height: 2.4rem; padding: 0 1.15rem; font-size: 0.98rem; }
@media (min-width: 1024px) { .nav-cta { display: inline-flex; } }

/* mobile hamburger (checkbox hack) */
.menu-toggle-wrap { display: flex; align-items: center; }
@media (min-width: 1024px) { .menu-toggle-wrap { display: none; } }

.menu-checkbox { display: none; }

.menu-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
}
.menu-icon .bar {
  width: 16px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.menu-checkbox:checked ~ .menu-icon .bar-1 { transform: translateY(6px) rotate(45deg); }
.menu-checkbox:checked ~ .menu-icon .bar-2 { opacity: 0; }
.menu-checkbox:checked ~ .menu-icon .bar-3 { transform: translateY(-6px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}
.mobile-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.mobile-menu a {
  font-size: 2rem;
  font-weight: 600;
  color: var(--text);
}
.mobile-menu a.active { color: var(--purple); }

/* ---------- Footer ---------- */

.site-footer { padding: 3rem 0 1.75rem; }

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 1024px) {
  /* Columns size to their own content (not stretched 1fr tracks -- equal
     tracks still looked left-skewed since the dense "UMDCSEC" column fills
     its track while the short "Resources" list trails off early in
     its). The whole row is capped to --content-width -- the same width as
     the "Ready to level up" card -- and space-between spreads the four
     columns evenly across exactly that width. */
  .footer-grid {
    grid-template-columns: repeat(4, auto);
    justify-content: space-between;
    max-width: var(--content-width);
    margin: 0 auto;
  }
}

.footer-brand { display: flex; align-items: center; gap: 0.5rem; font-size: 1.05rem; font-weight: 600; margin-bottom: 0.5rem; }
.footer-brand img { width: 24px; height: 24px; }
html.dark .footer-brand img { filter: invert(1); }
.footer-contact { font-size: 0.85rem; color: var(--text-muted); display: flex; flex-direction: column; gap: 0.35rem; line-height: 1.5; }
.footer-contact p { margin: 0; }

.footer-col h4 { font-weight: 600; margin: 0 0 0.5rem; font-size: 0.95rem; }
.footer-col { display: flex; flex-direction: column; gap: 0.35rem; }
.footer-col a { color: var(--text-muted); font-size: 0.85rem; transition: color 0.2s ease; width: fit-content; }
.footer-col a:hover { color: var(--purple); }

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-soft);
  font-size: 0.85rem;
}

/* ---------- Cards / misc components ---------- */

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}
html.dark .card { background: #111111; }

.split-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}
@media (min-width: 768px) { .split-card { grid-template-columns: 1fr 1fr; } }

.pillar-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin: 3rem auto;
  max-width: var(--content-width);
}
@media (min-width: 768px) { .pillar-grid { grid-template-columns: repeat(3, 1fr); } }

.pillar {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  background: var(--bg-elevated);
}
html.dark .pillar { background: #111111; }
.pillar-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-sm);
  background: var(--purple-soft);
  color: var(--purple);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}
.pillar h3 { margin: 0 0 0.5rem; font-size: 1.1rem; }
.pillar p { margin: 0; color: var(--text-muted); font-size: 0.95rem; }

.avatar-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem 1rem;
  max-width: 60rem;
  margin: 0 auto;
}
@media (min-width: 640px) { .avatar-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1024px) { .avatar-grid.cols-5 { grid-template-columns: repeat(5, 1fr); } }

.officer {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.6rem;
}
.avatar {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: var(--purple);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 600;
}
.officer-name { font-weight: 600; font-size: 0.95rem; }
.officer-role { font-size: 0.8rem; color: var(--text-muted); }
.alumni-tag {
  display: inline-block;
  margin-top: 0.2rem;
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-pill);
  background: var(--purple-soft);
  color: var(--purple);
  font-size: 0.7rem;
  font-weight: 500;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--purple);
  font-weight: 500;
  transition: gap 0.3s ease;
}
.back-link:hover { gap: 1rem; }
.back-link svg { width: 18px; height: 18px; }

.page-title {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 600;
  color: var(--text-soft);
  margin: 1.5rem 0 0.5rem;
}
.page-sub { color: var(--text-muted); margin: 0 0 2.5rem; }

.date-pill {
  display: inline-block;
  padding: 0.35rem 1rem;
  border-radius: var(--radius-pill);
  background: var(--purple-soft);
  color: var(--purple);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

/* ---------- Blog ---------- */

.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  max-width: var(--content-width);
  margin: 0 auto;
}
@media (min-width: 768px) { .blog-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px) { .blog-grid.listing { grid-template-columns: repeat(2, 1fr); } }

.blog-card {
  position: relative;
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  padding-right: 3.25rem;
  background: var(--bg-elevated);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
html.dark .blog-card { background: #111111; }
.blog-card:hover {
  transform: translateY(-3px);
  border-color: rgba(167, 107, 207, 0.55);
  box-shadow: 0 12px 36px rgba(167, 107, 207, 0.22);
}
.blog-date { color: var(--purple); font-size: 0.85rem; font-weight: 500; margin-bottom: 0.5rem; }
.blog-card h3 { margin: 0 0 0.5rem; font-size: 1.15rem; }
.blog-card p { margin: 0; color: var(--text-muted); font-size: 0.9rem; }

.blog-card-arrow {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--purple-soft);
  color: var(--purple);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translate(-6px, 6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.blog-card:hover .blog-card-arrow { opacity: 1; transform: translate(0, 0); }
.blog-card-arrow svg { transform: rotate(-45deg); }

.post-body { font-size: 1.02rem; line-height: 1.75; color: var(--text-soft); }
.post-body p { margin: 0 0 1rem; }
.post-body h2 { font-size: 1.3rem; font-weight: 600; color: var(--text); margin: 2rem 0 0.75rem; }
.post-body ul { margin: 0 0 1rem; padding-left: 1.1rem; }
.post-body li { margin-bottom: 0.5rem; }
.post-body li::marker { color: var(--purple); }
.post-body strong { color: var(--text); }
.post-body a { color: var(--purple); text-decoration: underline; }
.post-code-inline {
  background: var(--border);
  padding: 0.1rem 0.4rem;
  border-radius: 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.9em;
}
.post-code-block {
  background: var(--border);
  padding: 1rem;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin: 0 0 1rem;
}
.post-code-block code { font-family: var(--font-mono); font-size: 0.85rem; white-space: pre-wrap; }

.post-callout {
  margin-top: 2rem;
  padding: 1.25rem;
  background: rgba(232, 232, 232, 0.5);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
html.dark .post-callout { background: #1a1a1a; }
.post-callout-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--purple);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 0.5rem;
}
.post-callout a { color: var(--purple); word-break: break-all; }
.post-callout a:hover { text-decoration: underline; }

.slides-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(167,107,207,0.07), transparent);
  transition: border-color 0.25s ease;
}
.slides-card:hover { border-color: var(--purple-border); }
.slides-card-icon {
  width: 2.75rem; height: 2.75rem; border-radius: var(--radius-sm);
  background: var(--purple-soft); color: var(--purple);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.slides-card-label { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--purple); }
.slides-card-title { font-size: 1rem; font-weight: 500; }

/* ---------- FAQ accordion ---------- */

.faq-list { max-width: 44rem; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: none;
  border: none;
  text-align: left;
  padding: 1.25rem 0;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
}
.faq-question .chevron { transition: transform 0.25s ease; flex-shrink: 0; color: var(--purple); }
.faq-item.open .chevron { transform: rotate(180deg); }
.faq-answer {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}
.faq-answer p { margin: 0 0 1.25rem; }
.faq-answer a { color: var(--purple); text-decoration: underline; }
.faq-item.open .faq-answer { max-height: 20rem; }

/* ---------- Sponsors marquee ---------- */

.marquee {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: 4rem;
  width: max-content;
  animation: marquee 30s linear infinite;
}
.marquee-track img { height: 2.25rem; width: auto; opacity: 0.7; }
html.dark .marquee-track img { filter: brightness(0) invert(1); }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Sponsor Us cards ---------- */

.sponsor-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  max-width: 60rem;
  margin: 0 auto;
}
@media (min-width: 768px) { .sponsor-cards { grid-template-columns: 1fr 1fr; } }

.sponsor-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--purple-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  background: var(--bg-elevated);
}
html.dark .sponsor-card { background: #111111; }
.sponsor-card-icon {
  width: 2.75rem; height: 2.75rem; border-radius: var(--radius-sm);
  background: var(--purple-soft); color: var(--purple);
  display: flex; align-items: center; justify-content: center; margin-bottom: 1rem;
}
.sponsor-card h3 { margin: 0 0 0.5rem; font-size: 1.3rem; }
.sponsor-card > p { color: var(--text-muted); margin: 0 0 1.25rem; }
.sponsor-card ul { list-style: none; margin: 0 0 1.5rem; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.sponsor-card li { display: flex; align-items: flex-start; gap: 0.6rem; font-size: 0.92rem; color: var(--text-soft); }
.sponsor-card .check { color: var(--purple); flex-shrink: 0; }
.sponsor-card .btn { margin-top: auto; align-self: flex-start; }

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  max-width: 60rem;
  margin: 0 auto;
}
@media (min-width: 768px) { .contact-grid { grid-template-columns: 1fr 1fr; } }

.contact-info { display: flex; flex-direction: column; gap: 1rem; }
.contact-info-item { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.6rem; }
.contact-info-icon {
  width: 2.5rem; height: 2.5rem; border-radius: var(--radius-sm);
  background: var(--purple-soft); color: var(--purple);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.contact-info-item h4 { margin: 0 0 0.2rem; font-size: 0.95rem; }
.contact-info-item p { margin: 0; color: var(--text-muted); font-size: 0.9rem; }

.contact-info-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  max-width: var(--content-width);
  margin: 0 auto;
}
@media (min-width: 768px) { .contact-info-row { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Closing CTA ---------- */
/* Transparent panel (white in light mode, near-black in dark mode) with a
   purple radial glow bleeding up from the bottom. */

.closing-cta {
  position: relative;
  overflow: hidden;
  margin: 5rem auto;
  max-width: var(--content-width);
  border-radius: var(--radius-lg);
  padding: 3.5rem 2rem;
  text-align: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
}
.closing-cta-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(80% 100% at 50% 100%, var(--purple) 0%, transparent 70%);
  opacity: 0.55;
  pointer-events: none;
}
.closing-cta-content { position: relative; z-index: 1; }
.closing-cta h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); margin: 0 0 0.75rem; color: var(--text); }
.closing-cta p { color: var(--text-muted); max-width: 34rem; margin: 0 auto 2rem; }

/* ---------- Hero background (grid + blobs + dots) ---------- */

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-grid {
  position: absolute;
  /* left/right stay flush with the section (0), so the mask-image below
     lines up with the actual visible edges of the page -- the previous
     -10% left/right inset made the element 20% wider than the section,
     which pushed most of the fade zone into the area already clipped away
     by the parent's overflow:hidden, so it was barely visible. Top keeps
     its -10% so the grid still bleeds up under the navbar. */
  inset: -10% 0 0 0;
  opacity: 0.35;
  background-image:
    linear-gradient(to right, currentColor 1px, transparent 1px),
    linear-gradient(to bottom, currentColor 1px, transparent 1px);
  background-size: 72px 72px;
  color: var(--text-muted);
  mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

.hero-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 0%, var(--bg) 95%);
}

.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.06;
  animation: hero-blob-float ease-in-out infinite;
}
html.dark .hero-blob { opacity: 0.05; }
.hero-blob-1 { width: 600px; height: 600px; left: 10%; top: -10%; background: radial-gradient(circle, #a76bcf 0%, transparent 70%); animation-duration: 20s; }
.hero-blob-2 { width: 500px; height: 500px; right: 5%; top: 20%; background: radial-gradient(circle, #7c4dab 0%, transparent 70%); animation-duration: 25s; filter: blur(90px); }
.hero-blob-3 { width: 400px; height: 400px; left: 40%; bottom: 10%; background: radial-gradient(circle, #c49edf 0%, transparent 70%); animation-duration: 18s; filter: blur(70px); }

@keyframes hero-blob-float {
  0% { transform: translate(0, 0); }
  33% { transform: translate(40px, 30px); }
  66% { transform: translate(-30px, -20px); }
  100% { transform: translate(0, 0); }
}

.hero-dot {
  position: absolute;
  border-radius: 50%;
  background: rgba(167, 107, 207, 0.8);
  box-shadow: 0 0 6px rgba(167, 107, 207, 0.6);
  animation-name: hero-dot-float;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}

@keyframes hero-dot-float {
  0% { transform: translate(0, 0); opacity: 0.3; }
  30% { opacity: 1; }
  50% { transform: translate(20px, -40px); opacity: 0.5; }
  75% { transform: translate(-15px, 20px); opacity: 1; }
  100% { transform: translate(0, 0); opacity: 0.3; }
}

/* ---------- Hero Discord button (glow) ---------- */
/* The button itself is clear/transparent -- only the border, text, and
   sparkle icon are colored (black in light mode, light in dark mode).
   Two independent glow layers avoid fighting each other: `-orbit` is
   exactly the size of the button and only ever moves by a fraction of
   its own size (so it can never fully leave the visible area), and
   `-fill` is a separate, larger, always-present-but-invisible layer that
   simply fades in on hover -- no shared animated properties, so nothing
   gets stuck mid-transition. */

.discord-glow-btn {
  position: relative;
  display: inline-flex;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--text);
  overflow: hidden;
  background: transparent;
}

.discord-glow-btn-orbit {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 50%, rgba(167, 107, 207, 0.95) 0%, transparent 55%);
  filter: blur(6px);
  animation: discord-glow-orbit 7s linear infinite;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.discord-glow-btn:hover .discord-glow-btn-orbit { opacity: 0; }

/* Traces a smooth oval (matching the pill's proportions) instead of a
   4-point diamond, so it glides around the rounded ends instead of
   cutting corners. */
@keyframes discord-glow-orbit {
  0%      { transform: translate(30%, 0%); }
  8.333%  { transform: translate(26%, 10%); }
  16.667% { transform: translate(15%, 17.3%); }
  25%     { transform: translate(0%, 20%); }
  33.333% { transform: translate(-15%, 17.3%); }
  41.667% { transform: translate(-26%, 10%); }
  50%     { transform: translate(-30%, 0%); }
  58.333% { transform: translate(-26%, -10%); }
  66.667% { transform: translate(-15%, -17.3%); }
  75%     { transform: translate(0%, -20%); }
  83.333% { transform: translate(15%, -17.3%); }
  91.667% { transform: translate(26%, -10%); }
  100%    { transform: translate(30%, 0%); }
}

/* Reveals left-to-right on hover. The clip-mask and the blurred glow are
   deliberately two separate elements: putting `filter: blur()` and
   `clip-path` on the *same* element produces a hard seam right at the clip
   edge (the blur samples across the clip boundary and the browser paints a
   visible line there). Clipping the *unblurred* wrapper instead, with the
   blur living on a plain child, gives a soft, seamless bleed. */
.discord-glow-btn-fill-mask {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1.6s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.discord-glow-btn:hover .discord-glow-btn-fill-mask { clip-path: inset(0 0% 0 0); }

.discord-glow-btn-fill {
  position: absolute;
  inset: -30%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(167, 107, 207, 0.95) 0%, rgba(167, 107, 207, 0.4) 55%, transparent 75%);
  filter: blur(14px);
}

.discord-glow-btn-content {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  border-radius: calc(var(--radius-pill) - 1.5px);
  padding: 0.85rem 1.75rem;
  font-weight: 600;
  font-size: 1.05rem;
}

/* ---------- Utility ---------- */

.mt-0 { margin-top: 0; }
.text-center { text-align: center; }
.hidden { display: none !important; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
.sr-only:focus {
  position: fixed;
  top: 1rem; left: 1rem;
  width: auto; height: auto;
  padding: 0.6rem 1.1rem;
  margin: 0;
  clip: auto;
  background: var(--purple);
  color: #fff;
  border-radius: var(--radius-sm);
  z-index: 999;
}

@media (max-width: 640px) {
  .avatar-grid.cols-5 { grid-template-columns: repeat(2, 1fr); }
}
