
:root {
    --primary: #0078d4;
    --bg: #ffffff;
    --bg-alt: #f5f5f5;
    --text: #242424;
    --text-light: #616161;
    --border: #e0e0e0;
    --accent: #d83b01;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    max-width: 960px;
    margin: 0 auto;
    padding: 20px;
}
p { margin-bottom: 20px; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
nav { background: var(--bg-alt); padding: 12px 20px; border-radius: 8px; margin-bottom: 30px; }
nav a { margin-right: 20px; font-weight: 500; }
nav a.active { color: var(--accent); }
h1 { font-size: 2em; margin-bottom: 4px; }
h2 { font-size: 1.5em; margin: 30px 0 15px; border-bottom: 2px solid var(--primary); padding-bottom: 6px; }
h3 { font-size: 1.15em; margin: 20px 0 8px; }
.subtitle { color: var(--text-light); font-size: 1.1em; margin-bottom: 20px; }
.profile-header { display: flex; gap: 24px; align-items: flex-start; margin-bottom: 30px; }
.profile-header img { width: 160px; height: 160px; border-radius: 50%; object-fit: cover; }
.profile-info { flex: 1; position: relative; }
.contact-links { position: absolute; top: 0; right: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.contact-links a { display: inline-flex; align-items: center; color: var(--text-light); transition: color 0.2s; padding: 4px; }
.contact-links a:hover { color: var(--primary); }
.tag { display: inline-block; background: var(--bg-alt); border: 1px solid var(--border);
       padding: 3px 10px; border-radius: 14px; font-size: 0.85em; margin: 2px 4px 2px 0; }
.year-group { margin: 30px 0 10px; }
.year-label { font-size: 1.3em; font-weight: 700; color: var(--primary); }
.pub-card {
    border: 1px solid var(--border); border-radius: 8px; padding: 16px;
    margin-bottom: 12px; transition: box-shadow 0.2s;
    display: flex; gap: 16px; align-items: flex-start;
    flex-direction: row-reverse;
}
.pub-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.pub-hero {
    width: 160px; height: 110px; object-fit: cover; border-radius: 6px;
    flex-shrink: 0; background: var(--bg-alt);
}
.pub-card-body { flex: 1; min-width: 0; }
.pub-card-body h3 { margin: 0 0 6px; }
.pub-card .authors { color: var(--text-light); font-size: 0.9em; }
.pub-card .venue { font-style: italic; font-size: 0.9em; margin: 4px 0; }
.pub-card .links { margin-top: 8px; }
.pub-card .links a {
    display: inline-block; margin-right: 10px; padding: 2px 8px;
    border: 1px solid var(--primary); border-radius: 4px; font-size: 0.85em;
}
.pub-card .links a:hover { background: var(--primary); color: #fff; text-decoration: none; }
.award { background: #fff3cd; color: #856404; padding: 2px 8px; border-radius: 4px;
         font-size: 0.8em; font-weight: 600; display: inline-block; margin: 4px 4px 4px 0; }
.abstract { margin: 16px 0; line-height: 1.7; }
.bibtex { background: var(--bg-alt); padding: 12px; border-radius: 6px;
          font-family: 'Cascadia Code', 'Consolas', monospace; font-size: 0.82em;
          white-space: pre-wrap; word-break: break-all; overflow-x: auto; margin: 12px 0; }
.meta-row { margin: 4px 0; font-size: 0.9em; }
.meta-label { font-weight: 600; }
footer { margin-top: 50px; padding-top: 16px; border-top: 1px solid var(--border);
         color: var(--text-light); font-size: 0.85em; text-align: center; }

/* Collapsible year sections */
.year-section { margin: 10px 0; }
.year-section > summary { cursor: pointer; list-style: none; padding: 8px 0; }
.year-section > summary::-webkit-details-marker { display: none; }
.year-section > summary::before { content: "▾ "; color: var(--primary); font-weight: bold; }
.year-section[open] > summary::before { content: "▾ "; }
.year-section:not([open]) > summary::before { content: "▸ "; }
/* Collapsible pub details */
.pub-details { margin-top: 8px; }
.pub-details > summary { cursor: pointer; font-size: 0.85em; color: var(--primary); font-weight: 500; padding: 4px 0; }
.pub-details img.pub-thumb { max-width: 250px; margin: 10px 0; border-radius: 6px; display: block; }

/* Project grid */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin: 20px 0 30px;
}
.project-tile {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: var(--text);
    transition: box-shadow 0.2s, transform 0.15s;
}
.project-tile:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    transform: translateY(-2px);
    text-decoration: none;
}
.project-tile img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background: var(--bg-alt);
}
.project-tile-placeholder {
    width: 100%;
    height: 160px;
    background: linear-gradient(135deg, var(--primary), #50a0e0);
}
.project-tile-body {
    padding: 14px 16px;
}
.project-tile-body h3 {
    font-size: 1.05em;
    margin: 0 0 4px;
    color: var(--text);
}
.project-tile-body p {
    font-size: 0.85em;
    color: var(--text-light);
    margin: 0;
}
