/* Concepto: el sitio es un perfil longitudinal. Cada sección es una estación (0+000, 0+250...) sobre una línea de eje, con curvas de nivel en el encabezado y una cartela de plano como ficha del profesional. */
:root {
  --bg: #EDF0F1;
  --surface: #F7F9F9;
  --fg: #0F1D26;
  --muted: #475862;
  --line: #C3CED3;
  --accent: #1B4FD6;
  --accent-fg: #FFFFFF;
  --font-display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0D161C; --surface: #14212A; --fg: #E6ECEF; --muted: #9DAEB8;
    --line: #293A45; --accent: #7197FF; --accent-fg: #0D161C;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0D161C; --surface: #14212A; --fg: #E6ECEF; --muted: #9DAEB8;
  --line: #293A45; --accent: #7197FF; --accent-fg: #0D161C;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font: 400 1rem/1.65 var(--font-body);
  margin: 0;
  padding-inline: 1rem;
  padding-block: 0;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 72rem; margin-inline: auto; }
h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; margin: 0; line-height: 1.1; letter-spacing: -0.015em; }
p { margin: 0; max-width: 65ch; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.mono { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }

/* Barra superior */
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5;
  background: var(--bg); border-bottom: 1px solid var(--line);
  margin-inline: -1rem; padding-inline: 1rem;
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 0.8rem; }
.brand { display: inline-flex; color: var(--fg); }
.logo-mark { height: 1.9rem; width: auto; display: block; }
.logo-full { height: 4.2rem; width: auto; display: block; color: var(--fg); }
.lg-acc { fill: var(--accent); }
.lg-sub { fill: var(--muted); }
.foot-brand { display: flex; flex-direction: column; gap: 0.8rem; }
.nav { display: flex; gap: 1.4rem; }
.nav a { font-size: 0.9rem; text-decoration: none; color: var(--muted); }
.nav a:hover { color: var(--fg); }
@media (max-width: 40rem) { .nav { display: none; } }

/* Hero */
.hero { position: relative; padding-block: 3.5rem 4rem; }
#contours { position: absolute; inset: 0 -1rem; width: calc(100% + 2rem); height: 100%; z-index: 0; pointer-events: none; }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 3rem; align-items: end; }
.hero h1 { font-size: clamp(2.2rem, 5.6vw, 4.4rem); font-weight: 700; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lede { margin-top: 1.4rem; font-size: 1.1rem; color: var(--muted); }
.cta { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2rem; }
.btn {
  display: inline-block; padding: 0.75rem 1.2rem; font: 500 0.95rem var(--font-body);
  text-decoration: none; border: 1px solid var(--fg); border-radius: 2px;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.btn:hover { transform: translateY(-1px); }

/* Cartela de plano */
.titleblock { background: var(--surface); border: 1.5px solid var(--fg); }
.titleblock header { padding: 0.6rem 0.9rem; border-bottom: 1.5px solid var(--fg); display: flex; justify-content: space-between; gap: 1rem; }
.titleblock dl { margin: 0; display: grid; grid-template-columns: 1fr; }
.titleblock .row { display: grid; grid-template-columns: 7rem minmax(0, 1fr); border-bottom: 1px solid var(--line); }
.titleblock .row:last-child { border-bottom: 0; }
.titleblock dt, .titleblock dd { margin: 0; padding: 0.6rem 0.9rem; font-size: 0.9rem; }
.titleblock dt { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); border-right: 1px solid var(--line); padding-top: 0.75rem; }
@media (max-width: 52rem) { .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 2.2rem; } }

/* Estaciones */
.axis { position: relative; }
.station {
  display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 2rem;
  padding-block: 4rem; border-top: 1px solid var(--line);
}
.sta { font-family: var(--font-mono); font-size: 0.85rem; color: var(--accent); letter-spacing: 0.04em; padding-top: 0.5rem; position: relative; }
.sta::before { content: ""; display: block; width: 0.7rem; height: 0.7rem; background: var(--accent); border-radius: 50%; margin-bottom: 0.7rem; }
.station h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 700; margin-bottom: 1rem; }
.station .intro { color: var(--muted); font-size: 1.05rem; }
@media (max-width: 40rem) {
  .station { grid-template-columns: minmax(0, 1fr); gap: 0.4rem; padding-block: 3rem; }
  .sta { display: flex; align-items: center; gap: 0.6rem; padding-top: 0; }
  .sta::before { margin: 0; }
}

/* Servicios */
.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 2.2rem; }
.service { background: var(--bg); padding: 1.6rem 1.4rem; min-width: 0; }
.service h3 { font-size: 1.2rem; margin-bottom: 0.6rem; font-weight: 500; }
.service p { font-size: 0.95rem; color: var(--muted); }
.service .tag { display: block; margin-bottom: 0.9rem; }

/* Método */
.phases { list-style: none; margin: 2.2rem 0 0; padding: 0; display: grid; gap: 0; }
.phases li { display: grid; grid-template-columns: 6rem minmax(0, 1fr); gap: 1.2rem; padding-block: 1.2rem; border-top: 1px solid var(--line); }
.phases li:last-child { border-bottom: 1px solid var(--line); }
.phases h3 { font-size: 1.1rem; font-weight: 500; margin-bottom: 0.3rem; }
.phases p { color: var(--muted); font-size: 0.95rem; }
@media (max-width: 40rem) { .phases li { grid-template-columns: minmax(0, 1fr); gap: 0.3rem; } }

/* Marcos de referencia */
.refs { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.6rem; }
.chip { font-family: var(--font-mono); font-size: 0.8rem; padding: 0.4rem 0.8rem; border: 1px solid var(--line); background: var(--surface); }

/* Notas técnicas */
.notes { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1.2rem; margin-top: 2.2rem; }
.note { background: var(--surface); border: 1px solid var(--line); padding: 1.5rem; min-width: 0; }
.note h3 { font-size: 1.15rem; margin: 0.5rem 0 0.7rem; font-weight: 500; }
.note p { font-size: 0.95rem; color: var(--muted); }
.note p + p { margin-top: 0.7rem; }

/* Contacto */
.contact-box { margin-top: 2rem; border: 1.5px solid var(--fg); background: var(--surface); }
.contact-row { display: grid; grid-template-columns: 8rem minmax(0, 1fr) auto; gap: 1rem; align-items: center; padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); }
.contact-row:last-child { border-bottom: 0; }
.contact-row .val { font-size: 1.05rem; overflow-wrap: anywhere; user-select: all; }
.copy { font: 500 0.8rem var(--font-body); padding: 0.4rem 0.8rem; background: transparent; color: var(--fg); border: 1px solid var(--line); border-radius: 2px; cursor: pointer; }
.copy:hover { border-color: var(--fg); }
@media (max-width: 40rem) { .contact-row { grid-template-columns: minmax(0, 1fr) auto; } .contact-row .mono { grid-column: 1 / -1; } }

footer { border-top: 1px solid var(--line); padding-block: 2rem 2.5rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
footer p { font-size: 0.85rem; color: var(--muted); }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn:hover { transform: none; } }

/* Notas técnicas: archivo, artículo y vista previa de Instagram */
.note h3 a { text-decoration: none; }
.note h3 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.mas { margin-top: 1.6rem; }
.nota-wrap { max-width: 46rem; margin-inline: auto; padding-block: 3.5rem 4rem; display: flex; flex-direction: column; gap: 1.4rem; min-width: 0; }
.nota-wrap h1 { font-size: clamp(1.9rem, 4.4vw, 3rem); font-weight: 700; }
.nota-wrap .mono a { color: inherit; }
.nota-wrap .bajada { font-size: 1.15rem; color: var(--muted); }
.cuerpo { display: flex; flex-direction: column; gap: 1.2rem; font-size: 1.05rem; line-height: 1.75; min-width: 0; }
.cuerpo h2 { font-size: 1.6rem; margin-top: 1.2rem; }
.cuerpo h3 { font-size: 1.25rem; margin-top: 0.6rem; }
.cuerpo ul, .cuerpo ol { margin: 0; padding-left: 1.3rem; display: flex; flex-direction: column; gap: 0.5rem; max-width: 65ch; }
.cuerpo blockquote { margin: 0; padding-left: 1.1rem; border-left: 3px solid var(--accent); color: var(--muted); max-width: 65ch; }
.cuerpo a, .cierre a { color: var(--accent); text-underline-offset: 3px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); }
.table-wrap table { border-collapse: collapse; width: 100%; font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.table-wrap th, .table-wrap td { text-align: left; padding: 0.6rem 0.9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table-wrap th { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); background: var(--surface); }
.cierre { border-top: 1px solid var(--line); padding-top: 1.4rem; color: var(--muted); }
.galeria { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 0.8rem; }
.galeria img { width: 100%; height: auto; display: block; border: 1px solid var(--line); }
.caption { white-space: pre-wrap; background: var(--surface); border: 1px solid var(--line); padding: 1rem; font: 400 0.95rem/1.6 var(--font-body); overflow-wrap: anywhere; }

/* Barra superior: llamada a la acción */
.nav { margin-left: auto; }
.top-cta { padding: 0.5rem 0.9rem; font-size: 0.85rem; white-space: nowrap; }
@media (max-width: 52rem) { .nav { display: none; } .top .wrap { justify-content: space-between; } }

/* Retrato en la cartela */
.portrait { margin: 0; border-bottom: 1px solid var(--line); background: var(--surface); }
.portrait img { display: block; width: 100%; height: auto; }

/* Franja de datos */
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts > div { padding: 1.3rem 1.2rem; display: flex; flex-direction: column; gap: 0.35rem; border-right: 1px solid var(--line); min-width: 0; }
.facts > div:last-child { border-right: 0; }
.facts .num { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.1rem, 2.4vw, 1.6rem); line-height: 1.15; }
@media (max-width: 40rem) {
  .facts { grid-template-columns: minmax(0, 1fr); }
  .facts > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .facts > div:last-child { border-bottom: 0; }
}

/* Íconos de servicio */
.ico { width: 2.1rem; height: 2.1rem; fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; display: block; margin-bottom: 1rem; }
.service .entregable { margin-top: 0.9rem; padding-top: 0.7rem; border-top: 1px solid var(--line); font-size: 0.85rem; color: var(--fg); }

/* Sobre mí */
.about { display: grid; grid-template-columns: minmax(0, 18rem) minmax(0, 1fr); gap: 2.4rem; margin-top: 1.6rem; align-items: start; }
.about-photo { margin: 0; border: 1.5px solid var(--fg); background: var(--surface); }
.about-photo img { display: block; width: 100%; height: auto; }
.about-photo figcaption { padding: 0.6rem 0.9rem; border-top: 1.5px solid var(--fg); }
.about-text { display: flex; flex-direction: column; gap: 1rem; }
.about-text p { max-width: 60ch; }
@media (max-width: 40rem) { .about { grid-template-columns: minmax(0, 1fr); gap: 1.4rem; } .about-photo { max-width: 18rem; } }

/* Formulario de propuesta */
.proposal { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.2rem; margin-top: 2rem; }
.proposal label { display: flex; flex-direction: column; gap: 0.4rem; font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.proposal input, .proposal select, .proposal textarea { font: 400 1rem var(--font-body); letter-spacing: 0; text-transform: none; color: var(--fg); background: var(--surface); border: 1px solid var(--line); border-radius: 2px; padding: 0.7rem 0.8rem; width: 100%; }
.proposal input:focus, .proposal select:focus, .proposal textarea:focus { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 1px; }
.proposal .wide { grid-column: 1 / -1; }
.proposal .hp { position: absolute; left: -9999px; }
.proposal button.btn { cursor: pointer; font-size: 1rem; }
@media (max-width: 40rem) { .proposal { grid-template-columns: minmax(0, 1fr); } }
.contact-box { margin-top: 2.4rem; }

/* Miniatura de nota */
.note .thumb { display: block; margin: -1.5rem -1.5rem 1.1rem; }
.note .thumb img { display: block; width: 100%; height: auto; border-bottom: 1px solid var(--line); }

/* Guía descargable */
.guide { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1.6rem; align-items: start; padding: 2.2rem 1.4rem; border-bottom: 1px solid var(--line); background: var(--surface); }
.guide .ico { width: 3rem; height: 3rem; margin: 0; }
.guide-text { display: flex; flex-direction: column; gap: 0.8rem; max-width: 62ch; }
.guide-text h2 { margin: 0; font-size: clamp(1.3rem, 2.6vw, 1.8rem); line-height: 1.2; }
.guide-text p { margin: 0; }
.guide-note { font-size: 0.85rem; color: var(--muted); }
@media (max-width: 40rem) { .guide { grid-template-columns: minmax(0, 1fr); gap: 0.8rem; } }
