/* ===================================
   Minimalist Academic Website Styles
   =================================== */

/* Google Fonts - Cormorant for headings (elegant, thin serif), Source Serif for body */
@import url('https://fonts.googleapis.com/css2?family=Cormorant:ital,wght@0,300;0,400;0,500;0,600;1,400&family=Source+Serif+4:ital,opsz,wght@0,8..60,300;0,8..60,400;0,8..60,500;1,8..60,400&display=swap');

:root {
    --text-primary: #1a1a1a;
    --text-secondary: #4a4a4a;
    --text-muted: #777;
    --accent: #1a6b9a;
    --accent-hover: #12567d;
    --border-light: #e0e0e0;
    --bg-subtle: #fafafa;
    --max-width: 1150px;
    
    --font-heading: 'Cormorant', Georgia, serif;
    --font-body: 'Source Serif 4', Cambria, Georgia, serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 17px;
    font-weight: 400;
    line-height: 1.7;
    color: var(--text-primary);
    background: #fff;
    -webkit-font-smoothing: antialiased;
}

/* ===================================
   Layout
   =================================== */

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2.5rem;
}

main {
    padding: 2.5rem 0 5rem;
}

main > h1:first-child {
    margin-top: 1.5rem;
}

main > .about-intro:first-child {
    margin-top: 1.5rem;
}

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

header {
    border-bottom: 1px solid var(--border-light);
    padding: 1.5rem 0;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 1rem;
}

.site-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.01em;
}

.site-title:hover {
    color: var(--accent);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    font-family: var(--font-heading);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 400;
    transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent);
    text-decoration: none;
}

/* ===================================
   Typography
   =================================== */

h1 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

h2 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 400;
    margin: 2.5rem 0 1rem;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 500;
    margin: 1.5rem 0 0.75rem;
    color: var(--text-primary);
}

p {
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
}

a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    transition: color 0.2s ease;
}

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

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

.about-intro {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 3rem;
    align-items: start;
    margin-bottom: 2rem;
}

.about-photo {
    width: 340px;
    height: auto;
    filter: grayscale(10%);
}

.about-text p:last-child {
    margin-bottom: 0;
}

/* ===================================
   Publications Section
   =================================== */

.publications-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
}

.publication {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 1.75rem;
    margin-bottom: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--border-light);
}

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

.publication-image {
    width: 240px;
    height: 168px;
    object-fit: contain;
    object-position: center;
    background: #fff;
}

.publication-content h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.35rem;
    font-weight: 500;
    color: var(--text-primary);
}

.publication-authors {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.publication-description {
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.publication-links {
    font-size: 0.9rem;
}

.publication-links a {
    margin-right: 1rem;
}

/* ===================================
   Posts / Blog
   =================================== */

.posts-list {
    list-style: none;
}

.posts-list li {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

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

.post-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
}

.post-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 500;
    margin: 0.25rem 0 0.5rem;
}

.post-excerpt {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0;
}

/* Single post page */
.post-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

.post-header h1 {
    margin-bottom: 0.5rem;
}

.post-meta {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
}

.post-content {
    line-height: 1.8;
}

.post-content p {
    margin-bottom: 1.5rem;
}

.post-content h2 {
    margin-top: 2.5rem;
}

.post-content pre {
    background: var(--bg-subtle);
    padding: 1rem 1.25rem;
    border-radius: 4px;
    overflow-x: auto;
    font-family: 'SF Mono', Consolas, 'Liberation Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 1.5rem 0;
    border: 1px solid var(--border-light);
}

.post-content code {
    font-family: 'SF Mono', Consolas, 'Liberation Mono', monospace;
    font-size: 0.9em;
    background: var(--bg-subtle);
    padding: 0.15em 0.4em;
    border-radius: 3px;
}

.post-content pre code {
    background: none;
    padding: 0;
}

.post-content blockquote {
    border-left: 3px solid var(--accent);
    padding-left: 1.25rem;
    margin: 1.5rem 0;
    color: var(--text-secondary);
    font-style: italic;
}

/* ===================================
   Vitae Page
   =================================== */

.vitae-section {
    margin-bottom: 2.5rem;
}

.vitae-section h2 {
    margin-top: 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-light);
}

.vitae-entry {
    margin: 1.25rem 0;
}

.vitae-entry-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.vitae-entry h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
}

.vitae-date {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
}

.vitae-entry p {
    margin: 0.25rem 0 0;
    font-size: 0.95rem;
}

/* ===================================
   Projects Page
   =================================== */

.coming-soon {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
    font-style: italic;
    font-size: 1.1rem;
}

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

footer {
    border-top: 1px solid var(--border-light);
    padding: 1.5rem 0;
    margin-top: 3rem;
}

footer p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
    text-align: center;
}

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

@media (max-width: 800px) {
    :root {
        --max-width: 100%;
    }
    
    body {
        font-size: 16px;
    }
    
    .container {
        padding: 0 1.5rem;
    }
    
    main {
        padding: 2.5rem 0 4rem;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.4rem;
    }
    
    .about-intro {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .about-photo {
        width: 180px;
        order: -1;
    }
    
    .publication {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .publication-image {
        width: 100%;
        max-width: 200px;
        height: auto;
    }
    
    .nav-links {
        gap: 1.25rem;
    }
}

/* ===================================
   MathJax Adjustments
   =================================== */

.MathJax {
    font-size: 1em !important;
}

mjx-container[jax="CHTML"][display="true"] {
    margin: 1.5rem 0 !important;
}
