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

:root {
  --bg: #0e0f11;
  --row: #16181c;
  --row-hover: #1c1f25;
  --border: rgba(255,255,255,0.07);
  --accent: #7750C7;
  --accent-soft: rgba(119,80,199,0.14);
  --text: #f0f0f0;
  --muted: #6b6b6b;
  --muted-2: #444;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Rethink Sans', sans-serif;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
}

/* subtle ambient glow so a pure-black screen doesn't feel flat */
body::before {
  content: '';
  position: fixed;
  top: 50%; left: 50%;
  width: 900px; height: 900px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(119,80,199,0.10) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

.wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 460px;
}

/* ── Photo box ── */
.photo-box {
  position: relative;
  width: 150px;
  height: 150px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--row);
  margin-bottom: 1.5rem;
}
.photo {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.9s ease;
}
.photo.active { opacity: 1; }

/* ── Intro ── */
.intro { margin-bottom: 2.25rem; }

.intro h1 {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}

.subline {
  font-size: 15px;
  color: #cfcfcf;
  margin-bottom: 6px;
}
.subline .muted { color: var(--muted); }

.hint {
  font-family: 'Rethink Sans', sans-serif;
  font-size: 13px;
  color: var(--muted);
}
.cursor {
  display: inline-block;
  width: 7px; height: 13px;
  margin-left: 5px;
  background: var(--accent);
  vertical-align: -2px;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

/* ── Menu ── */
.menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.menu-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--row);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  text-decoration: none;
  color: var(--text);
  overflow: hidden;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.menu-item::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
  transform: scaleY(0);
  transition: transform 0.18s ease;
}

.menu-item:hover,
.menu-item:focus-visible {
  background: var(--row-hover);
  border-color: rgba(119,80,199,0.35);
  transform: translateX(2px);
}
.menu-item:hover::before,
.menu-item:focus-visible::before { transform: scaleY(1); }

.menu-item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.menu-item.active-key {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.key {
  font-family: 'Rethink Sans', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  background: rgba(119,80,199,0.12);
  border: 1px solid rgba(119,80,199,0.3);
  border-radius: 6px;
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.label {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
}

@media (max-width: 420px) {
  .intro h1 { font-size: 26px; }
  .menu-item { padding: 14px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
