/* Site stylesheet: the homepage (body.home) and the paper pages (body.project).
   Follows the system light/dark setting. */

:root {
  --bg: #fff;
  --text: #1f2328;
  --muted: #636c76;
  --rule: #e5e7eb;
  --accent: #0e7490;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1419;
    --text: #e6e6e6;
    --muted: #9aa4af;
    --rule: #2a313a;
    --accent: #5ec4d6;
  }
}

body {
  margin: 0 auto;
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
}

img { max-width: 100%; height: auto; }

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

/* Small uppercase section labels, shared by both page types. */
.home h2, .project h2.title {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
}


/* ---- Homepage: sticky sidebar with photo and section links ---- */

.home {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  column-gap: 3.5rem;
  max-width: 1100px;
  padding: 0 1.5rem;
}

.home > * { grid-column: 2; }

.home .intro {
  grid-column: 1;
  grid-row: 1 / span 20;
  align-self: start;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  padding-top: 3rem;
}

.home .photo {
  order: -1;
  width: 180px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 1.25rem;
}

.home h1 { font-size: 1.6rem; margin: 0; }

.home .nav {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
}
.home .nav a { color: var(--muted); }
.home .nav a:hover { color: var(--accent); text-decoration: none; }

.home .bio { padding-top: 3rem; }

.home h2 { margin: 3rem 0 1rem; }

.home .contact td:first-child { color: var(--muted); padding-right: 1rem; }

.home ul { list-style: none; padding: 0; margin: 0; }

/* Papers and patents: authors muted, title on its own line, venue below. */
.home .papers li, .home .patents li {
  color: var(--muted);
  font-size: .92rem;
  padding: .6rem 0 .6rem 1rem;
  margin-bottom: .5rem;
  border-left: 2px solid var(--rule);
}
.home .papers li:hover, .home .patents li:hover { border-left-color: var(--accent); }
.home .papers li br, .home .patents li br { display: none; }
.home li b { display: block; font-weight: 600; font-size: 1.05rem; color: var(--text); }
.home .papers li i, .home .patents li i { display: block; }

.home .events table { border-collapse: collapse; width: 100%; }
.home .events td { padding: .55rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.home .events td:first-child {
  white-space: nowrap;
  padding: .7rem 1.5rem 0 0;
  color: var(--muted);
  font-size: .82rem;
  font-variant-numeric: tabular-nums;
}
.home .events td br { display: none; }
.home .events td i { display: block; color: var(--muted); }

.home footer { color: var(--muted); font-size: .85rem; padding: 2rem 0 3rem; }
.home footer hr { border: 0; border-top: 1px solid var(--rule); }

@media (max-width: 760px) {
  .home { display: block; }
  .home .intro { position: static; padding-top: 2rem; }
  .home .photo { width: 120px; }
  .home .nav { flex-direction: row; flex-wrap: wrap; gap: .4rem 1rem; }
  .home .bio { padding-top: .5rem; }
  .home .events tr, .home .events td { display: block; }
  .home .events td { border: 0; padding: 0; }
  .home .events tr { padding: .6rem 0; border-bottom: 1px solid var(--rule); }
}


/* ---- Paper pages: single column, title, authors, abstract, links ---- */

.project {
  max-width: 46rem;
  padding: 2rem 1.5rem 4rem;
}

.project .back { margin-bottom: 3rem; font-size: .9rem; }
.project .back a { color: var(--muted); }
.project .back a:hover { color: var(--accent); text-decoration: none; }

/* The old template centres titles with <center>; align them left instead. */
.project center { text-align: left; }

.project .header { color: var(--muted); }
.project .header h1 { font-size: 1.9rem; line-height: 1.25; margin: 0 0 .75rem; color: var(--text); }
.project .header h3 { font-size: 1.05rem; font-weight: normal; margin: 0 0 .25rem; }

.project .content {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}
.project h2.title { margin: 0 0 1rem; }
.project .left-panel-in p { margin: 0 0 1rem; }

@media (max-width: 600px) {
  .project { padding-top: 1.25rem; }
  .project .back { margin-bottom: 2rem; }
  .project .header h1 { font-size: 1.5rem; }
}
