/* ── Author archive ─────────────────────────────────────── */

.author {
    background: var(--color-bg-page);
}

/* ── Hero ────────────────────────────────────────────────── */

.author-hero {
    position: relative;
    background: var(--color-deep-rough);
    overflow: hidden;
    border-bottom: var(--border-thick) solid var(--color-fairway);
    padding: var(--space-12) var(--content-padding);
}

.author-hero__inner {
    position: relative;
    z-index: 2;
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.author-hero__photo {
    width: 132px;
    height: 132px;
    margin: 0 auto var(--space-6);
    border-radius: 50%;
    overflow: hidden;
    border: var(--border-thick) solid var(--color-monument);
    background: var(--color-monument);
    box-shadow: var(--shadow-sm);
}

.author-hero__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.author-hero__title {
    font-family: var(--font-display);
    font-size: 56px;
    font-weight: var(--fw-regular);
    line-height: 1.06;
    letter-spacing: -0.015em;
    color: var(--color-monument);
    margin: 0 0 var(--space-6);
    text-wrap: balance;
}

/* ── Facts strip ─────────────────────────────────────────── */

.author-facts {
    background: var(--color-monument);
    border-top: var(--border-base) solid var(--color-sand-trap);
    border-bottom: var(--border-base) solid var(--color-sand-trap);
}

.author-facts__list {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 0 var(--content-padding);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    list-style: none;
}

.author-facts__cell {
    padding: var(--space-5) var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    border-right: var(--border-thin) solid var(--color-sand-trap);
}

.author-facts__cell:last-child {
    border-right: none;
}

.author-facts__label {
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: var(--fw-bold);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-fact-label);
}

.author-facts__value {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: var(--fw-semibold);
    color: var(--color-deep-rough);
    letter-spacing: -0.01em;
    line-height: 1.15;
}

.author-facts__sub {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-style: italic;
    color: var(--color-fact-label);
    line-height: var(--lh-snug);
}

/* ── Story ───────────────────────────────────────────────── */

.author-story {
    background: var(--color-bg-page);
    padding: var(--gap-xl) 0;
}

.author-story__inner {
    max-width: calc(720px + 2 * var(--content-padding));
    margin: 0 auto;
    padding: 0 var(--content-padding);
}

.author-story__heading {
    font-family: var(--font-display);
    font-size: 40px;
    font-weight: var(--fw-regular);
    line-height: 1.05;
    letter-spacing: -0.015em;
    color: var(--color-deep-rough);
    margin: 0 0 var(--space-6);
    text-wrap: balance;
}

.author-story__body > p {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.75;
    color: var(--color-ink);
    margin: 0 0 var(--space-4);
    text-wrap: pretty;
}

.author-story__body > p:last-child {
    margin-bottom: 0;
}

.author-story__empty {
    color: var(--color-text-secondary);
    font-style: italic;
}

/* ── Bag ─────────────────────────────────────────────────── */

.author-bag {
    background: var(--color-monument);
    padding: var(--gap-xl) 0;
    border-top: var(--border-base) solid var(--color-sand-trap);
    border-bottom: var(--border-base) solid var(--color-sand-trap);
}

.author-bag__inner {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 0 var(--content-padding);
}

.author-bag__copy {
    max-width: 720px;
    margin: 0 auto;
}

.author-bag__heading {
    font-family: var(--font-display);
    font-size: 40px;
    font-weight: var(--fw-regular);
    line-height: 1.05;
    letter-spacing: -0.015em;
    color: var(--color-deep-rough);
    margin: 0;
    text-wrap: balance;
}

.author-bag__list {
    list-style: none;
    padding: 0;
    max-width: 720px;
    margin: var(--space-5) auto 0;
    border: var(--border-base) solid var(--color-sand-trap);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--color-bg-card);
}

.author-bag__row {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: var(--space-4);
    padding: var(--space-3) var(--space-5);
    align-items: baseline;
}

.author-bag__row:not(:last-child) {
    border-bottom: var(--border-thin) solid var(--color-sand-trap);
}

.author-bag__key {
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: var(--fw-bold);
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--color-cart-path);
}

.author-bag__value {
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--color-deep-rough);
    line-height: var(--lh-normal);
}

/* ── Post feed ───────────────────────────────────────────── */

.author-feed-section {
    background: var(--color-bg-page);
    padding: var(--gap-xl) 0;
}

.author-feed-section__inner {
    max-width: calc(720px + 2 * var(--content-padding));
    margin: 0 auto;
    padding: 0 var(--content-padding);
}

.author-feed-section__header {
    margin: 0 0 var(--space-8);
}

.author-feed-section__heading {
    font-family: var(--font-display);
    font-size: 40px;
    font-weight: var(--fw-regular);
    line-height: 1.05;
    letter-spacing: -0.015em;
    color: var(--color-deep-rough);
    margin: 0;
    text-wrap: balance;
}

.author-feed {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--gap-md);
}

.author-feed__item {
    display: flex;
}

.author-feed__item > .course-card {
    width: 100%;
}

.author-feed--empty {
    font-family: var(--font-body);
    font-size: var(--text-md);
    color: var(--color-text-secondary);
    text-align: center;
    padding: var(--space-12) 0;
}

/* ── Responsive ──────────────────────────────────────────── */

@media (min-width: 640px) {
    .author-feed {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 639.98px) {
    .author-hero {
        min-height: auto;
        padding: var(--space-12) var(--content-padding);
    }

    .author-hero__title {
        font-size: 40px;
    }

    .author-facts__list {
        grid-template-columns: repeat(2, 1fr);
    }

    .author-facts__cell:nth-child(2n) {
        border-right: none;
    }

    .author-facts__cell:not(:nth-last-child(-n + 2)) {
        border-bottom: var(--border-thin) solid var(--color-sand-trap);
    }

    .author-story,
    .author-bag,
    .author-feed-section {
        padding: var(--space-12) 0;
    }

    .author-story__heading,
    .author-bag__heading,
    .author-feed-section__heading {
        font-size: 32px;
    }

    .author-bag__row {
        grid-template-columns: 1fr;
        gap: var(--space-1);
    }
}
