:root {
  --bg: #08080a;
  --surface: rgba(14, 14, 18, 0.56);
  --surface-hover: rgba(20, 20, 26, 0.72);
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.2);
  --text: #f4f4f5;
  --muted: #8e8e98;
  --subtle: #52525b;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

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

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection {
  background: rgba(255, 255, 255, 0.9);
  color: #08080a;
}

#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  display: block;
}

.ambient-vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at 70% 50%, transparent 15%, rgba(8, 8, 10, 0.45) 75%, rgba(8, 8, 10, 0.9) 100%);
}

/* === LAYOUT === */
.page {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 64px 32px;
  display: flex;
  align-items: center;
}

.card-stack {
  width: 100%;
  max-width: 470px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* === INTRO === */
.intro {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.status-row {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.presence-link {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #b4b4be;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.presence-link:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.35);
}

.dot {
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #e4e4e7;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.45);
  animation: breathe 3.2s ease-in-out infinite;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.dot[data-status="online"] {
  background: #4ade80;
  box-shadow: 0 0 10px rgba(74, 222, 128, 0.45);
}

.dot[data-status="idle"] {
  background: #facc15;
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.4);
}

.dot[data-status="dnd"] {
  background: #f87171;
  box-shadow: 0 0 10px rgba(248, 113, 113, 0.4);
}

.dot[data-status="offline"] {
  background: #71717a;
  box-shadow: none;
}

@keyframes breathe {
  0%, 100% { opacity: 0.95; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.82); }
}

.mono-label,
.section-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.name {
  margin: 0;
  font-size: clamp(2.6rem, 5vw, 3.4rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.05;
  color: #f4f4f5;
  cursor: pointer;
  user-select: none;
  font-variant-numeric: tabular-nums;
}

.bio {
  margin: 0;
  font-size: 15px;
  line-height: 1.65;
  color: #b4b4be;
  font-weight: 400;
}

.stack-line {
  margin: -4px 0 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.6;
  color: #6c6c75;
  letter-spacing: 0.01em;
}

/* === LINKS === */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.link-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 12px;
  cursor: pointer;
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.2s ease;
}

.link-pill:hover {
  border-color: var(--border-hover);
  background: var(--surface-hover);
  transform: translateY(-1px);
}

.link-icon {
  width: 14px;
  height: 14px;
  opacity: 0.85;
  flex-shrink: 0;
}

.arrow {
  color: var(--subtle);
  font-family: var(--font-mono);
  font-size: 12px;
  transition: transform 0.2s ease, color 0.2s ease;
}

a:hover .arrow {
  color: var(--text);
  transform: translate(2px, -2px);
}

/* === PROJECT CARD === */
.projects {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.repo-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 20px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.2s ease;
}

.repo-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    280px circle at var(--mx, 50%) var(--my, 50%),
    rgba(255, 255, 255, 0.08),
    transparent 65%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.repo-card:hover {
  border-color: var(--border-hover);
  background: var(--surface-hover);
  transform: translateY(-1px);
}

.repo-card:hover::before {
  opacity: 1;
}

.repo-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.repo-right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.repo-stars {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
}

.repo-name {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.repo-desc {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--muted);
}

.repo-desc code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #d4d4d8;
}

.repo-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--subtle);
}

/* === MINIMAL BOTTOM CONTROLS === */
.art-switcher {
  position: fixed;
  right: 24px;
  bottom: 20px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--subtle);
}

.subtle-btn {
  background: none;
  border: none;
  padding: 4px 6px;
  color: var(--muted);
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  transition: color 0.2s ease;
}

.subtle-btn:hover {
  color: var(--text);
}

.sep {
  opacity: 0.4;
}

/* === COMMAND PALETTE (Ctrl+K / /) === */
.cmd-backdrop[hidden] {
  display: none;
}

.cmd-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 18vh 16px 24px;
  background: rgba(4, 4, 6, 0.68);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.cmd-dialog {
  width: 100%;
  max-width: 440px;
  border-radius: 14px;
  background: rgba(14, 14, 18, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}

.cmd-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
}

.cmd-prompt {
  color: var(--subtle);
  font-size: 13px;
}

.cmd-input {
  flex: 1;
  min-width: 0;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
}

.cmd-input::placeholder {
  color: var(--subtle);
}

.cmd-esc {
  font-size: 10px;
  color: var(--subtle);
  padding: 2px 6px;
  border-radius: 5px;
  border: 1px solid var(--border);
}

.cmd-list {
  margin: 0;
  padding: 6px;
  list-style: none;
  max-height: 380px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

.cmd-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.cmd-item.active,
.cmd-item:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
}

.cmd-item-hint {
  font-size: 11px;
  color: var(--subtle);
}

.cmd-empty {
  padding: 16px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--subtle);
}

/* === RESPONSIVE === */
@media (max-width: 820px) {
  .page {
    padding: 48px 20px 72px;
    align-items: flex-start;
  }
  .card-stack {
    max-width: 100%;
  }
}
