/* Bits to Bytes - Retro accessible theme */
:root {
  --bg: #0b0b0b;
  --surface: #121212;
  --text: #e6ffe6; /* light green */
  --muted: #a8e6a8;
  --accent: #00ff66;
  --link: #5cffb3;
  --focus: #ffdd33;
  --border: #1f4d1f;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f8fff8;
    --surface: #ffffff;
    --text: #0a250a;
    --muted: #245b24;
    --accent: #0da65c;
    --link: #0f7a43;
    --focus: #b37f00;
    --border: #b4d8b4;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica Neue, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  /* Sticky footer layout */
  min-height: 100vh;
  min-height: 100dvh; /* use dynamic viewport on modern browsers */
  display: flex;
  flex-direction: column;
}
.wrap { max-width: 72rem; margin: 0 auto; padding: 1rem; }

/* Retro monospace headings */
h1, h2, h3 { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; margin-top: 2rem; }
h3 { font-size: 1.25rem; margin-top: 1.5rem; }

p, li { max-width: 65ch; }

/* Links */
a { color: var(--link); }
a:hover, a:focus-visible { color: var(--accent); }

/* Focus styles */
:focus-visible { outline: 3px dotted var(--focus); outline-offset: 2px; }

/* Header and nav */
.site-header { background: var(--surface); border-bottom: 4px solid var(--border); }
.brand { display: inline-flex; align-items: center; gap: .5rem; color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.125rem; }
.brand-mark { filter: drop-shadow(0 0 0.5rem rgba(0,0,0,.3)); }
.brand-text { letter-spacing: 0.03em; }
.site-nav ul { display: flex; gap: .75rem; list-style: none; padding: 0; margin: 0; }
.site-nav a { display: inline-block; padding: .5rem .75rem; border: 1px solid var(--border); background: transparent; text-decoration: none; color: var(--text); }
.site-nav a.active { background: var(--border); box-shadow: inset 0 0 0 2px var(--surface); }
.site-nav a:hover { background: rgba(0,0,0,.1); }

/* Skip link */
.skip-link { position: absolute; left: -9999px; top: auto; }
.skip-link:focus { left: 1rem; top: 1rem; background: var(--focus); color: #000; padding: .5rem .75rem; z-index: 1000; text-decoration: none; }

/* Main */
.site-main { padding: 1rem 0 3rem; flex: 1 0 auto; }
.hero { background: repeating-linear-gradient(45deg, var(--surface), var(--surface) 10px, transparent 10px, transparent 20px); border: 4px solid var(--border); padding: 1rem; box-shadow: inset 0 0 0 2px var(--surface); }
.hero h1 { margin: 0 0 .5rem; font-size: 2.25rem; }
.hero p { margin: 0.25rem 0; color: var(--muted); }
.cta-row { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: .75rem; }
.button { border: 2px solid var(--accent); color: var(--text); background: transparent; padding: .5rem 1rem; text-decoration: none; display: inline-block; font-weight: 700; box-shadow: 4px 4px 0 0 var(--accent); }
.button:hover, .button:focus-visible { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 0 var(--accent); }
.button.secondary { border-color: var(--link); box-shadow: 4px 4px 0 0 var(--link); }

.card { border: 2px solid var(--border); padding: 1rem; background: var(--surface); box-shadow: inset 0 0 0 2px rgba(0,0,0,.2); }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

/* Figures */
figure { margin: 0; }
figcaption { color: var(--muted); font-size: .9rem; margin-top: .5rem; }
img, svg { max-width: 100%; height: auto; }

/* Footer */
.site-footer { border-top: 4px solid var(--border); background: var(--surface); color: var(--muted); }
.small { font-size: .9rem; }
.socials { list-style: none; padding: 0; margin: .5rem 0 0; display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; }
.socials a { display: inline-flex; align-items: center; gap: .35rem; text-decoration: none; color: var(--link); border: 1px dashed var(--border); padding: .25rem .5rem; }
.socials a:hover, .socials a:focus-visible { color: var(--accent); border-style: solid; }

/* Tables/list for events */
.events { margin-top: 1rem; }
.events li { padding: .5rem 0; border-bottom: 1px dashed var(--border); }

/* Utilities */
.visually-hidden { position: absolute !important; height: 1px; width: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }
.center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-1-5 { margin-top: 1.5rem; }

/* Components */
.qr-image { max-width: 320px; width: 100%; height: auto; border: 4px solid #fff; background: #fff; padding: 0; }


/* Responsive header/nav */
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.nav-toggle { display: none; align-items: center; gap: .5rem; border: 1px solid var(--border); background: transparent; color: var(--text); padding: .5rem .75rem; font: inherit; }
.nav-toggle .bars { display: inline-flex; flex-direction: column; gap: 3px; }
.nav-toggle .bars > span { width: 20px; height: 2px; background: var(--text); display: block; }

@media (max-width: 50rem) {
  .nav-toggle { display: inline-flex; }
  .site-nav { width: 100%; }
  .site-nav ul { flex-direction: column; }
  .site-nav a { width: 100%; padding: .75rem 1rem; }
  /* Hide nav by default on small screens only when JS is available and menu is collapsed */
  .js .nav-toggle[aria-expanded="false"] + .site-nav { display: none; }
  .js .nav-toggle[aria-expanded="true"] + .site-nav { display: block; }
}

/* Minor small-viewport typography tweak */
@media (max-width: 30rem) {
  .hero h1 { font-size: 1.75rem; }
}
