/* ==========================================================================
   Małecka Lab — Joomla site template
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,600;1,8..60,400&display=swap');

:root {
  /* surfaces */
  --paper-bright: #ffffff;
  --paper:        #f2f4f7;
  --paper-deep:   #e8ecf2;

  /* ink */
  --ink:       #16202b;
  --ink-deep:  #0a1119;
  --ink-soft:  #56646f;

  /* lines */
  --line:      rgba(22, 32, 43, 0.16);
  --line-soft: rgba(22, 32, 43, 0.09);

  /* accent — IIMCB navy */
  --accent:      #1b3a6b;
  --accent-deep: #12294c;
  --accent-soft: #e9eff7;

  /* secondary — muted teal */
  --teal:      #2f6f7d;
  --teal-soft: #e6f0f2;

  --shell: 1180px;
  --radius: 10px;
  --radius-lg: 16px;

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: "Source Serif 4", "Iowan Old Style", Georgia, "Times New Roman", serif;

  --shadow-sm: 0 1px 3px rgba(10, 17, 25, 0.05);
  --shadow-md: 0 14px 34px -20px rgba(10, 17, 25, 0.4);
}

/* --------------------------------------------------------------- reset -- */

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

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

body.site {
  margin: 0;
  background: var(--paper-bright);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16.5px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* display:block removes the baseline descender gap under images — without it,
   cards with a photo sit a few pixels lower than cards with a placeholder */
img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: clamp(18px, 5vw, 40px);
}

.skip-link {
  position: absolute; left: -9999px;
  background: var(--ink-deep); color: #fff;
  padding: 10px 18px; z-index: 100;
}
.skip-link:focus { left: 0; top: 0; }

/* ------------------------------------------------------------ typography -- */

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.5em;
  color: var(--ink-deep);
  font-family: var(--font-sans);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.018em;
}

h1 { font-size: clamp(2rem, 4vw, 3.05rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.45rem); }
h4 { font-size: 1.1rem; }

/* the two-typeface treatment: a serif phrase inside a sans heading */
h1 span, h2 span, h3 span,
h1 em, h2 em, h3 em,
.serif {
  font-family: var(--font-serif);
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.005em;
  color: var(--accent);
}

h1 span, h2 span { display: block; }

p { margin: 0 0 1.15em; }

blockquote {
  margin: 1.8em 0;
  padding: 0 0 0 1.5em;
  border-left: 2px solid var(--accent);
  border-radius: 0;
  font-family: var(--font-serif);
  font-size: 1.16rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

hr { border: 0; border-top: 1px solid var(--line-soft); margin: 2.6em 0; }

::selection { background: var(--accent-soft); color: var(--ink-deep); }

/* ---------------------------------------------------------------- topbar -- */

.topbar { background: var(--ink-deep); color: #fff; font-size: 0.86rem; }
.topbar .shell { display: flex; gap: 20px; align-items: center; justify-content: flex-end; min-height: 38px; }
.topbar a { color: #a8c4e4; }

/* ---------------------------------------------------------------- header -- */

.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 28px);
  min-height: 78px;
}

/* logo only — no wordmark text beside it */
.brand { display: flex; align-items: center; flex: none; }
.brand:hover { text-decoration: none; }
.brand__logo { height: 50px; width: auto; display: block; }
.brand__text { display: none; }

.institute { margin-left: auto; flex: none; display: flex; align-items: center; }
.institute img {
  width: 40px; height: 40px;
  border-radius: 50%;
  object-fit: contain;
  opacity: 0.9;
  transition: opacity 0.2s;
}
.institute:hover img { opacity: 1; }

/* ------------------------------------------------------------------ nav -- */

.site-nav { margin-left: auto; }

.site-nav ul {
  display: flex;
  align-items: center;
  gap: clamp(2px, 0.7vw, 10px);
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav li { position: relative; }

.site-nav a {
  display: block;
  padding: 9px 13px;
  border-radius: var(--radius);
  color: var(--ink-soft);
  font-size: 0.93rem;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.18s, color 0.18s;
}
.site-nav a:hover { background: var(--paper); color: var(--ink-deep); text-decoration: none; }

.site-nav .current > a,
.site-nav .active > a {
  background: var(--accent);
  color: #fff;
}

.site-nav li ul {
  display: none;
  position: absolute; top: 100%; left: 0;
  min-width: 220px;
  flex-direction: column;
  gap: 2px;
  padding: 7px;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}
.site-nav li:hover > ul,
.site-nav li:focus-within > ul { display: flex; }

.nav-toggle { display: none; }
.nav-toggle__button { display: none; }

/* --------------------------------------------------------------- layout -- */

.hero-zone { background: var(--paper); border-bottom: 1px solid var(--line-soft); }
.hero-zone > * { width: 100%; }

.hero {
  max-width: var(--shell);
  margin-inline: auto;
  padding: clamp(42px, 6vw, 84px) clamp(18px, 5vw, 40px);
  display: grid;
  gap: clamp(28px, 4vw, 56px);
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
}

.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 0.74rem; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink-soft); margin-bottom: 18px;
}
.hero__eyebrow::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
}

.hero h1 { margin-bottom: 0.35em; }

.hero__lead { font-size: clamp(1.02rem, 1.7vw, 1.2rem); color: var(--ink-soft); max-width: 46ch; }

.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

.hero__stats {
  display: flex; flex-wrap: wrap; gap: clamp(20px, 4vw, 46px);
  margin: clamp(30px, 4vw, 48px) 0 0; padding-top: 26px;
  border-top: 1px solid var(--line-soft);
}
.hero__stats div { display: grid; gap: 2px; }
.hero__stats dt { font-family: var(--font-serif); font-size: 1.6rem; font-weight: 600; color: var(--accent); }
.hero__stats dd { margin: 0; font-size: 0.76rem; letter-spacing: 0.11em; text-transform: uppercase; color: var(--ink-soft); }

.hero__visual { position: relative; }
.hero__visual img { width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.hero__caption {
  display: flex; justify-content: space-between; gap: 12px;
  margin-top: 11px; font-size: 0.74rem; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--ink-soft);
}

.below-hero { padding-block: 34px; display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.site-main { padding-block: clamp(40px, 6vw, 76px); }

.page-grid { display: block; }

body.has-sidebar .page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}

.page-content { min-width: 0; }
.page-sidebar { position: sticky; top: 102px; display: grid; gap: 20px; }

/* --------------------------------------------------------------- modules -- */

.card, .moduletable {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
}

.card > h3, .moduletable > h3,
.card .card-header, .moduletable .card-header {
  margin: 0 0 14px;
  padding: 0 0 12px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: none;
}

.card ul, .moduletable ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.card ul a, .moduletable ul a { color: var(--ink-soft); }
.card ul a:hover, .moduletable ul a:hover { color: var(--accent); }

/* --------------------------------------------------- Joomla article body -- */

.page-header {
  margin-bottom: 1.8em;
  padding-bottom: 1.1em;
  border-bottom: 1px solid var(--line-soft);
}

.article-info, .com-content-article__info {
  display: flex; flex-wrap: wrap; gap: 8px 18px;
  margin: 0 0 1.6em; padding: 0; list-style: none;
  font-size: 0.78rem; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-soft);
}
.article-info dd { margin: 0; }
.article-info dt.article-info-term { display: none; }

.item-page img, .blog-item img, .com-content-article img { border-radius: var(--radius); }

.com-content-category-blog__items, .blog .items-row {
  display: grid;
  gap: clamp(20px, 3vw, 32px);
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.com-content-category-blog__item, .blog .item {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 26px 28px;
  transition: border-color 0.2s, transform 0.2s;
}
.com-content-category-blog__item:hover, .blog .item:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.com-content-category-blog__item h2, .blog .item h2 { font-size: 1.2rem; }

/* ---------------------------------------------------------------- tables -- */

table { width: 100%; border-collapse: collapse; margin: 1.8em 0; font-size: 0.95rem; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line-soft); }
th {
  background: var(--paper);
  font-weight: 600; letter-spacing: 0.05em;
  text-transform: uppercase; font-size: 0.74rem; color: var(--ink-soft);
}
tbody tr:hover { background: var(--paper); }

/* --------------------------------------------------------------- buttons -- */

.btn, button, input[type="submit"], input[type="button"], .readmore a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font: inherit; font-size: 0.92rem; font-weight: 500; line-height: 1;
  cursor: pointer; text-decoration: none;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}
.btn:hover, button:hover, input[type="submit"]:hover, .readmore a:hover {
  background: var(--accent-deep); border-color: var(--accent-deep);
  color: #fff; text-decoration: none;
}

.btn-secondary, .btn-outline, .btn.btn-outline-primary {
  background: transparent; color: var(--accent);
}
.btn-secondary:hover, .btn-outline:hover { background: var(--accent); color: #fff; }

/* ----------------------------------------------------------------- forms -- */

input[type="text"], input[type="email"], input[type="tel"], input[type="url"],
input[type="password"], input[type="search"], input[type="number"],
select, textarea, .form-control {
  width: 100%; padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff; color: var(--ink);
  font: inherit; font-size: 0.95rem;
}
input:focus, select:focus, textarea:focus, .form-control:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

label, .control-label { font-size: 0.85rem; font-weight: 600; color: var(--ink-soft); }
fieldset { border: 0; padding: 0; margin: 0 0 1.6em; }

/* --------------------------------------------------------- system alerts -- */

.alert, .joomla-alert {
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--paper);
  padding: 15px 20px; margin-bottom: 1.6em;
}
.alert-success, .joomla-alert--success { border-left-color: #2f7d5c; }
.alert-warning, .joomla-alert--warning { border-left-color: #b07d1a; }
.alert-danger, .joomla-alert--danger   { border-left-color: #a8443a; }

/* ------------------------------------------------------- breadcrumbs/nav -- */

.breadcrumb, .mod-breadcrumbs {
  display: flex; flex-wrap: wrap; gap: 8px;
  list-style: none; margin: 0 0 1.8em; padding: 0;
  font-size: 0.8rem; color: var(--ink-soft);
}
.breadcrumb a { color: var(--ink-soft); }
.breadcrumb-item + .breadcrumb-item::before { content: "/"; padding-right: 8px; opacity: 0.45; }

.pagination { display: flex; gap: 6px; list-style: none; padding: 0; margin: 2.4em 0 0; }
.pagination a, .pagination span {
  display: block; padding: 9px 14px;
  border: 1px solid var(--line-soft); border-radius: var(--radius);
  color: var(--ink-soft); font-size: 0.89rem;
}
.pagination .active span, .pagination a:hover {
  background: var(--accent); color: #fff; border-color: var(--accent); text-decoration: none;
}

/* -------------------------------------------------------- above-footer -- */

.above-footer {
  background: var(--ink-deep); color: #fff;
  padding-block: clamp(46px, 6vw, 78px);
}
.above-footer h1, .above-footer h2, .above-footer h3 { color: #fff; }
.above-footer h2 span, .above-footer h2 em { color: #9db8dd; }
.above-footer p { color: #b9c4cf; }
.above-footer .section-kicker { color: #8fa3ba; }
.above-footer a { color: #a8c4e4; }
.above-footer .btn { background: #fff; border-color: #fff; color: var(--ink-deep); }
.above-footer .btn:hover { background: var(--accent-soft); border-color: var(--accent-soft); color: var(--ink-deep); }

/* ---------------------------------------------------------------- footer -- */

.site-footer {
  background: var(--paper);
  border-top: 1px solid var(--line-soft);
  padding-top: clamp(40px, 5vw, 62px);
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.site-footer__inner {
  display: grid;
  gap: clamp(26px, 4vw, 46px);
  grid-template-columns: 1.4fr repeat(3, 1fr);
  align-items: start;
}

.site-footer__logo { height: 54px; width: auto; margin-bottom: 14px; }
.site-footer__brand p { margin: 0 0 16px; line-height: 1.5; }
.site-footer__iimcb img { width: 32px; height: 32px; border-radius: 50%; object-fit: contain; opacity: 0.85; }

.site-footer__col .moduletable, .site-footer__col .card {
  background: none; border: 0; box-shadow: none; padding: 0;
}
.site-footer__col h3 {
  font-size: 0.72rem; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--ink-deep); margin-bottom: 12px; border: 0; padding: 0;
}
.site-footer__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.site-footer__col a { color: var(--ink-soft); }
.site-footer__col a:hover { color: var(--accent); }

.site-footer__bottom {
  display: flex; flex-wrap: wrap; gap: 14px;
  align-items: center; justify-content: space-between;
  margin-top: clamp(32px, 4vw, 48px);
  padding-block: 20px;
  border-top: 1px solid var(--line-soft);
  font-size: 0.81rem;
}

/* ------------------------------------------------------ helper utilities -- */

.section-kicker {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--ink-soft); margin-bottom: 12px;
}

.lead {
  font-family: var(--font-serif);
  font-size: clamp(1.08rem, 1.8vw, 1.32rem);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 62ch;
}

.grid-2 { display: grid; gap: clamp(20px, 3vw, 32px); grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-3 { display: grid; gap: clamp(20px, 3vw, 32px); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.tile {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 26px 28px;
}

/* a tile that is itself a link */
a.tile {
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s;
}
a.tile:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  text-decoration: none;
}
a.tile h3 { transition: color 0.18s; }
a.tile:hover h3 { color: var(--accent); }
a.tile p { flex: 1; }

.tile__more {
  margin: 0.9em 0 0;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--accent);
  flex: none;
}

/* heading with an action on the right */
.section-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1.6em;
}
.section-heading h2 { margin-bottom: 0; }
.section-heading__actions { flex: none; }

.person-card { text-align: left; }
.person-card img {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover;
  border-radius: var(--radius-lg); margin-bottom: 14px;
}
.person-card h3 { margin-bottom: 2px; font-size: 1.05rem; }
.person-card p {
  margin: 0; font-size: 0.82rem; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--ink-soft);
}

/* card links through to the full bio when the article has one */
.person-card__link { display: block; color: inherit; text-decoration: none; }
.person-card__link:hover { text-decoration: none; }
.person-card__link:hover h3 { color: var(--accent); }
.person-card__link img { transition: opacity 0.2s; }
.person-card__link:hover img { opacity: 0.9; }

.person-card__placeholder {
  width: 100%; aspect-ratio: 1 / 1;
  border-radius: var(--radius-lg);
  margin-bottom: 14px;
  background: var(--paper-deep);
}

.news-card h3 a { color: inherit; text-decoration: none; }
.news-card h3 a:hover { color: var(--accent); }

/* single news article */
.article-meta {
  display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center;
  margin-bottom: 1.4em;
  font-size: 0.76rem; letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--ink-soft);
}
.article-meta .tag { color: var(--accent); font-weight: 600; }

.back-link {
  display: inline-block;
  margin-bottom: 1.6em;
  font-size: 0.88rem;
  color: var(--ink-soft);
}
.back-link:hover { color: var(--accent); }

/* article headline sits below the display size used for section landing pages */
.is-article .page-header h1 {
  font-size: clamp(1.5rem, 2.6vw, 2.05rem);
  line-height: 1.25;
  max-width: 24ch;
}

.article-body { max-width: 68ch; }
.article-body p { font-size: 1.04rem; }

/* photo with caption inside an article */
.article-figure { margin: 2em 0; }
.article-figure img {
  width: 100%;
  border-radius: var(--radius);
  background: var(--paper);
}
.article-figure figcaption {
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

/* portrait-orientation photos shouldn't tower over the text */
.article-figure--portrait img { max-width: 420px; }

/* one gallery per story — every photo the same mid size, whatever the count */
.article-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 900px;
  margin: 2.4em 0 0;
}
.article-gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
}
.article-gallery figcaption {
  grid-column: 1 / -1;
  margin-top: 2px;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

@media (max-width: 760px) {
  .article-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 460px) {
  .article-gallery { grid-template-columns: 1fr; max-width: 340px; }
}

.article-nav {
  display: flex; flex-wrap: wrap; gap: 14px;
  justify-content: space-between; align-items: center;
  margin-top: 3em; padding-top: 1.6em;
  border-top: 1px solid var(--line-soft);
  font-size: 0.9rem;
}

.category-desc { margin-bottom: 2em; }

.tag-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 1.4em 0; }
.tag-row span {
  padding: 7px 15px; border: 1px solid var(--line);
  border-radius: var(--radius); font-size: 0.81rem; color: var(--ink-soft);
}

.accent { color: var(--accent); }
.highlight { box-shadow: inset 0 -0.42em 0 var(--accent-soft); }

/* --- research: banded sections, all laid out the same way --------------- */

.research-band {
  border-radius: var(--radius-lg);
  padding: clamp(26px, 4vw, 48px);
  margin-bottom: clamp(20px, 3vw, 32px);
}
.research-band:last-of-type { margin-bottom: 0; }

/* alternating background so each programme reads as its own section */
.research-band--tint  { background: var(--paper); }
.research-band--plain { background: #fff; border: 1px solid var(--line-soft); }

.research-band__inner {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
}

/* figures are scientific diagrams on white — give them a card so they sit
   deliberately on the tinted bands, and cap the height so a tall portrait
   figure doesn't make its band twice as deep as the others */
.research-band__figure {
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.research-band__figure img {
  max-width: 100%;
  max-height: 460px;
  width: auto;
  height: auto;
  display: block;
  margin-inline: auto;
}

.research-band__number {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.research-band__body h2 { margin-bottom: 0.45em; font-size: clamp(1.4rem, 2.4vw, 1.85rem); }
.research-band__body p { color: var(--ink-soft); }
.research-band__body p:last-child { margin-bottom: 0; }
.research-band__body ul { margin: 1.1em 0; padding-left: 1.15em; color: var(--ink-soft); }
.research-band__body li { margin-bottom: 0.5em; }

/* --- people: biography sections ---------------------------------------- */

.person-bio {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: clamp(20px, 3vw, 36px);
  align-items: start;
  padding-block: clamp(26px, 3.5vw, 40px);
  border-bottom: 1px solid var(--line-soft);
  scroll-margin-top: 110px;
}
.person-bio:last-child { border-bottom: 0; }

.person-bio__portrait img {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover;
  border-radius: var(--radius-lg);
}
.person-bio__placeholder {
  width: 100%; aspect-ratio: 1 / 1;
  border-radius: var(--radius-lg);
  background: var(--paper-deep);
}

.person-bio__role {
  font-size: 0.76rem; letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--ink-soft); margin-bottom: 6px;
}
.person-bio h2 { font-size: clamp(1.2rem, 2vw, 1.5rem); margin-bottom: 0.6em; }
.person-bio p { font-size: 0.98rem; }
.person-bio p:last-child { margin-bottom: 0; }

.person-links { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 1em; font-size: 0.88rem; }

/* --- grants: dated entries with funder logo ----------------------------- */

.grant {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 150px;
  gap: clamp(18px, 3vw, 38px);
  align-items: start;
  padding-block: clamp(24px, 3vw, 36px);
  border-bottom: 1px solid var(--line-soft);
}
.grant:last-child { border-bottom: 0; }

.grant__years {
  font-family: var(--font-serif);
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--accent);
  padding-top: 2px;
}
.grant__body h3 { margin-bottom: 0.4em; font-size: 1.18rem; }
.grant__body p { margin-bottom: 0.6em; color: var(--ink-soft); font-size: 0.96rem; }
/* fixed box so logos of different proportions read as the same size */
.grant__logo {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 74px;
  padding-top: 2px;
}
.grant__logo img {
  max-height: 100%;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* --- publications ------------------------------------------------------- */

.pub-year {
  display: flex; align-items: center; gap: 14px;
  margin: 2.4em 0 1em;
  font-family: var(--font-serif);
  font-size: 1.3rem; font-weight: 600; color: var(--accent);
}
.pub-year::after { content: ""; flex: 1; height: 1px; background: var(--line-soft); }

.pub {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 14px;
  padding-block: 16px;
  border-bottom: 1px solid var(--line-soft);
}
.pub:last-child { border-bottom: 0; }
.pub__num {
  font-size: 0.82rem; font-variant-numeric: tabular-nums;
  color: var(--ink-soft); padding-top: 4px;
}
.pub__title { font-weight: 500; color: var(--ink-deep); margin: 0 0 4px; line-height: 1.4; }
.pub__authors { margin: 0 0 4px; font-size: 0.92rem; color: var(--ink-soft); }
.pub__authors strong { color: var(--ink); font-weight: 600; }
.pub__meta { margin: 0; font-size: 0.88rem; color: var(--ink-soft); }
.pub__meta em { font-family: var(--font-serif); font-style: italic; }

/* --- news --------------------------------------------------------------- */

.news-grid {
  display: grid; gap: clamp(20px, 3vw, 30px);
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
}
.news-card {
  display: flex; flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 24px 26px;
  transition: border-color 0.2s, transform 0.2s;
}
.news-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.news-card__top {
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
  margin-bottom: 12px;
  font-size: 0.72rem; letter-spacing: 0.13em; text-transform: uppercase; color: var(--ink-soft);
}
.news-card__tag { color: var(--accent); font-weight: 600; }
.news-card h3 { font-size: 1.1rem; margin-bottom: 0.5em; }
.news-card p { font-size: 0.94rem; color: var(--ink-soft); flex: 1; }
.news-card a.readmore-link { font-size: 0.9rem; font-weight: 500; }

/* --- join us ------------------------------------------------------------ */

.project-block {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 3vw, 34px);
  margin-bottom: 26px;
  background: var(--paper);
}
.project-block__ref {
  font-size: 0.76rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-soft); margin-bottom: 8px;
}
.project-block h3 { font-size: 1.22rem; margin-bottom: 0.5em; }

.position {
  display: flex; flex-wrap: wrap; gap: 10px 16px;
  align-items: center; justify-content: space-between;
  padding: 15px 18px;
  margin-top: 12px;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
}
.position__role { font-weight: 600; color: var(--ink-deep); }
.position__when { font-size: 0.86rem; color: var(--ink-soft); }

/* --- contact ------------------------------------------------------------ */

.contact-grid {
  display: grid; gap: clamp(24px, 4vw, 46px);
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: start;
}
.contact-block h3 {
  font-size: 0.74rem; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--ink-soft); margin-bottom: 14px;
}
.contact-block address { font-style: normal; line-height: 1.75; }
.contact-block a { word-break: break-word; }

@media (max-width: 780px) {
  .research-row { grid-template-columns: 1fr; }
  .research-row--flip .research-row__figure { order: 0; }
  .grant { grid-template-columns: 90px minmax(0, 1fr); }
  .grant__logo { grid-column: 2; justify-content: flex-start; }
}

/* ------------------------------------------------------------ responsive -- */

@media (max-width: 1040px) {
  .site-nav a { padding: 9px 9px; font-size: 0.88rem; }
}

@media (max-width: 900px) {
  .site-footer__inner { grid-template-columns: 1fr 1fr; }
  body.has-sidebar .page-grid { grid-template-columns: 1fr; }
  .page-sidebar { position: static; }
}

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .site-header__inner { flex-wrap: wrap; min-height: 68px; gap: 12px; }

  .institute { order: 2; margin-left: auto; }

  .nav-toggle__button {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    order: 3; width: 42px; height: 42px; padding: 10px;
    border: 1px solid var(--line); border-radius: var(--radius);
    cursor: pointer; background: #fff;
  }
  .nav-toggle__button span { display: block; height: 2px; background: var(--ink-deep); border-radius: 2px; }

  .site-nav { order: 4; flex-basis: 100%; margin-left: 0; display: none; padding-bottom: 14px; }
  .nav-toggle:checked ~ .site-nav { display: block; }

  .site-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .site-nav a { padding: 12px 14px; font-size: 0.95rem; }
  .site-nav li ul { position: static; display: flex; box-shadow: none; border: 0; padding: 0 0 0 16px; }

  .brand__logo { height: 40px; }
}

@media (max-width: 560px) {
  .site-footer__inner { grid-template-columns: 1fr; }
  .site-footer__bottom { flex-direction: column; align-items: flex-start; }
}

@media print {
  .site-header, .site-footer, .page-sidebar, .above-footer, .topbar { display: none; }
  body.site { background: #fff; }
}
