:root {
    --fondo: #f4f1e8;
    --papel: #fffdf6;
    --texto: #111111;
    --borde: #111111;
    --muted: #5f5a50;
    --acento: #d8ff00;
    --sombra: #111111;
    --ancho: 980px;
    --puntero-x: 50vw;
    --puntero-y: 20vh;
}

* {
    box-sizing: border-box;
}

html {
    color-scheme: light;
}

body {
    margin: 0;
    background:
        linear-gradient(90deg, rgba(17, 17, 17, 0.045) 1px, transparent 1px),
        linear-gradient(rgba(17, 17, 17, 0.045) 1px, transparent 1px),
        var(--fondo);
    background-size: 24px 24px;
    color: var(--texto);
    font-family:
        ui-monospace,
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        Menlo,
        monospace;
    font-size: 16px;
    line-height: 1.5;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(circle 18rem at var(--puntero-x) var(--puntero-y),
            rgba(216, 255, 0, 0.2),
            transparent 70%);
    mix-blend-mode: multiply;
}

img,
picture {
    display: block;
    max-width: 100%;
}

main {
    position: relative;
    z-index: 1;
    width: min(100% - 2rem, var(--ancho));
    margin-inline: auto;
    padding-block: 2rem 4rem;
}

.bloque {
    position: relative;
    margin-block: 1rem;
    padding: 1rem;
    border: 2px solid var(--borde);
    background: var(--papel);
    box-shadow: 6px 6px 0 var(--sombra);
}

.bloque-principal {
    border-width: 4px;
    padding: 1.25rem;
}

.bloque-clave {
    background:
        repeating-linear-gradient(-45deg,
            rgba(216, 255, 0, 0.25) 0,
            rgba(216, 255, 0, 0.25) 10px,
            transparent 10px,
            transparent 20px),
        var(--papel);
}

.cabecera-contenido {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(9rem, 13rem);
    gap: clamp(1rem, 3vw, 2rem);
    align-items: start;
}

.cabecera-texto {
    min-width: 0;
}

.foto-identidad {
    position: relative;
    justify-self: end;
    width: clamp(9rem, 18vw, 13rem);
    margin: 0;
}

.foto-identidad::after {
    content: "";
    position: absolute;
    right: -0.5rem;
    bottom: -0.5rem;
    z-index: -1;
    width: 55%;
    height: 55%;
    background: var(--acento);
    border: 2px solid var(--borde);
}

.foto-identidad picture {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border: 2px solid var(--borde);
    background: #000000;
    box-shadow: 4px 4px 0 var(--sombra);
}

.foto-identidad img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.foto-identidad figcaption {
    margin-block-start: 0.55rem;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
}

.etiqueta {
    display: inline-block;
    margin: 0 0 1rem;
    padding: 0.25rem 0.5rem;
    border: 2px solid var(--borde);
    background: var(--acento);
    color: #000000;
    font-weight: 800;
    text-transform: uppercase;
}

h2,
p,
dt,
dd,
span,
code {
    overflow-wrap: anywhere;
}

h1 {
    margin: 0;
    max-width: 100%;
    font-size: clamp(2.4rem, 7vw, 5.2rem);
    line-height: 0.95;
    letter-spacing: -0.08em;
    text-transform: uppercase;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
    text-wrap: balance;
}

h2 {
    margin: 0 0 1rem;
    padding-block-end: 0.5rem;
    border-bottom: 2px solid var(--borde);
    font-size: 1rem;
    text-transform: uppercase;
}

p {
    max-width: 72ch;
}

.declaracion {
    max-width: 58ch;
    font-size: clamp(1.1rem, 3vw, 1.6rem);
    font-weight: 700;
}

a {
    color: inherit;
    font-weight: 800;
    text-decoration-thickness: 0.14em;
    text-underline-offset: 0.18em;
}

a:hover,
a:focus-visible {
    background: var(--acento);
    color: #000000;
    outline: 3px solid var(--borde);
    outline-offset: 2px;
}

a[target="_blank"]::after {
    content: " ↗";
    font-size: 0.85em;
    font-weight: 800;
}

code {
    padding: 0.1rem 0.25rem;
    border: 1px solid var(--borde);
    background: #ffffff;
    font-family:
        ui-monospace,
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        Menlo,
        monospace;
    font-size: 0.95em;
}

.con-js code[data-copiable="true"] {
    cursor: copy;
    transition:
        background-color 160ms ease,
        color 160ms ease,
        outline-color 160ms ease;
}

.con-js code[data-copiable="true"]:hover,
.con-js code[data-copiable="true"]:focus-visible {
    background: var(--acento);
    color: #000000;
    outline: 2px solid var(--borde);
    outline-offset: 2px;
}

.con-js code[data-estado="copiado"] {
    background: var(--acento);
    color: #000000;
}

.con-js code[data-estado="copiado"]::after {
    content: " copiado";
    margin-inline-start: 0.35rem;
    font-size: 0.75em;
    font-weight: 800;
    text-transform: uppercase;
}

.con-js code[data-estado="error"] {
    background: #ffffff;
    color: #000000;
    outline: 2px solid var(--borde);
}

.con-js code[data-estado="error"]::after {
    content: " error";
    margin-inline-start: 0.35rem;
    font-size: 0.75em;
    font-weight: 800;
    text-transform: uppercase;
}

.lista-enlaces {
    list-style: none;
    margin: 0;
    padding: 0;
}

.lista-enlaces li {
    display: grid;
    grid-template-columns: minmax(9rem, 15rem) 1fr;
    gap: 1rem;
    padding-block: 0.85rem;
    border-bottom: 1px solid var(--borde);
}

.lista-enlaces li:last-child {
    border-bottom: 0;
}

.lista-destacada li {
    grid-template-columns: minmax(11rem, 18rem) 1fr;
    font-size: 1.08rem;
}

.lista-destacada a {
    font-size: 1.25rem;
}

.enlace-inactivo {
    color: var(--muted);
    background:
        repeating-linear-gradient(-45deg,
            transparent 0,
            transparent 9px,
            rgba(17, 17, 17, 0.08) 9px,
            rgba(17, 17, 17, 0.08) 11px);
}

.enlace-inactivo a {
    text-decoration-style: dashed;
}

.estado-enlace {
    display: inline-block;
    margin-inline-end: 0.5rem;
    padding: 0.05rem 0.35rem;
    border: 1px solid var(--borde);
    background: #ffffff;
    color: var(--texto);
    font-size: 0.72rem;
    line-height: 1.4;
    text-transform: uppercase;
}

.datos {
    display: grid;
    gap: 0;
    margin: 0;
}

.datos div {
    display: grid;
    grid-template-columns: minmax(9rem, 14rem) 1fr;
    gap: 1rem;
    padding-block: 0.65rem;
    border-bottom: 1px solid var(--borde);
}

.datos div:last-child {
    border-bottom: 0;
}

.datos dt {
    font-weight: 800;
    text-transform: uppercase;
}

.datos dd {
    min-width: 0;
    margin: 0;
}

.datos-compactos {
    margin-block-start: 1.25rem;
}

.nota {
    color: var(--muted);
}

@media (max-width: 860px) {
    .cabecera-contenido {
        grid-template-columns: 1fr;
    }

    .foto-identidad {
        justify-self: start;
        width: min(100%, 12rem);
    }
}

@media (max-width: 680px) {
    body {
        background-size: 18px 18px;
    }

    body::before {
        background:
            radial-gradient(circle 12rem at var(--puntero-x) var(--puntero-y),
                rgba(216, 255, 0, 0.18),
                transparent 72%);
    }

    main {
        width: min(100% - 1rem, var(--ancho));
        padding-block: 1rem 3rem;
    }

    .bloque {
        padding: 0.85rem;
        box-shadow: 4px 4px 0 var(--sombra);
    }

    h1 {
        font-size: clamp(2rem, 10.5vw, 3.1rem);
        line-height: 0.98;
        letter-spacing: -0.06em;
    }

    .lista-enlaces li,
    .lista-destacada li,
    .datos div {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }
}

@media print {
    body {
        background: #ffffff;
    }

    body::before,
    .foto-identidad::after {
        display: none;
    }

    main {
        width: 100%;
        padding: 0;
    }

    .bloque {
        box-shadow: none;
        break-inside: avoid;
    }

    .foto-identidad picture {
        box-shadow: none;
    }

    a::after {
        content: " <" attr(href) ">";
        font-weight: 400;
    }
}

@media (prefers-reduced-motion: reduce) {
    body::before {
        display: none;
    }
}
