:root {
  --fondo: #eef1f4;
  --tinta: #14213d;
  --suave: #55607a;
  --acento: #2447f5;
  --linea: #c9d0dc;
  --tarjeta: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fondo: #101624;
    --tinta: #e8ecf5;
    --suave: #9aa6c0;
    --acento: #7d96ff;
    --linea: #2a344d;
    --tarjeta: #18203a;
  }
}
* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--fondo);
  color: var(--tinta);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.6;
}
main, .top, footer { max-width: 860px; margin: 0 auto; padding: 0 20px; }
.top { display: flex; justify-content: space-between; align-items: center; padding-top: 20px; padding-bottom: 20px; }
.logo { font-family: Georgia, serif; font-size: 1.4rem; font-weight: 700; color: var(--tinta); text-decoration: none; }
nav a { color: var(--suave); text-decoration: none; margin-left: 20px; }
nav a:hover { color: var(--acento); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--acento); outline-offset: 3px; }

.hero { padding: 80px 0 60px; }
h1 { font-family: Georgia, serif; font-size: clamp(2rem, 6vw, 3.6rem); line-height: 1.1; max-width: 16ch; }
.hero p { margin: 20px 0 28px; color: var(--suave); max-width: 52ch; }
h2 { font-family: Georgia, serif; font-size: 1.8rem; margin-bottom: 16px; }
section { padding: 40px 0; border-top: 1px solid var(--linea); }
.hero { border-top: none; }

.btn {
  display: inline-block; background: var(--acento); color: #fff;
  padding: 10px 20px; border-radius: 6px; text-decoration: none; font-weight: 600;
}
.btn:hover { filter: brightness(1.1); }

.filtros { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.filtros button {
  background: transparent; color: var(--tinta); border: 1px solid var(--linea);
  padding: 6px 14px; border-radius: 999px; cursor: pointer; font: inherit;
}
.filtros button[aria-pressed="true"] { background: var(--tinta); color: var(--fondo); border-color: var(--tinta); }

.lista { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.proyecto { background: var(--tarjeta); border: 1px solid var(--linea); border-radius: 8px; padding: 18px; }
.proyecto h3 { font-size: 1.1rem; margin-bottom: 6px; }
.proyecto p { color: var(--suave); font-size: .95rem; margin-bottom: 10px; }
.tags { font-size: .85rem; color: var(--suave); margin-bottom: 12px; }
.proyecto a { color: var(--acento); font-weight: 600; text-decoration: none; }
.proyecto a:hover { text-decoration: underline; }

footer { padding-top: 30px; padding-bottom: 40px; color: var(--suave); font-size: .9rem; }
