/* ============================================================
   VARIABLES & RESET
   ============================================================ */
:root {
    --bg:       #F3E8DF;
    --text:     #452829;
    --muted:    #57595B;
    --hover-bg: #E8D1C5;
    --alt-bg:   #EDD9CE;
    --border:   rgba(69,40,41,0.15);
    --font:     'EB Garamond', Georgia, 'Times New Roman', serif;
    --sidebar-w: 168px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    font-size: 1.1875rem;
    overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a   { text-decoration: none; color: inherit; }
ul  { list-style: none; }
em  { font-style: italic; }

/* ============================================================
   MOBILE BAR (sticky top — mobile only)
   ============================================================ */
.mobile-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(243, 232, 223, 0.95);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--border);
}

.mobile-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1.25rem;
}

/* ============================================================
   MOBILE MENU DROPDOWN
   ============================================================ */
.mobile-menu {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 0.5rem 0;
}
.mobile-menu[hidden] { display: none; }

.mob-link {
    display: block;
    padding: 0.6rem 1.25rem;
    font-size: 1.125rem;
    color: var(--text);
    transition: background 0.15s;
}
.mob-link:hover { background: var(--hover-bg); }
.mob-link--dim  { color: var(--muted); font-size: 0.9rem; }

/* ============================================================
   DESKTOP SIDEBAR (fixed left — lg+)
   ============================================================ */
.desktop-nav {
    display: none;
}

/* ============================================================
   NAV BRAND & LINKS (shared)
   ============================================================ */
.nav-brand {
    font-family: var(--font);
    font-size: 1.125rem;
    font-weight: 400;
    color: var(--text);
    letter-spacing: 0.01em;
    transition: color 0.15s;
}
.nav-brand:hover { color: var(--muted); }

.burger-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text);
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.15s;
}
.burger-btn:hover { background: var(--hover-bg); }

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content {
    max-width: 42rem;
    margin: 0 auto;
    padding: 2.5rem 1.25rem 4rem;
}

/* ============================================================
   PAGE SECTIONS
   ============================================================ */
.page-section {
    padding: 3.5rem 0;
    border-top: 1px solid var(--border);
}
.page-section:first-child {
    border-top: none;
    padding-top: 2rem;
}

/* ============================================================
   PROFILE GRID
   ============================================================ */
.profile-grid {
    display: flex;
    align-items: flex-start;
    gap: 1.75rem;
    margin-bottom: 2rem;
}

.photo-col { flex-shrink: 0; }

.photo-wrap {
    position: relative;
    width: 100px;
    height: 100px;
}

.profile-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px solid var(--muted);
    object-fit: cover;
    object-position: center top;
}

.photo-init {
    display: none;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px solid var(--muted);
    font-family: var(--font);
    font-size: 1.75rem;
    font-weight: 500;
    color: var(--muted);
    background: var(--alt-bg);
}

.info-col {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding-top: 0.25rem;
}

.profile-name {
    font-family: var(--font);
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: -0.01em;
    color: var(--text);
    line-height: 1.2;
    margin-bottom: 0.15rem;
}

.profile-school,
.profile-location {
    font-size: 0.9375rem;
    color: var(--muted);
    line-height: 1.4;
}

.profile-class {
    font-size: 0.9375rem;
    color: var(--muted);
    font-style: italic;
}

.score-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.4rem;
    flex-wrap: wrap;
}

.score-item {
    font-size: 0.9375rem;
    color: var(--text);
}

.score-dot {
    color: var(--muted);
    font-size: 0.75rem;
}

.profile-links {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.plink {
    font-size: 0.9375rem;
    color: var(--text);
    text-decoration: underline;
    text-decoration-color: var(--border);
    text-underline-offset: 2px;
    transition: color 0.15s, text-decoration-color 0.15s;
}
.plink:hover {
    color: var(--muted);
    text-decoration-color: var(--muted);
}

/* ============================================================
   LOGOS MARQUEE STRIP
   ============================================================ */
.logos-strip {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    overflow: hidden;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin: 0;
}

.logos-label,
.logos-count {
    font-size: 0.5625rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    opacity: 0.65;
    flex-shrink: 0;
    white-space: nowrap;
    font-family: var(--font);
}

.logos-marquee {
    flex: 1;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
    min-width: 0;
}

.logos-track {
    display: flex;
    align-items: center;
    gap: 2.75rem;
    width: max-content;
    animation: logos-scroll 28s linear infinite;
}

.logos-strip:hover .logos-track {
    animation-play-state: paused;
}

@keyframes logos-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

.logo-item {
    display: flex;
    align-items: center;
    height: 26px;
    flex-shrink: 0;
}

.logo-item img {
    height: 100%;
    width: auto;
    max-width: 100px;
    object-fit: contain;
    display: block;
    transition: transform 0.2s ease;
}

.logo-item img:hover {
    transform: scale(1.08);
}

.logo-fallback {
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--muted);
    opacity: 0.6;
    letter-spacing: 0.02em;
    white-space: nowrap;
    font-family: var(--font);
}

/* ============================================================
   SOCIAL LINKS
   ============================================================ */
.social-links {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-link {
    font-size: 0.8125rem;
    color: var(--muted);
    text-decoration: none;
    transition: color 0.15s;
    opacity: 0.7;
}

.social-link:hover {
    color: var(--text);
    opacity: 1;
}

/* ============================================================
   BIO
   ============================================================ */
.bio {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    color: var(--text);
    font-size: 1.0625rem;
    line-height: 1.8;
}

/* Paragraphs generated by bioParagraphs() inside #p-bio */
#p-bio p {
    margin-bottom: 1rem;
}
#p-bio p:last-child {
    margin-bottom: 0;
}

.award-line {
    color: var(--muted);
    font-style: italic;
    font-size: 0.9375rem;
}

/* ============================================================
   SECTION TITLES
   ============================================================ */
.section-title {
    font-family: var(--font);
    font-size: 1.625rem;
    font-weight: 400;
    color: var(--text);
    letter-spacing: -0.01em;
    margin-bottom: 0.5rem;
}

.section-lead {
    font-size: 1rem;
    color: var(--muted);
    font-style: italic;
    margin-bottom: 2rem;
}

/* ============================================================
   UNIVERSITIES — CARD GRID
   ============================================================ */
.unis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 1rem;
    margin-top: 0.25rem;
}

/* Base card — starts invisible for animation */
.uni-card {
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 1.25rem;
    background: var(--bg);
    text-decoration: none;
    color: inherit;
    display: block;
    opacity: 0;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

/* Scroll-in animation */
.uni-card.visible {
    animation: uniCardIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) var(--delay, 0s) forwards;
}
@keyframes uniCardIn {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

a.uni-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(69,40,41,0.09);
    border-color: rgba(69,40,41,0.28);
}

/* Committed card — gold treatment */
.uni-card--committed {
    border-color: rgba(196,151,42,0.55);
    background: rgba(196,151,42,0.025);
}
.uni-card--committed:hover {
    border-color: rgba(196,151,42,0.8);
    box-shadow: 0 6px 24px rgba(196,151,42,0.12);
}

/* "And others" placeholder */
.uni-card--more {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    border-style: dashed;
    color: var(--muted);
    font-style: italic;
    font-size: 0.9375rem;
    opacity: 0;
}
.uni-card--more.visible {
    animation: uniCardIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) var(--delay, 0s) forwards;
}

/* Card sections */
.uni-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.875rem;
}

.uni-card-logo-wrap {
    height: 38px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.uni-card-logo {
    height: 38px;
    width: auto;
    max-width: 110px;
    object-fit: contain;
    display: block;
    transition: transform 0.2s ease;
}
.uni-card:hover .uni-card-logo { transform: scale(1.06); }

.uni-card-logo-ph {
    font-family: var(--font);
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--muted);
    letter-spacing: 0.03em;
    opacity: 0.45;
}

/* "Committed" badge */
.uni-committed-badge {
    font-size: 0.6875rem;
    color: #8A6A1A;
    background: rgba(196,151,42,0.12);
    border: 1px solid rgba(196,151,42,0.35);
    border-radius: 100px;
    padding: 2px 8px;
    white-space: nowrap;
    font-family: var(--font);
    flex-shrink: 0;
    align-self: flex-start;
}

.uni-card-name {
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 500;
    color: var(--text);
    line-height: 1.35;
    margin-bottom: 0.25rem;
}
.uni-card-location {
    font-size: 0.8125rem;
    color: var(--muted);
    margin-bottom: 0.2rem;
}
.uni-card-major {
    font-size: 0.8125rem;
    color: var(--muted);
    font-style: italic;
    margin-bottom: 0.15rem;
}
.uni-card-grant {
    font-size: 0.75rem;
    color: var(--muted);
    opacity: 0.7;
    margin-top: 0.25rem;
}

/* ============================================================
   BOOKS
   ============================================================ */
.book-entry {
    margin-bottom: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--border);
}
.book-entry:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.book-title {
    font-family: var(--font);
    font-size: 1.1875rem;
    font-weight: 400;
    color: var(--text);
    margin-bottom: 0.2rem;
    line-height: 1.3;
}

.book-author {
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 0.75rem;
    font-style: italic;
}

.book-entry p {
    font-size: 1rem;
    color: var(--text);
    line-height: 1.75;
    margin-bottom: 0.75rem;
}

.book-lesson {
    font-size: 0.9375rem;
    color: var(--muted);
    line-height: 1.65;
    margin-bottom: 0 !important;
}

/* ============================================================
   WRITINGS
   ============================================================ */
.writing-entry {
    margin-bottom: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--border);
}
.writing-entry:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.writing-title {
    font-family: var(--font);
    font-size: 1.1875rem;
    font-weight: 400;
    color: var(--text);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.writing-entry p {
    font-size: 1rem;
    color: var(--text);
    line-height: 1.8;
    margin-bottom: 0.75rem;
}
.writing-entry p:last-child { margin-bottom: 0; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 2rem 1.25rem;
    max-width: 42rem;
    margin: 0 auto;
}

.footer-inner { display: flex; flex-direction: column; gap: 1rem; }

.footer-top {
    font-size: 0.9375rem;
    color: var(--muted);
    line-height: 1.6;
}

.footer-link {
    color: var(--text);
    text-decoration: underline;
    text-decoration-color: var(--border);
    text-underline-offset: 2px;
    transition: color 0.15s;
}
.footer-link:hover { color: var(--muted); }

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--muted);
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-sep { opacity: 0.5; }

.footer-admin {
    font-size: 0.8125rem;
    color: var(--muted);
    opacity: 0.45;
    transition: opacity 0.15s;
}
.footer-admin:hover { opacity: 0.8; }

/* ============================================================
   DESKTOP (≥ 768px) — show sidebar, offset content
   ============================================================ */
@media (min-width: 768px) {
    .mobile-bar { display: none; }

    .desktop-nav {
        display: flex;
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: var(--sidebar-w);
        z-index: 50;
        padding: 2.5rem 0 2rem 0;
    }

    .desktop-nav-inner {
        display: flex;
        flex-direction: column;
        gap: 0;
        width: 100%;
        padding: 0 1.5rem;
    }

    .nav-brand--desk {
        font-size: 1.0625rem;
        margin-bottom: 2rem;
        display: block;
    }

    .nav-link {
        display: block;
        font-size: 0.9375rem;
        color: var(--muted);
        padding: 0.3rem 0;
        padding-left: 0;
        border-left: 2px solid transparent;
        margin-left: -2px;
        transition: color 0.22s ease, border-color 0.22s ease, padding-left 0.22s ease;
        line-height: 1.5;
    }
    .nav-link:hover {
        color: var(--text);
        border-color: var(--text);
        padding-left: 0.55rem;
    }
    .nav-link.active {
        color: var(--text);
        border-color: var(--text);
        padding-left: 0.55rem;
    }

    .main-content {
        max-width: calc(var(--sidebar-w) + 44rem);
        margin: 0;
        padding: 2.5rem 2.5rem 5rem calc(var(--sidebar-w) + 2.5rem);
    }

    .site-footer {
        max-width: calc(var(--sidebar-w) + 44rem);
        margin: 0;
        padding: 2rem 2.5rem 2.5rem calc(var(--sidebar-w) + 2.5rem);
    }

    .photo-wrap {
        width: 140px;
        height: 140px;
    }

    .profile-name { font-size: 1.75rem; }
}

/* ============================================================
   LARGE DESKTOP (≥ 1200px) — wider content column
   ============================================================ */
@media (min-width: 1200px) {
    .main-content {
        max-width: calc(var(--sidebar-w) + 52rem);
        padding-right: 5rem;
    }
    .site-footer {
        max-width: calc(var(--sidebar-w) + 52rem);
        padding-right: 5rem;
    }
}

/* ============================================================
   ACTIVE NAV LINK (mobile override)
   ============================================================ */
.mob-link.active { color: var(--text); font-weight: 500; }

/* ============================================================
   BOOK THUMBNAIL
   ============================================================ */
.book-thumb {
    width: 44px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
    border: 1px solid var(--border);
    display: block;
}
.book-thumb--ph {
    width: 44px;
    height: 60px;
    background: var(--alt-bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6875rem;
    color: var(--muted);
    letter-spacing: 0.04em;
}

/* page-section--first has no top border */
.page-section--first { border-top: none; padding-top: 2rem; }

/* ============================================================
   POST CARDS — accordion style
   ============================================================ */
.post-card {
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 0.75rem;
    overflow: hidden;
    transition: border-color 0.2s;
}
.post-card:last-child { margin-bottom: 0; }
.post-card:hover { border-color: rgba(69,40,41,0.45); }

.post-card-header {
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    padding: 1.375rem 1.75rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    text-align: left;
    color: var(--text);
    font-family: var(--font);
}

.post-card-meta { flex: 1; min-width: 0; }

.post-card-title {
    font-family: var(--font);
    font-size: 1.3125rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.25;
    margin-bottom: 0.3rem;
}

.post-card-date {
    font-size: 0.875rem;
    color: var(--muted);
}

.post-card-type {
    font-size: 0.8125rem;
    color: var(--muted);
    background: rgba(69,40,41,0.07);
    padding: 4px 12px;
    border-radius: 100px;
    white-space: nowrap;
    flex-shrink: 0;
    font-family: var(--font);
}

.post-card-arrow {
    flex-shrink: 0;
    color: var(--muted);
    transition: transform 0.3s ease, opacity 0.2s;
    opacity: 0;
}
.post-card:hover .post-card-arrow { opacity: 0.35; }
.post-card-header[aria-expanded="true"] .post-card-arrow {
    transform: rotate(180deg);
    opacity: 0.45;
}

/* Accordion body */
.post-card-body {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.35s ease;
}
.post-card-body.open { grid-template-rows: 1fr; }

.post-card-inner { overflow: hidden; }

.post-card-content {
    padding: 1.25rem 1.75rem 1.625rem;
    border-top: 1px solid var(--border);
}
.post-card-content p {
    font-size: 1.0625rem;
    color: var(--text);
    line-height: 1.85;
    margin-bottom: 0.85rem;
}
.post-card-content p:last-child { margin-bottom: 0; }

/* Ornamental paragraph separator */
.bio > p + p::before,
.post-card-content > p + p::before,
.thing-section-desc + p::before {
    content: '';
    display: block;
    width: 2rem;
    height: 1px;
    background: var(--border);
    margin: 1.125rem 0 1.25rem;
}

.bio > p { margin-bottom: 0; }
.bio > p + p { margin-top: 0; }

/* ============================================================
   THING PHOTO GALLERY (inside expanded card)
   ============================================================ */
.thing-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 0.5rem;
    margin-top: 0.75rem;
    margin-bottom: 0.25rem;
}

.thing-gallery-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 3px;
    border: 1px solid var(--border);
    cursor: pointer;
    display: block;
    transition: opacity 0.15s, transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.thing-gallery-img:hover {
    opacity: 0.85;
    transform: scale(1.03);
}

/* Photo lightbox */
.photo-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(27,14,8,0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.25rem;
    animation: phFadeIn 0.2s ease;
    cursor: pointer;
}
@keyframes phFadeIn { from { opacity:0; } to { opacity:1; } }

.photo-lb-img {
    max-width: min(88vw, 860px);
    max-height: 82vh;
    object-fit: contain;
    display: block;
    border-radius: 4px;
    border: 1px solid rgba(243,232,223,0.08);
    cursor: default;
    animation: phPop 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes phPop {
    from { transform: scale(0.9); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

.photo-lb-close {
    position: fixed;
    top: 1.25rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: rgba(243,232,223,0.65);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.15s, transform 0.15s;
    z-index: 10000;
}
.photo-lb-close:hover {
    color: #F3E8DF;
    transform: rotate(90deg);
}

/* ============================================================
   THING HUB — SECTION WRAPPER
   ============================================================ */
.thing-section {
    margin-bottom: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--border);
}
.thing-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.thing-section-hd { margin-bottom: 1.25rem; }

.thing-section-title {
    font-family: var(--font);
    font-size: 1.375rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.thing-section-desc {
    font-size: 0.9375rem;
    color: var(--muted);
    line-height: 1.6;
}

/* ============================================================
   THING HUB — MOVIES GRID
   ============================================================ */
.movies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.875rem;
}

.movie-card {
    border-radius: 6px;
    overflow: hidden;
    background: var(--alt-bg);
    border: 1px solid var(--border);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.movie-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(69,40,41,0.13);
}

.movie-poster-wrap {
    aspect-ratio: 2/3;
    overflow: hidden;
}

.movie-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}
.movie-card:hover .movie-poster { transform: scale(1.04); }

.movie-ph {
    aspect-ratio: 2/3;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font);
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--muted);
    letter-spacing: 0.02em;
    background: var(--alt-bg);
}

.movie-info {
    padding: 0.55rem 0.65rem 0.7rem;
    flex: 1;
}

.movie-name {
    font-family: var(--font);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
    line-height: 1.35;
    margin-bottom: 0.1rem;
}

.movie-year {
    font-size: 0.75rem;
    color: var(--muted);
}

/* Movie lightbox card */
.movie-lb-card {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    max-width: min(86vw, 700px);
    background: var(--bg);
    border-radius: 10px;
    overflow: hidden;
    animation: phPop 0.28s cubic-bezier(0.34,1.56,0.64,1);
    cursor: default;
}

.movie-lb-poster {
    width: 180px;
    flex-shrink: 0;
    object-fit: cover;
    display: block;
    border-radius: 0;
}

.movie-lb-info {
    padding: 1.5rem 1.5rem 1.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.movie-lb-title {
    font-family: var(--font);
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.25;
}

.movie-lb-year {
    font-size: 0.9375rem;
    color: var(--muted);
    font-style: italic;
}

.movie-lb-comment {
    font-size: 1rem;
    color: var(--text);
    line-height: 1.7;
    margin: 0.5rem 0 0;
}

@media (max-width: 480px) {
    .movie-lb-card { flex-direction: column; max-width: 92vw; }
    .movie-lb-poster { width: 100%; max-height: 240px; object-fit: cover; }
    .movie-lb-info { padding: 1rem; }
}

/* ============================================================
   THING HUB — MASONRY GALLERY
   ============================================================ */
.masonry-grid {
    columns: 3;
    column-gap: 0.75rem;
}
@media (max-width: 600px) { .masonry-grid { columns: 2; } }

.masonry-item {
    break-inside: avoid;
    margin-bottom: 0.875rem;
    border-radius: 5px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--border);
    background: var(--bg);
    transition: opacity 0.18s, transform 0.22s cubic-bezier(0.4,0,0.2,1);
}
.masonry-item:hover { opacity: 0.9; transform: scale(1.02); }
.masonry-item > img { width: 100%; display: block; }

.masonry-caption {
    padding: 0.5rem 0.65rem 0.6rem;
}

.masonry-date {
    display: block;
    font-family: var(--font);
    font-size: 0.8125rem;
    font-style: italic;
    color: var(--muted);
    margin-bottom: 0.2rem;
    letter-spacing: 0.01em;
}

.masonry-cap-text {
    font-family: var(--font);
    font-size: 1rem;
    font-style: italic;
    font-weight: 400;
    color: var(--text);
    line-height: 1.6;
    margin: 0;
}

/* ============================================================
   THING HUB — QUOTES
   ============================================================ */
.quotes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}

.quote-card {
    background: var(--alt-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem 1.5rem 1.25rem;
    position: relative;
}
.quote-card::before {
    content: '\201C';
    font-family: var(--font);
    font-size: 4rem;
    line-height: 1;
    color: var(--border);
    position: absolute;
    top: 0.5rem;
    left: 1rem;
}

.quote-text {
    font-family: var(--font);
    font-size: 1.0625rem;
    font-style: italic;
    line-height: 1.75;
    color: var(--text);
    margin-bottom: 0.85rem;
    padding-top: 1.5rem;
}

.quote-author {
    font-size: 0.875rem;
    color: var(--muted);
    font-style: normal;
}
.quote-author cite { font-style: italic; }

/* ============================================================
   THING HUB — LIFE LESSONS BENTO
   ============================================================ */
.lessons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.875rem;
}

.lesson-card {
    border-radius: 10px;
    padding: 1.25rem 1.25rem 1.375rem;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-height: 140px;
}

.lesson-icon-wrap { line-height: 1; }

.lesson-icon {
    font-size: 1.75rem;
    display: block;
}

.lesson-num {
    font-family: var(--font);
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--muted);
    opacity: 0.5;
    display: block;
}

.lesson-title {
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 500;
    color: var(--text);
    line-height: 1.4;
}

.lesson-desc {
    font-size: 0.875rem;
    color: var(--muted);
    line-height: 1.55;
    margin: 0;
}

/* ============================================================
   THING ENTRIES
   ============================================================ */
.thing-entry { margin-bottom: 2rem; padding-bottom: 2rem; border-bottom: 1px solid var(--border); }
.thing-entry:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.thing-header { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 0.35rem; }
.thing-name { font-family: var(--font); font-size: 1.1875rem; font-weight: 400; color: var(--text); }
.thing-category { font-size: 0.8125rem; color: var(--muted); flex-shrink: 0; }
.thing-desc { font-size: 0.9375rem; color: var(--muted); line-height: 1.65; margin-bottom: 0.4rem; }
.thing-link { font-size: 0.875rem; color: var(--text); text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 2px; transition: color 0.15s; }
.thing-link:hover { color: var(--muted); }

/* ============================================================
   PROJECT ENTRIES
   ============================================================ */
.project-entry { margin-bottom: 2.5rem; padding-bottom: 2.5rem; border-bottom: 1px solid var(--border); }
.project-entry:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.project-header { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 0.25rem; }
.project-title { font-family: var(--font); font-size: 1.1875rem; font-weight: 400; color: var(--text); }
.project-year { font-size: 0.875rem; color: var(--muted); flex-shrink: 0; }
.project-type { font-size: 0.875rem; color: var(--muted); margin-bottom: 0.5rem; font-style: italic; }
.project-desc { font-size: 1rem; color: var(--text); line-height: 1.75; margin-bottom: 0.5rem; }
.project-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.5rem; }
.project-tag { font-size: 0.75rem; color: var(--muted); border: 1px solid var(--border); border-radius: 100px; padding: 2px 10px; }
.project-link { font-size: 0.875rem; color: var(--text); text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 2px; }
.project-link:hover { color: var(--muted); }

/* ============================================================
   MOBILE — small screen fixes (≤ 480px)
   ============================================================ */
@media (max-width: 480px) {
    body { font-size: 1.0625rem; line-height: 1.7; }

    .main-content { padding: 1.5rem 1rem 3rem; }

    /* Stack photo + info on very small screens */
    .profile-grid {
        flex-direction: column;
        gap: 1rem;
    }
    .photo-wrap { width: 80px; height: 80px; }
    .profile-name { font-size: 1.375rem; }

    .score-row { gap: 0.35rem; }
    .score-item { font-size: 0.875rem; }

    /* Post cards */
    .post-card-header { padding: 1.125rem 1.25rem; gap: 0.75rem; }
    .post-card-content { padding: 1rem 1.25rem 1.25rem; }
    .post-card-title { font-size: 1.125rem; }
    .post-card-date { font-size: 0.8125rem; }
    .post-card-type { font-size: 0.75rem; padding: 3px 9px; }
    .post-card-arrow { display: none; }

    /* Section titles */
    .section-title { font-size: 1.375rem; }

    /* Books / things / projects */
    .book-title, .thing-name, .project-title { font-size: 1.0625rem; }

    /* Footer */
    .footer-bottom { flex-direction: column; align-items: flex-start; gap: 0.5rem; }

    /* Logos strip */
    .logos-strip { gap: 0.5rem; padding: 0.75rem 0; }
    .logos-label, .logos-count { display: none; }

    /* Universities grid */
    .unis-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
    .uni-card { padding: 1rem; }
    .uni-card-name { font-size: 0.9375rem; }

    /* Consulting */
    .consult-topics-grid { grid-template-columns: 1fr; }
    .consult-cta-btns { flex-direction: column; }
}

/* ============================================================
   CONSULTING PAGE
   ============================================================ */
.consult-section-label {
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 1.25rem;
}

.consult-topics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .consult-topics-grid { grid-template-columns: repeat(2, 1fr); }
}

.consult-card {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.25rem 1.125rem;
    transition: border-color 0.15s;
}

.consult-card:hover { border-color: var(--text); }

.consult-icon {
    font-size: 1.625rem;
    line-height: 1;
    margin-bottom: 0.75rem;
}

.consult-title {
    font-family: var(--font);
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.375rem;
    line-height: 1.3;
}

.consult-desc {
    font-size: 0.9375rem;
    color: var(--muted);
    line-height: 1.65;
    margin: 0;
}

.consult-cta-block {
    border-top: 1px solid var(--border);
    padding-top: 2rem;
}

.consult-cta-title {
    font-family: var(--font);
    font-size: 1.4375rem;
    font-weight: 400;
    color: var(--text);
    margin-bottom: 0.4rem;
    line-height: 1.3;
}

.consult-cta-note {
    font-size: 0.9375rem;
    color: var(--muted);
    margin-bottom: 1.25rem;
    line-height: 1.65;
}

.consult-cta-btns {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.consult-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font);
    font-size: 1rem;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 0.45rem 1.25rem;
    text-decoration: none;
    transition: border-color 0.15s;
    white-space: nowrap;
}

.consult-btn:hover { border-color: var(--text); }
