:root {
    --bg: #fff;
    --text: #222;
    --muted: #666;
    --rule: #e5e5e5;
    --link: #1772d0;
    --link-hover: #f09228;
}

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

body {
    background: var(--bg);
    color: var(--text);
    font-family: "Lato", Verdana, Helvetica, sans-serif;
    font-size: 15px;
    line-height: 1.55;
}

main {
    max-width: 820px;
    margin: 0 auto;
    padding: 3rem 20px 2.5rem;
}

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); }
b { font-weight: 700; }

/* Intro */
.intro { width: 100%; border-collapse: collapse; }
.intro td { vertical-align: middle; }
.intro-text { padding-right: 2.5rem; }
.intro-text p { margin-bottom: 0.9rem; }
h1 {
    font-size: 2rem;
    font-weight: 400;
    text-align: center;
    margin-bottom: 1.2rem;
}
.seeking { padding: 0.6rem 0.8rem; background: #f6f8fb; border-left: 3px solid var(--link); }
.links { text-align: center; margin-top: 1.1rem; }
.intro-photo { width: 34%; }
.intro-photo img {
    display: block;
    width: 100%;
    height: auto;
}

/* Sections */
h2 {
    font-size: 1.35rem;
    font-weight: 400;
    margin: 2.6rem 0 0.9rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid var(--rule);
}
.section-note { margin-bottom: 1.2rem; }

.news { list-style: none; }
.news li { display: flex; gap: 1rem; margin-bottom: 0.35rem; }
.news .when { flex: 0 0 5.2rem; color: var(--muted); }

/* Paper / project entries */
.entry { margin-bottom: 1.4rem; }
.entry p { margin: 0; }
.title { font-weight: 700; }
.title a { font-weight: 700; }
.authors, .venue { color: var(--text); }
.refs { margin-top: 0.1rem !important; }
.refs a { white-space: nowrap; }
.refs a::before { content: "["; color: var(--text); }
.refs a::after { content: "]"; color: var(--text); }
.desc { margin-top: 0.35rem !important; color: #444; }
.other { color: #444; margin-top: 0.4rem; }

/* Papers: venue logo + text */
.paper { display: flex; gap: 1.4rem; align-items: center; margin-bottom: 1.6rem; }
.paper-logo { flex: 0 0 140px; display: flex; justify-content: center; }
.paper-logo img { display: block; max-width: 130px; max-height: 56px; width: auto; height: auto; }
.paper-logo .logo-icaif { max-height: 68px; }
.paper-logo .logo-ssrn { max-width: 100px; }
.paper-text { flex: 1; min-width: 0; }
.paper-text p { margin: 0; }
@media (max-width: 600px) {
    .paper { flex-direction: column; align-items: flex-start; gap: 0.6rem; }
    .paper-logo { flex-basis: auto; justify-content: flex-start; }
}

/* CV tables */
.cv { width: 100%; border-collapse: collapse; }
.cv td { padding: 0.25rem 0; vertical-align: top; }
.cv .when { width: 11rem; color: var(--muted); padding-right: 1rem; white-space: nowrap; }

.role-desc { display: block; color: #444; }

.footer {
    margin-top: 3rem;
    text-align: right;
    font-size: 0.8rem;
    color: var(--muted);
}

/* Blog */
.post-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1rem; }
.post-card {
    display: flex; flex-direction: column; gap: 0.35rem;
    padding: 1rem 1.1rem;
    border: 1px solid var(--rule); border-radius: 6px;
    color: var(--text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.post-card:hover { color: var(--text); border-color: var(--link); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06); }
.card-date { font-size: 0.8rem; color: var(--muted); }
.card-title { font-weight: 700; color: var(--link); }
.post-card:hover .card-title { color: var(--link-hover); }
.card-desc { color: #444; font-size: 0.92rem; }

.crumb { color: var(--muted); font-size: 0.9rem; margin-bottom: 1.5rem; }
.page-title { text-align: left; font-size: 2rem; line-height: 1.25; margin-bottom: 0.6rem; }
.post-list { list-style: none; margin-top: 1.5rem; }
.post-list li { display: flex; gap: 1rem; padding: 0.45rem 0; border-bottom: 1px solid var(--rule); }
.post-list .when { flex: 0 0 5.2rem; color: var(--muted); }
.post-list .empty { color: var(--muted); font-style: italic; border-bottom: none; }

.post { max-width: 680px; font-size: 16px; line-height: 1.7; }
.post-date { color: var(--muted); margin-bottom: 1.8rem; }
.post p, .post ul, .post ol, .post pre, .post blockquote { margin-bottom: 1.1rem; }
.post h3 { font-size: 1.15rem; margin: 2rem 0 0.6rem; }
.post ul, .post ol { padding-left: 1.4rem; }
.post pre { background: #f6f8fa; padding: 0.9rem 1rem; overflow-x: auto; border-radius: 4px; font-size: 0.85rem; line-height: 1.5; }
.post code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.post blockquote { border-left: 3px solid var(--rule); padding-left: 1rem; color: var(--muted); }
.post img { max-width: 100%; height: auto; }

@media (max-width: 640px) {
    main { padding-top: 2rem; }
    .intro, .intro tbody, .intro tr, .intro td { display: block; width: 100%; }
    .intro-text { padding-right: 0; }
    .intro-photo { width: 60%; margin: 0 auto 1.5rem; }
    .intro tr { display: flex; flex-direction: column-reverse; }
    .news li { flex-direction: column; gap: 0; margin-bottom: 0.6rem; }
    .news .when { flex: none; }
    .cv .when { width: 6rem; white-space: normal; }
    .footer { text-align: left; }
    .post-list li { flex-direction: column; gap: 0; }
    .post-cards { grid-template-columns: 1fr; }
}
