/* ArchiveBio v2 UI/UX layer ------------------------------------------------ */
:root {
    --ab-primary-strong: #064e3b;
    --ab-surface-soft: #f8fafc;
    --ab-surface-raised: #ffffff;
    --ab-text-soft: #334155;
    --ab-focus: #10b981;
    --ab-radius-sm: 10px;
    --ab-radius-md: 14px;
    --ab-radius-lg: 20px;
    --ab-radius-xl: 26px;
    --ab-shadow-xs: 0 1px 2px rgba(15, 23, 42, .04);
    --ab-shadow-sm: 0 8px 24px rgba(15, 23, 42, .055);
    --ab-shadow-md: 0 20px 50px rgba(15, 23, 42, .09);
    --ab-space-1: 4px;
    --ab-space-2: 8px;
    --ab-space-3: 12px;
    --ab-space-4: 16px;
    --ab-space-5: 20px;
    --ab-space-6: 24px;
    --ab-space-8: 32px;
    --ab-space-10: 40px;
    --ab-space-12: 48px;
    --ab-space-16: 64px;
    --ab-fs-xs: .75rem;
    --ab-fs-sm: .875rem;
    --ab-fs-base: 1rem;
    --ab-fs-md: 1.0625rem;
    --ab-fs-lg: 1.125rem;
    --ab-fs-xl: 1.25rem;
    --ab-fs-2xl: clamp(1.375rem, 1.25rem + .5vw, 1.75rem);
    --ab-fs-3xl: clamp(1.75rem, 1.45rem + 1.15vw, 2.35rem);
    --ab-fs-4xl: clamp(2.1rem, 1.55rem + 2.4vw, 3.55rem);
    --ab-header-height: 76px;
    --ab-mobile-nav-height: 68px;
}

.archivebio-site {
    background: var(--ab-background);
    color: var(--ab-text);
    font-size: var(--ab-font-size-base);
    line-height: 1.85;
}

.archivebio-site *,
.archivebio-site *::before,
.archivebio-site *::after { box-sizing: border-box; }

.archivebio-site ::selection {
    color: var(--ab-primary-strong);
    background: color-mix(in srgb, var(--ab-primary) 22%, white);
}

.archivebio-site :focus-visible {
    outline: 3px solid color-mix(in srgb, var(--ab-focus) 55%, transparent);
    outline-offset: 3px;
}

.archivebio-site a,
.archivebio-site button,
.archivebio-site input,
.archivebio-site select,
.archivebio-site textarea { -webkit-tap-highlight-color: transparent; }

.archivebio-site button,
.archivebio-site input,
.archivebio-site select,
.archivebio-site textarea { font-family: var(--ab-font); }

.ab-container { width: min(calc(100% - 40px), var(--ab-container)); }
.ab-main { min-height: 68vh; }

/* Header ------------------------------------------------------------------ */
.ab-header {
    min-height: var(--ab-header-height);
    background: color-mix(in srgb, var(--ab-surface) 96%, transparent);
    border-color: color-mix(in srgb, var(--ab-border) 86%, transparent);
    backdrop-filter: blur(14px) saturate(135%);
    -webkit-backdrop-filter: blur(14px) saturate(135%);
}

.ab-header__inner {
    min-height: var(--ab-header-height);
    grid-template-columns: auto minmax(260px, 430px) minmax(0, 1fr);
    gap: var(--ab-space-6);
}

.ab-brand { gap: 11px; font-weight: 800; }
.ab-brand__mark {
    width: 40px;
    height: 40px;
    border-radius: 13px;
    font-size: var(--ab-fs-lg);
    font-weight: 800;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.2), 0 5px 16px rgba(4,120,87,.18);
}
.ab-brand__text { font-size: var(--ab-fs-md); letter-spacing: -.01em; }

.ab-header-search {
    min-height: 46px;
    border-radius: var(--ab-radius-md);
    border-color: color-mix(in srgb, var(--ab-border) 85%, var(--ab-text) 15%);
    box-shadow: var(--ab-shadow-xs);
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.ab-header-search:focus-within {
    border-color: color-mix(in srgb, var(--ab-primary) 65%, var(--ab-border));
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--ab-primary) 10%, transparent);
}
.ab-header-search input { padding: 10px 14px; font-size: var(--ab-fs-sm); }
.ab-header-search button {
    min-width: 74px;
    padding-inline: 16px;
    border-radius: 11px 0 0 11px;
    font-size: var(--ab-fs-sm);
    font-weight: 700;
}

.ab-desktop-nav { gap: 22px; color: var(--ab-text-soft); font-size: var(--ab-fs-sm); font-weight: 600; }
.ab-desktop-nav a,
.ab-nav-button { position: relative; min-height: 44px; display: inline-flex; align-items: center; }
.ab-desktop-nav a::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 5px;
    width: 0;
    height: 2px;
    border-radius: 999px;
    background: var(--ab-primary);
    transition: width .16s ease;
}
.ab-desktop-nav a:hover::after { width: 100%; }
.ab-nav-button { font-weight: 600; }

/* Hero and page heads ------------------------------------------------------ */
.ab-hero,
.ab-page-hero,
.ab-person-hero,
.ab-news-single__header {
    background:
        radial-gradient(circle at 82% 10%, color-mix(in srgb, var(--ab-primary) 10%, transparent), transparent 32%),
        linear-gradient(180deg, color-mix(in srgb, var(--ab-primary-light) 78%, white), var(--ab-background));
}

.ab-hero { padding: clamp(52px, 7vw, 88px) 0 clamp(44px, 6vw, 68px); }
.ab-hero__inner { gap: 30px; }
.ab-hero__copy { max-width: 840px; }
.ab-eyebrow {
    margin-bottom: 8px;
    color: var(--ab-primary);
    font-size: var(--ab-fs-xs);
    font-weight: 800;
    line-height: 1.5;
    letter-spacing: 0;
}
.ab-hero h1,
.ab-page-hero h1,
.ab-person-hero h1,
.ab-news-single__header h1 {
    color: var(--ab-text);
    font-weight: 800;
    letter-spacing: -.035em;
}
.ab-hero h1 { max-width: 920px; font-size: var(--ab-fs-4xl); line-height: 1.32; }
.ab-hero__copy p {
    max-width: 750px;
    margin-top: 18px;
    color: var(--ab-text-soft);
    font-size: var(--ab-fs-md);
    line-height: 1.95;
}

.ab-hero-search {
    width: min(100%, 800px);
    padding: 16px;
    border-radius: var(--ab-radius-xl);
    border-color: color-mix(in srgb, var(--ab-border) 82%, var(--ab-primary) 18%);
    box-shadow: var(--ab-shadow-md);
}
.ab-hero-search label { margin-bottom: 9px; font-size: var(--ab-fs-sm); font-weight: 700; }
.ab-hero-search__row { gap: 10px; }
.ab-hero-search input,
.ab-directory-search input {
    min-height: 50px;
    padding: 11px 15px;
    border-radius: var(--ab-radius-md);
    font-size: var(--ab-fs-base);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.ab-hero-search input:focus,
.ab-directory-search input:focus {
    border-color: var(--ab-primary);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--ab-primary) 10%, transparent);
    outline: 0;
}
.ab-hero-search button,
.ab-directory-search button,
.ab-button {
    min-height: 48px;
    padding: 10px 22px;
    border-radius: var(--ab-radius-md);
    font-size: var(--ab-fs-sm);
    font-weight: 700;
    box-shadow: 0 5px 14px rgba(4,120,87,.13);
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.ab-hero-search button:hover,
.ab-directory-search button:hover,
.ab-button:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(4,120,87,.18); }
.ab-hero-search small { margin-top: 10px; font-size: var(--ab-fs-xs); line-height: 1.75; }

.ab-chip-row { gap: 10px; }
.ab-chip-row a {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: var(--ab-fs-sm);
    font-weight: 600;
    transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.ab-chip-row a:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--ab-primary) 50%, var(--ab-border)); }

.ab-page-hero { padding: clamp(38px, 5vw, 58px) 0; }
.ab-page-hero--compact h1 { font-size: var(--ab-fs-3xl); }
.ab-page-hero p { font-size: var(--ab-fs-base); line-height: 1.9; }
.ab-breadcrumb { gap: 8px; margin-bottom: 20px; font-size: var(--ab-fs-xs); line-height: 1.7; }

/* Sections and cards ------------------------------------------------------- */
.ab-section { padding: clamp(44px, 5vw, 64px) 0; }
.ab-section--muted { background: color-mix(in srgb, var(--ab-background) 78%, #eef2f7); }
.ab-section__heading { align-items: flex-end; margin-bottom: 24px; }
.ab-section__heading h2,
.ab-section-title h2 { font-size: var(--ab-fs-2xl); line-height: 1.45; font-weight: 800; letter-spacing: -.018em; }
.ab-section__heading > a { min-height: 40px; display: inline-flex; align-items: center; font-size: var(--ab-fs-sm); font-weight: 700; }

.ab-person-grid { gap: 20px; }
.ab-person-card {
    border-radius: var(--ab-radius-lg);
    border-color: color-mix(in srgb, var(--ab-border) 92%, transparent);
    box-shadow: var(--ab-shadow-xs);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.ab-person-card:hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--ab-primary) 22%, var(--ab-border));
    box-shadow: var(--ab-shadow-sm);
}
.ab-person-card__media { background: #e9eef3; }
.ab-person-card__body { padding: 16px 16px 17px; }
.ab-person-card__meta { min-height: 22px; font-size: var(--ab-fs-xs); line-height: 1.6; }
.ab-person-card h3 { margin-top: 7px; font-size: var(--ab-fs-md); line-height: 1.55; font-weight: 750; }
.ab-person-card__english { margin-top: 2px; font-size: var(--ab-fs-xs); line-height: 1.55; }
.ab-person-card__excerpt { margin-top: 10px; font-size: var(--ab-fs-sm); line-height: 1.85; }
.ab-text-link { margin-top: 12px; font-size: var(--ab-fs-sm); font-weight: 700; }

.ab-methodology-callout {
    padding: clamp(24px, 4vw, 36px);
    border-radius: var(--ab-radius-xl);
    box-shadow: var(--ab-shadow-xs);
}
.ab-methodology-callout h2 { font-size: var(--ab-fs-2xl); line-height: 1.45; font-weight: 800; }
.ab-methodology-callout p { font-size: var(--ab-fs-base); line-height: 1.95; }

/* Person page -------------------------------------------------------------- */
.ab-person-hero { padding: clamp(32px, 5vw, 52px) 0; }
.ab-person-hero__grid { grid-template-columns: 264px minmax(0, 1fr); gap: clamp(28px, 4vw, 48px); }
.ab-person-hero__media {
    border-width: 4px;
    border-radius: var(--ab-radius-xl);
    box-shadow: var(--ab-shadow-md);
}
.ab-person-hero h1 { font-size: var(--ab-fs-4xl); line-height: 1.32; }
.ab-person-hero__english { margin: 5px 0 16px; font-size: var(--ab-fs-md); line-height: 1.6; }
.ab-person-summary { gap: 8px; }
.ab-person-summary span {
    min-height: 38px;
    padding: 6px 11px;
    font-size: var(--ab-fs-sm);
    border-color: color-mix(in srgb, var(--ab-primary) 16%, var(--ab-border));
    background: color-mix(in srgb, var(--ab-surface) 88%, transparent);
}
.ab-person-summary b { font-weight: 700; }
.ab-person-hero__lead { max-width: var(--ab-reading-width); font-size: var(--ab-fs-base); line-height: 1.95; color: var(--ab-text-soft); }

.ab-person-layout { grid-template-columns: minmax(0, 1fr) 280px; gap: 34px; padding-top: 44px; padding-bottom: 72px; }
.ab-content-section {
    margin-bottom: 22px;
    padding: clamp(22px, 3vw, 32px);
    border-radius: var(--ab-radius-lg);
    border-color: color-mix(in srgb, var(--ab-border) 94%, transparent);
    box-shadow: var(--ab-shadow-xs);
}
.ab-section-title { margin-bottom: 18px; }
.ab-facts-grid { border-radius: var(--ab-radius-md); }
.ab-facts-grid > div { min-height: 54px; padding: 12px 15px; align-items: center; }
.ab-facts-grid dt { font-size: var(--ab-fs-sm); line-height: 1.7; }
.ab-facts-grid dd { font-size: var(--ab-fs-sm); line-height: 1.75; font-weight: 650; }

.ab-prose {
    max-width: var(--ab-reading-width);
    font-size: var(--ab-font-size-base);
    line-height: 2.05;
    color: var(--ab-text);
}
.ab-prose p { margin: 0 0 1.25em; }
.ab-prose li { margin-block: .35em; }
.ab-prose h2 { font-size: var(--ab-fs-2xl); font-weight: 800; }
.ab-prose h3 { font-size: var(--ab-fs-xl); font-weight: 750; }
.ab-prose h2,
.ab-prose h3 { margin-top: 1.9em; margin-bottom: .7em; line-height: 1.55; }
.ab-prose a { text-decoration-thickness: 1px; text-underline-offset: 4px; }

.ab-work-group { padding: 18px; border-radius: var(--ab-radius-md); }
.ab-work-group h3 { font-size: var(--ab-fs-base); font-weight: 750; }
.ab-clean-list { line-height: 1.95; }
.ab-social-grid a { min-height: 48px; padding: 11px 14px; border-radius: var(--ab-radius-md); font-size: var(--ab-fs-sm); }
.ab-gallery { gap: 12px; }
.ab-gallery img { border-radius: var(--ab-radius-md); }

.ab-sidebar-card {
    gap: 2px;
    padding: 14px;
    border-radius: var(--ab-radius-lg);
    box-shadow: var(--ab-shadow-xs);
}
.ab-sidebar-card strong { padding: 6px 9px 10px; font-size: var(--ab-fs-sm); }
.ab-sidebar-card a { min-height: 38px; display: flex; align-items: center; padding: 7px 9px; font-size: var(--ab-fs-sm); line-height: 1.5; }

/* Search, filters, forms --------------------------------------------------- */
.ab-search-suggestions {
    padding: 8px;
    border-radius: var(--ab-radius-md);
    box-shadow: var(--ab-shadow-md);
}
.ab-search-suggestion { min-height: 62px; border-radius: var(--ab-radius-sm); }
.ab-search-suggestion__text strong { font-size: var(--ab-fs-sm); font-weight: 700; }
.ab-search-suggestion__text small { font-size: var(--ab-fs-xs); }

.ab-filter-form {
    padding: 20px;
    border-radius: var(--ab-radius-lg);
    box-shadow: var(--ab-shadow-xs);
}
.ab-filter-form__primary,
.ab-filter-advanced__grid { gap: 14px; }
.ab-field { gap: 7px; }
.ab-field label { font-size: var(--ab-fs-xs); line-height: 1.6; font-weight: 700; }
.ab-field input,
.ab-field select,
.ab-form-grid .ab-field input,
.ab-form-grid .ab-field textarea {
    min-height: 46px;
    padding: 9px 12px;
    border-radius: var(--ab-radius-sm);
    font-size: var(--ab-fs-sm);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.ab-field input:focus,
.ab-field select:focus,
.ab-form-grid .ab-field input:focus,
.ab-form-grid .ab-field textarea:focus {
    outline: 0;
    border-color: var(--ab-primary);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--ab-primary) 10%, transparent);
}
.ab-filter-actions { gap: 10px; margin-top: 18px; }
.ab-button--ghost { box-shadow: none; }

/* Relationships, sources, Works, FAQ -------------------------------------- */
.ab-relationship-list__item { min-height: 52px; padding: 13px 0; }
.ab-relationship-list dt,
.ab-relationship-list dd { font-size: var(--ab-fs-sm); }
.ab-source-list li { padding: 15px 0; }
.ab-source-list__main { line-height: 1.7; }
.ab-source-list__main span { font-size: var(--ab-fs-xs); }
.ab-source-list__meta { margin-top: 7px; font-size: var(--ab-fs-xs); }
.ab-work-list li { padding: 14px 0; }
.ab-work-list__main { line-height: 1.7; }
.ab-work-list__meta { font-size: var(--ab-fs-xs); }
.ab-faq-list { gap: 10px; }
.ab-faq-item { border-radius: var(--ab-radius-md); }
.ab-faq-item summary { min-height: 52px; padding: 14px 17px; font-size: var(--ab-fs-base); line-height: 1.75; font-weight: 700; }

/* News -------------------------------------------------------------------- */
.ab-news-grid { gap: 22px; }
.ab-news-card {
    border-radius: var(--ab-radius-lg);
    box-shadow: var(--ab-shadow-xs);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.ab-news-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--ab-primary) 20%, var(--ab-border)); box-shadow: var(--ab-shadow-sm); }
.ab-news-card__body { gap: 11px; padding: 17px; }
.ab-news-card__body h2 { font-size: var(--ab-fs-md); line-height: 1.75; font-weight: 750; }
.ab-news-card__body p { font-size: var(--ab-fs-sm); line-height: 1.9; }
.ab-news-card__meta { font-size: var(--ab-fs-xs); }
.ab-news-single__header h1 { font-size: var(--ab-fs-4xl); line-height: 1.45; }
.ab-news-single__lead { max-width: var(--ab-reading-width); font-size: var(--ab-fs-md); line-height: 2; }
.ab-news-single__layout { max-width: calc(var(--ab-reading-width) + 80px); }

/* Footer ------------------------------------------------------------------ */
.ab-footer { padding-top: 56px; background: #0b1324; }
.ab-footer__grid { gap: 40px; }
.ab-footer__brand strong { font-size: var(--ab-fs-xl); font-weight: 800; }
.ab-footer__logo-link { display: inline-flex; max-width: 100%; }
.archivebio-site .ab-footer__logo { display: block; width: var(--ab-logo-width); height: var(--ab-logo-height); max-width: 100%; object-fit: contain; object-position: right center; }
.ab-footer__brand p { font-size: var(--ab-fs-sm); line-height: 1.9; }
.ab-footer h2 { font-size: var(--ab-fs-sm); font-weight: 750; }
.ab-footer a { min-height: 34px; padding: 4px 0; font-size: var(--ab-fs-sm); line-height: 1.65; }
.ab-footer__bottom { font-size: var(--ab-fs-xs); }

/* Mobile navigation / sheet ----------------------------------------------- */
.ab-sheet__panel { border-radius: var(--ab-radius-xl) var(--ab-radius-xl) 0 0; }
.ab-sheet__header h2 { font-size: var(--ab-fs-lg); font-weight: 800; }
.ab-sheet__close { min-width: 44px; min-height: 44px; }
.ab-sheet__grid a { min-height: 50px; display: grid; place-items: center; padding: 11px; border-radius: var(--ab-radius-md); font-size: var(--ab-fs-sm); }

/* Responsive --------------------------------------------------------------- */
@media (max-width: 1120px) {
    .ab-header__inner { grid-template-columns: auto minmax(260px, 1fr); }
    .ab-header-search { width: min(100%, 520px); justify-self: end; }
    .ab-desktop-nav { display: none; }
    .ab-person-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
    .ab-container { width: min(calc(100% - 30px), var(--ab-container)); }
    .ab-person-hero__grid { grid-template-columns: 180px minmax(0, 1fr); gap: 24px; }
    .ab-person-layout { grid-template-columns: 1fr; }
    .ab-person-sidebar { display: none; }
    .ab-news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 782px) {
    .ab-header__inner { min-height: 68px; gap: 10px; }
    .ab-header-search { min-height: 44px; }
    .ab-brand__mark { width: 38px; height: 38px; }
    .ab-person-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
    .ab-mobile-nav {
        padding-top: 6px;
        background: color-mix(in srgb, var(--ab-surface) 97%, transparent);
        backdrop-filter: blur(14px) saturate(130%);
        -webkit-backdrop-filter: blur(14px) saturate(130%);
    }
    .ab-mobile-nav a,
    .ab-mobile-nav button { min-height: 54px; font-size: .72rem; font-weight: 600; }
}

@media (max-width: 620px) {
    .ab-container { width: min(calc(100% - 24px), var(--ab-container)); }
    .ab-hero { padding-top: 42px; }
    .ab-hero h1 { font-size: clamp(2rem, 9vw, 2.8rem); }
    .ab-hero__copy p { font-size: 1rem; line-height: 1.9; }
    .ab-hero-search { padding: 13px; border-radius: 19px; }
    .ab-hero-search__row,
    .ab-directory-search > div { display: grid; grid-template-columns: 1fr; }
    .ab-hero-search button,
    .ab-directory-search button { width: 100%; }
    .ab-section { padding: 40px 0; }
    .ab-section__heading { align-items: center; gap: 10px; }
    .ab-section__heading h2,
    .ab-section-title h2 { font-size: clamp(1.3rem, 5vw, 1.55rem); }
    .ab-person-card__body { padding: 12px; }
    .ab-person-card h3 { font-size: .98rem; }
    .ab-person-card__english { font-size: .72rem; }
    .ab-person-card__meta { font-size: .69rem; }
    .ab-person-card__excerpt { display: none; }
    .ab-person-hero { padding: 25px 0 30px; }
    .ab-person-hero__grid { grid-template-columns: 112px minmax(0, 1fr); gap: 14px; align-items: start; }
    .ab-person-hero h1 { font-size: clamp(1.65rem, 7vw, 2.2rem); }
    .ab-person-hero__english { margin-bottom: 9px; font-size: .82rem; }
    .ab-person-summary span { min-height: 32px; padding: 4px 8px; font-size: .72rem; }
    .ab-person-hero__lead { grid-column: 1 / -1; font-size: .95rem; }
    .ab-content-section { padding: 19px; border-radius: var(--ab-radius-md); }
    .ab-prose { font-size: 1rem; line-height: 2; }
    .ab-facts-grid { grid-template-columns: 1fr; }
    .ab-facts-grid > div:nth-child(odd) { border-left: 0; }
    .ab-social-grid,
    .ab-gallery,
    .ab-work-groups { grid-template-columns: 1fr; }
    .ab-news-grid,
    .ab-news-grid--compact { grid-template-columns: 1fr; }
    .ab-methodology-callout { gap: 18px; }
    .ab-sheet__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 390px) {
    .ab-header-search button { min-width: 60px; padding-inline: 10px; font-size: .75rem; }
    .ab-person-card__body { padding-inline: 10px; }
    .ab-person-card__meta { min-height: 19px; }
}

@media (prefers-reduced-motion: reduce) {
    .archivebio-site *,
    .archivebio-site *::before,
    .archivebio-site *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
