/* KageBytes — minimal theme. Edit the colour tokens below to restyle everything. */
:root {
  --bg: #0b0b0e;
  --surface: #131318;
  --text: #e8e8ec;
  --muted: #8a8a96;
  --border: #24242c;
  --accent: #8b8bff;
  --font: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}

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

html { color-scheme: dark; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.7;
  font-size: 13px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background 0.25s ease, color 0.25s ease;
}


a { color: inherit; text-decoration: none; }

.wrap { width: 100%; max-width: 680px; margin: 0 auto; padding: 0 18px; }

/* ---------- header ---------- */
header { border-bottom: 1px solid var(--border); }

header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 12px;
  padding-bottom: 12px;
}

.brand {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand span { color: var(--accent); }

/* ---------- menu button ---------- */
header .wrap { position: relative; }
.menu { position: relative; }

#menu-btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s;
}

#menu-btn:hover, #menu-btn[aria-expanded="true"] { border-color: var(--accent); }

.bars, .bars::before, .bars::after {
  display: block;
  width: 16px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s, background 0.2s;
}

.bars { position: relative; }
.bars::before, .bars::after { content: ""; position: absolute; left: 0; }
.bars::before { top: -5px; }
.bars::after { top: 5px; }

#menu-btn[aria-expanded="true"] .bars { background: transparent; }
#menu-btn[aria-expanded="true"] .bars::before { top: 0; transform: rotate(45deg); }
#menu-btn[aria-expanded="true"] .bars::after { top: 0; transform: rotate(-45deg); }

#menu-list {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 170px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px;
  z-index: 10;
}

#menu-list[hidden] { display: none; }

#menu-list a {
  display: block;
  padding: 8px 11px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.9rem;
  transition: background 0.15s, color 0.15s;
}

#menu-list a:hover { background: var(--bg); color: var(--text); }
#menu-list a.active { color: var(--accent); }


.webring {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.webring img {
  display: block;
  width: 55px;
  height: 9px;
  image-rendering: pixelated;
}

.my-button img {
  display: block;
  width: var(--my-button-width, 90px);
  height: auto;
  border: 1px solid #8b8bff;
  transition: transform 0.2s ease;
}

/* ---------- main ---------- */
main { flex: 1; padding: 44px 0 36px; }

h1 {
  font-size: clamp(1.3rem, 3.4vw, 1.65rem);
  letter-spacing: -0.03em;
  line-height: 1.25;
  margin-bottom: 14px;
}

h2 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 600;
  margin: 32px 0 10px;
}

p { color: var(--muted); max-width: none; margin-bottom: 14px; }
p strong { color: var(--text); font-weight: 600; }

.lead { color: var(--text); font-size: 1rem; }

.list { list-style: none; max-width: none; }
.list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
}
.list li:last-child { border-bottom: none; }
.list li b { color: var(--text); font-weight: 600; }

/* ---------- member cards ---------- */
/* Mobile: 2 cards per row. Wider screens: as many 150px+ cards as fit. */
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

@media (min-width: 560px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 10px;
  min-height: 190px;            /* a little taller than wide */
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2px;
  transition: border-color 0.2s, transform 0.2s;
}

.card:hover { border-color: var(--accent); transform: translateY(-2px); }

.avatar {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card h3 { font-size: 0.85rem; line-height: 1.3; overflow-wrap: anywhere; }
.card .role { color: var(--muted); font-size: 0.75rem; margin-bottom: 6px; line-height: 1.3; }

.card .links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin-top: auto;
  padding-top: 8px;
}
.card .links a {
  font-size: 0.75rem;
  color: var(--accent);
  border-bottom: 1px solid transparent;
}
.card .links a:hover { border-bottom-color: var(--accent); }

/* ---------- contact links ---------- */
.contacts {
  list-style: none;
  margin-top: 22px;
  display: grid;
  gap: 12px;
}

.contacts a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 22px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 0.2s;
}

/* Hover effect only on devices with a real pointer, so it doesn't stick after a tap */
@media (hover: hover) {
  .contacts a:hover { border-color: var(--accent); }
}

.contacts .label { font-weight: 600; white-space: nowrap; }
.contacts .value {
  color: var(--muted);
  font-size: 0.8rem;
  text-align: right;
  min-width: 0;
  overflow-wrap: anywhere;
}

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--border); }
footer .wrap { padding-top: 14px; padding-bottom: 14px; color: var(--muted); font-size: 0.8rem; }

@media (max-width: 520px) {
  main { padding-top: 28px; }
}

/* ---------- banner ---------- */
.banner-wrapper { margin-top: 32px; }
.hero-banner {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
}

/* ---------- member search ---------- */
.card[hidden], .grid[hidden], h2[hidden] { display: none; }

.search {
  position: relative;
  max-width: 420px;
  margin: 18px 0 4px;
}

.search input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9rem;
  padding: 10px 38px 10px 12px;
  outline: none;
  transition: border-color 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

.search input::placeholder { color: var(--muted); }
.search input:focus { border-color: var(--accent); }
.search input::-webkit-search-cancel-button { display: none; }

.search button {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1;
  padding: 6px 8px;
  cursor: pointer;
}
.search button:hover { color: var(--text); }
.search button[hidden] { display: none; }

#no-results { margin-top: 24px; }
#no-results[hidden] { display: none; }

/* Badge: align with the banner and give it some breathing room */
.badge-wrap { margin-top: 24px; margin-bottom: 24px; }
