/* BBCC ICT Fest — Gallery site stylesheet.
   Matches the original fest theme (dark + ember), dependency-free.
   Deliberately static: no preloader, no glow shadows, no pulsing dots,
   no animated orbs — only subtle hover lifts. */

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

:root {
  --bg: #0a0908;
  --bg-2: #100e0d;
  --card: #16130f;
  --card-2: #1d1915;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.14);
  --ember: #ff7a1a;
  --ember-2: #ff9d45;
  --ember-soft: rgba(255, 122, 26, 0.1);
  --ember-line: rgba(255, 122, 26, 0.28);
  --flame: #e2260e;
  --gold: #ffc24b;
  --text: #f5f1ea;
  --text-2: #a8a097;
  --text-3: #6b655c;
  --grad: linear-gradient(120deg, #ffc24b, #ff7a1a 45%, #e2260e);
  --radius: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --max-w: 1200px;
  --font-display: "Space Grotesk", "Inter", -apple-system, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

::selection { background: rgba(255, 122, 26, 0.35); color: #fff; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #2a251f; border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #3a342b; }

:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; border-radius: 4px; }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
@media (max-width: 768px) { .container { padding: 0 20px; } }

/* Skip link */
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--grad); color: #1a0d02; text-decoration: none;
  font-size: 14px; font-weight: 600; padding: 10px 18px; border-radius: var(--radius-sm);
  transition: top 0.2s ease;
}
.skip-link:focus { top: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 9, 8, 0.92);
  border-bottom: 1px solid var(--line);
}
.site-header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 76px;
}
.brand {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-display); font-weight: 600; font-size: 17px;
  letter-spacing: -0.02em; color: var(--text); text-decoration: none;
  white-space: nowrap;
}
.brand img { height: 36px; width: auto; }
.brand small {
  display: block; font-family: var(--font-mono); font-weight: 400;
  font-size: 10.5px; color: var(--text-3); letter-spacing: 0.12em; text-transform: uppercase;
}

.site-nav ul { display: flex; align-items: center; gap: 6px; list-style: none; }
.site-nav a {
  display: inline-block; padding: 8px 12px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; color: var(--text-2); text-decoration: none;
  transition: color 0.25s ease, background 0.25s ease;
}
.site-nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.site-nav a[aria-current="page"] { color: var(--ember); background: var(--ember-soft); }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line-2);
  border-radius: 10px; padding: 9px; cursor: pointer; color: var(--text);
  transition: border-color 0.25s ease, background 0.25s ease;
}
.nav-toggle svg { width: 20px; height: 20px; display: block; }
.nav-toggle:hover { border-color: var(--ember-line); background: var(--ember-soft); }

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(14, 12, 10, 0.98); border-bottom: 1px solid var(--line);
    display: none;
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; padding: 12px 18px 18px; gap: 2px; }
  .site-nav a { padding: 12px 14px; font-size: 15px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 32px; border-radius: 100px;
  font-family: var(--font-body); font-size: 14px; font-weight: 600;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: filter 0.25s ease, border-color 0.25s ease, color 0.25s ease, background 0.25s ease;
}
.btn svg { width: 15px; height: 15px; }
.btn-primary { background: var(--grad); color: #1a0d02; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-outline { background: rgba(255, 255, 255, 0.02); color: var(--text); border-color: var(--line-2); }
.btn-outline:hover { border-color: var(--ember-line); color: var(--ember); background: var(--ember-soft); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; text-align: center;
  padding: clamp(72px, 9vw, 120px) 0 clamp(48px, 6vw, 72px);
  background:
    radial-gradient(ellipse 90% 60% at 50% -10%, rgba(255, 122, 26, 0.09) 0%, transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 55%, var(--bg) 100%);
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 75% 65% at 50% 45%, black 25%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 45%, black 25%, transparent 70%);
}
.hero-narrow { position: relative; z-index: 1; max-width: 780px; margin: 0 auto; }
.eyebrow {
  display: inline-block; padding: 8px 20px; border-radius: 100px;
  background: rgba(255, 255, 255, 0.035); border: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: 1px;
  color: var(--text-2); margin-bottom: 28px;
}
.eyebrow strong { color: var(--ember); font-weight: 500; }
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(40px, 6.4vw, 76px);
  font-weight: 700; letter-spacing: -0.035em; line-height: 1.04;
  margin-bottom: 20px;
}
.hero h1 .accent {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.lead { font-size: clamp(15.5px, 1.8vw, 18px); color: var(--text-2); line-height: 1.75; }
.hero .lead { max-width: 660px; margin: 0 auto; }

.hero-meta {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; flex-wrap: wrap; margin-top: 28px;
}
.hero-meta span {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13.5px; font-weight: 500; color: var(--text-2);
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.02);
  border-radius: 100px; padding: 10px 18px;
  transition: border-color 0.3s ease, color 0.3s ease;
}
.hero-meta span:hover { border-color: var(--ember-line); color: var(--text); }
.hero-meta svg { width: 17px; height: 17px; color: var(--ember); flex-shrink: 0; }

.hero-actions {
  display: flex; align-items: center; justify-content: center;
  gap: 16px; flex-wrap: wrap; margin-top: 34px;
}

/* ---------- Stats ---------- */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
}
.stat { padding: 30px 16px; text-align: center; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat strong {
  display: block; font-family: var(--font-display);
  font-size: clamp(30px, 3.4vw, 44px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.stat span { font-size: 13px; color: var(--text-2); font-weight: 500; }
@media (max-width: 640px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { border-left: none; }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--line); }
}

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 8vw, 110px) 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto clamp(32px, 4vw, 48px); }
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(30px, 4.2vw, 48px);
  font-weight: 700; letter-spacing: -0.03em; line-height: 1.08; margin-bottom: 12px;
}
.section-head p { color: var(--text-2); font-size: 16px; line-height: 1.75; }
.kicker {
  display: inline-block; padding: 7px 16px; border-radius: 100px;
  background: var(--ember-soft); border: 1px solid var(--ember-line);
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  letter-spacing: 1.5px; text-transform: uppercase; color: var(--ember);
  margin-bottom: 20px;
}

/* ---------- Featured banner: the big BBCC family photo ---------- */
.featured-slot { margin-bottom: 36px; }
.featured-slot:empty { display: none; }
.featured {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; cursor: zoom-in;
  transition: border-color 0.35s ease, transform 0.35s ease;
}
.featured:hover { border-color: var(--ember-line); transform: translateY(-3px); }
.featured figure { background: #221c15; }
.featured img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; }
.featured-body {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 22px; border-top: 1px solid var(--line);
}
.featured-body .g-tag { margin-bottom: 0; flex-shrink: 0; }
.featured-body p { font-size: 16px; font-weight: 600; line-height: 1.5; }
.featured-empty { background: none; border: none; cursor: default; }
.featured-empty:hover { transform: none; }
.featured-placeholder {
  text-align: center; padding: clamp(40px, 6vw, 64px) 24px;
  border: 1px dashed var(--line-2); border-radius: var(--radius); background: var(--card);
}
.featured-placeholder-title {
  font-family: var(--font-display); font-size: 22px; font-weight: 700;
  letter-spacing: -0.02em; margin: 14px 0 6px;
}
.featured-placeholder-sub { color: var(--text-2); font-size: 14.5px; }

/* ---------- Filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 32px; }
.filter-btn {
  padding: 9px 18px; border-radius: 100px; cursor: pointer;
  background: rgba(255, 255, 255, 0.02); border: 1px solid var(--line-2);
  font-family: var(--font-body); font-size: 13.5px; font-weight: 500; color: var(--text-2);
  transition: border-color 0.25s ease, color 0.25s ease, background 0.25s ease;
}
.filter-btn:hover { border-color: var(--ember-line); color: var(--ember); }
.filter-btn[aria-pressed="true"] { background: var(--grad); border-color: transparent; color: #1a0d02; font-weight: 600; }
.filter-btn .count { opacity: 0.65; font-size: 12px; margin-left: 4px; }

/* ---------- Gallery grid ---------- */
.gallery-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.g-card {
  position: relative; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; cursor: zoom-in;
  content-visibility: auto; contain-intrinsic-size: auto 340px;
  transition: border-color 0.35s ease, transform 0.35s ease, background 0.35s ease;
}
.g-card:hover { border-color: var(--ember-line); transform: translateY(-5px); background: var(--card-2); }
.g-card figure { aspect-ratio: 4 / 3; overflow: hidden; background: #221c15; }
.g-card img { width: 100%; height: 100%; object-fit: cover; }
.g-card figcaption { padding: 18px 20px 20px; border-top: 1px solid var(--line); }
.g-card figcaption p { font-size: 14.5px; font-weight: 600; line-height: 1.5; }
.g-tag {
  display: inline-block; margin-bottom: 10px; padding: 5px 13px; border-radius: 100px;
  background: var(--ember-soft); border: 1px solid var(--ember-line); color: var(--ember);
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 500;
  letter-spacing: 0.8px; text-transform: uppercase;
}
.g-card-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.g-card-row p { flex: 1; min-width: 0; }
.g-download {
  display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
  padding: 7px 12px; border-radius: 100px;
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line-2);
  color: var(--text-2); font-size: 11.5px; font-weight: 600; text-decoration: none;
  transition: border-color 0.25s ease, color 0.25s ease, background 0.25s ease;
}
.g-download svg { width: 13px; height: 13px; }
.g-download:hover { border-color: var(--ember-line); color: var(--ember); background: var(--ember-soft); }

.empty-state {
  border: 1px dashed var(--line-2); border-radius: var(--radius);
  background: var(--card); text-align: center;
  padding: clamp(44px, 6vw, 68px) clamp(24px, 4vw, 48px);
}
.empty-state h3 {
  font-family: var(--font-display); font-size: 22px; font-weight: 700;
  letter-spacing: -0.02em; margin-bottom: 12px;
}
.empty-state p { color: var(--text-2); font-size: 15px; max-width: 560px; margin: 0 auto; line-height: 1.8; }

.load-more-wrap { text-align: center; margin-top: 34px; min-height: 24px; }
.load-more-wrap[hidden] { display: none; }
.infinite-loader {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text-3); font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 1px; text-transform: uppercase;
}
.infinite-spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--line-2); border-top-color: var(--ember);
  animation: infinite-spin 0.8s linear infinite;
}
@keyframes infinite-spin { to { transform: rotate(360deg); } }

/* ---------- Gallery responsive ---------- */
@media (max-width: 640px) {
  .featured img { aspect-ratio: 16 / 10; }
  .featured-body { flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px 16px; }
  .featured-body p { font-size: 14px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .g-card figcaption { padding: 10px 12px 12px; }
  .g-card figcaption p { font-size: 12.5px; }
  .g-card .g-tag { font-size: 9.5px; padding: 4px 10px; margin-bottom: 6px; }
  .g-card-row { gap: 8px; }
  .g-download { padding: 6px 10px; font-size: 10.5px; }
}

/* ---------- Lightbox ---------- */
.lightbox {
  border: 1px solid var(--line-2); border-radius: 20px; padding: 0;
  max-width: min(960px, 94vw); background: var(--card-2); color: var(--text);
}
.lightbox::backdrop { background: rgba(6, 5, 4, 0.85); }
.lightbox img { width: 100%; max-height: 72vh; object-fit: contain; background: #000; border-radius: 20px 20px 0 0; }
.lightbox-body { padding: 20px 24px 24px; border-top: 1px solid var(--line); }
.lightbox-body p { font-size: 15px; color: var(--text); font-weight: 500; }
.lightbox-download {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 14px;
  padding: 10px 18px; border-radius: 100px;
  background: var(--grad); color: #1a0d02;
  font-size: 13px; font-weight: 600; text-decoration: none;
  transition: filter 0.25s ease;
}
.lightbox-download svg { width: 14px; height: 14px; }
.lightbox-download:hover { filter: brightness(1.08); }
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute; width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line-2);
  color: var(--text-2); cursor: pointer; font-size: 17px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { background: var(--ember-soft); border-color: var(--ember-line); color: var(--ember); }
.lightbox-close { top: 12px; right: 12px; }
.lightbox-prev { top: 38%; left: 12px; }
.lightbox-next { top: 38%; right: 12px; }
.lightbox-count { display: block; margin-top: 10px; font-family: var(--font-mono); font-size: 12px; color: var(--text-3); }

/* ---------- Committee ---------- */
.group-title {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--font-display); font-size: 20px; font-weight: 600; letter-spacing: -0.01em;
  margin: clamp(44px, 5vw, 60px) 0 24px;
}
.group-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.group-title .n {
  font-family: var(--font-mono); font-size: 11px; font-weight: 500; color: var(--ember);
  background: var(--ember-soft); border: 1px solid var(--ember-line);
  border-radius: 100px; padding: 4px 13px;
}
.group-title:first-of-type { margin-top: 0; }

.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 16px; }
.member-card {
  position: relative; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-md); overflow: hidden;
  padding: 28px 18px 26px; text-align: center;
  transition: border-color 0.35s ease, transform 0.35s ease, background 0.35s ease;
}
.member-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--grad); opacity: 0; transition: opacity 0.35s ease;
}
.member-card:hover { border-color: var(--ember-line); transform: translateY(-4px); background: var(--card-2); }
.member-card:hover::before { opacity: 1; }
.avatar {
  position: relative; width: 88px; height: 88px; border-radius: 50%;
  margin: 0 auto 16px; background: var(--card-2); color: var(--ember);
  border: 1px solid var(--line-2);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 24px;
  overflow: hidden;
  transition: border-color 0.35s ease;
}
.member-card:hover .avatar { border-color: var(--ember-line); }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.member-card h3 { font-family: var(--font-display); font-size: 16px; font-weight: 600; line-height: 1.4; margin-bottom: 5px; }
.member-card .role { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-2); font-weight: 400; line-height: 1.6; }
.member-card:hover .role { color: var(--ember); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); padding: 60px 0 0; }
.footer-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 36px;
  padding-bottom: 44px;
}
.footer-brand p { font-size: 14px; color: var(--text-2); max-width: 360px; margin-top: 16px; line-height: 1.75; }
.footer-col h2 { font-family: var(--font-mono); font-size: 11.5px; font-weight: 500; text-transform: uppercase; letter-spacing: 2px; color: var(--text-3); margin-bottom: 20px; }
.footer-col a { display: block; font-size: 14px; color: var(--text-2); text-decoration: none; margin-bottom: 12px; transition: color 0.25s ease; }
.footer-col a:hover { color: var(--ember); }
.footer-bottom {
  border-top: 1px solid var(--line); padding: 24px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.footer-bottom p { font-size: 13px; color: var(--text-3); }
.footer-bottom a { color: var(--ember); text-decoration: none; font-weight: 500; }
.footer-bottom a:hover { color: var(--ember-2); }
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
