/* Production-only responsive corrections. */

:root {
  --muted: #888578;
  --muted-on-green: #a8a28e;
}

a,
a:hover,
a:focus,
a:visited {
  text-decoration: none !important;
}

main p a:not(.text-link),
main figcaption a {
  font-weight: 600;
}

.site-nav a::after {
  display: none;
}

.site-header--page-context .site-nav a[aria-current],
body.nav-open .site-nav a[aria-current] {
  color: var(--ivory);
}

.site-header--page-context .site-nav a[aria-current]::before,
body.nav-open .site-nav a[aria-current]::before {
  position: absolute;
  top: 50%;
  left: -10px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold-strong);
  box-shadow: 0 0 12px rgba(255, 193, 1, 0.45);
  content: "";
  transform: translateY(-50%);
}

article.page > .section {
  padding-block: clamp(52px, 6vw, 84px);
}

.section--roles,
.section--funding,
.section--research-programme,
.section--scientifika,
.section--contact,
.section--course-details {
  --muted: var(--muted-on-green);
}

.course-feature img,
.lecture-visual img {
  height: auto;
}

.motion-enabled .section--course-lectures > .section__inner[data-motion="reveal"] {
  opacity: 1;
  transform: none;
}

.site-brand,
.site-nav a,
.hero h1 {
  color: var(--gold);
}

.nav-toggle > span:not(.sr-only) {
  background: var(--gold);
}

body:has(.hero--home) .latest-row {
  grid-template-columns: 140px minmax(0, 1fr) auto;
}

body:has(.hero--home) .latest-disclosure {
  border-bottom: 1px solid var(--line);
}

body:has(.hero--home) .latest-row {
  min-height: 44px;
  border-bottom: 0;
  color: inherit;
  cursor: pointer;
  list-style: none;
}

body:has(.hero--home) .latest-row::-webkit-details-marker {
  display: none;
}

body:has(.hero--home) .latest-row::marker {
  content: "";
}

body:has(.hero--home) .latest-row:focus-visible {
  outline: 2px solid var(--gold-strong);
  outline-offset: 3px;
}

body:has(.hero--home) .latest-row__main {
  min-width: 0;
}

body:has(.hero--home) .latest-row__title {
  display: block;
  color: var(--ivory);
  font-family: var(--display);
  font-size: clamp(1.35rem, 2.1vw, 1.85rem);
  font-weight: 400;
  line-height: 1.2;
}

body:has(.hero--home) .latest-row__venue {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

body:has(.hero--home) .latest-disclosure__prompt {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-self: end;
  color: var(--gold);
  font-size: 0.9rem;
  font-weight: 600;
}

body:has(.hero--home) .latest-disclosure__chevron {
  flex: 0 0 auto;
  transition: transform 220ms ease;
}

body:has(.hero--home) .latest-disclosure[open] .latest-disclosure__chevron {
  transform: rotate(180deg);
}

body:has(.hero--home) .latest-disclosure__content {
  grid-template-columns: 140px minmax(0, 1fr) auto;
  gap: clamp(16px, 2.5vw, 32px);
  padding: 10px 0 clamp(24px, 2.8vw, 34px);
}

body:has(.hero--home) .latest-disclosure[open] .latest-disclosure__content {
  display: grid;
  animation: latest-disclosure-in 220ms ease both;
}

body:has(.hero--home) .latest-disclosure__copy {
  grid-column: 2 / -1;
  max-width: 74ch;
}

body:has(.hero--home) .latest-disclosure__copy p {
  margin: 0;
  color: var(--body);
  font-size: 1rem;
  line-height: 1.68;
}

body:has(.hero--home) .latest-disclosure__copy p + p {
  margin-top: 14px;
}

body:has(.hero--home) .latest-disclosure__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px 22px;
  margin-top: 18px;
}

body:has(.hero--home) .latest-disclosure__copy .text-link {
  display: inline-block;
}

@keyframes latest-disclosure-in {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body:has(.hero--home) .home-intro__current a,
body:has(.hero--home) .biography-copy a,
body:has(.hero--home) .biography-figure figcaption a {
  color: var(--gold);
  text-decoration: none;
}

.hero--research .hero__image,
.hero--teaching .hero__image {
  filter: brightness(1.08) saturate(0.92);
}

.hero--research::after,
.hero--teaching::after {
  background:
    linear-gradient(0deg, rgba(3, 4, 3, 0.7) 0%, rgba(3, 4, 3, 0.25) 43%, rgba(3, 4, 3, 0.03) 80%),
    linear-gradient(90deg, rgba(3, 4, 3, 0.42) 0%, transparent 62%);
}

.hero--outreach {
  min-height: clamp(480px, 48vw, 660px);
}

.hero--writing {
  min-height: clamp(460px, 45vw, 620px);
}

.hero--writing::after {
  background:
    linear-gradient(0deg, rgba(3, 4, 3, 0.58) 0%, rgba(3, 4, 3, 0.18) 42%, rgba(3, 4, 3, 0.02) 80%),
    linear-gradient(90deg, rgba(3, 4, 3, 0.4) 0%, transparent 62%);
}

.writing-card__read {
  display: inline-block;
  margin-top: 18px;
}

.writing-prose > h2 {
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.writing-prose a {
  box-shadow: inset 0 -1px 0 rgba(73, 83, 63, 0.5);
}

.writing-prose a:hover,
.writing-prose a:focus-visible {
  box-shadow: inset 0 -2px 0 #6e613d;
}

.writing-article-meta a {
  color: inherit;
  text-underline-offset: 3px;
}

.writing-related {
  max-width: 720px;
  margin: clamp(46px, 7vw, 72px) auto 0;
  padding-top: clamp(34px, 5vw, 48px);
  border-top: 1px solid rgba(38, 42, 36, 0.18);
}

.writing-related h2 {
  margin: 0 0 22px;
  color: var(--ink);
  font-size: clamp(1.65rem, 3.5vw, 2.35rem);
}

.writing-related .section-label {
  color: #6e613d;
}

.writing-related ul {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.writing-related a {
  display: inline-block;
  color: #49533f;
  font-weight: 600;
  text-underline-offset: 4px;
}

.section--writing-comments .section-label {
  color: #6e613d;
}

.writing-comment-list time,
.writing-comment-form label small {
  color: #62665e;
  font-size: 0.8rem;
}

.writing-comment-feed {
  margin-top: 28px;
}

.writing-comment-feed .writing-comment-list {
  margin-top: 12px;
}

.writing-comment-status {
  margin: 0;
  color: #62665e;
  font-size: 0.82rem;
  line-height: 1.55;
}

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

.writing-comment-feed[data-status="error"] .writing-comment-status,
.writing-comment-form[data-comment-ref-state="error"] .writing-comment-form__status {
  color: #7a3228;
}

.writing-comment-form__status:empty {
  display: none;
}

.comment-moderation-hero .section-label {
  margin-bottom: 12px;
}

.section.section--comment-moderation {
  background: var(--paper);
  color: var(--ink);
}

.comment-moderation {
  position: relative;
  width: min(780px, calc(100vw - 64px));
  margin-inline: auto;
  padding: clamp(30px, 5vw, 52px);
  border: 1px solid rgba(38, 42, 36, 0.18);
  background: rgba(255, 255, 255, 0.38);
  box-shadow: 0 18px 48px rgba(20, 24, 19, 0.08);
}

.comment-moderation::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #877749;
  content: "";
}

.comment-moderation[data-status="error"]::before,
.comment-moderation[data-status="expired"]::before,
.comment-moderation[data-status="already-decided"]::before {
  background: #8a4a3b;
}

.comment-moderation[data-status="success"]::before {
  background: #49533f;
}

.comment-moderation__status h2 {
  margin-bottom: 10px;
  color: var(--ink);
  font-size: clamp(1.75rem, 4vw, 2.7rem);
  line-height: 1.15;
}

.comment-moderation__status p {
  max-width: 650px;
  margin-bottom: 0;
  color: #5b6057;
  line-height: 1.7;
}

.comment-moderation__review {
  margin-top: 30px;
  padding-top: 28px;
  border-top: 1px solid rgba(38, 42, 36, 0.18);
}

.comment-moderation__review[hidden] {
  display: none;
}

.comment-moderation__action {
  margin-bottom: 22px;
  color: #6e613d;
  font-weight: 700;
}

.comment-moderation__details {
  margin: 0;
}

.comment-moderation__details > div {
  display: grid;
  grid-template-columns: minmax(86px, 0.22fr) minmax(0, 1fr);
  gap: 18px;
  padding: 18px 0;
  border-top: 1px solid rgba(38, 42, 36, 0.14);
}

.comment-moderation__details > div:last-child {
  border-bottom: 1px solid rgba(38, 42, 36, 0.14);
}

.comment-moderation__details dt {
  color: #62665e;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.comment-moderation__details dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  line-height: 1.65;
  white-space: pre-line;
}

.comment-moderation__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 24px;
  align-items: center;
  margin-top: 30px;
}

.comment-moderation__controls .text-link {
  color: #6e613d;
}

.comment-moderation__controls button:disabled {
  border-color: #b6b4aa;
  background: #d7d5cc;
  color: #77776f;
  cursor: not-allowed;
}

.research-area-card:nth-child(3) img {
  clip-path: inset(0 0 2px 0);
  margin-bottom: -2px;
}

.section--research-programme {
  background: var(--green) !important;
}

.research-programme-heading {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(40px, 8vw, 120px);
  align-items: end;
  margin-bottom: clamp(40px, 5vw, 68px);
}

.research-programme-heading h2 {
  margin-bottom: 0;
}

.research-programme__lede {
  max-width: 760px;
  margin: 0;
  font-size: clamp(1rem, 1.35vw, 1.18rem);
  line-height: 1.7;
}

.research-programme-stages {
  border-top: 1px solid var(--line);
}

.research-programme-stage {
  display: grid;
  grid-template-columns: minmax(150px, 0.28fr) minmax(260px, 0.62fr) minmax(0, 1.1fr);
  gap: clamp(24px, 4vw, 58px);
  align-items: start;
  padding: clamp(30px, 3.5vw, 46px) clamp(0px, 2vw, 24px);
  border-bottom: 1px solid var(--line);
}

.research-programme-stage--active {
  background: rgba(226, 207, 152, 0.055);
}

.research-programme-stage__label {
  margin: 5px 0 0;
  color: var(--gold);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1.5;
  text-transform: uppercase;
}

.research-programme-stage h3 {
  margin: 0;
  font-size: clamp(1.55rem, 2.5vw, 2.15rem);
  font-weight: 400;
  line-height: 1.2;
}

.research-programme-stage__copy {
  max-width: 720px;
}

.research-programme-stage__copy p {
  margin: 0 0 22px;
  line-height: 1.7;
}

.research-programme-stage__copy p:last-child {
  margin-bottom: 0;
}

.research-programme-stage__copy .text-link {
  display: inline-flex;
}

#publications-current-programme,
#publications-research-foundations {
  scroll-margin-top: calc(var(--header-height) + 28px);
}

#publications-current-programme:focus,
#publications-research-foundations:focus {
  outline: none;
}

#publications-current-programme:focus-visible,
#publications-research-foundations:focus-visible {
  outline: 2px solid rgba(226, 207, 152, 0.7);
  outline-offset: -2px;
}

.collaboration-review__meta,
.publication-venue {
  text-align: right;
}

.collaboration-review__links {
  justify-content: flex-end;
}

.publication-list__details {
  min-width: 0;
}

.publication-list__details > p:first-child {
  margin-bottom: 0;
}

.publication-venue {
  margin: 18px 0 0 !important;
  color: var(--muted);
  font-size: 0.9rem !important;
}

.legacy-paper .publication-venue {
  margin-top: 18px !important;
  margin-bottom: 0 !important;
}

.lecture-copy > .text-link {
  display: flex;
  width: fit-content;
  margin-left: auto;
  text-align: right;
}

article.page[data-page="teaching"] > .section--intro {
  padding-bottom: clamp(28px, 3.5vw, 46px);
}

article.page[data-page="teaching"] > .section--courses {
  padding-block: 0;
}

article.page[data-page="teaching"] > .section--earlier-teaching {
  padding-top: clamp(24px, 3vw, 40px);
  padding-bottom: clamp(32px, 4vw, 52px);
}

article.page[data-page="teaching"] .section--earlier-teaching h2 {
  max-width: 440px;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  line-height: 1.2;
}

.stat-rail {
  text-align: center;
}

.scientifika-visual img {
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
}

.event-list article > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.event-list .text-link {
  align-self: flex-end;
  margin-top: auto;
  text-align: right;
}

.event-list .event-date {
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.community-list a {
  grid-template-columns: 270px minmax(0, 1fr);
}

.link-stack a {
  grid-template-columns: 120px minmax(0, 1fr);
}

@media (max-width: 920px) {
  body:has(.hero--home) .latest-row {
    grid-template-columns: 104px minmax(0, 1fr) auto;
  }

  body:has(.hero--home) .latest-disclosure__content {
    grid-template-columns: 104px minmax(0, 1fr) auto;
  }

  .publication-list__details {
    grid-column: 2;
  }

  .community-list {
    grid-template-columns: 1fr;
  }

  .research-programme-heading {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .research-programme-stage {
    grid-template-columns: minmax(130px, 0.34fr) minmax(220px, 0.66fr);
  }

  .research-programme-stage__copy {
    grid-column: 2;
  }
}

@media (max-width: 1000px) {
  .site-header--page-context .site-nav a[aria-current],
  body.nav-open .site-nav a[aria-current] {
    margin-inline: -10px;
    padding-inline: 22px 10px;
    background: rgba(226, 207, 152, 0.07);
  }

  .site-header--page-context .site-nav a[aria-current]::before,
  body.nav-open .site-nav a[aria-current]::before {
    left: 10px;
  }
}

@media (max-width: 720px) {
  article.page > .section {
    padding-block: 48px;
  }

  body:has(.hero--home) .latest-row {
    grid-template-columns: 1fr;
  }

  body:has(.hero--home) .latest-disclosure__prompt {
    justify-self: start;
  }

  body:has(.hero--home) .latest-disclosure__content {
    grid-template-columns: 1fr;
    gap: 0;
  }

  body:has(.hero--home) .latest-disclosure__copy {
    grid-column: 1;
  }

  body:has(.hero--home) .latest-row > .text-link {
    justify-self: start;
  }

  .contact-primary > a {
    max-width: 100%;
    overflow-wrap: anywhere;
    font-size: clamp(1.3rem, 6.8vw, 1.75rem);
  }

  .hero--outreach {
    min-height: clamp(280px, 76vw, 340px);
  }

  .hero--writing {
    min-height: clamp(240px, 68vw, 300px);
  }

  .hero--writing .hero__image {
    inset: 0;
    width: 100%;
    height: 100%;
    object-position: 84% center;
  }

  .comment-moderation {
    width: min(100% - 32px, 780px);
    padding: 28px 24px;
  }

  .comment-moderation__details > div {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .comment-moderation__controls {
    align-items: stretch;
    flex-direction: column;
  }

  .comment-moderation__controls .button,
  .comment-moderation__controls .text-link {
    width: 100%;
    justify-content: center;
  }

  .publication-list__details {
    grid-column: 1;
  }

  .community-list a {
    grid-template-columns: 180px minmax(0, 1fr);
  }

  .link-stack a {
    grid-template-columns: 90px minmax(0, 1fr);
  }

  .profile-grid {
    grid-template-columns: 1fr;
  }

  .profile-grid a {
    min-height: 96px;
    padding-right: 72px;
  }

  .profile-grid span {
    padding-right: 48px;
  }

  .profile-grid small {
    padding-right: 0;
  }

  .research-programme-heading {
    margin-bottom: 34px;
  }

  .research-programme-stage {
    grid-template-columns: 1fr;
    gap: 13px;
    padding-inline: 0;
  }

  .research-programme-stage__copy {
    grid-column: 1;
  }

  .research-programme-stage__label {
    margin-top: 0;
  }
}

@media (max-width: 360px) {
  .hero--publications h1 {
    font-size: clamp(2.1rem, 10.6vw, 2.35rem);
    letter-spacing: 0.045em;
  }

  .profile-grid a {
    min-height: 96px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body:has(.hero--home) .latest-disclosure[open] .latest-disclosure__content {
    animation: none !important;
  }

  body:has(.hero--home) .latest-disclosure__chevron {
    transition: none !important;
  }
}

@media print {
  body:has(.hero--home) .latest-disclosure__content {
    display: grid !important;
  }
}
