/* ============================================================
   Colours and type. Change these few lines to restyle the site.
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@400;600;700&family=Source+Serif+4:opsz,wght@8..60,600;8..60,700&display=swap');

:root {
  --paper:   #FBFBFA;   /* page background */
  --ink:     #1E2430;   /* main text */
  --muted:   #5F6673;   /* secondary text */
  --line:    #E2E3E0;   /* dividers */
  --accent:  #4F4396;   /* links, buttons (jacaranda) */
  --accent-dark: #3A3072;
  --accent-wash: rgba(79, 67, 150, 0.08);

  --sans:  'Source Sans 3', 'Segoe UI', Helvetica, Arial, sans-serif;
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #16181D;
    --ink:   #E7E8EA;
    --muted: #A3A8B0;
    --line:  #2C2F36;
    --accent: #A99BEA;
    --accent-dark: #C6BCF5;
    --accent-wash: rgba(169, 155, 234, 0.12);
  }
}

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

html { scroll-padding-top: 4.5rem; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

p { margin: 0 0 1rem; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { color: var(--ink); line-height: 1.2; margin: 0; }
h2 { font-family: var(--serif); font-weight: 600; font-size: 1.5rem; margin-bottom: 1rem; }
h3 { font-family: var(--sans); font-weight: 600; font-size: 1.0625rem; color: var(--muted); margin: 1.75rem 0 0.5rem; }

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

/* ============================================================
   Two-column shell: sidebar | rule | main.  Stacks on phones.
   ============================================================ */
.shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 0.75rem 0 0;
}
.sidebar p { margin: 0; }
.sidebar .meta, .sidebar .tagline { display: none; }
.rule { display: none; }

.wordmark {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--ink);
}
.tagline { color: var(--muted); font-size: 0.95rem; }

.site-nav p { display: flex; flex-wrap: wrap; gap: 0 1.25rem; }
.site-nav a {
  color: var(--ink);
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  min-height: 44px;   /* comfortable tap target on phones */
}
.site-nav a:hover { color: var(--accent); text-decoration: none; }

@media (min-width: 860px) {
  .shell {
    display: grid;
    grid-template-columns: 240px 1px minmax(0, 1fr);
    column-gap: 3rem;
    padding: 0 2rem;
  }
  .sidebar {
    align-self: start;
    top: 0;
    padding: 3rem 0;
    border-bottom: none;
    background: transparent;
  }
  .sidebar .meta, .sidebar .tagline { display: block; }
  .tagline { margin: 0.25rem 0 2rem !important; }
  .site-nav p { flex-direction: column; gap: 0; }
  .site-nav a {
    min-height: 0;
    padding: 0.3rem 0 0.3rem 0.75rem;
    margin-left: -0.75rem;
    border-left: 2px solid transparent;
  }
  .site-nav a:hover { border-left-color: var(--accent); }
  .rule { display: block; background: var(--line); }
}

/* Sidebar details */
.meta { margin-top: 2.25rem; font-size: 0.925rem; }
.meta p { margin-bottom: 1.25rem; }
.meta p:has(.meta-label) { margin-bottom: 0.15rem; }
.meta-label { display: block; font-weight: 600; color: var(--muted); }
.meta ul { list-style: none; padding: 0; margin: 0; }
.meta li { margin-bottom: 0.2rem; }

/* ============================================================
   Main column
   ============================================================ */
.main {
  padding: 2rem 0 3rem;
  max-width: 44rem;            /* keeps lines a comfortable reading length */
}
@media (min-width: 860px) { .main { padding: 3rem 0 4rem; } }

.lead {
  padding-bottom: 2rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--line);
}
.lead h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.9rem, 1.3rem + 2.2vw, 2.6rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  max-width: 20ch;
  margin-bottom: 1.25rem;
}
.lead p { font-size: 1.15rem; }

.banner {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 6px;
  margin: 0 0 2.5rem;
}

.block { margin-bottom: 3rem; }

/* Research themes: a thin accent line down the left of each item */
.themes ul { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.themes li {
  border-left: 2px solid var(--accent);
  padding: 0 0 0 1.1rem;
  margin-bottom: 1.5rem;
}
.themes li p { margin: 0; }
.theme-name { font-weight: 600; font-size: 1.1rem; }
.theme-q { color: var(--muted); font-size: 0.975rem; }

/* Publications: one per row, divided by hairlines */
.pubs ul { list-style: none; padding: 0; margin: 0; }
.pubs li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
  line-height: 1.5;
}
.pubs li:last-child { border-bottom: none; }
.pubs li p { margin: 0; }

/* Buttons */
.cta-row p { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.5rem; }
a.btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.6rem 1.25rem;
  border: 1.5px solid var(--accent);
  border-radius: 6px;
  background: var(--accent);
  color: var(--paper);
  font-weight: 600;
  font-size: 0.975rem;
}
a.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: var(--paper); text-decoration: none; }
a.btn-outline { background: transparent; color: var(--accent); }
a.btn-outline:hover { background: var(--accent-wash); color: var(--accent-dark); }

.footer {
  border-top: 1px solid var(--line);
  padding-top: 1.25rem;
  color: var(--muted);
  font-size: 0.9rem;
}
