/* Edit these values to change the whole site's appearance. */
/* Palette: navy headings, red accents, gray body/metadata, white canvas. */
:root {
  --navy: #18344f;
  --accent: #a12015;
  --text: #374151;
  --muted: #626b76;
  --border: #dce1e7;
  --surface: #f4f6f8;
  --width: 760px;
}
* { box-sizing: border-box; }
body { margin: 0; background: white; color: var(--text); font: 300 16px/1.5 Roboto, "Helvetica Neue", Arial, sans-serif; }
.container { width: min(var(--width), calc(100% - 40px)); margin-inline: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.site-header { border-bottom: 1px solid var(--border); background: #fff; }
.site-header nav { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; padding-block: 12px; }
.nav-links { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; }
.site-header .brand { display: inline-flex; align-items: center; gap: 7px; color: var(--accent); font-size: 23px; font-weight: 300; letter-spacing: .02em; line-height: 30px; text-decoration: none; }
.brand svg { flex: none; }
.site-header a { color: var(--navy); }
.site-header a[aria-current] { color: var(--accent); }
main { padding-top: 42px; padding-bottom: 60px; }
h1 { margin: 0 0 14px; font-size: 40px; line-height: 1.2; font-weight: 300; }
strong, b { font-weight: 500; }
h1 strong { font-weight: 700; }
h2 { font-size: 30px; line-height: 1.25; font-weight: 300; margin: 18px 0 14px; }
h2 a { color: inherit; }
.accent { color: var(--accent); }
p { margin: 0 0 16px; }
.bio { display: flow-root; }
.portrait { float: right; width: 30%; height: auto; margin: 4px 0 18px 26px; border-radius: 3px; box-shadow: 0 2px 7px #0003; }
.bio p:last-child { text-align: justify; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; vertical-align: top; padding: 7px 4px 13px; }
th { width: 20%; font-weight: 500; }
.paper { display: grid; grid-template-columns: 115px minmax(0, 1fr); gap: 15px; margin: 28px 0; }
.badge { display: inline-block; background: var(--navy); color: white; padding: 3px 10px; font-size: 13px; font-weight: 400; }
h3 { font-size: 16px; font-weight: 500; margin: 0 0 3px; }
.authors, .venue { margin-bottom: 4px; }
.venue { font-style: italic; }
.paper-links { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.button, summary { display: inline-block; border: 1px solid var(--border); border-radius: 3px; padding: 3px 12px; font-size: 12px; font-weight: 400; color: var(--navy); cursor: pointer; }
summary { list-style: none; }
summary::-webkit-details-marker { display: none; }
summary:hover, .button:hover, details[open] summary { color: var(--accent); border-color: var(--accent); }
details[open] { flex-basis: 100%; }
details p, pre { padding: 14px; margin: 8px 0 0; background: var(--surface); border-left: 2px solid var(--accent); }
pre { white-space: pre-wrap; overflow-wrap: anywhere; font: 13px/1.6 monospace; }
.social { display: flex; justify-content: center; flex-wrap: wrap; gap: 22px; padding-top: 22px; }
footer { background: var(--navy); color: #e3e8ee; font-size: 12px; padding: 8px 0; }
/* Footer pinned to the bottom of the window, as in al-folio; body padding keeps it from covering the last lines. */
footer { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }
body { padding-bottom: 40px; }
/* Contact links on the right of the footer bar. */
footer .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.footer-links a { display: inline-flex; align-items: center; gap: 5px; color: #e3e8ee; text-decoration: none; }
.footer-links a:hover { color: #fff; text-decoration: underline; }
.footer-links svg { width: 14px; height: 14px; flex: none; }
@media (max-width: 600px) { body { padding-bottom: 64px; } footer .container { justify-content: center; } }

@media (max-width: 600px) {
  .site-header nav { gap: 12px; }
  .nav-links { width: 100%; gap: 9px 17px; }
  main { padding-top: 28px; }
  h1 { font-size: 32px; }
  h2 { font-size: 26px; }
  .portrait { width: 34%; margin-left: 18px; }
  .bio p:last-child { text-align: left; }
  .paper { grid-template-columns: 1fr; gap: 8px; }
  th { width: 24%; }
}
@media print { .site-header, footer { display: none; } main { padding-top: 0; } }
/* Shared layouts for the standalone subpages. */
.site-header .brand-name { font-size: 19px; color: var(--navy); letter-spacing: 0; }
.post-header { margin-bottom: 28px; }
h4 { font-size: 20px; font-weight: 400; margin: 28px 0 10px; }
h6 { font-size: 16px; font-weight: 500; margin: 0 0 6px; }
main img { max-width: 100%; height: auto; }
figure { margin: 0 0 18px; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin-bottom: 32px; }
.grid-item .card { height: 100%; border: 1px solid var(--border); border-radius: 3px; overflow: hidden; box-shadow: 0 2px 5px #0001; }
.grid-item > a { display: block; height: 100%; color: inherit; }
.grid-item figure { margin: 0; }
.grid-item img { width: 100%; height: 145px; object-fit: cover; display: block; }
.card-body { padding: 15px; }
.card-body h2 { font-size: 22px; margin: 0 0 8px; }
.card-body p { margin: 0; }
.category { border-bottom: 1px solid var(--border); padding-bottom: 10px; }
.page-people article { display: flow-root; margin-bottom: 32px; }
.page-people .profile { float: right; width: 26%; margin: 0 0 18px 28px; }
.rounded-circle { border-radius: 50%; }
.cv > .card { border: 1px solid var(--border); border-radius: 4px; padding: 22px; margin-bottom: 24px; }
.cv .card-title { font-size: 24px; font-weight: 300; margin-bottom: 20px; }
.cv .list-group { list-style: none; margin: 0; padding: 0; }
.cv .list-group-item { padding: 14px 0; border-top: 1px solid var(--border); }
.cv .row { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 16px; }
.cv td { padding: 3px 6px; }
.cv .items { padding-left: 20px; margin: 5px 0; }
.page-project .row { display: flex; gap: 18px; flex-wrap: wrap; }
.page-project .row > div { flex: 1 1 200px; min-width: 0; }
.caption { color: var(--muted); font-size: 14px; text-align: center; margin-bottom: 25px; }
@media (max-width: 760px) { .site-header .brand-name { font-size: 17px; } .nav-links { gap: 12px; } }
@media (max-width: 600px) {
 .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
 .cv > .card { padding: 15px; }
 .cv .row { grid-template-columns: 1fr; gap: 6px; }
}
@media (max-width: 380px) { .grid { grid-template-columns: 1fr; } }

.brand img { display: block; width: 38px; height: 38px; object-fit: contain; }

/* Projects: linked image at left, short research summary at right. */
.project-list { margin-bottom: 38px; }
.project-row { display: grid; grid-template-columns: 30% minmax(0, 1fr); gap: 26px; align-items: center; padding: 24px 0; border-bottom: 1px solid var(--border); }
.project-row:last-child { border-bottom: 0; }
.project-image { display: flex; align-items: center; justify-content: center; border-radius: 4px; overflow: hidden; }
.project-image img { display: block; width: 100%; height: 145px; object-fit: contain; transition: opacity .15s; }
.project-image:hover img { opacity: .8; }
.project-summary h3 { font-size: 22px; line-height: 1.3; font-weight: 400; margin: 0 0 10px; }
.project-summary h3 a { color: var(--navy); }
.project-summary h3 a:hover { color: var(--accent); }
.project-summary p { margin: 0; line-height: 1.6; }
@media (max-width: 600px) {
 .project-row { gap: 16px; align-items: start; padding: 22px 0; }
 .project-image img { height: auto; max-height: 125px; }
 .project-summary h3 { font-size: 20px; }
}

/* Color hierarchy shared by all pages. */
h1, h2, h3, h4, h5, h6 { color: var(--navy); }
h2.accent { color: var(--accent); }
.authors, .venue, .post-header > p { color: var(--muted); }
th { color: var(--navy); }
.social a { color: var(--navy); }
.social a:hover { color: var(--accent); }
.site-header .nav-links a:hover { color: var(--accent); }
.button:hover, summary:hover, details[open] summary { background: #faf1ef; }

/* Phones: lay the six nav links out as a tidy 3 x 2 grid instead of leaving one orphan. */
@media (max-width: 600px) {
  .site-header .nav-links { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 6px 24px; }
}
