/* Author pages (authors.njk). Owner, 16 Nov 2026: photo, bio and articles (round-4 mockup B with the photo header
   of C, design/authors-mockups/round-4/). Owner, 17 Nov 2026 (mockup "idea 3"): the covers fanned out beside the
   name and bio, books as larger centred cards with their price, link buttons under the bio, videos as cards. */

.ap { color: #1a1a1a; }
.ap *, .ap *::before, .ap *::after { box-sizing: border-box; }
.ap ol, .ap ul { list-style: none; margin: 0; padding: 0; }
.ap [hidden] { display: none !important; }
.ap a:focus-visible, .ap button:focus-visible { outline: 2px solid #1a1a1a; outline-offset: 3px; }

/* Top: photo, name, bio, links; with covers, the text on the left and the covers fanned on the right */
.ap-photo { display: block; width: 120px; height: 120px; margin: 0 auto 22px; border-radius: 50%; object-fit: cover; object-position: 50% 22%; box-shadow: 0 1px 2px rgba(26, 26, 26, .12), 0 8px 20px -10px rgba(26, 26, 26, .35); }
.ap-bio { max-width: 680px; margin-left: auto; margin-right: auto; line-height: 1.6; }
.ap-head--fan { display: grid; grid-template-columns: minmax(0, 1fr) 460px; gap: 56px; align-items: center; max-width: 1080px; margin: 0 auto; }
.ap-head--fan .ap-photo { margin: 0 0 20px; }
.ap-head--fan .listing-page__title, .ap-head--fan .ap-bio { text-align: left; margin-left: 0; }
.ap-head--fan .listing-page__title { margin-bottom: 14px; }
.ap-head--fan .ap-links { justify-content: flex-start; margin-bottom: 0; }
.ap .listing-page__subtitle:has(+ .ap-links) { margin-bottom: 24px; }
.ap-head--fan .listing-page__subtitle:not(:has(+ .ap-links)) { margin-bottom: 0; }

/* Sizes are shares of the fan's own width (margin-left % is too), so the tilted covers stay inside it at any width */
.ap-fan { position: relative; width: 100%; max-width: 460px; aspect-ratio: 4 / 3; margin-left: auto; }
.ap-fan img { position: absolute; bottom: 4%; left: 50%; width: 40%; margin-left: -20%; box-shadow: 0 2px 4px rgba(26, 26, 26, .12), 0 20px 34px -18px rgba(26, 26, 26, .6); transform-origin: 50% 100%; }
/* two or three covers (authors.njk): the first in front, the second to the left, the third to the right */
.ap-fan img:nth-child(1) { z-index: 3; }
.ap-fan[data-n="2"] img:nth-child(1) { margin-left: -9%; }
.ap-fan[data-n="2"] img:nth-child(2) { margin-left: -33%; transform: rotate(-6deg); z-index: 1; }
.ap-fan[data-n="3"] img:nth-child(2) { margin-left: -42%; transform: rotate(-7deg); z-index: 1; }
.ap-fan[data-n="3"] img:nth-child(3) { margin-left: 2%; transform: rotate(7deg); z-index: 2; }

/* The author's own website or channel */
.ap-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 0 0 8px; }
.ap-links a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border: 0.8px solid rgb(205, 205, 205); border-radius: 999px; color: #1a1a1a; font-size: 13px; text-decoration: none; transition: border-color .15s ease; }
.ap-links a:hover { border-color: #5e5e5e; }
.ap-links a:active { transform: translateY(1px); }
.ap-links__yt { display: inline-block; flex: none; width: 0; height: 0; border-style: solid; border-width: 5px 0 5px 8px; border-color: transparent transparent transparent currentColor; }

/* Section headings: centred, with a short rule */
.ap-sec { margin-top: 80px; }
.ap-h { margin: 0 0 32px; font-family: var(--tmme-font-display); font-size: 30px; font-weight: 400; line-height: 1.2; text-align: center; color: #1a1a1a; }
.ap-h::after { content: ""; display: block; width: 44px; height: 1px; margin: 16px auto 0; background: rgb(156, 156, 156); }

/* Books: the site's book list (owner, 21 Nov 2026: the filters "apply to all pages that show any books, also for the
   authors"). An author with one book gets the same list, its filters greyed out (owner, 23 Nov 2026), so the old
   rule that centred a lone box is gone. */

/* Dew Arabia: cards with the article's own picture (the Dew Arabia page uses them too) */
.ap-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px; }
/* Fewer than three cards sit in the middle; three or more fill the grid from the left (owner, 18 Nov 2026:
   "only when there are less than 3"). Set in authors.njk and dew-arabia/index.njk. */
.ap-cards--few { display: flex; flex-wrap: wrap; justify-content: center; }
.ap-cards--few > li { width: calc((100% - 72px) / 3); }
.ap-card { display: block; color: inherit; text-decoration: none; }
.ap-card__img { display: block; aspect-ratio: 1200 / 630; overflow: hidden; margin-bottom: 16px; background: var(--tmme-surface-alt, #f6f5f3); }
.ap-card__img img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.ap-card:hover .ap-card__img img { transform: scale(1.03); }
/* no usable picture: a plain title card, as for books without a cover */
.ap-card__tile { display: flex; align-items: center; justify-content: center; height: 100%; padding: 8%; border: 1px solid var(--tmme-border, #e0e0e0); text-align: center; font-family: var(--tmme-font-display); font-size: 24px; line-height: 1.25; color: var(--tmme-ink-muted, #6b6b6b); }
.ap-edition { display: block; margin-bottom: 6px; font-size: 11px; letter-spacing: .5px; text-transform: uppercase; color: var(--tmme-ink-muted, #6b6b6b); }
.ap-title { display: block; font-family: var(--tmme-font-display); font-size: 24px; font-weight: 500; line-height: 1.2; }
.ap-subtitle { display: block; margin-top: 4px; font-family: var(--tmme-font-display); font-size: 18px; font-style: italic; line-height: 1.3; color: rgb(94, 94, 94); }
.ap-summary { display: block; margin-top: 8px; font-size: 15px; font-weight: 300; line-height: 1.6; color: rgb(94, 94, 94); }
.ap-read { display: inline-block; margin-top: 12px; padding-bottom: 2px; border-bottom: 1px solid #1a1a1a; font-size: 11px; letter-spacing: .5px; text-transform: uppercase; color: #1a1a1a; }
.ap-card:hover .ap-title { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }

/* Other publications: a two-column list, newest first */
/* a grid, not columns, so the newest-first order reads across the rows and stays put when the list opens */
.ap-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 56px; }
.ap-list a { display: block; padding: 10px 0; border-bottom: 1px solid #eeeeee; color: inherit; text-decoration: none; }
.ap-date { display: block; font-size: 12px; color: var(--tmme-ink-muted, #6b6b6b); }
.ap-ttl { display: block; font-size: 15px; line-height: 1.4; }
.ap-list a:hover .ap-ttl { text-decoration: underline; text-underline-offset: 3px; }
.ap-more { margin: 24px 0 0; text-align: center; }
.ap-morebtn { appearance: none; padding: 11px 28px; border: 0.8px solid rgb(220, 220, 220); background: #fff; font: 400 11px/1 var(--tmme-font-body); letter-spacing: .5px; text-transform: uppercase; color: #1a1a1a; cursor: pointer; }
.ap-morebtn:hover { border-color: #5e5e5e; }

/* Videos: a plain tile with a play button (the site loads no pictures from other websites) */
.ap-vids { display: flex; flex-wrap: wrap; justify-content: center; gap: 32px; }
.ap-vids li { width: 340px; }
.ap-vid { display: block; color: inherit; text-decoration: none; }
.ap-vid__tile { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 9; margin-bottom: 14px; background: var(--color-cream, rgb(242, 241, 239)); }
.ap-vid__play { position: relative; width: 58px; height: 58px; border-radius: 50%; background: #b3261e; transition: transform .2s ease; }
.ap-vid__play::after { content: ""; position: absolute; left: 23px; top: 18px; border-style: solid; border-width: 11px 0 11px 17px; border-color: transparent transparent transparent #fff; }
.ap-vid:hover .ap-vid__play { transform: scale(1.06); }
.ap-vid__src { position: absolute; left: 14px; bottom: 10px; font-size: 12px; letter-spacing: .3px; color: rgb(94, 94, 94); }
.ap-vid__title { display: block; font-size: 15px; line-height: 1.4; color: #1a1a1a; text-align: center; }
.ap-vid:hover .ap-vid__title { text-decoration: underline; text-underline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  .ap-card__img img, .ap-vid__play { transition: none; }
}
@media (max-width: 1023px) {
  .ap-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ap-cards--few > li { width: calc((100% - 36px) / 2); }
  .ap-head--fan { grid-template-columns: minmax(0, 1fr) minmax(0, 360px); gap: 36px; }
}
@media (max-width: 767px) {
  .ap-sec { margin-top: 56px; }
  .ap-h { font-size: 26px; }
  .ap-head--fan { grid-template-columns: 1fr; gap: 12px; }
  .ap-head--fan .ap-head__text { text-align: center; }
  .ap-head--fan .ap-photo { margin: 0 auto 18px; }
  .ap-head--fan .listing-page__title, .ap-head--fan .ap-bio { text-align: center; margin-left: auto; }
  .ap-head--fan .ap-links { justify-content: center; }
  .ap-fan { max-width: 340px; margin: 0 auto; }
  .ap-cards { grid-template-columns: 1fr; gap: 32px; }
  .ap-cards--few > li { width: 100%; }
  .ap-title { font-size: 23px; }
  .ap-list { grid-template-columns: 1fr; }
  .ap-vids li { width: 100%; }
  .ap-photo { width: 104px; height: 104px; }
}
