/* ============================================================
   UiTM Cyberheroes Club — Main Stylesheet
   ============================================================ */

/* ===== GOOGLE FONTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Exo+2:wght@400;600;700;800;900&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;600&display=swap');

/* ===== RESET ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* ===== TOKENS ===== */
:root {
  --bg-primary:        #070c18;
  --bg-secondary:      #0b1628;
  --bg-card:           #0e1f3a;
  --bg-card-hover:     #112448;
  --navy:              #1b3a8f;
  --navy-bright:       #2e57cc;
  --navy-glow:         rgba(27,58,143,.25);
  --red:               #c91c1c;
  --red-bright:        #e53535;
  --red-glow:          rgba(201,28,28,.25);
  --text-primary:      #e2e8f0;
  --text-secondary:    #94a3b8;
  --text-muted:        #5a7090;
  --border:            rgba(255,255,255,.07);
  --border-red:        rgba(201,28,28,.3);
  --border-navy:       rgba(27,58,143,.3);
  --shadow:            0 8px 32px rgba(0,0,0,.5);
  --shadow-red:        0 0 24px rgba(201,28,28,.2);
  --shadow-navy:       0 0 24px rgba(27,58,143,.2);
  --radius:            8px;
  --radius-lg:         14px;
  --radius-xl:         20px;
  --ease:              .3s ease;
  --font-head:         'Exo 2', sans-serif;
  --font-body:         'Inter', sans-serif;
  --font-mono:         'JetBrains Mono', monospace;
}

/* ===== BASE ===== */
html { scroll-behavior: smooth; }
body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.65;
  overflow-x: hidden;
}
h1,h2,h3,h4,h5 { font-family: var(--font-head); font-weight: 800; line-height: 1.2; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--red); border-radius: 3px; }

/* ===== SELECTION ===== */
::selection { background: rgba(201,28,28,.35); color: #fff; }

/* ===== NAVBAR ===== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: 68px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem;
  background: rgba(7,12,24,.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: var(--ease);
}
.navbar.scrolled { background: rgba(7,12,24,.97); box-shadow: 0 2px 24px rgba(0,0,0,.6); }

.nav-brand { display: flex; align-items: center; gap: 11px; }
.nav-brand img { height: 40px; width: 40px; object-fit: contain; }
.nav-brand-text {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: .95rem;
  letter-spacing: .3px;
  background: linear-gradient(135deg, #6a9de8, var(--red-bright));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

.nav-links { display: flex; align-items: center; gap: .2rem; list-style: none; }
.nav-links a {
  padding: .45rem .85rem;
  border-radius: var(--radius);
  font-size: .835rem; font-weight: 500;
  color: var(--text-secondary);
  transition: var(--ease);
  white-space: nowrap;
}
.nav-links a:hover { color: var(--text-primary); background: rgba(255,255,255,.06); }
.nav-links a.active { color: var(--red-bright); }
.nav-cta { background: var(--red) !important; color: #fff !important; }
.nav-cta:hover { background: var(--red-bright) !important; box-shadow: var(--shadow-red); }

.hamburger {
  display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 6px;
  background: transparent; border: none; outline: none; -webkit-tap-highlight-color: transparent;
}
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform .3s cubic-bezier(.22,1,.36,1), opacity .2s ease, background .2s ease;
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); background: var(--red-bright); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); background: var(--red-bright); }

.mobile-nav {
  position: fixed; top: 68px; left: 0; right: 0; z-index: 999;
  background: rgba(7, 12, 24, .97);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  padding: .5rem 1rem 1rem;
  display: flex; flex-direction: column; gap: .15rem;
  /* Hidden by default — animate instead of display:none */
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
  transition: opacity .25s ease, transform .3s cubic-bezier(.22, 1, .36, 1);
}
.mobile-nav.open {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}
/* Stagger each link sliding in */
.mobile-nav a {
  padding: .75rem 1rem;
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: .9rem;
  border-left: 2px solid transparent;
  transition: background var(--ease), color var(--ease), border-color var(--ease),
              opacity .25s ease, transform .3s cubic-bezier(.22, 1, .36, 1);
  opacity: 0;
  transform: translateX(-8px);
}
.mobile-nav.open a { opacity: 1; transform: translateX(0); }
.mobile-nav.open a:nth-child(1)  { transition-delay: .04s; }
.mobile-nav.open a:nth-child(2)  { transition-delay: .07s; }
.mobile-nav.open a:nth-child(3)  { transition-delay: .10s; }
.mobile-nav.open a:nth-child(4)  { transition-delay: .13s; }
.mobile-nav.open a:nth-child(5)  { transition-delay: .16s; }
.mobile-nav.open a:nth-child(6)  { transition-delay: .19s; }
.mobile-nav.open a:nth-child(7)  { transition-delay: .22s; }
.mobile-nav.open a:nth-child(8)  { transition-delay: .25s; }
.mobile-nav.open a:nth-child(9)  { transition-delay: .28s; }
.mobile-nav.open a:nth-child(10) { transition-delay: .31s; }
.mobile-nav a:hover { background: rgba(255,255,255,.05); color: var(--text-primary); border-left-color: var(--red); }
.mobile-nav a.active { color: var(--red-bright); border-left-color: var(--red-bright); }

/* ===== PAGE WRAPPER ===== */
.page-wrapper { padding-top: 68px; min-height: 100vh; }

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: calc(100vh - 68px);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
#hero-canvas { position: absolute; inset: 0; z-index: 0; }
.hero-overlay {
  position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 50%, rgba(27,58,143,.08) 0%, transparent 70%);
}
.hero-content { position: relative; z-index: 1; text-align: center; padding: 2rem; max-width: 820px; }

.hero-logo {
  width: 110px; height: 110px; object-fit: contain;
  margin: 0 auto 1.75rem;
  filter: drop-shadow(0 0 32px rgba(201,28,28,.45));
  animation: float 3.5s ease-in-out infinite;
}
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-12px)} }

.hero-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .35rem 1.1rem;
  border: 1px solid var(--border-red);
  border-radius: 100px;
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: 2px; text-transform: uppercase;
  color: var(--red-bright);
  background: rgba(201,28,28,.07);
  margin-bottom: 1.5rem;
}
.hero-badge-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--red-bright); animation: pulse 1.5s ease infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.3} }

.hero-title {
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 900;
  letter-spacing: -1px;
  margin-bottom: 1rem;
  line-height: 1.08;
}
.grad-text {
  background: linear-gradient(135deg, #6a9de8 0%, var(--red-bright) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-sub {
  font-size: 1.05rem; color: var(--text-secondary);
  max-width: 520px; margin: 0 auto 2.5rem; line-height: 1.75;
}
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero-scroll {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: .4rem;
  font-family: var(--font-mono); font-size: .65rem; letter-spacing: 2px; color: var(--text-muted);
  text-transform: uppercase; z-index: 1; animation: fadeInUp .8s 1s both;
}
.scroll-arrow { width: 20px; height: 20px; border-right: 2px solid var(--text-muted); border-bottom: 2px solid var(--text-muted); transform: rotate(45deg); animation: scrollBounce 1.5s ease infinite; }
@keyframes scrollBounce { 0%,100%{transform:rotate(45deg) translateY(0)} 50%{transform:rotate(45deg) translateY(5px)} }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .7rem 1.6rem;
  border-radius: var(--radius);
  font-weight: 600; font-size: .875rem; letter-spacing: .3px;
  cursor: pointer; border: none; text-decoration: none;
  transition: var(--ease);
}
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-bright); transform: translateY(-2px); box-shadow: var(--shadow-red); }
.btn-outline { background: transparent; color: var(--text-primary); border: 1px solid var(--border); }
.btn-outline:hover { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.18); transform: translateY(-2px); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-bright); transform: translateY(-2px); box-shadow: var(--shadow-navy); }
.btn-sm { padding: .45rem 1rem; font-size: .8rem; }

/* ===== SECTION ===== */
section { padding: 5.5rem 0; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 1.5rem; }

.section-header { text-align: center; margin-bottom: 3.5rem; }
.section-tag {
  display: inline-block; margin-bottom: .75rem;
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--red-bright);
}
.section-title { font-size: clamp(1.8rem,4vw,2.75rem); margin-bottom: 1rem; }
.section-desc { color: var(--text-secondary); max-width: 580px; margin: 0 auto; line-height: 1.75; }

.divider {
  display: flex; align-items: center; gap: .75rem;
  width: fit-content; margin: 0 auto .75rem;
}
.divider::before,.divider::after { content:''; width:50px; height:2px; }
.divider::before { background: linear-gradient(90deg, transparent, var(--red)); }
.divider::after  { background: linear-gradient(90deg, var(--red), transparent); }
.divider-dot { width: 7px; height: 7px; background: var(--red); border-radius: 50%; }

/* ===== CARDS ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: var(--ease);
}
.card:hover {
  border-color: var(--border-red);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow), var(--shadow-red);
}
.card-icon {
  width: 46px; height: 46px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; margin-bottom: 1rem;
  background: rgba(201,28,28,.1); border: 1px solid var(--border-red);
}
.card-title { font-size: 1.05rem; font-weight: 700; margin-bottom: .5rem; font-family: var(--font-head); }
.card-desc { font-size: .875rem; color: var(--text-secondary); line-height: 1.65; }

/* ===== GRID ===== */
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 1.25rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.25rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 1.25rem; }

/* ===== PAGE HEADER ===== */
.page-header {
  padding: 4.5rem 0 3rem; text-align: center;
  background: linear-gradient(180deg, rgba(27,58,143,.12) 0%, transparent 100%);
  border-bottom: 1px solid var(--border);
  position: relative; overflow: hidden;
}
.page-header::before {
  content: '';  position: absolute; inset: 0;
  background: radial-gradient(ellipse 50% 80% at 20% 50%, rgba(27,58,143,.1), transparent),
              radial-gradient(ellipse 50% 80% at 80% 50%, rgba(201,28,28,.07), transparent);
}
.page-header .container { position: relative; z-index: 1; }
.page-tag {
  display: inline-block; margin-bottom: 1rem;
  padding: .3rem 1rem; border-radius: 100px;
  border: 1px solid var(--border-red); background: rgba(201,28,28,.07);
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--red-bright);
}
.page-header h1 { font-size: clamp(2rem,5vw,3.25rem); margin-bottom: .875rem; }
.page-header p { color: var(--text-secondary); max-width: 580px; margin: 0 auto; }

/* ===== BADGES ===== */
.badge {
  display: inline-block; padding: .25rem .75rem; border-radius: 100px;
  font-size: .72rem; font-weight: 600; font-family: var(--font-mono); letter-spacing: .5px;
}
.badge-red   { background: rgba(201,28,28,.12); color: var(--red-bright); border: 1px solid var(--border-red); }
.badge-navy  { background: rgba(27,58,143,.12); color: #6a9de8; border: 1px solid var(--border-navy); }
.badge-green { background: rgba(34,197,94,.1); color: #4ade80; border: 1px solid rgba(34,197,94,.2); }
.badge-teal  { background: rgba(20,184,166,.1); color: #2dd4bf; border: 1px solid rgba(20,184,166,.2); }
.badge-purple{ background: rgba(168,85,247,.1); color: #c084fc; border: 1px solid rgba(168,85,247,.2); }
.badge-amber { background: rgba(245,158,11,.1); color: #fbbf24; border: 1px solid rgba(245,158,11,.2); }

/* ===== TAGS (smaller) ===== */
.tag { display: inline-block; padding: .18rem .55rem; border-radius: 4px; font-size: .7rem; font-family: var(--font-mono); border: 1px solid; }
.tag-web      { background: rgba(59,130,246,.1); color: #60a5fa; border-color: rgba(59,130,246,.2); }
.tag-pwn      { background: rgba(239,68,68,.1);  color: #f87171; border-color: rgba(239,68,68,.2); }
.tag-crypto   { background: rgba(168,85,247,.1); color: #a78bfa; border-color: rgba(168,85,247,.2); }
.tag-forensics{ background: rgba(20,184,166,.1); color: #2dd4bf; border-color: rgba(20,184,166,.2); }
.tag-misc     { background: rgba(251,191,36,.1); color: #fbbf24; border-color: rgba(251,191,36,.2); }
.tag-reverse  { background: rgba(249,115,22,.1); color: #fb923c; border-color: rgba(249,115,22,.2); }
.tag-easy     { background: rgba(34,197,94,.1);  color: #4ade80; border-color: rgba(34,197,94,.2); }
.tag-medium   { background: rgba(251,191,36,.1); color: #fbbf24; border-color: rgba(251,191,36,.2); }
.tag-hard     { background: rgba(239,68,68,.1);  color: #f87171; border-color: rgba(239,68,68,.2); }

/* Blog post category tags */
.tag-writeup    { background: rgba(59,130,246,.1);  color: #60a5fa; border-color: rgba(59,130,246,.2); }
.tag-research   { background: rgba(245,158,11,.1);  color: #fbbf24; border-color: rgba(245,158,11,.2); }
.tag-event      { background: rgba(34,197,94,.1);   color: #4ade80; border-color: rgba(34,197,94,.2); }
.tag-awareness  { background: rgba(168,85,247,.1);  color: #c084fc; border-color: rgba(168,85,247,.2); }

/* ===== FILTER TABS ===== */
.filter-bar { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 2rem; }
.filter-btn {
  padding: .45rem 1.15rem; border-radius: 100px;
  font-size: .825rem; font-weight: 500; cursor: pointer;
  background: var(--bg-card); border: 1px solid var(--border); color: var(--text-secondary);
  transition: var(--ease);
}
.filter-btn:hover,.filter-btn.active {
  background: rgba(201,28,28,.1); border-color: var(--border-red); color: var(--red-bright);
}

/* ===== ABOUT PAGE ===== */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.about-logo-wrap { display: flex; justify-content: center; }
.about-logo { width: 260px; height: 260px; object-fit: contain; filter: drop-shadow(0 0 40px rgba(201,28,28,.3)); animation: float 4s ease-in-out infinite; }
.about-stats { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-top: 2rem; }
.stat-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; text-align: center; }
.stat-num { font-size: 2.2rem; font-weight: 900; font-family: var(--font-head); color: var(--red-bright); line-height: 1; }
.stat-lbl { font-size: .75rem; color: var(--text-muted); margin-top: .35rem; font-family: var(--font-mono); letter-spacing: 1px; text-transform: uppercase; }
.feature-list { list-style: none; margin-top: 1.5rem; }
.feature-list li {
  display: flex; align-items: flex-start; gap: .75rem;
  padding: .7rem 0; border-bottom: 1px solid var(--border);
  font-size: .9rem; color: var(--text-secondary);
}
.feature-list li:last-child { border-bottom: none; }
.feature-list li .icon { color: var(--red-bright); flex-shrink: 0; margin-top: 2px; }

.mission-card {
  background: linear-gradient(135deg, rgba(27,58,143,.15), rgba(201,28,28,.08));
  border: 1px solid var(--border-navy);
  border-radius: var(--radius-lg);
  padding: 2rem;
}
.mission-card h3 { margin-bottom: .75rem; }

/* ===== HALL OF FAME ===== */
.hof-podium { display: flex; align-items: flex-end; justify-content: center; gap: 1.5rem; margin-bottom: 3rem; flex-wrap: wrap; }
.hof-podium-item { display: flex; flex-direction: column; align-items: center; gap: .75rem; }
.podium-trophy { font-size: 3rem; }
.podium-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.75rem 1.5rem;
  text-align: center; min-width: 180px;
  position: relative; overflow: hidden;
}
.podium-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; }
.podium-1::before { background: linear-gradient(90deg, #f59e0b, #fde68a, #f59e0b); }
.podium-2::before { background: linear-gradient(90deg, #94a3b8, #e2e8f0, #94a3b8); }
.podium-3::before { background: linear-gradient(90deg, #d97706, #fbbf24, #d97706); }
.podium-1 { transform: scale(1.08); }
.podium-card:hover { transform: scale(1.06) translateY(-4px); border-color: var(--border-red); }
.podium-1:hover { transform: scale(1.12) translateY(-4px); }
.podium-name { font-size: 1.1rem; font-weight: 700; font-family: var(--font-head); margin-bottom: .25rem; }
.podium-event { font-size: .78rem; color: var(--red-bright); font-family: var(--font-mono); margin-bottom: .25rem; }
.podium-detail { font-size: .78rem; color: var(--text-muted); }

.hof-table-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow-x: auto; -webkit-overflow-scrolling: touch; }
.hof-table { width: 100%; border-collapse: collapse; }
.hof-table th { padding: .875rem 1.25rem; text-align: left; font-family: var(--font-mono); font-size: .72rem; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-muted); border-bottom: 1px solid var(--border); background: rgba(255,255,255,.02); }
.hof-table td { padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); font-size: .9rem; vertical-align: middle; }
.hof-table tbody tr:last-child td { border-bottom: none; }
.hof-table tbody tr:hover { background: rgba(255,255,255,.025); }
.hof-year { font-family: var(--font-mono); font-size: .78rem; color: var(--text-muted); }
.hof-place { font-weight: 700; font-family: var(--font-head); }

/* ===== ORG CHART ===== */
.org-chart-wrap { overflow-x: auto; padding: 2rem 1rem; }
.org-tree { display: flex; flex-direction: column; align-items: center; min-width: 700px; }
.org-tree ul { padding-top: 2.5rem; position: relative; display: flex; flex-wrap: wrap; justify-content: center; gap: 0; }
.org-tree li { float: none; text-align: center; list-style: none; position: relative; padding: 2.5rem .75rem 0; transition: var(--ease); }
.org-tree li::before,.org-tree li::after {
  content: ''; position: absolute; top: 0; right: 50%;
  border-top: 2px solid var(--navy); width: 50%; height: 2.5rem;
}
.org-tree li::after { right: auto; left: 50%; border-left: 2px solid var(--navy); }
.org-tree li:only-child::before,.org-tree li:only-child::after { display: none; }
.org-tree li:only-child { padding-top: 0; }
.org-tree li:first-child::before,.org-tree li:last-child::after { border: 0; }
.org-tree li:last-child::before { border-right: 2px solid var(--navy); border-radius: 0 5px 0 0; }
.org-tree li:first-child::after { border-radius: 5px 0 0 0; }
.org-tree ul ul::before { content: ''; position: absolute; top: 0; left: 50%; border-left: 2px solid var(--red); width: 0; height: 2.5rem; }

.org-node {
  display: inline-flex; flex-direction: column; align-items: center;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.1rem 1.25rem; min-width: 145px; max-width: 175px;
  cursor: pointer; transition: var(--ease);
  position: relative;
}
.org-node:hover { border-color: var(--border-red); box-shadow: var(--shadow-red); transform: translateY(-3px); }
.org-node.is-president { border-color: var(--border-red); background: rgba(201,28,28,.06); }
.org-node.is-president .org-node-role { color: var(--red-bright); }
.org-avatar {
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, var(--navy), var(--red));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; font-weight: 800; font-family: var(--font-head); color: #fff;
  margin-bottom: .6rem; border: 2px solid rgba(255,255,255,.1);
  flex-shrink: 0;
}
.org-node-name { font-size: .88rem; font-weight: 700; font-family: var(--font-head); margin-bottom: .2rem; }
.org-node-role { font-size: .68rem; color: var(--text-muted); font-family: var(--font-mono); letter-spacing: .5px; text-align: center; }
.org-node-tooltip {
  display: none; position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  background: var(--bg-secondary); border: 1px solid var(--border-red);
  border-radius: var(--radius); padding: .75rem 1rem;
  font-size: .8rem; color: var(--text-secondary); white-space: nowrap; z-index: 10;
  box-shadow: var(--shadow);
}
.org-node:hover .org-node-tooltip { display: block; }

/* ===== EVENTS ===== */
.event-card {
  display: grid; grid-template-columns: auto 1fr auto;
  gap: 1.5rem; align-items: center;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.5rem;
  transition: var(--ease);
}
.event-card:hover { border-color: var(--border-red); background: var(--bg-card-hover); transform: translateX(5px); }
.event-date {
  background: rgba(201,28,28,.1); border: 1px solid var(--border-red);
  border-radius: var(--radius); padding: .875rem .75rem; text-align: center; min-width: 64px;
}
.event-day { font-size: 1.9rem; font-weight: 900; font-family: var(--font-head); color: var(--red-bright); line-height: 1; }
.event-month { font-size: .65rem; font-family: var(--font-mono); color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-top: .2rem; }
.event-title { font-size: 1.05rem; font-weight: 700; font-family: var(--font-head); margin: .4rem 0 .3rem; }
.event-meta { display: flex; gap: 1.2rem; flex-wrap: wrap; font-size: .8rem; color: var(--text-muted); }
.event-meta span { display: flex; align-items: center; gap: .3rem; }

/* event type badges */
.badge-ctf         { background:rgba(27,58,143,.15); color:#6a9de8; border:1px solid rgba(27,58,143,.3); }
.badge-workshop    { background:rgba(20,184,166,.1);  color:#2dd4bf; border:1px solid rgba(20,184,166,.2); }
.badge-seminar     { background:rgba(168,85,247,.1);  color:#c084fc; border:1px solid rgba(168,85,247,.2); }
.badge-competition { background:rgba(201,28,28,.12);  color:#e53535; border:1px solid rgba(201,28,28,.25); }
.badge-talk        { background:rgba(245,158,11,.1);  color:#fbbf24; border:1px solid rgba(245,158,11,.2); }

/* ===== GAMES ===== */
.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--ease);
  display: flex;
  flex-direction: column;
  position: relative;
}
.game-card:hover {
  border-color: var(--border-red);
  transform: translateY(-5px);
  box-shadow: var(--shadow), var(--shadow-red);
}
/* Top accent bar — colour set inline per card */
.game-card-bar { height: 3px; width: 100%; }

.game-card-thumb {
  width: 100%; aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--bg-secondary), rgba(27,58,143,.2));
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; position: relative;
}
.game-card-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.game-card-thumb-icon {
  font-size: 3.5rem; opacity: .25; user-select: none;
}
.game-card-body { padding: 1.35rem 1.5rem 1.5rem; flex: 1; display: flex; flex-direction: column; gap: .5rem; }
.game-card-tags { display: flex; gap: .4rem; flex-wrap: wrap; }
.game-card-title { font-family: var(--font-head); font-size: 1.1rem; font-weight: 800; line-height: 1.25; }
.game-card-desc  { font-size: .865rem; color: var(--text-secondary); line-height: 1.65; flex: 1; }
.game-card-meta  { font-family: var(--font-mono); font-size: .72rem; color: var(--text-muted); }
.game-card-footer {
  margin-top: .75rem;
  display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap;
}

/* Game type tags */
.tag-puzzle      { background: rgba(251,191,36,.1);  color: #fbbf24; border-color: rgba(251,191,36,.2); }
.tag-quiz        { background: rgba(59,130,246,.1);   color: #60a5fa; border-color: rgba(59,130,246,.2); }
.tag-simulation  { background: rgba(20,184,166,.1);   color: #2dd4bf; border-color: rgba(20,184,166,.2); }
.tag-challenge   { background: rgba(201,28,28,.12);   color: #e53535; border-color: rgba(201,28,28,.25); }
.tag-tool        { background: rgba(168,85,247,.1);   color: #c084fc; border-color: rgba(168,85,247,.2); }

/* ===== WRITEUPS ===== */
.writeup-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.5rem; transition: var(--ease);
}
.writeup-card:hover { border-color: var(--border-red); transform: translateY(-4px); box-shadow: var(--shadow); }
.writeup-tags { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .75rem; }
.writeup-title { font-size: 1.05rem; font-weight: 700; font-family: var(--font-head); margin-bottom: .35rem; }
.writeup-event { font-size: .78rem; color: var(--red-bright); font-family: var(--font-mono); margin-bottom: .5rem; }
.writeup-excerpt { font-size: .855rem; color: var(--text-secondary); line-height: 1.65; margin-bottom: 1rem; }
.writeup-footer { display: flex; justify-content: space-between; align-items: center; font-size: .78rem; color: var(--text-muted); }

/* ===== LEADERBOARD ===== */
.lb-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.75rem; }
.lb-source { font-family: var(--font-mono); font-size: .78rem; color: var(--text-muted); }
.lb-source a { color: var(--red-bright); }

.table-wrap { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow-x: auto; -webkit-overflow-scrolling: touch; }
.lb-table { width: 100%; border-collapse: collapse; }
.lb-table th { padding: .875rem 1.25rem; text-align: left; font-family: var(--font-mono); font-size: .7rem; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-muted); border-bottom: 1px solid var(--border); background: rgba(255,255,255,.02); }
.lb-table td { padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.lb-table tbody tr:last-child td { border-bottom: none; }
.lb-table tbody tr:hover { background: rgba(255,255,255,.025); }

.rank-badge { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; font-weight: 700; font-size: .85rem; font-family: var(--font-head); }
.rank-1 { background:rgba(245,158,11,.15); color:#f59e0b; border:1px solid rgba(245,158,11,.3); }
.rank-2 { background:rgba(148,163,184,.12); color:#94a3b8; border:1px solid rgba(148,163,184,.3); }
.rank-3 { background:rgba(205,127,50,.12); color:#cd7f32; border:1px solid rgba(205,127,50,.3); }
.rank-n { background:rgba(255,255,255,.05); color:var(--text-muted); border:1px solid var(--border); }

.player-cell { display: flex; align-items: center; gap: .875rem; }
.player-av {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--navy), var(--red));
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; font-weight: 700; color: #fff; font-family: var(--font-head);
}
.player-name { font-weight: 600; font-family: var(--font-head); font-size: .9rem; }
.player-handle { font-size: .73rem; color: var(--text-muted); font-family: var(--font-mono); }
.points-col { font-family: var(--font-mono); font-weight: 700; color: var(--red-bright); }
.score-bar { height: 3px; background: rgba(255,255,255,.06); border-radius: 2px; margin-top: 5px; overflow: hidden; width: 80px; }
.score-fill { height: 100%; background: linear-gradient(90deg, var(--navy-bright), var(--red)); border-radius: 2px; width: 0; transition: width 1s ease; }

/* ===== MEDIA/CONTACT ===== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.contact-form-wrap { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { margin-bottom: 1.1rem; }
.form-label { display: block; font-size: .8rem; font-weight: 600; font-family: var(--font-mono); color: var(--text-secondary); margin-bottom: .45rem; letter-spacing: .5px; }
.form-control {
  width: 100%; padding: .7rem 1rem;
  background: rgba(255,255,255,.04); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text-primary); font-size: .875rem;
  font-family: var(--font-body); outline: none; transition: var(--ease);
}
.form-control:focus { border-color: var(--red); background: rgba(201,28,28,.04); box-shadow: 0 0 0 3px rgba(201,28,28,.1); }
.form-control::placeholder { color: var(--text-muted); }
textarea.form-control { min-height: 130px; resize: vertical; }
select.form-control { display: none; } /* hidden — replaced by .custom-select-wrap */

/* ── Custom Select Dropdown ── */
.custom-select-wrap { position: relative; user-select: none; }

.custom-select-trigger {
  width: 100%; padding: .7rem 1rem;
  background: rgba(255,255,255,.04); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text-primary); font-size: .875rem;
  font-family: var(--font-body); cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  transition: border-color .2s, background .2s;
}
.custom-select-trigger:hover { border-color: rgba(201,28,28,.5); }
.custom-select-wrap.open .custom-select-trigger {
  border-color: var(--red);
  background: rgba(201,28,28,.04);
  box-shadow: 0 0 0 3px rgba(201,28,28,.1);
  border-radius: var(--radius) var(--radius) 0 0;
}

.custom-select-arrow {
  font-size: .75rem; color: var(--text-muted);
  transition: transform .25s cubic-bezier(.22,1,.36,1);
  flex-shrink: 0;
}
.custom-select-wrap.open .custom-select-arrow { transform: rotate(180deg); color: var(--red); }

.custom-select-value { flex: 1; }
.custom-select-value.placeholder { color: var(--text-muted); }

.custom-select-options {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 200;
  background: var(--bg-card);
  border: 1px solid var(--red); border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  overflow: hidden;
  max-height: 0; opacity: 0; pointer-events: none;
  transition: max-height .3s cubic-bezier(.22,1,.36,1), opacity .2s ease;
  box-shadow: 0 12px 40px rgba(0,0,0,.5);
}
.custom-select-wrap.open .custom-select-options {
  max-height: 320px; opacity: 1; pointer-events: all;
  overflow-y: auto;
}
.custom-select-options::-webkit-scrollbar { width: 4px; }
.custom-select-options::-webkit-scrollbar-thumb { background: var(--navy); border-radius: 2px; }

.custom-select-option {
  padding: .65rem 1rem; font-size: .875rem; font-family: var(--font-body);
  color: var(--text-secondary); cursor: pointer;
  display: flex; align-items: center; gap: .6rem;
  transition: background .15s, color .15s;
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.custom-select-option:last-child { border-bottom: none; }
.custom-select-option::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--border); flex-shrink: 0;
  transition: background .15s;
}
.custom-select-option:hover { background: rgba(27,58,143,.2); color: var(--text-primary); }
.custom-select-option:hover::before { background: var(--navy-light); }
.custom-select-option.selected { color: var(--red-bright); background: rgba(201,28,28,.08); }
.custom-select-option.selected::before { background: var(--red); }

.info-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; margin-bottom: 1rem; }
.info-card h3 { font-size: 1rem; margin-bottom: 1rem; }
.social-grid { display: flex; flex-direction: column; gap: .6rem; }
.social-link {
  display: flex; align-items: center; gap: .875rem;
  padding: .875rem 1rem; border-radius: var(--radius);
  background: rgba(255,255,255,.03); border: 1px solid var(--border);
  font-size: .875rem; font-weight: 500; transition: var(--ease);
}
.social-link:hover { border-color: var(--border-red); background: rgba(201,28,28,.06); }
.social-icon { font-size: 1.2rem; width: 24px; text-align: center; }
.social-name { flex: 1; }
.social-handle { font-family: var(--font-mono); font-size: .75rem; color: var(--text-muted); }

/* ===== FOOTER ===== */
footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 3.5rem 0 1.5rem;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2.5rem; margin-bottom: 2.5rem; }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: .875rem; }
.footer-brand img { height: 38px; width: 38px; object-fit: contain; }
.footer-brand-name { font-family: var(--font-head); font-weight: 900; font-size: .95rem; }
.footer-desc { font-size: .84rem; color: var(--text-muted); line-height: 1.7; max-width: 280px; }
.footer-h { font-family: var(--font-mono); font-size: .68rem; letter-spacing: 2px; text-transform: uppercase; color: var(--text-muted); margin-bottom: .875rem; }
.footer-nav { list-style: none; display: flex; flex-direction: column; gap: .45rem; }
.footer-nav a { font-size: .84rem; color: var(--text-secondary); transition: var(--ease); }
.footer-nav a:hover { color: var(--red-bright); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 1.5rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .75rem; }
.footer-bottom p { font-size: .78rem; color: var(--text-muted); }
.footer-bottom a { color: var(--red-bright); }

/* ===== UTILS ===== */
.text-red    { color: var(--red-bright); }
.text-navy   { color: #6a9de8; }
.text-muted  { color: var(--text-muted); }
.text-sec    { color: var(--text-secondary); }
.font-mono   { font-family: var(--font-mono); }
.font-head   { font-family: var(--font-head); }
.fw-700      { font-weight: 700; }
.fw-900      { font-weight: 900; }

.empty-state { text-align: center; padding: 4rem 2rem; color: var(--text-muted); }
.empty-state-icon { font-size: 3rem; margin-bottom: 1rem; }

.terminal-tag {
  display: inline-flex; align-items: center; gap: .4rem;
  font-family: var(--font-mono); font-size: .8rem; color: var(--text-muted);
  background: rgba(255,255,255,.04); border: 1px solid var(--border);
  border-radius: var(--radius); padding: .35rem .75rem;
}
.terminal-tag::before { content: '$ '; color: var(--red-bright); }

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp { from{opacity:0;transform:translateY(18px)} to{opacity:1;transform:translateY(0)} }
.fade-in-up { animation: fadeInUp .55s ease both; }
.delay-1 { animation-delay: .1s; }
.delay-2 { animation-delay: .2s; }
.delay-3 { animation-delay: .3s; }
.delay-4 { animation-delay: .4s; }
.delay-5 { animation-delay: .5s; }

/* ═══════════════════════════════════════════
   MEMBER MODAL
═══════════════════════════════════════════ */
.member-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7, 12, 24, .88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.member-modal-overlay.is-open {
  opacity: 1;
  pointer-events: all;
}

.member-modal {
  display: flex;
  width: 100%;
  max-width: 680px;
  min-height: 300px;
  background: var(--bg-card);
  border: 1px solid var(--border-navy);
  border-radius: 1.25rem;
  overflow: hidden;
  position: relative;
  box-shadow:
    0 32px 80px rgba(0,0,0,.75),
    0 0 0 1px rgba(201,28,28,.12),
    inset 0 1px 0 rgba(255,255,255,.05);
  transform: translateY(28px) scale(.96);
  transition: transform .38s cubic-bezier(.22, 1, .36, 1);
}
.member-modal-overlay.is-open .member-modal {
  transform: translateY(0) scale(1);
}

/* ── Left: Photo panel ── */
.member-modal-photo {
  width: 210px;
  flex-shrink: 0;
  position: relative;
  background: linear-gradient(155deg, #0b1628 0%, rgba(27,58,143,.15) 55%, #070c18 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
/* Concentric glow rings (coin-back aesthetic) */
.member-modal-photo::before {
  content: '';
  position: absolute;
  inset: 0;
  box-shadow:
    inset 0 0 0 18px  rgba(27,58,143,.06),
    inset 0 0 0 46px  rgba(27,58,143,.04),
    inset 0 0 0 82px  rgba(27,58,143,.03),
    inset 0 0 0 130px rgba(27,58,143,.02);
  pointer-events: none;
}
/* Gradient fade → right edge blends into card */
.member-modal-photo::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 56px;
  background: linear-gradient(to right, transparent, var(--bg-card));
  pointer-events: none;
  z-index: 2;
}
/* Red + navy accent bar at bottom */
.member-modal-photo-bar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--navy), var(--red));
  z-index: 3;
}
/* Initials fallback watermark */
.member-modal-initials {
  font-family: var(--font-head);
  font-size: 5rem;
  font-weight: 900;
  letter-spacing: -.04em;
  color: rgba(255,255,255,.07);
  user-select: none;
  position: relative;
  z-index: 1;
}
/* Actual photo */
.member-modal-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  z-index: 1;
}

/* ── Right: Detail panel ── */
.member-modal-body {
  flex: 1;
  padding: 1.75rem 2rem 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  min-width: 0;
}
.member-modal-close {
  position: absolute;
  top: .875rem;
  right: .875rem;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.04);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  transition: background .2s, color .2s, border-color .2s, transform .15s;
  z-index: 10;
}
.member-modal-close:hover {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
  transform: rotate(90deg);
}
/* Role badge: red line + uppercase mono text */
.member-modal-badge {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-mono);
  font-size: .63rem;
  font-weight: 600;
  color: var(--red-bright);
  text-transform: uppercase;
  letter-spacing: .15em;
  margin-top: .25rem;
}
.member-modal-badge::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 2px;
  background: var(--red-bright);
  border-radius: 1px;
  flex-shrink: 0;
}
.member-modal-name {
  font-family: var(--font-head);
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-primary);
  margin: .15rem 0 0;
}
.member-modal-codename {
  font-family: var(--font-mono);
  font-size: .88rem;
  color: var(--navy-bright);
  min-height: 1.25rem;
}
.member-modal-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: .75rem 0 .375rem;
}
.member-modal-row {
  display: flex;
  align-items: flex-start;
  gap: .875rem;
}
.member-modal-icon {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: .5rem;
  background: rgba(27,58,143,.18);
  border: 1px solid rgba(27,58,143,.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy-bright);
  font-size: .9rem;
  margin-top: .1rem;
}
.member-modal-label {
  font-family: var(--font-mono);
  font-size: .6rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-muted);
  margin-bottom: .2rem;
}
.member-modal-value {
  font-size: .9rem;
  color: var(--text-primary);
  font-weight: 500;
  word-break: break-word;
}
.member-modal-value a {
  color: var(--navy-bright);
  text-decoration: none;
}
.member-modal-value a:hover { text-decoration: underline; }

/* Org node + member card — pointer cursor to hint clickability */
.org-node[data-member],
.member-card[data-member] { cursor: pointer; }
.org-node[data-member]:hover {
  border-color: rgba(201,28,28,.5);
  box-shadow: 0 0 0 2px rgba(201,28,28,.15), var(--shadow);
}
.member-card[data-member]:hover {
  border-color: rgba(201,28,28,.35);
  transform: translateY(-3px);
}
/* Keyboard focus ring */
.org-node[data-member]:focus-visible,
.member-card[data-member]:focus-visible {
  outline: 2px solid var(--red-bright);
  outline-offset: 3px;
}

/* ── Mobile: stack photo on top, show full image ── */
@media (max-width: 540px) {
  .member-modal-overlay { align-items: flex-end; padding: 0; }
  .member-modal {
    flex-direction: column;
    border-radius: 1.25rem 1.25rem 0 0;
    max-height: 92vh;
    overflow-y: auto;
  }
  .member-modal-photo {
    width: 100%;
    /* Let the image's natural ratio drive the height — no more cropping */
    height: auto;
    aspect-ratio: 4/3;
    flex-shrink: 0;
  }
  /* img: show full photo, object-fit contain so nothing is cut off */
  .member-modal-photo img {
    object-fit: contain;
    object-position: center center;
  }
  /* Fade from bottom instead of right */
  .member-modal-photo::after {
    top: auto; left: 0; right: 0; width: auto;
    height: 48px;
    background: linear-gradient(to bottom, transparent, var(--bg-card));
  }
  .member-modal-initials { font-size: 5rem; }
  .member-modal-body { padding: 1.25rem 1.25rem 1.75rem; }
}

/* ===== RESPONSIVE ===== */

/* ── Tablet (1024px) ── */
@media (max-width: 1024px) {
  .grid-4          { grid-template-columns: repeat(2, 1fr); }
  .footer-grid     { grid-template-columns: 1fr 1fr; }
  .about-grid      { gap: 2rem; }
  .contact-grid    { grid-template-columns: 1fr; }
}

/* ── Mobile (768px) ── */
@media (max-width: 768px) {
  /* Nav */
  .nav-links  { display: none; }
  .hamburger  { display: flex; }

  /* Grids → single column */
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }

  /* About */
  .about-grid      { grid-template-columns: 1fr; }
  .about-logo-wrap { display: none; }

  /* Events */
  .event-card { grid-template-columns: auto 1fr; gap: 1rem; }
  .event-card .btn { display: none; }

  /* Tables — reduce padding, stay scrollable */
  .lb-table  th, .lb-table  td { padding: .75rem .875rem; font-size: .82rem; }
  .hof-table th, .hof-table td { padding: .75rem .875rem; font-size: .82rem; }

  /* Org chart — smaller nodes */
  .org-node   { min-width: 105px; max-width: 140px; padding: .875rem .875rem; }
  .org-avatar { width: 44px; height: 44px; font-size: 1.05rem; }
  .org-node-name { font-size: .82rem; }

  /* Footer */
  .footer-grid   { grid-template-columns: 1fr; gap: 1.75rem; }
  .footer-bottom { flex-direction: column; text-align: center; }

  /* Form */
  .form-row { grid-template-columns: 1fr; }

  /* Spacing */
  section       { padding: 3.5rem 0; }
  .page-header  { padding: 3rem 0 2rem; }
  .section-header { margin-bottom: 2.5rem; }
}

/* ── Small mobile (480px) ── */
@media (max-width: 480px) {
  /* Base */
  .navbar    { padding: 0 1rem; }
  .container { padding: 0 1rem; }

  /* Hero */
  .hero-actions { flex-direction: column; align-items: center; }
  .hero-sub     { font-size: .95rem; }

  /* Events — fully stack */
  .event-card { grid-template-columns: 1fr; gap: .875rem; }
  .event-date { display: flex; align-items: center; gap: .75rem; width: fit-content; }
  .event-day  { font-size: 1.5rem; }
  .event-card .btn { display: inline-flex; } /* restore button now stacked */
  .event-meta { gap: .75rem; }

  /* HOF podium — stack + flatten scale */
  .hof-podium { flex-direction: column; align-items: center; }
  .podium-card { min-width: 0; width: 100%; max-width: 300px; }
  .podium-1   { transform: none; }
  .podium-1:hover { transform: scale(1.03) translateY(-4px); }

  /* Leaderboard — hide score bar + solves column */
  .score-bar { display: none; }
  .lb-table th:nth-child(4),
  .lb-table td:nth-child(4) { display: none; }

  /* HOF table — hide Level column on tiny screens */
  .hof-table th:nth-child(5),
  .hof-table td:nth-child(5) { display: none; }

  /* Org chart — even smaller */
  .org-node      { min-width: 88px; padding: .7rem .75rem; }
  .org-node-name { font-size: .76rem; }
  .org-node-role { font-size: .62rem; }
  .org-avatar    { width: 38px; height: 38px; font-size: .9rem; margin-bottom: .4rem; }

  /* Member sections — 2-column on small */
  .dept-section .grid-2,
  .dept-section .grid-3,
  .dept-section .grid-4 { grid-template-columns: 1fr 1fr; }

  /* Stats grid — keep 2 cols */
  .about-stats { grid-template-columns: 1fr 1fr; }

  /* Page header */
  .page-header { padding: 2.5rem 0 1.5rem; }

  /* Filter bar */
  .filter-bar { gap: .375rem; }
  .filter-btn { padding: .4rem .875rem; font-size: .78rem; }

  /* Leaderboard top-3 */
  .top3-wrap { gap: .875rem; }
}

/* ── Very small (360px) ── */
@media (max-width: 360px) {
  .nav-brand-text { display: none; }

  /* Member grid → single col */
  .dept-section .grid-2,
  .dept-section .grid-3,
  .dept-section .grid-4 { grid-template-columns: 1fr; }

  /* Buttons */
  .btn     { padding: .6rem 1.1rem; font-size: .825rem; }
  .btn-sm  { padding: .4rem .875rem; }

  /* Hero badge */
  .hero-badge { font-size: .64rem; letter-spacing: 1px; }

  /* Writeup footer — stack */
  .writeup-footer { flex-direction: column; align-items: flex-start; gap: .5rem; }
}
