/* ============================================================
   Brunel Cyber Security Society — shared styles
   Palette and type per the style guide in Figma
   ============================================================ */

:root {
  --bg: #0B0B0D;
  --surface: #131316;
  --line: #26262B;
  --text: #E9E6E3;
  --muted: #8E8B8F;
  --warm: #E08A6D;
  --cool: #6FC9D8;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--text); color: var(--bg); }

.mono { font-family: 'JetBrains Mono', monospace; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible {
  outline: 1.5px solid var(--cool);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- nav ---------- */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 40px;
  background: rgba(11, 11, 13, 0.95);
  border-bottom: 1px solid var(--line);
  transition: padding 0.25s ease, background 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
/* compact + elevated once the page is scrolled (class toggled in site.js) */
nav.scrolled {
  padding-top: 12px;
  padding-bottom: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  border-bottom-color: transparent;
}
@media (min-width: 721px) {
  nav {
    background: rgba(11, 11, 13, 0.7);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
  }
}
.brand {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  letter-spacing: 0.08em;
  color: var(--text);
}
.brand .cursor {
  display: inline-block;
  width: 8px; height: 15px;
  background: var(--text);
  vertical-align: -2px;
  margin-left: 4px;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--muted);
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a[aria-current="page"] { color: var(--text); }

/* the 'join' link is the primary action: render it as an outlined pill */
.nav-links a.nav-cta {
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 7px 16px;
  transition: background 0.22s ease, color 0.22s ease, border-color 0.22s ease;
}
.nav-links a.nav-cta:hover,
.nav-links a.nav-cta:focus-visible {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.nav-links a.nav-cta::after { display: none; }   /* no underline sweep on the pill */

/* brand: intensify the cursor halo on hover */
.brand { transition: color 0.2s; }
.brand:hover .cursor { box-shadow: 0 0 14px rgba(233, 230, 227, 0.95); }

/* ---------- hero (homepage) ---------- */
header.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
#waves { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 720px;
  margin: 0 24px;
  padding: 48px 48px 52px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.02) 55%);
  -webkit-backdrop-filter: blur(26px) saturate(180%) brightness(1.08);
  backdrop-filter: blur(26px) saturate(180%) brightness(1.08);
  box-shadow:
    0 36px 90px rgba(0, 0, 0, 0.6),
    0 0 40px rgba(255, 255, 255, 0.035),
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -10px 30px rgba(255, 255, 255, 0.03);
}
/* diagonal specular sheen across the glass surface */
.hero-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(125deg, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0.05) 22%, rgba(255, 255, 255, 0) 40%),
    radial-gradient(140% 100% at 15% -15%, rgba(255, 255, 255, 0.16), transparent 50%);
}
/* gradient bevel edge — the rim catches light unevenly, like real glass */
.hero-inner::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  padding: 1px;
  pointer-events: none;
  background: linear-gradient(135deg,
    rgba(255, 255, 255, 0.7) 0%,
    rgba(255, 255, 255, 0.1) 30%,
    rgba(255, 255, 255, 0) 55%,
    rgba(255, 255, 255, 0.35) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
}
@media (max-width: 720px) {
  .hero-inner {
    padding: 36px 24px 40px;
    border-radius: 16px;
    -webkit-backdrop-filter: blur(12px) saturate(120%);
    backdrop-filter: blur(12px) saturate(120%);
  }
}
.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.12em;
  margin-bottom: 20px;
}
h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
h1 .ghost { position: relative; display: inline-block; }
h1 .ghost::before, h1 .ghost::after {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0;
  opacity: 0.45;
  pointer-events: none;
}
h1 .ghost::before { color: rgba(233, 230, 227, 0.35); transform: translateX(-2px); }
h1 .ghost::after  { color: rgba(233, 230, 227, 0.35); transform: translateX(2px); }
h1 .ghost span { position: relative; z-index: 1; }
.hero-sub {
  color: var(--muted);
  max-width: 480px;
  margin: 24px auto 36px;
  font-size: 17px;
}
.scroll-hint {
  position: absolute;
  bottom: 28px; left: 50%;
  transform: translateX(-50%);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--muted);
  z-index: 2;
}

/* ---------- page header (inner pages) ---------- */
.page-head {
  max-width: 1080px;
  margin: 0 auto;
  padding: 150px 40px 32px;
}
.page-head h1 { font-size: clamp(34px, 5vw, 44px); }
.page-head .lede {
  color: var(--muted);
  max-width: 900px;
  margin-top: 18px;
  font-size: 17px;
}

/* ---------- buttons & pills ---------- */
.cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.cta-row.left { justify-content: flex-start; }
.btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  padding: 13px 28px;
  border-radius: 4px;
  border: 1px solid var(--text);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  cursor: pointer;
  display: inline-block;
}
.btn.solid { background: var(--text); color: var(--bg); }
.btn.solid:hover { background: transparent; color: var(--text); }
.btn.ghost-btn { border-color: var(--line); color: var(--muted); }
.btn.ghost-btn:hover { border-color: var(--text); color: var(--text); }
.btn.disabled { opacity: 0.45; cursor: default; pointer-events: none; }

.pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  padding: 5px 12px;
  min-width: 96px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 100px;
  color: var(--muted);
  white-space: nowrap;
}
.pill.warm,
.pill.cool { color: var(--text); border-color: rgba(255, 255, 255, 0.22); }

/* ---------- sections ---------- */
section {
  max-width: 1080px;
  margin: 0 auto;
  padding: 76px 40px;
}
section.tight { padding-top: 36px; }
.section-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 22px;
}
.section-head .tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--muted);
}
h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

/* ---------- stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}
/* home has exactly 4 stats: keep them 4-across, then a clean 2x2 — never a stray gap */
.home .stats { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 760px) {
  .home .stats { grid-template-columns: repeat(2, 1fr); }
}
.stat { background: var(--bg); padding: 28px 26px; }
.stat .num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 34px;
  font-weight: 500;
}
.stat .label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 4px;
}
.stat .sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: var(--text);
  margin-top: 2px;
}
.about-copy {
  max-width: 900px;
  color: var(--muted);
  margin-bottom: 40px;
  font-size: 17px;
  line-height: 1.7;
}
.about-copy strong { color: var(--text); font-weight: 500; }

/* ---------- events list ---------- */
.event {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 26px 8px;
  border-top: 1px solid var(--line);
  transition: background 0.2s;
}
.event:last-of-type { border-bottom: 1px solid var(--line); }
.event:hover { background: var(--surface); }
.event .date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--muted);
}
.event h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  font-size: 19px;
  margin-bottom: 2px;
}
.event p { color: var(--muted); font-size: 14.5px; }

/* ---------- event hover preview card ---------- */
.event-main { position: relative; }
.event.has-preview h3 { cursor: pointer; }
.preview {
  position: absolute;
  top: 100%; left: 0;
  padding-top: 12px;            /* invisible bridge so the card stays open as you move into it */
  width: min(600px, calc(100vw - 48px));
  z-index: 40;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  pointer-events: none;
}
.event.has-preview:hover .preview {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}
.ev-card {
  display: grid;
  grid-template-columns: 44% 56%;
  min-height: 270px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6), 0 0 32px rgba(233, 230, 227, 0.05);
}
.ev-media {
  position: relative;
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(255, 255, 255, 0.12), transparent 55%),
    linear-gradient(135deg, #17171b, #0e0e11);
}
.ev-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ev-media::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), transparent 55%);
}
.ev-overlay {
  position: absolute;
  left: 16px; bottom: 14px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}
.ev-pill {
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.4);
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 11.5px;
  color: #fff;
}
.ev-cap { font-size: 11px; letter-spacing: 0.08em; color: #fff; }
.ev-body {
  padding: 26px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 13px;
}
.ev-title { font-family: 'Space Grotesk', sans-serif; font-weight: 500; font-size: 22px; margin: 0; }
.ev-desc { color: var(--muted); font-size: 14px; line-height: 1.6; margin: 0; }
.ev-more {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text);
  transition: background 0.15s, border-color 0.15s;
}
.ev-more:hover { background: rgba(255, 255, 255, 0.06); border-color: var(--text); }
@media (prefers-reduced-motion: reduce) {
  .preview, .event.has-preview:hover .preview { transform: none; }
}
@media (max-width: 680px) {
  .ev-card { grid-template-columns: 1fr; }
  .ev-media { min-height: 150px; }
}

/* ---------- CTF band (events page) ---------- */
.ctf-band { background: var(--surface); }
.ctf-band-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 70px 40px 80px;
}
.ctf-band-inner .section-head .tag { color: var(--text); }
.ctf-band-inner .lede {
  color: var(--muted);
  max-width: 640px;
  margin-bottom: 40px;
}
.ctf-band-inner .stats { margin-bottom: 40px; }
.ctf-band-inner .stat { background: var(--bg); }

/* ---------- committee grid ---------- */
.member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.member {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 30px 26px;
}
.member .avatar {
  position: relative;
  overflow: hidden;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 32%, rgba(255, 255, 255, 0.07), var(--bg) 70%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  color: var(--text);
  margin-bottom: 18px;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.member:hover .avatar {
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 0 18px rgba(233, 230, 227, 0.14);
  transform: translateY(-2px);
}
.member .avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.member h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  font-size: 19px;
}
.member h3.placeholder { color: #66636a; font-weight: 400; }
.member .role {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 5px 0 16px;
}
.member p { color: var(--muted); font-size: 14px; line-height: 1.6; }
.member .bio {
  color: #c8c5c2;
  margin: 0;
}
/* divider only when duties follow the bio */
.member .bio:not(:last-child) {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.member .duties {
  list-style: none;
  margin: 2px 0 0;
  padding: 0;
}
.member .duties li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.5;
}
.member .duties li:last-child { margin-bottom: 0; }
.member .duties li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--muted);
}
.member.warm .duties li::before { color: var(--text); }
.member.cool .duties li::before { color: var(--text); }

/* ---------- join ---------- */
#join, .join-section { padding-top: 40px; }
.join-box {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 52px 40px;
  text-align: center;
  background: radial-gradient(circle at 1px 1px, var(--line) 1px, transparent 1px);
  background-size: 26px 26px;
}
.join-box h2 { margin-bottom: 12px; }
.join-box p { color: var(--muted); max-width: 460px; margin: 0 auto 28px; }

/* ---------- footer ---------- */
footer {
  border-top: 1px solid var(--line);
  padding: 34px 40px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  color: var(--muted);
}
footer a:hover { color: var(--text); }
footer .links { display: flex; gap: 22px; flex-wrap: wrap; }
footer .links a { display: inline-flex; align-items: center; gap: 7px; }
footer .links a svg { width: 14px; height: 14px; flex: none; }
.footer-credit {
  flex-basis: 100%;
  margin: 6px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: #5f5f66;
  font-size: 11.5px;
}
.footer-credit a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s;
}
.footer-credit a:hover { color: var(--text); }

/* ---------- mobile menu ---------- */
.menu-btn {
  display: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 2px;
}
.menu-btn:hover { color: var(--text); }

/* ---------- scroll reveals ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.visible { opacity: 1; transform: none; }

/* staggered children: cascade in once their section reveals */
.stagger {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.visible .stagger { opacity: 1; transform: none; }

/* ---------- 404 ---------- */
.error-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
}
.error-page .code {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  font-size: clamp(80px, 18vw, 160px);
  line-height: 1;
  letter-spacing: -0.03em;
  position: relative;
  z-index: 2;
}
.error-page .msg {
  font-family: 'JetBrains Mono', monospace;
  color: var(--muted);
  font-size: 15px;
  margin: 18px 0 36px;
  position: relative;
  z-index: 2;
}
.error-page .btn { position: relative; z-index: 2; }

/* ---------- hero / 404 entrance motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  @keyframes rise {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: none; }
  }
  @keyframes fade {
    from { opacity: 0; }
    to   { opacity: 1; }
  }
  .hero #waves, .error-page #waves { animation: fade 1.4s ease both; }
  .hero-inner > *, .error-page .code, .error-page .msg, .error-page .btn {
    animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
  }
  .hero-inner > *:nth-child(1) { animation-delay: 0.15s; }
  .hero-inner > *:nth-child(2) { animation-delay: 0.3s; }
  .hero-inner > *:nth-child(3) { animation-delay: 0.45s; }
  .hero-inner > *:nth-child(4) { animation-delay: 0.6s; }
  .scroll-hint { animation: fade 1s ease 1.2s both; }
  .error-page .msg { animation-delay: 0.2s; }
  .error-page .btn { animation-delay: 0.35s; }
}

/* ---------- responsive ---------- */
@media (max-width: 720px) {
  nav {
    padding: 14px 20px;
    /* the nav blur traps fixed children, which broke the menu, so on
       mobile we drop the blur for a solid background instead */
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: rgba(11, 11, 13, 0.97);
  }
  section { padding: 56px 20px; }
  .page-head { padding: 120px 20px 24px; }
  .event { grid-template-columns: 1fr; gap: 8px; }
  .ctf-band-inner { padding: 56px 20px 64px; }
  footer { padding: 28px 20px; }

  .menu-btn { display: block; }
  .nav-links {
    display: none;
    position: fixed;
    inset: 0;
    top: 49px;
    background: rgba(11, 11, 13, 0.97);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 36px;
    z-index: 49;
  }
  .nav-links.open { display: flex; animation: menu-in 0.25s ease both; }
  @keyframes menu-in {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: none; }
  }
  .nav-links a { font-size: 17px; }
  body.menu-open { overflow: hidden; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .brand .cursor { animation: none; }
  html { scroll-behavior: auto; }
  .reveal, .stagger { opacity: 1; transform: none; transition: none; }
  .nav-links.open { animation: none; }
}

/* gentle hover lift on cards */
.member, .stat {
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.3s;
}
.member:hover { transform: translateY(-3px); border-color: var(--muted); }

/* ---------- blog ---------- */
.featured {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  padding: 40px;
  margin-bottom: 56px;
  display: block;
  transition: border-color 0.3s, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.featured:hover { border-color: var(--muted); transform: translateY(-3px); }
.featured .meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  color: var(--text);
  margin-bottom: 14px;
}
.featured h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  font-size: 26px;
  margin-bottom: 10px;
}
.featured p { color: var(--muted); max-width: 640px; font-size: 15.5px; }
.featured .read {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--text);
  margin-top: 20px;
  display: inline-block;
}

/* secondary posts: card grid below the featured post */
.post-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
.post-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  padding: 28px;
  transition: border-color 0.3s, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.post-card:hover { transform: translateY(-3px); }
.post-card .meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text);
  margin-bottom: 12px;
}
.post-card h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  font-size: 19px;
  line-height: 1.3;
  margin-bottom: 10px;
}
.post-card p {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.6;
  flex: 1;            /* push the read-more link to the bottom of the card */
}
.post-card .read {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  color: var(--text);
  margin-top: 18px;
  align-self: flex-start;
}
@media (max-width: 720px) {
  .post-grid { grid-template-columns: 1fr; }
  .post-card { padding: 24px; }
}

/* ---- blog: 'want more' CTA + further-reading links ---- */
.blog-more { margin-top: 8px; }
.more-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  padding: 30px 34px;
}
.more-cta-text h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  font-size: 21px;
  margin-bottom: 8px;
}
.more-cta-text p { color: var(--muted); font-size: 14.5px; line-height: 1.6; max-width: 520px; }
.more-cta .btn { flex-shrink: 0; }

.reads-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 44px 0 16px;
}
.reads-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.read-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 16px 18px;
  transition: border-color 0.25s, background 0.25s, transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.read-link:hover {
  border-color: rgba(111, 201, 216, 0.4);
  background: var(--surface);
  transform: translateX(4px);
}
.rl-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  color: var(--text);
}
.rl-note { color: var(--muted); font-size: 13px; }
@media (max-width: 720px) {
  .more-cta { padding: 24px; }
  .reads-grid { grid-template-columns: 1fr; }
}

/* ---------- resources ---------- */
.repo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.repo {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.3s;
}
.repo:hover { transform: translateY(-3px); border-color: var(--muted); }
.repo .name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 15px;
  color: var(--text);
  margin-bottom: 10px;
}
.repo .name::before { content: '▸ '; color: var(--text); }
.repo p { color: var(--muted); font-size: 14px; line-height: 1.6; flex: 1; }
.repo .meta {
  display: flex;
  gap: 18px;
  margin-top: 18px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--muted);
}
.repo .lang::before {
  content: '';
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: -0.5px;
}
.repo .lang.py::before { background: var(--cool); }
.repo .lang.js::before { background: var(--warm); }
.repo .lang.sh::before { background: var(--muted); }

.resource-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  padding: 22px 8px;
  border-top: 1px solid var(--line);
  align-items: baseline;
  transition: background 0.2s;
}
.resource-row:last-of-type { border-bottom: 1px solid var(--line); }
.resource-row:hover { background: var(--surface); }
.resource-row .name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  color: var(--text);
}
.resource-row p { color: var(--muted); font-size: 14.5px; }
@media (max-width: 720px) {
  .featured { padding: 26px 20px; }
  .resource-row { grid-template-columns: 1fr; gap: 4px; }
}

/* 'learn with' platforms: clickable card grid (data-driven) */
.learn-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.learn-card {
  display: flex;
  flex-direction: column;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  padding: 22px 24px;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.3s;
}
.learn-card:hover { transform: translateY(-3px); }
.lc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.lc-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 15px;
  color: var(--text);
}
.lc-level {
  flex-shrink: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 3px 10px;
}
.lc-note { color: var(--muted); font-size: 14px; line-height: 1.6; margin: 0; }
@media (max-width: 720px) {
  .learn-grid { grid-template-columns: 1fr; }
}

/* ---------- full-page wave background (contact) ---------- */
html { background: var(--bg); }   /* dark base behind the fixed canvas */
body.wave-bg { background: transparent; }
.bg-waves {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

/* ---------- contact: bento grid ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(150px, auto);
  gap: 14px;
}
.bento-cell {
  --accent: var(--text);
  --accent-soft: rgba(233, 230, 227, 0.06);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.35s, box-shadow 0.35s;
}
.bento-cell.cool { --accent: var(--text); --accent-soft: rgba(111, 201, 216, 0.09); }
.bento-cell.warm { --accent: var(--text); --accent-soft: rgba(224, 138, 109, 0.09); }
.bento-cell::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--text);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
a.bento-cell:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.42);
}
a.bento-cell:hover::after { transform: scaleX(1); }

/* cell placement — Discord anchors a 2x2 block; the rest flow around it.
   Email spans two columns so the full address is never truncated. */
.b-discord { grid-column: 1 / 3; grid-row: 1 / 3; }
.b-email   { grid-column: span 2; }
.b-find    { grid-column: 1 / 3; }
.b-union   { grid-column: 3 / 5; }
/* .b-insta and .b-hours auto-place as single cells in the top-right */

/* shared cell internals */
.bc-icon {
  flex: none;
  width: 46px; height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--accent);
  background: var(--accent-soft);
  transition: border-color 0.3s;
}
a.bento-cell:hover .bc-icon { border-color: var(--accent); }
.bc-icon svg { width: 22px; height: 22px; }
.bc-logo {
  flex: none;
  width: 48px; height: 48px;
  border-radius: 50%;
  display: block;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}
/* a wordmark logo: keep it square + fully visible, not circle-cropped */
.bc-logo.wordmark {
  border-radius: 10px;
  object-fit: contain;
  background: #0a0a0d;
}
.bento-cell h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  font-size: 18px;
}
.bento-cell p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  flex: 1;
  text-wrap: pretty;
}
.bc-cta {
  font-size: 12.5px;
  color: var(--accent);
  letter-spacing: 0.02em;
  margin-top: auto;
}

/* big Discord cell */
.b-discord { gap: 0; }
.bc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 26px;
}
.bc-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text);
  letter-spacing: 0.06em;
}
.b-discord .bc-body { flex: 1; }
.b-discord h3 {
  font-size: clamp(26px, 3.4vw, 34px);
  line-height: 1.1;
  margin-bottom: 14px;
}
.b-discord .bc-body p {
  max-width: 420px;
  font-size: 15px;
  flex: none;
}
.b-discord .bc-cta { margin-top: 26px; font-size: 14px; }
.bc-watermark {
  position: absolute;
  right: -22px; bottom: -28px;
  width: 150px; height: 150px;
  color: var(--text);
  opacity: 0.06;
  pointer-events: none;
}
.pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #28c840;
  box-shadow: 0 0 0 0 rgba(40, 200, 64, 0.6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(40, 200, 64, 0.5); }
  70%  { box-shadow: 0 0 0 9px rgba(40, 200, 64, 0); }
  100% { box-shadow: 0 0 0 0 rgba(40, 200, 64, 0); }
}

@media (max-width: 880px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .b-discord { grid-column: 1 / 3; grid-row: auto; }
  .b-email, .b-find, .b-union { grid-column: 1 / 3; }
}
@media (max-width: 540px) {
  .bento { grid-template-columns: 1fr; }
  .b-discord, .b-insta, .b-hours, .b-email, .b-find, .b-union { grid-column: auto; grid-row: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .pulse { animation: none; }
  a.bento-cell:hover { transform: none; }
}

/* ============================================================
   POLISH LAYER — depth, accents & interaction craft
   A single cascade-override pass applied site-wide.
   ============================================================ */

/* ---- atmosphere: soft accent glows anchored to the viewport ---- */
body {
  background:
    radial-gradient(70vw 55vh at 12% -8%, rgba(111, 201, 216, 0.07), transparent 60%),
    radial-gradient(55vw 50vh at 105% 2%, rgba(224, 138, 109, 0.06), transparent 55%),
    var(--bg);
  background-attachment: fixed;
}

/* ---- nav: animated underline + tighter brand ---- */
.nav-links a { position: relative; }
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 1px;
  background: var(--text);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after { transform: scaleX(1); }
@media (max-width: 720px) { .nav-links a::after { display: none; } }

/* ---- hero: vignette to focus the headline over the waves ---- */
header.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(58% 58% at 50% 48%, transparent 40%, rgba(11, 11, 13, 0.55));
}

/* ---- section headers: accent tag + trailing hairline rule ---- */
.section-head { align-items: center; }
.section-head::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line), transparent);
}
.section-head .tag {
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 4px 9px;
  font-size: 12px;
  letter-spacing: 0.06em;
}
.ctf-band-inner .section-head .tag { color: var(--text); }

/* ---- buttons: lift + accent glow ---- */
.btn { will-change: transform; }
.btn.solid:hover {
  box-shadow: 0 10px 30px rgba(111, 201, 216, 0.14);
  transform: translateY(-1px);
}
.btn.ghost-btn:hover {
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  transform: translateY(-1px);
}

/* ---- buttons: light sweep on hover + click ripple ---- */
.btn { position: relative; overflow: hidden; }
/* a diagonal sheen that slides across the button on hover */
.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -130%;
  width: 55%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-18deg);
  transition: left 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.btn:hover::before { left: 140%; }
/* ripple span injected by site.js on click; colour follows the text colour
   so it reads on both the light solid button and the dark ghost button */
.btn .ripple {
  position: absolute;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.3;
  transform: scale(0);
  pointer-events: none;
  animation: btn-ripple 0.6s ease-out forwards;
}
@keyframes btn-ripple {
  to { transform: scale(2.6); opacity: 0; }
}

/* ---- text links: animated underline that wipes in from the left ---- */
.featured .read,
.post-card .read,
.repo .meta span:last-child,
.footer-credit a {
  position: relative;
  background-image: linear-gradient(var(--text), var(--text));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1px;
  transition: background-size 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  padding-bottom: 2px;
}
.featured:hover .read,
.post-card:hover .read,
.repo:hover .meta span:last-child,
.footer-credit a:hover { background-size: 100% 1px; }
/* the 'view on github →' label reads as the card's action link */
.repo .meta span:last-child { color: var(--text); }

@media (prefers-reduced-motion: reduce) {
  .btn::before,
  .featured .read,
  .footer-credit a { transition: none; }
  .btn .ripple { animation: none; display: none; }
  .btn:hover::before { left: -130%; }
}

/* ---- pills: subtle tinted fill ---- */
.pill { background: rgba(255, 255, 255, 0.03); }
.pill.warm,
.pill.cool { background: rgba(255, 255, 255, 0.05); }

/* ---- stats: gradient numerals, hover sweep + accent edge ---- */
.stat { position: relative; transition: background 0.25s; }
.stat:hover { background: var(--surface); }
.stat::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--text);
  opacity: 0;
  transition: opacity 0.3s;
}
.stat:hover::before { opacity: 0.85; }
.stat .num {
  background: linear-gradient(125deg, var(--text) 35%, #ffffff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ---- event rows: left accent bar + slide on hover ---- */
.event {
  position: relative;
  border-radius: 4px;
  transition: background 0.2s, transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.event::before {
  content: '';
  position: absolute;
  left: 0; top: 8px; bottom: 8px;
  width: 2px;
  border-radius: 2px;
  background: var(--text);
  opacity: 0;
  transition: opacity 0.25s;
}
.event:hover { transform: translateX(5px); }
.event:hover::before { opacity: 1; }

/* ---- cards (committee / repos / featured / features): top accent sweep ---- */
.member, .repo, .featured, .feature, .post-card, .learn-card { position: relative; overflow: hidden; }
.member::after, .repo::after, .featured::after, .feature::after, .post-card::after, .learn-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--text);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.member:hover::after, .repo:hover::after, .featured:hover::after, .feature:hover::after, .post-card:hover::after, .learn-card:hover::after { transform: scaleX(1); }
.member:hover, .repo:hover, .featured:hover, .feature:hover, .post-card:hover, .learn-card:hover { border-color: rgba(111, 201, 216, 0.4); }

/* ---- homepage feature cards ---- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 44px;
}
.feature {
  --accent: var(--text);
  --accent-soft: rgba(233, 230, 227, 0.06);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 26px 24px 28px;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.3s;
}
.feature.cool { --accent: var(--text); --accent-soft: rgba(233, 230, 227, 0.07); }
.feature.warm { --accent: var(--text); --accent-soft: rgba(233, 230, 227, 0.07); }
.feature:hover { transform: translateY(-3px); border-color: var(--accent); }

.feature-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--accent);
  background: var(--accent-soft);
  transition: border-color 0.3s, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.feature-icon svg { width: 21px; height: 21px; }
.feature:hover .feature-icon { border-color: var(--accent); transform: translateY(-1px); }
.feature .fx {
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.04em;
}
.feature h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  font-size: 18px;
  margin: 0 0 9px;
}
.feature p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  margin: 0;
  text-wrap: pretty;     /* avoids short orphan words on the last line */
}
.feature h3 { text-wrap: balance; }   /* evens out the title across lines */
.feature .nowrap { white-space: nowrap; }   /* keeps compound terms intact */
.feature::after { background: var(--accent); }

/* ---- join box: inner glow ---- */
.join-box {
  position: relative;
  box-shadow: inset 0 0 90px rgba(111, 201, 216, 0.045);
}

/* ---- resource rows: accent name on hover ---- */
.resource-row { transition: background 0.2s, transform 0.25s cubic-bezier(0.22, 1, 0.36, 1); }
.resource-row:hover { transform: translateX(5px); }
.resource-row:hover .name { color: var(--text); }

/* ---- footer: social links lift + brighten on hover ---- */
footer .links a { position: relative; transition: color 0.2s, transform 0.2s ease; }
footer .links a:hover { transform: translateY(-2px); }

/* ---- respect reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  .event, .resource-row, .btn { transition: none; }
  .event:hover, .resource-row:hover, .btn:hover { transform: none; }
  footer .links a:hover { transform: none; }
}

/* ============================================================
   BOOT SCREEN / PRELOADER  (plays once per browser session)
   ============================================================ */
.booted #preloader { display: none !important; }   /* set by inline <head> script on repeat visits */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  font-family: 'JetBrains Mono', monospace;
  opacity: 1;
  transition: opacity 0.55s ease;
  /* failsafe: fade out on its own even if JS never runs, so the site is never trapped */
  animation: pl-failsafe 0.5s ease 5s forwards;
}
#preloader.pl-done { opacity: 0; pointer-events: none; }
@keyframes pl-failsafe { to { opacity: 0; visibility: hidden; } }

/* faint masked grid behind the terminal card */
#preloader::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(233, 230, 227, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(233, 230, 227, 0.05) 1px, transparent 1px);
  background-size: 34px 34px;
  -webkit-mask-image: radial-gradient(circle at 50% 45%, #000 25%, transparent 72%);
  mask-image: radial-gradient(circle at 50% 45%, #000 25%, transparent 72%);
  opacity: 0.7;
}

.pl-inner {
  position: relative;
  width: min(520px, 86vw);
  padding: 26px 28px 30px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(18, 18, 22, 0.72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6), 0 0 60px rgba(111, 201, 216, 0.06);
}
.pl-dots { display: flex; gap: 7px; margin-bottom: 18px; }
.pl-dots span { width: 11px; height: 11px; border-radius: 50%; background: var(--line); }
.pl-dots span:nth-child(1) { background: rgba(224, 138, 109, 0.5); }
.pl-dots span:nth-child(2) { background: rgba(224, 197, 109, 0.45); }
.pl-dots span:nth-child(3) { background: rgba(111, 201, 216, 0.5); }

.pl-log {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.95;
  color: var(--muted);
  min-height: 100px;
  white-space: pre-wrap;
}
.pl-log div { opacity: 0; animation: pl-lineIn 0.25s ease forwards; }
@keyframes pl-lineIn {
  from { opacity: 0; transform: translateX(-4px); }
  to   { opacity: 1; transform: none; }
}
.pl-log .ok, .pl-status.ok { color: #7CFFB2; }

.pl-bar {
  margin-top: 16px;
  height: 4px;
  border-radius: 4px;
  background: rgba(233, 230, 227, 0.09);
  overflow: hidden;
}
.pl-fill {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--cool), var(--text));
  box-shadow: 0 0 12px rgba(111, 201, 216, 0.5);
  transition: width 1.7s cubic-bezier(0.45, 0, 0.15, 1);
}
.pl-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.pl-brand {
  margin-top: 22px;
  text-align: center;
  font-size: 19px;
  letter-spacing: 0.14em;
  color: var(--text);
}
.pl-cursor { animation: blink 1s steps(1) infinite; }

/* lock background scroll while the boot screen is up */
html.pl-lock { overflow: hidden; }
/* the whole overlay is clickable to skip */
#preloader { cursor: pointer; }
/* 'click to skip' hint fades in after a moment */
.pl-skip {
  margin-top: 18px;
  text-align: center;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0;
  animation: pl-skipIn 0.4s ease 1.3s forwards;
}
@keyframes pl-skipIn { to { opacity: 0.5; } }

/* glitch burst the instant access is granted */
#preloader.pl-flash .pl-inner { animation: pl-glitch 0.4s steps(2) 1; }
@keyframes pl-glitch {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(-3px, 1px); box-shadow: 3px 0 0 rgba(224, 138, 109, 0.5), -3px 0 0 rgba(111, 201, 216, 0.5), 0 30px 90px rgba(0, 0, 0, 0.6); }
  50%  { transform: translate(3px, -1px); }
  75%  { transform: translate(-2px, 0); box-shadow: -3px 0 0 rgba(224, 138, 109, 0.5), 3px 0 0 rgba(111, 201, 216, 0.5), 0 30px 90px rgba(0, 0, 0, 0.6); }
  100% { transform: translate(0, 0); }
}

@media (prefers-reduced-motion: reduce) {
  #preloader { display: none !important; }
}

/* ============================================================
   GLOW LAYER — soft white bloom on key elements.
   Monochrome base; the warm/cool accents are kept intact.
   ============================================================ */

/* page titles glow softly white */
header.hero h1 { text-shadow: 0 0 38px rgba(233, 230, 227, 0.22); }
.page-head h1 { text-shadow: 0 0 30px rgba(233, 230, 227, 0.16); }

/* the blinking logo cursor gets a faint halo */
.brand .cursor { box-shadow: 0 0 9px rgba(233, 230, 227, 0.75); }

/* primary buttons bloom white on hover */
.btn.solid {
  transition: background 0.2s, color 0.2s, box-shadow 0.3s, transform 0.25s;
}
.btn.solid:hover {
  box-shadow: 0 0 30px rgba(233, 230, 227, 0.38);
  transform: translateY(-1px);
}

/* stat numerals glow (sits behind the gradient fill) */
.stat .num { text-shadow: 0 0 22px rgba(233, 230, 227, 0.18); }

/* scroll hint shimmer */
.scroll-hint { text-shadow: 0 0 18px rgba(233, 230, 227, 0.3); }

/* cards & cells pick up a faint white halo on hover, on top of their accent */
.feature:hover,
.member:hover,
.repo:hover,
.featured:hover,
a.bento-cell:hover {
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.42), 0 0 28px rgba(233, 230, 227, 0.06);
}

/* event & resource rows glow faintly as they slide */
.event:hover,
.resource-row:hover {
  box-shadow: 0 0 24px rgba(233, 230, 227, 0.05);
}

/* the glass hero edge already catches light; lift its outer bloom a touch */
.hero-inner {
  box-shadow:
    0 36px 90px rgba(0, 0, 0, 0.55),
    0 0 50px rgba(233, 230, 227, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -10px 30px rgba(255, 255, 255, 0.03);
}

@media (prefers-reduced-motion: reduce) {
  .btn.solid:hover { transform: none; }
}

/* ---- legibility over the wave background ---- */
.page-head .lede,
.event .date, .event h3, .event p,
.resource-row .name, .resource-row p {
  text-shadow: 0 1px 10px rgba(11, 11, 13, 0.6), 0 0 2px rgba(11, 11, 13, 0.5);
}

/* ============================================================
   BLOG — image-rich featured card & post thumbnails
   ============================================================ */

/* a gradient placeholder so cards look intentional while images load */
.featured-media, .post-thumb {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(255, 255, 255, 0.08), transparent 55%),
    linear-gradient(135deg, #17171b, #0e0e11);
}
.featured-media img, .post-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.featured.has-media:hover .featured-media img,
.post-card.has-media:hover .post-thumb img { transform: scale(1.04); }

/* featured card: full-width banner image on top, content below */
.featured.has-media {
  padding: 0;
  overflow: hidden;
}
.featured.has-media .featured-media {
  width: 100%;
  aspect-ratio: 21 / 9;
}
.featured.has-media .featured-body {
  padding: 30px 36px 34px;
}
.featured-flag {
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 10.5px;
  color: var(--bg);
  background: var(--cool);
  border-radius: 4px;
  padding: 2px 7px;
  margin-right: 10px;
  vertical-align: 1px;
}
.featured.has-media h3 { font-size: 25px; }

/* post-grid thumbnails sit flush to the top of each card */
.post-card.has-media { padding: 28px; }
.post-card.has-media .post-thumb {
  margin: -28px -28px 18px;
  aspect-ratio: 16 / 9;
}

@media (max-width: 720px) {
  .featured.has-media .featured-media { aspect-ratio: 16 / 9; }
  .featured.has-media .featured-body { padding: 22px; }
}
/* homepage blog teaser: 3 cards across on desktop */
@media (min-width: 721px) {
  #home-posts .post-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .featured-media img, .post-thumb img,
  .featured.has-media:hover .featured-media img,
  .post-card.has-media:hover .post-thumb img { transition: none; transform: none; }
}

/* ---- small layout utilities (replace one-off inline styles) ---- */
.flush-top { padding-top: 0; }                        /* a section that butts against the one above */
.section-cta { margin-top: 28px; }                    /* spacing above an inline button after a list */
.error-content { position: relative; z-index: 2; }   /* 404 content above the wave canvas */

/* ============================================================
   CONTACT PAGE — a11y, copy-email cell & FAQ accordion
   ============================================================ */

/* ---- visually hidden, still read by screen readers ---- */
.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;
}

/* ---- main landmark + skip link ---- */
main { display: block; }
#main { scroll-margin-top: 84px; }   /* keep the target clear of the fixed nav */
#main:focus { outline: none; }       /* programmatic focus from the skip link, no ring */
.skip-link {
  position: fixed;
  top: 10px; left: 10px;
  z-index: 100;
  transform: translateY(calc(-100% - 14px));
  background: var(--text);
  color: var(--bg);
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  padding: 10px 16px;
  border-radius: 6px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid var(--cool);
  outline-offset: 2px;
}

/* ---- email cell: copy-to-clipboard + compose ---- */
.b-email .bc-email-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;        /* row layout spreads copy + compose across the wide cell */
  margin-top: auto;
}
.bc-copy {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  max-width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 12.5px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.bc-copy:hover { border-color: var(--accent); background: rgba(255, 255, 255, 0.06); }
.bc-copy-ico { position: relative; flex: none; width: 16px; height: 16px; }
.bc-copy-ico svg {
  position: absolute;
  inset: 0;
  width: 16px; height: 16px;
  transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
.bc-copy .ico-check { opacity: 0; transform: scale(0.5); color: #28c840; }
.bc-copy.copied { border-color: rgba(40, 200, 64, 0.5); color: #7CFFB2; }
.bc-copy.copied .ico-copy { opacity: 0; transform: scale(0.5); }
.bc-copy.copied .ico-check { opacity: 1; transform: scale(1); }
.bc-copy-addr { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-send {
  font-size: 12.5px;
  color: var(--muted);
  transition: color 0.2s;
}
.bc-send:hover { color: var(--text); }

/* ---- FAQ accordion ---- */
.faq { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.faq-item[open] {
  border-color: rgba(111, 201, 216, 0.4);
  box-shadow: 0 0 24px rgba(233, 230, 227, 0.04);
}
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  cursor: pointer;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  font-size: 16.5px;
  color: var(--text);
  list-style: none;
  transition: color 0.2s;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: #fff; }
/* plus/minus toggle drawn in CSS */
.faq-icon { position: relative; flex: none; width: 14px; height: 14px; }
.faq-icon::before, .faq-icon::after {
  content: '';
  position: absolute;
  background: var(--muted);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), background 0.3s;
}
.faq-icon::before { top: 6px; left: 0; width: 14px; height: 2px; border-radius: 2px; }
.faq-icon::after  { top: 0; left: 6px; width: 2px; height: 14px; border-radius: 2px; }
.faq-item[open] .faq-icon::after  { transform: scaleY(0); }
.faq-item[open] .faq-icon::before { background: var(--cool); }
.faq-a { padding: 0 22px 20px; }
.faq-a p { color: var(--muted); font-size: 14.5px; line-height: 1.7; margin: 0; }
.faq-a a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s;
}
.faq-a a:hover { color: var(--cool); }
@media (prefers-reduced-motion: no-preference) {
  .faq-item[open] .faq-a { animation: faq-in 0.3s ease both; }
  @keyframes faq-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: none; }
  }
}

/* closing CTA: reuse the blog's .more-cta but match the FAQ card radius */
.faq-foot { margin-top: 26px; border-radius: 12px; }

@media (prefers-reduced-motion: reduce) {
  .skip-link, .bc-copy-ico svg, .faq-icon::before, .faq-icon::after { transition: none; }
}
