/* ============================================================
   estilos.css — base compartida del portafolio
   Yeremi S. BΛSTIAN
   Centraliza cursor, tipografía, header, botones, tarjetas y footer.
   Cada página conserva solo lo suyo (hero, grids, animaciones).
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&display=swap');

:root {
  --bg: #0a0e0a;
  --bg-2: #0f130f;
  --surface: #151a15;
  --accent: #43d17a;
  --accent-dark: #32b866;
  --accent-suave: rgba(67, 209, 122, 0.14);
  --accent-borde: rgba(67, 209, 122, 0.4);
  --text: #ffffff;
  --muted: #c2ccc2;
  --faint: #8b968b;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

/* ---------- Cursor personalizado -------------------------------------
   Solo se activa donde existe un puntero fino (mouse/trackpad).
   En pantallas táctiles se usaba "cursor: none" sin reemplazo real,
   lo que dejaba al visitante de celular sin ningún cursor visible.
   -------------------------------------------------------------------- */
@media (hover: hover) and (pointer: fine) {
  body {
    cursor: none;
  }
  a, button, input, textarea, .tbtn {
    cursor: none;
  }
  #cursor {
    display: block;
  }
}

@media (hover: none), (pointer: coarse) {
  #cursor {
    display: none !important;
  }
}

#cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 20px;
  height: 20px;
  border: 2px solid #fff;
  border-radius: 50%;
  pointer-events: none;
  z-index: 999;
  transform: translate(-50%, -50%);
  transition: transform 0.05s ease;
}

/* ---------- Header ---------- */
header {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3rem;
  padding: 1.5rem;
  font-size: 1rem;
  flex-wrap: wrap;
}

header a {
  color: var(--text);
  transition: color 0.3s ease;
  position: relative;
}

header a:hover,
header a.active {
  color: var(--accent);
}

header a.active::after,
header a:hover::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  background: var(--accent);
}

/* ---------- Botones y enlaces de acción ---------- */
.btn {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 5px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  transition: background 0.3s ease, transform 0.2s ease;
}

.btn:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
}

.btn.disabled,
.btn[aria-disabled="true"] {
  background: #333;
  color: #888;
  pointer-events: none;
}

/* ---------- Tarjetas ---------- */
.card {
  background: var(--surface);
  border-radius: 10px;
  padding: 1.25rem;
  text-align: left;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(67, 209, 122, 0.25);
}

.card h3 {
  color: var(--accent);
  margin-bottom: 0.5rem;
  font-size: 1.15rem;
}

.card p {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 1rem;
  line-height: 1.55;
}

.card .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.card .tags span {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #a7e8c2;
  background: var(--accent-suave);
  border: 1px solid var(--accent-borde);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
}

.card .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ---------- Footer ---------- */
footer {
  font-size: 0.8rem;
  color: var(--faint);
  padding: 1.5rem;
  text-align: center;
}

/* ---------- Utilidades ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 600px) {
  header {
    gap: 1.25rem;
    padding: 1.25rem 1rem;
  }
}
