/* Shared style for all pages of Ali Rangwala's website.
   Edit the colors here once and every page changes. */

:root {
  --maroon: #660000;      /* accent color used on the old site */
  --text: #222222;
  --muted: #555555;
  --line: #dddddd;
  --page-width: 920px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: #ffffff;
}

.wrap {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header with flame photo ---------- */
.banner {
  background: #000 url("images/banner.jpg") center right / cover no-repeat;
  color: #fff;
  padding: 34px 0 30px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}
.banner .name {
  color: #fff;
  font-size: 30px;
  font-weight: bold;
  text-decoration: none;
}
.banner .sub {
  color: #e8e8e8;
  font-size: 15px;
  margin-top: 4px;
}

/* ---------- Menu bar ---------- */
nav {
  background: var(--maroon);
}
nav .wrap {
  display: flex;
  flex-wrap: wrap;
}
nav a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  font-size: 15px;
  padding: 10px 14px;
}
nav a:hover { background: rgba(255, 255, 255, 0.15); }
nav a.here { background: rgba(255, 255, 255, 0.25); }

/* ---------- Main text ---------- */
main.wrap { padding-top: 26px; padding-bottom: 40px; }

h1 { font-size: 24px; color: var(--maroon); margin: 6px 0 14px; }
h2 {
  font-size: 19px;
  color: var(--maroon);
  border-bottom: 1px solid var(--line);
  padding-bottom: 4px;
  margin: 30px 0 12px;
}
h3 { font-size: 16px; margin: 20px 0 6px; }

a { color: var(--maroon); }
p { margin: 0 0 12px; }
.muted { color: var(--muted); font-size: 14px; }

/* ---------- Home page: photo beside contact details ---------- */
.intro {
  display: flex;
  gap: 28px;
  align-items: flex-start;
}
.intro img {
  width: 260px;
  max-width: 100%;
  border-radius: 4px;
}
.intro .titles { margin: 0 0 12px; }
.links a { display: inline-block; margin: 0 14px 6px 0; }

/* ---------- Research page: photo beside text ---------- */
.topic {
  display: flex;
  gap: 22px;
  align-items: flex-start;
  margin-bottom: 8px;
}
.topic figure { margin: 4px 0 0; flex: 0 0 320px; }
.topic img { width: 100%; border-radius: 4px; }
figcaption { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* ---------- Lists (publications, students) ---------- */
ol.pubs li, ul.plain li { margin-bottom: 9px; }
ul.plain { padding-left: 20px; }
.person { margin-bottom: 14px; }
.person b { color: #000; }

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--line);
  padding: 14px 0 30px;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- Phones and narrow windows ---------- */
@media (max-width: 680px) {
  .intro, .topic { flex-direction: column; }
  .intro img { width: 220px; }
  .topic figure { flex: none; width: 100%; }
  .banner .name { font-size: 25px; }
  .banner {
    background-image: linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)), url("images/banner.jpg");
  }
  nav a { padding: 8px 10px; font-size: 14px; }
}

/* ---------- Group page: award photos side by side ---------- */
.award { color: var(--maroon); font-size: 14px; font-weight: bold; }
.photos {
  display: flex;
  gap: 16px;
  margin: 4px 0 18px;
}
.photos figure { margin: 0; flex: 1 1 0; }
.photos { max-width: 640px; }
.photos img { width: 100%; height: auto; border-radius: 4px; }
@media (max-width: 680px) {
  .photos { flex-direction: column; }
}

/* ---------- News links ---------- */
.news { font-size: 14px; margin-top: 4px; }
