/* Nicholas Lloyd Smith — spartan stylesheet.
   Palette and type borrowed from dandelioncoffee.co.uk: black Times on warm
   "writing paper" off-white. Links are black with a hairline underline. */

:root {
  --fg: #000;
  --bg: #f7f5ee;          /* warm off-white — dandelion's "writing paper" */
  --muted: #555;
  --rule: #d9d5c6;        /* bg, darkened — hairlines that don't shout */

  /* Bootstrap reads these on body AND on its own components (navbar, buttons,
     footer). Overriding `body { font-family }` alone leaves those in sans, so
     set the variables themselves. */
  --bs-body-font-family: "Times New Roman", Times, serif;
  --bs-headings-font-family: "Times New Roman", Times, serif;
  --bs-body-bg: #f7f5ee;
  --bs-body-color: #000;
}

/* --- Canvas -------------------------------------------------------------- */

html,
body {
  background: var(--bg);
}

body {
  font-family: "Times New Roman", Times, serif;
  font-size: 17px;
  line-height: 1.5;
  color: var(--fg);
}

main.content {
  max-width: 48rem;       /* wide enough for the two-column home layout */
  padding-top: 1.5rem;
}

/* Pages set `pagetitle:` rather than `title:`, so Quarto emits an empty title
   block. Collapse it. */
#title-block-header:empty {
  display: none;
}

/* --- Headings ------------------------------------------------------------ */

h1, h2, h3,
.navbar,
.navbar-brand,
.nav-link {
  font-family: "Times New Roman", Times, serif;
}

h1, h2, h3 {
  font-weight: 700;
  color: var(--fg);
}

h1 {
  font-size: 1.6rem;
  margin-bottom: 1rem;
}

h2 {
  font-size: 1.15rem;
  text-transform: lowercase;
  margin-top: 2rem;
  margin-bottom: 0.6rem;
}

h3 {
  font-size: 1.02rem;
  margin-top: 1.6rem;
  margin-bottom: 0.2rem;
}

/* --- Links --------------------------------------------------------------- */

a {
  color: var(--fg);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.12em;
  text-decoration-color: color-mix(in srgb, var(--fg) 40%, transparent);
}

a:hover {
  color: var(--fg);
  text-decoration-color: var(--fg);
}

/* --- Navbar -------------------------------------------------------------- */

.navbar {
  background: var(--bg) !important;
  border-bottom: 1px solid var(--fg);
  padding-top: 0.3rem;
  padding-bottom: 0.3rem;
}

.navbar .navbar-brand {
  font-weight: 700;
  color: var(--fg) !important;
  text-decoration: none;
}

.navbar .nav-link {
  color: var(--fg) !important;
  text-transform: lowercase;
  text-decoration: none;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

/* --- Home page two-column layout ----------------------------------------- */

/* Ed Rubin's proportions: 49% image / 5% gutter / 46% text. The text column
   runs longer than the image, which is intended. */
.headshot {
  width: 100%;
  border: 1px solid var(--fg);
}

/* First element in the text column shouldn't have heading margin above it. */
.column > p:first-child {
  margin-top: 0;
}

@media (max-width: 700px) {
  /* Stack on narrow screens; Quarto's inline widths need overriding. */
  .columns {
    display: block;
  }
  .columns > .column {
    width: 100% !important;
  }
  .headshot {
    width: 60%;
    margin-bottom: 1.25rem;
  }
}

/* --- Arrow lists (research projects, other items) ------------------------ */

.arrows ul {
  list-style: none;
  padding-left: 0.25rem;
  margin-bottom: 0;
}

.arrows li {
  margin-bottom: 0.3rem;
  text-indent: -1.35rem;
  padding-left: 1.35rem;
}

.arrows li::before {
  content: "↳";
  color: var(--muted);
  margin-right: 0.5rem;
}

/* Work in progress — no link yet, so mark it as text rather than a dead link. */
.wip {
  border-bottom: 1px dotted var(--muted);
}

/* --- Dawgs page ---------------------------------------------------------- */

.dawgs {
  text-align: center;
  margin-top: 2rem;
}

.dawgs-media {
  max-width: 100%;
  border: 1px solid var(--fg);
}

.score {
  display: block;
  margin-top: 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
}

/* --- Email --------------------------------------------------------------- */

/* Plain text, not a mailto: — deliberate, to keep naive scrapers off it.
   Selectable so a human can still copy it. */
.email {
  user-select: all;
  white-space: nowrap;
}

/* --- Research page entries ----------------------------------------------- */

.paper {
  margin-bottom: 1.5rem;
}

.paper p {
  margin-bottom: 0.1rem;
}

.paper p:last-child {
  margin-bottom: 0;
}

.paper .title {
  font-weight: 700;
  color: var(--fg);
}

.paper .meta {
  color: var(--muted);
  font-size: 0.95rem;
}
