:root {
  --papel: #f5f0e6;
  --hoja: #fbf8f1;
  --tinta: #17284a;
  --suave: #4b5a78;
  --borde: #17284a;
  --borde-suave: rgba(23, 40, 74, 0.22);
  --acento: #c24124;
  --acento-suave: rgba(194, 65, 36, 0.1);
}

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

html {
  background: var(--papel);
  color: var(--tinta);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.6;
}

body {
  margin: 0;
  padding: 2.25rem 1.25rem 3.5rem;
}

.ficha {
  max-width: 820px;
  margin: 0 auto;
  background: var(--hoja);
  border: 2px solid var(--borde);
  border-radius: 6px;
  padding: clamp(1.5rem, 4vw, 3rem);
  box-shadow: 0 14px 32px rgba(23, 40, 74, 0.08);
}

header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  gap: 1.5rem 2rem;
  align-items: center;
  padding-bottom: 1.75rem;
  border-bottom: 2px solid var(--borde);
}

.etiqueta {
  margin: 0 0 0.45rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--acento);
}

h1 {
  margin: 0 0 0.4rem;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: clamp(2.1rem, 4vw, 3rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
}

.rol {
  margin: 0;
  font-size: 1.15rem;
  color: var(--suave);
}

figure {
  margin: 0;
}

figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
}

figcaption {
  margin-top: 0.45rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.74rem;
  color: var(--suave);
  text-align: center;
}

main {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 2rem 0;
}

h2 {
  margin: 0 0 0.85rem;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.35rem;
  padding-bottom: 0.35rem;
  border-bottom: 1.5px dashed var(--borde-suave);
}

h3 {
  margin: 1rem 0 0.35rem;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.08rem;
}

p {
  margin: 0 0 0.85rem;
}

p:last-child {
  margin-bottom: 0;
}

time {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  background: var(--acento-suave);
  color: var(--acento);
  padding: 0.08rem 0.35rem;
  border-radius: 3px;
}

ul {
  margin: 0;
  padding-left: 1.35rem;
  display: grid;
  gap: 0.5rem;
}

dl {
  margin: 1.25rem 0 0;
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 0.65rem 1.25rem;
  padding: 1rem 1.25rem;
  background: var(--papel);
  border: 1.5px solid var(--borde-suave);
  border-radius: 5px;
}

dt {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--acento);
}

dd {
  margin: 0;
}

blockquote {
  margin: 0;
  padding: 1rem 1.35rem;
  border-left: 4px solid var(--acento);
  background: var(--acento-suave);
  font-style: italic;
}

blockquote p {
  margin-bottom: 0.5rem;
}

cite {
  font-style: normal;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--tinta);
}

.proyectos-lista {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.15rem;
}

.proyectos-lista article {
  padding: 1rem 1.15rem;
  border: 1.5px solid var(--borde-suave);
  border-radius: 5px;
  background: var(--papel);
}

.proyectos-lista h3 {
  margin-top: 0;
}

footer {
  padding-top: 1.5rem;
  border-top: 2px solid var(--borde);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
}

address {
  font-style: normal;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

a {
  color: var(--acento);
  font-weight: 700;
}

.subir {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.84rem;
  text-decoration: none;
  padding: 0.4rem 0.75rem;
  border: 1.5px solid var(--borde);
  border-radius: 4px;
  color: var(--tinta);
}

.subir:hover {
  background: var(--papel);
}

@media (max-width: 640px) {
  header {
    grid-template-columns: 1fr;
  }

  figure {
    max-width: 180px;
  }

  dl,
  .proyectos-lista {
    grid-template-columns: 1fr;
  }
}
