/* Academic Website Styles — minimal, single column, neutral palette */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300..700&family=Source+Serif+4:opsz,wght@8..60,400..700&display=swap');

:root {
    --bg: #ffffff;
    --text: #111111;
    --accent: #333333;
    --muted: #777777;
    --rule: #e6e6e6;
    --surface: #f7f7f7;

    --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
    --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --measure: 780px;
}

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

body {
    font-family: var(--sans);
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.65;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-thickness: 1px;
    text-decoration-color: #bbb;
}

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

/* Navigation — plain text, no colour block */
.navbar {
    background-color: transparent;
    border-bottom: 1px solid var(--rule);
    padding: 1.25rem 0;
    position: static;
}

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

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: flex-start;
    align-items: center;
}

.nav-links a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    padding: 0.15rem 0;
    border-bottom: 1px solid transparent;
    transition: color 0.15s, border-color 0.15s;
}

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

.nav-links a.active {
    color: var(--text);
    border-bottom-color: var(--text);
}

/* Nav icons are dropped in the minimal layout */
.nav-links a svg {
    display: none;
}

/* Main Container — single column */
.container {
    max-width: var(--measure);
    margin: 0 auto;
    padding: 2.25rem 1.5rem 0;
    display: block;
}

/* Identity header (replaces the old sidebar card) */
.profile-header {
    display: flex;
    align-items: flex-start;
    gap: 1.75rem;
    margin-bottom: 1.75rem;
}

.profile-img {
    width: 132px;
    height: 132px;
    border-radius: 3px;
    object-fit: cover;
    object-position: center center;
    border: none;
    flex-shrink: 0;
    /* aligns the avatar's top edge with the cap height of the h1 beside it:
       2.28px half-leading + 8.66px ascent-to-cap gap in Source Serif 4 */
    margin-top: 0.68rem;
}

.profile-meta {
    flex: 1;
    min-width: 0;
}

.profile-meta h1 {
    font-family: var(--serif);
    font-size: 1.9rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.01em;
    line-height: 1.15;
    margin-bottom: 0.35rem;
}

.profile-meta .title {
    font-size: 0.95rem;
    color: var(--text);
    margin-bottom: 0.15rem;
}

.profile-meta .affiliation,
.profile-meta .address {
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 0.15rem;
}

.contact-line {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: var(--muted);
}

.contact-line a {
    color: var(--accent);
}

.contact-line .sep {
    color: #ccc;
    margin: 0 0.4rem;
}

.last-updated {
    font-size: 0.8rem;
    color: var(--muted);
    margin-top: 0.6rem;
}

/* Legacy sidebar helpers kept so unlinked pages still render */
.email {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.email a {
    color: var(--accent);
}

.copy-icon {
    cursor: pointer;
    width: 15px;
    height: 15px;
    opacity: 0.45;
}

.copy-icon:hover {
    opacity: 0.9;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.5rem;
}

.social-links a {
    display: inline-block;
    width: 20px;
    height: 20px;
    opacity: 0.45;
    transition: opacity 0.2s;
}

.social-links a:hover {
    opacity: 0.9;
}

.social-links img {
    width: 100%;
    height: 100%;
    filter: grayscale(100%);
}

.call-to-action {
    background-color: var(--surface);
    color: var(--text);
    padding: 1rem;
    border-radius: 3px;
    font-size: 0.88rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* Main Content */
.content {
    min-height: 400px;
    padding-bottom: 1rem;
}

.content h2 {
    font-family: var(--serif);
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text);
    text-transform: none;
    letter-spacing: 0;
    margin-top: 2.25rem;
    margin-bottom: 0.85rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid var(--rule);
}

.content > h2:first-child {
    margin-top: 0;
}

.content h3 {
    font-family: var(--serif);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.content p {
    margin-bottom: 0.9rem;
    line-height: 1.75;
    color: var(--text);
}

.content ul {
    list-style: none;
    padding-left: 0;
}

.content li {
    margin-bottom: 0.6rem;
    padding-left: 1.1rem;
    position: relative;
    line-height: 1.7;
}

.content li::before {
    content: "\2022";
    position: absolute;
    left: 0;
    color: #bbb;
    font-weight: normal;
}

.research-tags {
    display: inline-block;
    background-color: transparent;
    color: var(--muted);
    padding: 0;
    border-radius: 0;
    font-size: 0.85rem;
    margin-left: 0.4rem;
    font-style: italic;
}

.research-tags::before {
    content: "— ";
}

.pub-note {
    font-size: 0.88rem;
    color: var(--muted);
    margin-bottom: 1rem;
}

/* Publications */
.publication-item {
    margin-bottom: 1.5rem;
    padding-bottom: 0;
    border-bottom: none;
}

.publication-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.2rem;
    line-height: 1.5;
}

.publication-title a {
    color: var(--text);
}

.publication-authors {
    margin-bottom: 0.15rem;
    color: var(--muted);
    font-size: 0.92rem;
}

.publication-authors strong {
    color: var(--text);
    font-weight: 600;
}

.publication-venue {
    font-style: italic;
    color: var(--muted);
    margin-bottom: 0.45rem;
    font-size: 0.92rem;
}

.publication-links {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.publication-links a,
.publication-links button {
    background-color: transparent;
    border: 1px solid var(--rule);
    padding: 0.15rem 0.55rem;
    border-radius: 3px;
    text-decoration: none;
    color: var(--muted);
    font-family: var(--sans);
    font-size: 0.78rem;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}

.publication-links a:hover,
.publication-links button:hover {
    border-color: var(--accent);
    color: var(--text);
}

/* Education & Experience */
.education-item,
.experience-item {
    margin-bottom: 1.9rem;
    padding-bottom: 0;
    border-bottom: none;
}

.degree-title,
.job-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.15rem;
    line-height: 1.5;
}

.institution,
.company {
    font-weight: 400;
    color: var(--muted);
    margin-bottom: 0.5rem;
    font-size: 0.92rem;
}

.degree-meta,
.job-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-top: 0.35rem;
}

.degree-info,
.job-info {
    flex: 1;
}

.degree-info p,
.job-info p {
    font-size: 0.94rem;
    margin-bottom: 0.45rem;
    color: var(--text);
}

.degree-dates,
.job-dates {
    text-align: right;
    color: var(--muted);
    font-size: 0.88rem;
    white-space: nowrap;
}

.degree-location,
.job-location {
    text-align: right;
    color: var(--muted);
    font-size: 0.85rem;
    margin-top: 0.15rem;
    white-space: nowrap;
}

/* Honors */
.honor-item {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    margin-bottom: 0.6rem;
}

.honor-icon {
    display: none;
}

.honor-text {
    flex: 1;
    font-size: 0.94rem;
}

.honor-year {
    font-weight: 600;
    color: var(--text);
}

/* Footer */
.footer {
    background-color: transparent;
    color: var(--muted);
    border-top: 1px solid var(--rule);
    padding: 1.5rem 0 2.5rem;
    margin-top: 3.5rem;
}

.footer-content {
    max-width: var(--measure);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-links {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.footer-links a {
    opacity: 0.4;
    transition: opacity 0.2s;
}

.footer-links a:hover {
    opacity: 0.85;
}

.footer-links img {
    width: 18px;
    height: 18px;
    filter: grayscale(100%);
}

.footer-copyright {
    font-size: 0.82rem;
    color: var(--muted);
}

/* Responsive */
@media (max-width: 700px) {
    .container {
        padding: 2rem 1.25rem 0;
    }

    .profile-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.1rem;
    }

    .profile-img {
        width: 108px;
        height: 108px;
        margin-top: 0;
    }

    .nav-links {
        gap: 1.1rem;
        overflow-x: auto;
        padding-bottom: 0.4rem;
    }

    .degree-meta,
    .job-meta {
        flex-direction: column;
    }

    .degree-dates,
    .job-dates,
    .degree-location,
    .job-location {
        text-align: left;
        margin-top: 0.4rem;
    }

    .footer-content {
        justify-content: flex-start;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.mt-2 { margin-top: 0.5rem; }
.mb-2 { margin-bottom: 0.5rem; }

/* Blog */
.blog-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.75rem;
}

.blog-item {
    padding: 0 0 1.5rem;
    background-color: transparent;
    border-radius: 0;
    border-left: none;
    border-bottom: 1px solid var(--rule);
}

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

.blog-date {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 0.35rem;
}

.blog-title {
    font-family: var(--serif);
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.blog-title a {
    color: var(--text);
    text-decoration: none;
}

.blog-title a:hover {
    text-decoration: underline;
}

.blog-excerpt {
    color: var(--text);
    line-height: 1.75;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.blog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tag {
    background-color: transparent;
    color: var(--muted);
    border: 1px solid var(--rule);
    padding: 0.1rem 0.5rem;
    border-radius: 3px;
    font-size: 0.78rem;
    font-weight: 400;
}

/* Blog Post Page */
.container.blog-full-width {
    max-width: var(--measure);
}

.blog-post {
    max-width: 100%;
    margin: 0;
    padding: 0;
    width: 100%;
}

.blog-post-header {
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--rule);
}

.blog-post-title {
    font-family: var(--serif);
    font-size: 1.65rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.6rem;
}

.blog-post-meta {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    font-size: 0.88rem;
    color: var(--muted);
    margin-bottom: 0.5rem;
}

.blog-post-content {
    line-height: 1.8;
    color: var(--text);
}

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

.blog-post-content h3 {
    font-family: var(--serif);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    margin-top: 2rem;
    margin-bottom: 0.9rem;
}

.blog-post-content h4 {
    font-family: var(--serif);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
    margin-top: 1.5rem;
    margin-bottom: 0.6rem;
}

.blog-post-content code {
    background-color: var(--surface);
    padding: 0.15rem 0.35rem;
    border-radius: 3px;
    font-family: ui-monospace, 'SF Mono', Menlo, monospace;
    font-size: 0.88em;
    color: var(--text);
}

.blog-post-content pre {
    background-color: #1a1a1a;
    color: #f2f2f2;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    margin: 1rem 0;
}

.blog-post-content pre code {
    background-color: transparent;
    color: inherit;
    padding: 0;
}

.blog-post-content ul,
.blog-post-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.blog-post-content li {
    margin-bottom: 0.4rem;
}

.blog-post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 1.25rem 0;
}

.blog-post-content blockquote {
    border-left: 2px solid var(--rule);
    padding-left: 1rem;
    margin: 1.25rem 0;
    color: var(--muted);
    font-style: italic;
}

.back-to-blog {
    display: inline-block;
    margin-bottom: 1.5rem;
    color: var(--muted);
    text-decoration: none;
    font-size: 0.9rem;
}

.back-to-blog:hover {
    color: var(--text);
}

/* Photography Gallery (page retained, unlinked from nav) */
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.photo-item {
    position: relative;
    overflow: hidden;
    border-radius: 3px;
    box-shadow: none;
    transition: opacity 0.2s;
    cursor: pointer;
    aspect-ratio: 1;
}

.photo-item:hover {
    opacity: 0.88;
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.92);
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 3px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 38px;
    font-weight: 300;
    cursor: pointer;
    z-index: 10000;
}

.lightbox-close:hover {
    color: #ccc;
}

@media (max-width: 700px) {
    .photo-gallery {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 0.75rem;
    }
}

/* Hide ClustrMaps widget - invisible visitor tracking */
#clstr_globe,
#clstr_globe *,
[id*="clstr"],
[class*="clstr"],
iframe[src*="clustrmaps"],
iframe[src*="clustr"],
div[id*="clustr"],
div[class*="clustr"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    position: absolute !important;
    left: -9999px !important;
    overflow: hidden !important;
    pointer-events: none !important;
}
