/* IPT Lab — minimal static site.
   Palette is taken from the lab logo: deep teal-ink and antique gold. */

:root {
  --ink: #0f292e;
  --ink-soft: #3b5156;
  --gold: #938046;
  --gold-deep: #6c5c2a;
  --mist: #eaf1f0;
  --teal: #1f6670;
  --teal-deep: #174f57;
  --gold-tint: #f6f0df;
  --ink-deep: #0a1d21;
  --gold-light: #c2ad6b;
  --line: #d3dddb;
  --paper: #ffffff;
  --measure: 66ch;
  --wrap: 1120px;
  --sans: "Schibsted Grotesk", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.65;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--gold-deep); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 2px; }

.wrap { width: min(100% - 2rem, var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .6rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; top: 1rem; }

h1, h2, h3, h4 { font-family: var(--sans); line-height: 1.12; letter-spacing: -0.015em; margin: 0 0 .6em; }
h1 { font-size: clamp(2.3rem, 5.4vw, 4.1rem); font-weight: 700; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.55rem, 2.8vw, 2.1rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 650; letter-spacing: -0.01em; }
p { margin: 0 0 1em; max-width: var(--measure); }
ul { padding-left: 1.2rem; }

/* ---------- header ---------- */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 2rem; padding-block: .9rem; }
.brand { display: flex; align-items: center; gap: .8rem; text-decoration: none; font-family: var(--sans); font-weight: 650; line-height: 1.15; font-size: 1rem; }
.brand img { width: 44px; height: 44px; }
.brand small { display: block; font-weight: 450; color: var(--ink-soft); font-size: .8rem; letter-spacing: 0; }
.nav { display: flex; flex-wrap: wrap; gap: .25rem 1.4rem; font-family: var(--sans); font-size: .97rem; font-weight: 500; }
.nav a { text-decoration: none; padding: .35rem 0; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--gold); color: var(--ink); }
.nav a[aria-current="page"] { border-bottom-color: var(--gold); font-weight: 700; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--ink); color: #fff; }
.hero .wrap { position: relative; display: grid; gap: 2.5rem 3rem; align-items: center; padding-block: clamp(2.5rem, 5vw, 4rem); }
@media (min-width: 900px) { .hero .wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.hero-copy { position: relative; z-index: 1; max-width: 38rem; }
.hero-copy h1 { color: #fff; }
.hero-copy p { font-size: 1.2rem; color: #c9d6d4; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }
.hero .btn { background: var(--gold); border-color: var(--gold); color: var(--ink-deep); }
.hero .btn:hover { background: #fff; border-color: #fff; color: var(--ink-deep); }
.hero .btn.ghost { background: transparent; border-color: rgba(255,255,255,.6); color: #fff; }
.hero .btn.ghost:hover { background: #fff; border-color: #fff; color: var(--ink-deep); }
.hero-art { position: relative; width: min(100%, 580px); aspect-ratio: 1; justify-self: center; }
@media (min-width: 900px) { .hero-art { justify-self: end; margin-right: -1rem; } }
.hero-art svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hero-art .arc { fill: none; stroke: var(--gold-light); transform-box: view-box; transform-origin: 300px 300px; }
.hero-photo { position: absolute; inset: 13%; border-radius: 50%; overflow: hidden; background: var(--teal-deep); box-shadow: 0 0 0 6px rgba(194,173,107,.9); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
@media (prefers-reduced-motion: no-preference) {
  .hero-art .arc { animation: emit 1.6s cubic-bezier(.2,.7,.2,1) both; }
  .hero-art .arc:nth-child(2) { animation-delay: .2s; }
  .hero-art .arc:nth-child(3) { animation-delay: .4s; }
  .hero-art .arc:nth-child(4) { animation-delay: .6s; }
  .hero-photo { animation: reveal 1.2s cubic-bezier(.2,.7,.2,1) both; }
}
@keyframes emit { from { transform: scale(.6); opacity: 0; } }
@keyframes reveal { from { opacity: 0; transform: scale(.92); } }

.btn { display: inline-block; font-family: var(--sans); font-weight: 600; font-size: .98rem; text-decoration: none; padding: .75rem 1.3rem; border: 2px solid var(--ink); border-radius: 2px; background: var(--ink); color: #fff; }
.btn:hover { background: var(--gold-deep); border-color: var(--gold-deep); color: #fff; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- sections ---------- */
section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.page-head { background: var(--mist); border-bottom: 1px solid var(--line); padding-block: clamp(2.2rem, 5vw, 3.8rem); }
.page-head h1 { font-size: clamp(2rem, 4.2vw, 3rem); margin-bottom: .3em; }
.page-head p { margin: 0; color: var(--ink-soft); font-size: 1.12rem; }
.split { display: grid; gap: 1.5rem clamp(2rem, 6vw, 5rem); grid-template-columns: 1fr; }
@media (min-width: 900px) { .split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } .split > :first-child { position: sticky; top: 1.5rem; align-self: start; } }

.topics { list-style: none; margin: 0; padding: 0; display: grid; gap: 0 2.5rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .topics.two { grid-template-columns: 1fr 1fr; } }
.topics li { border-top: 2px solid var(--ink); padding-block: 1rem 1.4rem; }
.topics h3 { margin-bottom: .35em; }
.topics p { margin: 0; color: var(--ink-soft); font-size: 1rem; }

.pub-list { list-style: none; margin: 0; padding: 0; }
.pub-list li { padding-block: .85rem; border-top: 1px solid var(--line); display: grid; grid-template-columns: 3.4rem 1fr; gap: .8rem; font-size: 1rem; line-height: 1.55; }
.pub-list .pid { font-family: var(--sans); font-size: .82rem; font-weight: 600; color: var(--gold-deep); padding-top: .15rem; }
.pub-list .link { font-family: var(--sans); font-size: .88rem; margin-left: .35rem; white-space: nowrap; }
.more { margin-top: 1.5rem; font-family: var(--sans); font-weight: 600; }

.cta { background: var(--ink); color: #fff; }
.cta .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem 3rem; }
.cta h2 { margin: 0 0 .25em; }
.cta p { margin: 0; color: #c9d6d4; }
.cta .btn { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.cta .btn:hover { background: #fff; border-color: #fff; color: var(--ink); }

.lead-box { display: grid; gap: 1.5rem 3rem; align-items: start; }
@media (min-width: 760px) { .lead-box { grid-template-columns: 1fr 1fr; } }
.links { list-style: none; padding: 0; margin: 1rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; font-family: var(--sans); font-weight: 550; font-size: .95rem; }

/* ---------- publications ---------- */
.controls { display: grid; gap: .9rem 1.2rem; grid-template-columns: 1fr; margin-bottom: 1.2rem; font-family: var(--sans); }
@media (min-width: 760px) { .controls { grid-template-columns: 1fr auto; align-items: end; } }
.controls label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .25rem; }
.controls input[type=search], .controls select { width: 100%; font: inherit; font-size: 1rem; padding: .65rem .8rem; border: 2px solid var(--ink); border-radius: 2px; background: #fff; color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; grid-column: 1 / -1; }
.chip { font: inherit; font-size: .92rem; font-weight: 550; padding: .4rem .9rem; border: 2px solid var(--line); background: #fff; color: var(--ink); border-radius: 999px; cursor: pointer; }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.count { font-family: var(--sans); color: var(--ink-soft); font-size: .95rem; margin: 0 0 1rem; }
.year-group h2 { font-size: 1.5rem; margin: 2.2rem 0 .6rem; color: var(--gold-deep); }
.empty { padding: 2rem 0; color: var(--ink-soft); }

/* ---------- people ---------- */
.pi { display: grid; gap: 1.5rem 3rem; }
@media (min-width: 860px) { .pi { grid-template-columns: 5fr 7fr; align-items: start; } }
.group-photo { border-radius: 2px; }
.group-photo + figcaption { font-family: var(--sans); font-size: .88rem; color: var(--ink-soft); margin-top: .5rem; }
.roster { list-style: none; margin: 0 0 2.5rem; padding: 0; }
.roster li { display: grid; grid-template-columns: 1fr; gap: .1rem 2rem; padding-block: .7rem; border-top: 1px solid var(--line); }
@media (min-width: 760px) { .roster li { grid-template-columns: minmax(0, 4fr) minmax(0, 6fr) auto; } }
.roster .who { font-family: var(--sans); font-weight: 600; }
.roster .what { color: var(--ink-soft); font-size: 1rem; }
.roster .when { font-family: var(--sans); font-size: .9rem; color: var(--ink-soft); white-space: nowrap; }
details.fold { border-top: 2px solid var(--ink); }
details.fold summary { cursor: pointer; font-family: var(--sans); font-weight: 650; font-size: 1.15rem; padding-block: 1rem; }

/* ---------- events ---------- */
.li-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.li-grid iframe { width: 100%; height: 520px; border: 1px solid var(--line); background: #fff; }
.li-follow { border: 2px solid var(--ink); padding: 1.6rem; max-width: 40rem; }
.li-follow p { margin-bottom: 1rem; }
.event { display: grid; gap: 1rem 2.5rem; padding-block: 2rem; border-top: 2px solid var(--ink); }
@media (min-width: 860px) { .event { grid-template-columns: 4fr 8fr; } }
.event .date { font-family: var(--sans); font-weight: 600; color: var(--gold-deep); margin: 0 0 .3rem; }
.event h3 { margin-bottom: .4em; }
.shots { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.shots img { width: 100%; height: 100%; max-height: 360px; object-fit: cover; border-radius: 2px; }

/* ---------- contact ---------- */
.contact-grid { display: grid; gap: 2rem 4rem; }
@media (min-width: 760px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
.contact-grid dl { margin: 0; }
.contact-grid dt { font-family: var(--sans); font-weight: 650; margin-top: 1.2rem; }
.contact-grid dd { margin: .15rem 0 0; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: #c9d6d4; font-family: var(--sans); font-size: .93rem; padding-block: 2.2rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 3rem; }
.site-footer a { color: #fff; text-decoration-color: var(--gold); }
.site-footer p { margin: 0; max-width: none; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; }

/* ---------- WordPress additions ---------- */
[hidden] { display: none !important; }
.brand-logo, .custom-logo-link { display: block; line-height: 0; }
.brand img, .custom-logo { width: 44px; height: 44px; object-fit: contain; }
.brand-text { text-decoration: none; color: inherit; font-family: var(--sans); font-weight: 650; line-height: 1.15; }
.brand { gap: .8rem; }
.nav-list, .footer-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.4rem; }
.nav-list a { text-decoration: none; padding: .35rem 0; border-bottom: 2px solid transparent; }
.nav-list a:hover { border-bottom-color: var(--gold); color: var(--ink); }
.nav-list .current-menu-item > a, .nav-list .current_page_item > a { border-bottom-color: var(--gold); font-weight: 700; }
.footer-list { gap: .3rem 1.2rem; }
.footer-list a { color: #fff; text-decoration-color: var(--gold); }

.entry { font-size: 1.0625rem; }
.entry > .section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.entry > .section > * { width: min(100% - 2rem, var(--wrap)); margin-inline: auto; }
.entry > .section + .section { padding-top: clamp(2.5rem, 6vw, 4.5rem); }
.section-mist { background: var(--mist); border-block: 1px solid var(--line); }
.entry .wp-block-columns { gap: 1.5rem clamp(2rem, 6vw, 5rem); }
.entry .wp-block-heading:first-child { margin-top: 0; }

.topics { display: grid; gap: 0 2.5rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .topics.two { grid-template-columns: 1fr 1fr; } }
.topic { border-top: 2px solid var(--ink); padding-block: 1rem 1.4rem; }
.topic h3 { margin-bottom: .35em; }
.topic p { margin: 0; color: var(--ink-soft); font-size: 1rem; }
.entry .topics.wp-block-group > * { margin-block: 0; }
.entry ul.links { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; font-family: var(--sans); font-weight: 550; font-size: .95rem; }

.event-body .wp-block-image { margin: 0 0 .6rem; }
.event-body figure { margin-inline: 0; }
.event-body img { border-radius: 2px; width: 100%; height: auto; }
.event-body p { color: var(--ink-soft); }
details.fold .roster { margin-bottom: 1rem; }
.alignwide, .alignfull { max-width: none; }
.topics > .wp-block-group__inner-container { display: contents; }

/* ---------- colour and imagery (v2) ---------- */
.page-head { position: relative; overflow: hidden; }
.page-head .wrap { position: relative; z-index: 1; }

.section-tint { background: var(--gold-tint); border-block: 1px solid #eadfbd; }
.topic { border-top-width: 4px; border-top-color: var(--gold); }
.topic:nth-child(even) { border-top-color: var(--teal); }
.topic h3 { color: var(--ink); }
.year-group h2 { color: var(--teal); }
.chip[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); }
.chip:hover { border-color: var(--teal); }
.pub-list .pid { color: var(--gold-deep); }
.btn:hover { background: var(--teal); border-color: var(--teal); }
a:hover { color: var(--teal); }
.cta { background: var(--ink); }
.cta .wrap { position: relative; z-index: 1; }
.site-footer { background: var(--ink); border-top: 4px solid var(--gold); }
.site-header { border-bottom: 3px solid var(--gold); }

/* home: focus areas and leader section */
.home .entry .wp-block-columns.stack { display: block; }
.entry .photo { margin: 0; }
.entry .photo img { width: 100%; height: auto; border-radius: 2px; box-shadow: 10px 10px 0 var(--gold); }
.entry .photo figcaption { font-family: var(--sans); font-size: .85rem; color: var(--ink-soft); margin-top: 1rem; }
.entry figure.wp-block-gallery.has-nested-images { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin: 1.5rem 0; }
@media (min-width: 760px) { .entry figure.wp-block-gallery.has-nested-images { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.entry figure.wp-block-gallery.has-nested-images > figure.wp-block-image { margin: 0 !important; width: 100% !important; flex: none !important; }
.entry figure.wp-block-gallery.has-nested-images > figure.wp-block-image img { width: 100%; height: auto; aspect-ratio: 4/3; object-fit: cover; }
.entry .wp-block-gallery .wp-block-image img { border-radius: 2px; }
.entry .wp-block-columns { align-items: center; }
.lede { max-width: var(--measure); color: var(--ink-soft); font-size: 1.1rem; }

/* events */
.li-grid { margin-bottom: 2.25rem; }
.li-follow { margin-top: 2.25rem; border-color: var(--teal); }
.li-grid + .li-follow { margin-top: 0; }
.event { grid-template-columns: 1fr; border-top: 4px solid var(--gold); }
@media (min-width: 860px) { .event { grid-template-columns: 4fr 8fr; } }
.event:nth-of-type(even) { border-top-color: var(--teal); }
.event-text p { color: var(--ink-soft); margin: 0 0 .8em; }
.event-media { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.event-media figure, .event-media .wp-block-image { margin: 0; }
.event-media .wp-block-gallery { display: contents; }
.event-media img { width: 100%; height: 100%; object-fit: cover; border-radius: 2px; max-height: 420px; }

/* footer sits at the bottom even on short pages */
body { min-height: 100vh; display: flex; flex-direction: column; }
body > main { flex: 1 0 auto; }

/* portrait of the PI */
.entry .photo.portrait { max-width: 340px; margin-inline: auto; }
.entry .photo.portrait img { aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 18%; }
