/* rogermart.com — Brand Identity v2 (docs/brand/BRAND-IDENTITY.md, 2026-12-03)
   Estructura inspirada en rauchg.com: una columna de 42rem, nombre en negritas,
   índice de filas (año · título · dato en mono), pie en mono.
   Monocromo + un azul. Geist Sans habla, Geist Mono lleva el dato. */

:root {
  --bg: #fafafa;
  --fg: #171717;
  --muted: #666666;
  --faint: #a1a1a1;
  --line: #e5e5e5;
  --blue: #0072f5;
  --red: #e5484d;

  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --measure: 42rem;
  --pad: 1.5rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --fg: #fafafa;
    --muted: #a1a1a1;
    --faint: #666666;
    --line: #1f1f1f;
  }
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 100%;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0 auto;
  max-width: calc(var(--measure) + 2 * var(--pad));
  padding: 0 var(--pad);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--blue); color: #fff; }

.accent { color: var(--blue); }

/* ---------- header ---------- */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.75rem 0;
}
.name {
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
}
.top-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.875rem;
}
.top-nav a:hover { color: var(--muted); }
.top-nav a[aria-current="page"] { color: var(--muted); }
.follow { display: inline-flex; align-items: center; gap: 0.45rem; }
.x-logo { width: 0.8125rem; height: 0.8125rem; fill: currentColor; }

/* ---------- home ---------- */
main { flex: 1; padding-bottom: 3rem; }

.intro {
  margin: 0.75rem 0 2.5rem;
  color: var(--muted);
  font-size: 0.9375rem;
  max-width: 60ch;
  text-wrap: pretty;
}
.intro a { color: var(--fg); }
.intro a:hover { text-decoration: underline; text-underline-offset: 0.2em; }

.index {
  list-style: none;
  margin: 0;
  padding: 0;
}
.row {
  display: grid;
  grid-template-columns: 3.5rem 1fr auto;
  align-items: baseline;
  gap: 0 0.5rem;
  padding: 0.5rem 0;
  font-size: 0.9375rem;
}
.row .year {
  color: var(--faint);
  font-size: 0.8125rem;
}
.row .title { color: var(--fg); }
a.title:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.row .meta {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .row { grid-template-columns: 3rem 1fr; }
  .row .meta { grid-column: 2; text-align: left; margin-top: 0.15rem; }
}

/* ---------- sobre mí (prose) ---------- */
.prose h1 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0.25rem 0 1.5rem;
}
.prose h2 {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 2.5rem 0 1rem;
}
.prose p {
  margin: 0 0 1.25rem;
  font-size: 0.9375rem;
  line-height: 1.7;
  text-wrap: pretty;
}
.prose a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-color: var(--line);
}
.prose a:hover { color: var(--fg); text-decoration-color: var(--fg); }
.prose ul {
  margin: 0 0 1.25rem;
  padding: 0;
  list-style: none;
}
.prose li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.5rem;
  font-size: 0.9375rem;
  line-height: 1.6;
}
.prose li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: var(--faint);
}
blockquote {
  margin: 1.5rem 0;
  padding-left: 1.25rem;
  border-left: 2px solid var(--line);
}
blockquote p {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.4;
  margin: 0;
}

/* ---------- the chart (lo que te gusta × lo que la gente necesita) ---------- */
.chart {
  margin: 2.5rem auto;
  user-select: none;
}
.plot {
  position: relative;
  width: 320px;
  height: 320px;
  margin: 0 auto;
  max-width: 100%;
  font-size: 0.8125rem;
}
.plot .axis-y { position: absolute; left: 40px; top: 0; bottom: 40px; width: 1px; background: var(--line); }
.plot .axis-x { position: absolute; left: 40px; bottom: 40px; right: 0; height: 1px; background: var(--line); }
.plot .arrow-y {
  position: absolute; left: 40px; top: 0; transform: translate(-50%, -2px);
  width: 0; height: 0;
  border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-bottom: 6px solid var(--faint);
}
.plot .arrow-x {
  position: absolute; right: 0; bottom: 40px; transform: translate(2px, 50%);
  width: 0; height: 0;
  border-top: 4px solid transparent; border-bottom: 4px solid transparent;
  border-left: 6px solid var(--faint);
}
.plot .guide-h {
  position: absolute; left: 40px; top: 28%; width: calc(60% - 40px);
  border-top: 1px dashed var(--line);
}
.plot .guide-v {
  position: absolute; left: 60%; top: 28%; bottom: 40px;
  border-left: 1px dashed var(--line);
}
.plot .point {
  position: absolute; left: 60%; top: 28%;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--blue);
  transform: translate(-50%, -50%);
}
.plot .point-label {
  position: absolute; left: calc(60% + 14px); top: 28%;
  transform: translateY(-50%);
  color: var(--fg);
  font-weight: 500;
}
.plot .label-y {
  position: absolute; left: 0; top: 0; bottom: 40px;
  display: flex; align-items: center; justify-content: center;
  width: 30px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  color: var(--muted);
  white-space: nowrap;
}
.plot .label-x {
  position: absolute; left: 40px; right: 0; bottom: 0;
  text-align: center;
  color: var(--muted);
  white-space: nowrap;
}

/* ---------- footer ---------- */
.bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem 0 2.5rem;
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--muted);
}
.bottom a { text-decoration: underline; text-underline-offset: 0.2em; text-decoration-color: var(--line); }
.bottom a:hover { color: var(--fg); }
