:root {
  --bg: #111;
  --surface: #1a1a1d;
  --border: #2a2a30;
  --text: #eee;
  --muted: #9a9aa5;
  --accent: #ff7aa8;
  --max-width: 1100px;
  --font: system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
}

main { flex: 1; padding: 3rem 1rem; text-align: center; }
a { color: inherit; }

/* Logo */
.logo {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
}
.logo span { color: var(--accent); margin-left: 0.3em; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(17, 17, 17, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.9rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-nav { display: flex; gap: 0.25rem; }
.site-nav a {
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}
.site-nav a:hover { color: var(--text); background: var(--surface); }
.site-nav a[aria-current="page"] { color: var(--accent); background: var(--surface); }

.nav-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.nav-toggle span {
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 2rem 1rem 1.25rem;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
}
.footer-brand p { margin: 0.4rem 0 0; color: var(--muted); font-size: 0.9rem; }
.footer-links { display: flex; gap: 1.25rem; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--accent); }
.footer-copy {
  max-width: var(--max-width);
  margin: 1.5rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.8rem;
}

/* Text pages */
.prose { max-width: 42rem; margin: 0 auto; text-align: left; }
.prose h1 { margin: 0 0 2rem; text-align: center; }
.prose section + section { margin-top: 2rem; }
.prose h2 { margin: 0 0 0.5rem; color: var(--accent); font-size: 1.25rem; }
.prose p { margin: 0; color: var(--muted); line-height: 1.7; }

/* VTuber grid */
.vtuber-grid {
  max-width: var(--max-width);
  margin: 2rem auto 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.vtuber-card {
  position: relative;
  display: block;
  aspect-ratio: 3 / 1;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
}
.vtuber-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform 0.3s;
}
.vtuber-card:hover img, .vtuber-card:focus-visible img { transform: scale(1.04); }
.vtuber-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.vtuber-card .name {
  position: absolute;
  inset: auto 0 0 0;
  padding: 2rem 1rem 0.75rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  color: #fff;
  font-size: 1.25rem;
  font-weight: 600;
  text-align: left;
}

/* Mobile */
@media (max-width: 640px) {
  .vtuber-card { aspect-ratio: 16 / 9; }
  .vtuber-card .name { padding: 1.25rem 0.75rem 0.5rem; font-size: 1rem; }
  .nav-toggle { display: flex; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    padding: 0.5rem 1rem 1rem;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
  }
  .site-nav.open { display: flex; }
  .footer-inner { flex-direction: column; }
}

/* Moeko grid */
.moeko-grid {
  max-width: var(--max-width);
  margin: 2rem auto 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
}
.moeko-card {
  position: relative;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
}
.moeko-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}
.moeko-card:hover img, .moeko-card:focus-visible img { transform: scale(1.05); }
.moeko-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.moeko-card .name {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1.25rem 0.6rem 0.5rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: left;
}
.moeko-hero { width: 100%; max-width: 20rem; border-radius: 12px; display: block; margin: 0 auto 1.5rem; }
.vtuber-hero { display: block; width: 100%; max-width: 24rem; height: auto; border-radius: 12px; margin: 0 auto 1.5rem; }

/* Social links */
.social-links { list-style: none; margin: 0 0 2rem; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; }
.social-links a {
  display: block;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.9rem;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}
.social-links a:hover, .social-links a:focus-visible { border-color: var(--accent); color: var(--accent); }
