/* Late-90s search-portal look (white page, Arial, blue rules, yellow bars),
   tuned for readability: 16px body text and generous line height. */

:root {
  --blue: #003399;
  --link: #000099;
  --visited: #663366;
  --active: #ff0000;
  --yellow: #ffcc66;
  --gray: #cccccc;
  --muted: #555555;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: #ffffff;
  color: #000000;
  font: 16px/1.55 Arial, Helvetica, sans-serif;
}

a { color: var(--link); }
a:visited { color: var(--visited); }
a { text-underline-offset: 2px; }
a:hover, a:active { color: var(--active); }

.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 16px;
}

/* ---------- masthead ---------- */

.masthead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 8px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo svg { flex: none; }

.logo-name {
  display: block;
  color: var(--blue);
  font-size: 34px;
  font-weight: bold;
  line-height: 1;
  letter-spacing: -0.5px;
}

.logo-tag {
  display: block;
  color: #000000;
  font-size: 13px;
  font-style: italic;
  margin-top: 4px;
}

.ad {
  flex: none;
  width: 124px;
  padding: 6px 4px;
  background: var(--yellow);
  border: 2px outset #e0e0e0;
  color: var(--blue);
  font-size: 12px;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
}

.ad b { font-size: 14px; }
.ad:visited { color: var(--blue); }
.ad:hover { color: var(--active); }

/* ---------- navigation bar ---------- */

.navbar {
  background: var(--yellow);
  border-top: 2px solid var(--blue);
  border-bottom: 2px solid var(--blue);
  padding: 6px 10px;
}

.navbar ul {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
  font-weight: bold;
}

.navbar li { display: inline; }
.navbar li + li::before { content: " - "; font-weight: normal; }

.navbar a[aria-current="page"] {
  color: #000000;
  text-decoration: none;
}

/* ---------- page title bar ---------- */

.titlebar {
  background: var(--gray);
  margin: 16px 0 8px;
  padding: 4px 8px;
  font-size: 15px;
}

.titlebar h1 {
  display: inline;
  margin: 0;
  font-size: 15px;
}

/* ---------- section headings: big plain first letter, bold rest ---------- */

h2 {
  margin: 28px 0 10px;
  padding-bottom: 1px;
  border-bottom: 3px solid var(--yellow);
  font-size: 15px;
  font-weight: bold;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

h2::first-letter {
  font-size: 1.45em;
  font-weight: normal;
}

h3 {
  margin: 18px 0 6px;
  font-size: 16px;
}

p { margin: 0 0 12px; }

ul { margin: 0 0 12px; padding-left: 1.4em; list-style: square; }
li { margin: 4px 0; }
li::marker { color: var(--blue); }

.small, small { font-size: 13px; }
.muted { color: var(--muted); }
.me { font-weight: bold; }

.new {
  color: var(--active);
  font-size: 12px;
  font-style: italic;
  font-weight: bold;
}

/* ---------- home: photo + intro ---------- */

.intro {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 20px;
  align-items: start;
}

.intro img {
  display: block;
  width: 170px;
  height: auto;
  border: 1px solid #000000;
}

.profile-links {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
}

.profile-links li { margin: 2px 0; }

/* Old-school bevelled table, like HTML 3.2 border=1. */
table.db {
  border: 1px outset #999999;
  border-spacing: 2px;
  margin: 4px 0 14px;
  font-size: 15px;
}

table.db caption {
  padding-bottom: 2px;
  color: var(--muted);
  font: 13px "Courier New", Courier, monospace;
  text-align: left;
}

table.db th,
table.db td {
  border: 1px inset #999999;
  padding: 2px 8px;
  text-align: left;
  vertical-align: top;
}

table.db thead th { background: var(--gray); }

.directory {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 24px;
}

.directory > div { line-height: 1.4; }
.directory .small { display: block; margin-top: 2px; }

/* ---------- dated rows (education, projects, teaching) ---------- */

.cv {
  display: grid;
  grid-template-columns: 9.5rem 1fr;
  gap: 8px 16px;
  margin: 0 0 12px;
}

.cv dt {
  color: var(--muted);
  font-size: 14px;
  padding-top: 1px;
}

.cv dd { margin: 0; }
.cv dd ul { margin: 4px 0 0; }

/* ---------- publications: search-result style ---------- */

.pubs {
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

.pubs > li {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 2px 14px;
  margin: 0;
  padding: 10px 0;
  border-bottom: 1px dotted #999999;
}

.pubs > li:last-child { border-bottom: 0; }

.venue {
  align-self: start;
  justify-self: start;
  padding: 0 5px;
  background: var(--yellow);
  border: 1px solid var(--blue);
  color: var(--blue);
  font-size: 13px;
  font-weight: bold;
  white-space: nowrap;
}

.pub-title { font-weight: bold; }
.pub-meta { color: var(--muted); font-size: 13px; }

/* ---------- footer ---------- */

.footer {
  margin-top: 36px;
  padding-top: 12px;
  border-top: 2px solid var(--blue);
  text-align: center;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-bottom: 10px;
}

.badge {
  display: inline-block;
  width: 88px;
  height: 31px;
  padding-top: 2px;
  border: 2px outset #d0d0d0;
  font: 9px/1.25 Verdana, Geneva, sans-serif;
  text-align: center;
  overflow: hidden;
}

.badge b { font-size: 9px; white-space: nowrap; }
.badge-1 { background: #000000; color: #33ff33; }
.badge-2 { background: var(--blue); color: var(--yellow); }
.badge-3 { background: #c0c0c0; color: #000000; }
.badge-4 { background: #ffffff; color: #990000; }

/* ---------- narrow screens ---------- */

@media (max-width: 560px) {
  .ad { display: none; }
  .logo-name { font-size: 28px; }
  .intro { grid-template-columns: 1fr; }
  .intro img { width: 140px; }
  .directory { grid-template-columns: 1fr; }
  .cv { grid-template-columns: 1fr; gap: 0; }
  .cv dd { margin-bottom: 12px; }
  .pubs > li { grid-template-columns: 1fr; }
}
