/* =============================================
   Grant Tremblay — Personal Website
   Clean, modern, quasi-minimalist design
   ============================================= */

:root {
    --color-bg: #0a0e17;
    --color-bg-dark: #060a10;
    --color-text: #e8e8ed;
    --color-text-light: #e8e8ed;
    --color-muted: #9ca3af;
    --color-muted-light: #9ca3af;
    --color-accent: #60a5fa;
    --color-accent-hover: #93bbfd;
    --color-border: #1e293b;
    --color-border-dark: #1e293b;
    --color-card: #111827;
    --color-card-dark: #111827;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
    --max-width: 1200px;
    --nav-height: 64px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover { color: var(--color-accent-hover); }

/* Container */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.container-narrow { max-width: 720px; }

/* =============================================
   Navigation
   ============================================= */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: transparent;
    transition: background var(--transition), box-shadow var(--transition), backdrop-filter var(--transition);
}

.nav.scrolled {
    background: rgba(10, 14, 23, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}

.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-weight: 700;
    font-size: 1.25rem;
    color: white;
    letter-spacing: -0.02em;
    transition: color var(--transition);
}

.nav.scrolled .nav-logo { color: white; }

.nav-links {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-links a {
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    transition: color var(--transition);
    letter-spacing: 0.01em;
}

.nav-links a:hover { color: white; }

.nav.scrolled .nav-links a { color: rgba(255, 255, 255, 0.6); }
.nav.scrolled .nav-links a:hover { color: white; }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: all var(--transition);
}

.nav.scrolled .nav-toggle span { background: white; }

/* =============================================
   Hero
   ============================================= */

.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 40%;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(13, 17, 23, 0.4) 0%,
        rgba(13, 17, 23, 0.6) 50%,
        rgba(13, 17, 23, 0.85) 100%
    );
}

.hero-content {
    position: relative;
    text-align: center;
    color: white;
    padding: 0 24px;
}

.hero-pre {
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 0.8;
    margin-bottom: 16px;
}

.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    font-weight: 300;
    opacity: 0.85;
    max-width: 600px;
    margin: 0 auto;
}

.hero-scroll {
    display: inline-flex;
    margin-top: 48px;
    color: white;
    opacity: 0.6;
    transition: opacity var(--transition), transform var(--transition);
    animation: float 3s ease-in-out infinite;
}

.hero-scroll:hover {
    opacity: 1;
    color: white;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

/* =============================================
   Sections
   ============================================= */

.section {
    padding: 120px 0;
}

.section-dark {
    background: var(--color-bg-dark);
    color: var(--color-text-light);
}

.section:not(.section-dark) {
    background: var(--color-bg);
    color: var(--color-text-light);
}

.section-heading {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
}

.section-intro {
    font-size: 1.125rem;
    color: var(--color-muted-light);
    max-width: 680px;
    margin-bottom: 64px;
    line-height: 1.8;
}

/* =============================================
   About
   ============================================= */

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 64px;
    align-items: start;
}

.about-image img {
    border-radius: 12px;
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.05rem;
    color: var(--color-muted);
    line-height: 1.8;
}

.about-text p:first-of-type {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    color: #d1d5db;
    font-style: italic;
}

/* =============================================
   Research
   ============================================= */

.research-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    margin-bottom: 48px;
}

.research-card {
    background: var(--color-card-dark);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--color-border-dark);
    transition: transform var(--transition), box-shadow var(--transition);
}

.research-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.research-card-image {
    aspect-ratio: 16/10;
    overflow: hidden;
}

.research-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.research-card:hover .research-card-image img {
    transform: scale(1.05);
}

.research-card-body {
    padding: 24px;
}

.research-card-body h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--color-text-light);
}

.research-card-body p {
    font-size: 0.925rem;
    color: var(--color-muted-light);
    line-height: 1.7;
}

.research-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 28px;
    background: var(--color-accent);
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 8px;
    transition: background var(--transition), transform var(--transition);
}

.btn:hover {
    background: var(--color-accent-hover);
    color: white;
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: var(--color-text-light);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

/* =============================================
   Roles
   ============================================= */

.roles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.role-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 32px;
    transition: transform var(--transition), box-shadow var(--transition);
}

.role-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.role-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 16px;
    color: var(--color-accent);
}

.role-icon svg {
    width: 100%;
    height: 100%;
}

.role-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.role-card p {
    font-size: 0.9rem;
    color: var(--color-muted);
}

/* =============================================
   Outreach
   ============================================= */

.outreach-grid {
    display: flex;
    flex-direction: column;
    gap: 80px;
}

.outreach-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.outreach-item-reverse {
    direction: rtl;
}

.outreach-item-reverse > * {
    direction: ltr;
}

.outreach-image img {
    width: 100%;
    border-radius: 12px;
    aspect-ratio: 3/2;
    object-fit: cover;
}

.outreach-text h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.outreach-text p {
    color: var(--color-muted-light);
    font-size: 1rem;
    line-height: 1.8;
}

.section-dark .outreach-text a {
    color: var(--color-accent);
}

/* =============================================
   Books
   ============================================= */

.books-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 48px;
}

.book-card {
    display: flex;
    gap: 32px;
    align-items: start;
}

.book-image {
    flex-shrink: 0;
    width: 160px;
}

.book-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.book-text h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.book-subtitle {
    font-size: 0.875rem;
    color: var(--color-muted);
    margin-bottom: 12px;
    font-style: italic;
}

.book-text p {
    font-size: 0.925rem;
    color: var(--color-muted);
    margin-bottom: 12px;
}

.book-links a {
    font-weight: 500;
    font-size: 0.875rem;
}

.book-sep {
    color: var(--color-border);
    margin: 0 8px;
}

.book-donate {
    font-size: 0.825rem !important;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* =============================================
   Gallery
   ============================================= */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.gallery-item {
    overflow: hidden;
    border-radius: 8px;
    aspect-ratio: 1;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* =============================================
   Contact
   ============================================= */

#contact {
    text-align: center;
}

.contact-text {
    font-size: 1.125rem;
    color: var(--color-muted);
    max-width: 520px;
    margin: 0 auto 48px;
    line-height: 1.8;
}

.contact-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-light);
    transition: all var(--transition);
}

.contact-link:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    box-shadow: 0 4px 12px rgba(96, 165, 250, 0.15);
    transform: translateY(-2px);
}

.contact-link svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* =============================================
   Footer
   ============================================= */

.footer {
    padding: 48px 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer p {
    font-size: 0.8rem;
    color: var(--color-muted);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.footer-copy {
    margin-top: 12px !important;
    opacity: 0.6;
}

/* =============================================
   Animations
   ============================================= */

.fade-up {
    opacity: 0;
    transform: translateY(24px);
    animation: fadeUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.3s; }
.delay-3 { animation-delay: 0.5s; }

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =============================================
   Responsive
   ============================================= */

@media (max-width: 1024px) {
    .about-grid { grid-template-columns: 1fr; gap: 40px; }
    .about-image { max-width: 400px; }
    .research-grid { grid-template-columns: 1fr; }
    .roles-grid { grid-template-columns: repeat(2, 1fr); }
    .books-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .section { padding: 80px 0; }

    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        width: 280px;
        height: 100vh;
        background: rgba(10, 14, 23, 0.97);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 80px 32px 32px;
        gap: 8px;
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -8px 0 32px rgba(0, 0, 0, 0.4);
    }

    .nav-links.open {
        transform: translateX(0);
    }

    .nav-links a {
        color: var(--color-text-light) !important;
        font-size: 1rem;
        padding: 12px 0;
        display: block;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    .outreach-item,
    .outreach-item-reverse {
        grid-template-columns: 1fr;
        direction: ltr;
    }

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

    .book-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .book-image { width: 140px; }

    .contact-links {
        flex-direction: column;
        align-items: stretch;
    }

    .contact-link { justify-content: center; }
}

@media (max-width: 480px) {
    .hero-pre { font-size: 0.75rem; }
    .container { padding: 0 16px; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 4px; }
    .research-card-body { padding: 16px; }
    .role-card { padding: 24px; }
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    cursor: zoom-out;
}

.lightbox.active {
    opacity: 1;
    pointer-events: all;
}

.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.lightbox.active img {
    transform: scale(1);
}

/* =============================================
   Additions: subpages, blog, posts, publications
   ============================================= */

/* About actions / generic button rows */
.about-actions, .code-links { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }

/* Section head row (title + link) */
.section-head-row { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 8px; }
.section-head-row .section-heading { margin-bottom: 0; }
.section-head-link { font-size: 0.95rem; font-weight: 600; white-space: nowrap; }

/* Research group */
.group-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; margin-bottom: 28px; }
.group-card { background: var(--color-card); border: 1px solid var(--color-border); border-radius: 14px; overflow: hidden; }
.group-card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.group-card figcaption { padding: 20px 22px; }
.group-card figcaption strong { display: block; font-size: 1.05rem; margin-bottom: 4px; }
.group-card figcaption span { color: var(--color-muted); font-size: 0.9rem; }
.group-members { color: var(--color-muted); font-size: 1rem; max-width: 760px; }

/* Press & media */
.press-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.press-card { display: flex; flex-direction: column; background: var(--color-card); border: 1px solid var(--color-border); border-radius: 14px; overflow: hidden; transition: transform var(--transition), box-shadow var(--transition); }
.press-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(0,0,0,.35); }
.press-card-media { aspect-ratio: 16/9; overflow: hidden; }
.press-card-media img { width: 100%; height: 100%; object-fit: cover; }
.press-card-body { padding: 22px 24px 24px; }
.press-card-body h3 { font-size: 1.2rem; font-weight: 600; margin-bottom: 6px; line-height: 1.3; }
.press-badge { display: inline-block; font-size: 0.65rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #fff; background: var(--color-accent); padding: 2px 8px; border-radius: 999px; vertical-align: middle; margin-left: 6px; }
.press-ref { font-size: 0.875rem; color: var(--color-muted); margin-bottom: 14px; }
.press-links { display: flex; flex-wrap: wrap; gap: 8px; }
.press-links a { font-size: 0.8rem; font-weight: 500; padding: 5px 12px; border: 1px solid var(--color-border); border-radius: 999px; color: var(--color-text); }
.press-links a:hover { border-color: var(--color-accent); color: var(--color-accent); }

/* Blog teaser cards (home) */
.blog-teaser-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 40px; }
.blog-teaser-card { display: flex; flex-direction: column; background: var(--color-card); border: 1px solid var(--color-border); border-radius: 14px; overflow: hidden; color: inherit; transition: transform var(--transition), box-shadow var(--transition); }
.blog-teaser-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(0,0,0,.35); color: inherit; }
.blog-teaser-media { aspect-ratio: 16/9; overflow: hidden; background: var(--color-bg-dark); }
.blog-teaser-media img { width: 100%; height: 100%; object-fit: cover; }
.blog-teaser-body { padding: 20px 22px; }
.blog-teaser-body time { font-size: 0.78rem; letter-spacing: .04em; text-transform: uppercase; color: var(--color-muted); }
.blog-teaser-body h3 { font-size: 1.1rem; font-weight: 600; margin: 8px 0; line-height: 1.35; }
.blog-teaser-body p { font-size: 0.9rem; color: var(--color-muted); }

/* =============================================
   Interior page header (bio, banneker, 404)
   ============================================= */
.page-header { padding: calc(var(--nav-height) + 72px) 0 40px; background: linear-gradient(180deg, #0b1220, var(--color-bg)); border-bottom: 1px solid var(--color-border); }
.page-title { font-family: var(--font-serif); font-size: clamp(2.2rem, 5vw, 3.2rem); font-weight: 600; letter-spacing: -0.02em; }
.page-subtitle { color: var(--color-muted); font-size: 1.15rem; margin-top: 10px; }
.page-body { padding: 56px 0 96px; }

/* Shared long-form prose (bio, banneker, posts) */
.page-body, .post-body { font-size: 1.075rem; line-height: 1.85; color: #d7dbe3; }
.page-body p, .post-body p { margin: 0 0 1.4em; }
.post-body h2, .page-body h2 { font-family: var(--font-serif); font-size: 1.7rem; font-weight: 600; letter-spacing: -0.01em; margin: 2em 0 .7em; color: #fff; }
.post-body h3, .page-body h3 { font-size: 1.3rem; font-weight: 600; margin: 1.7em 0 .6em; color: #fff; }
.post-body img, .page-body img, .post-body video, .page-body video { width: 100%; height: auto; border-radius: 12px; margin: 1.8em 0 .6em; display: block; background: #05080d; }
.post-body em img { margin: 0; }
.post-body blockquote, .page-body blockquote { margin: 1.6em 0; padding: 6px 0 6px 24px; border-left: 3px solid var(--color-accent); color: #c3c9d4; font-style: italic; }
.post-body ul, .post-body ol, .page-body ul, .page-body ol { margin: 0 0 1.4em 1.3em; }
.post-body li, .page-body li { margin-bottom: .5em; }
.post-body hr { border: none; border-top: 1px solid var(--color-border); margin: 2.4em 0; }
.post-body code, .page-body code { background: #11161f; border: 1px solid var(--color-border); border-radius: 5px; padding: .12em .4em; font-size: .9em; }
.post-body pre { background: #0b0f17; border: 1px solid var(--color-border); border-radius: 10px; padding: 16px 18px; overflow-x: auto; margin: 1.6em 0; }
.post-body pre code { background: none; border: none; padding: 0; }
.post-video { width: 100%; border-radius: 12px; margin: 1.8em 0 .6em; display: block; }
/* image captions — italic paragraph right after an image */
.post-body p > em:only-child, .page-body p > em:only-child { display: block; text-align: center; font-size: .9rem; color: var(--color-muted); }

/* =============================================
   Blog index ("Great Observatories")
   ============================================= */
.blog-hero { position: relative; padding: calc(var(--nav-height) + 90px) 0 70px; text-align: center; overflow: hidden; }
.blog-hero-bg { position: absolute; inset: 0; }
.blog-hero-bg img { width: 100%; height: 100%; object-fit: cover; opacity: .38; }
.blog-hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,11,18,.6), var(--color-bg)); }
.blog-hero-inner { position: relative; }
.blog-hero h1 { font-family: var(--font-serif); font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 600; letter-spacing: -0.02em; }
.blog-hero p { color: var(--color-muted); font-size: 1.1rem; margin-top: 12px; max-width: 620px; margin-inline: auto; }
.blog-filters { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin: 36px 0 8px; }
.blog-filter { font-size: .82rem; font-weight: 600; padding: 7px 16px; border: 1px solid var(--color-border); border-radius: 999px; color: var(--color-muted); cursor: pointer; background: none; transition: all var(--transition); }
.blog-filter:hover { color: var(--color-text); border-color: var(--color-accent); }
.blog-filter.active { background: var(--color-accent); border-color: var(--color-accent); color: #fff; }

.blog-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; padding: 56px 0 100px; }
.blog-card { display: flex; flex-direction: column; background: var(--color-card); border: 1px solid var(--color-border); border-radius: 16px; overflow: hidden; color: inherit; transition: transform var(--transition), box-shadow var(--transition); }
.blog-card:hover { transform: translateY(-5px); box-shadow: 0 22px 48px rgba(0,0,0,.4); color: inherit; }
.blog-card-media { aspect-ratio: 16/9; overflow: hidden; background: var(--color-bg-dark); }
.blog-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.4,0,.2,1); }
.blog-card:hover .blog-card-media img { transform: scale(1.05); }
.blog-card-body { padding: 26px 28px 30px; display: flex; flex-direction: column; flex: 1; }
.blog-card-meta { font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; color: var(--color-muted); display: flex; gap: 10px; align-items: center; }
.blog-card-cat { color: var(--color-accent); font-weight: 600; }
.blog-card h2 { font-family: var(--font-serif); font-size: 1.5rem; font-weight: 600; line-height: 1.25; margin: 12px 0 10px; }
.blog-card p { font-size: .95rem; color: var(--color-muted); flex: 1; }
.blog-card .read-more { margin-top: 16px; font-size: .85rem; font-weight: 600; color: var(--color-accent); }

/* =============================================
   Post hero / footer
   ============================================= */
.post-hero { position: relative; padding: calc(var(--nav-height) + 100px) 0 56px; overflow: hidden; }
.post-hero--plain { background: linear-gradient(180deg, #0b1220, var(--color-bg)); border-bottom: 1px solid var(--color-border); }
.post-hero-bg { position: absolute; inset: 0; }
.post-hero-bg img { width: 100%; height: 100%; object-fit: cover; opacity: .5; }
.post-hero-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,11,18,.55) 0%, rgba(8,11,18,.78) 70%, var(--color-bg) 100%); }
.post-hero-inner { position: relative; }
.post-back { font-size: .85rem; font-weight: 600; color: rgba(255,255,255,.85); }
.post-back:hover { color: #fff; }
.post-cats { margin: 20px 0 10px; display: flex; gap: 8px; }
.post-cat { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #fff; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); padding: 3px 10px; border-radius: 999px; }
.post-title { font-family: var(--font-serif); font-size: clamp(2rem, 5vw, 3.1rem); font-weight: 600; line-height: 1.12; letter-spacing: -0.02em; color: #fff; }
.post-subtitle { color: #c9cfda; font-size: 1.2rem; margin-top: 12px; }
.post-meta { margin-top: 16px; color: var(--color-muted); font-size: .9rem; }
.post-meta .dot { margin: 0 8px; }
.post-body { padding: 48px 0 10px; }
.post-footer { padding: 24px 0 90px; }
.post-share { display: flex; align-items: center; gap: 14px; padding: 20px 0; border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
.post-share span { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--color-muted); }
.post-share a { font-size: .9rem; font-weight: 600; }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 32px 0; }
.post-nav a { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; border: 1px solid var(--color-border); border-radius: 12px; color: inherit; }
.post-nav a:hover { border-color: var(--color-accent); }
.post-nav-next { text-align: right; }
.post-nav span { font-size: .78rem; color: var(--color-muted); }
.post-nav strong { font-weight: 600; font-size: .98rem; }
.post-allposts { display: inline-flex; }

/* =============================================
   Publications
   ============================================= */
.pub-controls { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin: 8px 0 8px; }
.pub-search { flex: 1; min-width: 220px; background: var(--color-card); border: 1px solid var(--color-border); border-radius: 10px; color: var(--color-text); font: inherit; font-size: .95rem; padding: 12px 16px; }
.pub-search:focus { outline: none; border-color: var(--color-accent); }
.pub-stats { color: var(--color-muted); font-size: .9rem; }
.pub-updated { color: var(--color-muted); font-size: .85rem; margin-bottom: 28px; }
.pub-year-group { margin-bottom: 40px; }
.pub-year { font-family: var(--font-serif); font-size: 1.6rem; font-weight: 600; color: var(--color-accent); padding-bottom: 8px; border-bottom: 1px solid var(--color-border); margin-bottom: 18px; position: sticky; top: var(--nav-height); background: var(--color-bg); z-index: 1; }
.pub-item { padding: 16px 0; border-bottom: 1px solid rgba(255,255,255,.05); }
.pub-item h3 { font-size: 1.08rem; font-weight: 600; line-height: 1.4; margin-bottom: 6px; }
.pub-item h3 a { color: #eef1f6; }
.pub-item h3 a:hover { color: var(--color-accent); }
.pub-authors { font-size: .9rem; color: var(--color-muted); margin-bottom: 6px; }
.pub-authors .me { color: var(--color-text); font-weight: 600; }
.pub-venue { font-size: .88rem; color: var(--color-muted); font-style: italic; }
.pub-badges { display: inline-flex; gap: 8px; margin-left: 6px; vertical-align: middle; }
.pub-badge { font-size: .72rem; font-weight: 600; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--color-border); color: var(--color-muted); font-style: normal; }
.pub-links { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; }
.pub-links a { font-size: .76rem; font-weight: 600; padding: 4px 11px; border: 1px solid var(--color-border); border-radius: 999px; }
.pub-links a:hover { border-color: var(--color-accent); color: var(--color-accent); }
.pub-empty { color: var(--color-muted); padding: 40px 0; text-align: center; }

/* =============================================
   Bio gallery
   ============================================= */
.bio-portrait { float: none; width: 100%; border-radius: 14px; margin: 0 0 28px; }
.bio-gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 40px 0; }
.bio-gallery .gallery-item { aspect-ratio: 1; }
@media (max-width: 760px) { .bio-gallery { grid-template-columns: repeat(2, 1fr); } }

/* Footer social */
.footer-social { display: flex; justify-content: center; flex-wrap: wrap; gap: 20px; margin-bottom: 22px; }
.footer-social a { font-size: .85rem; font-weight: 500; color: var(--color-muted); }
.footer-social a:hover { color: var(--color-accent); }
.footer-disclaimer { font-size: .8rem; }

/* =============================================
   Responsive tweaks for new components
   ============================================= */
@media (max-width: 900px) {
  .press-grid, .group-grid, .blog-list, .blog-teaser-grid, .post-nav { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .post-nav-next { text-align: left; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; }
  .fade-up { animation: none !important; opacity: 1 !important; transform: none !important; }
  .hero-scroll { animation: none; }
  html { scroll-behavior: auto; }
}
