/* Brazos Tech Commons - shared stylesheet */
:root {
  --bg: #f7f8fb;
  --surface: #ffffff;
  --text: #1c2333;
  --muted: #5a6478;
  --brand: #500000;
  --brand-2: #8c1d1d;
  --accent: #2563eb;
  --border: #e2e6ef;
  --ok: #157f3b;
  --err: #b42318;
  --radius: 12px;
  --shadow: 0 6px 24px rgba(20, 30, 60, 0.08);
  --max: 1100px;
}

:root[data-theme="dark"] {
  --bg: #0f1420;
  --surface: #182033;
  --text: #e8ecf5;
  --muted: #a3adc2;
  --brand: #e08a8a;
  --brand-2: #f0a8a8;
  --accent: #7aa7ff;
  --border: #2a3550;
  --ok: #4ade80;
  --err: #f87171;
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

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

a { color: var(--accent); }

.container { width: min(var(--max), 100% - 32px); margin-inline: auto; }

.skip-link {
  position: absolute; left: -999px; top: 8px;
  background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 100;
}
.skip-link:focus { left: 8px; }

/* Header / navigation */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 700; }
.brand img { width: 36px; height: 36px; }
.nav-list { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-list a {
  display: block; padding: 8px 12px; border-radius: 8px;
  text-decoration: none; color: var(--text); font-weight: 500;
}
.nav-list a:hover { background: var(--bg); }
.nav-list a[aria-current="page"] { background: var(--brand); color: #fff; }
:root[data-theme="dark"] .nav-list a[aria-current="page"] { color: #0f1420; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  border-radius: 8px; padding: 6px 10px; cursor: pointer; font: inherit;
}
.nav-toggle { display: none; }

@media (max-width: 820px) {
  .nav-toggle { display: inline-block; }
  .site-nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--border); display: none; }
  .site-nav.open { display: block; }
  .nav-list { flex-direction: column; padding: 8px 16px 16px; }
}

/* Hero */
.hero { padding: 64px 0 48px; background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%); color: #fff; }
:root[data-theme="dark"] .hero { color: #0f1420; }
.hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center; }
.hero h1 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.15; margin: 0 0 16px; }
.hero p { font-size: 1.125rem; margin: 0 0 24px; opacity: 0.95; }
.page-hero { padding: 40px 0 28px; }
.page-hero h1 { margin: 0 0 8px; font-size: clamp(1.75rem, 3vw, 2.4rem); }
.page-hero p { margin: 0; font-size: 1.05rem; }

@media (max-width: 820px) { .hero-grid { grid-template-columns: 1fr; } }

.btn {
  display: inline-block; padding: 10px 18px; border-radius: 10px; font-weight: 600;
  text-decoration: none; border: 2px solid transparent; cursor: pointer; font-size: 1rem;
}
.btn-light { background: #fff; color: #500000; }
.btn-outline { border-color: currentColor; color: inherit; margin-left: 8px; }
.btn-primary { background: var(--brand); color: #fff; }
:root[data-theme="dark"] .btn-primary { color: #0f1420; }

/* Sections and cards */
main { display: block; }
section { padding: 40px 0; }
h2 { font-size: 1.6rem; margin: 0 0 16px; }
.lead { color: var(--muted); max-width: 70ch; }

.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
}
.card h3 { margin: 12px 0 8px; }
.card p { margin: 0; color: var(--muted); }
.card img.icon { width: 56px; height: 56px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; text-align: center; }
.stat strong { display: block; font-size: 2rem; color: var(--brand); }

.team-card { text-align: center; }
.team-card img { width: 96px; height: 96px; margin: 0 auto; border-radius: 50%; }

.timeline { list-style: none; padding: 0; margin: 0; border-left: 3px solid var(--brand); }
.timeline li { padding: 0 0 18px 18px; position: relative; }
.timeline li::before {
  content: ""; position: absolute; left: -9px; top: 6px; width: 14px; height: 14px;
  border-radius: 50%; background: var(--brand);
}

/* Events filter */
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 20px; }
.filter-bar input[type="search"] {
  flex: 1 1 220px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit;
}
.chip {
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  padding: 6px 14px; border-radius: 999px; cursor: pointer; font: inherit;
}
.chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
:root[data-theme="dark"] .chip[aria-pressed="true"] { color: #0f1420; }
.event-card .meta { font-size: 0.9rem; color: var(--muted); margin-bottom: 6px; }
.tag { display: inline-block; font-size: 0.75rem; padding: 2px 10px; border-radius: 999px; background: var(--bg); border: 1px solid var(--border); }
.empty-state { color: var(--muted); font-style: italic; }

/* FAQ accordion */
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); margin-bottom: 10px; }
.faq-q {
  width: 100%; text-align: left; background: none; border: 0; color: var(--text);
  padding: 16px 18px; font: inherit; font-weight: 600; cursor: pointer;
  display: flex; justify-content: space-between; gap: 12px;
}
.faq-q::after { content: "+"; font-size: 1.25rem; line-height: 1; }
.faq-q[aria-expanded="true"]::after { content: "\2212"; }
.faq-a { padding: 0 18px 16px; color: var(--muted); }
.faq-a[hidden] { display: none; }

/* Forms */
.form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-row input, .form-row select, .form-row textarea {
  padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font: inherit;
}
.form-row .error { color: var(--err); font-size: 0.9rem; min-height: 1.2em; }
.form-row input[aria-invalid="true"], .form-row textarea[aria-invalid="true"] { border-color: var(--err); }
.form-status { margin-top: 12px; font-weight: 600; }
.form-status.ok { color: var(--ok); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); margin-top: 40px; padding: 24px 0; color: var(--muted); font-size: 0.95rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 12px; list-style: none; padding: 0; margin: 0; }

/* Error page */
.error-page { text-align: center; padding: 64px 0; }
.error-page img { width: min(320px, 80%); margin: 0 auto 24px; }
.error-page h1 { font-size: 2.2rem; margin: 0 0 8px; }
