/* ═══════════════════════════════════════════════════════════════
   SHARED STYLES — eliza haughton-shaw website
   ───────────────────────────────────────────────────────────────
   HOW TO CUSTOMISE:
   • Colours  → edit the variables in :root below
   • Fonts    → replace the Google Fonts link in each HTML file
                and update --sans here
   • Width    → adjust --max (page width)
   ═══════════════════════════════════════════════════════════════ */

/* ── COLOUR & FONT VARIABLES ──────────────────────────────────
   Suggested accent swaps:
     Slate blue  →  #4a6080
     Forest      →  #3d5a3e
     Burgundy    →  #6d2b3d
     Warm ochre  →  #b07d3a  (current)
   ─────────────────────────────────────────────────────────── */
:root {
  --ink:     #1c1b18;
  --mid:     #6b6860;
  --light:   #d8d2c6;
  --paper:   #ffffff;
  --accent:  #4a6080;
  --max:     860px;
  --sans:    'Jost', system-ui, sans-serif;
}

/* ── RESET ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 300;
  line-height: 1.7;
  padding: 0 2rem;
}

/* ── PAGE WRAPPER ─────────────────────────────────────────── */
.page {
  max-width: var(--max);
  margin: 0 auto;
}

/* ── SITE HEADER — name and nav on same line ──────────────── */
.site-header {
  padding: 1.25rem 0 0.75rem;
  display: flex;
  flex-direction: row;
  align-items: baseline;
  justify-content: space-between;
  gap: 2.5rem;
  margin-bottom: 1rem;
}

.site-name {
  font-family: var(--sans);
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.1;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}

.site-name:hover { color: var(--accent); }

/* ── NAVIGATION ───────────────────────────────────────────── */
nav {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  align-items: baseline;
}

nav a {
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid);
  text-decoration: none;
  transition: color 0.2s;
}

nav a:hover { color: var(--accent); }

/* Active page: accent colour, no underline */
nav a.active { color: var(--accent); }

/* ── PAGE TITLE ───────────────────────────────────────────── */
.page-title {
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--mid);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

/* ── BODY TEXT ────────────────────────────────────────────── */
p {
  font-size: 0.92rem;
  margin-bottom: 1em;
  max-width: 72ch;
}

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

em {
  font-style: italic;
  font-family: var(--sans);  /* prevents browser falling back to a serif italic */
}

a {
  color: var(--ink);
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
}

a:hover { color: var(--accent); }

/* ── SECTION LABEL ────────────────────────────────────────── */
.label {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
  display: block;
}

/* ── DIVIDERS HIDDEN ─────────────────────────────────────── */
hr.divider { display: none; }

/* ── TAGS (research interests) ────────────────────────────── */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
}

.tag {
  font-size: 0.75rem;
  padding: 0.2rem 0.65rem;
  border: 1px solid var(--light);
  border-radius: 2rem;
  color: var(--mid);
  letter-spacing: 0.03em;
}

/* ── FOOTER ───────────────────────────────────────────────── */
.site-footer {
  padding: 2rem 0;
  margin-top: 3rem;
  font-size: 0.78rem;
  color: var(--mid);
}

/* ── PAGE FADE-IN ─────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.page { animation: fadeUp 0.45s ease both; }

/* ── MOBILE ───────────────────────────────────────────────── */
@media (max-width: 600px) {
  body { padding: 0 1.1rem; }
  .site-header {
    flex-direction: column;
    gap: 0.75rem;
    padding-top: 1.75rem;
  }
}
