/*
 * Parallax — design refresh (2026-10-11)
 * One shared set of tokens and component rules layered over the existing templates.
 * Nothing here changes behaviour or content: colours, cards, light, type scale,
 * section rhythm, motion, blog typography, partner logos, form and footer polish.
 * Selectors are prefixed with html[dir] where they must win over Tailwind's runtime styles.
 */

/* ==========================================================================
   1. Tokens
   ========================================================================== */
:root {
    /* Surfaces */
    --pl-bg: #0A0A0F;
    --pl-surface: #12121A;
    --pl-surface-2: #181822;
    --pl-border: rgba(255, 255, 255, 0.08);
    --pl-border-strong: rgba(255, 255, 255, 0.16);
    --pl-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.05);

    /* Text: primary / secondary / muted (all >= 6.7:1 on the dark surfaces) */
    --pl-text-1: #F5F7FA;
    --pl-text-2: #C3C7D3;
    --pl-text-3: #9A9AAE;

    /* Accent */
    --pl-accent: #007BFF;
    --pl-accent-ink: #0070E8;

    /* Shape */
    --pl-radius-lg: 20px;
    --pl-radius-md: 12px;

    /* Motion: two speeds, one curve */
    --pl-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
    --pl-fast: 0.18s;
    --pl-base: 0.32s;

    /* Section rhythm */
    --pl-section-y: clamp(64px, 6vw + 32px, 112px);
}

/* ==========================================================================
   2. Cards — one radius, one hairline border, one top highlight
   ========================================================================== */
html[dir]:not(.light-mode) :is(
    .blog-card-item,
    .carousel-container-box,
    #parallax-share-bar,
    #parallax-author-box,
    #parallax-next-action,
    .faq-item,
    .program-mobile-item,
    #program .door-panel
) {
    border-radius: var(--pl-radius-lg) !important;
    border-color: var(--pl-border) !important;
    box-shadow: var(--pl-highlight) !important;
}
html[dir] :is(.spotlight-card) {
    border-radius: var(--pl-radius-lg);
    box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.7);
}
html[dir] .card-inner-dark {
    border-radius: calc(var(--pl-radius-lg) - 1px);
}
/* Team portraits and apply form panels share the same corner */
html[dir] main a.group.aspect-square,
html[dir] #apply-form .rounded-2xl {
    border-radius: var(--pl-radius-lg) !important;
}
/* Hover: border brightens, no coloured bloom */
html[dir]:not(.light-mode) .blog-card-item:hover {
    border-color: var(--pl-border-strong) !important;
}
html[dir] .spotlight-card:hover,
html[dir] .card-beam-continuous:hover {
    box-shadow: 0 22px 44px -18px rgba(0, 0, 0, 0.8) !important;
}
html[dir] .spotlight-card:hover .card-inner-dark,
html[dir] .card-beam-continuous:hover .card-inner-dark {
    box-shadow: var(--pl-highlight) !important;
}
html[dir] .spotlight-card:hover .card-inner-dark h3,
html[dir] .card-beam-continuous:hover .card-inner-dark h3 {
    text-shadow: none !important;
}
/* Program door: active state is a crisp accent border instead of a blue halo */
html[dir] #program .door-panel.active {
    border-color: rgba(0, 123, 255, 0.55) !important;
    box-shadow: var(--pl-highlight), 0 0 0 1px rgba(0, 123, 255, 0.15) !important;
}
/* Mobile program cards style their own active state (stacked-sheet cards in program.php) */

/* ==========================================================================
   3. "Only one thing glows" — the primary Apply buttons keep their light,
   everything else is defined by colour and borders
   ========================================================================== */
html[dir] [class*="shadow-[0_0_"]:not(#hero-magnetic-apply-btn):not(.apply-circular-portal),
html[dir] [class*="shadow-[0_4px_20px_rgba(0,123,255"]:not(#hero-magnetic-apply-btn),
html[dir] [class*="shadow-[0_8px_32px_rgba(0,123,255"]:not(#hero-magnetic-apply-btn) {
    box-shadow: none !important;
}
/* Navbar CTA: plain colour change on hover */
html[dir] .interactive-hover-btn,
html[dir] .interactive-hover-btn:hover {
    box-shadow: none !important;
}
/* Small accent dots and indicators */
html[dir] .nav-active-dot,
html[dir] .carousel-dot.active,
html[dir] .venn-pulse-glow {
    box-shadow: none !important;
}
html[dir] .venn-pulse-glow {
    display: none !important;
}
/* Partner logos: colour wake-up wave stays (keyframes in partners.php), the blue bloom goes */
html[dir] #partners-logos-container .partner-logo-item:hover .partner-logo-img {
    filter: grayscale(0%) opacity(1) !important;
    transform: scale(1.05) !important;
}
html[dir] .partners-ambient-orb {
    animation: none !important;
    opacity: 0.4;
}
/* Footer wordmark: letters turn blue on hover without a bloom */
html[dir] .footer-brand-letter:hover,
html[dir] .footer-brand-letter.is-active {
    filter: none !important;
}

/* ==========================================================================
   4. Type scale and section rhythm
   ========================================================================== */
html[dir] .pl-section-title {
    font-size: clamp(28px, 1.4rem + 1.6vw, 46px) !important;
    line-height: 1.2 !important;
    letter-spacing: -0.02em;
    margin-bottom: 14px !important;
}
html[dir="rtl"] .pl-section-title {
    line-height: 1.4 !important;
    letter-spacing: normal;
}
/* Weight scale: hero and section titles 700 · numbers, buttons, card titles 600 ·
   FAQ questions 500 · body 400. */
html[dir] .font-bold,
html[dir="rtl"] .font-display {
    font-weight: 600 !important;
}
html[dir] :is(.font-extrabold, .font-black) {
    font-weight: 700 !important;
}
html[dir] #hero-headline,
html[dir] h1.hero-headline {
    font-weight: 700 !important;
}
/* Other h2s, the big statement, stats and step numbers
   (the id-based list outranks the older "#partners h2 { 700 !important }" rules in style.css) */
html[dir] :is(#program, #who, #partners, #apply, #faq, #parallax-newsletter-section) h2,
html[dir] :is(#program, #who, #partners, #apply, #faq) h2 *,
html[dir] :is(section h2, #uvp-quote-text, #uvp-quote-text *),
html[dir] #apply :is(.font-extrabold, .font-bold),
html[dir] #program :is(.m-num, .phase-number, .expanded-body h3) {
    font-weight: 600 !important;
}
/* Section titles and page titles: 700. :is(#…, body) carries id specificity, so this outranks the
   id rules above, and it comes after them. */
html[dir] :is(#program, #who, #partners, #apply, #faq, #parallax-newsletter-section, body) :is(.pl-section-title, .pl-section-title *),
html[dir] :is(#apply, body) h1.font-display {
    font-weight: 700 !important;
}
/* Buttons and links that were bold */
html[dir] :is(a, button):is(.font-bold, .font-extrabold),
html[dir] .interactive-hover-btn :is(.magic-resting-label, .magic-hover-overlay),
html[dir] .parallax-lang-btn-fa {
    font-weight: 600 !important;
}
/* Light (300) body copy is too thin in Gellix at small sizes */
html[dir] .font-light {
    font-weight: 400 !important;
}
html[dir] .parallax-lang-btn {
    font-weight: 600 !important;
}
/* FAQ questions: medium weight, they are many lines of small text */
html[dir] .faq-item > button span {
    font-weight: 500 !important;
}
/* Footer column headings, card titles */
html[dir] footer h4,
html[dir] :is(section h3, .card-inner-dark h3) {
    font-weight: 600 !important;
}
/* Section subtitles share one size and tone */
html[dir] .pl-section-lead {
    font-size: clamp(15px, 0.85rem + 0.3vw, 17px) !important;
    color: var(--pl-text-2) !important;
    line-height: 1.75 !important;
}
html[dir="rtl"] .pl-section-lead {
    line-height: 1.95 !important;
}

/* One vertical rhythm for the home sections (the hero keeps its own pinned stage) */
html[dir] main > :is(#program, #who, #partners, #apply, #faq),
html[dir] #parallax-newsletter-section {
    padding-top: var(--pl-section-y) !important;
    padding-bottom: var(--pl-section-y) !important;
}
/* Hairline between consecutive home sections */
html[dir] main > :is(#who, #partners, #apply, #faq) {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}
html[dir] #partners {
    border-bottom: 0 !important;
}

/* ==========================================================================
   5. Motion — two durations, one curve
   ========================================================================== */
html[dir] :is(.transition, .transition-all, .transition-colors, .transition-opacity, .transition-transform, .transition-shadow) {
    transition-timing-function: var(--pl-ease) !important;
}
html[dir] :is(.duration-150, .duration-200, .duration-250, .duration-300) {
    transition-duration: var(--pl-base) !important;
}
html[dir] .transition-colors {
    transition-duration: var(--pl-fast) !important;
}
html[dir] :is(.duration-500, .duration-700) {
    transition-duration: 0.45s !important;
}
/* Cards lift by 2px at most */
html[dir] .blog-card-item:hover {
    transform: translateY(-2px) !important;
}
html[dir] .spotlight-card:hover {
    transform: translateY(-2px);
}
@media (prefers-reduced-motion: reduce) {
    html[dir] *,
    html[dir] *::before,
    html[dir] *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* ==========================================================================
   6. Blog — editorial article typography and a unified cover treatment
   ========================================================================== */
/* Same width as the title, summary and contents boxes, so text shares their start edge (right in Persian) */
html[dir] .parallax-article-body {
    max-width: none;
    margin-inline: 0;
    font-size: 17px;
    line-height: 2;
    color: var(--pl-text-2);
}
@media (min-width: 1024px) {
    html[dir] .parallax-article-body {
        font-size: 18px;
    }
}
html[dir] .parallax-article-body :is(h2, h3) {
    color: var(--pl-text-1);
    font-weight: 700;
    line-height: 1.5;
    margin-top: 2.4em;
    margin-bottom: 0.8em;
    scroll-margin-top: 120px;
}
html[dir] .parallax-article-body h2 { font-size: 1.45em; }
html[dir] .parallax-article-body h3 { font-size: 1.2em; margin-top: 2em; }
html[dir] .parallax-article-body > :first-child { margin-top: 0; }
/* Paragraphs and list items use the body size (single.php had them at 16px vs 18px) */
html[dir] .parallax-article-body :is(p, li) { font-size: inherit; line-height: inherit; }
html[dir] .parallax-article-body p { margin-bottom: 1.2em; }
html[dir] .parallax-article-body :is(ul, ol) {
    margin: 0 0 1.4em;
    padding-inline-start: 1.4em;
}
html[dir] .parallax-article-body ul { list-style: disc; }
html[dir] .parallax-article-body ol { list-style: decimal; }
html[dir] .parallax-article-body li { margin-bottom: 0.5em; }
html[dir] .parallax-article-body li::marker { color: var(--pl-accent); }
html[dir] .parallax-article-body blockquote {
    margin: 2em 0;
    /* As wide as its text, full blue border with a very faint glow (no accent bar on one side) */
    width: fit-content;
    max-width: 100%;
    padding: 0.9em 1.3em;
    border: 1px solid rgba(0, 123, 255, 0.45);
    border-radius: var(--pl-radius-lg);
    background: rgba(0, 123, 255, 0.05);
    box-shadow: 0 0 18px -6px rgba(0, 123, 255, 0.35), inset 0 0 12px -8px rgba(0, 123, 255, 0.4);
    color: var(--pl-text-1);
    font-size: 1.1em;
    font-weight: 500;
}
html[dir] .parallax-article-body blockquote > :last-child { margin-bottom: 0; }
html[dir] .parallax-article-body :is(figure, img) {
    border-radius: var(--pl-radius-md);
}
/* Tables: fit the column, scroll sideways only on narrow screens */
html[dir] .parallax-article-body .overflow-x-auto,
html[dir] .parallax-article-body > table {
    margin: 2em 0;
    overflow-x: auto;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
}
html[dir] .parallax-article-body table {
    width: 100%;
    margin: 0;
    border: 0;
    border-collapse: collapse;
    font-size: 0.82em;
    line-height: 1.8;
}
html[dir] .parallax-article-body :is(th, td) {
    padding: 12px 14px;
    text-align: start;
    vertical-align: top;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
html[dir] .parallax-article-body th {
    color: var(--pl-text-1);
    font-weight: 600;
    background: rgba(255, 255, 255, 0.04);
    white-space: nowrap;
}
html[dir] .parallax-article-body tbody tr:last-child td { border-bottom: 0; }
html[dir] .parallax-article-body td:first-child { color: var(--pl-text-1); font-weight: 600; }
@media (max-width: 640px) {
    html[dir] .parallax-article-body table { min-width: 560px; }
}

/* Text pipelines ([A] ──> [B]) rendered as numbered steps (see parallax_render_pipelines) */
html[dir] .parallax-article-body .pl-pipeline {
    list-style: none;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    gap: 28px;
    margin: 1.6em 0 2em;
    padding: 18px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
}
html[dir] .parallax-article-body .pl-pipeline-step {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin: 0;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(0, 123, 255, 0.07);
    border: 1px solid rgba(59, 130, 246, 0.25);
    font-size: 0.8em;
    line-height: 1.5;
}
/* Arrow to the next step, pointing in the reading direction */
html[dir] .parallax-article-body .pl-pipeline-step + .pl-pipeline-step::before {
    content: "";
    position: absolute;
    inset-inline-end: calc(100% + 9px);
    top: 50%;
    width: 10px;
    height: 10px;
    border-top: 1.5px solid rgba(147, 197, 253, 0.7);
    border-inline-end: 1.5px solid rgba(147, 197, 253, 0.7);
    transform: translateY(-50%) rotate(45deg);
}
html[dir="rtl"] .parallax-article-body .pl-pipeline-step + .pl-pipeline-step::before {
    transform: translateY(-50%) rotate(-45deg);
}
html[dir] .parallax-article-body .pl-pipeline-num {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: #FFFFFF;
    background: #0070E8;
}
html[dir] .parallax-article-body .pl-pipeline-label { color: var(--pl-text-1); font-weight: 500; }
/* Phones: one step per line, arrows point down */
@media (max-width: 640px) {
    html[dir] .parallax-article-body .pl-pipeline { grid-auto-flow: row; gap: 22px; padding: 14px; }
    html[dir] .parallax-article-body .pl-pipeline-step { flex-direction: row; align-items: center; }
    html[dir] .parallax-article-body .pl-pipeline-step + .pl-pipeline-step::before,
    html[dir="rtl"] .parallax-article-body .pl-pipeline-step + .pl-pipeline-step::before {
        inset-inline-end: auto;
        inset-inline-start: 18px;
        top: auto;
        bottom: calc(100% + 6px);
        transform: rotate(135deg);
    }
    html[dir="rtl"] .parallax-article-body .pl-pipeline-step + .pl-pipeline-step::before { transform: rotate(-135deg); }
}

html[dir] .parallax-article-body figcaption {
    margin-top: 0.6em;
    font-size: 13px;
    color: var(--pl-text-3);
    text-align: center;
}
html[dir] .parallax-article-body a {
    color: #4DA3FF;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}
html.light-mode .parallax-article-body { color: #374151; }
html.light-mode .parallax-article-body :is(h2, h3, blockquote) { color: #0A0A0F; }
html.light-mode .parallax-article-body blockquote { border-color: rgba(0, 112, 232, 0.4); background: rgba(0, 123, 255, 0.04); box-shadow: 0 0 16px -8px rgba(0, 123, 255, 0.3); }
html.light-mode .parallax-article-body a { color: #0062CC; }

/* Covers: full colour (no monochrome filter or tint) */
html[dir] :is(.blog-card-item > a:first-child, .carousel-slide a.relative) img {
    transition: transform 0.45s var(--pl-ease) !important;
}
/* Category badge on covers stays above the image */
html[dir] .blog-card-item > a:first-child > div {
    z-index: 2;
}

/* ==========================================================================
   7. Partner logos — equal optical weight (sizes set by js in partners.php)
   ========================================================================== */
html[dir] #partners-logos-container .partner-logo-img[data-pl-sized] {
    max-width: none !important;
    max-height: none !important;
}

/* ==========================================================================
   8. Apply form polish (logic untouched)
   ========================================================================== */
html[dir] #apply-form :is(.form-input, input[type="text"], input[type="email"], input[type="tel"], input[type="url"], input[type="number"], select) {
    min-height: 46px;
    border-radius: var(--pl-radius-md) !important;
    border-color: var(--pl-border) !important;
    background-color: rgba(255, 255, 255, 0.03) !important;
    transition: border-color var(--pl-fast) var(--pl-ease), background-color var(--pl-fast) var(--pl-ease), box-shadow var(--pl-fast) var(--pl-ease);
}
html[dir] #apply-form textarea {
    border-radius: var(--pl-radius-md) !important;
    border-color: var(--pl-border) !important;
    background-color: rgba(255, 255, 255, 0.03) !important;
}
html[dir] #apply-form :is(input, textarea, select):hover {
    border-color: var(--pl-border-strong) !important;
}
html[dir] #apply-form :is(input, textarea, select):focus {
    outline: none;
    border-color: var(--pl-accent) !important;
    background-color: rgba(0, 123, 255, 0.04) !important;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.18) !important;
}
html[dir] #apply-form [aria-invalid="true"] {
    border-color: #F87171 !important;
}
/* Step pills */
html[dir] #apply-step-list button {
    border-radius: 999px !important;
    transition: background-color var(--pl-fast) var(--pl-ease), color var(--pl-fast) var(--pl-ease), border-color var(--pl-fast) var(--pl-ease);
}
html[dir] #apply-step-list button[aria-current="step"] {
    background: var(--pl-accent-ink) !important;
    color: #FFFFFF !important;
    box-shadow: none !important;
}

/* ==========================================================================
   9. Footer
   ========================================================================== */
html[dir] footer :is(ul li a, ul li button) {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 32px;
}
html[dir] footer ul li a svg,
html[dir] footer ul li a i,
html[dir] footer ul li a .lucide {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ==========================================================================
   10. Light mode (blog) — readable tones and calm shadows
   ========================================================================== */
html.light-mode {
    --pl-text-1: #0A0A0F;
    --pl-text-2: #374151;
    --pl-text-3: #4B5563;
    --pl-border: rgba(0, 0, 0, 0.08);
    --pl-border-strong: rgba(0, 0, 0, 0.16);
}
html.light-mode :is(.blog-card-item, .carousel-container-box, #parallax-share-bar, #parallax-author-box, #parallax-next-action) {
    border-radius: var(--pl-radius-lg) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px -12px rgba(15, 23, 42, 0.12) !important;
}
html.light-mode .blog-card-item:hover {
    border-color: rgba(0, 0, 0, 0.16) !important;
}
html.light-mode :is(.text-\[\#9A9AAE\], .text-\[\#C3C7D3\]) {
    color: #4B5563 !important;
}

/* ==========================================================================
   11. Hero highlight cards — solid surface instead of see-through glass
   ========================================================================== */
html[dir] #hero-section .card-inner-dark {
    background: #17171F !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}
html[dir] #hero-section .spotlight-card {
    background: rgba(255, 255, 255, 0.14);
    box-shadow: 0 24px 48px -16px rgba(0, 0, 0, 0.85) !important;
}
html[dir] #hero-section .spotlight-card:hover .card-inner-dark {
    background: #191923 !important;
}
/* Blue light rising from inside the card, the same glow as the homepage report card */
html[dir] #hero-section .card-inner-dark,
html[dir] #hero-section .spotlight-card:hover .card-inner-dark {
    background:
        radial-gradient(95% 80% at 50% 112%, rgba(0, 123, 255, 0.5), rgba(0, 123, 255, 0) 70%),
        radial-gradient(60% 50% at 50% -10%, rgba(129, 140, 248, 0.10), rgba(129, 140, 248, 0) 70%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015)),
        #15151F !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}
html[dir] #hero-section .spotlight-card {
    box-shadow: 0 24px 48px -16px rgba(0, 0, 0, 0.85), 0 26px 60px -30px rgba(0, 123, 255, 0.55) !important;
}

/* ==========================================================================
   12. Hero sits a little closer to the floating nav
   ========================================================================== */
/* Phones/tablets: ~60px under the nav instead of ~100px */
html[dir] #hero-sticky-stage { padding-top: 90px; }
@media (min-width: 640px) { html[dir] #hero-sticky-stage { padding-top: 108px; } }
/* Desktop: the pinned stage starts ~54px down the page, so centred content reads low. Lift it with
   bottom padding that grows with screen height (none on short laptops, where space is already tight). */
@media (min-width: 1024px) {
    html[dir] #hero-sticky-stage { padding-top: 0; padding-bottom: clamp(0px, calc((100vh - 700px) * 0.5), 200px); }
}

/* ==========================================================================
   13. Authors — byline, author box, card author, author page (inc/authors.php)
   ========================================================================== */
html[dir] .pl-avatar {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    object-fit: cover;
    background: linear-gradient(135deg, #0070E8, #6366F1);
    color: #FFFFFF;
    font-weight: 600;
    line-height: 1;
    border: 1px solid rgba(255, 255, 255, 0.12);
}
html[dir] .pl-avatar-xs { width: 22px; height: 22px; font-size: 11px; }
html[dir] .pl-avatar-sm { width: 40px; height: 40px; font-size: 16px; }
html[dir] .pl-avatar-md { width: 48px; height: 48px; font-size: 18px; }
html[dir] .pl-avatar-lg { width: 72px; height: 72px; font-size: 26px; }
html[dir] .pl-avatar-xl { width: 120px; height: 120px; font-size: 42px; }

/* Byline under the article title */
html[dir] .pl-byline { display: flex; align-items: center; gap: 12px; margin-top: 22px; }
html[dir] .pl-byline-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
html[dir] .pl-byline-name { font-size: 15px; font-weight: 600; color: var(--pl-text-1); text-decoration: none; }
html[dir] a.pl-byline-name:hover { color: #4DA3FF; }
html[dir] .pl-byline-title { font-size: 13px; color: var(--pl-text-3); }

/* Author box at the end of the article (Vigiato-style: name row with socials, bio, "all articles" link) */
html[dir] .pl-author-box {
    padding: 22px 24px 18px;
    border-radius: 18px;
    background: #12121A;
    border: 1px solid rgba(255, 255, 255, 0.08);
}
html[dir] .pl-author-box-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
html[dir] .pl-author-box-id { display: flex; align-items: center; gap: 12px; min-width: 0; }
html[dir] .pl-author-box-name { margin: 0; font-size: 16px; font-weight: 700; color: var(--pl-text-1); line-height: 1.5; }
html[dir] .pl-author-box-name a { color: inherit; text-decoration: none; }
html[dir] .pl-author-box-name a:hover { color: #4DA3FF; }
html[dir] .pl-author-box-title { margin: 0; font-size: 12.5px; color: var(--pl-text-3); }
html[dir] .pl-author-box-bio { margin: 16px 0 0; font-size: 14px; line-height: 2; color: var(--pl-text-2); }
html[dir] .pl-author-all {
    margin: 16px auto 0;
    display: flex;
    width: fit-content;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #4DA3FF;
    text-decoration: none;
}
html[dir] .pl-author-all:hover { color: #FFFFFF; }

/* Social icon buttons (author box and author page) */
html[dir] .pl-author-social { display: inline-flex; gap: 8px; }
html[dir] .pl-author-social a {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--pl-text-2);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: color .2s ease, border-color .2s ease;
}
html[dir] .pl-author-social a:hover { color: #FFFFFF; border-color: rgba(77, 163, 255, 0.5); }

/* Author on blog cards and the featured carousel */
html[dir] .pl-card-author { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
html[dir] .pl-card-author > span:not(.pl-avatar) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html[dir] .pl-card-author .pl-avatar-xs { font-size: 10px; }

/* Author page: full-width profile band, then category sidebar + article list */
html[dir] .pl-author-band {
    margin-bottom: 40px;
    padding: 24px 0 40px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015));
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
html[dir] .pl-author-crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; color: var(--pl-text-3); margin-bottom: 28px; }
html[dir] .pl-author-crumbs a { color: var(--pl-text-3); text-decoration: none; }
html[dir] .pl-author-crumbs a:hover { color: #FFFFFF; }
html[dir] .pl-author-crumbs [aria-current] { color: #4DA3FF; font-weight: 600; }
html[dir] .pl-author-band-inner { display: flex; align-items: center; gap: 28px; }
html[dir] .pl-author-band-body { flex: 1; min-width: 0; }
html[dir] .pl-author-band-name { margin: 0; font-size: clamp(26px, 1.2rem + 1.4vw, 36px); font-weight: 700; color: var(--pl-text-1); line-height: 1.4; }
html[dir] .pl-author-band-title { margin: 2px 0 0; font-size: 14px; color: var(--pl-text-3); }
html[dir] .pl-author-band-bio { margin: 12px 0 0; max-width: 860px; font-size: 14.5px; line-height: 2; color: var(--pl-text-2); }
html[dir] .pl-author-band .pl-author-social { margin-top: 16px; }

html[dir] .pl-author-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 40px; align-items: start; }
html[dir] .pl-section-label {
    display: flex; align-items: center; gap: 10px;
    margin: 0 0 18px; font-size: 17px; font-weight: 700; color: var(--pl-text-1);
}
html[dir] .pl-section-label::before { content: ""; width: 4px; height: 18px; border-radius: 2px; background: #007BFF; }
html[dir] .pl-author-aside { position: sticky; top: 120px; }
html[dir] .pl-author-cats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
html[dir] .pl-author-cats a {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 10px 12px; border-radius: 12px;
    font-size: 13.5px; color: var(--pl-text-2); text-decoration: none;
    transition: background-color .2s ease, color .2s ease;
}
html[dir] .pl-author-cats a:hover { background: rgba(255, 255, 255, 0.04); color: #FFFFFF; }
html[dir] .pl-author-cats a[aria-current] { background: rgba(0, 123, 255, 0.10); color: #FFFFFF; }
html[dir] .pl-count { font-size: 12px; color: var(--pl-text-3); background: rgba(255, 255, 255, 0.05); padding: 1px 8px; border-radius: 999px; }

/* Article rows */
html[dir] .pl-post-rows { display: flex; flex-direction: column; }
html[dir] .pl-post-row {
    display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 24px; align-items: center;
    padding: 22px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
html[dir] .pl-post-row:first-child { padding-top: 0; }
html[dir] .pl-post-row-cat { display: inline-block; font-size: 12px; color: var(--pl-text-3); margin-bottom: 6px; }
html[dir] .pl-post-row-title { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.6; }
html[dir] .pl-post-row-title a { color: var(--pl-text-1); text-decoration: none; transition: color .2s ease; }
html[dir] .pl-post-row:hover .pl-post-row-title a { color: #4DA3FF; }
html[dir] .pl-post-row-excerpt {
    margin: 8px 0 0; font-size: 14px; line-height: 1.9; color: var(--pl-text-2);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
html[dir] .pl-post-row-meta { margin-top: 12px; display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--pl-text-3); }
html[dir] .pl-dot { width: 4px; height: 4px; border-radius: 999px; background: rgba(255, 255, 255, 0.2); }
html[dir] .pl-post-row-thumb { display: block; aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden; background: #1A1A24; border: 1px solid rgba(255, 255, 255, 0.08); }
html[dir] .pl-post-row-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s var(--pl-ease); }
html[dir] .pl-post-row:hover .pl-post-row-thumb img { transform: scale(1.04); }
html[dir] .pl-post-row-noimg { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: rgba(255, 255, 255, 0.25); }

html[dir] .pl-author-empty { color: var(--pl-text-3); font-size: 14px; }
html[dir] .pl-author-pagination { margin-top: 40px; display: flex; justify-content: center; gap: 8px; }
html[dir] .pl-author-pagination .page-numbers {
    min-width: 38px; height: 38px; padding: 0 12px; border-radius: 12px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 13px; color: var(--pl-text-2); text-decoration: none;
    background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.08);
}
html[dir] .pl-author-pagination .page-numbers.current { background: #0070E8; border-color: #0070E8; color: #FFFFFF; }

@media (max-width: 1023px) {
    html[dir] .pl-author-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; }
    html[dir] .pl-author-aside { position: static; }
    html[dir] .pl-author-cats { flex-direction: row; flex-wrap: wrap; gap: 8px; }
    html[dir] .pl-author-cats a { padding: 8px 12px; border: 1px solid rgba(255, 255, 255, 0.08); }
}
@media (max-width: 640px) {
    html[dir] .pl-author-band { padding: 18px 0 28px; margin-bottom: 28px; }
    html[dir] .pl-author-band-inner { flex-direction: column; align-items: flex-start; gap: 16px; }
    html[dir] .pl-avatar-xl { width: 88px; height: 88px; font-size: 32px; }
    html[dir] .pl-post-row { grid-template-columns: minmax(0, 1fr) 104px; gap: 14px; padding: 18px 0; }
    html[dir] .pl-post-row-title { font-size: 15.5px; }
    html[dir] .pl-post-row-excerpt { display: none; }
    html[dir] .pl-post-row-thumb { aspect-ratio: 1 / 1; border-radius: 12px; }
}

/* Light mode (blog theme toggle) */
html.light-mode .pl-author-box { background: #FFFFFF; border-color: rgba(0, 0, 0, 0.08); }
html.light-mode .pl-author-band { background: #F3F4F6; border-color: rgba(0, 0, 0, 0.06); }
html.light-mode :is(.pl-byline-name, .pl-author-box-name, .pl-author-band-name, .pl-section-label, .pl-post-row-title a) { color: #0A0A0F; }
html.light-mode :is(.pl-author-box-bio, .pl-author-band-bio, .pl-post-row-excerpt, .pl-author-cats a) { color: #374151; }
html.light-mode .pl-post-row { border-color: rgba(0, 0, 0, 0.08); }
html.light-mode .pl-author-social a { color: #374151; background: #F3F4F6; border-color: rgba(0, 0, 0, 0.08); }
html[dir] .pl-author-social-sm a { width: 28px; height: 28px; border-radius: 8px; }
html[dir] .pl-byline-line { display: inline-flex; align-items: baseline; gap: 6px; }
html[dir] .pl-byline-by { font-size: 13px; color: var(--pl-text-3); }
html[dir] .pl-social-icon { width: 14px; height: 14px; }
