/* Raf Ramakers — site styles.
   Colour theme carried over from the original site: white page, black text,
   #555 site title, #444 menu bar with light uppercase links, #838f96 hover,
   pale yellow announcement banner. */

:root {
  --ink: #1a1a1a;
  --text: #2b2b2b;
  --muted: #666;
  --soft: #838f96;      /* original hover colour */
  --title: #555;        /* original site-title colour */
  --bar: #444;          /* original menu bar */
  --bar-text: #eee;
  --line: #ddd;
  --rule: #1a1a1a;
  --banner: #ffffcc;    /* original banner */
  --bg: #fff;
  --wrap: 1000px;
  --font: "Helvetica Neue", Helvetica, Arial, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
/* Always reserve room for the scrollbar, so short and long pages have the
   same width and the header doesn't jump sideways when switching pages. */
html { scroll-padding-top: 16px; overflow-y: scroll; scrollbar-gutter: stable; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }

a { color: var(--ink); text-decoration: none; border-bottom: 1px dotted #888; transition: color .15s, border-color .15s; }
a:hover { color: var(--soft); border-bottom-color: var(--soft); }

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

/* Header -------------------------------------------------------------- */
.head { padding-top: 34px; padding-bottom: 22px; display: flex; align-items: baseline; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.site-name { font-size: 2.4rem; font-weight: 300; letter-spacing: -.01em; color: var(--title); border: 0; line-height: 1.1; }
.site-name:hover { color: var(--ink); }

.menu { background: var(--bar); }
.menu .wrap { display: flex; flex-wrap: wrap; }
.menu a {
  color: var(--bar-text); border: 0; border-bottom: 3px solid transparent;
  font-size: .78rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  padding: 13px 14px 10px; margin-right: 2px;
}
.menu .wrap a:first-child { margin-left: -14px; }
.menu a:hover { color: #fff; background: #505050; border-bottom-color: var(--soft); }
.menu a.active { color: #fff; border-bottom-color: #fff; }

main.wrap { padding-top: 40px; padding-bottom: 72px; min-height: 60vh; }

/* Type ---------------------------------------------------------------- */
h1, h2, h3 { color: var(--ink); line-height: 1.3; }
.page-title { font-size: 2rem; font-weight: 300; color: var(--title); margin: 0 0 8px; }
.section-title {
  font-size: 1.15rem; font-weight: 700; margin: 52px 0 20px; padding-bottom: 7px;
  border-bottom: 1px solid var(--rule);
}
.section-title small { font-weight: 400; color: var(--muted); font-size: .85rem; }
.block:first-of-type > .section-title, .page-title + .lead + .block > .section-title { margin-top: 36px; }
.lead { font-size: 1.05rem; color: var(--muted); max-width: 760px; margin: 0 0 8px; }
.prose, .bio { max-width: 800px; }
.muted { color: var(--muted); }

/* Banner + profile ---------------------------------------------------- */
.banner {
  background: var(--banner); border: 1px solid #ecec9c; text-align: center; font-weight: 700;
  padding: 11px 18px; margin: 0 0 40px; color: var(--ink);
}
.profile { display: grid; grid-template-columns: 180px 1fr auto; gap: 34px; align-items: center; margin-bottom: 34px; }
.portrait { width: 180px; height: 225px; object-fit: cover; display: block; }
.profile h1 { margin: 0 0 4px; font-size: 1.6rem; }
.role { margin: 0 0 10px; font-weight: 600; color: var(--title); }
.affil { margin: 0 0 12px; font-style: italic; }
.contact { margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.7; }
.logo { width: 210px; height: auto; align-self: center; }
.more { margin-top: 24px; font-weight: 600; }
.more a::after { content: " →"; }

/* Publications -------------------------------------------------------- */
.pub { display: grid; grid-template-columns: 190px 1fr; gap: 26px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.pub:last-child { border-bottom: 0; }
.pub-thumb { border: 0; display: block; align-self: start; }
.pub-thumb img { width: 190px; height: 125px; object-fit: cover; display: block; border: 1px solid var(--line); background: #f4f4f4; }
.pub-thumb:hover img { border-color: var(--soft); }
.pub-title { font-size: 1.05rem; font-weight: 700; margin: 0 0 6px; }
.pub-authors { margin: 0; color: #444; font-size: .93rem; }
.pub-authors .me { color: var(--ink); }
.pub-venue { margin: 4px 0 0; font-size: .85rem; font-weight: 600; color: var(--soft); letter-spacing: .02em; }
.award { display: inline-block; margin-left: 6px; padding: 0 7px; font-size: .74rem; color: var(--ink); background: var(--banner); border: 1px solid #ecec9c; }
.award-best { color: #fff; background: #c8102e; border-color: #c8102e; font-weight: 600; }
.pub-links { margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.btn {
  display: inline-block; border: 1px solid #bbb; padding: 3px 11px 2px; font-size: .72rem; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase; color: #333; line-height: 1.6;
}
.btn:hover { background: var(--bar); border-color: var(--bar); color: #fff; }
.pub-note { margin: 8px 0 0; font-size: .8rem; color: var(--muted); }
.pub-press { margin-top: 10px; font-size: .88rem; }
.pub-press summary { cursor: pointer; color: var(--muted); }
.pub-press summary:hover { color: var(--ink); }
.pub-press p { margin: 6px 0 0; }
.pub:target { animation: flash 2.2s ease-out; }
@keyframes flash { from { background: var(--banner); } to { background: transparent; } }


/* CV lists ------------------------------------------------------------ */
dl.cv { display: grid; grid-template-columns: 150px 1fr; gap: 9px 26px; margin: 0; }
dl.cv dt { color: var(--muted); font-size: .88rem; font-variant-numeric: tabular-nums; padding-top: 2px; }
dl.cv dd { margin: 0; }
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li { margin: 0 0 9px; }
.plain-list .role { color: var(--muted); font-size: .88rem; }
.inline-list { display: flex; flex-wrap: wrap; gap: 6px 22px; color: #444; }

/* Teaching + positions ------------------------------------------------ */
.course { max-width: 860px; }
.course .section-title { margin-top: 44px; }
.period { font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--soft); margin-left: 8px; white-space: nowrap; }
.gallery { display: grid; grid-template-columns: repeat(var(--cols, 4), 1fr); gap: 10px; margin: 22px 0; }
.gallery a { border: 0; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.gallery a:hover img { opacity: .85; }
.topics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px 30px; }
.topic { border-left: 3px solid var(--bar); padding-left: 16px; }
.topic h3 { margin: 0 0 4px; font-size: .98rem; }
.topic p { margin: 0; color: #444; }

/* Footer -------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--rule); color: var(--muted); font-size: .82rem; }
.foot { padding-top: 18px; padding-bottom: 28px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot-links { display: flex; gap: 18px; flex-wrap: wrap; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--ink); }

/* Small screens ------------------------------------------------------- */
@media (max-width: 760px) {
  body { font-size: 15px; }
  .wrap { padding: 0 18px; }
  .head { padding-top: 22px; padding-bottom: 14px; }
  .site-name { font-size: 1.9rem; }
  .menu .wrap { flex-wrap: nowrap; overflow-x: auto; padding: 0 4px; }
  .menu .wrap a:first-child { margin-left: 0; }
  .menu a { white-space: nowrap; padding: 12px 10px 9px; }
  main.wrap { padding-top: 26px; }
  .profile { grid-template-columns: 110px 1fr; gap: 18px; }
  .portrait { width: 110px; height: 140px; }
  .logo { display: none; }
  .profile { align-items: start; }
  .pub { grid-template-columns: 1fr; gap: 12px; }
  .pub-thumb img { width: 100%; height: 190px; }
  dl.cv { grid-template-columns: 1fr; gap: 0; }
  dl.cv dd { margin-bottom: 12px; }
  .gallery { grid-template-columns: repeat(min(var(--cols, 4), 2), 1fr); }
  .topics { grid-template-columns: 1fr; }
}
