/* Geo² Lab Website v3 */
:root {
  --green: #1F4D3A;
  --blue: #1E3A5F;
  --accent: #7DB59A;
  --light: #F4F7F6;
  --dark: #16211D;
  --text: #33423C;
  --white: #FFFFFF;
  --border: #D7E1DD;
  --shadow: 0 10px 28px rgba(15, 38, 28, 0.08);
  --font-scale: 1;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  font-size: calc(1rem * var(--font-scale));
  line-height: 1.7;
}
img { max-width: 100%; display: block; }
a { color: var(--green); }
a:hover { text-decoration-thickness: 2px; }
button, input, textarea { font: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid #E7B650;
  outline-offset: 3px;
}
.skip-link {
  position: fixed;
  top: -100px;
  left: 18px;
  z-index: 1000;
  background: #111827;
  color: #fff;
  padding: 10px 14px;
  border-radius: 0 0 8px 8px;
  text-decoration: none;
}
.skip-link:focus { top: 0; }
.container { width: min(1160px, 92%); margin: 0 auto; }

.site-header {
  position: sticky;
  z-index: 40;
  top: 0;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-top { display: flex; align-items: center; min-height: 92px; gap: 24px; }
.lab-brand { width: 390px; max-width: 50%; }
.lab-brand img { width: 100%; max-height: 76px; object-fit: contain; object-position: left center; }
.university-brand { margin-left: auto; width: 275px; max-width: 32%; }
.university-brand img { width: 100%; max-height: 64px; object-fit: contain; object-position: right center; }
.nav-toggle {
  display: none;
  border: 0;
  background: var(--green);
  color: #fff;
  border-radius: 8px;
  padding: 9px 13px;
  font-weight: 800;
  cursor: pointer;
}
.nav-shell { border-top: 1px solid rgba(215,225,221,0.85); }
.nav {
  display: flex;
  min-height: 50px;
  gap: 25px;
  align-items: center;
  justify-content: center;
}
.nav a { color: var(--dark); font-size: 0.93rem; font-weight: 800; text-decoration: none; }
.nav a:hover { color: var(--green); text-decoration: underline; }

.hero { position: relative; min-height: 73vh; color: #fff; overflow: hidden; background: #173A2E; }
.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 700ms ease-in-out, transform 7s ease-in-out;
  transform: scale(1.03);
}
.hero-image.fade { opacity: 0.25; }
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(7,27,19,0.86), rgba(20,52,78,0.58));
}
.hero-content { position: relative; z-index: 2; max-width: 900px; padding: 85px 0 145px; }
.eyebrow, .section-label {
  margin: 0 0 14px;
  color: #B7DFC7;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 900;
}
.hero h1 { max-width: 900px; margin: 0 0 21px; font-size: clamp(2.4rem, 5.8vw, 5.25rem); line-height: 1.04; }
.hero h1 span { display: inline-block; color: #B7DFC7; white-space: nowrap; }
.hero-subtitle { max-width: 800px; font-size: clamp(1.1rem, 2vw, 1.32rem); margin: 0 0 30px; }
.hero-buttons { display: flex; flex-wrap: wrap; gap: 13px; }
.hero-controls {
  position: absolute;
  z-index: 3;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  width: min(1160px, 92%);
  align-items: center;
  gap: 10px;
  color: #fff;
}
.hero-controls button {
  border: 1px solid rgba(255,255,255,0.6);
  background: rgba(0,0,0,0.25);
  color: #fff;
  border-radius: 8px;
  min-width: 42px;
  min-height: 38px;
  font-weight: 900;
  cursor: pointer;
}
.hero-controls button:hover { background: rgba(255,255,255,0.2); }
#slideStatus { flex: 1; font-weight: 800; text-shadow: 0 1px 3px rgba(0,0,0,0.6); }

.btn {
  display: inline-block;
  padding: 12px 22px;
  border: 2px solid transparent;
  border-radius: 999px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}
.btn.primary { background: var(--green); color: #fff; }
.btn.primary:hover { background: #15392B; text-decoration: none; }
.btn.secondary { color: var(--green); background: #fff; }
.btn.secondary:hover { color: #143A2D; text-decoration: none; }
.btn.small { margin-top: 19px; padding: 10px 17px; }

.section { padding: 86px 0; }
.section.light { background: var(--light); }
.two-col { display: grid; grid-template-columns: 0.88fr 1.32fr; gap: 62px; align-items: start; }
h1, h2, h3 { color: var(--dark); }
h2 { margin: 0 0 22px; line-height: 1.15; font-size: clamp(2rem, 4vw, 3.12rem); }
h3 { line-height: 1.25; }
p { margin: 0 0 15px; }
ul { margin: 0 0 16px; padding-left: 24px; }

.stats { padding: 33px 0; background: var(--green); color: #fff; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 25px; }
.stat-grid > div { border-left: 2px solid rgba(255,255,255,0.38); padding-left: 18px; }
.stat-grid strong { display: block; font-size: 1.46rem; }
.stat-grid span { display: block; line-height: 1.42; opacity: 0.96; }

.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 21px; margin-top: 32px; }
.card, .project, .person, .pub-item {
  background: #fff;
  padding: 25px;
  border: 1px solid var(--border);
  border-radius: 17px;
  box-shadow: var(--shadow);
}
.card h3, .project h3, .person h3, .pub-item h3 { margin: 0 0 10px; }
.card p, .project p, .person p { margin: 0; }
.project-list { display: grid; gap: 17px; margin-top: 28px; }

.team-heading {
  margin: 45px 0 17px;
  padding-bottom: 9px;
  color: var(--green);
  border-bottom: 2px solid var(--border);
  font-size: 1.35rem;
}
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 21px; }
.team-grid.single { grid-template-columns: minmax(280px, 1fr); }
.person { display: flex; flex-direction: column; }
.person.muted { opacity: 0.78; }
.avatar {
  width: 68px; height: 68px;
  display: grid; place-items: center;
  margin-bottom: 17px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green), var(--blue));
  color: #fff; font-weight: 900;
}
.role { color: var(--blue); font-weight: 900; margin: 0 0 10px !important; }
.profile-link { margin-top: auto; padding-top: 17px; font-weight: 900; }

.pub-list { display: grid; gap: 17px; margin-top: 28px; }
.pub-item h3 { font-size: 1.11rem; }
.pub-item p { color: var(--blue); font-weight: 900; margin-bottom: 8px; }

.gallery-intro { max-width: 830px; }
.gallery-intro code { color: var(--blue); background: #E8F0ED; padding: 2px 5px; border-radius: 4px; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 30px; }
.gallery-item {
  overflow: hidden;
  margin: 0;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.gallery-item.wide { grid-column: span 2; }
.gallery-item img { width: 100%; height: 250px; object-fit: cover; transition: transform 240ms ease; }
.gallery-item:hover img { transform: scale(1.03); }
.gallery-item figcaption { padding: 12px 15px; color: var(--dark); font-weight: 900; }

.facility-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 17px; margin-top: 29px; }
.facility-grid span {
  background: #fff;
  border: 1px solid var(--border);
  padding: 16px 18px;
  border-radius: 13px;
  color: var(--dark);
  font-weight: 800;
}
.cta { color: #fff; text-align: center; background: var(--blue); }
.cta h2 { color: #fff; }
.cta p { max-width: 800px; margin: 0 auto 25px; }

.contact-form { display: grid; gap: 14px; }
.contact-form label { display: grid; gap: 6px; font-weight: 800; color: var(--dark); }
.contact-form input, .contact-form textarea {
  width: 100%;
  padding: 13px;
  color: var(--dark);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.contact-form small { color: #61706A; }

.footer { padding: 55px 0 0; background: var(--dark); color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 0.75fr 0.85fr; gap: 45px; }
.footer-logo { width: min(350px, 100%); background: #fff; border-radius: 8px; padding: 7px; margin-bottom: 16px; }
.footer h2 { color: #B7DFC7; margin: 0 0 11px; font-size: 1.1rem; }
.footer a { display: block; margin: 0 0 8px; color: #fff; }
.footer-bottom { margin-top: 38px; padding: 18px 0; border-top: 1px solid rgba(255,255,255,0.2); font-size: 0.9rem; }
.footer-bottom p { margin: 0; }

.accessibility-toggle {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  border: 0;
  border-radius: 999px;
  background: #0B3B70;
  color: #fff;
  box-shadow: 0 8px 22px rgba(0,0,0,0.25);
  font-weight: 900;
  cursor: pointer;
}
.accessibility-panel {
  position: fixed;
  right: 20px;
  bottom: 74px;
  z-index: 201;
  width: min(360px, calc(100vw - 38px));
  padding: 19px;
  border: 1px solid #A8B7AE;
  border-radius: 16px;
  background: #fff;
  color: #16211D;
  box-shadow: 0 14px 42px rgba(0,0,0,0.25);
}
.accessibility-panel[hidden] { display: none; }
.accessibility-panel-header { display: flex; align-items: start; gap: 12px; justify-content: space-between; margin-bottom: 15px; }
.accessibility-panel-header h2 { font-size: 1.3rem; margin: 0; }
.close-tools { width: 33px; height: 33px; border: 0; border-radius: 50%; background: #E9EEEB; color: #16211D; cursor: pointer; font-size: 1.5rem; line-height: 1; }
.accessibility-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.accessibility-actions button {
  min-height: 47px;
  padding: 9px;
  border: 1px solid #B9C6BE;
  border-radius: 9px;
  color: #173B2E;
  background: #F6F9F7;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}
.accessibility-actions button[aria-pressed="true"] { background: #D9ECE0; border-color: #1F4D3A; }
.accessibility-actions .reset-tools { grid-column: span 2; background: #1F4D3A; color: #fff; border-color: #1F4D3A; text-align: center; }
.accessibility-statement-link { display: inline-block; margin-top: 16px; font-weight: 900; }

.statement { max-width: 940px; }
.statement h1 { font-size: clamp(2.4rem, 5vw, 4rem); line-height: 1.1; margin: 0 0 30px; }
.statement h2 { margin-top: 40px; font-size: 1.75rem; }
.statement li { margin-bottom: 8px; }

/* Accessibility modes controlled by script.js */
html.grayscale { filter: grayscale(1); }
html.high-contrast body { background: #000 !important; color: #fff !important; }
html.high-contrast .site-header, html.high-contrast .nav, html.high-contrast .section.light, html.high-contrast .card, html.high-contrast .project, html.high-contrast .person, html.high-contrast .pub-item, html.high-contrast .facility-grid span, html.high-contrast .gallery-item, html.high-contrast .accessibility-panel { background: #000 !important; color: #fff !important; border-color: #fff !important; box-shadow: none !important; }
html.high-contrast h1, html.high-contrast h2, html.high-contrast h3, html.high-contrast .nav a, html.high-contrast .role, html.high-contrast .gallery-item figcaption { color: #fff !important; }
html.high-contrast a { color: #FFFF00 !important; }
html.high-contrast .btn.primary, html.high-contrast .btn.secondary { background: #FFFF00 !important; color: #000 !important; border-color: #FFFF00 !important; }
html.negative-contrast { filter: invert(1) hue-rotate(180deg); }
html.negative-contrast img { filter: invert(1) hue-rotate(180deg); }
html.light-background body, html.light-background .section.light { background: #fff !important; color: #111 !important; }
html.links-underline a { text-decoration: underline !important; text-decoration-thickness: 2px !important; }
html.readable-font body, html.readable-font button, html.readable-font input, html.readable-font textarea { font-family: Arial, Helvetica, sans-serif !important; letter-spacing: 0.03em; word-spacing: 0.06em; }

@media (max-width: 960px) {
  .header-top { min-height: 76px; }
  .lab-brand { width: 320px; max-width: 54%; }
  .university-brand { width: 220px; max-width: 30%; }
  .nav-toggle { display: inline-block; margin-left: auto; }
  .university-brand { margin-left: 0; }
  .nav-shell { position: relative; }
  .nav {
    display: none;
    position: absolute;
    z-index: 50;
    top: 0;
    left: 0;
    right: 0;
    padding: 17px 4%;
    flex-direction: column;
    align-items: stretch;
    background: #fff;
    border-bottom: 1px solid var(--border);
  }
  .nav.active { display: flex; }
  .nav a { padding: 7px 0; }
  .two-col, .stat-grid, .card-grid, .team-grid, .team-grid.single, .gallery-grid, .facility-grid, .footer-grid { grid-template-columns: 1fr; }
  .gallery-item.wide { grid-column: span 1; }
  .gallery-item img, .gallery-item.wide img { height: 230px; }
  .section { padding: 64px 0; }
}
@media (max-width: 570px) {
  .lab-brand { max-width: 63%; }
  .lab-brand img { max-height: 60px; }
  .university-brand { display: none; }
  .hero h1 { font-size: clamp(2.15rem, 11vw, 3.3rem); }
  .hero-content { padding-top: 65px; }
  .hero-controls { gap: 7px; }
  #slideStatus { font-size: 0.83rem; }
  #pauseSlide { font-size: 0.78rem; }
  .accessibility-toggle { right: 12px; bottom: 12px; }
  .accessibility-panel { right: 12px; bottom: 67px; }
  .accessibility-actions { grid-template-columns: 1fr; }
  .accessibility-actions .reset-tools { grid-column: span 1; }
}


/* Interactive project cards */
.interactive-intro {
  max-width: 820px;
  margin-bottom: 28px;
}
.project-interactive-grid {
  display: grid;
  gap: 18px;
}
.project-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}
.project-card > summary {
  display: grid;
  grid-template-columns: 285px 1fr auto;
  gap: 24px;
  align-items: center;
  cursor: pointer;
  list-style: none;
}
.project-card > summary::-webkit-details-marker {
  display: none;
}
.project-card > summary > img {
  width: 100%;
  height: 190px;
  object-fit: cover;
}
.project-card-title {
  padding: 22px 0;
}
.project-card-title h3 {
  margin: 4px 0 8px;
  font-size: 1.28rem;
}
.project-card-title p {
  margin: 0;
}
.project-number {
  color: var(--green);
  font-size: 0.83rem;
  font-weight: 950;
  letter-spacing: 0.12em;
}
.project-toggle {
  align-self: end;
  margin: 0 24px 22px 0;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--green);
  font-size: 0.85rem;
  font-weight: 900;
  white-space: nowrap;
}
.project-card[open] .project-toggle {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
}
.project-card[open] .project-toggle::after {
  content: "";
}
.project-expanded {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 22px;
  padding: 27px;
  border-top: 1px solid var(--border);
  background: #F8FBF9;
}
.project-expanded h3 {
  margin: 0 0 10px;
  font-size: 1.22rem;
}
.project-expanded h4 {
  margin: 0 0 9px;
  color: var(--blue);
  font-size: 1rem;
}
.project-expanded ul {
  margin: 0;
  padding-left: 19px;
}
.project-expanded li {
  margin-bottom: 6px;
}
.project-image-note {
  grid-column: 1 / -1;
  margin: 0;
  color: #65746D;
  font-size: 0.86rem;
  font-style: italic;
}

/* Gallery image source links */
.gallery-item > a {
  display: block;
  color: inherit;
}
.gallery-item > a:focus-visible {
  outline: 3px solid #E7B650;
  outline-offset: -4px;
}
.image-credit-note {
  margin-top: 24px;
  padding: 16px 19px;
  border-left: 4px solid var(--green);
  background: #E8F0ED;
  color: var(--dark);
  border-radius: 0 10px 10px 0;
}
.profile-links {
  margin-top: 14px !important;
  font-weight: 800;
}

@media (max-width: 860px) {
  .project-card > summary {
    grid-template-columns: 180px 1fr;
    gap: 18px;
  }
  .project-toggle {
    grid-column: 2;
    margin: 0 0 18px;
    justify-self: start;
  }
  .project-expanded {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 570px) {
  .project-card > summary {
    display: block;
  }
  .project-card > summary > img {
    height: 205px;
  }
  .project-card-title {
    padding: 18px 18px 10px;
  }
  .project-toggle {
    display: inline-block;
    margin: 0 18px 18px;
  }
  .project-expanded {
    padding: 20px;
  }
}


/* Actual Geo² Lab and University of Silesia logos */
.header-top {
  min-height: 106px;
}
.lab-brand {
  display: flex;
  align-items: center;
  gap: 13px;
  width: auto;
  max-width: 61%;
  color: var(--dark);
  text-decoration: none;
}
.lab-brand .lab-mark {
  width: 84px;
  height: 82px;
  flex: 0 0 84px;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
}
.lab-brand-text {
  display: grid;
  gap: 1px;
  line-height: 1.12;
}
.lab-brand-text strong {
  color: #123A29;
  font-size: 1.65rem;
  letter-spacing: 0.01em;
}
.lab-brand-text span {
  color: #1E3A5F;
  font-size: 0.92rem;
  font-weight: 800;
}
.university-brand {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 11px;
  width: auto;
  max-width: 38%;
  margin-left: auto;
  color: #0B4D93;
  font-size: 0.86rem;
  font-weight: 900;
  line-height: 1.15;
  text-decoration: none;
}
.university-brand .university-mark {
  width: 82px;
  height: 63px;
  object-fit: contain;
}
.lab-brand:hover,
.university-brand:hover {
  text-decoration: none;
}
.lab-brand:hover .lab-brand-text strong,
.university-brand:hover {
  color: var(--green);
}

/* The panel guarantees a readable lab name over every changing hero image. */
.hero-title-panel {
  display: inline-block;
  max-width: 940px;
  padding: 28px 31px 31px;
  border: 1px solid rgba(255,255,255,0.42);
  border-radius: 18px;
  background: rgba(3, 17, 11, 0.74);
  box-shadow: 0 14px 45px rgba(0,0,0,0.26);
  backdrop-filter: blur(4px);
}
.hero .eyebrow {
  color: #C8EDD6;
}
.hero h1 {
  color: #FFFFFF;
  text-shadow: 0 2px 5px rgba(0,0,0,0.65);
}
.hero h1 span {
  color: #C8EDD6;
}
.hero-subtitle {
  color: #FFFFFF;
  text-shadow: 0 1px 3px rgba(0,0,0,0.7);
}
.footer-logo {
  width: min(300px, 100%);
  max-height: 165px;
  object-fit: contain;
  object-position: left center;
  background: #fff;
  border-radius: 10px;
  padding: 7px;
}

@media (max-width: 960px) {
  .header-top { min-height: 88px; }
  .lab-brand .lab-mark {
    width: 66px;
    height: 65px;
    flex-basis: 66px;
  }
  .lab-brand-text strong { font-size: 1.25rem; }
  .lab-brand-text span { font-size: 0.77rem; }
  .university-brand .university-mark {
    width: 60px;
    height: 49px;
  }
  .university-brand { font-size: 0.71rem; }
  .hero-title-panel { padding: 23px 22px 25px; }
}

@media (max-width: 570px) {
  .lab-brand { max-width: 74%; gap: 9px; }
  .lab-brand .lab-mark {
    width: 54px;
    height: 54px;
    flex-basis: 54px;
  }
  .lab-brand-text strong { font-size: 1.08rem; }
  .lab-brand-text span { font-size: 0.65rem; }
  .university-brand { display: none; }
  .hero-title-panel { padding: 20px 17px 22px; }
}


/* v6: clean homepage title directly over image — no title box/panel */
.hero-title-panel {
  display: contents !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}
.hero h1,
.hero h1 span {
  color: #FFFFFF !important;
}
.hero .eyebrow {
  color: #FFFFFF !important;
}
.hero h1,
.hero-subtitle,
.hero .eyebrow {
  text-shadow: 0 2px 7px rgba(0, 0, 0, 0.82);
}


/* v7 — Geo² Lab images, profile photographs, and linked profile icons */
.lab-brand .lab-mark {
  width: 94px;
  height: 78px;
  flex-basis: 94px;
  object-fit: contain;
  object-position: center;
  background: transparent;
  border-radius: 0;
}
.hero .eyebrow {
  color: #F6D676 !important;
  text-shadow: 0 2px 7px rgba(0, 0, 0, 0.84);
}
.hero h1,
.hero h1 span {
  color: #FFFFFF !important;
}
.person-featured {
  overflow: hidden;
}
.team-photo {
  width: calc(100% + 50px);
  height: 270px;
  margin: -25px -25px 20px;
  object-fit: cover;
  object-position: center 22%;
  background: #E8EEEA;
}
.profile-icon-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.profile-icon-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 6px 10px 6px 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--dark);
  background: #F8FBF9;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.1;
  text-decoration: none;
}
.profile-icon-link:hover {
  color: var(--green);
  border-color: var(--green);
  text-decoration: none;
}
.profile-icon-link img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}
.team-contact {
  margin-top: 16px !important;
  color: var(--dark);
  font-size: 0.91rem;
  overflow-wrap: anywhere;
}
.gallery-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.gallery-item.wide {
  grid-column: span 2;
}
.gallery-item img {
  height: 245px;
  object-fit: cover;
}
.gallery-item.wide img {
  height: 320px;
}

@media (max-width: 960px) {
  .lab-brand .lab-mark {
    width: 76px;
    height: 66px;
    flex-basis: 76px;
  }
  .team-photo {
    height: 250px;
  }
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 570px) {
  .lab-brand .lab-mark {
    width: 58px;
    height: 53px;
    flex-basis: 58px;
  }
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  .gallery-item.wide {
    grid-column: span 1;
  }
  .gallery-item img,
  .gallery-item.wide img {
    height: 235px;
  }
  .profile-icon-link {
    font-size: 0.74rem;
  }
}


/* v8 — one-line hero title, small uncropped team portraits, and coastal research */
@media (min-width: 961px) {
  .hero-content {
    max-width: 100%;
  }
  .hero h1 {
    max-width: none;
    white-space: nowrap;
    font-size: clamp(2rem, 3vw, 2.7rem);
    letter-spacing: -0.028em;
  }
}
.team-photo.team-photo-small {
  width: 132px !important;
  height: 132px !important;
  display: block;
  margin: 0 auto 18px !important;
  padding: 4px;
  object-fit: contain !important;
  object-position: center center !important;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: #FFFFFF;
}
.person-featured .team-photo + h3 {
  text-align: center;
}
.person-featured .team-photo + h3 + .role {
  text-align: center;
}

@media (max-width: 960px) {
  .hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
  }
}
@media (max-width: 570px) {
  .hero h1 {
    white-space: normal;
    letter-spacing: -0.02em;
  }
  .team-photo.team-photo-small {
    width: 116px !important;
    height: 116px !important;
  }
}


/* Bilingual language selector */
.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #F8FBF9;
  color: #607168;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
}
.lang-link {
  padding: 5px 6px;
  color: var(--dark);
  border-radius: 999px;
  text-decoration: none;
}
.lang-link:hover {
  color: var(--green);
  text-decoration: none;
}
.lang-link.active {
  background: var(--green);
  color: #FFFFFF;
}
.statement-language {
  margin-left: auto;
}
@media (max-width: 960px) {
  .language-switcher {
    margin-left: auto;
  }
  .university-brand + .language-switcher {
    margin-left: 0;
  }
}
@media (max-width: 570px) {
  .language-switcher {
    font-size: 0.72rem;
    gap: 4px;
    padding: 4px 6px;
  }
  .statement-language {
    margin-left: auto;
  }
}


/* v10: clearer English / Polski language controls */
.language-switcher {
  white-space: nowrap;
}
.language-switcher .lang-link {
  padding: 6px 9px;
  font-size: 0.8rem;
}
.language-page-note {
  display: inline-block;
  margin: 0 0 10px;
  padding: 4px 9px;
  border: 1px solid rgba(255,255,255,0.55);
  border-radius: 999px;
  color: #FFFFFF;
  background: rgba(0,0,0,0.22);
  font-size: 0.76rem;
  font-weight: 800;
}
@media (max-width: 570px) {
  .language-switcher .lang-link {
    padding: 5px 7px;
    font-size: 0.72rem;
  }
}


/* v12 — icon-only accessibility control in the top-right corner */
.accessibility-toggle {
  top: 118px !important;
  right: 18px !important;
  bottom: auto !important;
  width: 48px;
  height: 48px;
  min-width: 48px;
  padding: 0 !important;
  justify-content: center;
  border-radius: 50% !important;
  font-size: 1.45rem;
}
.accessibility-panel {
  top: 176px !important;
  right: 18px !important;
  bottom: auto !important;
}
@media (max-width: 960px) {
  .accessibility-toggle {
    top: 94px !important;
    right: 14px !important;
  }
  .accessibility-panel {
    top: 152px !important;
    right: 14px !important;
  }
}
@media (max-width: 570px) {
  .accessibility-toggle {
    top: 82px !important;
    right: 12px !important;
    width: 44px;
    height: 44px;
    min-width: 44px;
  }
  .accessibility-panel {
    top: 136px !important;
    right: 12px !important;
  }
}


/* v13 — Akshay portrait square crop and ResearchGate live update note */
.rg-live-note {
  margin: 18px 0 10px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #F8FBF9;
}
.rg-live-note p {
  margin: 0 0 12px;
}
.team-photo {
  object-position: center 20% !important;
}


/* v14 — Akshay photo aligned to other profile style, gallery intro removed, Google Form upload icon */
.person-featured .team-photo {
  border-radius: 20px;
}

.upload-photos-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 6px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #F8FBF9;
  color: var(--dark);
  font-size: 0.86rem;
  font-weight: 800;
  text-decoration: none;
}
.upload-photos-link:hover {
  color: var(--green);
  border-color: var(--green);
  text-decoration: none;
}
.upload-photos-link img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}


/* v15 — Akshay image small like Dinesh Kumar Sahu and Tran Trung Hieu */
.person-featured .team-photo {
  width: 150px !important;
  height: 150px !important;
  margin: 0 auto 18px !important;
  display: block !important;
  object-fit: cover !important;
  object-position: center 18% !important;
  border-radius: 50% !important;
}
.person-featured {
  text-align: center;
}
.person-featured .profile-icon-links {
  justify-content: center;
}
.person-featured .team-contact {
  text-align: center;
}


/* v18 — News & Requirements sections */
.updates-intro {
  max-width: 800px;
  margin-bottom: 28px;
}
.updates-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.update-card {
  min-height: 100%;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}
.update-card h3 {
  margin: 13px 0 10px;
  font-size: 1.25rem;
}
.update-card p {
  margin-bottom: 14px;
}
.update-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.update-date,
.update-status,
.update-label {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}
.update-date {
  background: #E7F1EB;
  color: var(--green);
}
.update-status {
  background: #E7F1EB;
  color: var(--green);
}
.update-label {
  border: 1px solid var(--border);
  color: var(--blue);
}
.update-link {
  display: inline-block;
  margin-top: 4px;
  font-weight: 900;
}
.updates-empty,
.updates-noscript {
  padding: 18px;
  border: 1px dashed var(--border);
  border-radius: 14px;
  background: #fff;
}
.updates-empty {
  grid-column: 1 / -1;
  margin: 0;
}

html.high-contrast .update-card,
html.high-contrast .updates-empty,
html.high-contrast .updates-noscript {
  background: #000 !important;
  color: #fff !important;
  border-color: #fff !important;
}
html.high-contrast .update-card h3,
html.high-contrast .update-label {
  color: #fff !important;
}
html.high-contrast .update-date,
html.high-contrast .update-status {
  background: #fff !important;
  color: #000 !important;
}

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


/* v19 — Page navigation and Geo² Lab dropdown */
.nav {
  gap: 18px;
}
.nav a,
.nav-dropdown summary {
  color: var(--dark);
  font-size: 0.93rem;
  font-weight: 800;
  text-decoration: none;
}
.nav a:hover,
.nav a[aria-current="page"],
.nav-dropdown summary:hover,
.nav-dropdown.active-dropdown > summary {
  color: var(--green);
  text-decoration: underline;
}
.nav-dropdown {
  position: relative;
}
.nav-dropdown summary {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 50px;
  cursor: pointer;
  list-style: none;
}
.nav-dropdown summary::-webkit-details-marker {
  display: none;
}
.nav-dropdown-arrow {
  font-size: 0.85rem;
  line-height: 1;
  transition: transform 180ms ease;
}
.nav-dropdown[open] .nav-dropdown-arrow {
  transform: rotate(180deg);
}
.nav-dropdown-menu {
  position: absolute;
  z-index: 70;
  top: calc(100% - 5px);
  left: -18px;
  min-width: 205px;
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
}
.nav-dropdown-menu a {
  display: block;
  padding: 9px 11px;
  border-radius: 8px;
}
.nav-dropdown-menu a:hover,
.nav-dropdown-menu a[aria-current="page"] {
  background: #E7F1EB;
  text-decoration: none;
}
.page-hero {
  padding: 72px 0 58px;
  background: linear-gradient(115deg, #173A2E, #1D4E3B 58%, #1D4058);
  color: #fff;
}
.page-hero .section-label {
  color: #B7DFC7;
}
.page-hero h1 {
  max-width: 900px;
  margin: 0 0 16px;
  font-size: clamp(2.25rem, 5vw, 4.2rem);
  line-height: 1.08;
}
.page-hero-intro {
  max-width: 790px;
  margin: 0;
  font-size: 1.15rem;
}
@media (max-width: 1120px) and (min-width: 961px) {
  .nav { gap: 12px; }
  .nav a,
  .nav-dropdown summary { font-size: 0.84rem; }
}
@media (max-width: 960px) {
  .nav-dropdown {
    width: 100%;
  }
  .nav-dropdown summary {
    display: flex;
    width: 100%;
    min-height: auto;
    padding: 7px 0;
  }
  .nav-dropdown-menu {
    position: static;
    min-width: 0;
    margin: 5px 0 6px;
    padding: 7px 12px;
    box-shadow: none;
  }
  .nav-dropdown-menu a {
    padding: 8px 0;
  }
  .page-hero {
    padding: 58px 0 46px;
  }
}


/* v20 — page visual redesign inspired by modern research-lab interfaces */
:root { --navy:#071D36; --ink:#0F2740; }

.site-header { box-shadow:0 2px 14px rgba(4,26,49,.08); }
.nav-shell { background:var(--navy)!important; border-top:0!important; }
.nav-shell .nav > a,
.nav-shell .nav > .nav-dropdown > summary { color:#fff!important; }
.nav-shell .nav > a:hover,
.nav-shell .nav > a[aria-current="page"],
.nav-shell .nav > .nav-dropdown > summary:hover,
.nav-shell .nav > .nav-dropdown.active-dropdown > summary { color:#9DDBFF!important; text-decoration:none!important; }
.nav-dropdown-menu { background:#fff!important; border:1px solid rgba(155,218,255,.4)!important; }
.nav-dropdown-menu a { color:var(--ink)!important; }
.nav-dropdown-menu a:hover,
.nav-dropdown-menu a[aria-current="page"] { color:#0C4E7A!important; background:#EAF7FF!important; }
.nav-dropdown-arrow { color:#9DDBFF; }

.hero { min-height:72vh; }
.hero-overlay { background:linear-gradient(90deg,rgba(3,17,32,.92) 0%,rgba(3,24,46,.72) 48%,rgba(3,24,46,.28) 100%),linear-gradient(125deg,rgba(5,30,59,.35),rgba(14,105,126,.18)); }
.home-hero-sketch { position:absolute; z-index:1; right:-2%; bottom:-2%; width:min(75%,1000px); opacity:.44; pointer-events:none; mix-blend-mode:screen; }
.hero-content { max-width:850px; }
.hero h1 { color:#fff!important; text-shadow:0 3px 26px rgba(0,0,0,.34); letter-spacing:-.028em; }
.hero h1 span { color:#9DDBFF!important; }
.hero-subtitle { color:rgba(255,255,255,.96); text-shadow:0 2px 12px rgba(0,0,0,.36); }
.hero .btn.primary { background:#0B4C78; border-color:#0B4C78; }
.hero .btn.primary:hover { background:#083C61; }
.hero .btn.secondary { color:#fff; background:rgba(255,255,255,.10); border-color:rgba(255,255,255,.8); backdrop-filter:blur(6px); }
.hero .btn.secondary:hover { color:#fff; background:rgba(255,255,255,.22); }
.hero-controls { border-top:1px solid rgba(255,255,255,.28); padding-top:12px; }

.about-home { position:relative; overflow:hidden; background:#fff; }
.about-home .two-col { position:relative; z-index:1; }
.about-home h2 { color:var(--ink); }
.about-home .section-label { color:#0B5E97; }
.about-sketch { position:absolute; z-index:0; right:-100px; bottom:-115px; width:min(760px,60%); opacity:.10; pointer-events:none; }
.about-home::after { content:""; position:absolute; inset:auto -10% -55% 46%; height:530px; background:repeating-radial-gradient(ellipse at 64% 55%,transparent 0 23px,rgba(15,86,134,.11) 24px 26px,transparent 27px 42px); opacity:.42; pointer-events:none; }

.page-hero { position:relative; overflow:hidden; isolation:isolate; padding:78px 0 68px!important; color:#fff!important; background:radial-gradient(circle at 84% 20%,rgba(76,182,255,.20),transparent 34%),linear-gradient(120deg,#06182E 0%,#0B3158 56%,#0F4E76 100%)!important; }
.page-hero::before { content:""; position:absolute; z-index:-1; inset:0; opacity:.62; background:linear-gradient(115deg,rgba(1,12,27,.72),rgba(2,25,48,.34)),repeating-linear-gradient(0deg,transparent 0 34px,rgba(179,225,255,.08) 35px 36px,transparent 37px 69px); }
.page-hero::after { content:""; position:absolute; z-index:-1; right:-6%; bottom:-50%; width:72%; height:155%; border:1px solid rgba(180,232,255,.12); border-radius:52% 48% 50% 50%; box-shadow:0 0 0 58px rgba(180,232,255,.035),0 0 0 116px rgba(180,232,255,.03),0 0 0 174px rgba(180,232,255,.025); }
.page-hero--team { background:radial-gradient(circle at 82% 18%,rgba(79,193,255,.28),transparent 34%),linear-gradient(120deg,#06182E 0%,#12365A 56%,#154B72 100%)!important; }
.page-hero--publications { background:radial-gradient(circle at 82% 20%,rgba(111,196,255,.26),transparent 35%),linear-gradient(120deg,#06182E 0%,#0E3157 56%,#0A416D 100%)!important; }
.page-hero--news { background:radial-gradient(circle at 82% 20%,rgba(61,235,203,.20),transparent 37%),linear-gradient(120deg,#06212F 0%,#075149 56%,#0A384E 100%)!important; }
.page-hero--requirements { background:radial-gradient(circle at 82% 20%,rgba(255,184,42,.27),transparent 37%),linear-gradient(120deg,#2A1B03 0%,#6E4804 56%,#6E3608 100%)!important; }
.page-hero--research { background:radial-gradient(circle at 82% 20%,rgba(107,206,255,.25),transparent 37%),linear-gradient(120deg,#06182E 0%,#09385C 54%,#105A81 100%)!important; }
.page-hero--projects { background:radial-gradient(circle at 82% 20%,rgba(64,241,202,.20),transparent 37%),linear-gradient(120deg,#062C31 0%,#0A554D 56%,#104B5D 100%)!important; }
.page-hero--gallery { background:radial-gradient(circle at 82% 20%,rgba(188,120,255,.26),transparent 37%),linear-gradient(120deg,#21113E 0%,#442373 56%,#253B6D 100%)!important; }
.page-hero--join { background:radial-gradient(circle at 82% 20%,rgba(99,204,255,.24),transparent 37%),linear-gradient(120deg,#062032 0%,#0B4B6A 56%,#115A7A 100%)!important; }
.page-hero--contact { background:radial-gradient(circle at 82% 20%,rgba(103,206,255,.24),transparent 37%),linear-gradient(120deg,#06182E 0%,#0A3159 56%,#164A70 100%)!important; }
.page-hero .container { position:relative; z-index:2; }
.page-hero h1,.page-hero h2,.page-hero h3 { color:#fff!important; text-shadow:0 3px 22px rgba(0,0,0,.32); }
.page-hero h1 { max-width:850px; margin:0 0 16px!important; font-size:clamp(2.45rem,5.4vw,4.7rem)!important; letter-spacing:-.035em; }
.page-hero .section-label { color:#A9E2FF!important; }
.page-hero-intro { color:rgba(255,255,255,.94)!important; max-width:740px; }
.page-breadcrumb { display:flex; flex-wrap:wrap; gap:3px; margin:0 0 23px; color:rgba(255,255,255,.82); font-size:.9rem; font-weight:700; }
.page-breadcrumb a { color:#B5E7FF; text-decoration:none; }
.page-breadcrumb a:hover { color:#fff; text-decoration:underline; }
.page-breadcrumb strong { color:#fff; }
.page-hero-sketch { position:absolute; z-index:1; right:-2%; bottom:-9%; width:min(60%,780px); opacity:.66; pointer-events:none; filter:drop-shadow(0 8px 23px rgba(0,0,0,.16)); }
.page-hero--requirements .section-label,.page-hero--requirements .page-breadcrumb a { color:#FFE5A8!important; }
.page-hero--gallery .section-label,.page-hero--gallery .page-breadcrumb a { color:#E3CCFF!important; }
.page-hero--news .section-label,.page-hero--news .page-breadcrumb a,.page-hero--projects .section-label,.page-hero--projects .page-breadcrumb a { color:#B5FFE9!important; }

main > .section:first-of-type h2,main > .section.light:first-of-type h2 { color:var(--ink); }
.section-label { color:#0B5D95; }

@media(max-width:960px) {
 .nav-shell .nav { background:var(--navy)!important; border-bottom-color:rgba(180,225,255,.22)!important; }
 .nav-shell .nav > a,.nav-shell .nav > .nav-dropdown > summary { color:#fff!important; }
 .page-hero { padding:62px 0 53px!important; }
 .page-hero-sketch { right:-17%; width:92%; opacity:.34; }
 .about-sketch { width:100%; right:-25%; }
}
@media(max-width:570px) {
 .page-hero h1 { font-size:clamp(2.1rem,11vw,3.1rem)!important; }
 .page-breadcrumb { font-size:.79rem; margin-bottom:18px; }
 .page-hero-sketch { right:-32%; width:125%; bottom:-2%; }
 .home-hero-sketch { width:130%; right:-37%; opacity:.25; }
 .about-home::after { inset:auto -65% -52% 15%; }
}


/* v21 — Stable graphical page banners
   The sketches are now CSS backgrounds, fixed to the right side of each banner.
   This prevents them from covering headings or moving into the page content. */

.page-hero {
  position: relative !important;
  min-height: 300px !important;
  padding: 62px 0 !important;
  overflow: hidden !important;
  isolation: isolate !important;
}

.page-hero .container {
  position: relative !important;
  z-index: 3 !important;
}

.page-hero .container > * {
  max-width: 57%;
}

.page-hero .section-label,
.page-hero .page-breadcrumb,
.page-hero h1,
.page-hero .page-hero-intro {
  position: relative;
  z-index: 3;
}

.page-hero h1 {
  color: #FFFFFF !important;
  line-height: 1.08 !important;
  text-shadow: 0 3px 20px rgba(0, 0, 0, 0.46) !important;
}

.page-hero .page-hero-intro,
.page-hero .page-breadcrumb {
  color: rgba(255, 255, 255, 0.94) !important;
}

.page-hero::before {
  z-index: 1 !important;
  opacity: 1 !important;
  background:
    linear-gradient(90deg, rgba(3, 17, 33, 0.92) 0%, rgba(3, 22, 43, 0.78) 48%, rgba(3, 22, 43, 0.26) 100%) !important;
}

/* Main right-side graphical background */
.page-hero::after {
  content: "" !important;
  position: absolute !important;
  z-index: 2 !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: auto !important;
  width: 47% !important;
  height: auto !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  opacity: 0.70 !important;
  pointer-events: none !important;
  background-image: var(--page-sketch) !important;
  background-repeat: no-repeat !important;
  background-position: center right 6% !important;
  background-size: min(560px, 100%) auto !important;
}

/* Specific page sketches */
.page-hero--team { --page-sketch: url("images/page-sketch-team.svg"); }
.page-hero--publications { --page-sketch: url("images/page-sketch-publications.svg"); }
.page-hero--news { --page-sketch: url("images/page-sketch-news.svg"); }
.page-hero--requirements { --page-sketch: url("images/page-sketch-requirements.svg"); }
.page-hero--research { --page-sketch: url("images/page-sketch-research.svg"); }
.page-hero--projects { --page-sketch: url("images/page-sketch-projects.svg"); }
.page-hero--gallery { --page-sketch: url("images/page-sketch-gallery.svg"); }
.page-hero--join { --page-sketch: url("images/page-sketch-join.svg"); }
.page-hero--contact { --page-sketch: url("images/page-sketch-contact.svg"); }

/* No background graphic is placed over the homepage slideshow. */
.home-hero-sketch {
  display: none !important;
}

/* Old image-based banner graphics remain hidden in all screen sizes. */
.page-hero-sketch {
  display: none !important;
}

/* White section headings inside normal page content remain dark, only banner titles are white. */
main > section:not(.page-hero) h2,
main > section:not(.page-hero) h3 {
  color: var(--ink) !important;
}

@media (max-width: 980px) {
  .page-hero {
    min-height: 280px !important;
    padding: 54px 0 !important;
  }

  .page-hero .container > * {
    max-width: 63%;
  }

  .page-hero::after {
    width: 52% !important;
    opacity: 0.42 !important;
    background-size: min(500px, 112%) auto !important;
    background-position: center right -20px !important;
  }
}

@media (max-width: 680px) {
  .page-hero {
    min-height: 255px !important;
    padding: 48px 0 44px !important;
  }

  .page-hero .container > * {
    max-width: 100%;
  }

  .page-hero::before {
    background:
      linear-gradient(90deg, rgba(3, 17, 33, 0.93) 0%, rgba(3, 22, 43, 0.88) 68%, rgba(3, 22, 43, 0.72) 100%) !important;
  }

  .page-hero::after {
    width: 100% !important;
    opacity: 0.16 !important;
    background-position: center right -48px !important;
    background-size: 470px auto !important;
  }

  .page-hero h1 {
    max-width: 100% !important;
    font-size: clamp(2.05rem, 10vw, 3.1rem) !important;
  }

  .page-hero .page-hero-intro {
    max-width: 100% !important;
  }
}


/* v22 — Visible scientific graphics as true page-banner backgrounds
   Each SVG is now part of the banner background, not a floating object. */

.page-hero {
  position: relative !important;
  overflow: hidden !important;
  isolation: isolate !important;
  min-height: 320px !important;
  padding: 68px 0 !important;

  /* The first layer keeps the white title readable.
     The second layer is the visible scientific sketch. */
  background-image:
    linear-gradient(
      90deg,
      rgba(2, 17, 33, 0.93) 0%,
      rgba(4, 27, 51, 0.84) 42%,
      rgba(5, 39, 70, 0.58) 67%,
      rgba(5, 39, 70, 0.32) 100%
    ),
    var(--page-sketch) !important;
  background-repeat: no-repeat, no-repeat !important;
  background-position: center, right 3% center !important;
  background-size: cover, min(760px, 58%) auto !important;
}

/* Remove older overlay layers so the graphic stays visible. */
.page-hero::before,
.page-hero::after {
  display: none !important;
}

.page-hero .container {
  position: relative !important;
  z-index: 2 !important;
}

.page-hero .container > * {
  max-width: 57%;
}

.page-hero h1,
.page-hero h2,
.page-hero h3,
.page-hero .page-hero-intro,
.page-hero .page-breadcrumb,
.page-hero .page-breadcrumb strong {
  color: #FFFFFF !important;
}

.page-hero h1 {
  text-shadow: 0 3px 20px rgba(0, 0, 0, 0.55) !important;
}

.page-hero .page-hero-intro {
  color: rgba(255, 255, 255, 0.96) !important;
}

.page-hero .page-breadcrumb a {
  color: #C8EDFF !important;
}

/* Each page gets its own visible background graphic and colour field. */
.page-hero--team {
  --page-sketch: url("images/page-sketch-team.svg");
  background-color: #0A365D !important;
}
.page-hero--publications {
  --page-sketch: url("images/page-sketch-publications.svg");
  background-color: #0B3F6C !important;
}
.page-hero--news {
  --page-sketch: url("images/page-sketch-news.svg");
  background-color: #075347 !important;
}
.page-hero--requirements {
  --page-sketch: url("images/page-sketch-requirements.svg");
  background-color: #704600 !important;
}
.page-hero--research {
  --page-sketch: url("images/page-sketch-research.svg");
  background-color: #0A4770 !important;
}
.page-hero--projects {
  --page-sketch: url("images/page-sketch-projects.svg");
  background-color: #0A534E !important;
}
.page-hero--gallery {
  --page-sketch: url("images/page-sketch-gallery.svg");
  background-color: #46307A !important;
}
.page-hero--join {
  --page-sketch: url("images/page-sketch-join.svg");
  background-color: #0A4A6A !important;
}
.page-hero--contact {
  --page-sketch: url("images/page-sketch-contact.svg");
  background-color: #0B3E65 !important;
}

/* Join page: make “Work with Geo² Lab” white and use the collaboration
   sketch as a strong background inside the call-to-action section. */
#join.cta {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background-color: #083C57 !important;
  background-image:
    linear-gradient(
      90deg,
      rgba(3, 27, 42, 0.94) 0%,
      rgba(4, 54, 74, 0.82) 48%,
      rgba(7, 74, 94, 0.48) 100%
    ),
    url("images/page-sketch-join.svg") !important;
  background-repeat: no-repeat, no-repeat !important;
  background-position: center, right 6% center !important;
  background-size: cover, min(650px, 52%) auto !important;
}

#join.cta .container {
  position: relative;
  z-index: 1;
  max-width: 780px;
  margin-left: max(20px, calc((100% - 1180px) / 2));
  margin-right: auto;
}

#join.cta h2,
#join.cta p {
  color: #FFFFFF !important;
}

#join.cta h2 {
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.40);
}

#join.cta .btn.secondary {
  color: #FFFFFF !important;
  background: rgba(255, 255, 255, 0.10) !important;
  border-color: rgba(255, 255, 255, 0.86) !important;
}

#join.cta .btn.secondary:hover {
  background: rgba(255, 255, 255, 0.24) !important;
  color: #FFFFFF !important;
}

@media (max-width: 980px) {
  .page-hero {
    min-height: 290px !important;
    padding: 58px 0 !important;
    background-position: center, right -20px center !important;
    background-size: cover, min(630px, 70%) auto !important;
  }

  .page-hero .container > * {
    max-width: 64%;
  }

  #join.cta {
    background-position: center, right -35px center !important;
    background-size: cover, min(600px, 70%) auto !important;
  }
}

@media (max-width: 680px) {
  .page-hero {
    min-height: 260px !important;
    padding: 50px 0 46px !important;
    background-image:
      linear-gradient(
        90deg,
        rgba(2, 17, 33, 0.95) 0%,
        rgba(4, 27, 51, 0.89) 62%,
        rgba(5, 39, 70, 0.74) 100%
      ),
      var(--page-sketch) !important;
    background-position: center, right -74px center !important;
    background-size: cover, 520px auto !important;
  }

  .page-hero .container > * {
    max-width: 100%;
  }

  #join.cta {
    background-position: center, right -90px center !important;
    background-size: cover, 520px auto !important;
  }

  #join.cta .container {
    margin-left: auto;
    margin-right: auto;
  }
}

/* Accessibility modes retain readable white titles and visible borders. */
html.high-contrast .page-hero,
html.high-contrast #join.cta {
  background-color: #000000 !important;
  background-image: none !important;
  border-top: 1px solid #FFFFFF;
  border-bottom: 1px solid #FFFFFF;
}

/* v24 — Compact inner-page banners and mountain-sketch footer
   The homepage slideshow keeps its original height. */

/* Compact banners for Team, Publications, News, Requirements, Research,
   Projects, Gallery, Join Us, Contact, and their Polish versions. */
.page-hero {
  min-height: 220px !important;
  padding: 32px 0 30px !important;
  background-position: center, right 4% center !important;
  background-size: cover, min(545px, 46%) auto !important;
}

.page-hero .container > * {
  max-width: 62%;
}

.page-hero .page-breadcrumb {
  margin-bottom: 10px !important;
  font-size: 0.82rem !important;
  line-height: 1.35;
}

.page-hero .section-label {
  margin-bottom: 7px !important;
  font-size: 0.71rem !important;
}

.page-hero h1 {
  max-width: 760px !important;
  margin-bottom: 8px !important;
  font-size: clamp(2.05rem, 4vw, 3.35rem) !important;
  line-height: 1.02 !important;
}

.page-hero .page-hero-intro {
  max-width: 690px !important;
  font-size: 1rem !important;
  line-height: 1.5 !important;
}

/* Compact footer with a subtle geomorphology-inspired mountain sketch. */
.footer {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: 34px 0 0 !important;
  background:
    linear-gradient(90deg, rgba(8, 27, 34, 0.96), rgba(15, 35, 31, 0.94)),
    var(--dark) !important;
}

.footer::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  background-image: url("images/footer-mountain-sketch.svg");
  background-repeat: no-repeat;
  background-position: center bottom -2px;
  background-size: max(1180px, 100%) auto;
}

.footer::after {
  content: "";
  position: absolute;
  z-index: 0;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(188, 234, 255, 0.55), transparent);
}

.footer .container {
  position: relative;
  z-index: 1;
}

.footer-grid {
  grid-template-columns: 1.35fr 0.7fr 0.8fr !important;
  gap: 34px !important;
  align-items: start;
}

.footer-logo {
  width: min(232px, 100%) !important;
  max-height: 112px !important;
  margin-bottom: 10px !important;
  padding: 5px !important;
}

.footer-grid > div:first-child p {
  max-width: 500px;
  margin-bottom: 0;
  font-size: 0.92rem;
  line-height: 1.55;
}

.footer h2 {
  margin-bottom: 7px !important;
  font-size: 1rem !important;
}

.footer a {
  margin-bottom: 4px !important;
  font-size: 0.92rem;
  line-height: 1.45;
}

.footer-bottom {
  margin-top: 22px !important;
  padding: 11px 0 13px !important;
  font-size: 0.82rem !important;
}

@media (max-width: 980px) {
  .page-hero {
    min-height: 210px !important;
    padding: 30px 0 28px !important;
    background-position: center, right -28px center !important;
    background-size: cover, min(500px, 57%) auto !important;
  }

  .page-hero .container > * {
    max-width: 68%;
  }

  .footer-grid {
    gap: 26px !important;
  }
}

@media (max-width: 680px) {
  .page-hero {
    min-height: 205px !important;
    padding: 28px 0 26px !important;
    background-position: center, right -90px center !important;
    background-size: cover, 430px auto !important;
  }

  .page-hero .container > * {
    max-width: 100%;
  }

  .page-hero h1 {
    font-size: clamp(1.95rem, 9.4vw, 2.7rem) !important;
  }

  .page-hero .page-hero-intro {
    font-size: 0.94rem !important;
    line-height: 1.42 !important;
  }

  .footer {
    padding-top: 28px !important;
  }

  .footer::before {
    opacity: 0.15;
    background-position: 58% bottom;
    background-size: 1040px auto;
  }

  .footer-grid {
    gap: 22px !important;
  }

  .footer-logo {
    width: min(210px, 100%) !important;
  }

  .footer-bottom {
    margin-top: 16px !important;
  }
}

/* Keep the compact footer readable on tablets and phones. */
@media (max-width: 960px) {
  .footer-grid {
    grid-template-columns: 1fr !important;
  }
}
