/* ================================================================
   DESIGN SYSTEM
================================================================ */
:root {
    --night:  #080c14;
    --deep:   #0d1420;
    --mesh:   #c8cdd6;
    --warm:   #d4a574;
    --pink:   #e8732a;
    --text:   #e8e4dc;
    --muted:  rgba(232,228,220,0.5);
    --dim:    rgba(232,228,220,0.18);

    --serif: 'Esteban', serif;
    --mono:  'IBM Plex Mono', monospace;

    --essay: 680px;
    --wide:  1100px;
}

/* ================================================================
   RESET & BASE
================================================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scrollbar-width: none;
}

html::-webkit-scrollbar { display: none; }

body {
    font-family: var(--serif);
    font-weight: 400;
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--text);
    background-color: var(--night);
    overflow-x: hidden;
    scrollbar-width: none;
}

body::-webkit-scrollbar { display: none; }


/* ================================================================
   TYPOGRAPHY
================================================================ */
h1, h2, h3 {
    font-family: var(--serif);
    font-weight: 400;
    font-style: italic;
    line-height: 1.2;
}

h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.1rem, 2vw, 1.5rem); }
h3 { font-size: 1rem; font-style: normal; }

p {
    font-weight: 400;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    max-width: 65ch;
}
p:last-child { margin-bottom: 0; }

em { font-style: italic; }

a {
    color: var(--warm);
    text-decoration: none;
    transition: opacity 0.25s;
}
a:hover { opacity: 0.65; }

/* ================================================================
   LAYOUT
================================================================ */
.essay-col {
    max-width: var(--essay);
    margin-left: auto;
    margin-right: auto;
}

.narrow-col {
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.wide-col {
    max-width: var(--wide);
    margin-left: auto;
    margin-right: auto;
}

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: start;
}

section {
    padding: 8rem 5%;
    position: relative;
    z-index: 2;
}


section h2 {
    color: var(--mesh);
    margin-bottom: 2.5rem;
}

/* ================================================================
   READING PROGRESS LINE
================================================================ */
.progress-track {
    position: fixed;
    top: 0;
    right: 0;
    width: 2px;
    height: 100vh;
    background: rgba(200, 205, 214, 0.08);
    z-index: 200;
}

.progress-fill {
    width: 100%;
    height: 0%;
    background: var(--pink);
    transition: height 0.08s linear;
}

/* ================================================================
   OPENING SECTION
================================================================ */
#opening {
    height: 100vh;
    min-height: 640px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 0;
    z-index: 2;
}

.opening-bg {
    position: absolute;
    inset: 0;
    background: var(--deep);
}

.opening-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.opening-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(8, 12, 20, 0.55) 0%,
        rgba(8, 12, 20, 0.5)  40%,
        rgba(8, 12, 20, 0.7)  70%,
        rgba(8, 12, 20, 0.88) 100%
    );
}

.opening-text {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: 0 5%;
    transform: translateY(-50px) !important;
}

.opening-eyebrow {
    font-family: var(--mono);
    font-size: 0.68rem;
    letter-spacing: 0.2em;
    color: rgba(232,228,220,0.8);
    display: block;
    margin-bottom: 2.5rem;
}

.opening-title {
    font-family: var(--serif);
    font-style: italic;
    font-size: clamp(1.6rem, 2.8vw, 2.2rem);
    color: var(--text);
    line-height: 1.2;
    margin-bottom: 2rem;
}

.opening-question {
    font-family: var(--serif);
    font-style: italic;
    font-size: clamp(1rem, 2.2vw, 1.35rem);
    color: var(--muted);
    max-width: 42ch;
    margin: 0 auto 3rem;
    line-height: 1.75;
}

.opening-meta {
    font-family: var(--mono);
    font-size: 0.63rem;
    letter-spacing: 0.15em;
    color: rgba(232,228,220,0.75);
    line-height: 2;
}

.scroll-cue {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    font-family: var(--mono);
    font-size: 0.65rem;
    letter-spacing: 0.25em;
    color: rgba(232,228,220,0.75);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.scroll-cue::after {
    content: '';
    width: 1px;
    height: 48px;
    background: linear-gradient(to bottom, rgba(232,228,220,0.7), transparent);
    animation: line-drop 2.2s ease-in-out infinite;
}

@keyframes line-drop {
    0%   { transform: scaleY(0.2) translateY(-10px); opacity: 0; }
    50%  { opacity: 1; }
    100% { transform: scaleY(1) translateY(0); opacity: 0.4; }
}

/* ================================================================
   ESSAY IMAGES
================================================================ */
.essay-img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.img-caption {
    font-family: var(--mono);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    color: var(--muted);
    margin-top: 0.6rem;
    max-width: none;
    margin-bottom: 0;
}

/* ================================================================
   VISUAL SLOTS
================================================================ */
.slot {
    width: 100%;
    min-height: 320px;
    border: 1px solid rgba(200, 205, 214, 0.14);
    background: rgba(200, 205, 214, 0.025);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    position: relative;
}

/* Corner bracket marks — photogrammetry/technical feel */
.slot::before, .slot::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    border-color: rgba(200, 205, 214, 0.22);
    border-style: solid;
}
.slot::before { top: 8px; left: 8px; border-width: 1px 0 0 1px; }
.slot::after  { bottom: 8px; right: 8px; border-width: 0 1px 1px 0; }

.slot-label {
    font-family: var(--mono);
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    color: rgba(200, 205, 214, 0.28);
}

.slot-tall   { min-height: 440px; }
.slot-large  { min-height: 520px; }
.slot-screen { aspect-ratio: 16 / 9; min-height: 0; }

.slot-note {
    font-family: var(--mono);
    font-size: 0.62rem;
    color: rgba(200, 205, 214, 0.3);
    letter-spacing: 0.06em;
    margin-top: 0.6rem;
    line-height: 1.7;
}

/* ================================================================
   PULL QUOTES — Unity on-screen text aesthetic
================================================================ */
blockquote.pull-quote {
    font-family: var(--serif);
    font-style: italic;
    font-size: clamp(1.15rem, 2.2vw, 1.55rem);
    line-height: 1.65;
    color: var(--mesh);
    border-left: 1px solid rgba(200, 205, 214, 0.22);
    padding-left: 2rem;
    margin: 3.5rem 0;
    max-width: 48ch;
}

blockquote.pull-quote.closing {
    font-size: clamp(0.9rem, 1.4vw, 1.1rem);
    color: var(--text);
    border-left-color: rgba(232,228,220,0.3);
    max-width: 55ch;
    margin-top: 4rem;
}

/* ================================================================
   DATA ANNOTATION
================================================================ */
.data-block {
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--muted);
    border-left: 1px solid rgba(200, 205, 214, 0.18);
    padding: 1rem 1.5rem;
    margin-top: 1.5rem;
    line-height: 1.8;
    letter-spacing: 0.05em;
}

.data-block .data-key {
    color: var(--pink);
    display: block;
    margin-bottom: 0.4rem;
    letter-spacing: 0.12em;
}

/* ================================================================
   EXPANDABLE DATA PANEL (Red Hook)
================================================================ */
details.data-panel {
    border: 1px solid rgba(200, 205, 214, 0.1);
    margin-top: 2.5rem;
}

details.data-panel summary {
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    color: var(--muted);
    padding: 1rem 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style: none;
    transition: color 0.25s;
    user-select: none;
}

details.data-panel summary::-webkit-details-marker { display: none; }

details.data-panel summary::after {
    content: '+';
    color: var(--pink);
    font-size: 1rem;
    flex-shrink: 0;
    margin-left: 1rem;
}

details.data-panel[open] summary::after { content: '−'; }
details.data-panel summary:hover { color: var(--text); }

.panel-body {
    padding: 1.5rem;
    border-top: 1px solid rgba(200, 205, 214, 0.07);
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--muted);
    line-height: 1.9;
    letter-spacing: 0.04em;
}

.panel-body p { max-width: none; margin-bottom: 1.2rem; }
.panel-body p:last-child { margin-bottom: 0; }

.panel-key {
    color: var(--warm);
    display: block;
    margin-bottom: 0.3rem;
    letter-spacing: 0.1em;
}

/* ================================================================
   UNITY GALLERY — horizontal scroll
================================================================ */
/* Gallery wrapper — edge fades + progress bar layout */
.gallery-wrap {
    position: relative;
    margin-top: 3.5rem;
}

/* Left edge fade */
.gallery-wrap::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 1.75rem;
    width: 72px;
    background: linear-gradient(to right, #080c14 0%, transparent 100%);
    pointer-events: none;
    z-index: 2;
}

/* Right edge fade */
.gallery-wrap::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 1.75rem;
    width: 96px;
    background: linear-gradient(to left, #080c14 0%, transparent 100%);
    pointer-events: none;
    z-index: 2;
}

.gallery {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 0.5rem;
    margin-top: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.gallery::-webkit-scrollbar { display: none; }

/* Footer row: progress bar + scroll hint */
.gallery-footer {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-top: 0.75rem;
}


.gallery-progress-track {
    flex: 1;
    height: 1px;
    background: rgba(255,255,255,0.08);
}

.gallery-progress-fill {
    height: 100%;
    background: var(--pink);
    width: 0%;
    transition: width 0.12s linear;
}

@keyframes hint-nudge {
    0%, 100% { transform: translateX(0);   opacity: 0.5; }
    50%       { transform: translateX(5px); opacity: 1;   }
}

.gallery-scroll-hint {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.46rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--pink);
    flex-shrink: 0;
    white-space: nowrap;
    transition: opacity 0.8s;
    animation: hint-nudge 2.4s ease-in-out infinite;
}

.gallery-item {
    flex: 0 0 44%;
    scroll-snap-align: start;
}

.gallery-item .slot {
    min-height: 0;
    aspect-ratio: 16 / 9;
}

.gallery-caption {
    font-family: var(--serif);
    font-style: italic;
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: 0.75rem;
    line-height: 1.6;
    padding: 0 0.2rem;
}

/* Unity enter button */
.unity-enter {
    display: inline-block;
    margin-top: 3.5rem;
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text);
    background: none;
    border: none;
    border-bottom: 1px solid var(--pink);
    padding: 0.6rem 0.6rem 0.6rem 0;
    text-decoration: none;
    position: relative;
    cursor: crosshair;
    transition: letter-spacing 0.3s, color 0.3s;
    overflow: hidden;
}

.unity-enter::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: -100%;
    width: 100%;
    height: 1px;
    background: var(--text);
    transition: left 0.35s ease;
}

.unity-enter:hover {
    color: var(--text);
}

.unity-enter:hover::after {
    left: 0;
}

@keyframes arrow-nudge {
    0%, 100% { transform: translateX(0);  }
    50%       { transform: translateX(5px); }
}

@keyframes border-breathe {
    0%, 100% { opacity: 0.5; }
    50%       { opacity: 1;   }
}

.unity-enter {
    border-bottom-color: var(--pink);
    animation: border-breathe 2.4s ease-in-out infinite;
}

.unity-enter .enter-arrow {
    transition: transform 0.2s ease;
    animation: arrow-nudge 2.4s ease-in-out infinite;
}

.unity-enter:hover {
    animation: none;
    border-bottom-color: var(--text);
}

.unity-enter:hover .enter-arrow {
    animation: none;
    transform: translateX(6px);
}

.unity-center {
    text-align: left;
    margin-top: 1rem;
}

/* ================================================================
   SECTION DIVIDER
================================================================ */
.divider {
    width: 48px;
    height: 1px;
    background: rgba(200, 205, 214, 0.18);
    margin: 5rem auto;
}

/* ================================================================
   READING LIST / VISUAL LIBRARY
================================================================ */
#library {
    background: var(--deep);
}

.library-intro {
    max-width: 52ch;
    color: var(--muted);
    margin-top: 0.5rem;
    margin-bottom: 3rem;
}

.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1px;
    border: 1px solid rgba(200, 205, 214, 0.07);
    background: rgba(200, 205, 214, 0.07);
}

.book-card {
    background: var(--deep);
    padding: 1.25rem;
    transition: background 0.25s;
}

.book-card:hover {
    background: rgba(200, 205, 214, 0.04);
}

.book-cover {
    width: 100%;
    aspect-ratio: 2 / 3;
    max-height: 210px;
    border: 1px solid rgba(200, 205, 214, 0.1);
    background: rgba(200, 205, 214, 0.025);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.9rem;
    position: relative;
    overflow: hidden;
}

.book-cover::before {
    content: '';
    position: absolute;
    top: 5px; left: 5px;
    width: 8px; height: 8px;
    border-top: 1px solid rgba(200,205,214,0.25);
    border-left: 1px solid rgba(200,205,214,0.25);
    z-index: 3;
}

.book-cover::after {
    content: '';
    position: absolute;
    bottom: 5px; right: 5px;
    width: 8px; height: 8px;
    border-bottom: 1px solid rgba(200,205,214,0.25);
    border-right: 1px solid rgba(200,205,214,0.25);
    z-index: 3;
}

.book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.45s ease, filter 0.45s ease;
}

.book-card:hover .book-cover img {
    transform: scale(1.04);
    filter: brightness(1.1);
}

.book-cover-label {
    font-family: var(--mono);
    font-size: 0.55rem;
    color: rgba(200, 205, 214, 0.18);
    letter-spacing: 0.1em;
    z-index: 1;
}

.book-annotations {
    position: absolute;
    inset: 0;
    background: rgba(8, 12, 20, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.7rem;
    padding: 1.1rem 1rem;
    opacity: 0;
    transition: opacity 0.35s ease 0.06s;
    z-index: 2;
}

.book-card:hover .book-annotations {
    opacity: 1;
}

.annotation-line {
    display: block;
    font-family: var(--mono);
    font-size: 0.57rem;
    line-height: 1.6;
    color: rgba(232,228,220,0.65);
    letter-spacing: 0.03em;
}

.annotation-line::before {
    content: '→ ';
    color: var(--pink);
}

.book-title {
    font-family: var(--serif);
    font-style: italic;
    font-size: 0.9rem;
    color: var(--text);
    line-height: 1.4;
    margin-bottom: 0.25rem;
}

.book-author {
    font-family: var(--mono);
    font-size: 0.62rem;
    color: var(--muted);
    letter-spacing: 0.04em;
    line-height: 1.5;
}

.bib-link {
    margin-top: 2.5rem;
    text-align: right;
}

.bib-link a {
    font-family: var(--mono);
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    color: var(--muted);
    border-bottom: 1px solid rgba(232,228,220,0.18);
    padding-bottom: 2px;
}

/* ================================================================
   CHAPTER INDEX
================================================================ */
.chapter-index {
    padding: 5rem 5% 4rem;
    border-top: 1px solid rgba(200, 205, 214, 0.07);
    max-width: var(--wide);
    margin: 0 auto;
}

.chapter-index-title {
    font-family: var(--serif);
    font-style: italic;
    font-size: 0.95rem;
    color: var(--muted);
    margin-bottom: 2rem;
    max-width: none;
}

.chapter-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.chapter-list a {
    font-family: var(--mono);
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    color: rgba(232,228,220,0.3);
    transition: color 0.25s;
}

.chapter-list a:hover {
    color: var(--text);
    opacity: 1;
}

/* ================================================================
   FOOTER
================================================================ */
footer {
    padding: 3rem 5%;
    border-top: 1px solid rgba(200, 205, 214, 0.07);
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
}

.footer-left { text-align: left; }
.footer-right { text-align: right; }

.footer-title {
    color: rgba(232,228,220,0.5) !important;
    margin-bottom: 0.4rem;
}

@media (max-width: 640px) {
    footer { flex-direction: column; align-items: flex-start; }
    .footer-right { text-align: left; }
}

footer p {
    font-family: var(--mono);
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    color: rgba(232,228,220,0.25);
    max-width: none;
    margin-bottom: 0.4rem;
}

/* ================================================================
    CUSTOM CURSOR (removed)
================================================================ */
/* Custom cursor removed to restore default system cursor. */

/* ================================================================
   ACKNOWLEDGEMENTS
================================================================ */
#acknowledgements {
    padding: 3rem 5%;
    border-top: 1px solid rgba(200, 205, 214, 0.07);
    position: relative;
    z-index: 2;
}

.ack-label {
    font-family: var(--mono);
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    color: rgba(232, 228, 220, 0.25);
    margin-bottom: 1.4rem;
}

.ack-body {
    max-width: 860px;
    columns: 2;
    column-gap: 3rem;
}

.ack-body p {
    font-family: var(--mono);
    font-size: 0.62rem;
    letter-spacing: 0.05em;
    line-height: 2.1;
    color: rgba(232, 228, 220, 0.85);
    margin-bottom: 0.9rem;
    break-inside: avoid;
}

@media (max-width: 640px) {
    .ack-body { columns: 1; }
}

.ack-body p:last-child { margin-bottom: 0; }

/* ================================================================
   FADE-IN ANIMATIONS
================================================================ */
.fade-in {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.9s ease, transform 0.9s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ================================================================
   CLOSING SECTION
================================================================ */
.closing-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-top: 0;
}

.closing-col p + p {
    margin-top: 1.2em;
}

.closing-final-p {
    margin-top: 2.5rem;
    font-weight: 400;
    font-size: 0.875rem;
}

.closing-finale {
    margin-top: 5rem;
    text-align: center;
}

.closing-lead {
    font-family: var(--serif);
    font-style: italic;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    line-height: 1.3;
    color: var(--text);
    opacity: 1;
    font-weight: 400;
}

.closing-sub {
    font-family: var(--serif);
    font-style: italic;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text);
    opacity: 0.6;
    margin-top: 1.2rem;
    font-weight: 400;
}

/* ================================================================
   LIBRARY GRID
================================================================ */
/* ── Data Sources ───────────────────────────────────────────────── */
.ds-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem 3rem;
    margin-top: 2.5rem;
}

.ds-label {
    font-family: var(--mono);
    font-size: 0.46rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--pink);
    margin-bottom: 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid rgba(232,228,220,0.06);
}

.ds-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.ds-list li {
    font-family: var(--mono);
    font-size: 0.5rem;
    line-height: 1.6;
    color: rgba(232,228,220,0.35);
}

.ds-org {
    color: rgba(232,228,220,0.6);
}

@media (max-width: 900px) {
    .ds-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .ds-grid { grid-template-columns: 1fr; }
}

/* ── Library ──────────────────────────────────────────────────── */
.lib-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    margin-top: 2.5rem;
}

.lib-card {
    transition: transform 0.4s ease;
    cursor: default;
}

.lib-card:hover {
    transform: translateY(-4px);
}

.lib-cover {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #0d1420;
    margin-bottom: 0.55rem;
}

.lib-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease, filter 0.4s ease;
}

.lib-card:hover .lib-cover img {
    transform: scale(1.04);
    filter: brightness(1.12);
}

.lib-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem;
    text-align: center;
}

.lib-placeholder span {
    font-family: var(--serif);
    font-style: italic;
    font-size: 0.7rem;
    color: rgba(232,228,220,0.35);
    line-height: 1.55;
}

.lib-hover {
    position: absolute;
    inset: 0;
    background: rgba(8, 12, 20, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.lib-card:hover .lib-hover {
    opacity: 1;
}

.lib-hover span {
    display: block;
    font-family: var(--serif);
    font-style: italic;
    font-size: 0.62rem;
    line-height: 1.6;
    color: rgba(232,228,220,0.9);
}

.lib-title {
    font-family: var(--serif);
    font-style: italic;
    font-size: 0.75rem;
    color: var(--text);
    line-height: 1.35;
    margin-bottom: 0.18rem;
}

.lib-author {
    font-family: var(--mono);
    font-size: 0.6rem;
    color: var(--muted);
    letter-spacing: 0.03em;
    line-height: 1.4;
    margin-bottom: 0.1rem;
}

.lib-meta {
    font-family: var(--mono);
    font-size: 0.55rem;
    color: var(--dim);
    letter-spacing: 0.03em;
}

/* ================================================================
   RESPONSIVE
================================================================ */
@media (max-width: 900px) {
    .two-col {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .gallery-item { flex: 0 0 78%; }

    .lib-grid { grid-template-columns: repeat(3, 1fr); }

    .closing-cols { grid-template-columns: 1fr; gap: 0; }
}

@media (max-width: 768px) {
    /* Collapse inline two-column grids that can't be targeted by class */
    #feedback .wide-col > div,
    #vulnerability .wide-col > div,
    #mapping .wide-col > div,
    #red-hook .wide-col > div {
        display: block !important;
    }

    /* Unstick inner sticky divs — irrelevant in single-column flow */
    #vulnerability [style*="sticky"],
    #red-hook [style*="sticky"] {
        position: static !important;
        top: auto !important;
    }

    /* Responsive iframes */
    #feedback iframe    { height: 340px !important; min-height: 0 !important; }
    #vulnerability iframe { height: 360px !important; }
    #mapping iframe     { height: 340px !important; }
    #red-hook iframe    { aspect-ratio: 4 / 3 !important; height: auto !important; }

    /* Investigative Aesthetics section — reduce massive padding */
    #investigative { padding-top: 7rem !important; padding-bottom: 7rem !important; }

    /* Photo mosaic — 2 columns on mobile */
    .photo-mosaic {
        grid-template-columns: repeat(2, 1fr) !important;
        grid-auto-rows: 50vw !important;
    }

    /* Unity heading + link row — stack vertically */
    #unity .wide-col > div[style*="flex"] {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .unity-enter { margin-top: 0.5rem; }
}

@media (max-width: 600px) {
    section { padding: 5rem 6%; }

    .gallery-item { flex: 0 0 90%; }

    nav ul {
        gap: 0.8rem 1.2rem;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    nav ul a { font-size: 0.62rem; }

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

    /* Smaller iframes on small phones */
    #feedback iframe    { height: 280px !important; }
    #vulnerability iframe { height: 300px !important; }
    #mapping iframe     { height: 280px !important; }

    /* Investigative Aesthetics — single-column mosaic on small phones */
    .photo-mosaic {
        grid-template-columns: repeat(2, 1fr) !important;
        grid-auto-rows: 50vw !important;
    }

}

/* ── Photo mosaic (Investigative Aesthetics) ──────────── */
.mosaic-cell {
    width: 100%;
    overflow: hidden;
    position: relative;
    background-size: cover;
    background-position: center;
}
.photo-mosaic {
    grid-auto-rows: 180px; /* or 20vh for responsive */
}