/* Site-wide styles for every page that uses the shared layout.
   Colors are defined once here; change them to restyle the whole site. */

:root {
  --maroon: #7a2828;        /* banner, headings, current menu item */
  --maroon-dark: #5c1d1d;
  --maroon-tint: #f6eeec;   /* menu and table backgrounds */
  --text: #24292f;
  --muted: #5b6168;
  --line: #e2dcd9;
  --link: #8a2c2c;
  --bg: #ffffff;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font);
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

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

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

/* ---------- Banner ---------- */

.site-header {
  background: var(--maroon);
  color: #fff;
  padding: 28px 0 24px;
}

.site-name {
  display: block;
  color: #fff;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
}
.site-name:hover { text-decoration: none; }

.site-tagline {
  margin-top: 4px;
  color: #f0dcd9;
  font-size: 1.02rem;
}

/* ---------- Three-column page ---------- */

.page {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) 220px;
  gap: 40px;
  padding-top: 32px;
  padding-bottom: 48px;
}

/* ---------- Left menu ---------- */

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  position: sticky;
  top: 20px;
}

.site-nav li { margin: 0 0 4px; }

.site-nav a {
  display: block;
  padding: 8px 12px;
  border-left: 3px solid transparent;
  border-radius: 0 6px 6px 0;
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
}

.site-nav a:hover {
  background: var(--maroon-tint);
  text-decoration: none;
}

.site-nav a.current {
  background: var(--maroon-tint);
  border-left-color: var(--maroon);
  color: var(--maroon);
}

/* ---------- Main content ---------- */

.content { min-width: 0; }

.content h2 {
  margin: 0 0 16px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--line);
  color: var(--maroon);
  font-size: 1.6rem;
  line-height: 1.3;
}

.content h2 ~ h2,
.content .block + .block h2 { margin-top: 40px; }

.content h3 {
  margin: 28px 0 10px;
  color: var(--maroon-dark);
  font-size: 1.15rem;
}

.content p { margin: 0 0 12px; }

.content ul { padding-left: 1.3em; margin: 0 0 16px; }
.content li { margin-bottom: 6px; }
.content li > p { margin: 0; }

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

/* Paper titles in publication lists */
.content li strong { color: var(--text); }

/* Old pages wrap lists in <dd>; remove the extra indent */
.content dl, .content dd { margin: 0; }

.content .block { margin-bottom: 8px; }

/* ---------- Presentations table ---------- */

table.conferences {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

table.conferences td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

table.conferences td:first-child { width: 150px; color: var(--muted); }

table.conferences td:last-child { width: 170px; color: var(--muted); }

table.conferences tr:nth-child(even) td { background: #fbf8f7; }

table.conferences em { color: var(--text); font-style: italic; }

/* ---------- Right column (photo and contact) ---------- */

.profile { font-size: 0.92rem; color: var(--muted); }

.profile img {
  display: block;
  width: 194px;
  border-radius: 8px;
  margin-bottom: 12px;
}

.profile-name { margin: 0; color: var(--text); font-weight: 700; font-size: 1rem; }
.profile-role { margin: 2px 0 0; }

.profile h3 {
  margin: 20px 0 4px;
  color: var(--text);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.profile p { margin: 0; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 20px 0 28px;
  color: var(--muted);
  font-size: 0.88rem;
  text-align: center;
}

/* ---------- Tablets: drop the right column below the content ---------- */

@media (max-width: 1000px) {
  .page { grid-template-columns: 170px minmax(0, 1fr); gap: 32px; }
  .profile {
    grid-column: 2;
    display: grid;
    grid-template-columns: 120px 1fr;
    column-gap: 20px;
    align-items: start;
    border-top: 1px solid var(--line);
    padding-top: 24px;
  }
  .profile img { width: 120px; grid-row: span 8; }
  .profile h3 { margin-top: 12px; }
}

/* ---------- Phones: menu becomes a row of tabs, everything stacks ---------- */

@media (max-width: 680px) {
  .wrap { padding: 0 16px; }
  .site-header { padding: 20px 0 18px; }
  .site-name { font-size: 1.55rem; }
  .site-tagline { font-size: 0.92rem; }

  .page { display: block; padding-top: 0; }

  .site-nav {
    margin: 0 -16px 24px;
    border-bottom: 1px solid var(--line);
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 5;
  }
  .site-nav ul {
    position: static;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0 4px;
  }
  .site-nav li { margin: 0; flex: none; }
  .site-nav a {
    padding: 10px 9px;
    border-left: 0;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    font-size: 0.92rem;
  }
  .site-nav a:hover { background: none; }
  .site-nav a.current { background: none; border-bottom-color: var(--maroon); }

  .content h2 { font-size: 1.35rem; }

  .profile {
    display: grid;
    grid-template-columns: 96px 1fr;
    margin-top: 32px;
  }
  .profile img { width: 96px; }

  /* Stack each presentation as a card */
  table.conferences, table.conferences tbody, table.conferences tr, table.conferences td { display: block; width: auto !important; }
  table.conferences tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  table.conferences td { padding: 1px 0; border: 0; white-space: normal !important; background: none !important; }
}
