:root {
  --fondo: #fbfaf7;
  --tinta: #1b1a18;
  --suave: #6f6b64;
  --linea: #d9d4ca;
}

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

html, body { height: 100%; }

body {
  background: var(--fondo);
  color: var(--tinta);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- Esquina artística ---------- */
.esquina {
  position: fixed;
  top: 0;
  right: 0;
  width: min(52vw, 640px);
  height: min(58vh, 560px);
  pointer-events: none;
  z-index: 0;
}

#pollock {
  width: 100%;
  height: 100%;
  display: block;
  -webkit-mask-image: radial-gradient(ellipse 100% 100% at 100% 0%, #000 38%, rgba(0,0,0,.55) 58%, transparent 80%);
          mask-image: radial-gradient(ellipse 100% 100% at 100% 0%, #000 38%, rgba(0,0,0,.55) 58%, transparent 80%);
}

.trazos {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.trazos path {
  fill: none;
  stroke: var(--tinta);
  stroke-width: 1.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  opacity: .42;
}

.trazos .fino { opacity: .22; }

/* ---------- Contenido ---------- */
main {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 18vh 24px 12vh;
}

h1 {
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(3.4rem, 11vw, 7.5rem);
  letter-spacing: -0.02em;
  line-height: .95;
}

.lema {
  margin-top: 1.4rem;
  font-size: clamp(1rem, 2.4vw, 1.2rem);
  color: var(--suave);
  max-width: 34ch;
  line-height: 1.6;
}

.separador {
  width: 48px;
  height: 1px;
  background: var(--linea);
  margin: 2.6rem auto;
}

nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: .6rem 2.2rem; justify-content: center; }

nav a {
  color: var(--tinta);
  text-decoration: none;
  font-size: .95rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease;
}

nav a:hover, nav a:focus-visible { border-bottom-color: var(--tinta); }

/* ---------- Botones de la portada ---------- */
.botones { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 2.8rem; }

.boton {
  display: inline-flex; align-items: center; gap: .65rem;
  padding: .7rem 1.6rem .75rem 1.25rem;
  border: 1px solid var(--tinta);
  border-radius: 999px;
  color: var(--tinta);
  text-decoration: none;
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-size: 1.3rem;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
  background: transparent;
  transition: background .25s ease, color .25s ease, transform .25s ease;
}

.boton .punto {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--c);
  box-shadow: 5px -4px 0 -2.5px var(--tinta), -4px 4px 0 -3px var(--c);
  transition: transform .3s ease;
}

nav .boton:hover, nav .boton:focus-visible { border-bottom-color: var(--tinta); }
.boton:hover, .boton:focus-visible { background: var(--tinta); color: var(--fondo); transform: translateY(-1px); }
.boton:hover .punto, .boton:focus-visible .punto { transform: scale(1.25); box-shadow: 5px -4px 0 -2.5px var(--fondo), -4px 4px 0 -3px var(--c); }

/* ---------- Páginas de sección ---------- */
.seccion main { justify-content: flex-start; align-items: flex-start; text-align: left; max-width: 760px; margin: 0 auto; }

.volver {
  color: var(--suave);
  text-decoration: none;
  font-size: .85rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 2.4rem;
}
.volver:hover { color: var(--tinta); }

.seccion h1 { font-size: clamp(2.8rem, 8vw, 5rem); }
.seccion .lema { max-width: 48ch; }

.proyectos { list-style: none; width: 100%; margin-top: 2.6rem; border-top: 1px solid var(--linea); }
.proyectos li { border-bottom: 1px solid var(--linea); }
.proyectos a {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: 1.1rem 0; color: var(--tinta); text-decoration: none;
}
.proyectos a:hover .titulo { text-decoration: underline; text-underline-offset: 4px; }
.proyectos .titulo { font-family: "Instrument Serif", Georgia, serif; font-size: 1.5rem; }
.proyectos .desc { color: var(--suave); font-size: .9rem; text-align: right; }
.vacio { color: var(--suave); padding: 1.1rem 0; font-style: italic; }

footer {
  position: relative; z-index: 1;
  text-align: center; padding: 0 24px 28px;
  font-size: .78rem; letter-spacing: .1em; color: var(--suave);
}

@media (max-width: 640px) {
  .esquina { width: 78vw; height: 40vh; }
  main { padding-top: 30vh; }
  .proyectos a { flex-direction: column; gap: .2rem; }
  .proyectos .desc { text-align: left; }
}
