/* ============================================================
   MediVerse public site - v2 design system
   ============================================================ */

:root {
    /* palette */
    --c-ink: #06061a;
    --c-ink-2: #14152b;
    --c-ink-3: #1e1f3a;
    --c-muted: #5a5a72;
    --c-line: #e6e8ee;
    --c-surface: #ffffff;
    --c-bg: #fafbfd;
    --c-bg-2: #f1f2f7;
    --c-accent: #7b68ee;
    --c-accent-2: #9a8cff;
    --c-accent-soft: #efedff;
    --c-magenta: #ff5ec8;
    --c-cyan: #36e3e3;
    --c-amber: #ffb648;
    --c-on-dark: #f4f4fa;
    --c-on-dark-muted: #a8a9c4;

    /* gradients */
    --g-brand: linear-gradient(135deg, #7b68ee 0%, #ff5ec8 100%);
    --g-brand-soft: linear-gradient(135deg, #7b68ee 0%, #36e3e3 100%);
    --g-text: linear-gradient(90deg, #b9adff 0%, #ff8edc 50%, #6fe6e6 100%);
    --g-mesh:
        radial-gradient(at 18% 24%, rgba(123, 104, 238, 0.55) 0px, transparent 45%),
        radial-gradient(at 84% 12%, rgba(255, 94, 200, 0.40) 0px, transparent 45%),
        radial-gradient(at 70% 70%, rgba(54, 227, 227, 0.35) 0px, transparent 45%),
        radial-gradient(at 18% 88%, rgba(123, 104, 238, 0.45) 0px, transparent 50%);

    /* typography */
    --f-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --f-display: 'Space Grotesk', 'Inter', -apple-system, sans-serif;

    /* radius + shadow */
    --r-sm: 6px;
    --r-md: 14px;
    --r-lg: 20px;
    --r-pill: 999px;
    --sh-sm: 0 1px 2px rgba(15, 16, 36, 0.04), 0 1px 3px rgba(15, 16, 36, 0.06);
    --sh-md: 0 6px 14px rgba(15, 16, 36, 0.06), 0 14px 30px rgba(15, 16, 36, 0.08);
    --sh-lg: 0 18px 40px rgba(15, 16, 36, 0.14);
    --sh-glow: 0 0 0 1px rgba(123, 104, 238, 0.25), 0 12px 32px rgba(123, 104, 238, 0.20);

    /* layout */
    --container: 1180px;
    --gutter: clamp(1rem, 4vw, 2rem);
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ----------- reset / base ----------- */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--f-sans);
    font-size: 16px;
    line-height: 1.65;
    color: var(--c-ink-2);
    background: var(--c-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-accent); text-decoration: none; }
a:hover { color: var(--c-ink-2); }
h1, h2, h3, h4 {
    font-family: var(--f-display);
    color: var(--c-ink);
    line-height: 1.15;
    margin: 0 0 0.5em;
    letter-spacing: -0.02em;
}
h1 { font-weight: 700; font-size: clamp(2.1rem, 4.5vw, 3rem); }
h2 { font-weight: 700; font-size: clamp(1.625rem, 2.6vw, 2.125rem); }
h3 { font-weight: 600; font-size: 1.25rem; font-family: var(--f-sans); letter-spacing: -0.01em; }
p  { margin: 0 0 1rem; }

::selection { background: rgba(123, 104, 238, 0.25); color: var(--c-ink); }

/* ----------- layout helpers ----------- */

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding-left: var(--gutter);
    padding-right: var(--gutter);
}
.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; position: relative; }
.section--tight { padding: clamp(2rem, 4vw, 3rem) 0; }
.section--alt { background: var(--c-bg-2); }
.section--dark {
    background: var(--c-ink);
    color: var(--c-on-dark);
    position: relative;
    overflow: hidden;
}
.section--dark::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--g-mesh);
    opacity: 0.55;
    pointer-events: none;
}
.section--dark > .container { position: relative; z-index: 1; }
.section--dark h2, .section--dark h3 { color: #fff; }
.section--dark p { color: var(--c-on-dark-muted); }

.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--c-accent);
    margin-bottom: 0.75rem;
}
.section-eyebrow::before {
    content: "";
    width: 22px;
    height: 2px;
    background: var(--g-brand);
    border-radius: 2px;
}
.section--dark .section-eyebrow { color: var(--c-accent-2); }
.section--dark .section-eyebrow::before { background: linear-gradient(90deg, var(--c-cyan), var(--c-magenta)); }
.section-title { margin-bottom: 0.75rem; }
.section-lead {
    color: var(--c-muted);
    max-width: 760px;
    font-size: 1.05rem;
    margin-bottom: clamp(2rem, 4vw, 3rem);
}
.section--dark .section-lead { color: var(--c-on-dark-muted); }

.grid { display: grid; gap: clamp(1rem, 2.5vw, 1.75rem); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid--2x2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 760px) {
    .grid--2x2 { grid-template-columns: 1fr; }
}

.gradient-text {
    background: var(--g-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ----------- top navigation ----------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--c-line);
}
.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--c-ink);
    font-weight: 700;
    font-family: var(--f-display);
    font-size: 1.18rem;
    letter-spacing: -0.02em;
}
.brand:hover { color: var(--c-accent); }
.brand__mark {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: var(--g-brand);
    display: inline-block;
    box-shadow: 0 4px 12px rgba(123, 104, 238, 0.35);
    position: relative;
    overflow: hidden;
}
.brand__mark::after {
    content: "";
    position: absolute;
    inset: 4px;
    border-radius: 6px;
    border: 1.5px solid rgba(255, 255, 255, 0.6);
}
.site-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: clamp(1rem, 2vw, 1.75rem);
    align-items: center;
}
.site-nav a {
    color: var(--c-ink-2);
    font-weight: 500;
    font-size: 0.94rem;
    padding: 0.5rem 0;
    position: relative;
}
.site-nav a:hover { color: var(--c-accent); }
.site-nav a.is-cta {
    color: #fff;
    background: var(--c-ink);
    padding: 0.55rem 1.1rem;
    border-radius: var(--r-pill);
    font-weight: 600;
    transition: background 0.2s ease, transform 0.15s ease;
}
.site-nav a.is-cta:hover { background: var(--c-accent); transform: translateY(-1px); }
.nav-toggle {
    display: none;
    background: none;
    border: 0;
    font-size: 1.5rem;
    color: var(--c-ink);
    cursor: pointer;
}
@media (max-width: 760px) {
    .nav-toggle { display: inline-block; }
    .site-nav {
        display: none;
        position: absolute;
        top: 68px;
        left: 0;
        right: 0;
        background: #fff;
        border-bottom: 1px solid var(--c-line);
        box-shadow: var(--sh-md);
    }
    .site-nav.is-open { display: block; }
    .site-nav ul {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0.5rem 0;
    }
    .site-nav li { padding: 0 var(--gutter); }
    .site-nav a { display: block; padding: 0.75rem 0; }
    .site-nav a.is-cta { text-align: center; margin: 0.5rem 0; }
}

/* ----------- HERO ----------- */

.hero {
    position: relative;
    background: var(--c-ink);
    color: var(--c-on-dark);
    overflow: hidden;
    isolation: isolate;
}
.hero__bg {
    position: absolute;
    inset: 0;
    background: var(--g-mesh);
    opacity: 0.95;
    animation: heroDrift 22s ease-in-out infinite alternate;
    z-index: -2;
}
.hero__noise {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.06 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
    opacity: 0.5;
    mix-blend-mode: overlay;
    z-index: -1;
    pointer-events: none;
}
.hero__orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.55;
    pointer-events: none;
    z-index: -1;
}
.hero__orb--a {
    width: 460px; height: 460px;
    background: radial-gradient(circle at 30% 30%, #7b68ee, transparent 70%);
    top: -150px; left: -120px;
    animation: orbFloat 18s ease-in-out infinite alternate;
}
.hero__orb--b {
    width: 380px; height: 380px;
    background: radial-gradient(circle at 50% 50%, #ff5ec8, transparent 70%);
    bottom: -120px; right: -100px;
    animation: orbFloat 22s ease-in-out infinite alternate-reverse;
}
.hero__orb--c {
    width: 260px; height: 260px;
    background: radial-gradient(circle at 50% 50%, #36e3e3, transparent 70%);
    top: 40%; right: 30%;
    opacity: 0.35;
    animation: orbFloat 26s ease-in-out infinite alternate;
}

@keyframes heroDrift {
    0%   { transform: scale(1) translate(0, 0); }
    100% { transform: scale(1.05) translate(-2%, 2%); }
}
@keyframes orbFloat {
    0%   { transform: translate(0, 0); }
    100% { transform: translate(40px, -30px); }
}

.hero__inner {
    position: relative;
    padding: clamp(5rem, 12vw, 8.5rem) 0 clamp(4rem, 8vw, 6rem);
    max-width: 860px;
}
.hero__chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.9rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #e7e6ff;
    border-radius: var(--r-pill);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    margin-bottom: 1.75rem;
    backdrop-filter: blur(6px);
}
.hero__chip::before {
    content: "";
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--c-cyan);
    box-shadow: 0 0 10px var(--c-cyan);
    animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.55; transform: scale(0.85); }
}

.hero__title {
    color: #fff;
    font-family: var(--f-display);
    font-size: clamp(2.5rem, 6.5vw, 4.75rem);
    font-weight: 700;
    margin-bottom: 1.25rem;
    letter-spacing: -0.035em;
    line-height: 1.04;
}
.hero__title .gradient-text { display: inline-block; }
.hero__tagline {
    color: #d6d4ee;
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    margin-bottom: 2.25rem;
    max-width: 660px;
    line-height: 1.55;
}
.hero__actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 3rem; }

.hero__stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 1.75rem;
    max-width: 760px;
}
.hero__stat-num {
    font-family: var(--f-display);
    font-size: clamp(1.5rem, 2.5vw, 1.9rem);
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
    line-height: 1;
}
.hero__stat-label {
    font-size: 0.82rem;
    color: var(--c-on-dark-muted);
    margin-top: 0.35rem;
}

.hero__wave {
    position: absolute;
    left: 0; right: 0; bottom: -1px;
    width: 100%;
    height: 90px;
    display: block;
    color: var(--c-bg);
}

/* ----------- buttons ----------- */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.4rem;
    border-radius: var(--r-pill);
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid transparent;
    transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    position: relative;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary {
    background: var(--g-brand);
    color: #fff;
    box-shadow: 0 8px 22px rgba(123, 104, 238, 0.35);
}
.btn--primary:hover {
    color: #fff;
    box-shadow: 0 12px 28px rgba(255, 94, 200, 0.35);
}
.btn--ghost {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(8px);
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.18); color: #fff; border-color: #fff; }
.btn--outline {
    background: transparent;
    color: var(--c-accent);
    border-color: var(--c-accent);
}
.btn--outline:hover { background: var(--c-accent); color: #fff; }

/* ----------- stat strip (big numbers) ----------- */

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 2rem;
    text-align: left;
}
.stats__item {
    position: relative;
    padding: 0 1rem 0 1.25rem;
    border-left: 2px solid rgba(255, 255, 255, 0.1);
}
.stats__num {
    font-family: var(--f-display);
    font-size: clamp(2.5rem, 5vw, 3.6rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.03em;
    background: var(--g-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.stats__label {
    margin-top: 0.5rem;
    color: var(--c-on-dark-muted);
    font-size: 0.92rem;
    line-height: 1.4;
}

/* ----------- generic card ----------- */

.card {
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    border-radius: var(--r-md);
    padding: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    position: relative;
}
.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--sh-md);
    border-color: transparent;
}
.card__icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--g-brand);
    color: #fff;
    font-size: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 6px 14px rgba(123, 104, 238, 0.25);
}
.card__title { font-size: 1.06rem; font-weight: 700; margin-bottom: 0.4rem; }
.card__body { color: var(--c-muted); font-size: 0.95rem; margin: 0; }

/* ----------- publications ----------- */

.pub {
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    border-radius: var(--r-md);
    padding: 1.75rem 1.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    transition: border-color 0.2s ease, box-shadow 0.25s ease, transform 0.2s ease;
    position: relative;
    overflow: hidden;
}
.pub::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: var(--r-md);
    padding: 1px;
    background: var(--g-brand-soft);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}
.pub:hover { transform: translateY(-3px); box-shadow: var(--sh-md); border-color: transparent; }
.pub:hover::before { opacity: 1; }
.pub__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.8rem;
    color: var(--c-muted);
}
.pub__badge {
    background: var(--g-brand);
    color: #fff;
    padding: 0.22rem 0.7rem;
    border-radius: var(--r-pill);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.7rem;
    box-shadow: 0 4px 10px rgba(123, 104, 238, 0.25);
}
.pub__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--c-ink);
    margin: 0;
    line-height: 1.32;
    font-family: var(--f-sans);
    letter-spacing: -0.01em;
}
.pub__authors { font-size: 0.92rem; color: var(--c-muted); margin: 0; }
.pub__authors strong { color: var(--c-ink); font-weight: 700; }
.pub__venue { font-size: 0.86rem; color: var(--c-ink-2); font-style: italic; margin: 0; }
.pub__links { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 0.25rem; font-size: 0.875rem; }
.pub__links a { font-weight: 600; }

.pub__results { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.25rem; }
.pub__result {
    background: var(--c-accent-soft);
    color: var(--c-ink-2);
    padding: 0.4rem 0.8rem;
    border-radius: var(--r-pill);
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(123, 104, 238, 0.15);
}
.pub__result strong { color: var(--c-accent); margin-right: 0.3rem; font-weight: 800; }

.pub details {
    margin-top: 0.4rem;
    border-top: 1px solid var(--c-line);
    padding-top: 0.85rem;
}
.pub summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--c-accent);
    list-style: none;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    user-select: none;
}
.pub summary::-webkit-details-marker { display: none; }
.pub summary::after {
    content: "+";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: var(--c-accent-soft);
    color: var(--c-accent);
    font-weight: 700;
    transition: transform 0.2s ease;
}
.pub details[open] summary::after { content: "\2212"; transform: rotate(180deg); }
.pub details p {
    color: var(--c-muted);
    font-size: 0.93rem;
    margin: 0.85rem 0 0;
    line-height: 1.7;
}

/* ----------- About: wide 2-column intro layout ----------- */

.about-grid {
    display: block;
    margin-top: 1.5rem;
    max-width: 780px;
}
.about-grid p {
    font-size: 1.05rem;
    color: var(--c-muted);
    line-height: 1.75;
    margin: 0 0 1.25rem;
}
.about-grid p:last-child { margin-bottom: 0; }

.section-lead--wide { max-width: none; }

/* ----------- Thesis abstract section ----------- */

.thesis {
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    border-radius: var(--r-lg);
    padding: clamp(2rem, 4vw, 3.5rem);
    margin-top: 1.5rem;
    box-shadow: var(--sh-sm);
    position: relative;
    overflow: hidden;
}
.thesis::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 6px;
    height: 100%;
    background: var(--g-brand);
    border-radius: 0 6px 6px 0;
}
.thesis__label {
    display: inline-block;
    font-family: var(--f-display);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--c-accent);
    margin-bottom: 1rem;
    font-weight: 700;
}
.thesis__para {
    font-size: 1.02rem;
    line-height: 1.85;
    color: var(--c-ink-2);
    margin: 0 0 1.25rem;
    max-width: 880px;
    text-align: justify;
    hyphens: auto;
}
.thesis__para:last-child { margin-bottom: 0; }
.thesis__para:first-of-type::first-letter {
    font-family: var(--f-display);
    font-size: 3.4rem;
    font-weight: 700;
    line-height: 1;
    float: left;
    padding: 0.15rem 0.6rem 0 0;
    background: var(--g-brand);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.thesis__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding-top: 1.5rem;
    margin-top: 1.5rem;
    border-top: 1px solid var(--c-line);
    font-size: 0.85rem;
    color: var(--c-muted);
}
.thesis__meta strong { color: var(--c-ink); font-weight: 700; }

/* ----------- FAQ accordion ----------- */

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    max-width: 880px;
}

.faq-acc {
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    border-radius: var(--r-md);
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.faq-acc:hover { border-color: rgba(123, 104, 238, 0.3); box-shadow: var(--sh-sm); }
.faq-acc[open] {
    background: linear-gradient(180deg, #ffffff 0%, var(--c-bg) 100%);
    border-color: rgba(123, 104, 238, 0.4);
    box-shadow: var(--sh-sm);
}

.faq-acc__head {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.05rem 1.4rem;
    cursor: pointer;
    list-style: none;
    user-select: none;
    font-family: var(--f-sans);
    font-weight: 600;
    color: var(--c-ink);
    font-size: 1.02rem;
}
.faq-acc__head::-webkit-details-marker { display: none; }

.faq-acc__icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--c-accent-soft);
    color: var(--c-accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1;
    transition: background 0.2s ease, color 0.2s ease, transform 0.25s ease;
    margin-left: auto;
}
.faq-acc[open] .faq-acc__icon {
    background: var(--g-brand);
    color: #fff;
    transform: rotate(45deg);
}

.faq-acc__body {
    padding: 0 1.4rem 1.25rem;
    color: var(--c-muted);
    font-size: 0.96rem;
    line-height: 1.7;
    border-top: 1px solid var(--c-line);
    margin-top: 0;
    padding-top: 1rem;
    animation: accSlide 0.3s ease;
}
.faq-acc__body p { margin: 0 0 0.75rem; }
.faq-acc__body p:last-child { margin-bottom: 0; }
.faq-acc__body ul { padding-left: 1.25rem; margin: 0.5rem 0 0; }
.faq-acc__body li { margin-bottom: 0.4rem; }

/* ----------- publications accordion (vertical collapsible) ----------- */

.pub-acc-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.pub-acc {
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    border-radius: var(--r-md);
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.pub-acc:hover { border-color: rgba(123, 104, 238, 0.35); box-shadow: var(--sh-sm); }
.pub-acc[open] {
    border-color: transparent;
    box-shadow: var(--sh-md);
    background: linear-gradient(180deg, #ffffff 0%, var(--c-bg) 100%);
}
.pub-acc[open]::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: var(--r-md);
    padding: 1px;
    background: var(--g-brand-soft);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
}
.pub-acc { position: relative; }

.pub-acc__head {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    list-style: none;
    user-select: none;
    transition: background 0.15s ease;
}
.pub-acc__head::-webkit-details-marker { display: none; }
.pub-acc:not([open]) .pub-acc__head:hover { background: var(--c-bg); }

.pub-acc__head-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 0;
}
.pub-acc__row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    font-size: 0.8rem;
    color: var(--c-muted);
}
.pub-acc__title {
    font-family: var(--f-sans);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--c-ink);
    margin: 0;
    line-height: 1.35;
    letter-spacing: -0.01em;
}
.pub-acc__year {
    font-family: var(--f-display);
    font-weight: 700;
    color: var(--c-muted);
    font-size: 0.95rem;
    margin-left: auto;
    white-space: nowrap;
}
.pub-acc__chevron {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--c-accent-soft);
    color: var(--c-accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.15rem;
    line-height: 1;
    transition: background 0.2s ease, color 0.2s ease, transform 0.25s ease;
}
.pub-acc[open] .pub-acc__chevron {
    background: var(--g-brand);
    color: #fff;
    transform: rotate(180deg);
}

.pub-acc__body {
    padding: 0 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    border-top: 1px solid var(--c-line);
    margin-top: 0.25rem;
    padding-top: 1.25rem;
    animation: accSlide 0.35s ease;
}
@keyframes accSlide {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.pub-acc__authors { font-size: 0.93rem; color: var(--c-muted); margin: 0; }
.pub-acc__authors strong { color: var(--c-ink); font-weight: 700; }
.pub-acc__venue { font-size: 0.88rem; color: var(--c-ink-2); font-style: italic; margin: 0; }
.pub-acc__abstract-label {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--c-accent);
    margin-top: 0.5rem;
}
.pub-acc__abstract { color: var(--c-muted); font-size: 0.93rem; line-height: 1.7; margin: 0; }

@media (max-width: 540px) {
    .pub-acc__head { padding: 1rem 1.1rem; gap: 0.6rem; }
    .pub-acc__title { font-size: 0.98rem; }
    .pub-acc__year { display: none; }
    .pub-acc__body { padding: 0 1.1rem 1.1rem; padding-top: 1rem; }
}

/* ----------- video embed ----------- */

.video {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--r-lg);
    box-shadow: 0 30px 60px rgba(15, 16, 36, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.04);
    background: var(--c-ink);
}
.video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ----------- interactive demo widget ----------- */

.demo {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

.demo__panel {
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    border-radius: var(--r-lg);
    padding: 1.5rem;
    box-shadow: var(--sh-sm);
}

.demo__row {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    flex-wrap: nowrap;
}
@media (max-width: 540px) { .demo__row { flex-wrap: wrap; } }

.demo__input {
    flex: 1;
    min-width: 0;
    padding: 0.85rem 1rem;
    font-size: 1rem;
    font-family: var(--f-sans);
    border: 1px solid var(--c-line);
    border-radius: var(--r-pill);
    background: var(--c-bg);
    color: var(--c-ink);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.demo__input:focus {
    outline: none;
    background: #fff;
    border-color: var(--c-accent);
    box-shadow: 0 0 0 3px rgba(123, 104, 238, 0.12);
}

.demo__mic, .demo__run {
    height: 46px;
    border-radius: var(--r-pill);
    border: 0;
    cursor: pointer;
    font-weight: 600;
    font-family: var(--f-sans);
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.demo__mic {
    width: 46px;
    background: var(--c-bg-2);
    color: var(--c-ink);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--c-line);
}
.demo__mic:hover { background: var(--c-accent-soft); color: var(--c-accent); border-color: var(--c-accent); }
.demo__mic.is-listening {
    background: var(--g-brand);
    color: #fff;
    border-color: transparent;
    animation: micPulse 1.4s ease-in-out infinite;
}
.demo__mic[disabled] { opacity: 0.4; cursor: not-allowed; }
@keyframes micPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(123, 104, 238, 0.4); }
    50% { box-shadow: 0 0 0 12px rgba(123, 104, 238, 0); }
}
.demo__mic svg { width: 18px; height: 18px; }

.demo__run {
    padding: 0 1.4rem;
    background: var(--g-brand);
    color: #fff;
    box-shadow: 0 6px 16px rgba(123, 104, 238, 0.28);
}
.demo__run:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(255, 94, 200, 0.32); }

.demo__hint {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--c-muted);
}

.demo__chips {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}
.demo__chip {
    background: var(--c-bg-2);
    color: var(--c-ink-2);
    padding: 0.45rem 0.85rem;
    border-radius: var(--r-pill);
    border: 1px solid var(--c-line);
    font-size: 0.83rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.demo__chip:hover {
    background: var(--c-accent-soft);
    color: var(--c-accent);
    border-color: var(--c-accent);
}
.demo__chip.is-active {
    background: var(--g-brand);
    color: #fff;
    border-color: transparent;
}

.demo__result { min-height: 360px; }
.demo__result-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--c-line);
}
.demo__type {
    background: var(--g-brand);
    color: #fff;
    padding: 0.25rem 0.7rem;
    border-radius: var(--r-pill);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.demo__viz-title {
    font-family: var(--f-display);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--c-ink);
    margin: 0;
}
.demo__viz-quote {
    margin-left: auto;
    font-size: 0.82rem;
    color: var(--c-muted);
    font-style: italic;
    max-width: 100%;
}

.demo__canvas-wrap {
    position: relative;
    height: 340px;
    animation: vizFade 0.4s ease;
}
@keyframes vizFade {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* heatmap rendered as CSS grid */
.demo__heatmap {
    display: grid;
    gap: 6px;
    padding: 0.5rem;
    animation: vizFade 0.4s ease;
}
.demo__heat-cell {
    aspect-ratio: 1 / 0.55;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: #fff;
    transition: transform 0.15s ease;
}
.demo__heat-cell:hover { transform: scale(1.05); }
.demo__heat-row-label, .demo__heat-col-label {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--c-muted);
}
.demo__heat-corner { background: transparent; }

/* table view */
.demo__table-wrap { overflow-x: auto; animation: vizFade 0.4s ease; }
.demo__table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.demo__table th, .demo__table td {
    padding: 0.7rem 0.9rem;
    text-align: left;
    border-bottom: 1px solid var(--c-line);
}
.demo__table th {
    background: var(--c-bg-2);
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    color: var(--c-ink);
}
.demo__table tr:hover td { background: var(--c-bg); }

/* AI explanation */
.demo__explanation {
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, rgba(123, 104, 238, 0.06) 0%, rgba(255, 94, 200, 0.06) 100%);
    border-left: 4px solid var(--c-accent);
    border-radius: 8px;
    color: var(--c-ink-2);
    font-size: 0.98rem;
    line-height: 1.75;
    animation: vizFade 0.4s ease;
    min-height: 180px;
}
.demo__explanation-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--c-accent);
    margin-bottom: 0.75rem;
}
.demo__explanation-label::before {
    content: "";
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--c-cyan);
    box-shadow: 0 0 8px var(--c-cyan);
    animation: pulse 1.6s ease-in-out infinite;
}
.demo__cursor {
    display: inline-block;
    width: 2px;
    height: 1.05em;
    background: var(--c-accent);
    vertical-align: text-bottom;
    margin-left: 2px;
    animation: cursorBlink 0.9s steps(2) infinite;
}
@keyframes cursorBlink { 50% { opacity: 0; } }

/* ----------- Admin: no page-header banner, compact title block ----------- */

body.is-admin .page-header { display: none; }
body.is-admin .section { padding-top: clamp(1.25rem, 2.5vw, 2rem); }

.admin-page-head {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--c-line);
}
.admin-page-head__crumb {
    font-size: 0.82rem;
    color: var(--c-muted);
    margin-bottom: 0.4rem;
}
.admin-page-head__crumb a { color: var(--c-accent); font-weight: 500; }
.admin-page-head__crumb a:hover { color: var(--c-ink); }
.admin-page-head__crumb span { margin: 0 0.35rem; opacity: 0.4; }
.admin-page-head h1 {
    font-family: var(--f-display);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--c-ink);
    margin: 0 0 0.3rem;
    letter-spacing: -0.01em;
}
.admin-page-head__lead {
    font-size: 0.92rem;
    color: var(--c-muted);
    margin: 0;
    max-width: 720px;
}

/* ----------- User menu (logged-in state in header) ----------- */

.user-menu {
    display: inline-flex !important;
    align-items: center;
    gap: 0.6rem;
}
.user-menu__email {
    font-size: 0.88rem;
    color: var(--c-muted);
    font-weight: 500;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.user-menu__form { margin: 0; padding: 0; }
.user-menu__logout {
    background: transparent;
    border: 1px solid var(--c-line);
    color: var(--c-ink-2);
    padding: 0.4rem 0.85rem;
    border-radius: var(--r-pill);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    font-family: inherit;
}
.user-menu__logout:hover {
    background: var(--c-accent);
    color: #fff;
    border-color: transparent;
}

/* ----------- Admin secondary nav ----------- */

.admin-nav {
    background: var(--c-bg-2);
    border-bottom: 1px solid var(--c-line);
}
.admin-nav__inner {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.admin-nav a {
    padding: 0.95rem 1.15rem;
    color: var(--c-muted);
    font-weight: 500;
    font-size: 0.92rem;
    border-bottom: 2px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
    white-space: nowrap;
}
.admin-nav a:hover { color: var(--c-accent); }
.admin-nav a.is-active {
    color: var(--c-accent);
    border-bottom-color: var(--c-accent);
}

/* ----------- Admin form card (Create / Edit / Import / Export) ----------- */

.form-card {
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    border-radius: var(--r-lg);
    padding: clamp(1.5rem, 3vw, 2.5rem);
    box-shadow: var(--sh-sm);
    max-width: 900px;
}
.form-card__title {
    font-family: var(--f-display);
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 1.5rem;
    color: var(--c-ink);
}
.form-card__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
@media (max-width: 760px) { .form-card__row { grid-template-columns: 1fr; } }
.form-card__actions {
    display: flex;
    gap: 0.6rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--c-line);
}
@media (max-width: 540px) { .form-card__actions { flex-direction: column-reverse; } }

/* Repeating column rows in Create/Edit (each column gets a card-row block) */
.column-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 36px;
    gap: 0.75rem;
    padding: 0.85rem;
    margin-bottom: 0.5rem;
    background: var(--c-bg);
    border: 1px solid var(--c-line);
    border-radius: var(--r-md);
    align-items: end;
}
@media (max-width: 760px) {
    .column-row {
        grid-template-columns: 1fr 1fr;
    }
}
.column-row__remove {
    background: transparent;
    border: 1px solid var(--c-line);
    color: var(--c-muted);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
}
.column-row__remove:hover { color: #d92d6a; border-color: #d92d6a; }

select.field__input {
    appearance: none;
    background: var(--c-bg) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%235a5a72' stroke-width='2'/></svg>") no-repeat right 0.85rem center;
    padding-right: 2.25rem;
}

/* ----------- Dashboard (Admin/Index) ----------- */

.dashboard__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}
.dashboard__stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.stat-tile {
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    border-radius: var(--r-md);
    padding: 1.1rem 1.25rem;
}
.stat-tile__label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
    color: var(--c-muted);
    margin-bottom: 0.3rem;
}
.stat-tile__num {
    font-family: var(--f-display);
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--c-ink);
    letter-spacing: -0.02em;
    line-height: 1;
}
.row-actions { display: inline-flex; gap: 0.35rem; }

.empty-state {
    padding: clamp(2rem, 5vw, 3.5rem);
    text-align: center;
    background: var(--c-surface);
    border: 1px dashed var(--c-line);
    border-radius: var(--r-lg);
}
.empty-state__title {
    font-family: var(--f-display);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--c-ink);
    margin: 0 0 0.5rem;
}
.empty-state__body { color: var(--c-muted); margin: 0 0 1.5rem; }

/* ----------- API key card ----------- */

.apikey-card {
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    border-radius: var(--r-lg);
    padding: clamp(1.25rem, 2.5vw, 2rem);
    box-shadow: var(--sh-sm);
    position: relative;
    overflow: hidden;
}
.apikey-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--g-brand);
}
.apikey-card__label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-weight: 700;
    color: var(--c-accent);
    margin-bottom: 0.75rem;
}
.apikey-card__value {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    padding: 0.85rem 1rem;
    background: var(--c-bg);
    border: 1px solid var(--c-line);
    border-radius: var(--r-md);
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}
.apikey-card__value code {
    flex: 1;
    min-width: 0;
    font-size: 0.95rem;
    color: var(--c-ink);
    overflow-wrap: anywhere;
    word-break: break-all;
}
.apikey-card__hint {
    font-size: 0.84rem;
    color: var(--c-muted);
    margin-top: 0.85rem;
    margin-bottom: 0;
}

.apikey-snippet {
    background: var(--c-ink);
    color: #d6d4ee;
    padding: 1.2rem 1.5rem;
    border-radius: var(--r-md);
    overflow-x: auto;
    font-size: 0.85rem;
    line-height: 1.55;
    margin-top: 0.5rem;
}
.apikey-snippet code { font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace; color: inherit; }

.btn--sm {
    padding: 0.45rem 0.9rem !important;
    font-size: 0.85rem;
}

/* ----------- Auth (login / register) ----------- */

.auth {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(2.5rem, 6vw, 4rem) var(--gutter);
    background:
        radial-gradient(at 8% 12%, rgba(123, 104, 238, 0.10) 0px, transparent 45%),
        radial-gradient(at 92% 88%, rgba(255, 94, 200, 0.10) 0px, transparent 45%),
        var(--c-bg);
}
.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    border-radius: var(--r-lg);
    padding: clamp(1.75rem, 4vw, 2.5rem);
    box-shadow: var(--sh-lg);
    position: relative;
    overflow: hidden;
}
.auth-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--g-brand);
}
.auth-card__brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    color: var(--c-ink);
    font-weight: 700;
    font-family: var(--f-display);
    font-size: 1.15rem;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
}
.auth-card__brand .brand__mark { width: 28px; height: 28px; }
.auth-card__title {
    font-family: var(--f-display);
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin: 0 0 0.4rem;
    color: var(--c-ink);
    letter-spacing: -0.015em;
}
.auth-card__subtitle {
    text-align: center;
    color: var(--c-muted);
    font-size: 0.92rem;
    margin: 0 0 1.75rem;
}

.field { margin-bottom: 1rem; }
.field__label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--c-ink);
    margin-bottom: 0.4rem;
    letter-spacing: 0.01em;
}
.field__input {
    width: 100%;
    padding: 0.75rem 0.95rem;
    font-size: 0.96rem;
    font-family: var(--f-sans);
    color: var(--c-ink);
    background: var(--c-bg);
    border: 1px solid var(--c-line);
    border-radius: var(--r-md);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.field__input:focus {
    outline: none;
    background: #fff;
    border-color: var(--c-accent);
    box-shadow: 0 0 0 3px rgba(123, 104, 238, 0.15);
}
.field__error {
    display: block;
    color: #d92d6a;
    font-size: 0.82rem;
    margin-top: 0.4rem;
}

.auth-card .btn {
    width: 100%;
    justify-content: center;
    margin-top: 0.5rem;
}

.validation-summary, .field-validation-error {
    display: block;
    color: #d92d6a;
    background: rgba(217, 45, 106, 0.06);
    border: 1px solid rgba(217, 45, 106, 0.18);
    padding: 0.6rem 0.85rem;
    border-radius: var(--r-md);
    font-size: 0.88rem;
    margin-bottom: 1rem;
}
.validation-summary:empty, .field-validation-error:empty { display: none; }
.validation-summary ul { margin: 0; padding-left: 1.1rem; }

.auth-aside {
    text-align: center;
    color: var(--c-muted);
    font-size: 0.92rem;
    margin-top: 1.5rem;
}
.auth-aside a { font-weight: 600; }

/* ----------- CTA card (invitation block) ----------- */

.cta-card {
    margin-top: 2.5rem;
    padding: clamp(1.5rem, 3vw, 2.25rem) clamp(1.5rem, 3vw, 2.5rem);
    background: var(--c-ink);
    background-image: var(--g-mesh);
    color: var(--c-on-dark);
    border-radius: var(--r-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.75rem;
    flex-wrap: wrap;
    box-shadow: var(--sh-lg);
    position: relative;
    overflow: hidden;
}
.cta-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: var(--r-lg);
    padding: 1px;
    background: var(--g-brand-soft);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    opacity: 0.5;
    pointer-events: none;
}
.cta-card__body { flex: 1 1 360px; min-width: 0; }
.cta-card__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--c-accent-2);
    margin-bottom: 0.75rem;
}
.cta-card__eyebrow::before {
    content: "";
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--c-cyan);
    box-shadow: 0 0 8px var(--c-cyan);
    animation: pulse 1.8s ease-in-out infinite;
}
.cta-card__title {
    font-family: var(--f-display);
    font-size: clamp(1.3rem, 2.4vw, 1.7rem);
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.6rem;
    letter-spacing: -0.015em;
}
.cta-card__text {
    color: var(--c-on-dark-muted);
    font-size: 0.98rem;
    line-height: 1.65;
    margin: 0;
    max-width: 640px;
}
.cta-card__actions { flex: 0 0 auto; display: flex; gap: 0.6rem; flex-wrap: wrap; }

/* ----------- voice query showcase ----------- */

.voice-card {
    background: var(--c-ink);
    background-image: var(--g-mesh);
    color: #fff;
    border-radius: var(--r-lg);
    padding: 2rem 2.25rem;
    box-shadow: var(--sh-lg);
    position: relative;
    overflow: hidden;
}
.voice-card__label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--c-accent-2);
    margin-bottom: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.voice-card__label::before {
    content: "";
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--c-cyan);
    box-shadow: 0 0 10px var(--c-cyan);
    animation: pulse 1.8s ease-in-out infinite;
}
.voice-card ul { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 0.6rem; }
.voice-card li {
    font-family: var(--f-display);
    font-size: clamp(1.05rem, 1.6vw, 1.18rem);
    color: #fff;
    padding: 0.85rem 1rem 0.85rem 2.4rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--r-md);
    position: relative;
    backdrop-filter: blur(6px);
}
.voice-card li::before {
    content: "\201C";
    position: absolute;
    left: 0.85rem;
    top: 0.45rem;
    color: var(--c-accent-2);
    font-size: 1.6rem;
    line-height: 1;
}

/* ----------- team ----------- */

.person {
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    border-radius: var(--r-md);
    padding: 1.5rem 1.6rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}
.person:hover { transform: translateY(-2px); box-shadow: var(--sh-md); }
.person__role {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.7rem;
    font-weight: 700;
    background: var(--g-brand);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 0.5rem;
}
.person__name { font-family: var(--f-display); font-size: 1.1rem; font-weight: 700; margin: 0 0 0.3rem; letter-spacing: -0.01em; }
.person__affiliation { font-size: 0.9rem; color: var(--c-muted); margin: 0; }

/* ----------- case-study cards ----------- */

.case {
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    border-radius: var(--r-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.2s ease;
    color: inherit;
}
.case:hover {
    transform: translateY(-4px);
    box-shadow: var(--sh-md);
    border-color: transparent;
    color: inherit;
}
.case__thumb {
    aspect-ratio: 16 / 9;
    background: var(--c-bg-2);
    overflow: hidden;
    position: relative;
}
.case__thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(6, 6, 26, 0.55) 100%);
    pointer-events: none;
}
.case__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.45s ease;
}
.case:hover .case__thumb img { transform: scale(1.04); }
.case__body { padding: 1.5rem 1.6rem; flex: 1; display: flex; flex-direction: column; }
.case__tag {
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    background: var(--g-brand);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 700;
    margin-bottom: 0.55rem;
}
.case__title { font-family: var(--f-display); font-size: 1.15rem; font-weight: 700; color: var(--c-ink); margin: 0 0 0.5rem; letter-spacing: -0.01em; }
.case__desc { color: var(--c-muted); font-size: 0.94rem; margin: 0 0 1rem; flex: 1; }
.case__link {
    align-self: flex-start;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--c-accent);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}
.case:hover .case__link { color: var(--c-magenta); }

/* ----------- research-program contributions ----------- */

.contrib {
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    border-radius: var(--r-md);
    padding: 1.75rem 1.85rem 1.5rem;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.contrib:hover { transform: translateY(-3px); box-shadow: var(--sh-md); border-color: transparent; }
.contrib__num {
    position: absolute;
    top: -14px;
    left: 1.85rem;
    background: var(--g-brand);
    color: #fff;
    font-family: var(--f-display);
    font-weight: 700;
    font-size: 0.85rem;
    padding: 0.32rem 0.85rem;
    border-radius: var(--r-pill);
    letter-spacing: 0.05em;
    box-shadow: 0 6px 14px rgba(123, 104, 238, 0.3);
}
.contrib__title { font-family: var(--f-sans); font-size: 1.08rem; font-weight: 700; margin: 0.55rem 0 0.55rem; letter-spacing: -0.01em; }
.contrib__body { color: var(--c-muted); font-size: 0.94rem; margin: 0 0 0.85rem; }
.contrib__meta {
    font-size: 0.78rem;
    color: var(--c-ink-2);
    font-weight: 600;
    padding-top: 0.85rem;
    border-top: 1px solid var(--c-line);
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1rem;
}
.contrib__meta span::before { content: "\2022"; margin-right: 0.4rem; color: var(--c-accent); }
.contrib__meta span:first-child::before { content: none; }

/* ----------- affiliations strip ----------- */

.affil {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 1rem;
}
.affil__item {
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    border-radius: var(--r-md);
    padding: 1.1rem 1.3rem;
    text-align: center;
    font-weight: 600;
    color: var(--c-ink-2);
    font-size: 0.95rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.affil__item:hover { transform: translateY(-2px); box-shadow: var(--sh-sm); border-color: rgba(123, 104, 238, 0.3); }

/* ----------- breadcrumb + page header ----------- */

.page-header {
    background: var(--c-ink);
    color: var(--c-on-dark);
    padding: clamp(3.5rem, 7vw, 5.5rem) 0 clamp(2.5rem, 5vw, 4rem);
    position: relative;
    overflow: hidden;
    isolation: isolate;
}
.page-header::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--g-mesh);
    opacity: 0.55;
    z-index: -1;
}
.page-header > .container { position: relative; z-index: 1; }
.page-header h1 { color: #fff; margin-bottom: 0.5rem; font-family: var(--f-display); font-size: clamp(1.85rem, 4vw, 2.75rem); }
.page-header p { color: var(--c-on-dark-muted); margin: 0; max-width: 760px; }
.crumb { font-size: 0.85rem; color: var(--c-on-dark-muted); margin-bottom: 0.85rem; }
.crumb a { color: var(--c-accent-2); }
.crumb a:hover { color: #fff; }
.crumb span { margin: 0 0.4rem; opacity: 0.5; }

/* ----------- prose / case-study content ----------- */

.prose { max-width: 820px; }
.prose h2 { margin-top: 2.75rem; font-family: var(--f-display); }
.prose h2:first-child { margin-top: 0; }
.prose ol, .prose ul { padding-left: 1.25rem; }
.prose li { margin-bottom: 0.5rem; }
.prose figure {
    margin: 2rem 0;
    padding: 1rem;
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    border-radius: var(--r-md);
}
.prose figure img { border-radius: var(--r-sm); margin: 0 auto; }
.prose figcaption {
    text-align: center;
    color: var(--c-muted);
    font-size: 0.85rem;
    margin-top: 0.75rem;
}
.prose dt { font-weight: 700; margin-top: 1.5rem; color: var(--c-ink); }
.prose dd { margin: 0.4rem 0 1rem; color: var(--c-ink-2); line-height: 1.7; }

/* ----------- tables ----------- */

.table-wrap { overflow-x: auto; border-radius: var(--r-md); border: 1px solid var(--c-line); }
.data-table { width: 100%; border-collapse: collapse; background: var(--c-surface); }
.data-table th, .data-table td {
    padding: 0.9rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--c-line);
    font-size: 0.92rem;
}
.data-table th {
    background: var(--c-bg-2);
    font-weight: 700;
    color: var(--c-ink);
    text-transform: uppercase;
    font-size: 0.74rem;
    letter-spacing: 0.06em;
}
.data-table tr:last-child td { border-bottom: 0; }
.data-table tr:hover td { background: var(--c-bg); }

/* ----------- footer ----------- */

.site-footer {
    background: var(--c-ink);
    color: var(--c-on-dark-muted);
    padding: 4rem 0 1.5rem;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}
.site-footer::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--g-mesh);
    opacity: 0.20;
    z-index: -1;
}
.site-footer > .container { position: relative; z-index: 1; }
.site-footer h4 {
    color: #fff;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 0.85rem;
    font-family: var(--f-sans);
}
.site-footer__cols {
    display: grid;
    grid-template-columns: 2fr repeat(2, 1fr);
    gap: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
@media (max-width: 720px) { .site-footer__cols { grid-template-columns: 1fr; } }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.5rem; font-size: 0.92rem; }
.site-footer a { color: var(--c-on-dark-muted); }
.site-footer a:hover { color: #fff; }
.site-footer__brandline {
    font-size: 0.96rem;
    color: var(--c-on-dark-muted);
    max-width: 380px;
    line-height: 1.65;
}
.site-footer__bottom {
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.82rem;
}
.site-footer__bottom a { color: var(--c-on-dark-muted); }

/* ----------- reveal on scroll ----------- */

.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
