/* Stránka Autor — portrét, jméno, sociální sítě, text */

body.page-author .page-heading {
    text-align: center;
}

body.page-author .page-heading::after {
    margin-left: auto;
    margin-right: auto;
}

.page-author .author-page {
    width: 100%;
    max-width: var(--content-shell-max, 1280px);
    margin-inline: auto;
    padding-inline: var(--page-gutter-left) var(--page-gutter-right);
    padding-bottom: clamp(2rem, 5vw, 3.5rem);
    box-sizing: border-box;
}

.author-page__intro {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(0.85rem, 2vw, 1.15rem);
    margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

.author-page__portrait {
    width: clamp(10rem, 24vw, 15rem);
    aspect-ratio: 1;
    margin: 0;
    border-radius: 50%;
    overflow: hidden;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0.12)),
        var(--color-paper, #141414);
    box-shadow: var(--shadow-sm, 0 8px 24px rgba(0, 0, 0, 0.28));
}

.author-page__portrait img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-page__portrait-placeholder {
    display: block;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.08), transparent 55%),
        linear-gradient(160deg, rgba(255, 255, 255, 0.04), rgba(0, 0, 0, 0.18));
}

.author-page__social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(0.65rem, 2vw, 1rem);
    margin: 0;
    padding: 0;
    list-style: none;
}

.author-page__social-link {
    display: block;
    width: clamp(2.35rem, 6vw, 2.75rem);
    height: clamp(2.35rem, 6vw, 2.75rem);
    border-radius: 50%;
    overflow: hidden;
    opacity: 0.92;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.author-page__social-link:hover,
.author-page__social-link:focus-visible {
    opacity: 1;
    transform: translateY(-1px);
    outline: none;
}

.author-page__social-link img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.author-page__body {
    max-width: min(100%, 42rem);
    margin-inline: auto;
    text-align: left;
}

.author-page__signature {
    max-width: min(100%, 42rem);
    margin: clamp(1.35rem, 3.5vw, 2.25rem) auto 0;
    padding: 0;
    display: flex;
    justify-content: center;
}

.author-page__signature img {
    display: block;
    width: min(100%, 18rem);
    height: auto;
    margin-inline: auto;
}

/* telefon: okraj stránky už dává .page-main (--page-gutter-*, 16 px) – vlastní odsazení obalu by ho zdvojilo
   (text byl 33 px od kraje, jinde 16 px; Jakub 12. 10.: na telefonu všude stejný okraj) */
@media (max-width: 768px) {
    .page-author .author-page {
        padding-inline: 0;
    }
}

@media (max-width: 720px) {
    .author-page__body {
        text-align: left;
    }

    .author-page__signature img {
        width: min(100%, 14rem);
    }
}

/* Ikony sítí v kulatém „erodovaném“ obrysu (jako ovládací prvky webu), barva = text */
.author-page__social-link {
    position: relative;
    isolation: isolate;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 0;
    overflow: visible;
    opacity: 1;
    color: var(--color-ink);
}

.author-page__social-link::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border: 2px solid currentColor;
    border-radius: 999px;
    opacity: 0.8;
    transition: opacity 0.15s ease;
}

.author-page__social-icon {
    display: block;
    width: 1.45rem;
    height: 1.45rem;
}

.author-page__social-link:hover,
.author-page__social-link:focus-visible {
    color: var(--pastel-charcoal, #1d1b1c);
    transform: none;
}

.author-page__social-link:hover::before,
.author-page__social-link:focus-visible::before {
    border: 0;
    opacity: 1;
    background-color: var(--pastel-teal);
    background-image: var(--pastel-grain);
    background-size: 256px 256px;
    background-blend-mode: soft-light;
}

.author-page__social-link:focus-visible {
    outline: 2px dashed var(--color-ink);
    outline-offset: 3px;
}

@supports (-webkit-mask-box-image: url("x.png") 58 fill / 29px round) {
    .author-page__social-link::before {
        border: 0;
        border-radius: 0;
        background-color: currentColor;
        -webkit-mask-box-image: var(--pill-line-a) 58 fill / 29px round;
    }

    .author-page__social li:nth-child(2n) .author-page__social-link::before {
        -webkit-mask-box-image: var(--pill-line-b) 58 fill / 29px round;
    }

    .author-page__social li .author-page__social-link:hover::before,
    .author-page__social li .author-page__social-link:focus-visible::before {
        background-color: var(--pastel-teal);
        -webkit-mask-box-image: var(--pill-fill-a) 58 fill / 29px round;
    }
}

/* Podpis: bílý tah na průhledném pozadí → ve světlém motivu inkoustově tmavý, v tmavém světlý */
.author-page__signature img {
    filter: brightness(0);
    opacity: 0.88;
}

:root[data-theme="dark"] .author-page__signature img {
    filter: none;
    opacity: 0.92;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .author-page__signature img {
        filter: none;
        opacity: 0.92;
    }
}
