/* ---------- Base ---------- */
:root {
  --bg: #0b0b0f;
  --panel: #121219;
  --muted: #a3a3b2;
  --text: #e8e8ef;
  --ink: #ffffff;
  --accent: #6ee7ff;
}

html[data-theme="light"] {
  --bg: #f6f7fb;
  --panel: #ffffff;
  --muted: #52525b;
  --text: #0f1222;
  --ink: #000000;
  --accent: #2563eb;
}

html, body {
  height: 100%;
}

body.site-body {
  background: radial-gradient(1000px 600px at 80% -10%, #1a1b24 0%, transparent 60%),
              radial-gradient(1000px 600px at -20% 10%, #151620 0%, transparent 60%),
              var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, Segoe UI, Helvetica, Arial, sans-serif;
  transition: background .3s ease, color .3s ease;
}

html[data-theme="light"] body.site-body {
  background: linear-gradient(180deg, #f9fbff, #eef1f8);
}

/* ---------- Layout ---------- */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.bgfx {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.4;
}

/* ---------- Header ---------- */
.site-header {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .site-header {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand__logo {
  height: 4rem;
  width: 4rem;
  border-radius: 1rem;
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(10px);
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  font-weight: bold;
  box-shadow: 0 0 0 1px rgba(255,255,255,.06), 0 10px 30px rgba(0,0,0,.5);
}

.brand__title {
  font-size: 1.6rem;
  font-weight: 600;
}

.brand__subtitle {
  font-size: .9rem;
  color: var(--muted);
}

.brand__tagline {
  font-size: .95rem;
  color: var(--muted);
}

.accent { color: var(--accent); }
.mono { font-family: "JetBrains Mono", monospace; }

/* ---------- Navigation ---------- */
.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem;
}

.navlink {
  padding: .55rem .9rem;
  border-radius: .7rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
}

.navlink.active {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
}

html[data-theme="light"] .navlink.active {
  background: rgba(0,0,0,.05);
  border-color: rgba(0,0,0,.08);
}

.nav-sep {
  width: 1px;
  height: 1.5rem;
  background: rgba(255,255,255,0.15);
}

.btn {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .55rem .9rem;
  border-radius: .7rem;
  border: 1px solid rgba(255,255,255,.06);
  background: rgba(255,255,255,.03);
  cursor: pointer;
}

.btn:hover {
  background: rgba(255,255,255,.06);
}

html[data-theme="light"] .btn {
  border-color: rgba(0,0,0,.06);
  background: rgba(0,0,0,.02);
}
html[data-theme="light"] .btn:hover {
  background: rgba(0,0,0,.05);
}

/* ---------- View ---------- */
.view {
  min-height: 50vh;
  display: block;
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 3rem;
  padding: 1rem 0;
  text-align: center;
  font-size: .85rem;
  color: var(--muted);
}

/* ---------- Utilities ---------- */
.glass {
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.06);
}

.ring-soft {
  box-shadow: 0 0 0 1px rgba(0,0,0,.06), 0 10px 30px rgba(0,0,0,.08);
}

.card-hover {
  transition: transform .2s ease, background .2s ease;
}
.card-hover:hover {
  transform: translateY(-2px);
}

/* Pills, Chips */
.pill {
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04);
  border-radius: .8rem;
  padding: .75rem 1rem;
}
html[data-theme="light"] .pill {
  border-color: rgba(0,0,0,.08);
  background: rgba(0,0,0,.03);
}

.chip {
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.05);
  border-radius: 999px;
  padding: .35rem .7rem;
  font-size: .75rem;
}
html[data-theme="light"] .chip {
  border-color: rgba(0,0,0,.10);
  background: rgba(0,0,0,.04);
}

/* --- Theme-aware colors (override UA defaults) --- */
a, a:link, a:visited, a:hover, a:active { 
  color: var(--text) !important;
  text-decoration: none;
}

/* Botones/enlaces creados por JS */
.btn, .btn * {
  color: var(--text) !important;
}

/* Texto tenue (ej: flecha → que armás en el JS) */
.text-muted {
  color: var(--muted) !important;
}

/* Refactor */
.row { 
  display: flex; 
  align-items: center; 
  flex-wrap: wrap; 
}
.gap { gap: .5rem; }

/* El contenedor de filtros en /dev */
#filters {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

/* Los botones/enlaces no deben forzar bloque */
.btn { 
  display: inline-flex;            /* <— antes tenías flex (bloque) */
  align-items: center;
  gap: .6rem;
}

/* Chips (por si algún navegador los muestra block) */
.chip { 
  display: inline-flex;
  align-items: center;
}

.hero {
  display: flex;
  flex-direction: column; 
  gap: .4rem;           
}

.grid-cards {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

/* ---------- Animations ---------- */
.fade-enter { opacity: 0; transform: translateY(6px); }
.fade-in { animation: fade .35s ease forwards; }

@keyframes fade {
  to { opacity: 1; transform: none; }
}
