:root {
  color-scheme: light;
  background: #faf6ef;
  color: #211a17;
  font-family: system-ui, sans-serif;
  font-size: 100%;
  line-height: 1.6;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
h1, h2, p, figure { margin: 0; }

.portada {
  width: min(100% - 3rem, 76rem);
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 5rem) 0 clamp(2rem, 5vw, 4rem);
}

.bienvenida {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(13rem, 27vw, 21rem);
  grid-template-areas: "nombre foto" "intro foto";
  align-items: center;
  align-content: center;
  gap: 1.25rem clamp(2rem, 6vw, 5rem);
  margin-bottom: clamp(2rem, 5vw, 4rem);
}

h1, h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  line-height: 1;
}

h1 {
  grid-area: nombre;
  align-self: end;
  font-size: clamp(3rem, 6.9vw, 6.5rem);
  letter-spacing: -.065em;
  text-wrap: balance;
}

.intro {
  grid-area: intro;
  align-self: start;
  max-width: 62ch;
  font-size: clamp(1rem, 1.5vw, 1.22rem);
}

.saludo { font-size: 1.16em; font-weight: 700; }
.intro p + p { margin-top: .65em; }

.retrato { grid-area: foto; position: relative; }
.retrato img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 50%;
}

.sello {
  position: absolute;
  right: .05em;
  bottom: .15em;
  padding: .14em;
  border: .075em solid currentColor;
  border-radius: .15em;
  background: #faf6ef;
  color: #a73527;
  font: 700 clamp(1.45rem, 3vw, 2.45rem)/1 serif;
  transform: rotate(-6deg);
}

.bloques {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 2.2vw, 1.75rem);
}

.tarjeta {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--borde);
  border-radius: 1rem;
  background: var(--fondo);
}

.personal { --acento: #204532; --fondo: #e8eddf; --borde: #cbd7c7; }
.profesional { --acento: #193853; --fondo: #e5ebf3; --borde: #cbd6e2; }

h2 {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: .65em clamp(1.25rem, 3vw, 2rem);
  background: var(--acento);
  color: #fffaf1;
  font-size: clamp(2.25rem, 4.8vw, 4rem);
  letter-spacing: -.04em;
}

.personal h2::before, .profesional h2::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  mask-image: linear-gradient(to right, transparent 37%, black);
}

.personal h2::before {
  background-image: repeating-radial-gradient(ellipse at 78% 115%, transparent 0 12px, #d3e4bf55 13px, transparent 14px 22px);
}

.profesional h2::before {
  background-image: linear-gradient(#b3d4ee38 1px, transparent 1px), linear-gradient(90deg, #b3d4ee38 1px, transparent 1px);
  background-size: 22px 22px;
}

.pixel {
  position: absolute;
  top: 50%;
  right: clamp(1.5rem, 4vw, 3rem);
  width: 8px;
  height: 8px;
  color: #cce0b9;
  background: currentColor;
  box-shadow: 8px 0 currentColor, -8px 0 currentColor, 0 8px #8da987, 0 -8px #8da987;
}

.contenido {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.4rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  font-size: clamp(1rem, 1.35vw, 1.125rem);
}

.enlaces {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1.2rem;
  margin: 0;
  padding: .5rem 0 0;
  border-top: 1px solid var(--borde);
  list-style: none;
}

.enlaces a {
  display: inline-flex;
  align-items: center;
  gap: .4em;
  min-height: 44px;
  color: var(--acento);
  font-weight: 700;
  text-underline-offset: .23em;
}

.enlaces a:hover { text-decoration-thickness: .16em; }
.enlaces a:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 3px; }

.solo-lectores {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 700px) {
  .portada { width: min(100% - 2rem, 36rem); }
  .bienvenida {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "foto" "nombre" "intro";
    gap: 1rem;
  }
  .retrato { width: clamp(8.5rem, 34vw, 11rem); }
  .bloques { grid-template-columns: minmax(0, 1fr); }
}

@media (forced-colors: active) {
  .sello, .tarjeta { border-color: CanvasText; }
}
