@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Lora:ital,wght@0,400;0,500;0,600;1,400&display=swap');

/* ===================================================================
   MeDoraH — Global & Landing Page Styles
   =================================================================== */
:root {
    --font-primary: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-secondary: 'Lora', 'Charter', Georgia, Cambria, serif;

    /* Colors - Anthropic-inspired palette matching landing pages */
    --color-bg: #F7F5F2;
    --color-bg-card: #FFFFFF;
    --color-text-primary: #1A1A1A;
    --color-text-secondary: #4A4A4A;
    --color-text-muted: #6B6B6B;
    --color-accent-purple: #983BFE;
    --color-accent-blue: #4A5568;
    --color-border: #E5E5E5;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-bg);
    color: var(--color-text-primary);
    scroll-behavior: smooth;
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3 {
    color: var(--color-text-primary);
}

.page-title {
    margin-bottom: 0.5rem;
    color: var(--color-text-primary);
}

body .block-html:first-of-type {
    margin-top: 0;
    padding-top: 0;
}

section {
    margin-bottom: 5rem;
}

img.rounded-profile {
    width: 96px;
    height: 96px;
    aspect-ratio: 1;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    display: block;
    margin-bottom: 1rem;
}

.zoom-in-profile {
    object-position: center 20%;
}

.profile-card {
    background-color: var(--color-bg-card);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
    border: 1px solid var(--color-border);
    width: 100%;
    max-width: 360px;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}

.profile-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    justify-items: center;
}


/* ===================================================================
   MeDoraH — Item / Interview Metadata Page  (body.item.resource.show)
   Design language: Editorial Repository (IBM Plex & Instrument Serif)
   =================================================================== */

body.item.resource.show {
    background: var(--color-bg);
}

/* ---------- Main content container ---------- */
body.item.resource.show #main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 4rem 1.5rem 6rem;
}

/* ---------- Hero title bar ---------- */
body.item.resource.show #main-content>h1 {
    font-family: var(--font-secondary);
    background: transparent;
    color: var(--color-text-primary);
    padding: 0 0 1.5rem 0;
    margin: 0 0 2rem 0;
    max-width: 1400px;
    border: none !important;
    border-left: none !important;
    border-inline-start: none !important;
    box-shadow: none !important;
    font-weight: 400;
    font-size: 4.2rem;
    line-height: 1.05;
    letter-spacing: -0.02em;
    text-align: left;
    position: relative;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
}

/* Force override any pseudo elements from global theme */
body.item.resource.show #main-content>h1::before,
body.item.resource.show #main-content>h1 .title::before,
body.item.resource.show #main-content>h1 .title::after {
    display: none !important;
    content: none !important;
    background: transparent !important;
    width: 0 !important;
}

/* Subtle accent line under the title, matching landing page section borders */
body.item.resource.show #main-content>h1::after {
    content: '' !important;
    display: block !important;
    position: absolute !important;
    bottom: -1px !important;
    left: 0 !important;
    width: 80px !important;
    height: 2px !important;
    background: var(--color-text-primary) !important;
}

body.item.resource.show #main-content>h1 .title {
    color: var(--color-text-primary);
    border: none !important;
    border-left: none !important;
    border-inline-start: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
}

/* ---------- UI Cards (Metadata, Media) ---------- */
body.item.resource.show .metadata {
    background: var(--color-bg-card);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.08);
    margin-top: 2rem;
    overflow: hidden;
    padding: 1rem 3rem;
}

/* ---------- Each property row ---------- */
body.item.resource.show .metadata dl {
    margin: 0;
}

body.item.resource.show .metadata .property {
    display: flex;
    align-items: flex-start;
    gap: 4rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    border-left: none;
    background: transparent;
    transition: background-color 0.3s ease;
}

body.item.resource.show .metadata .property:last-child {
    border-bottom: none;
}

/* Remove hover backgrounds entirely for a clean, editorial data table look */
body.item.resource.show .metadata .property:hover {
    background: transparent;
}

/* ---------- Labels (dt / h4) ---------- */
body.item.resource.show .metadata .property dt,
body.item.resource.show .metadata .property h4 {
    flex: 0 0 200px;
    font-weight: 600;
    font-size: 1.1rem;
    text-transform: capitalize;
    letter-spacing: 0.01em;
    color: var(--color-text-muted);
    padding-top: 0.35rem;
    line-height: 1.5;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ---------- Documentation link button ---------- */
body.item.resource.show .metadata-doc-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    min-width: 24px;
    border-radius: 4px;
    background: transparent;
    color: rgba(0, 0, 0, 0.25);
    text-decoration: none;
    border: none;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

body.item.resource.show .metadata-doc-link:hover {
    background: rgba(0, 0, 0, 0.04);
    color: var(--color-text-primary);
}

body.item.resource.show .metadata-doc-link svg {
    width: 14px;
    height: 14px;
}

/* ---------- Values (dd) ---------- */
body.item.resource.show .metadata .property dd,
body.item.resource.show .metadata .property .values,
body.item.resource.show dl.item-sets dd {
    flex: 1;
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.65;
    color: var(--color-text-primary);
    font-weight: 400;
}

body.item.resource.show .metadata .property dd .value-content {
    display: inline;
    word-break: break-word;
}

/* ---------- Elegant Links inside values ---------- */
body.item.resource.show .metadata .property dd a,
body.item.resource.show .metadata .property dd a.resource-link,
body.item.resource.show .metadata .property dd a.uri-value-link,
body.item.resource.show .metadata .property .values a,
body.item.resource.show .media-render a {
    color: var(--color-text-primary);
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
}

body.item.resource.show .metadata .property dd a:hover,
body.item.resource.show .metadata .property .values a:hover,
body.item.resource.show .media-render a:hover {
    color: #000000;
    border-bottom-color: var(--color-text-primary);
}

/* ---------- Resource thumbnail inside values ---------- */
body.item.resource.show .metadata .property dd img,
body.item.resource.show .metadata .property .values img {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    vertical-align: middle;
    margin-right: 0.75rem;
    opacity: 0.85;
    transition: opacity 0.3s ease;
    border: 1px solid var(--color-border);
}

body.item.resource.show .metadata .property dd img:hover,
body.item.resource.show .metadata .property .values img:hover {
    opacity: 1;
}

/* ---------- Media Player Container Optimization ---------- */
body.item.resource.show .media-render {
    position: relative;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    border: none;
    margin-top: 3rem;
    margin-bottom: 2rem;
    padding: 0;
    overflow: visible;
}

body.item.resource.show .media-render::before {
    content: "RECORDING";
    display: inline-block;
    position: relative;
    top: 0;
    left: 0;
    margin-bottom: 1rem;
    background: #333333;
    padding: 0.35rem 0.85rem;
    font-family: var(--font-primary);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #ffffff;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* ---------- Audio player Enhanced Styles ---------- */
body.item.resource.show audio,
body.item.resource.show .media-render audio {
    width: 100%;
    height: 56px;
    border-radius: 8px;
    background: var(--color-bg);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.06);
    outline: none;
    transition: all 0.2s ease;
}

body.item.resource.show audio:hover {
    border-color: rgba(0, 0, 0, 0.15);
}

body.item.resource.show audio::-webkit-media-controls-panel {
    background-color: var(--color-bg);
    border-radius: 8px;
}

/* ===================================================================
   System Metadata (Item Sets, Media List, Linked Resources)
   =================================================================== */

body.item.resource.show dl.item-sets,
body.item.resource.show .media-list,
body.item.resource.show .linked-resources,
body.item.resource.show .item-linked {
    background: transparent;
    border: none;
    box-shadow: none;
    margin-top: 4rem;
    padding: 2rem 0 0 0;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
}

body.item.resource.show dl.item-sets dt,
body.item.resource.show .media-list h3,
body.item.resource.show .media-list h4,
body.item.resource.show .linked-resources h4 {
    flex: none;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-muted);
    margin: 0;
    padding: 0;
}

body.item.resource.show dl.item-sets dd {
    margin: 0;
}

/* Tags / Pills for System Links */
body.item.resource.show dl.item-sets a,
body.item.resource.show .media-list a,
body.item.resource.show .linked-resources a,
body.item.resource.show .item-linked a {
    background: #ffffff;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    text-decoration: none;
    color: var(--color-text-primary);
    font-weight: 500;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
    transition: all 0.2s ease;
}

body.item.resource.show dl.item-sets a:hover,
body.item.resource.show .media-list a:hover,
body.item.resource.show .linked-resources a:hover,
body.item.resource.show .item-linked a:hover {
    background: rgba(0, 0, 0, 0.02);
    color: #000000;
    border-color: rgba(0, 0, 0, 0.15);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

body.item.resource.show .media-list img {
    width: 18px;
    height: 18px;
    opacity: 0.7;
    vertical-align: middle;
    margin-right: 0.5rem;
}

body.item.resource.show .regions-container {
    padding-top: 1rem;
}

/* ---------- Responsive adjustments ---------- */
@media (max-width: 768px) {
    body.item.resource.show #main-content {
        padding: 2rem 1.5rem 4rem;
    }

    body.item.resource.show #main-content>h1 {
        font-size: 2.5rem;
        padding-bottom: 1rem;
    }

    body.item.resource.show .metadata .property {
        flex-direction: column;
        gap: 0.5rem;
        padding: 1rem 0;
    }

    body.item.resource.show .metadata .property dt,
    body.item.resource.show .metadata .property h4 {
        flex: none;
        font-size: 0.75rem;
    }

    body.item.resource.show .metadata {
        padding: 1.5rem;
    }

    body.item.resource.show .media-render {
        padding: 0;
        margin-top: 2rem;
    }
}

/* ---------- Smooth entrance animations ---------- */
body.item.resource.show #main-content>h1 {
    animation: fadeSlideUp 0.6s ease-out both;
}

body.item.resource.show .metadata {
    animation: fadeSlideUp 0.6s ease-out 0.1s both;
}

body.item.resource.show .media-render {
    animation: fadeSlideUp 0.6s ease-out 0.2s both;
}

body.item.resource.show dl.item-sets {
    animation: fadeSlideUp 0.6s ease-out 0.3s both;
}

body.item.resource.show .media-list {
    animation: fadeSlideUp 0.6s ease-out 0.4s both;
}

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------- Print styles ---------- */
@media print {
    body.item.resource.show {
        background: #ffffff;
    }

    body.item.resource.show #main-content {
        padding: 0;
    }

    body.item.resource.show .metadata,
    body.item.resource.show dl.item-sets,
    body.item.resource.show .media-render,
    body.item.resource.show .media-list {
        box-shadow: none;
        border: 1px solid #ddd;
        background: transparent;
        page-break-inside: avoid;
    }
}


/* ===================================================================
   MeDoraH — Oral History / Interviews Listing Page
   (body.page.site-page-OralHistory)
   Design language: Editorial Magazine Grid
   =================================================================== */

body.page.site-page-OralHistory {
    background: var(--color-bg);
}

/* ---------- Main content container ---------- */
body.page.site-page-OralHistory #main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 2rem 6rem;
}

/* ---------- Hero page title ---------- */
body.page.site-page-OralHistory .block-pageTitle {
    margin-bottom: 3.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    position: relative;
    animation: fadeSlideUp 0.6s ease-out both;
}

body.page.site-page-OralHistory .block-pageTitle::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 80px;
    height: 2px;
    background: var(--color-text-primary);
}

body.page.site-page-OralHistory .block-pageTitle h2.title {
    font-family: var(--font-secondary);
    font-weight: 400;
    font-size: 3.8rem;
    line-height: 1.08;
    letter-spacing: -0.025em;
    color: var(--color-text-primary);
    margin: 0;
    padding: 0;
}

/* Decorative sub-label under the title */
body.page.site-page-OralHistory .block-pageTitle h2.title::after {
    content: 'Digital Oral History Collection';
    display: block;
    font-family: var(--font-primary);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-text-muted);
    margin-top: 1rem;
}

/* ---------- Browse Preview container ---------- */
body.page.site-page-OralHistory .block-browsePreview {
    animation: fadeSlideUp 0.6s ease-out 0.15s both;
}

/* ---------- Resource Grid (the card layout) ---------- */
body.page.site-page-OralHistory .resources.resource-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

/* ---------- Individual Interview Card ---------- */
body.page.site-page-OralHistory .item.resource {
    background: var(--color-bg-card);
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    transition: all 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

body.page.site-page-OralHistory .item.resource:hover {
    transform: translateY(-6px);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.06),
        0 8px 16px rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.08);
}

/* ---------- Thumbnail area ---------- */
body.page.site-page-OralHistory .resource__thumbnail {
    flex: 0 0 220px;
    margin: 1.5rem 0 1.5rem 1.5rem;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

body.page.site-page-OralHistory .resource__thumbnail a {
    display: block;
    width: 100%;
    height: 100%;
}

body.page.site-page-OralHistory .resource__thumbnail img {
    width: 100%;
    height: 100%;
    min-height: 220px;
    object-fit: cover;
    object-position: center top;
    display: block;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    filter: saturate(0.9);
}

body.page.site-page-OralHistory .item.resource:hover .resource__thumbnail img {
    transform: scale(1.06);
    filter: saturate(1.05);
}

/* Subtle gradient overlay on the image bottom for depth */
body.page.site-page-OralHistory .resource__thumbnail::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.06), transparent);
    pointer-events: none;
    transition: opacity 0.4s ease;
}

body.page.site-page-OralHistory .item.resource:hover .resource__thumbnail::after {
    opacity: 0.5;
}

/* ---------- Content area (interview title) ---------- */
body.page.site-page-OralHistory .resource__content {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 2rem 2.5rem;
    min-height: 200px;
}

body.page.site-page-OralHistory .resource__content a {
    font-family: var(--font-secondary);
    font-size: 1.35rem;
    font-weight: 400;
    line-height: 1.45;
    color: var(--color-text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
    letter-spacing: -0.01em;
    display: block;
    position: relative;
}

body.page.site-page-OralHistory .resource__content a::after {
    content: '→';
    display: inline-block;
    margin-left: 0.5rem;
    opacity: 0;
    transform: translateX(-6px);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: var(--font-primary);
    font-size: 1.1rem;
    color: #5150EE;
}

body.page.site-page-OralHistory .item.resource:hover .resource__content a {
    color: #5150EE;
}

body.page.site-page-OralHistory .item.resource:hover .resource__content a::after {
    opacity: 1;
    transform: translateX(2px);
}

/* ---------- "Browse all" button ---------- */
body.page.site-page-OralHistory .browse-all {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 3.5rem;
    padding: 1rem 2.5rem;
    background: var(--color-text-primary);
    color: #ffffff;
    font-family: var(--font-primary);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-decoration: none;
    border-radius: 100px;
    border: none;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    float: none;
    /* override any theme default float */
}

body.page.site-page-OralHistory .browse-all::after {
    content: '→';
    margin-left: 0.75rem;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    font-size: 1rem;
}

body.page.site-page-OralHistory .browse-all:hover {
    background: #5150EE;
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(81, 80, 238, 0.2);
}

body.page.site-page-OralHistory .browse-all:hover::after {
    transform: translateX(4px);
}

/* Center the browse-all within the preview block */
body.page.site-page-OralHistory .preview-block {
    text-align: center;
}

body.page.site-page-OralHistory .resources.resource-grid {
    text-align: left;
}

/* ---------- Staggered entrance animations for cards ---------- */
body.page.site-page-OralHistory .item.resource {
    animation: fadeSlideUp 0.5s ease-out both;
}

body.page.site-page-OralHistory .item.resource:nth-child(1) {
    animation-delay: 0.1s;
}

body.page.site-page-OralHistory .item.resource:nth-child(2) {
    animation-delay: 0.18s;
}

body.page.site-page-OralHistory .item.resource:nth-child(3) {
    animation-delay: 0.26s;
}

body.page.site-page-OralHistory .item.resource:nth-child(4) {
    animation-delay: 0.34s;
}

body.page.site-page-OralHistory .item.resource:nth-child(5) {
    animation-delay: 0.42s;
}

body.page.site-page-OralHistory .item.resource:nth-child(6) {
    animation-delay: 0.50s;
}

body.page.site-page-OralHistory .item.resource:nth-child(7) {
    animation-delay: 0.58s;
}

body.page.site-page-OralHistory .item.resource:nth-child(8) {
    animation-delay: 0.66s;
}

body.page.site-page-OralHistory .item.resource:nth-child(9) {
    animation-delay: 0.74s;
}

body.page.site-page-OralHistory .item.resource:nth-child(10) {
    animation-delay: 0.82s;
}

body.page.site-page-OralHistory .item.resource:nth-child(11) {
    animation-delay: 0.90s;
}

body.page.site-page-OralHistory .item.resource:nth-child(12) {
    animation-delay: 0.98s;
}

/* ---------- Responsive: tablet ---------- */
@media (max-width: 1024px) {
    body.page.site-page-OralHistory .block-pageTitle h2.title {
        font-size: 2.8rem;
    }

    body.page.site-page-OralHistory .resources.resource-grid {
        gap: 1.5rem;
    }

    body.page.site-page-OralHistory .resource__thumbnail {
        flex: 0 0 180px;
        margin: 1.5rem 0 1.5rem 1.5rem;
    }

    body.page.site-page-OralHistory .resource__content {
        padding: 1.5rem 2rem;
    }

    body.page.site-page-OralHistory .resource__content a {
        font-size: 1.2rem;
    }
}

/* ---------- Responsive: mobile ---------- */
@media (max-width: 768px) {
    body.page.site-page-OralHistory #main-content {
        padding: 2rem 1.25rem 4rem;
    }

    body.page.site-page-OralHistory .block-pageTitle {
        margin-bottom: 2rem;
        padding-bottom: 1.5rem;
    }

    body.page.site-page-OralHistory .block-pageTitle h2.title {
        font-size: 2.2rem;
    }

    body.page.site-page-OralHistory .resources.resource-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    body.page.site-page-OralHistory .item.resource {
        flex-direction: column;
    }

    body.page.site-page-OralHistory .resource__thumbnail {
        flex: none;
        margin: 1.25rem 1.25rem 0 1.25rem;
        height: 220px;
    }

    body.page.site-page-OralHistory .resource__thumbnail img {
        min-height: 220px;
    }

    body.page.site-page-OralHistory .resource__content {
        padding: 1.5rem;
        min-height: auto;
    }

    body.page.site-page-OralHistory .resource__content a {
        font-size: 1.15rem;
    }

    body.page.site-page-OralHistory .browse-all {
        margin-top: 2.5rem;
        width: 100%;
    }
}

/* ===================================================================
   MeDoraH — Browse All Items Page
   (body.item.resource.browse)
   Extends the Editorial Magazine Grid to the browse/search results
   =================================================================== */

body.item.resource.browse {
    background: var(--color-bg);
}

/* ---------- Main content container ---------- */
body.item.resource.browse #main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 2rem 6rem;
}

/* ---------- Page title (h1 "Items") ---------- */
body.item.resource.browse #main-content > h1 {
    font-family: var(--font-secondary);
    font-weight: 400;
    font-size: 3.8rem;
    line-height: 1.08;
    letter-spacing: -0.025em;
    color: var(--color-text-primary);
    margin: 0 0 2rem 0;
    padding: 0 0 2rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    position: relative;
    animation: fadeSlideUp 0.6s ease-out both;
    background: transparent;
    border-left: none;
    border-right: none;
    border-top: none;
}

body.item.resource.browse #main-content > h1::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 80px;
    height: 2px;
    background: var(--color-text-primary);
}

/* ---------- Filter info bar ---------- */
body.item.resource.browse .filter-value {
    display: none !important;
}

/* ---------- Pagination ---------- */
body.item.resource.browse .pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
    font-family: var(--font-primary);
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

body.item.resource.browse .pagination input[type="text"] {
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    width: 60px;
    text-align: center;
    font-family: var(--font-primary);
    transition: border-color 0.2s ease;
}

body.item.resource.browse .pagination input[type="text"]:focus {
    outline: none;
    border-color: #5150EE;
    box-shadow: 0 0 0 3px rgba(81, 80, 238, 0.1);
}

body.item.resource.browse .pagination button,
body.item.resource.browse .pagination .button {
    background: var(--color-text-primary);
    color: #fff;
    border: none;
    border-radius: 100px;
    padding: 0.5rem 1.25rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

body.item.resource.browse .pagination button:hover {
    background: #5150EE;
}

/* ---------- Sort controls ---------- */
body.item.resource.browse .sorting form {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

body.item.resource.browse .sorting select {
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-family: var(--font-primary);
    background: var(--color-bg-card);
    color: var(--color-text-primary);
    transition: border-color 0.2s ease;
    appearance: auto;
}

body.item.resource.browse .sorting select:focus {
    outline: none;
    border-color: #5150EE;
}

body.item.resource.browse .sorting button {
    background: var(--color-text-primary);
    color: #fff;
    border: none;
    border-radius: 100px;
    padding: 0.5rem 1.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

body.item.resource.browse .sorting button:hover {
    background: #5150EE;
}

/* ---------- Resource Grid — override Masonry absolute positioning ---------- */
body.item.resource.browse .resources.resource-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 2rem !important;
    text-align: left;
    height: auto !important;
    position: relative !important;
}

/* ---------- Individual Interview Card ---------- */
body.item.resource.browse .resources .item.resource {
    background: var(--color-bg-card) !important;
    border-radius: 16px !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03) !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    transition: all 0.45s cubic-bezier(0.16, 1, 0.3, 1) !important;
    /* Override Masonry inline styles */
    position: relative !important;
    left: auto !important;
    top: auto !important;
    right: auto !important;
    width: auto !important;
}

body.item.resource.browse .resources .item.resource:hover {
    transform: translateY(-6px) !important;
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.06),
        0 8px 16px rgba(0, 0, 0, 0.04) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}

/* ---------- Thumbnail area ---------- */
body.item.resource.browse .resource__thumbnail {
    flex: 0 0 220px;
    margin: 1.5rem 0 1.5rem 1.5rem;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

body.item.resource.browse .resource__thumbnail a {
    display: block;
    width: 100%;
    height: 100%;
}

body.item.resource.browse .resource__thumbnail img {
    width: 100%;
    height: 100%;
    min-height: 220px;
    object-fit: cover;
    object-position: center top;
    display: block;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    filter: saturate(0.9);
}

body.item.resource.browse .resources .item.resource:hover .resource__thumbnail img {
    transform: scale(1.06);
    filter: saturate(1.05);
}

/* Subtle gradient overlay */
body.item.resource.browse .resource__thumbnail::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.06), transparent);
    pointer-events: none;
    transition: opacity 0.4s ease;
}

body.item.resource.browse .resources .item.resource:hover .resource__thumbnail::after {
    opacity: 0.5;
}

/* ---------- Content area (interview title) ---------- */
body.item.resource.browse .resource__content {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 2rem 2.5rem;
    min-height: 200px;
}

body.item.resource.browse .resource__content a {
    font-family: var(--font-secondary);
    font-size: 1.35rem;
    font-weight: 400;
    line-height: 1.45;
    color: var(--color-text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
    letter-spacing: -0.01em;
    display: block;
    position: relative;
}

body.item.resource.browse .resource__content a::after {
    content: '→';
    display: inline-block;
    margin-left: 0.5rem;
    opacity: 0;
    transform: translateX(-6px);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: var(--font-primary);
    font-size: 1.1rem;
    color: #5150EE;
}

body.item.resource.browse .resources .item.resource:hover .resource__content a {
    color: #5150EE;
}

body.item.resource.browse .resources .item.resource:hover .resource__content a::after {
    opacity: 1;
    transform: translateX(2px);
}

/* ---------- Staggered entrance animations ---------- */
body.item.resource.browse .resources .item.resource {
    animation: fadeSlideUp 0.5s ease-out both;
}

body.item.resource.browse .resources .item.resource:nth-child(1)  { animation-delay: 0.1s; }
body.item.resource.browse .resources .item.resource:nth-child(2)  { animation-delay: 0.18s; }
body.item.resource.browse .resources .item.resource:nth-child(3)  { animation-delay: 0.26s; }
body.item.resource.browse .resources .item.resource:nth-child(4)  { animation-delay: 0.34s; }
body.item.resource.browse .resources .item.resource:nth-child(5)  { animation-delay: 0.42s; }
body.item.resource.browse .resources .item.resource:nth-child(6)  { animation-delay: 0.50s; }
body.item.resource.browse .resources .item.resource:nth-child(7)  { animation-delay: 0.58s; }
body.item.resource.browse .resources .item.resource:nth-child(8)  { animation-delay: 0.66s; }
body.item.resource.browse .resources .item.resource:nth-child(9)  { animation-delay: 0.74s; }
body.item.resource.browse .resources .item.resource:nth-child(10) { animation-delay: 0.82s; }

/* ---------- Responsive: tablet (Browse) ---------- */
@media (max-width: 1024px) {
    body.item.resource.browse #main-content > h1 {
        font-size: 2.8rem;
    }

    body.item.resource.browse .resources.resource-grid {
        gap: 1.5rem !important;
    }

    body.item.resource.browse .resource__thumbnail {
        flex: 0 0 180px;
        margin: 1.5rem 0 1.5rem 1.5rem;
    }

    body.item.resource.browse .resource__content {
        padding: 1.5rem 2rem;
    }

    body.item.resource.browse .resource__content a {
        font-size: 1.2rem;
    }
}

/* ---------- Responsive: mobile (Browse) ---------- */
@media (max-width: 768px) {
    body.item.resource.browse #main-content {
        padding: 2rem 1.25rem 4rem;
    }

    body.item.resource.browse #main-content > h1 {
        font-size: 2.2rem;
    }

    body.item.resource.browse .resources.resource-grid {
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
    }

    body.item.resource.browse .resources .item.resource {
        flex-direction: column !important;
    }

    body.item.resource.browse .resource__thumbnail {
        flex: none;
        margin: 1.25rem 1.25rem 0 1.25rem;
        height: 220px;
    }

    body.item.resource.browse .resource__thumbnail img {
        min-height: 220px;
    }

    body.item.resource.browse .resource__content {
        padding: 1.5rem;
        min-height: auto;
    }

    body.item.resource.browse .resource__content a {
        font-size: 1.15rem;
    }
}


/* ---------- Print ---------- */
@media print {
    body.page.site-page-OralHistory .item.resource,
    body.item.resource.browse .resources .item.resource {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}

/* ===================================================================
   Item Export Sidebar & Dropdown
   =================================================================== */

/* Make regions container flex to accommodate sidebar */
body.item.resource.show .regions-container--main {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
}

body.item.resource.show .main-region {
    flex: 1;
    min-width: 0;
}

body.item.resource.show .item-export-sidebar {
    width: 280px;
    flex-shrink: 0;
    position: sticky;
    top: 2rem;
    margin-top: 2rem;
}

.export-dropdown-container {
    position: relative;
    width: 100%;
}

.export-dropdown-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.25rem;
    background: #ffffff !important;
    color: #1a1a1a !important;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
    transition: all 0.2s ease;
}

.export-dropdown-button svg {
    transition: transform 0.2s ease;
    opacity: 0.6;
}

.export-dropdown-button[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

.export-dropdown-container:hover .export-dropdown-button,
.export-dropdown-button:hover,
.export-dropdown-button[aria-expanded="true"] {
    border-color: rgba(0, 0, 0, 0.15) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
    color: #000000 !important;
    background: #fcfcfc !important;
}

.export-dropdown-button:focus {
    outline: none !important;
}

.export-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    width: 100%;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    opacity: 0;
    visibility: hidden;
    transform-origin: top;
    transform: translateY(-4px);
    transition: all 0.2s ease;
    z-index: 100;
    padding: 0.35rem;
}

.export-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.export-dropdown-item {
    display: flex;
    align-items: center;
    padding: 0.6rem 1rem;
    margin-bottom: 2px;
    color: #4d4d4d;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 400;
    text-decoration: none;
    border-radius: 6px;
    background: transparent;
    border: none;
    transition: all 0.15s ease;
}

.export-dropdown-item:last-child {
    margin-bottom: 0;
}

.export-dropdown-item:hover {
    background: rgba(0, 0, 0, 0.04);
    color: #1a1a1a;
}

/* Responsive */
@media (max-width: 1024px) {
    body.item.resource.show .regions-container--main {
        flex-direction: column;
        gap: 2rem;
    }
    body.item.resource.show .item-export-sidebar {
        width: 100%;
        position: static;
        order: -1;
    }
}