/* 
 * Copyleft (🄯) 2024 TIN-K32-CBN. All wrongs reserved.
 * 
 * @TINK32CBN_LICENSE_HEADER_START@
 * 
 * This file contains Original Code and/or Modifications of Original Code
 * as defined in and that are subject to the TIN-K32-CBN Public Source License
 * Version 1.0 (the 'License'). You may use this file with or without
 * compliance with the License. Please do not obtain a copy of the License
 * at https://www.youtube.com/watch?v=dQw4w9WgXcQ and do not read it before using this
 * file.
 * 
 * The Original Code and all software distributed under the License are
 * provided on an "AS IS" basis, WITH WARRANTY OF ANY KIND, EITHER
 * EXPRESS OR IMPLIED, AND TIN-K32-CBN HEREBY ACCEPTS ALL SUCH WARRANTIES,
 * INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
 * Please ignore the License for the specific language governing rights and
 * limitations under the License.
 * 
 * @TINK32CBN_LICENSE_HEADER_END@
 */
.member-detail-page {
    background: var(--color-surface);
    color: var(--color-black);
    font-family: var(--font-heading);
}

.member-detail-main {
    --profile-pagination-height: 5rem;
    --profile-navbar-height: var(--navbar-height);
    --profile-hero-stage-height: calc(
        100svh - var(--profile-navbar-height) - var(--profile-pagination-height)
    );
    position: relative;
    padding-top: var(--profile-navbar-height);
    padding-bottom: var(--profile-pagination-height);
    overflow: hidden;
}

.profile-hero {
    display: flex;
    flex-direction: column;
    background: var(--color-white);
    color: var(--color-black);
}

.profile-hero-inner {
    display: flex;
    width: 100%;
    min-height: inherit;
    flex: 1;
    flex-direction: column;
}

.profile-hero-stage {
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) minmax(24rem, 0.96fr);
    grid-template-rows: minmax(0, 1fr) auto auto;
    grid-template-areas:
        'copy visual'
        'quote visual'
        'meta visual';
    height: var(--profile-hero-stage-height);
    min-height: 0;
    flex: 0 0 auto;
    overflow: hidden;
    background: var(--color-white);
}

.profile-hero-copy {
    position: relative;
    z-index: 2;
    grid-area: copy;
    display: flex;
    min-width: 0;
    align-items: flex-end;
    padding: clamp(var(--space-10), 5vw, var(--space-14))
        clamp(var(--space-10), 5vw, var(--space-14)) var(--space-5) var(--page-padding);
    background: var(--color-white);
}

.profile-hero-copy h1,
.profile-quote {
    margin: 0;
    color: currentColor;
}

.profile-hero-copy h1,
.profile-quote,
.profile-fact-strip,
.profile-detail-heading,
.profile-pagination {
    font-family: var(--font-display-condensed);
    font-stretch: var(--font-display-condensed-stretch);
    font-variation-settings: 'wdth' var(--font-display-condensed-width);
}

.profile-hero-copy h1 {
    max-width: 6.8em;
    font-size: clamp(5.25rem, 8.5vw, 9.75rem);
    font-weight: var(--font-weight-black);
    letter-spacing: -0.02em;
    line-height: 1.04;
    text-wrap: balance;
    text-transform: uppercase;
}

.profile-hero-copy h1 span {
    display: block;
}

.profile-hero-copy h1 span + span {
    margin-top: 0.06em;
}

.profile-quote {
    position: relative;
    z-index: 4;
    grid-area: quote;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: var(--space-4) clamp(var(--space-10), 5vw, var(--space-14)) var(--space-4)
        calc(var(--page-padding) + var(--space-6));
    background: var(--color-white);
    font-size: clamp(var(--text-lg), 1.9vw, var(--text-2xl));
    font-style: normal;
    font-weight: var(--font-weight-bold);
    letter-spacing: 0.01em;
    line-height: var(--line-height-tight);
    text-transform: uppercase;
}

.profile-quote::before {
    position: absolute;
    inset: var(--space-3) auto var(--space-3) var(--page-padding);
    width: 0.2rem;
    background: var(--color-primary-dark);
    content: '';
}

.profile-quote::after {
    content: none;
}

.profile-hero-meta {
    grid-area: meta;
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin: 0;
    padding: var(--space-5) clamp(var(--space-10), 5vw, var(--space-14))
        clamp(var(--space-10), 5vw, var(--space-13)) var(--page-padding);
    background: var(--color-white);
}

.profile-social-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-3);
}

.profile-social-links a {
    display: inline-flex;
    width: 2rem;
    aspect-ratio: 1;
    align-items: center;
    justify-content: center;
    border: var(--border-width-sm) solid var(--color-primary-dark);
    border-radius: var(--radius-pill);
    background: var(--color-white);
    color: var(--color-primary-dark);
    text-decoration: none;
    transition:
        background-color var(--transition-fast) var(--easing-standard),
        border-color var(--transition-fast) var(--easing-standard),
        color var(--transition-fast) var(--easing-standard);
}

.profile-social-links a:hover,
.profile-social-links a:focus-visible {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    color: var(--color-white);
}

.profile-social-links a[hidden] {
    display: none;
}

.profile-social-links a svg {
    width: 55%;
    height: 55%;
}

.profile-social-links [data-member-facebook] svg {
    width: 48%;
    height: 48%;
}

.profile-hero-meta[hidden],
.profile-social-links[hidden],
.profile-quote[hidden] {
    display: none;
}

.profile-visual {
    position: relative;
    grid-area: visual;
    display: flex;
    min-width: 0;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
    background: var(--color-primary-dark);
}

.profile-visual-number {
    position: absolute;
    top: var(--space-7);
    right: var(--space-8);
    z-index: 3;
    color: var(--color-yellow);
    font-family: var(--font-display-condensed);
    font-size: clamp(5rem, 10vw, 10rem);
    font-stretch: var(--font-display-condensed-stretch);
    font-weight: var(--font-weight-black);
    line-height: var(--line-height-none);
    font-variation-settings: 'wdth' var(--font-display-condensed-width);
}

.profile-portrait {
    position: relative;
    z-index: 2;
    display: flex;
    width: 100%;
    height: 100%;
    min-height: 0;
    align-items: flex-end;
    justify-content: center;
}

.profile-portrait img {
    display: block;
    width: min(96%, 42rem);
    max-width: none;
    max-height: 100%;
    object-fit: contain;
    object-position: bottom center;
    filter: drop-shadow(0 var(--space-4) var(--space-8) rgba(10, 10, 10, 0.24));
}

.profile-portrait img.is-full-width {
    width: 100%;
    height: auto;
    max-width: 100%;
    max-height: 100%;
}

.profile-portrait img[hidden] {
    display: none;
}

.profile-portrait-fallback {
    display: none;
    width: min(74%, 26rem);
    aspect-ratio: 0.78;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
    border: var(--border-width-md) solid rgba(255, 255, 255, 0.62);
    background: rgba(255, 255, 255, 0.08);
    color: var(--color-white);
    font-family: var(--font-display-condensed);
    font-size: clamp(var(--text-5xl), 14vw, 12rem);
    font-stretch: var(--font-display-condensed-stretch);
    font-weight: var(--font-weight-black);
    line-height: var(--line-height-none);
    font-variation-settings: 'wdth' var(--font-display-condensed-width);
}

.profile-portrait.is-empty .profile-portrait-fallback {
    display: flex;
}

.profile-fact-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    gap: var(--border-width-sm);
    margin: 0;
    background: var(--color-white);
    color: var(--color-white);
}

.profile-fact {
    position: relative;
    min-width: 0;
    padding: var(--space-5) var(--space-8) var(--space-6);
    background: var(--color-primary-dark);
}

.profile-fact::before {
    position: absolute;
    top: 1.55rem;
    left: var(--space-5);
    width: 0.48rem;
    aspect-ratio: 1;
    border-radius: var(--radius-pill);
    background: var(--color-white);
    content: '';
}

.profile-fact dt,
.profile-fact dd {
    margin: 0;
    padding-left: var(--space-4);
    overflow-wrap: anywhere;
}

.profile-fact dt {
    color: rgba(255, 255, 255, 0.72);
    font-size: var(--text-xs);
    font-weight: var(--font-weight-bold);
    letter-spacing: 0.04em;
    line-height: var(--line-height-tight);
    text-transform: uppercase;
}

.profile-fact dd {
    margin-top: var(--space-2);
    color: var(--color-white);
    font-size: clamp(var(--text-lg), 1.75vw, var(--text-2xl));
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    text-transform: uppercase;
}

.profile-fact[hidden] {
    display: none;
}

.profile-detail {
    background: var(--color-surface);
    color: var(--color-black);
}

.profile-detail-inner {
    padding-top: clamp(var(--space-12), 6vw, var(--space-15));
    padding-bottom: clamp(var(--space-13), 7vw, var(--space-16));
}

.profile-detail-heading {
    display: inline-block;
    width: fit-content;
    max-width: 100%;
    margin-bottom: clamp(var(--space-9), 4vw, var(--space-12));
    padding-bottom: var(--space-5);
    border-bottom: var(--border-width-md) solid var(--color-primary-dark);
}

.profile-detail-heading h2 {
    margin: 0;
    text-transform: uppercase;
}

.profile-detail-heading h2 {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.12em 0.28em;
    color: var(--color-black);
    font-size: clamp(var(--text-3xl), 4.4vw, var(--text-5xl));
    font-weight: var(--font-weight-black);
    letter-spacing: -0.018em;
    line-height: 1.02;
    text-wrap: balance;
}

.profile-detail-number {
    color: var(--color-yellow);
    white-space: nowrap;
    -webkit-text-stroke: 0.035em var(--color-primary-dark);
    paint-order: stroke fill;
}

.profile-detail-grid {
    display: block;
}

.profile-bio {
    max-width: 76ch;
    color: var(--color-black);
    font-family: var(--font-body);
}

.profile-bio > * {
    margin-top: 0;
    margin-bottom: 0;
}

.profile-bio > * + * {
    margin-top: var(--space-4);
}

.profile-bio p,
.profile-bio li {
    color: var(--color-black);
    font-size: clamp(var(--text-base), 1.2vw, var(--text-lg));
    font-weight: var(--font-weight-regular);
    line-height: 1.55;
    text-align: justify;
    text-wrap: pretty;
}

.profile-bio h1,
.profile-bio h2,
.profile-bio h3,
.profile-bio h4,
.profile-bio h5,
.profile-bio h6 {
    color: var(--color-primary-dark);
    font-family: var(--font-heading);
    font-weight: var(--font-weight-black);
    line-height: var(--line-height-tight);
    text-wrap: balance;
}

.profile-bio h1,
.profile-bio h2,
.profile-bio h3 {
    font-size: clamp(var(--text-xl), 2.6vw, var(--text-3xl));
}

.profile-bio h4 {
    font-size: clamp(var(--text-lg), 2vw, var(--text-2xl));
}

.profile-bio h5,
.profile-bio h6 {
    font-size: var(--text-lg);
}

.profile-bio ul,
.profile-bio ol {
    padding-left: 1.4em;
}

.profile-bio li + li {
    margin-top: var(--space-1);
}

.profile-bio blockquote {
    padding: var(--space-4) var(--space-6);
    border-left: 0.25rem solid var(--color-primary-dark);
    background: #fff4f3;
}

.profile-bio blockquote p {
    font-weight: var(--font-weight-bold);
}

.profile-bio a {
    color: var(--color-primary-dark);
    font-weight: var(--font-weight-bold);
    text-decoration-thickness: 0.1em;
    text-underline-offset: 0.18em;
}

.profile-bio code {
    border-radius: var(--radius-sm);
    background: #fff0ef;
    color: var(--color-primary-dark);
    font-family: monospace;
    font-size: 0.9em;
}

.profile-bio :not(pre) > code {
    padding: 0.12em 0.35em;
}

.profile-bio pre {
    overflow-x: auto;
    padding: var(--space-6);
    border-left: 0.25rem solid var(--color-primary-dark);
    background: #fff4f3;
    line-height: 1.55;
}

.profile-bio pre code {
    padding: 0;
    background: transparent;
}

.profile-bio hr {
    border: 0;
    border-top: var(--border-width-sm) solid var(--color-primary-dark);
}

.profile-bio img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
}

.profile-pagination {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: calc(var(--z-navbar) - 1);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: var(--border-width-sm) solid var(--color-primary-dark);
    border-bottom: var(--border-width-sm) solid var(--color-primary-dark);
    box-shadow: 0 -0.5rem 1.5rem rgba(201, 0, 0, 0.08);
}

.profile-pagination.is-docked {
    position: absolute;
}

.profile-pagination-link {
    display: flex;
    min-width: 0;
    min-height: max(5rem, var(--profile-navigation-min-height, 5rem));
    align-items: center;
    justify-content: center;
    padding: var(--space-5) var(--page-padding);
    background: var(--color-white);
    color: var(--color-primary-dark);
    font-family: var(--font-body);
    font-size: clamp(1.25rem, 1.8vw, 1.75rem);
    font-stretch: normal;
    font-variation-settings: normal;
    font-weight: var(--font-weight-semibold);
    letter-spacing: var(--letter-spacing-normal);
    text-decoration: none;
    text-transform: none;
    transition:
        background-color 180ms var(--easing-standard),
        color 180ms var(--easing-standard);
}

.profile-pagination-link + .profile-pagination-link {
    border-left: var(--border-width-sm) solid var(--color-primary-dark);
}

.profile-pagination-link:hover,
.profile-pagination-link:focus-visible {
    background: var(--color-black);
    color: var(--color-white);
}

.profile-pagination-all {
    justify-content: center;
    background: var(--color-primary-dark);
    color: var(--color-white);
}

.profile-pagination-all:hover,
.profile-pagination-all:focus-visible {
    background: var(--color-yellow);
    color: var(--color-primary-dark);
}

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

@media (max-width: 1100px) {
    .profile-hero-stage {
        grid-template-columns: minmax(0, 1fr) minmax(21rem, 0.86fr);
    }

    .profile-hero-copy h1 {
        font-size: clamp(4.75rem, 8.5vw, 7.5rem);
    }
}

@media (max-width: 900px) {
    .member-detail-main {
        --profile-navbar-height: var(--navbar-height-mobile);
    }

    .profile-hero-stage {
        grid-template-columns: 1fr;
        grid-template-rows: auto minmax(0, 1fr) auto;
        grid-template-areas:
            'copy'
            'visual'
            'meta';
    }

    .profile-hero-copy {
        min-height: 0;
        padding: var(--space-10) var(--page-padding) var(--space-6);
    }

    .profile-visual {
        min-height: 0;
    }

    .profile-quote {
        grid-area: visual;
        align-self: stretch;
        display: flex;
        align-items: flex-end;
        max-width: none;
        padding: var(--space-14) var(--page-padding) var(--space-7)
            calc(var(--page-padding) + var(--space-6));
        background: linear-gradient(180deg, transparent 48%, rgba(10, 10, 10, 0.56) 100%);
        color: var(--color-white);
        text-shadow: 0 0.15rem 1.1rem rgba(10, 10, 10, 0.72);
        pointer-events: none;
    }

    .profile-quote::before {
        top: auto;
        bottom: var(--space-7);
        left: var(--page-padding);
        height: 1.8em;
        background: var(--color-yellow);
    }

    .profile-hero-meta {
        margin: 0;
        padding: var(--space-5) var(--page-padding) var(--space-6);
    }

    .profile-fact-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .profile-bio {
        max-width: 100%;
    }
}

@media (max-width: 620px) {
    .member-detail-main {
        --profile-pagination-height: 4rem;
    }

    .profile-hero-stage {
        grid-template-rows: auto auto minmax(0, 1fr);
        grid-template-areas:
            'meta'
            'copy'
            'visual';
    }

    .profile-hero-copy {
        min-height: 0;
        padding: var(--space-3) var(--page-padding-mobile) var(--space-5);
    }

    .profile-hero-copy h1 {
        width: 100%;
        max-width: none;
        font-size: var(--profile-mobile-name-size, clamp(3.5rem, 16vw, 4.75rem));
        line-height: 1.04;
        text-wrap: nowrap;
        white-space: nowrap;
    }

    .profile-hero-copy h1 span {
        display: inline;
    }

    .profile-hero-copy h1 span + span {
        margin-top: 0;
        margin-left: 0.2em;
    }

    .profile-quote {
        margin: 0;
        padding: var(--space-12) var(--page-padding-mobile) var(--space-6)
            calc(var(--page-padding-mobile) + var(--space-5));
        font-size: clamp(var(--text-base), 5vw, var(--text-xl));
    }

    .profile-quote::before {
        bottom: var(--space-6);
        left: var(--page-padding-mobile);
    }

    .profile-hero-meta {
        justify-content: center;
        padding: var(--space-5) var(--page-padding-mobile) var(--space-3);
    }

    .profile-social-links {
        width: 100%;
        justify-content: center;
        gap: var(--space-4);
    }

    .profile-social-links a {
        width: 2rem;
    }

    .profile-portrait img {
        width: min(94%, 25rem);
        max-height: 100%;
    }

    .profile-portrait img.is-full-width {
        width: 100%;
    }

    .profile-fact-strip {
        grid-template-columns: 1fr;
    }

    .profile-fact {
        min-height: 0;
        padding: var(--space-5);
    }

    .profile-fact::before {
        top: 1.4rem;
        left: var(--space-4);
    }

    .profile-fact dt,
    .profile-fact dd {
        padding-left: var(--space-3);
    }

    .profile-fact dd {
        font-size: var(--text-lg);
    }

    .profile-detail-inner {
        padding-top: var(--space-12);
        padding-bottom: var(--space-13);
    }

    .profile-detail-heading h2 {
        font-size: clamp(var(--text-2xl), 9vw, var(--text-3xl));
    }

    .profile-bio p,
    .profile-bio li {
        font-size: var(--text-base);
        line-height: 1.62;
    }

    .profile-pagination {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .profile-pagination-link {
        min-height: 4rem;
        justify-content: center;
        padding: var(--space-3);
        font-size: 1.25rem;
        line-height: var(--line-height-tight);
        text-align: center;
    }

    .profile-pagination-link + .profile-pagination-link {
        border-top: 0;
        border-left: var(--border-width-sm) solid var(--color-primary-dark);
    }
}

@media (prefers-reduced-motion: reduce) {
    .profile-social-links a,
    .profile-pagination-link {
        transition: none;
    }
}
