/* loriz.io — monochrome. Colour appears only when you hover a link. */
:root {
  --paper: #f6f6f5;
  --ink: #1b1b1b;
  --mute: #858585;
  --rule: #e3e3e1;
  --hover: #0e7c6f;              /* phthalo/turquoise, used for hover only */
  --glyph-dark: #1b1b1b;
  --glyph-light: #ffffff;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --measure: 36rem;
  --gut: clamp(1.25rem, 4vw, 3rem);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1d1d1d;
    --ink: #e4e4e2;
    --mute: #8a8a88;
    --rule: #303030;
    --hover: #5cc8b8;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1.125rem/1.65 var(--serif); font-optical-sizing: auto;
  min-height: 100vh; display: flex; flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; width: 100%; }
a { color: inherit; text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: .22em; text-decoration-thickness: 1px; transition: color .15s, text-decoration-color .15s; }
a:hover { color: var(--hover); text-decoration-color: currentColor; }
:focus-visible { outline: 1px solid var(--ink); outline-offset: 3px; }
::selection { background: var(--ink); color: var(--paper); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; font: 400 .75rem var(--mono); background: var(--ink); color: var(--paper); padding: .5rem .75rem; z-index: 10; }
.skip:focus { left: .5rem; top: .5rem; }

/* ---------- shared header / footer */
.bar {
  display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .5rem 2rem;
  padding: 1.75rem var(--gut);
}
.mark { font: 500 .8125rem/1 var(--mono); text-decoration: none; }
.nav { display: flex; gap: 1.5rem; font: 400 .75rem/1 var(--mono); letter-spacing: .02em; }
.nav a { text-decoration: none; color: var(--mute); }
.nav a:hover { color: var(--hover); }
.nav a[aria-current] { color: var(--ink); }
.foot {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 3rem var(--gut) 2rem; font: 400 .6875rem/1 var(--mono); color: var(--mute);
}
.foot a { text-decoration: none; }

/* ---------- home: characters dancing into shapes, one quiet line of text below */
.home { height: 100svh; min-height: 32rem; overflow: hidden; }
.home main { display: flex; flex-direction: column; height: 100%; }
.stage { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.geom { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; }
.card {
  display: flex; justify-content: space-between; align-items: last baseline; flex-wrap: wrap; gap: 1.5rem 3rem;
  padding: clamp(1.5rem, 4vh, 2.5rem) var(--gut) clamp(1.75rem, 5vh, 2.75rem);
  font: 400 .75rem/1.6 var(--mono);
}
.card h1 { margin: 0 0 .5rem; font: 500 .8125rem/1.4 var(--mono); }
.card p { margin: 0; color: var(--mute); max-width: 23rem; font: inherit; }
.card .nav { gap: 2rem; font-size: .75rem; line-height: 1.6; }
.card .sep { color: var(--mute); opacity: .6; }
.card .nav a.mail { color: var(--mute); }
.home .foot { display: none; }
@media (max-width: 760px) {
  .card { flex-direction: column; align-items: flex-start; gap: 1.25rem; }
  .card .nav { gap: .85rem; white-space: nowrap; }
}

/* ---------- section indexes */
.section-head, .rows, .post, .filter, .grid { margin-left: var(--gut); margin-right: var(--gut); }
.section-head { max-width: 40rem; padding-top: clamp(2.5rem, 10vh, 6rem); margin-bottom: 2.5rem; }
.section-head h1, .post h1 { font-weight: 400; font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.5rem); line-height: 1.15; letter-spacing: -.01em; margin: 0 0 .75rem; }
.section-head p { margin: 0; color: var(--mute); max-width: 30rem; }
.crumb { font: 400 .6875rem/1 var(--mono); margin: 0 0 1.5rem; letter-spacing: .02em; }
.crumb a { color: var(--mute); text-decoration: none; }
.crumb a:hover { color: var(--hover); }

.rows { list-style: none; padding: 0; max-width: 40rem; border-top: 1px solid var(--rule); }
.rows li { border-bottom: 1px solid var(--rule); }
.rows a { display: flex; justify-content: space-between; align-items: baseline; gap: 1.5rem; padding: .85rem 0; text-decoration: none; }
.rows .t { font-size: 1.125rem; line-height: 1.3; }
.rows .y { font: 400 .6875rem/1.3 var(--mono); color: var(--mute); text-align: right; flex: none; max-width: 55%; }
.rows a:hover .y { color: inherit; }

/* ---------- Matías archive */
.filter { display: flex; align-items: baseline; gap: .75rem; max-width: 22rem; font: 400 .75rem/1 var(--mono); margin-bottom: 2.5rem; border-bottom: 1px solid var(--rule); padding-bottom: .4rem; }
.filter span, .filter output { color: var(--mute); }
.filter input { flex: 1; min-width: 0; font: 400 .9375rem var(--serif); color: var(--ink); background: transparent; border: 0; padding: .2rem 0; }
.filter input::placeholder { color: var(--mute); opacity: .7; }
.filter input:focus { outline: none; }
.filter:focus-within { border-color: var(--ink); }
.grid { columns: 13rem auto; column-gap: 3rem; padding: 0; list-style: none; counter-reset: t; max-width: 72rem; font-size: 1rem; line-height: 1.3; }
.grid li { counter-increment: t; break-inside: avoid; padding: .22rem 0; display: flex; gap: .9rem; align-items: baseline; }
.grid li::before { content: counter(t, decimal-leading-zero); font: 400 .625rem var(--mono); color: var(--mute); min-width: 1.6rem; }
.grid a { text-decoration: none; }
.grid li[hidden] { display: none; }

/* ---------- articles */
.post { max-width: var(--measure); padding-top: clamp(2.5rem, 10vh, 6rem); }
.post h1 { overflow-wrap: break-word; }
.lead { font-size: 1.1875rem; line-height: 1.5; color: var(--mute); margin: 0 0 2.5rem; }
.source { font: 400 .6875rem/1.6 var(--mono); color: var(--mute); margin: 0 0 2.5rem; }
.prose { hyphens: auto; }
.prose > * + * { margin-top: 1.1em; }
.prose p { margin: 0; }
.prose p + p { margin-top: .85em; }
.prose h1, .prose h2, .prose h3, .prose h4 { font-weight: 500; line-height: 1.3; margin: 2.2em 0 .6em; }
.prose h1 { font-size: 1.375rem; }
.prose h2 { font-size: 1.1875rem; }
.prose h3, .prose h4 { font-size: 1.0625rem; font-style: italic; font-weight: 400; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li + li { margin-top: .35em; }
.prose li::marker { color: var(--mute); }
.prose blockquote { margin-left: 0; padding-left: 1.25rem; border-left: 1px solid var(--rule); font-style: italic; }
.prose pre { white-space: pre-wrap; font: 400 .75rem/1.7 var(--mono); color: var(--mute); margin: 1.6em 0; }
.prose code { font-family: var(--mono); font-size: .8em; }
.prose hr { border: 0; border-top: 1px solid var(--rule); width: 4rem; margin: 2.5em 0; }
.prose img { max-width: 100%; height: auto; display: block; }
.prose .media { margin: 2.25em 0; display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.prose table { border-collapse: collapse; font-size: .875rem; width: 100%; }
.prose th, .prose td { border-bottom: 1px solid var(--rule); padding: .4rem .5rem; text-align: left; vertical-align: top; }
@media (min-width: 1100px) { .prose .media { margin-right: -12rem; } }
a.ext::after { content: "↗"; font: 400 .65em var(--mono); color: var(--mute); margin-left: .15em; }
.cta { margin-top: 3rem; font: 400 .75rem var(--mono); }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 4rem; border-top: 1px solid var(--rule); padding-top: 1.25rem; }
.pager a { text-decoration: none; font-size: 1rem; line-height: 1.35; }
.pager a[rel=next] { text-align: right; }
.pager small { display: block; font: 400 .625rem/1.8 var(--mono); color: var(--mute); }

@media (max-width: 560px) { .nav { gap: 1.1rem; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
