/* Variante "nocturno": atmósfera tonal azul-gris, un horizonte y una sola chispa dorada.
   Referentes: J. McNeill Whistler (Nocturnos), Hiroshi Sugimoto (Seascapes), V. Hammershøi (contención).
   Los valores de color son interpretación, no muestreo de obra. */

:root {
  color-scheme: light dark;
  --paper: #e8ecef;
  --sea: #d2dbe3;
  --horizon: #8799aa;
  --ink: #15202c;
  --muted: #4f5c69;
  --line: #c5ced6;
  --rule: #9aaab8;
  --control: #6f7c88;
  --accent: #c8962e;
  --accent-text: #7a4f0c;
  --focus: #7a4f0c;
  --link-line: #8799aa;
  --field: #f3f5f7;
  --radius: 2px;
  --text: "Albert Sans", "Helvetica Neue", Arial, sans-serif;
  --display: "Spectral", "Iowan Old Style", Georgia, serif;
  --label: "Albert Sans", "Helvetica Neue", Arial, sans-serif;
  --text-size: 1.0625rem;
  --text-lh: 1.68;
  --label-size: 0.8125rem;
  --label-track: 0.03em;
  --when-top: 0.32em;
  --gutter: 11rem;
  --measure: 37rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0d151e;
    --sea: #162430;
    --horizon: #40566b;
    --ink: #e2e7eb;
    --muted: #94a2af;
    --line: #223040;
    --rule: #33475a;
    --control: #6e7d8b;
    --accent: #e6b95c;
    --accent-text: #e6b95c;
    --focus: #e6b95c;
    --link-line: #5d7388;
    --field: #121c27;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  position: relative;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: var(--text-size);
  line-height: var(--text-lh);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--ink); color: var(--paper); }

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

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--link-line);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition: color 0.15s, text-decoration-color 0.15s;
}
a:hover { color: var(--accent-text); text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

h1, h2 { margin: 0; font-weight: 400; text-wrap: balance; }
p { margin: 0 0 1.3em; text-wrap: pretty; }

.wrap { max-width: 70rem; margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 2.5rem); }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 10; padding: 0.5rem 0.75rem; background: var(--ink); color: var(--paper); }

/* Etiquetas chicas: nav, años, numeración, pie, formulario */
.top nav,
.eyebrow,
.label,
.go,
.foot,
.pendiente,
.form label,
.form button,
.bio > p[data-when]::before,
.index a::before,
.entries > h2::before {
  font-family: var(--label);
  font-size: var(--label-size);
  font-weight: 500;
  font-style: normal;
  line-height: 1.5;
  letter-spacing: var(--label-track);
  font-variant-numeric: tabular-nums lining-nums;
}

/* Encabezado */
.top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem 2rem;
  padding: 1.4rem 0 1rem;
  border-bottom: 1px solid var(--line);
}
.top-home { justify-content: flex-end; padding-bottom: 0; border-bottom: 0; }
.brand { font-family: var(--display); text-decoration: none; white-space: nowrap; }
.top nav { display: flex; flex-wrap: wrap; gap: 0.2rem 1.5rem; }
.top nav a { padding: 0.35rem 0; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; }
.top nav a:hover { color: var(--ink); }
.top nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

/* Portada */
.hero h1 span { display: block; }
.hero h1 .eyebrow { color: var(--muted); }

.index ol { display: grid; margin: 0; padding: 0; list-style: none; counter-reset: indice; }
.index li { counter-increment: indice; }
.index a { display: flex; align-items: baseline; gap: 0.9rem; text-decoration: none; }
.index a::before {
  content: counter(indice, decimal-leading-zero);
  content: counter(indice, decimal-leading-zero) / "";
  color: var(--accent-text);
}

/* Secciones de la portada */
.section { padding: clamp(2.5rem, 5vw, 4rem) 0; border-top: 1px solid var(--rule); }
.section > h2 { margin-bottom: clamp(1.75rem, 4vw, 2.75rem); }

.bio > p { position: relative; max-width: var(--measure); margin-left: var(--gutter); }
.bio > p[data-when]::before {
  content: attr(data-when);
  position: absolute;
  top: var(--when-top);
  left: calc(-1 * var(--gutter));
  color: var(--muted);
}
.bio > p.statement { margin-top: 2.5rem; margin-bottom: 0; }

/* Contacto */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); }
.mail, .mails { overflow-wrap: anywhere; }
.mails { margin: 0; padding: 0; list-style: none; line-height: 1.9; }
.label { margin-bottom: 0.4rem; color: var(--muted); }

.form { display: grid; gap: 1rem; }
.form label { display: grid; gap: 0.4rem; color: var(--muted); }
.form input,
.form textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--control);
  border-radius: var(--radius);
  background: var(--field);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0;
}
.form textarea { resize: vertical; }
.form input:focus, .form textarea:focus { border-color: var(--ink); }
.form button {
  justify-self: start;
  padding: 0.8rem 1.5rem;
  border: 0;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  transition: background 0.15s;
}
.form button:hover { background: var(--accent-text); }

/* Páginas internas */
.page-title { margin: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2rem, 5vw, 3.25rem); }
.entries { counter-reset: entrada; }
.entries > h2 {
  counter-increment: entrada;
  position: relative;
  margin: 3rem 0 0.9rem;
  padding: 2rem 0 0 var(--gutter);
  border-top: 1px solid var(--line);
}
.entries > h2:first-child { margin-top: 0; border-top-color: var(--rule); }
.entries > h2::before {
  content: counter(entrada, decimal-leading-zero);
  position: absolute;
  top: 2.4rem;
  left: 0;
  color: var(--accent-text);
}
.entries > h2 a { text-decoration: none; }
.entries > p { max-width: var(--measure); margin-left: var(--gutter); }

.go { margin-right: 1.5rem; }
.go::after { content: " \2192"; color: var(--accent-text); }
.pendiente { display: inline-block; padding: 0.3rem 0.6rem; border: 1px dashed var(--muted); color: var(--muted); }

/* Pie */
.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  margin-top: clamp(4rem, 8vw, 7rem);
  padding: 1.5rem 0 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.foot a { margin-left: 1.25rem; padding: 0.3rem 0; text-decoration: none; }
.foot a:first-child { margin-left: 0; }

@media (max-width: 760px) {
  :root { --gutter: 0rem; }
  .contact-grid { grid-template-columns: minmax(0, 1fr); }
  /* Header interno: marca y enlaces fluyen como una sola línea de texto que corta sola */
  .top:not(.top-home) { display: block; padding: 0.9rem 0 0.7rem; line-height: 2.1; }
  .top:not(.top-home) nav { display: inline; }
  .top:not(.top-home) .brand { margin-right: 0.9rem; font-size: 1.05rem; }
  .top:not(.top-home) nav { font-size: 0.78rem; }
  .top:not(.top-home) nav a { display: inline-block; margin-right: 0.8rem; padding: 0; line-height: 1.7; }
  .top:not(.top-home) nav a:last-child { margin-right: 0; }
  /* Portada: foto chica al lado del nombre; la bienvenida ocupa todo el ancho debajo */
  .hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "nombre foto" "bienvenida bienvenida"; gap: 0 1rem; align-items: end; }
  .hero > div { display: contents; }
  .hero h1 { grid-area: nombre; }
  .lede { grid-area: bienvenida; max-width: none; }
  .hero .hero-photo { grid-area: foto; width: clamp(4.75rem, 25vw, 6.5rem); }
  .index ol { grid-template-columns: minmax(0, 1fr); }
  .bio > p[data-when]::before,
  .entries > h2::before { position: static; display: block; margin-bottom: 0.35rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  a, .form button { transition: none; }
}


html { overflow-x: clip; }

.brand { font-size: 1.3rem; font-weight: 400; letter-spacing: -0.01em; }

/* El gesto: un horizonte a todo el ancho que parte la portada en cielo y agua,
   con una única luz dorada lejos, apoyada sobre la línea. */
.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  column-gap: clamp(2rem, 5vw, 4.5rem);
  padding-top: clamp(1.5rem, 5vw, 3.5rem);
}
.hero > div { display: contents; }
.hero::before {
  content: "";
  grid-row: 2;
  grid-column: 1 / -1;
  z-index: -1;
  align-self: stretch;
  margin-inline: calc(50% - 50vw);
  border-top: 1px solid var(--horizon);
  background: linear-gradient(to bottom, var(--sea), var(--paper));
}
.hero::after {
  content: "";
  grid-row: 1;
  grid-column: 1;
  justify-self: end;
  align-self: end;
  width: 7px;
  height: 7px;
  margin: 0 9% 0.55rem 0;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 14px 2px color-mix(in srgb, var(--accent) 45%, transparent);
}
.hero h1 {
  grid-row: 1;
  grid-column: 1;
  padding-bottom: clamp(1.25rem, 3vw, 2.25rem);
  font-family: var(--display);
  font-size: clamp(3.25rem, 9.6vw, 6.5rem);
  font-weight: 200;
  line-height: 0.95;
  letter-spacing: -0.035em;
}
.hero h1 .eyebrow { margin-bottom: 1.1rem; }
.lede {
  grid-row: 2;
  grid-column: 1;
  max-width: 33rem;
  margin: 0;
  padding: clamp(1.5rem, 3vw, 2.25rem) 0 clamp(2.25rem, 5vw, 3.5rem);
  font-size: 1.1875rem;
  line-height: 1.6;
}
.hero-photo {
  grid-row: 1 / 3;
  grid-column: 2;
  align-self: center;
  width: clamp(12rem, 23vw, 18rem);
}

/* Índice */
.index { padding: 0.5rem 0 clamp(2.5rem, 5vw, 4rem); }
.index ol { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: clamp(1.5rem, 4vw, 3rem); }
.index li { border-bottom: 1px solid var(--line); }
.index a { padding: 0.8rem 0 0.7rem; font-family: var(--display); font-size: clamp(1.45rem, 2.4vw, 1.8rem); font-style: italic; font-weight: 300; line-height: 1.2; letter-spacing: -0.01em; }
.index a::before { color: var(--muted); }
.index a:hover { color: var(--accent-text); }

.section > h2 { font-family: var(--display); font-size: clamp(2.1rem, 4.6vw, 3.25rem); font-style: italic; font-weight: 200; line-height: 1.05; letter-spacing: -0.025em; }

.bio > p.statement { max-width: 40rem; font-family: var(--display); font-size: clamp(1.25rem, 2vw, 1.45rem); font-weight: 300; line-height: 1.5; }

.mail { font-weight: 600; }
.form button { letter-spacing: 0.06em; }

.page-title { font-family: var(--display); font-size: clamp(3rem, 9vw, 5.75rem); font-weight: 200; line-height: 0.98; letter-spacing: -0.035em; }
.entries > h2 { font-family: var(--display); font-size: clamp(1.45rem, 2.5vw, 1.9rem); font-weight: 400; line-height: 1.2; letter-spacing: -0.015em; }
.entries > h2::before { top: 2.5rem; color: var(--muted); }

@media (max-width: 760px) {
  .hero { grid-template-areas: none; row-gap: 0; }
  .hero h1 { grid-area: auto; grid-row: 1; grid-column: 1; }
  .lede { grid-area: auto; grid-row: 2; grid-column: 1 / -1; max-width: none; }
  .hero .hero-photo { grid-area: auto; grid-row: 1; grid-column: 2; align-self: end; margin-bottom: 1.25rem; }
  .hero::after { display: none; }
  .index ol { grid-template-columns: minmax(0, 1fr); }
}
