/* ============================================================
   MEDICO-LEGAL PRACTICE — STYLESHEET
   Palette: Deep Navy / Warm White / Muted Gold
   Fonts:   Playfair Display (headings) + Inter (body)
   ============================================================ */

/* --- Self-hosted fonts (no third-party CDN; keeps the privacy policy accurate) ---
   Files live in /fonts. Inter + Playfair Display are licensed under the SIL Open
   Font License, which permits self-hosting and redistribution. */

/* Inter — body */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('fonts/inter-300.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/inter-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/inter-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/inter-600.woff2') format('woff2');
}

@font-face {
  /* Journal and book titles in the CV are <em> in body copy. Without this face
     they rendered as a synthesised oblique. */
  font-family: 'Inter';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/inter-400-italic.woff2') format('woff2');
}

/* Playfair Display — headings */
@font-face {
  /* Variable italic covering the whole 400-700 range in one file. The hero
     headline asks for 700 italic; with only a static 400 italic loaded the
     browser was synthesising a slant instead of using a real italic. */
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/playfair-italic-var.woff2') format('woff2');
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/playfair-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/playfair-700.woff2') format('woff2');
}


/* ============================================================
   1. CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================================ */

:root {

  /* Colours */
  --colour-navy:        #1B2A4A;   /* Primary / headings / navbar bg */
  --colour-navy-dark:   #111d33;   /* Hover states, footer bg */
  --colour-navy-light:  #2a3f6b;   /* Secondary buttons, subtle highlights */

  /* Decorative gold — rules, borders, accents, button fills (non-text) */
  --colour-gold:        #a7832f;
  --colour-gold-light:  #d4af62;

  /* Text golds — WCAG AA (>=4.5:1) verified against every background used */
  --colour-gold-text:        #836520;  /* on light bg: 5.06 page / 4.67 alt / 5.46 white */
  --colour-gold-text-hover:  #5f4816;  /* hover goes DARKER on light: 8.02 */
  --colour-gold-on-dark:     #c19a3e;  /* on navy 5.39 / navy-dark 6.38 */
  --colour-gold-on-dark-hover: #d4af62;/* hover goes LIGHTER on dark: 6.84 */

  --colour-bg:          #F8F6F2;   /* Page background — warm off-white */
  --colour-bg-alt:      #F0EDE8;   /* Alternate section background */
  --colour-white:       #FFFFFF;   /* Cards, nav dropdowns */
  --colour-text:        #2D2D2D;   /* Body text */
  --colour-text-muted:  #6B6B6B;   /* Captions, metadata, secondary text */
  --colour-border:      #E2DDD8;   /* Dividers, card borders */
  --colour-border-dark: #C8C2BA;   /* Stronger dividers */

  /* Typography */
  --font-heading:  'Playfair Display', Georgia, serif;
  --font-body:     'Inter', 'Helvetica Neue', Arial, sans-serif;

  /* Font sizes — fluid scale */
  --text-xs:    0.75rem;    /*  12px */
  --text-sm:    0.875rem;   /*  14px */
  --text-base:  1.0625rem;  /*  17px — slightly generous for legal reading */
  --text-lg:    1.125rem;   /*  18px */
  --text-xl:    1.25rem;    /*  20px */
  --text-2xl:   1.5rem;     /*  24px */
  --text-3xl:   1.875rem;   /*  30px */
  --text-4xl:   2.25rem;    /*  36px */
  --text-5xl:   3rem;       /*  48px */

  /* Font weights */
  --weight-light:   300;
  --weight-regular: 400;
  --weight-medium:  500;
  --weight-semibold: 600;
  --weight-bold:    700;

  /* Spacing */
  --space-xs:   0.25rem;
  --space-sm:   0.5rem;
  --space-md:   1rem;
  --space-lg:   1.5rem;
  --space-xl:   2rem;
  --space-2xl:  3rem;
  --space-3xl:  4rem;
  --space-4xl:  6rem;

  /* Layout */
  --max-width:        1100px;
  --max-width-narrow: 720px;   /* For CV, privacy policy — narrower for readability */
  --gutter:           2rem;

  /* Borders */
  --radius-sm:  3px;
  --radius-md:  6px;
  --radius-lg:  10px;
  --border-width: 1px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(27, 42, 74, 0.08);
  --shadow-md:  0 4px 12px rgba(27, 42, 74, 0.10);
  --shadow-lg:  0 8px 24px rgba(27, 42, 74, 0.12);

  /* Transitions */
  --transition-fast:   150ms ease;
  --transition-base:   250ms ease;
  --transition-slow:   400ms ease;

  /* Line heights */
  --leading-tight:  1.25;
  --leading-snug:   1.4;
  --leading-base:   1.65;
  --leading-relaxed: 1.75;
}


/* ============================================================
   2. CSS RESET & BASE
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-size: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  color: var(--colour-text);
  background-color: var(--colour-bg);
  line-height: var(--leading-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;   /* without this, an HTML height attribute overrides a CSS
                     width and the image renders stretched */
}

ul, ol {
  list-style: none;
}

a {
  color: var(--colour-gold-text);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--colour-gold-text-hover);
}

a:focus-visible {
  outline: 3px solid var(--colour-gold);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* Ensure content lists render properly (important for solicitor readability) */
main ul, main ol {
  list-style: disc;
  padding-left: var(--space-xl);
  margin-bottom: var(--space-md);
}

main ol {
  list-style: decimal;
}

main li {
  margin-bottom: var(--space-sm);
}


/* ============================================================
   3. TYPOGRAPHY
   ============================================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--weight-semibold);
  color: var(--colour-navy);
  line-height: var(--leading-tight);
  letter-spacing: -0.01em;
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p {
  margin-bottom: var(--space-md);
  max-width: 68ch; /* Optimal line length for reading */
}

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

strong {
  font-weight: var(--weight-semibold);
  color: var(--colour-navy);
}

em {
  font-style: italic;
}

small {
  font-size: var(--text-sm);
  color: var(--colour-text-muted);
}

/* Gold decorative rule — use under section headings */
.rule-gold {
  display: block;
  width: 48px;
  height: 2px;
  background-color: var(--colour-gold);
  margin: var(--space-lg) 0;
}

/* Centred variant */
.rule-gold--centre {
  margin-left: auto;
  margin-right: auto;
}

/* Eyebrow label above headings */
.eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--colour-gold-text);
  margin-bottom: var(--space-sm);
}

/* Eyebrows sitting on navy need the lighter gold to clear 4.5:1 */
.section--navy .eyebrow,
.page-header .eyebrow {
  color: var(--colour-gold-on-dark);
}

/* Pull quote / highlight */
blockquote {
  border-left: 3px solid var(--colour-gold);
  padding: var(--space-md) var(--space-xl);
  margin: var(--space-2xl) 0;
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-style: italic;
  color: var(--colour-navy);
  line-height: var(--leading-snug);
  background-color: var(--colour-bg-alt);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

blockquote cite {
  display: block;
  margin-top: var(--space-sm);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-style: normal;
  font-weight: var(--weight-medium);
  color: var(--colour-text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}


/* ============================================================
   4. LAYOUT UTILITIES
   ============================================================ */

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* Narrow container — CV, privacy policy, long-form text */
.container--narrow {
  max-width: var(--max-width-narrow);
}

.section {
  padding-top: var(--space-4xl);
  padding-bottom: var(--space-4xl);
}

.section--alt {
  background-color: var(--colour-bg-alt);
}

.section--navy {
  background-color: var(--colour-navy);
  color: var(--colour-bg);
}

.section--navy h1,
.section--navy h2,
.section--navy h3,
.section--navy h4 {
  color: var(--colour-white);
}

.section--navy p {
  color: rgba(248, 246, 242, 0.85);
}

/* Two-column layout (overview / about) */
.grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: start;
}

/* Sidebar layout (CV / content + aside) */
.grid-sidebar {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: var(--space-3xl);
  align-items: start;
}

/* Four-column layout (e.g. process steps) — collapses responsively below */
.grid-4col {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-xl);
  align-items: start;
}

/* Utility: vertical rhythm helper */
.stack > * + * {
  margin-top: var(--space-lg);
}

.stack--sm > * + * {
  margin-top: var(--space-sm);
}

.stack--xl > * + * {
  margin-top: var(--space-2xl);
}


/* ============================================================
   5. NAVIGATION
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--colour-navy);
  border-bottom: 1px solid rgba(184, 150, 62, 0.25);
  box-shadow: var(--shadow-md);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

/* Logo / name */
.site-logo {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: var(--colour-white);
  letter-spacing: 0.01em;
  line-height: var(--leading-tight);
  text-decoration: none;
}

.site-logo span {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-light);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--colour-gold-on-dark);
  margin-top: 2px;
}

/* Nav links */
.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.site-nav a {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(248, 246, 242, 0.8);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--colour-gold-on-dark);
  border-bottom-color: var(--colour-gold-on-dark);
}

/* Mobile hamburger (toggle via JS — style only) */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--colour-white);
  transition: transform var(--transition-base);
}

/* Accessibility: visible focus on hamburger */
.nav-toggle:focus-visible {
  outline: 3px solid var(--colour-gold);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}


/* ============================================================
   6. HERO / PAGE HEADER
   ============================================================ */

.hero {
  background-color: var(--colour-navy);
  padding: var(--space-4xl) 0;
  border-bottom: 3px solid var(--colour-gold);
}

.hero__kicker {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--colour-gold-on-dark);
  margin-bottom: var(--space-md);
}

.hero__title {
  font-family: var(--font-heading);
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: var(--weight-bold);
  color: var(--colour-white);
  line-height: var(--leading-tight);
  margin-bottom: var(--space-lg);
  max-width: 18ch;
}

.hero__title em {
  font-style: italic;
  color: var(--colour-gold);
}

.hero__subtitle {
  font-family: var(--font-body);
  font-size: var(--text-xl);
  font-weight: var(--weight-light);
  color: rgba(248, 246, 242, 0.75);
  max-width: 52ch;
  line-height: var(--leading-relaxed);
  margin-bottom: 0;
}

/* Shorter hero for interior pages */
.page-header {
  background-color: var(--colour-navy);
  padding: var(--space-3xl) 0 var(--space-2xl);
  border-bottom: 2px solid var(--colour-gold);
}

.page-header__title {
  font-family: var(--font-heading);
  font-size: var(--text-4xl);
  color: var(--colour-white);
  margin-bottom: var(--space-sm);
}

.page-header__subtitle {
  font-size: var(--text-lg);
  color: rgba(248, 246, 242, 0.7);
  font-weight: var(--weight-light);
  margin-bottom: 0;
}


/* ============================================================
   7. BUTTONS & CALLS TO ACTION
   ============================================================ */

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color var(--transition-fast),
              color var(--transition-fast),
              border-color var(--transition-fast);
  white-space: nowrap;
}

.btn:focus-visible {
  outline: 3px solid var(--colour-gold);
  outline-offset: 3px;
}

/* Primary — solid gold (stronger CTA conversion) */
.btn--primary {
  background-color: var(--colour-gold);
  color: var(--colour-navy-dark);
  border-color: var(--colour-gold);
}

.btn--primary:hover {
  background-color: var(--colour-gold-light);
  border-color: var(--colour-gold-light);
  color: var(--colour-navy-dark);
}

/* Secondary — navy solid */
.btn--secondary {
  background-color: var(--colour-navy);
  color: var(--colour-white);
  border-color: var(--colour-navy);
}

.btn--secondary:hover {
  background-color: var(--colour-navy-dark);
  border-color: var(--colour-navy-dark);
  color: var(--colour-white);
}

/* Ghost — for use on dark backgrounds */
.btn--ghost {
  background-color: transparent;
  color: var(--colour-white);
  border-color: rgba(255, 255, 255, 0.5);
}

.btn--ghost:hover {
  border-color: var(--colour-white);
  color: var(--colour-white);
}


/* ============================================================
   8. CARDS
   ============================================================ */

.card {
  background-color: var(--colour-white);
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-md);
  padding: var(--space-2xl);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-base);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

/* Card with gold top accent */
.card--accented {
  border-top: 3px solid var(--colour-gold);
}

.card__label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--colour-gold-text);
  margin-bottom: var(--space-sm);
}

.card__title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  color: var(--colour-navy);
  margin-bottom: var(--space-md);
}

.card__body {
  font-size: var(--text-base);
  color: var(--colour-text-muted);
  line-height: var(--leading-relaxed);
}


/* ============================================================
   9. CV / EXPERIENCE LIST
   ============================================================ */

.cv-section {
  margin-bottom: var(--space-3xl);
}

.cv-section__title {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  color: var(--colour-navy);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--colour-border);
  margin-bottom: var(--space-xl);
}

.cv-entry {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: var(--space-xl);
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--colour-border);
}

.cv-entry:last-child {
  border-bottom: none;
}

.cv-entry__date {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--colour-gold-text);
  padding-top: 3px; /* Optical alignment with heading */
  white-space: nowrap;
}

.cv-entry__title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: var(--colour-navy);
  margin-bottom: var(--space-xs);
}

.cv-entry__institution {
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  color: var(--colour-text);
  margin-bottom: var(--space-sm);
}

.cv-entry__body {
  font-size: var(--text-base);
  color: var(--colour-text-muted);
  line-height: var(--leading-relaxed);
  margin-bottom: 0;
}

/* Qualifications list */
.qualifications-list {
  list-style: none;
  padding: 0;
}

.qualifications-list li {
  padding: var(--space-md) 0;
  padding-left: var(--space-xl);
  position: relative;
  border-bottom: 1px solid var(--colour-border);
  font-size: var(--text-base);
  color: var(--colour-text);
}

.qualifications-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background-color: var(--colour-gold);
  border-radius: 50%;
}


/* ============================================================
   10. CONTACT SECTION
   ============================================================ */

.contact-block {
  background-color: var(--colour-white);
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-md);
  padding: var(--space-2xl);
  box-shadow: var(--shadow-sm);
}

.contact-item {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--colour-border);
}

.contact-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.contact-item__label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--colour-gold-text);
  min-width: 80px;
  padding-top: 2px;
}

.contact-item__value {
  font-size: var(--text-base);
  color: var(--colour-text);
  margin-bottom: 0;
}

.contact-item__value a {
  color: var(--colour-navy);
  font-weight: var(--weight-medium);
}

.contact-item__value a:hover {
  color: var(--colour-gold-text-hover);
}


/* ============================================================
   11. PRIVACY POLICY / LONG-FORM TEXT
   ============================================================ */

/* Apply .prose to any long-form text wrapper */
.prose h2 {
  font-size: var(--text-2xl);
  margin-top: var(--space-3xl);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--colour-border);
}

.prose h3 {
  font-size: var(--text-xl);
  margin-top: var(--space-xl);
  margin-bottom: var(--space-sm);
}

.prose p {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--colour-text);
  margin-bottom: var(--space-md);
  max-width: 68ch;
}

.prose ul, .prose ol {
  list-style: disc;
  padding-left: var(--space-xl);
  margin-bottom: var(--space-md);
}

.prose ol {
  list-style: decimal;
}

.prose li {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--colour-text);
  margin-bottom: var(--space-sm);
}

.prose a {
  color: var(--colour-gold-text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Last updated notice */
.last-updated {
  font-size: var(--text-sm);
  color: var(--colour-text-muted);
  font-style: italic;
  margin-bottom: var(--space-2xl);
}


/* ============================================================
   12. FOOTER
   ============================================================ */

.site-footer {
  background-color: var(--colour-navy-dark);
  color: rgba(248, 246, 242, 0.72);
  padding: var(--space-3xl) 0 var(--space-xl);
  border-top: 3px solid var(--colour-gold);
}

.site-footer__inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

.footer-col__heading {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--colour-gold-on-dark);
  margin-bottom: var(--space-md);
}

.footer-col p {
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: rgba(248, 246, 242, 0.72);
  margin-bottom: var(--space-sm);
}

/* Links inside footer columns sit on navy-dark, so they need the light gold.
   Higher specificity than the global `a` rule, which is tuned for light backgrounds. */
.footer-col p a {
  color: var(--colour-gold-on-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-col p a:hover {
  color: var(--colour-gold-on-dark-hover);
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-nav a {
  font-size: var(--text-sm);
  color: rgba(248, 246, 242, 0.72);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-nav a:hover {
  color: var(--colour-gold-on-dark-hover);
}

.site-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--space-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer-legal {
  font-size: var(--text-xs);
  color: rgba(248, 246, 242, 0.62);
  margin-bottom: 0;
}

.footer-legal a {
  color: rgba(248, 246, 242, 0.62);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-legal a:hover {
  color: var(--colour-gold-on-dark-hover);
}


/* ============================================================
   13. UTILITY CLASSES
   ============================================================ */

.text-centre  { text-align: center; }
.text-right   { text-align: right; }
.text-muted   { color: var(--colour-text-muted); }
.text-gold    { color: var(--colour-gold-text); }
.text-navy    { color: var(--colour-navy); }
.text-white   { color: var(--colour-white); }
.text-sm      { font-size: var(--text-sm); }
.text-lg      { font-size: var(--text-lg); }

.text-white-80 { color: rgba(248, 246, 242, 0.8); }

.mx-auto { margin-left: auto; margin-right: auto; }

.mt-sm  { margin-top: var(--space-sm); }
.mt-md  { margin-top: var(--space-md); }
.mt-lg  { margin-top: var(--space-lg); }
.mt-xl  { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }
.mt-3xl { margin-top: var(--space-3xl); }

.mb-sm  { margin-bottom: var(--space-sm); }
.mb-md  { margin-bottom: var(--space-md); }
.mb-lg  { margin-bottom: var(--space-lg); }
.mb-xl  { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }
.mb-3xl { margin-bottom: var(--space-3xl); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Skip link — visually hidden until focused via keyboard */
.skip-link {
  position: absolute;
  left: var(--space-md);
  top: -100px;
  z-index: 200;
  background-color: var(--colour-gold);
  color: var(--colour-navy-dark);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-md);
  color: var(--colour-navy-dark);
}

/* --- Classes replacing former inline style attributes (enables a strict CSP) --- */

.footer-disclaimer {
  font-size: var(--text-xs);
  color: rgba(248, 246, 242, 0.62);
}

.cta-lede {
  margin-bottom: var(--space-xl);
}

.measure-wide {
  max-width: 72ch;
}

.container--tight {
  max-width: 680px;
}

.cv-entry__meta {
  font-size: var(--text-sm);
  color: var(--colour-text-muted);
}

.gmc-link {
  color: var(--colour-gold-text);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
}

.gmc-link:hover {
  color: var(--colour-gold-text-hover);
}

.divider {
  border: none;
  border-top: 1px solid var(--colour-border);
  margin: var(--space-2xl) 0;
}


/* ============================================================
   14. RESPONSIVE — TABLET (max 900px)
   ============================================================ */

@media (max-width: 900px) {

  :root {
    --gutter: 1.5rem;
  }

  /* Hamburger from 900px, not 600px: the horizontal nav needs 555px and the
     logo collapses to 115px tall inside a 72px header below ~880px. */
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    display: none; /* Toggled with .is-open by main.js */
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    background-color: var(--colour-navy-dark);
    padding: var(--space-lg) var(--gutter);
    gap: var(--space-md);
    border-bottom: 2px solid var(--colour-gold);
    box-shadow: var(--shadow-md);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-header {
    position: relative;
  }

  /* Keep the logo on one line now that the nav is behind the toggle */
  .site-logo {
    line-height: 1.2;
  }

  h1 { font-size: var(--text-4xl); }
  h2 { font-size: var(--text-3xl); }
  h3 { font-size: var(--text-2xl); }

  .grid-2col,
  .grid-sidebar {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  .grid-4col {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
  }

  .cv-entry {
    grid-template-columns: 1fr;
    gap: var(--space-xs);
  }

  .cv-entry__date {
    padding-top: 0;
  }

  .site-footer__inner {
    grid-template-columns: 1fr 1fr;
  }
}


/* ============================================================
   15. RESPONSIVE — MOBILE (max 600px)
   ============================================================ */

@media (max-width: 600px) {

  :root {
    --gutter: 1rem;
    --space-4xl: 3.5rem;
    --space-3xl: 2.5rem;
  }

  h1 { font-size: var(--text-3xl); }
  h2 { font-size: var(--text-2xl); }

  .hero__subtitle {
    font-size: var(--text-base);
  }

  .site-footer__inner {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .grid-4col {
    grid-template-columns: 1fr;
  }

  .site-footer__bottom {
    flex-direction: column;
    text-align: center;
  }

  blockquote {
    padding: var(--space-md);
    font-size: var(--text-lg);
  }
}


/* ============================================================
   16. PROFILE PHOTO
   ============================================================ */

.profile-photo {
  width: 100%;
  max-width: 340px;
  border-radius: var(--radius-md);
  border: 3px solid var(--colour-border);
  box-shadow: var(--shadow-md);
  display: block;
  height: auto;
  /* No aspect-ratio and no object-fit: the file is 2:3 as the photographer
     framed it, and it is shown at that ratio. The previous 3/4 + cover
     silently cropped the top and bottom off a professional portrait.
     height:auto is essential here - the img carries height="960". */
}


/* ============================================================
   17. ACCESSIBILITY & PERFORMANCE IMPROVEMENTS
   ============================================================ */

/* Stronger keyboard visibility for all interactive elements */
.btn:focus-visible,
.site-nav a:focus-visible,
.footer-nav a:focus-visible,
.nav-toggle:focus-visible,
a:focus-visible {
  outline: 3px solid var(--colour-gold);
  outline-offset: 3px;
}

/* Reduce animation for accessibility */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Prevent oversized paragraphs inside centred sections */
.text-centre p {
  margin-left: auto;
  margin-right: auto;
}


/* ============================================================
   18. PRINT STYLES (IMPORTANT FOR SOLICITORS/INSURERS)
   ============================================================ */

@media print {

  .site-header,
  .site-footer,
  .nav-toggle {
    display: none !important;
  }

  body {
    background: #fff !important;
    color: #000 !important;
    font-size: 12pt;
    line-height: 1.4;
  }

  a {
    color: #000 !important;
    text-decoration: underline;
  }

  .section {
    padding: 1.5rem 0 !important;
  }

  .card,
  .contact-block {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
  }

  /* Browsers do not print background colours by default, so any white text
     that relied on a dark panel would print white-on-white and vanish.
     Force every reversed-out block back to black ink. */
  .page-header,
  .hero,
  .section--navy {
    background: #fff !important;
    border-bottom: 1px solid #000 !important;
    padding: 0 0 1rem !important;
  }

  .page-header__title,
  .page-header__subtitle,
  .hero__title,
  .hero__subtitle,
  .hero__kicker,
  .section--navy h1,
  .section--navy h2,
  .section--navy h3,
  .section--navy p,
  .text-white,
  .text-white-80,
  .eyebrow,
  .card__label,
  .cv-entry__date {
    color: #000 !important;
  }

  .hero__title em { font-style: italic; }

  /* A CV is read as a document, not a layout: one column, nothing split. */
  .grid-2col,
  .grid-4col,
  .grid-sidebar {
    display: block !important;
  }

  .card,
  .cv-entry,
  .cv-section {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  h1, h2, h3 {
    break-after: avoid;
    page-break-after: avoid;
  }

  .profile-photo {
    max-width: 150px !important;
    float: right;
    margin: 0 0 1rem 1rem;
  }

  /* Printed links are dead ends unless the address is on the page. */
  main a[href^="http"]::after,
  main a[href^="mailto"]::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    word-break: break-all;
  }

  .skip-link,
  .btn {
    display: none !important;
  }

  @page {
    margin: 18mm 16mm;
  }
}