/* Reset & Fonts */

/* Unica77 LL - Main Sans-Serif */
@font-face {
    font-family: 'Unica77';
    src: url('/static/fonts/unica/Unica77LLWeb-Thin.woff2') format('woff2'),
         url('/static/fonts/unica/Unica77LLWeb-Thin.woff') format('woff');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Unica77';
    src: url('/static/fonts/unica/Unica77LLWeb-ThinItalic.woff2') format('woff2'),
         url('/static/fonts/unica/Unica77LLWeb-ThinItalic.woff') format('woff');
    font-weight: 100;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Unica77';
    src: url('/static/fonts/unica/Unica77LLWeb-Light.woff2') format('woff2'),
         url('/static/fonts/unica/Unica77LLWeb-Light.woff') format('woff');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Unica77';
    src: url('/static/fonts/unica/Unica77LLWeb-LightItalic.woff2') format('woff2'),
         url('/static/fonts/unica/Unica77LLWeb-LightItalic.woff') format('woff');
    font-weight: 300;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Unica77';
    src: url('/static/fonts/unica/Unica77LLWeb-Regular.woff2') format('woff2'),
         url('/static/fonts/unica/Unica77LLWeb-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Unica77';
    src: url('/static/fonts/unica/Unica77LLWeb-Italic.woff2') format('woff2'),
         url('/static/fonts/unica/Unica77LLWeb-Italic.woff') format('woff');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Unica77';
    src: url('/static/fonts/unica/Unica77LLWeb-Medium.woff2') format('woff2'),
         url('/static/fonts/unica/Unica77LLWeb-Medium.woff') format('woff');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Unica77';
    src: url('/static/fonts/unica/Unica77LLWeb-MediumItalic.woff2') format('woff2'),
         url('/static/fonts/unica/Unica77LLWeb-MediumItalic.woff') format('woff');
    font-weight: 500;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Unica77';
    src: url('/static/fonts/unica/Unica77LLWeb-Bold.woff2') format('woff2'),
         url('/static/fonts/unica/Unica77LLWeb-Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Unica77';
    src: url('/static/fonts/unica/Unica77LLWeb-BoldItalic.woff2') format('woff2'),
         url('/static/fonts/unica/Unica77LLWeb-BoldItalic.woff') format('woff');
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Unica77';
    src: url('/static/fonts/unica/Unica77LLWeb-Black.woff2') format('woff2'),
         url('/static/fonts/unica/Unica77LLWeb-Black.woff') format('woff');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Unica77';
    src: url('/static/fonts/unica/Unica77LLWeb-BlackItalic.woff2') format('woff2'),
         url('/static/fonts/unica/Unica77LLWeb-BlackItalic.woff') format('woff');
    font-weight: 800;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Unica77';
    src: url('/static/fonts/unica/Unica77LLWeb-ExtraBlack.woff2') format('woff2'),
         url('/static/fonts/unica/Unica77LLWeb-ExtraBlack.woff') format('woff');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Unica77';
    src: url('/static/fonts/unica/Unica77LLWeb-ExtraBlackItalic.woff2') format('woff2'),
         url('/static/fonts/unica/Unica77LLWeb-ExtraBlackItalic.woff') format('woff');
    font-weight: 900;
    font-style: italic;
    font-display: swap;
}

/* Unica77 Mono LL - Monospace */
@font-face {
    font-family: 'Unica77 Mono';
    src: url('/static/fonts/unica/Unica77MonoLLWeb-Thin.woff2') format('woff2'),
         url('/static/fonts/unica/Unica77MonoLLWeb-Thin.woff') format('woff');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Unica77 Mono';
    src: url('/static/fonts/unica/Unica77MonoLLWeb-ThinItalic.woff2') format('woff2'),
         url('/static/fonts/unica/Unica77MonoLLWeb-ThinItalic.woff') format('woff');
    font-weight: 100;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Unica77 Mono';
    src: url('/static/fonts/unica/Unica77MonoLLWeb-Light.woff2') format('woff2'),
         url('/static/fonts/unica/Unica77MonoLLWeb-Light.woff') format('woff');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Unica77 Mono';
    src: url('/static/fonts/unica/Unica77MonoLLWeb-LightItalic.woff2') format('woff2'),
         url('/static/fonts/unica/Unica77MonoLLWeb-LightItalic.woff') format('woff');
    font-weight: 300;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Unica77 Mono';
    src: url('/static/fonts/unica/Unica77MonoLLWeb-Regular.woff2') format('woff2'),
         url('/static/fonts/unica/Unica77MonoLLWeb-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Unica77 Mono';
    src: url('/static/fonts/unica/Unica77MonoLLWeb-Italic.woff2') format('woff2'),
         url('/static/fonts/unica/Unica77MonoLLWeb-Italic.woff') format('woff');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Unica77 Mono';
    src: url('/static/fonts/unica/Unica77MonoLLWeb-Bold.woff2') format('woff2'),
         url('/static/fonts/unica/Unica77MonoLLWeb-Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Unica77 Mono';
    src: url('/static/fonts/unica/Unica77MonoLLWeb-BoldItalic.woff2') format('woff2'),
         url('/static/fonts/unica/Unica77MonoLLWeb-BoldItalic.woff') format('woff');
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

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

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

:root {
    --font-main: 'Unica77', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --font-mono: 'Unica77 Mono', 'SF Mono', 'Menlo', 'Monaco', 'Courier New', monospace;
    --bg-color: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #3a3a3a;
    --text-tertiary: #666666;
    --border-light: #eee;
    --sidebar-width: 260px;
    --top-spacing: 85px;
    --content-max-width: 800px;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    line-height: 1.5;
    font-size: 15px;
}

/* Tabular numbers for data-heavy elements */
table,
.u-legend,
.uplot {
    font-feature-settings: 'tnum';
}

/* Main Layout */
.layout {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    min-height: 100vh;
    max-width: 1400px;
    margin: 0 auto;
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 48px 0px 48px 100px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 8px;
}

.logo {
    margin-top: 32px;
    margin-bottom: -15px;
}

.logo a {
    display: block;
    position: relative;
    width: 80px;
    height: 80px;
}

.logo img {
    width: 90px;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

.logo img.logo-hover {
    visibility: hidden;
}

@media (hover: hover) {
    .logo a:hover img.logo-default {
        visibility: hidden;
    }

    .logo a:hover img.logo-hover {
        visibility: visible;
    }
}

.menu {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.menu a {
    font-size: 15px;
    color: var(--text-tertiary);
    text-decoration: none;
    transition: color 0.2s;
    letter-spacing: -0.01em;
}

.menu a:hover,
.menu a.active {
    color: var(--text-primary);
}

/* Main Content Area */
.main-content {
    padding: var(--top-spacing) 80px 80px 40px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0; /* Allow grid child to shrink below content size */
}

/* Text content pages (jobs, research index) need max-width */
.main-content.text-content {
    max-width: calc(var(--content-max-width) + 120px);
}

/* Page Intro - big gray paragraph style */
.page-intro {
    font-size: 22px;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    margin-bottom: 28px;
    max-width: var(--content-max-width);
}

.intro-text {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 48px;
}

.jobs-heading {
    font-size: 36px;
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    max-width: var(--content-max-width);
    margin-bottom: 20px;
}

.positions-cta {
    display: block;
    width: 130px;
    font-size: 13px;
    font-weight: 400;
    color: #fff;
    background-color: #000;
    text-decoration: none;
    padding: 8px 12px;
    border: 1px solid #000;
    border-radius: 3px;
    max-width: var(--content-max-width);
    margin-bottom: 72px;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.positions-cta:hover {
    background-color: #fff;
    color: #000;
}

/* Homepage - Clean Rows Layout */
.home-intro-text {
    font-size: 18px;
    line-height: 1.6;
    color: var(--text-primary);
    margin-bottom: 40px;
    max-width: var(--content-max-width);
}

.home-intro-text strong {
    color: inherit;
    font-weight: inherit;
}

.home-rows {
    max-width: var(--content-max-width);
    margin-bottom: 60px;
}

.home-row {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 20px;
    padding: 20px 0;
    border-top: 1px solid #ddd;
}

.home-row:first-child {
    border-top: 1px solid #ddd;
}

.home-row-label {
    font-size: 12px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    padding-top: 4px;
}

.home-row-content p {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0;
}

.home-row-content p + p {
    margin-top: 12px;
}

.home-row-content strong {
    color: inherit;
    font-weight: inherit;
}

.home-row-content ul {
    margin: 0;
    padding-left: 18px;
}

.home-row-content p + ul {
    margin-top: 12px;
}

.home-row-content a {
    color: var(--text-primary);
    text-decoration: none;
    border-bottom: 1px solid var(--text-secondary);
}

.home-row-content a.blog-link {
    border-bottom: none;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: #ccc;
    text-decoration-thickness: 1px;
}

.home-row-content a.blog-link:hover {
    text-decoration-color: var(--text-primary);
    transition: border-color 0.2s;
}

.home-row-content a:hover {
    border-color: var(--text-primary);
}

.home-row-content li {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.home-row-content li:last-child {
    margin-bottom: 0;
}

.home-row-content li strong {
    color: inherit;
    font-weight: inherit;
}

/* Section Label */
.section-label {
    font-size: 12px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
    display: block;
}

h1 {
    font-size: 56px;
    font-weight: 400;
    line-height: 1.0;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

/* Jobs Page Styles */
.jobs-section {
    margin-bottom: 72px;
    max-width: var(--content-max-width);
}

.section-label {
    margin-bottom: 24px;
    border-top: 1px solid var(--text-tertiary);
    padding-top: 14px;
    display: block;
    color: var(--text-secondary);
}

.grid-2-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px 40px;
}

.grid-3-col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px 40px;
}

.card {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.card h3 {
    font-size: 16px;
    font-weight: 400;
}

.card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Team Photo */
.team-photo {
    width: calc(100% + 80px);
    margin-left: -40px;
    height: auto;
    border-radius: 2px;
    margin-bottom: 32px;
}

.team-statement {
    font-size: 18px;
    line-height: 1.5;
    color: var(--text-primary);
    font-weight: 400;
    margin-bottom: 36px;
}

/* Team List */
.team-list {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.team-member h3 {
    font-size: 17px;
    font-weight: 400;
    margin-bottom: 4px;
}

.team-member h3 a {
    color: inherit;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-decoration-color: var(--text-tertiary);
    text-underline-offset: 2px;
}

.team-member h3 a:hover {
    text-decoration-style: solid;
    text-decoration-color: var(--text-primary);
}

.team-member h3 a.blog-link {
    text-decoration-style: solid;
    text-decoration-color: #ccc;
    text-underline-offset: 3px;
}

.team-member h3 a.blog-link:hover {
    text-decoration-color: var(--text-primary);
}

.team-role {
    font-size: 14px;
    color: var(--text-tertiary);
    display: block;
    margin-bottom: 12px;
}

.team-member p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* Job Listings */
.job-listings {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--border-light);
}

.job-listing {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-light);
    text-decoration: none;
    color: var(--text-primary);
    transition: padding 0.15s ease;
}

.job-listing:last-child {
    border-bottom: none;
}

.job-listing:hover {
    padding-left: 12px;
}

.job-listing:hover .job-arrow {
    transform: translateX(4px);
}

.job-title {
    font-size: 15px;
    font-weight: 400;
    margin-bottom: 2px;
}

.job-location {
    font-size: 13px;
    color: var(--text-tertiary);
}

.job-arrow {
    font-size: 18px;
    color: var(--text-tertiary);
    transition: transform 0.15s ease, color 0.05s ease;
}

.job-listing:hover .job-arrow {
    color: var(--text-primary);
}

.job-filter {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.job-filter-btn {
    padding: 0.5rem 1rem;
    font-size: 14px;
    font-weight: 450;
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.job-filter-btn:hover {
    color: var(--text-primary);
}

.job-filter-btn.active {
    background: rgba(0, 0, 0, 0.06);
    color: var(--text-primary);
    font-weight: 500;
}

/* Timeline */
.timeline {
    display: flex;
    flex-direction: column;
    position: relative;
    max-width: 560px;
    counter-reset: timeline-step;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 28px;
    bottom: 28px;
    width: 1px;
    background: linear-gradient(to bottom, #ddd 0%, #ddd 90%, transparent 100%);
}

.timeline-item {
    position: relative;
    padding-left: 52px;
    padding-bottom: 36px;
    counter-increment: timeline-step;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-item:last-child .timeline-marker::after {
    content: '✓';
    font-size: 11px;
}

.timeline-marker {
    position: absolute;
    left: 0;
    top: 0;
    width: 30px;
    height: 30px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 400;
    color: var(--text-primary);
    z-index: 1;
}

.timeline-marker::after {
    content: counter(timeline-step);
}

.timeline-content {
    padding-top: 4px;
}

.timeline-content h3 {
    font-size: 15px;
    font-weight: 400;
    margin-bottom: 6px;
    line-height: 1.3;
}

.timeline-content p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.55;
}

/* FAQ */
.faq-list {
    display: flex;
    flex-direction: column;
    max-width: var(--content-max-width);
}

.faq-item {
    border-bottom: 1px solid var(--border-light);
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-item summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    font-size: 15px;
    font-weight: 400;
    cursor: pointer;
    list-style: none;
    transition: color 0.2s ease;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    font-size: 20px;
    font-weight: 300;
    color: var(--text-secondary);
    transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
    content: '−';
}

.faq-item summary:hover {
    color: var(--text-secondary);
}

.faq-item p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    padding-bottom: 20px;
    padding-right: 40px;
}

/* ========================================
   BLOG INDEX - Clean List Layout
   ======================================== */

.blog-index {
    display: flex;
    flex-direction: column;
    gap: 48px;
    max-width: var(--content-max-width);
    margin-bottom: 60px;
}

.blog-section {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 0 32px;
    align-items: start;
}

.blog-section-title {
    font-size: 12px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    margin: 0;
    padding-top: 21px;
    border-top: 1px solid var(--text-tertiary);
}

.blog-list {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--text-primary);
}

.blog-list-item {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: baseline;
    gap: 24px;
    padding: 18px 0;
    text-decoration: none;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-light);
}

.blog-list-item:last-child {
    border-bottom: none;
}

.blog-list-item:hover .blog-list-title {
    color: var(--text-tertiary);
}

.blog-list-title {
    font-size: 15px;
    font-weight: 400;
    line-height: 1.4;
    transition: color 0.15s ease;
}

.blog-list-meta {
    font-size: 13px;
    color: var(--text-tertiary);
    white-space: nowrap;
    flex-shrink: 0;
}

/* Footer */
.minimal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-light);
    padding-top: 40px;
    margin-top: auto;
    font-size: 13px;
    color: var(--text-tertiary);
    max-width: var(--content-max-width);
}

.footer-copy {
    color: var(--text-tertiary);
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.footer-links a {
    color: var(--text-tertiary);
    text-decoration: none;
    display: flex;
    align-items: center;
}

.footer-links a:hover {
    color: var(--text-primary);
}

/* ========================================
   BLOG POST STYLES
   ======================================== */

/* Blog Content Container */
.blog-content {
    width: 100%;
    max-width: 100%;
    min-width: 0; /* Allow grid child to shrink below content size */
    margin-bottom: 60px;
    overflow-x: hidden;
}

/* Blog Header */
.blog-header {
    margin-bottom: 0;
    max-width: var(--content-max-width);
}

.blog-header h1 {
    font-size: 32px;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 0;
    font-weight: 400;
}

/* Blog Metadata */
.blogmetadata {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 16px 0 32px 0;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-light);
    max-width: var(--content-max-width);
}

.blogmetadata .blog-date {
    display: inline;
    color: var(--text-tertiary);
}

.blogmetadata .blog-date::after {
    content: " · ";
    margin: 0 2px;
    color: var(--text-tertiary);
}

.blogmetadata .blog-author {
    display: inline;
    color: var(--text-secondary);
}

/* Abstract */
#abstract {
    margin-bottom: 32px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-secondary);
    overflow-wrap: break-word;
    word-wrap: break-word;
}

#abstract p {
    margin-bottom: 0;
}

/* Fix overflow on blog content */
.blog-content {
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* Blog Typography */
.blog-content h2 {
    font-size: 18px;
    font-weight: 400;
    margin-top: 40px;
    margin-bottom: 14px;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.blog-content h3 {
    font-size: 15px;
    font-weight: 400;
    margin-top: 32px;
    margin-bottom: 10px;
    line-height: 1.3;
}

.blog-content h4 {
    font-size: 14px;
    font-weight: 400;
    margin-top: 24px;
    margin-bottom: 8px;
}

.blog-content p {
    font-size: 15px;
    line-height: 1.65;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.blog-content li {
    font-size: 15px;
    line-height: 1.65;
    margin-bottom: 6px;
}

.blog-content ul,
.blog-content ol {
    margin-bottom: 18px;
    padding-left: 24px;
}

.blog-content ul {
    list-style-type: disc;
}

.blog-content ol {
    list-style-type: decimal;
}

.blog-content ol li {
    padding-left: 8px;
}

.blog-content ol li::marker {
    font-feature-settings: 'tnum' 0;
}

/* Blog Links */
.blog-content a {
    color: var(--text-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: #ccc;
    text-decoration-thickness: 1px;
}

.blog-content a:hover {
    text-decoration-color: var(--text-primary);
}

/* Strong/Bold */
.blog-content strong {
    font-weight: 400;
}

/* Code */
code {
    font-family: var(--font-mono);
    font-size: 0.85em;
    background: #f5f5f5;
    padding: 2px 5px;
    border-radius: 3px;
}

/* Code Blocks */
div.sourceCode {
    margin: 20px 0;
    background: #f8f8f8;
    border-radius: 4px;
    overflow-x: auto;
    border: 1px solid var(--border-light);
}

div.sourceCode pre {
    margin: 0;
    padding: 14px 18px;
    line-height: 1.5;
    font-family: var(--font-mono);
}

div.sourceCode code {
    background: none;
    padding: 0;
    white-space: pre;
    color: #24292f;
    font-size: 13px;
    border-radius: 0;
}

/* Syntax Highlighting */
.sourceCode .co { color: #6a737d; }
.sourceCode .kw,
.sourceCode .cf,
.sourceCode .im { color: #cf222e; }
.sourceCode .st,
.sourceCode .sc,
.sourceCode .vs,
.sourceCode .ss { color: #0a7c42; }
.sourceCode .op,
.sourceCode .cn,
.sourceCode .dt,
.sourceCode .dv,
.sourceCode .fl { color: #0550ae; }
.sourceCode .fu,
.sourceCode .bi,
.sourceCode .bu { color: #8250df; }
.sourceCode .va { color: #953800; }

/* Tables */
.blog-content table {
    width: 100%;
    margin: 24px 0;
    border-collapse: collapse;
    font-size: 14px;
}

.blog-content th,
.blog-content td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.blog-content th {
    font-weight: 400;
    background: #fafafa;
    border-top: 1px solid var(--border-light);
}

.blog-content tr:last-child td {
    border-bottom: 1px solid var(--border-light);
}

/* Figures */
figure,
.blogfigurelike {
    margin: 28px 0;
    text-align: center;
}

figure img,
.blogfigurelike img,
.blog-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

figcaption,
.blogfigurelikecaption {
    margin-top: 24px;
    font-family: var(--font-main);
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    text-align: left;
}

.blogfigurelikecaption p,
.blog-content .blogfigurelikecaption p {
    margin-bottom: 0;
    font-size: 13px;
    color: var(--text-secondary);
}

/* KaTeX & Math */
.katex-display {
    margin: 20px 0;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 0;
    max-width: 100%;
}

.katex-display > .katex {
    max-width: 100%;
}

.katex {
    font-size: 1.0em;
}

/* Citations */
.citation {
    word-wrap: break-word;
}

/* Remove outer parentheses from citations */
.citation::before,
.citation::after {
    content: none;
}

.citation a {
    color: var(--text-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: #ccc;
    text-decoration-thickness: 1px;
}

.citation a:hover {
    text-decoration-color: var(--text-primary);
}

/* Hide duplicate footnotes heading that pandoc generates */
h2#footnotes {
    display: none;
}

/* Footnotes */
.footnote-ref {
    font-size: 0.75em;
    vertical-align: super;
    text-decoration: none;
    color: var(--text-tertiary);
}

.footnote-ref:hover {
    color: var(--text-primary);
}

/* Remove brackets from footnote refs */
.footnote-ref sup {
    font-size: inherit;
}

section.footnotes {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--border-light);
    font-size: 13px;
    color: var(--text-secondary);
}

/* Hide redundant hr inside footnotes since section has border-top */
section.footnotes hr {
    display: none;
}

section.footnotes ol {
    padding-left: 24px;
    margin: 0;
}

section.footnotes li {
    margin-bottom: 12px;
    line-height: 1.6;
    padding-left: 4px;
}

section.footnotes li p {
    font-size: 13px;
    margin-bottom: 6px;
    line-height: 1.6;
}

section.footnotes p {
    font-size: 13px;
    margin-bottom: 6px;
}

.footnote-back {
    font-family: 'Apple Symbols', 'Segoe UI Symbol', sans-serif;
    text-decoration: none;
    font-variant-emoji: text;
}

/* Blockquotes */
blockquote {
    margin: 20px 0;
    padding: 0 0 0 18px;
    border-left: 3px solid var(--border-light);
    color: var(--text-secondary);
}

blockquote p {
    font-style: italic;
}

/* Horizontal Rule */
hr {
    border: none;
    border-top: 1px solid var(--border-light);
    margin: 32px 0;
}

/* uPlot (Charts) */
.uplot {
    font-family: var(--font-main);
    width: 100% !important;
    max-width: var(--content-max-width);
}

.uplot .u-wrap {
    width: 100% !important;
}

/* Axis labels - improve readability */
.uplot .u-axis {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-secondary);
}

.uplot .u-axis.u-vals {
    font-variant-numeric: tabular-nums;
}

/* Legend styling */
.uplot .u-legend {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 16px;
    gap: 8px 20px;
}

.uplot .u-legend th {
    font-weight: 400;
    color: var(--text-primary);
}

.uplot .u-legend td {
    font-variant-numeric: tabular-nums;
}

.uplot .u-legend .u-marker {
    width: 12px !important;
    height: 3px !important;
    border-radius: 1px;
}

/* Ensure charts are full width in blog content */
.blog-content .uplot,
.blogfigurelike .uplot {
    width: 100% !important;
}

/* ========================================
   RESPONSIVE STYLES
   ======================================== */

/* Mobile menu toggle (hidden by default on desktop) */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin: -8px;
    z-index: 200;
}

.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 20px;
    height: 16px;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
    border-radius: 1px;
    transition: transform 0.3s ease, opacity 0.2s ease;
    transform-origin: center;
}

/* Hamburger animation when open */
.mobile-menu-toggle[aria-expanded="true"] .hamburger span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu overlay */
.mobile-menu-overlay {
    display: none;
}

/* Responsive - Tablet */
@media (max-width: 1100px) {
    :root {
        --sidebar-width: 220px;
    }
    
    h1 {
        font-size: 48px;
    }
    
    .grid-3-col {
        grid-template-columns: 1fr 1fr;
    }
}

/* Responsive - Mobile Landscape / Small Tablet */
@media (max-width: 900px) {
    :root {
        --top-spacing: 40px;
    }

    html, body {
        overflow-x: hidden;
    }

    .layout {
        grid-template-columns: 1fr;
        max-width: 100%;
        overflow-x: clip;
    }

    .sidebar {
        height: auto;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        padding: 16px 24px;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 24px;
        background: rgba(255, 255, 255, 0.98);
        z-index: 100;
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }

    .logo {
        margin: 0 !important;
        flex-shrink: 0;
        display: flex;
        align-items: center;
    }

    .logo a {
        width: auto;
        height: auto;
        display: block;
    }

    .logo img {
        width: 80px !important;
        height: auto !important;
        position: static !important;
        display: block !important;
    }

    .logo img.logo-hover {
        display: none !important;
    }

    .menu {
        flex-direction: row;
        gap: 20px;
    }

    .menu a {
        font-size: 14px;
    }

    .main-content {
        padding: 100px 24px 60px;
        max-width: 100vw;
        width: 100%;
        box-sizing: border-box;
    }

    .main-content.text-content {
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
    }

    .team-photo {
        width: 100%;
        margin-left: 0;
    }

    .blog-header {
        max-width: 100%;
    }

    .blog-header h1 {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }

    .blogmetadata {
        max-width: 100%;
    }

    #abstract {
        max-width: 100%;
    }

    .blog-content,
    .blog-content p,
    .blog-content li,
    .blog-content h2,
    .blog-content h3 {
        max-width: 100%;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    h1,
    .jobs-heading {
        font-size: 32px;
        margin-bottom: 16px;
        line-height: 1.15;
    }

    .page-intro {
        font-size: 18px;
        margin-bottom: 20px;
        line-height: 1.55;
    }

    .intro-text {
        margin-bottom: 36px;
    }

    .jobs-section {
        margin-bottom: 56px;
        max-width: 100%;
    }

    .grid-2-col {
        grid-template-columns: 1fr 1fr;
        gap: 20px 24px;
    }
    
    .grid-3-col {
        grid-template-columns: 1fr 1fr;
        gap: 20px 24px;
    }

    .card {
        padding: 16px;
        background: linear-gradient(to bottom, #fafafa, #f5f5f5);
        border-radius: 8px;
        border: 1px solid var(--border-light);
    }

    .card.card-outline {
        padding: 0;
        background: transparent;
        border: none;
        border-radius: 0;
    }
    
    .card h3 {
        font-size: 15px;
    }
    
    .card p {
        font-size: 14px;
    }

    .home-intro-text {
        font-size: 16px;
        margin-bottom: 28px;
        line-height: 1.65;
    }

    .home-row {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 12px 0 20px 0;
    }

    .home-row-label {
        font-size: 11px;
        font-weight: 400;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: var(--text-tertiary);
        padding-top: 0;
    }

    .home-row-content li {
        font-size: 15px;
        line-height: 1.6;
        margin-bottom: 10px;
    }

    /* Timeline mobile improvements */
    .timeline {
        max-width: 100%;
    }

    .timeline::before {
        left: 13px;
    }

    .timeline-marker {
        width: 26px;
        height: 26px;
        font-size: 11px;
    }

    .timeline-item {
        padding-left: 44px;
        padding-bottom: 28px;
    }
    
    .timeline-content h3 {
        font-size: 14px;
    }
    
    .timeline-content p {
        font-size: 13px;
    }

    /* Team section mobile */
    .team-member {
        padding-bottom: 24px;
        border-bottom: 1px solid var(--border-light);
    }
    
    .team-member:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }
    
    .team-member h3 {
        font-size: 16px;
    }
    
    .team-member p {
        font-size: 13px;
    }

    /* Job listings mobile */
    .job-listings {
        border-top: none;
        margin-right: 8px;
    }
    
    .job-listing {
        padding: 20px 0;
        border-bottom: 1px solid var(--border-light);
    }
    
    .job-listing:first-child {
        border-top: 1px solid var(--border-light);
    }
    
    .job-title {
        font-size: 14px;
    }
    
    .job-location {
        font-size: 13px;
    }

    .job-filter {
        gap: 0.375rem;
        margin-bottom: 1.25rem;
    }

    .job-filter-btn {
        padding: 0.4rem 0.75rem;
        font-size: 13px;
    }

    /* FAQ mobile */
    .faq-item summary {
        padding: 18px 0;
        font-size: 14px;
    }
    
    .faq-item p {
        font-size: 13px;
        padding-right: 20px;
    }

    /* Blog index mobile */
    .blog-index {
        gap: 40px;
        max-width: 100%;
    }

    .blog-section {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .blog-section-title {
        font-size: 12px;
        padding-top: 0;
        border-top: none;
        padding-bottom: 0;
    }

    .blog-list-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding: 18px 0;
    }

    .blog-list-title {
        font-size: 16px;
        line-height: 1.45;
    }

    .blog-list-meta {
        font-size: 13px;
    }

    /* Blog post mobile */
    .blog-header h1 {
        font-size: 26px;
        line-height: 1.25;
    }

    .blogmetadata {
        font-size: 13px;
        margin: 18px 0 24px 0;
        padding-bottom: 20px;
    }

    #abstract {
        margin-bottom: 24px;
        font-size: 14px;
    }

    .blog-content h2 {
        font-size: 17px;
        margin-top: 36px;
        margin-bottom: 12px;
    }

    .blog-content h3 {
        font-size: 15px;
        margin-top: 28px;
    }
    
    .blog-content p,
    .blog-content li {
        font-size: 14px;
        line-height: 1.7;
    }
    
    /* Tables mobile */
    .blog-content table {
        font-size: 12px;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .blog-content th,
    .blog-content td {
        padding: 8px 10px;
        white-space: nowrap;
    }
    
    /* Code blocks mobile */
    div.sourceCode {
        margin: 16px 0;
    }
    
    div.sourceCode pre {
        padding: 12px 14px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    div.sourceCode code {
        font-size: 12px;
    }
    
    /* Figures mobile */
    figure,
    .blogfigurelike {
        margin: 24px -12px;
    }
    
    figcaption,
    .blogfigurelikecaption {
        margin-top: 16px;
        padding: 0 12px;
        font-size: 12px;
    }
    
    /* KaTeX mobile - prevent long inline math from overflowing */
    .katex {
        overflow-wrap: anywhere;
    }
    
    .katex-display {
        margin: 16px -24px;
        padding: 12px 24px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Footnotes mobile */
    section.footnotes {
        margin-top: 36px;
        padding-top: 20px;
        font-size: 12px;
    }
    
    section.footnotes li {
        margin-bottom: 10px;
    }

    .minimal-footer {
        max-width: 100%;
        padding-top: 32px;
        margin-top: 48px;
    }

    .footer-links {
        gap: 16px;
    }
    
    .footer-links a {
        padding: 8px;
        margin: -8px;
    }
}

/* Responsive - Mobile Portrait */
@media (max-width: 600px) {
    .grid-2-col {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .grid-3-col {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .positions-cta {
        margin-top: 16px;
        margin-bottom: 56px;
    }

    /* Show hamburger, hide inline menu */
    .mobile-menu-toggle {
        display: block;
    }

    .sidebar .menu {
        display: none;
    }

    /* Mobile menu overlay */
    .mobile-menu-overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        z-index: 150;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    .mobile-menu-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .mobile-menu-content {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        height: 100%;
        gap: 0;
    }

    .mobile-menu-content a {
        font-size: 28px;
        font-weight: 400;
        color: var(--text-tertiary);
        text-decoration: none;
        padding: 16px 32px;
        transition: color 0.2s ease, transform 0.2s ease;
        letter-spacing: -0.01em;
    }

    .mobile-menu-content a:hover,
    .mobile-menu-content a.active {
        color: var(--text-primary);
    }

    .mobile-menu-content a.active {
        position: relative;
    }

    .mobile-menu-content a.active::after {
        content: '';
        position: absolute;
        bottom: 12px;
        left: 50%;
        transform: translateX(-50%);
        width: 4px;
        height: 4px;
        background: var(--text-primary);
        border-radius: 50%;
    }

    /* Prevent body scroll when menu is open */
    body.menu-open {
        overflow: hidden;
    }
}

@media (max-width: 480px) {
    :root {
        --top-spacing: 32px;
    }

    .sidebar {
        padding: 12px 16px;
        gap: 16px;
    }

    .main-content {
        padding: 90px 16px 48px;
    }

    .logo img {
        width: 70px !important;
    }

    .menu {
        gap: 14px;
    }

    .menu a {
        font-size: 13px;
    }

    h1,
    .jobs-heading {
        font-size: 26px;
        line-height: 1.2;
    }

    .intro-text {
        font-size: 14px;
        margin-bottom: 32px;
    }

    .page-intro {
        font-size: 16px;
        margin-bottom: 16px;
    }

    .home-intro-text {
        font-size: 15px;
    }

    .card {
        padding: 14px;
    }

    .card.card-outline {
        padding: 0;
    }

    .card h3 {
        font-size: 14px;
    }
    
    .card p {
        font-size: 14px;
    }

    .jobs-section {
        margin-bottom: 48px;
    }

    .section-label {
        font-size: 11px;
        margin-bottom: 20px;
        padding-top: 12px;
    }

    /* Timeline compact mobile */
    .timeline::before {
        left: 11px;
    }
    
    .timeline-marker {
        width: 22px;
        height: 22px;
        font-size: 10px;
    }
    
    .timeline-item {
        padding-left: 38px;
        padding-bottom: 24px;
    }

    /* Blog index compact mobile */
    .blog-index {
        gap: 36px;
    }

    .blog-section {
        gap: 10px;
    }

    .blog-section-title {
        font-size: 11px;
    }

    .blog-list-item {
        padding: 16px 0;
    }

    .blog-list-title {
        font-size: 15px;
    }

    .blog-list-meta {
        font-size: 13px;
    }

    /* Blog compact mobile */
    .blog-header h1 {
        font-size: 22px;
        line-height: 1.3;
    }
    
    .blogmetadata {
        font-size: 13px;
        margin: 16px 0 20px 0;
        padding-bottom: 16px;
    }
    
    #abstract {
        font-size: 13px;
        margin-bottom: 20px;
    }
    
    .blog-content h2 {
        font-size: 16px;
        margin-top: 32px;
    }
    
    .blog-content h3 {
        font-size: 14px;
        margin-top: 24px;
    }
    
    .blog-content p,
    .blog-content li {
        font-size: 14px;
    }
    
    /* Code blocks - keep contained on small screens */
    div.sourceCode {
        margin: 14px 0;
    }
    
    div.sourceCode pre {
        padding: 10px 12px;
    }
    
    figure,
    .blogfigurelike {
        margin: 20px -10px;
    }
    
    figcaption,
    .blogfigurelikecaption {
        padding: 0 10px;
        font-size: 11px;
    }
    
    .katex-display {
        margin: 14px -20px;
        padding: 10px 20px;
    }
    
    section.footnotes {
        font-size: 11px;
    }

    .minimal-footer {
        padding-top: 28px;
        margin-top: 40px;
        font-size: 12px;
    }
    
    .footer-links {
        gap: 12px;
    }
}

/* Extra small devices */
@media (max-width: 360px) {
    .main-content {
        padding: 90px 16px 40px;
    }
    
    h1,
    .jobs-heading {
        font-size: 24px;
    }
    
    .page-intro {
        font-size: 15px;
    }
    
    .blog-header h1 {
        font-size: 20px;
    }
    
    div.sourceCode {
        margin: 12px 0;
    }
    
    div.sourceCode pre {
        padding: 10px 12px;
    }
    
    .katex-display {
        margin: 12px -16px;
        padding: 10px 16px;
    }
}

/* Print styles */
@media print {
    .sidebar {
        display: none;
    }

    .layout {
        grid-template-columns: 1fr;
    }

    .main-content {
        padding: 0;
    }

    .blog-content {
        max-width: 100%;
    }
    
    .mobile-menu-toggle {
        display: none;
    }
}

/* Touch device improvements */
@media (hover: none) and (pointer: coarse) {
    .menu a,
    .job-listing,
    .faq-item summary,
    .footer-links a {
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.05);
    }
    
    .job-listing:hover {
        padding-left: 0;
    }
    
    .job-listing:active {
        padding-left: 8px;
        background: rgba(0, 0, 0, 0.02);
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

