/* Luke A. Parsons research website — shared styles
   Colors are variables so light and dark modes stay in sync. */

:root {
  --paper: #f6f7f5;
  --ink: #1e2a32;
  --muted: #56656e;
  --rule: #d3dad7;
  --forest: #2e5e4e;   /* links and theme markers */
  --sun: #a8661a;      /* used once: the line under the name */
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", "Helvetica Neue", Arial, sans-serif;
  --measure: 68ch;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #141a1e;
    --ink: #e6ebe8;
    --muted: #9aa8a4;
    --rule: #2c3a3f;
    --forest: #82bba6;
    --sun: #e0a94a;
    color-scheme: dark;
  }
}

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

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

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

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

a { color: var(--forest); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--forest); outline-offset: 3px; border-radius: 2px; }

.wrap { max-width: 64rem; margin: 0 auto; padding: 0 1.5rem; }

/* Site header and navigation */
.site-header { border-bottom: 1px solid var(--rule); }
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: space-between; gap: 0.5rem 2rem;
  padding-top: 1.1rem; padding-bottom: 1.1rem;
}
.site-name {
  font-family: var(--sans); font-weight: 600; font-size: 1rem;
  color: var(--ink); text-decoration: none;
}
.site-nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem;
  font-family: var(--sans); font-size: 0.95rem;
}
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; }

/* Home: introduction */
.intro {
  display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  gap: 2.5rem; align-items: start;
  padding-top: 3.5rem; padding-bottom: 3rem;
}
.intro img { border-radius: 4px; }
.intro h1 {
  font-size: clamp(2.4rem, 5.5vw, 3.6rem);
  font-weight: 600; line-height: 1.05; letter-spacing: -0.015em;
  margin: 0 0 0.9rem;
  padding-bottom: 0.6rem;
  border-bottom: 3px solid var(--sun);
  display: inline-block;
}
.affiliations {
  font-family: var(--sans); font-size: 0.98rem; color: var(--muted);
  margin: 0 0 1.4rem; line-height: 1.5;
}
.intro p { max-width: var(--measure); }
.links {
  list-style: none; margin: 1.4rem 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem;
  font-family: var(--sans); font-size: 0.95rem;
}

/* Section headings */
section h2 {
  font-size: 1.6rem; font-weight: 600; line-height: 1.2;
  margin: 0 0 1.25rem;
}
.home-section { position: relative; padding-top: 2.5rem; padding-bottom: 2.5rem; }
/* Divider aligned with the text column rather than the page edge */
.home-section::before {
  content: ""; position: absolute; top: 0; left: 1.5rem; right: 1.5rem;
  border-top: 1px solid var(--rule);
}

/* Research themes: three columns divided by rules, one line per theme on small screens */
.themes {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0; margin: 0; padding: 0; list-style: none;
}
.themes li { padding: 0 1.5rem; border-left: 1px solid var(--rule); }
.themes li:first-child { padding-left: 0; border-left: 0; }
.themes h3 { font-size: 1.2rem; line-height: 1.3; margin: 0 0 0.5rem; }
.themes h3 a { color: var(--ink); text-decoration: none; }
.themes h3 a:hover { color: var(--forest); text-decoration: underline; }
.themes p { margin: 0; font-size: 1.02rem; }
.foundations { max-width: var(--measure); color: var(--muted); margin: 2rem 0 0; font-size: 1.02rem; }

/* Publication lists */
.pubs { list-style: none; margin: 0; padding: 0; max-width: 52rem; }
.pubs li { padding: 0.9rem 0; border-bottom: 1px solid var(--rule); }
.pubs li:first-child { padding-top: 0; }
.pub-title { display: block; font-weight: 600; line-height: 1.4; text-decoration: none; }
.pub-title:hover { text-decoration: underline; }
.pub-meta { display: block; font-size: 0.98rem; color: var(--muted); }
.pub-meta strong { color: var(--ink); font-weight: 600; }
.more { font-family: var(--sans); font-size: 0.95rem; margin: 1.25rem 0 0; }

.recognition { max-width: var(--measure); margin: 0; }

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

/* Small screens */
@media (max-width: 44rem) {
  .intro { grid-template-columns: 1fr; gap: 1.5rem; padding-top: 2rem; }
  .intro img { max-width: 11rem; }
  .themes { grid-template-columns: 1fr; }
  .themes li { padding: 1rem 0; border-left: 0; border-top: 1px solid var(--rule); }
  .themes li:first-child { padding-top: 0; border-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}

/* ---------- Inner pages (Research, Publications, About) ---------- */
.page { padding-top: 3rem; padding-bottom: 2rem; }
.page > h1 {
  font-size: clamp(2rem, 4.5vw, 2.8rem); font-weight: 600;
  line-height: 1.1; letter-spacing: -0.01em; margin: 0 0 1rem;
}
.lede { max-width: var(--measure); font-size: 1.2rem; margin: 0 0 1.5rem; }
.page-nav {
  list-style: none; margin: 0 0 1rem; padding: 0;
  display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem;
  font-family: var(--sans); font-size: 0.95rem;
}
.block { position: relative; padding-top: 2.5rem; padding-bottom: 1rem; scroll-margin-top: 1rem; }
.block::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0;
  border-top: 1px solid var(--rule);
}
.block > p, .block > ul { max-width: var(--measure); }

/* A research highlight: finding first, paper link underneath */
.highlight { max-width: var(--measure); margin: 0 0 2rem; padding-left: 1.1rem; border-left: 3px solid var(--forest); }
.highlight h3 { font-size: 1.15rem; line-height: 1.3; margin: 0 0 0.4rem; }
.highlight p { margin: 0 0 0.5rem; }
.source { font-family: var(--sans); font-size: 0.9rem; color: var(--muted); }
.related { font-size: 1rem; }
.related li { margin-bottom: 0.4rem; }

/* Publications page */
.year { font-family: var(--sans); font-size: 1rem; font-weight: 600; color: var(--muted); margin: 2rem 0 0.5rem; }
.pubs.full li { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); gap: 0 0.5rem; }
.pub-num { font-family: var(--sans); font-size: 0.9rem; color: var(--muted); padding-top: 0.2rem; }
.plain-list { list-style: none; padding: 0; margin: 0; max-width: 52rem; }
.plain-list li { padding: 0.5rem 0; border-bottom: 1px solid var(--rule); }

/* About page */
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }

/* Photographs: full-width panoramas and photos set beside text */
.photo { margin: 0 0 2rem; }
.photo img { width: 100%; border-radius: 3px; }
.photo figcaption {
  font-family: var(--sans); font-size: 0.85rem; color: var(--muted);
  margin-top: 0.5rem; line-height: 1.4;
}
.text-figure {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 24rem);
  gap: 2rem; align-items: start; margin-bottom: 1rem;
}
.text-figure p { margin-top: 0; }
.text-figure .photo { margin: 0.35rem 0 0; }
@media (max-width: 44rem) {
  .text-figure { grid-template-columns: 1fr; gap: 1rem; }
}

/* Research figures inside highlights */
.highlight .photo { margin: 0.9rem 0 0.75rem; }
.highlight .photo img { border-radius: 2px; background: #fff; }

/* Home: current project feature */
.feature { max-width: var(--measure); }
.feature h3 { font-size: 1.2rem; margin: 0 0 0.5rem; }
.feature p { margin: 0 0 0.5rem; }

/* Figures placed directly in a section match the text column width */
.block > .photo { max-width: var(--measure); }
.block > .photo img { background: #fff; border-radius: 2px; }
