/* Human-Centred AI Lab — University of Essex
   Palette follows the Lab handout. Lato is used under the SIL Open Font License. */

@font-face {
  font-family: "Lato";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("/fonts/latin-300-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Lato";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Lato";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/latin-400-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Lato";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Lato";
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url("/fonts/latin-900-normal.woff2") format("woff2");
}

:root {
  --navy: #0b1d33;
  --ink: #1e2a3a;
  --mute: #44566c;
  --paper: #f3f5f9;
  --white: #ffffff;
  --line: #d5dce6;
  --phys: #f26b1d;
  --phys-ink: #9a3e08;
  --align: #0c8f8f;
  --align-ink: #0a6464;
  --violet: #7b3fe4;
  --violet-ink: #5a24b8;
  --violet-lt: #c4b0ff;
  --shadow: 0 12px 32px rgba(11, 29, 51, 0.07);
  --radius: 16px;
  --wrap: 1120px;
  --header: 76px;
  color-scheme: light;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "Lato", "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}
main { flex: 1 0 auto; }

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

a { color: var(--violet-ink); text-underline-offset: 0.16em; }
a:hover { color: var(--navy); }

h1, h2, h3, p { margin-top: 0; }

h1, h2, h3 {
  line-height: 1.15;
  font-weight: 900;
  color: var(--navy);
  letter-spacing: -0.02em;
}

p { margin-bottom: 0; }

:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 50;
  background: var(--white);
  color: var(--navy);
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  font-weight: 700;
}
.skip:focus { top: 0.75rem; }

.wrap {
  width: min(var(--wrap), calc(100% - 2.4rem));
  margin-inline: auto;
}

.gradient-bar {
  height: 5px;
  background: linear-gradient(90deg, var(--phys), var(--violet) 52%, var(--align));
}

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

/* Header ---------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(243, 245, 249, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  min-height: var(--header);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}
.brand:hover { color: inherit; }

.brand img {
  height: 46px;
  width: auto;
  flex: none;
}

.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name {
  font-weight: 900;
  color: var(--navy);
  letter-spacing: -0.02em;
  font-size: 1.05rem;
  line-height: 1.15;
}
.brand-school {
  color: var(--mute);
  font-size: 0.75rem;
  line-height: 1.3;
  font-weight: 400;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 10px;
  width: 46px;
  height: 42px;
  padding: 0;
  cursor: pointer;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--navy);
  position: relative;
  margin: 0 auto;
}
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.15rem 1.05rem;
}
.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
}
.site-nav a:hover { color: var(--violet-ink); }
.site-nav a[aria-current="page"] {
  color: var(--navy);
  box-shadow: inset 0 -2px 0 var(--violet);
}
.nav-ext {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  box-shadow: none !important;
}

/* Hero ------------------------------------------------------------------ */
.hero {
  position: relative;
  background: var(--navy);
  color: var(--white);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 80% at 100% 0%, rgba(123, 63, 228, 0.35), transparent 60%),
    radial-gradient(ellipse 40% 50% at 0% 100%, rgba(242, 107, 29, 0.22), transparent 55%),
    radial-gradient(ellipse 35% 45% at 70% 100%, rgba(0, 163, 163, 0.2), transparent 50%);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.8rem;
  padding: 3.6rem 0 2.6rem;
}
.kicker {
  display: flex;
  align-items: center;
  gap: 0.65em;
  margin-bottom: 0.85rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--violet-ink);
}
.kicker::before {
  content: "";
  width: 1.35em;
  height: 0.22em;
  background: currentColor;
  flex: none;
}
.kicker-light { color: var(--violet-lt); }

.hero h1 {
  margin: 0 0 1rem;
  color: var(--white);
  font-size: clamp(2.35rem, 3.4vw, 3.55rem);
  line-height: 1.02;
  font-weight: 900;
  max-width: 18em;
}
.hero h1 span { display: block; }
.hero h1 em { font-style: normal; }
.c-phys { color: var(--phys); }
.c-align { color: #3dcccc; }
.c-violet { color: var(--violet-lt); }

.lede {
  font-size: 1.15rem;
  line-height: 1.5;
  max-width: 40rem;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 300;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.5rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.72rem 1.15rem;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  line-height: 1.2;
}
.btn:hover { text-decoration: none; }
.btn-light { background: var(--white); color: var(--navy); }
.btn-light:hover { background: #e7ebf2; color: var(--navy); }
.btn-ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.4);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); color: var(--white); }
.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: #16304f; color: var(--white); }
.btn-line {
  background: transparent;
  color: var(--navy);
  border-color: var(--line);
}
.btn-line:hover { border-color: var(--navy); color: var(--navy); }

.mosaic {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.65rem;
}
.mosaic figure {
  margin: 0;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #081422;
}
.mosaic img { width: 100%; height: 100%; object-fit: cover; }
.mosaic figcaption {
  position: absolute;
  left: 0.45rem;
  bottom: 0.45rem;
  background: rgba(11, 29, 51, 0.78);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
}

.page-hero { background: var(--navy); color: var(--white); }
.page-hero .wrap { padding: 3.2rem 0 2.8rem; position: relative; }
.page-hero h1 {
  color: var(--white);
  font-size: clamp(2.1rem, 4vw, 3.15rem);
  max-width: 16em;
  margin-bottom: 0.8rem;
}
.page-hero .lede { margin-bottom: 0; }

/* Sections -------------------------------------------------------------- */
.section { padding: 4.2rem 0; }
.section-tight { padding: 2.5rem 0 0; }
.section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 0.6rem 1rem;
  margin-bottom: 1.4rem;
}
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.15rem); margin-bottom: 0; }
.section-head p:last-child { margin: 0; }

.prose { max-width: 44rem; }
.prose p + p { margin-top: 0.9rem; }
.prose h2 { font-size: 1.85rem; margin: 0 0 0.7rem; }

.intro-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 2.5rem;
  align-items: start;
}
.fact-list {
  list-style: none;
  margin: 0;
  padding: 1.1rem 1.15rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.fact-list li {
  padding: 0.75rem 0;
  border-top: 1px solid var(--line);
}
.fact-list li:first-child { border-top: 0; padding-top: 0; }
.fact-list li:last-child { padding-bottom: 0; }
.fact-list strong { display: block; color: var(--navy); }

.cards-3, .cards-2, .cards-5 {
  display: grid;
  gap: 1rem;
}
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.cards-2 { grid-template-columns: 1.15fr 0.85fr; }
.cards-5 { grid-template-columns: repeat(5, 1fr); }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-body { padding: 1.15rem 1.2rem 1.3rem; }
.card h2 { font-size: 1.85rem; margin-bottom: 0.25rem; }
.card h3 { font-size: 1.35rem; margin-bottom: 0.2rem; }
.strap {
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 0.7rem;
}
.strap-phys { color: var(--phys-ink); }
.strap-align { color: var(--align-ink); }
.strap-violet { color: var(--violet-ink); }

.card-media { aspect-ratio: 16 / 9; overflow: hidden; background: var(--navy); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }

.ticks { list-style: none; margin: 0; padding: 0; }
.ticks li {
  position: relative;
  padding-left: 1rem;
  margin: 0.42rem 0;
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.52em;
  width: 0.42rem;
  height: 0.42rem;
  background: var(--tick, var(--violet));
}

.pillar-phys { --tick: var(--phys); border-top: 4px solid var(--phys); }
.pillar-align { --tick: var(--align); border-top: 4px solid var(--align); }
.pillar-violet { --tick: var(--violet); border-top: 4px solid var(--violet); }
.pillar-cross { --tick: #5d7ea8; border-top: 4px solid #5d7ea8; }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.45rem 1.5rem;
  box-shadow: var(--shadow);
}
.panel h2 { font-size: 1.7rem; margin-bottom: 0.55rem; }
.panel p + p { margin-top: 0.75rem; }
.panel-navy {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.88);
  border-color: var(--navy);
}
.panel-navy h2,
.panel-navy .kicker { color: var(--white); }
.panel-navy .kicker { color: var(--violet-lt); }
.panel .btn { margin-top: 1.1rem; }

.pills { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.9rem; }
.pill {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  border-radius: 999px;
  padding: 0.28rem 0.6rem;
  background: var(--paper);
  color: var(--navy);
  border: 1px solid var(--line);
}

.sector h3 { font-size: 1.02rem; margin-bottom: 0.35rem; }
.sector p { font-size: 0.95rem; color: var(--ink); }
.sector .bar {
  width: 2rem;
  height: 4px;
  border-radius: 99px;
  margin-bottom: 0.75rem;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
  margin-top: 1rem;
}
.step {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
}
.step b {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--violet-ink);
  margin-bottom: 0.25rem;
}
.step strong { color: var(--navy); display: block; font-size: 1.15rem; }

.formats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
}
.format {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.78);
  border-radius: 14px;
  padding: 1rem 0.9rem 1.05rem;
  min-height: 100%;
}
.format h3 { color: var(--white); font-size: 1.05rem; margin-bottom: 0.2rem; }
.format .when { font-weight: 700; font-size: 0.82rem; margin-bottom: 0.35rem; }
.when-v { color: var(--violet-lt); }
.when-p { color: #ffb07a; }
.when-a { color: #7ddddd; }

.theme-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.theme { padding: 1.3rem 1.3rem 1.15rem; }
.theme h2 { font-size: 1.45rem; margin: 0.35rem 0 0.15rem; }
.rule {
  width: 2.2rem;
  height: 4px;
  border-radius: 99px;
  margin-bottom: 0.2rem;
}

.figure-block {
  display: grid;
  grid-template-columns: 0.9fr 1.2fr;
  gap: 1.4rem;
  align-items: center;
  margin: 1.2rem 0 0.4rem;
}
.figure-block figure { margin: 0; }
.figure-block img {
  width: 100%;
  border-radius: 14px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.figure-block figcaption,
.caption {
  color: var(--mute);
  font-size: 0.82rem;
  margin-top: 0.4rem;
}

.note {
  font-size: 0.92rem;
  color: var(--mute);
  margin-top: 0.8rem;
}

/* People ---------------------------------------------------------------- */
.people-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.people-grid.collaborators { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.person {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.1rem 1.2rem;
  box-shadow: var(--shadow);
}
.person img {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--ring, var(--navy));
  margin-bottom: 0.8rem;
}
.person h3 { font-size: 1.12rem; margin-bottom: 0.15rem; }
.person h3 a { color: var(--navy); text-decoration: none; }
.person h3 a:hover { text-decoration: underline; }
.role { color: var(--ring, var(--violet-ink)); font-weight: 700; font-size: 0.88rem; margin-bottom: 0.45rem; }
.person p { font-size: 0.96rem; }
.badge {
  display: inline-block;
  margin-top: 0.7rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--navy);
  color: var(--white);
  border-radius: 999px;
  padding: 0.18rem 0.5rem;
}
.collab-wrap {
  margin-top: 1.4rem;
  background: #e7edf5;
  border: 1px solid #d3dce8;
  border-radius: 20px;
  padding: 1.2rem;
}
.home-people {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.8rem;
}
.home-person { text-align: center; text-decoration: none; color: inherit; }
.home-person img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 0.45rem;
  border: 3px solid var(--ring, var(--navy));
}
.home-person strong { display: block; color: var(--navy); font-size: 0.92rem; line-height: 1.25; }
.home-person span { color: var(--mute); font-size: 0.78rem; }

/* News ------------------------------------------------------------------ */
.news-list {
  display: grid;
  gap: 0.8rem;
}
.news-card {
  display: block;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.05rem 1.15rem 1.1rem;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
}
.news-card:hover { border-color: #b7c3d4; color: inherit; }
.news-meta {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  color: var(--mute);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.news-card h3 { font-size: 1.25rem; margin-bottom: 0.3rem; }
.news-card p { color: var(--ink); }
.more-link { margin-top: 1rem; }
.cat {
  color: var(--violet-ink);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.72rem;
}
.empty {
  background: var(--white);
  border: 1px dashed #b7c3d4;
  border-radius: var(--radius);
  padding: 1.4rem 1.4rem 1.5rem;
}
.empty h3 { margin-bottom: 0.35rem; }
.article { max-width: 44rem; }
.article h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 0.4rem; }
.article-date { color: var(--mute); font-weight: 700; margin-bottom: 1.2rem; }
.article-body p + p { margin-top: 0.9rem; }
.back { font-weight: 700; display: inline-block; margin-bottom: 1rem; }

.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 1rem;
}
address { font-style: normal; }
.credits { margin-top: 2rem; }
.credits li { margin: 0.35rem 0; }
.credits a { font-weight: 700; }

.band {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.88);
}
.band h2 { color: var(--white); font-size: clamp(1.7rem, 3vw, 2.2rem); margin-bottom: 0.4rem; }
.band a { color: var(--violet-lt); }
.band-inner {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: center;
  padding: 2.2rem 0;
}

.site-footer { background: var(--white); border-top: 0; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 0.8fr;
  gap: 1.5rem;
  padding: 2rem 0 1.2rem;
}
.footer-name { font-weight: 900; color: var(--navy); margin-bottom: 0.4rem; }
.footer-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--violet-ink);
  margin-bottom: 0.4rem;
}
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links a { text-decoration: none; font-weight: 700; color: var(--ink); }
.footer-links a:hover { color: var(--violet-ink); }
.footer-legal {
  border-top: 1px solid var(--line);
  padding: 0.9rem 0 1.3rem;
  color: var(--mute);
  font-size: 0.85rem;
}
.footer-legal p + p { margin-top: 0.35rem; }

.error-page { padding: 4rem 0 5rem; }
.error-page h1 { font-size: clamp(2.4rem, 5vw, 4rem); }

@media (max-width: 1040px) {
  .brand-school { display: none; }
  .cards-5, .formats { grid-template-columns: repeat(3, 1fr); }
  .home-people { grid-template-columns: repeat(3, 1fr); }
  .people-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .site-header { position: sticky; }
  .header-inner { position: relative; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    padding: 0.4rem 1.2rem 0.9rem;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
  .site-nav a.nav-ext {
    margin-top: 0.6rem;
    border-bottom: 0;
    text-align: center;
  }
  .hero-grid, .intro-grid, .cards-3, .cards-2, .split,
  .figure-block, .contact-grid, .footer-grid, .theme-grid, .mosaic {
    grid-template-columns: 1fr;
  }
  .mosaic { grid-template-columns: 1fr 1fr; }
  .steps, .cards-5, .formats { grid-template-columns: 1fr 1fr; }
  .band-inner { flex-direction: column; align-items: flex-start; }
  .hero-grid { padding: 2.6rem 0 2.2rem; }
  .section { padding: 2.8rem 0; }
  .people-grid.collaborators { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .steps, .cards-5, .formats, .home-people, .people-grid { grid-template-columns: 1fr; }
  .home-people { grid-template-columns: 1fr 1fr; }
  .wrap { width: min(var(--wrap), calc(100% - 1.5rem)); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media print {
  .site-header, .hero-actions, .nav-toggle, .btn, .gradient-bar { display: none !important; }
  body, .hero, .page-hero, .band, .panel-navy, .format { background: white; color: black; }
  .hero h1, .page-hero h1, .band h2, .panel-navy h2 { color: black; }
  a { color: black; }
}
