/* King's College London inspired palette: King's red, charcoal, warm neutrals */
:root {
  --red: #e2231a;
  --red-dark: #b81c14;
  --ink: #1d1d1b;
  --ink-soft: #4a4a48;
  --muted: #6f6f6c;
  --bg: #ffffff;
  --tint: #f5f3ef;
  --line: #e3dfd8;
  --card: #ffffff;
  --hero-bg: #1d1d1b;
  --hero-ink: #ffffff;
  --hero-muted: #c9c6c0;

  --serif: "Libre Caslon Text", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --maxw: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --red: #ff4b40;
    --red-dark: #ff6b62;
    --ink: #f1efea;
    --ink-soft: #d0cdc6;
    --muted: #a19e97;
    --bg: #141413;
    --tint: #1c1c1a;
    --line: #34332f;
    --card: #232321;
    --hero-bg: #0c0c0b;
    --hero-muted: #b3b0a9;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--red);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover {
  color: var(--red-dark);
  text-decoration-thickness: 2px;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Top bar ---------- */
.topbar {
  background: var(--red);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.topbar__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 44px;
  flex-wrap: wrap;
}
.topbar__nav {
  display: flex;
  gap: 20px;
}
.topbar__nav a {
  color: #fff;
  text-decoration: none;
}
.topbar__nav a:hover {
  text-decoration: underline;
}

/* ---------- Hero ---------- */
.hero {
  background: var(--hero-bg);
  color: var(--hero-ink);
  padding: 88px 0 72px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  /* diagonal red accent block */
  content: "";
  position: absolute;
  right: -120px;
  top: -80px;
  width: 360px;
  height: 360px;
  background: var(--red);
  transform: rotate(45deg);
  opacity: 0.9;
}
.hero .wrap {
  position: relative;
  z-index: 1;
}
.eyebrow {
  margin: 0 0 20px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hero-muted);
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 32px;
  height: 3px;
  background: var(--red);
  vertical-align: middle;
  margin-right: 12px;
}
.hero__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 5.4vw, 60px);
  line-height: 1.1;
  margin: 0;
  max-width: 22ch;
}
.hero__subtitle {
  display: block;
  margin-top: 16px;
  font-style: italic;
  font-size: clamp(20px, 2.4vw, 28px);
  color: var(--hero-muted);
  max-width: none;
}
.hero__people {
  margin: 28px 0 0;
  color: var(--hero-muted);
}
.hero__people a {
  color: #fff;
  font-weight: 600;
  text-decoration-color: var(--red);
}
.hero__people a:hover {
  color: #fff;
}

.facts {
  margin: 56px 0 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}
.fact {
  padding: 20px 20px 0 0;
}
.fact + .fact {
  padding-left: 20px;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
}
.fact dt {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--hero-muted);
}
.fact dd {
  margin: 6px 0 0;
  font-weight: 500;
  line-height: 1.4;
}
.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #3ecf6e;
  margin-right: 8px;
  box-shadow: 0 0 0 4px rgba(62, 207, 110, 0.22);
  vertical-align: 1px;
}

/* ---------- Sections ---------- */
.section {
  padding: 88px 0;
  border-bottom: 1px solid var(--line);
}
.section--tint {
  background: var(--tint);
}
.grid {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 48px;
}
.section__label {
  position: sticky;
  top: 24px;
  align-self: start;
}
.section__num {
  display: block;
  font-family: var(--serif);
  font-size: 15px;
  color: var(--red);
  margin-bottom: 8px;
}
.section__label h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 30px;
  line-height: 1.2;
  margin: 0;
  padding-top: 12px;
  border-top: 3px solid var(--red);
}
.prose p {
  margin: 0 0 1.1em;
  color: var(--ink-soft);
  max-width: 68ch;
}
.prose .lead {
  font-family: var(--serif);
  font-size: 23px;
  line-height: 1.45;
  color: var(--ink);
}

.callout {
  margin-top: 36px;
  padding: 24px 28px;
  background: var(--tint);
  border-left: 4px solid var(--red);
  max-width: 68ch;
}
.callout h3 {
  margin: 0 0 8px;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.callout p {
  margin: 0;
}

/* ---------- Publications ---------- */
.year + .year {
  margin-top: 48px;
}
.year__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  margin: 0 0 16px;
  color: var(--muted);
}
.pubs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}
.pub {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 24px;
  padding: 24px 28px;
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 3px solid transparent;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.pub:hover {
  border-top-color: var(--red);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -16px rgba(0, 0, 0, 0.35);
}
.pub__venue {
  align-self: start;
  justify-self: start;
  padding: 4px 10px;
  background: var(--ink);
  color: var(--bg);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.pub__title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 19px;
  line-height: 1.35;
  margin: 0 0 8px;
}
.pub__authors,
.pub__where {
  margin: 0 0 4px;
  font-size: 15px;
  color: var(--ink-soft);
}
.pub__authors strong {
  color: var(--ink);
}
.pub__where {
  color: var(--muted);
}
.pub__links {
  margin: 14px 0 0;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.btn {
  display: inline-block;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  color: var(--red);
  border: 1px solid var(--red);
  transition: background 0.15s ease, color 0.15s ease;
}
.btn:hover {
  background: var(--red);
  color: #fff;
  text-decoration: none;
}

/* ---------- Contact ---------- */
.contacts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
  max-width: 720px;
}
.contact {
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--red);
  text-decoration: none;
  color: var(--ink);
  transition: background 0.15s ease;
}
.contact:hover {
  background: var(--tint);
  color: var(--ink);
  text-decoration: none;
}
.contact__name {
  font-family: var(--serif);
  font-size: 20px;
}
.contact__role {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
}
.contact__mail {
  font-size: 14px;
  font-weight: 600;
  color: var(--red);
  overflow-wrap: anywhere;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--hero-bg);
  color: var(--hero-muted);
  font-size: 14px;
  padding: 28px 0;
}
.footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer a {
  color: #fff;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .section__label {
    position: static;
  }
  .facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .fact:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 16px;
  }
  .wrap {
    padding: 0 16px;
  }
  .topbar__inner > span {
    display: none;
  }
  .topbar__nav {
    width: 100%;
    justify-content: space-between;
  }
  .hero {
    padding: 56px 0 48px;
  }
  .hero::after {
    width: 200px;
    height: 200px;
    right: -110px;
    top: -60px;
  }
  .section {
    padding: 56px 0;
  }
  .facts {
    grid-template-columns: 1fr;
  }
  .fact,
  .fact + .fact {
    padding: 14px 0 0;
    border-left: 0;
  }
  .pub {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 20px;
  }
  .contacts {
    grid-template-columns: 1fr;
  }
  .prose .lead {
    font-size: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .pub,
  .pub:hover {
    transition: none;
    transform: none;
  }
}
