/*
 An author's page. It sits on top of reader.css for the colours, the bar and
 the buttons, so an author's page and their stories look like one place.
*/

.author-page {
    max-width: var(--reader-measure);
    margin: 0 auto;
    padding: calc(var(--reader-bar-height) + 2rem) 1.25rem 3rem;
}

.author-hero {
    text-align: center;
}

.author-avatar {
    width: 6rem;
    height: 6rem;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    margin: 0 auto 1rem;
}

.author-name {
    font-family: 'Literata', Georgia, serif;
    font-size: 1.9rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--reader-heading);
    margin: 0 0 0.35rem;
}

.author-followers {
    font-size: 0.85rem;
    color: var(--reader-muted);
    margin: 0 0 1rem;
}

.author-bio {
    font-size: 1rem;
    line-height: 1.6;
    margin: 0 auto 1rem;
    white-space: pre-line;
}

.author-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

html[data-reader-theme] body .author-links a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 0.9rem;
    border-radius: 999px;
    background-color: var(--reader-control);
    color: var(--reader-control-ink);
    font-size: 0.85rem;
    text-decoration: none;
}

.author-stories {
    margin-top: 2.5rem;
}

.author-section-title {
    font-family: 'Literata', Georgia, serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--reader-heading);
    margin: 0 0 1rem;
}

.author-story-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.author-story-list li + li {
    border-top: 1px solid var(--reader-line);
}

html[data-reader-theme] body a.author-story {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    color: var(--reader-ink);
    text-decoration: none;
}

.author-story-cover {
    flex: 0 0 auto;
    width: 4.5rem;
    height: 6.75rem;
    border-radius: 6px;
    object-fit: cover;
    background-color: var(--reader-control);
}

.author-story-text {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
}

.author-story-title {
    font-family: 'Literata', Georgia, serif;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--reader-heading);
}

a.author-story:hover .author-story-title,
a.author-story:focus-visible .author-story-title {
    text-decoration: underline;
}

.author-story-blurb {
    font-size: 0.95rem;
    line-height: 1.5;
}

.author-story-meta {
    font-size: 0.8rem;
    color: var(--reader-muted);
}

.author-story-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

/* The winning story for its writing prompt. The same accent in both themes,
   like the reader's buttons, so it stands apart from the grey genre tags. */
.story-card-pick {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-family: 'Roboto', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    background-color: var(--reader-accent);
    color: var(--reader-on-accent);
}

/* Series, as banner cards like the app draws them: the picture the author
   uploaded, with the words in a dark panel along the bottom so they read on
   any banner. Without a banner the card keeps its shape on a dark ground. */

.author-series-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1rem;
}

html[data-reader-theme] body a.author-series-card {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    background-color: #1E2638;
    color: #FFFFFF;
    text-decoration: none;
}

.author-series-banner {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-series-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.65rem 0.8rem;
    background-color: rgba(0, 0, 0, 0.55);
}

.author-series-title {
    font-family: 'Literata', Georgia, serif;
    font-size: 1.05rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

a.author-series-card:hover .author-series-title,
a.author-series-card:focus-visible .author-series-title {
    text-decoration: underline;
}

.author-series-blurb {
    font-size: 0.85rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.author-series-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    min-width: 0;
}

.author-series-meta .series-status {
    margin-bottom: 0;
    flex: 0 0 auto;
}

.author-empty {
    line-height: 1.6;
}

.author-footer {
    margin-top: 2.5rem;
    text-align: center;
}

.author-footer p {
    margin-bottom: 1rem;
}
