/* Import Nerd Font */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&display=swap');

:root {
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;
    --bg: #fafafa;
    --text: #1a1a1a;
    --link: #c85a28;
    --border: #ddd;
    --code-bg: #f4f4f4;
}

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

body {
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1.7;
    margin: 0;
    padding: 40px 20px;
    background: var(--bg);
    color: var(--text);
}

header {
    border-bottom: 2px solid var(--text);
    margin-bottom: 60px;
    padding-bottom: 20px;
}

.headshot {
    float: left;
    width: 80px;
    height: 80px;
    margin-right: 20px;
    margin-bottom: 10px;
    border-radius: 4px;
    object-fit: cover;
}

header h1 {
    font-size: 24px;
    margin: 0 0 10px 0;
    font-weight: 700;
}

.subtitle {
    font-size: 14px;
    color: #666;
    margin: 5px 0 15px 0;
    font-style: italic;
}

header::after {
    content: "";
    display: table;
    clear: both;
}

nav {
    font-size: 13px;
}

nav a {
    margin-right: 20px;
    color: var(--link);
    text-decoration: none;
}

nav a:hover {
    text-decoration: underline;
}

/* Two-column layout - 25% left, 75% right */
main.two-column {
    display: grid;
    grid-template-columns: 1fr 3fr;  /* Swapped: 25% / 75% ratio */
    gap: 60px;
    margin-bottom: 80px;
}

.main-content {
    min-width: 0; /* Prevents grid blowout */
}

.sidebar {
    position: sticky;
    top: 20px;
    align-self: start;
    font-size: 17px;  /* Increased from 13px - 4 steps larger */
    margin-top: -10px;
}

.sidebar h2 {
    font-size: 18px;  /* Increased from 14px */
    margin: 0 0 15px 0;
    font-weight: 700;
}

.sidebar h3 {
    font-size: 17px;  /* Increased from 13px */
    margin: 25px 0 12px 0;
    font-weight: 700;
}

.sidebar p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.sidebar > *:first-child {
    margin-top: 0;  /* Remove top margin from first paragraph */
}

.sidebar ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar li {
    margin-bottom: 8px;
}

.sidebar a {
    color: var(--link);
}


/* Publication styling */
.publication {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.publication:last-child {
    border-bottom: none;
}

.publication strong {
    font-size: 15px;
    line-height: 1.4;
}

.publication .authors {
    color: #555;
    font-size: 13px;
}

.publication em {
    color: #666;
    font-size: 13px;
}

.publication a {
    font-size: 12px;
    margin-right: 10px;
}

#featured-publications,
#collaborations {
    margin-bottom: 60px;
}

#featured-publications h2,
#collaborations h2 {
    font-size: 18px;
    margin: 0 0 30px 0;
    font-weight: 700;
}

h1, h2, h3 {
    margin: 40px 0 20px 0;
    font-weight: 700;
}

h1 { font-size: 22px; }
h2 { font-size: 18px; }
h3 { font-size: 16px; }

p {
    margin-bottom: 20px;
}

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

a:hover {
    text-decoration: underline;
}

code {
    background: var(--code-bg);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 13px;
}

pre {
    background: var(--code-bg);
    padding: 20px;
    overflow-x: auto;
    margin: 20px 0;
    border-left: 3px solid var(--link);
}

pre code {
    background: none;
    padding: 0;
}

ul, ol {
    margin: 20px 0 20px 30px;
}

li {
    margin-bottom: 8px;
}

/* Post list styling */
.post-list {
    list-style: none;
    margin-left: 0;
}

.post-list li {
    margin-bottom: 30px;
    border-left: 2px solid var(--border);
    padding-left: 15px;
}

.post-list time {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.post-list a {
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
}

.post-list a:hover {
    text-decoration: underline;
}

.post-list p {
    margin-top: 8px;
    font-size: 13px;
    color: #555;
}

footer {
    border-top: 1px solid var(--border);
    padding-top: 20px;
    margin-top: 60px;
    font-size: 12px;
    color: #666;
    line-height: 1.8;
}

footer p {
    margin-bottom: 8px;
}

footer a {
    color: #666;
}

footer a:hover {
    color: var(--link);
}

/* Responsive - stack columns on small screens */
@media (max-width: 600px) {
    main.two-column {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .sidebar {
        position: static;
        border-top: 1px solid var(--border);
        padding-top: 40px;
    }
}

@media (max-width: 600px) {
    body {
        font-size: 13px;
        padding: 20px 15px;
    }
    
    .headshot {
        width: 64px;
        height: 64px;
    }
    
    nav a {
        display: inline-block;
        margin: 5px 10px 5px 0;
    }
}

/* Single column layout for pages */
main.single-column {
    max-width: 900px;
    margin: 0 auto 80px auto;
}

/* Abstract styling */
.abstract {
    margin-top: 10px;
    margin-bottom: 10px;
}

.abstract summary {
    cursor: pointer;
    color: var(--link);
    font-size: 12px;
    padding: 5px 0;
    user-select: none;
}

.abstract summary:hover {
    text-decoration: underline;
}

.abstract p {
    margin-top: 10px;
    padding: 15px;
    background: var(--code-bg);
    border-left: 3px solid var(--link);
    font-size: 13px;
    line-height: 1.6;
    color: var(--text);
}

.abstract[open] summary {
    margin-bottom: 5px;
}

/* Post styling */
.post {
    margin-bottom: 60px;
}

.post-header {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.post-header h1 {
    margin: 0 0 10px 0;
    font-size: 32px;  /* Increased from 28px */
}

.post-header time {
    color: var(--muted);
    font-size: 16px;  /* Increased from 13px */
}

.post-content {
    line-height: 1.8;
    font-size: 17px;  /* Add this - increases base text size */
}

.post-content h1 {
    font-size: 28px;  /* Increased from 24px */
    margin: 40px 0 20px 0;
}

.post-content h2 {
    font-size: 24px;  /* Increased from 20px */
    margin: 35px 0 15px 0;
}

.post-content h3 {
    font-size: 20px;  /* Increased from 17px */
    margin: 30px 0 12px 0;
}

.post-content p {
    font-size: 17px;  /* Explicit paragraph size */
    margin-bottom: 20px;
}

.post-content code {
    font-size: 16px;  /* Increased from default */
}

.post-content pre code {
    font-size: 15px;  /* Slightly smaller in code blocks */
}

.post-content img {
    max-width: 100%;
    height: auto;
    margin: 20px 0;
}

.post-content blockquote {
    border-left: 3px solid var(--link);
    padding-left: 20px;
    margin: 20px 0;
    color: var(--muted);
    font-style: italic;
    font-size: 17px;  /* Match body text */
}

.post-nav {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.post-nav a {
    color: var(--link);
    text-decoration: none;
    font-size: 16px;  /* Increased from 14px */
}

.post-nav a:hover {
    text-decoration: underline;
}

/* Sidebar posts list */
.sidebar-posts {
    list-style: none;
    margin: 15px 0 20px 0;
    padding: 0;
}

.sidebar-posts li {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.sidebar-posts li:last-child {
    border-bottom: none;
}

.sidebar-posts a {
    display: block;
    font-size: 15px;
    line-height: 1.4;
    margin-bottom: 4px;
    color: var(--link);
}

.sidebar-posts time {
    display: block;
    font-size: 12px;
    color: var(--muted);
}
