/* davidholmes.nl */

:root {
  --bg: #fbfaf7;
  --surface: #f2efe8;
  --ink: #1d1f24;
  --muted: #5d626b;
  --rule: #dcd7cc;
  --accent: #1f4e79;
  --accent-soft: #e3ebf3;
  --header-bg: #1b2a3a;
  --header-ink: #f4f1ea;
  --serif: Charter, "Bitstream Charter", "Iowan Old Style", "Sitka Text", Cambria, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15181d;
    --surface: #1e2229;
    --ink: #e6e3dc;
    --muted: #a0a4ab;
    --rule: #333841;
    --accent: #8fb8e0;
    --accent-soft: #233244;
    --header-bg: #0f1216;
    --header-ink: #e6e3dc;
  }
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.6;
}

.wrap {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 1rem;
}

a { color: var(--accent); text-underline-offset: 0.15em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

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

h1, h2, h3, h4 {
  font-family: var(--sans);
  line-height: 1.25;
  font-weight: 650;
  letter-spacing: -0.01em;
}
h1 { font-size: 2rem; margin: 2.5rem 0 0.5rem; }
h2 { font-size: 1.35rem; margin: 2.5rem 0 0.75rem; padding-bottom: 0.35rem; border-bottom: 1px solid var(--rule); }
h3 { font-size: 1.1rem; margin: 1.75rem 0 0.5rem; }

hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }

/* Header ------------------------------------------------------------------ */

.site-header {
  background: var(--header-bg);
  color: var(--header-ink);
  font-family: var(--sans);
}
.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
  max-width: 64rem;
}
.site-name {
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1.1rem;
  font-size: 0.95rem;
}
.site-nav a {
  color: inherit;
  opacity: 0.8;
  text-decoration: none;
  padding: 0.2rem 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { opacity: 1; }
.site-nav a[aria-current] { opacity: 1; border-bottom-color: currentColor; }
.site-nav .ext::after { content: " ↗"; font-size: 0.8em; opacity: 0.7; }

/* Home hero --------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: 15rem;
  display: flex;
  align-items: flex-end;
  background: #2a3440 url("/images/banner.jpg") center 40% / cover no-repeat;
  color: #fff;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 15, 22, 0.75), rgba(10, 15, 22, 0.1) 70%);
}
.hero .wrap { position: relative; width: 100%; padding-bottom: 1.5rem; }
.hero h1 { margin: 0; font-size: 2.4rem; color: #fff; }
.hero p { margin: 0.25rem 0 0; font-family: var(--sans); font-size: 1.05rem; opacity: 0.92; }

.lead { font-size: 1.2rem; margin-top: 2rem; }
.quick-links { font-family: var(--sans); font-size: 0.95rem; }

.home-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 2.5rem;
}
@media (min-width: 44rem) {
  .home-grid { grid-template-columns: 3fr 2fr; }
}
.home-grid ul { list-style: none; padding: 0; margin: 0; }
.home-grid li { margin: 0 0 0.9rem; line-height: 1.4; }
.home-grid .meta { display: block; font-family: var(--sans); font-size: 0.85rem; color: var(--muted); }
.more { font-family: var(--sans); font-size: 0.9rem; }

/* Papers ------------------------------------------------------------------ */

.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0;
  margin: 1.5rem 0 0;
  list-style: none;
  font-family: var(--sans);
  font-size: 0.85rem;
}
.toc a {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: var(--accent-soft);
  text-decoration: none;
}

h2.with-top { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.to-top {
  flex: none;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--muted);
  text-decoration: none;
}
.to-top:hover { color: var(--accent); }

.blurb { color: var(--muted); font-style: italic; }

.paper { margin: 0 0 1.4rem; }
.paper .title { font-weight: 600; }
.paper .authors, .paper .venue { color: var(--muted); }
.paper .venue { font-style: italic; }
.paper .links { font-family: var(--sans); font-size: 0.8rem; white-space: nowrap; }
.paper .links a {
  display: inline-block;
  margin-left: 0.3rem;
  padding: 0 0.45rem;
  border: 1px solid var(--rule);
  border-radius: 4px;
  text-decoration: none;
  line-height: 1.6;
}
.paper .links a:hover { background: var(--accent-soft); }
.paper .note { margin: 0.3rem 0 0; font-size: 0.98rem; color: var(--muted); }
.paper .note p { margin: 0; }

/* Posts ------------------------------------------------------------------- */

.post-list { list-style: none; padding: 0; }
.post-list li { display: flex; gap: 1rem; margin: 0 0 1.75rem; }
.post-list img { width: 7rem; height: 5.25rem; object-fit: cover; border-radius: 4px; flex: none; }
.post-list .t { font-weight: 600; }
.post-list .meta { font-family: var(--sans); font-size: 0.85rem; color: var(--muted); }
.post-list p { margin: 0.2rem 0 0; }

.post-meta { font-family: var(--sans); font-size: 0.9rem; color: var(--muted); margin-top: 0; }
.subtitle { font-family: var(--sans); font-size: 1.15rem; color: var(--muted); margin: 0 0 0.5rem; }
.post img { border-radius: 4px; display: block; margin: 1.5rem 0; }

/* Contact ----------------------------------------------------------------- */

.portrait { float: right; width: 38%; max-width: 15rem; margin: 0.4rem 0 1rem 1.5rem; border-radius: 4px; }
@media (max-width: 30rem) {
  .portrait { float: none; width: 60%; margin: 1rem 0; }
}
main h2 { clear: both; }

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

.site-footer {
  margin-top: 4rem;
  padding: 1.5rem 0 2rem;
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--muted);
}
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1rem; }

@media (max-width: 30rem) {
  body { font-size: 1.0625rem; }
  h1 { font-size: 1.7rem; }
  .hero { min-height: 11rem; }
  .hero h1 { font-size: 1.9rem; }
}
